Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor fixes #1773

Merged
merged 12 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/ketchup/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@
"vanilla-picker": "^2.12.1"
},
"devDependencies": {
"@stencil/core": "^4.8.1",
"@stencil/core": "^4.12.0",
"@stencil/react-output-target": "0.5.3",
"@stencil/sass": "^3.0.7",
"@stencil/sass": "^3.0.9",
"jest": "^29.7.0",
"jest-cli": "^29.7.0",
"jest-html-reporter": "^3.10.2",
Expand Down
5 changes: 2 additions & 3 deletions packages/ketchup/src/assets/editor-example-1.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,17 @@ comp.addEventListener('kup-editor-autosave', (e) => {

let props = {
customStyle: '',
editorHeight: '400px',
initialEditType: 'wysiwyg',
initialValue:
'<div data-tomark-pass="">prova prova 123456 56<br></div><div data-tomark-pass=""><br></div><div data-tomark-pass="">e vado a capo<br></div><div data-tomark-pass=""><br></div><div data-tomark-pass="">ancora<br></div><div data-tomark-pass=""><br></div><div data-tomark-pass="">e ancora</div>',
isReadOnly: false,
previewStyle: 'tab',
showSaveButton: false,
showSaveButton: true,
showToolbar: true,
autosaveTimer: 5000,
};

comp.style = '--kup-editor-height: 400px;';

if (props) {
for (const key in props) {
comp[key] = props[key];
Expand Down
10 changes: 10 additions & 0 deletions packages/ketchup/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1846,6 +1846,11 @@ export namespace Components {
* @see https://ketchup.smeup.com/ketchup-showcase/#/customization
*/
"customStyle": string;
/**
* Sets the height of the component.
* @default "auto"
*/
"editorHeight": string;
/**
* Used to retrieve component's props values.
* @param descriptions - When provided and true, the result will be the list of props with their description.
Expand Down Expand Up @@ -6504,6 +6509,11 @@ declare namespace LocalJSX {
* @see https://ketchup.smeup.com/ketchup-showcase/#/customization
*/
"customStyle"?: string;
/**
* Sets the height of the component.
* @default "auto"
*/
"editorHeight"?: string;
/**
* The editor type.
* @default 'markdown'
Expand Down
18 changes: 18 additions & 0 deletions packages/ketchup/src/components/kup-accordion/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ Type: `Promise<void>`

Used to retrieve component's props values.

#### Parameters

| Name | Type | Description |
| -------------- | --------- | -------------------------------------------------------------------------------------- |
| `descriptions` | `boolean` | - When provided and true, the result will be the list of props with their description. |

#### Returns

Type: `Promise<GenericObject>`
Expand All @@ -65,6 +71,12 @@ Type: `Promise<void>`

Sets the props to the component.

#### Parameters

| Name | Type | Description |
| ------- | --------------- | ------------------------------------------------------------ |
| `props` | `GenericObject` | - Object containing props that will be set to the component. |

#### Returns

Type: `Promise<void>`
Expand All @@ -75,6 +87,12 @@ Type: `Promise<void>`

This method activates or deactivates an item

#### Parameters

| Name | Type | Description |
| ---------- | -------- | ------------------- |
| `itemName` | `string` | - Name of the item. |

#### Returns

Type: `Promise<void>`
Expand Down
18 changes: 18 additions & 0 deletions packages/ketchup/src/components/kup-autocomplete/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@

Used to retrieve component's props values.

#### Parameters

| Name | Type | Description |
| -------------- | --------- | -------------------------------------------------------------------------------------- |
| `descriptions` | `boolean` | - When provided and true, the result will be the list of props with their description. |

#### Returns

Type: `Promise<GenericObject>`
Expand Down Expand Up @@ -79,6 +85,12 @@ Type: `Promise<void>`

Sets the props to the component.

#### Parameters

| Name | Type | Description |
| ------- | --------------- | ------------------------------------------------------------ |
| `props` | `GenericObject` | - Object containing props that will be set to the component. |

#### Returns

Type: `Promise<void>`
Expand All @@ -89,6 +101,12 @@ Type: `Promise<void>`

Sets the value of the component.

#### Parameters

| Name | Type | Description |
| ------- | -------- | ------------------------- |
| `value` | `string` | - Value of the component. |

#### Returns

Type: `Promise<void>`
Expand Down
12 changes: 12 additions & 0 deletions packages/ketchup/src/components/kup-badge/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@

Used to retrieve component's props values.

#### Parameters

| Name | Type | Description |
| -------------- | --------- | -------------------------------------------------------------------------------------- |
| `descriptions` | `boolean` | - When provided and true, the result will be the list of props with their description. |

#### Returns

Type: `Promise<GenericObject>`
Expand All @@ -45,6 +51,12 @@ Type: `Promise<void>`

Sets the props to the component.

#### Parameters

| Name | Type | Description |
| ------- | --------------- | ------------------------------------------------------------ |
| `props` | `GenericObject` | - Object containing props that will be set to the component. |

#### Returns

Type: `Promise<void>`
Expand Down
19 changes: 19 additions & 0 deletions packages/ketchup/src/components/kup-box/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@

Used to retrieve component's props values.

#### Parameters

| Name | Type | Description |
| -------------- | --------- | -------------------------------------------------------------------------------------- |
| `descriptions` | `boolean` | - When provided and true, the result will be the list of props with their description. |

#### Returns

Type: `Promise<GenericObject>`
Expand All @@ -66,6 +72,13 @@ List of props as object, each key will be a prop.



#### Parameters

| Name | Type | Description |
| --------- | -------------------- | ----------- |
| `row` | `KupBoxRow` | |
| `actions` | `KupDataRowAction[]` | |

#### Returns

Type: `Promise<void>`
Expand All @@ -86,6 +99,12 @@ Type: `Promise<void>`

Sets the props to the component.

#### Parameters

| Name | Type | Description |
| ------- | --------------- | ------------------------------------------------------------ |
| `props` | `GenericObject` | - Object containing props that will be set to the component. |

#### Returns

Type: `Promise<void>`
Expand Down
12 changes: 12 additions & 0 deletions packages/ketchup/src/components/kup-button-list/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@

Used to retrieve component's props values.

#### Parameters

| Name | Type | Description |
| -------------- | --------- | -------------------------------------------------------------------------------------- |
| `descriptions` | `boolean` | - When provided and true, the result will be the list of props with their description. |

#### Returns

Type: `Promise<GenericObject>`
Expand All @@ -52,6 +58,12 @@ Type: `Promise<void>`

Sets the props to the component.

#### Parameters

| Name | Type | Description |
| ------- | --------------- | ------------------------------------------------------------ |
| `props` | `GenericObject` | - Object containing props that will be set to the component. |

#### Returns

Type: `Promise<void>`
Expand Down
12 changes: 12 additions & 0 deletions packages/ketchup/src/components/kup-button/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@

Used to retrieve component's props values.

#### Parameters

| Name | Type | Description |
| -------------- | --------- | -------------------------------------------------------------------------------------- |
| `descriptions` | `boolean` | - When provided and true, the result will be the list of props with their description. |

#### Returns

Type: `Promise<GenericObject>`
Expand All @@ -55,6 +61,12 @@ Type: `Promise<void>`

Sets the props to the component.

#### Parameters

| Name | Type | Description |
| ------- | --------------- | ------------------------------------------------------------ |
| `props` | `GenericObject` | - Object containing props that will be set to the component. |

#### Returns

Type: `Promise<void>`
Expand Down
12 changes: 12 additions & 0 deletions packages/ketchup/src/components/kup-calendar/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@

Used to retrieve component's props values.

#### Parameters

| Name | Type | Description |
| -------------- | --------- | -------------------------------------------------------------------------------------- |
| `descriptions` | `boolean` | - When provided and true, the result will be the list of props with their description. |

#### Returns

Type: `Promise<GenericObject>`
Expand Down Expand Up @@ -63,6 +69,12 @@ Type: `Promise<void>`

Sets the props to the component.

#### Parameters

| Name | Type | Description |
| ------- | --------------- | ------------------------------------------------------------ |
| `props` | `GenericObject` | - Object containing props that will be set to the component. |

#### Returns

Type: `Promise<void>`
Expand Down
12 changes: 12 additions & 0 deletions packages/ketchup/src/components/kup-card-list/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@

Used to retrieve component's props values.

#### Parameters

| Name | Type | Description |
| -------------- | --------- | -------------------------------------------------------------------------------------- |
| `descriptions` | `boolean` | - When provided and true, the result will be the list of props with their description. |

#### Returns

Type: `Promise<GenericObject>`
Expand All @@ -58,6 +64,12 @@ Type: `Promise<void>`

Sets the props to the component.

#### Parameters

| Name | Type | Description |
| ------- | --------------- | ------------------------------------------------------------ |
| `props` | `GenericObject` | - Object containing props that will be set to the component. |

#### Returns

Type: `Promise<void>`
Expand Down
12 changes: 12 additions & 0 deletions packages/ketchup/src/components/kup-card/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@

Used to retrieve component's props values.

#### Parameters

| Name | Type | Description |
| -------------- | --------- | -------------------------------------------------------------------------------------- |
| `descriptions` | `boolean` | - When provided and true, the result will be the list of props with their description. |

#### Returns

Type: `Promise<GenericObject>`
Expand Down Expand Up @@ -63,6 +69,12 @@ Type: `Promise<void>`

Sets the props to the component.

#### Parameters

| Name | Type | Description |
| ------- | --------------- | ------------------------------------------------------------ |
| `props` | `GenericObject` | - Object containing props that will be set to the component. |

#### Returns

Type: `Promise<void>`
Expand Down
24 changes: 24 additions & 0 deletions packages/ketchup/src/components/kup-cell/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@

Adds the given CSS classes to the cell's data.

#### Parameters

| Name | Type | Description |
| --------- | ---------- | ----------------------- |
| `classes` | `string[]` | - Array of CSS classes. |

#### Returns

Type: `Promise<void>`
Expand All @@ -31,6 +37,12 @@ Type: `Promise<void>`

Used to retrieve component's props values.

#### Parameters

| Name | Type | Description |
| -------------- | --------- | -------------------------------------------------------------------------------------- |
| `descriptions` | `boolean` | - When provided and true, the result will be the list of props with their description. |

#### Returns

Type: `Promise<GenericObject>`
Expand All @@ -51,6 +63,12 @@ Type: `Promise<void>`

Removes the given CSS classes from the cell's data.

#### Parameters

| Name | Type | Description |
| --------- | ---------- | ----------------------- |
| `classes` | `string[]` | - Array of CSS classes. |

#### Returns

Type: `Promise<void>`
Expand All @@ -61,6 +79,12 @@ Type: `Promise<void>`

Sets the props to the component.

#### Parameters

| Name | Type | Description |
| ------- | --------------- | ------------------------------------------------------------ |
| `props` | `GenericObject` | - Object containing props that will be set to the component. |

#### Returns

Type: `Promise<void>`
Expand Down
Loading
Loading