@sme.up/ketchup 11.0.0-SNAPSHOT-20241024103823 → 11.0.0-SNAPSHOT-20241024123434

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/dist/cjs/{f-cell-19b57f8b.js → f-cell-36821278.js} +5 -7
  2. package/dist/cjs/f-cell-36821278.js.map +1 -0
  3. package/dist/cjs/kup-autocomplete_27.cjs.entry.js +3 -2
  4. package/dist/cjs/kup-autocomplete_27.cjs.entry.js.map +1 -1
  5. package/dist/cjs/kup-box.cjs.entry.js +1 -1
  6. package/dist/cjs/kup-cell.cjs.entry.js +5 -79
  7. package/dist/cjs/kup-cell.cjs.entry.js.map +1 -1
  8. package/dist/cjs/kup-image-list.cjs.entry.js +1 -1
  9. package/dist/cjs/kup-input-panel.cjs.entry.js +19 -8
  10. package/dist/cjs/kup-input-panel.cjs.entry.js.map +1 -1
  11. package/dist/collection/components/kup-cell/kup-cell.js +3 -3
  12. package/dist/collection/components/kup-cell/kup-cell.js.map +1 -1
  13. package/dist/collection/components/kup-input-panel/kup-input-panel.e2e.js +313 -0
  14. package/dist/collection/components/kup-input-panel/kup-input-panel.e2e.js.map +1 -1
  15. package/dist/collection/components/kup-input-panel/kup-input-panel.js +18 -7
  16. package/dist/collection/components/kup-input-panel/kup-input-panel.js.map +1 -1
  17. package/dist/collection/components/kup-tab-bar/kup-tab-bar-declarations.js.map +1 -1
  18. package/dist/collection/components/kup-tab-bar/kup-tab-bar.css +11 -0
  19. package/dist/collection/components/kup-tab-bar/kup-tab-bar.js +1 -0
  20. package/dist/collection/components/kup-tab-bar/kup-tab-bar.js.map +1 -1
  21. package/dist/collection/f-components/f-cell/f-cell.js +4 -6
  22. package/dist/collection/f-components/f-cell/f-cell.js.map +1 -1
  23. package/dist/components/kup-autocomplete2.js +6 -7
  24. package/dist/components/kup-autocomplete2.js.map +1 -1
  25. package/dist/components/kup-cell.js +6 -80
  26. package/dist/components/kup-cell.js.map +1 -1
  27. package/dist/components/kup-input-panel.js +18 -7
  28. package/dist/components/kup-input-panel.js.map +1 -1
  29. package/dist/esm/{f-cell-0e7188e8.js → f-cell-228429ce.js} +5 -7
  30. package/dist/esm/f-cell-228429ce.js.map +1 -0
  31. package/dist/esm/kup-autocomplete_27.entry.js +3 -2
  32. package/dist/esm/kup-autocomplete_27.entry.js.map +1 -1
  33. package/dist/esm/kup-box.entry.js +1 -1
  34. package/dist/esm/kup-cell.entry.js +8 -82
  35. package/dist/esm/kup-cell.entry.js.map +1 -1
  36. package/dist/esm/kup-image-list.entry.js +1 -1
  37. package/dist/esm/kup-input-panel.entry.js +19 -8
  38. package/dist/esm/kup-input-panel.entry.js.map +1 -1
  39. package/dist/ketchup/ketchup.esm.js +1 -1
  40. package/dist/ketchup/p-1364e356.entry.js +2 -0
  41. package/dist/ketchup/p-1364e356.entry.js.map +1 -0
  42. package/dist/ketchup/p-a38b1cf2.js +2 -0
  43. package/dist/ketchup/p-a38b1cf2.js.map +1 -0
  44. package/dist/ketchup/{p-107388e3.entry.js → p-cb6c6e19.entry.js} +2 -2
  45. package/dist/ketchup/p-d6b0f4c9.entry.js +2 -0
  46. package/dist/ketchup/p-d6b0f4c9.entry.js.map +1 -0
  47. package/dist/ketchup/{p-a97d6070.entry.js → p-e373bc7a.entry.js} +2 -2
  48. package/dist/ketchup/{p-595a4c1f.entry.js → p-ef69d072.entry.js} +3 -3
  49. package/dist/ketchup/{p-595a4c1f.entry.js.map → p-ef69d072.entry.js.map} +1 -1
  50. package/dist/types/components/kup-tab-bar/kup-tab-bar-declarations.d.ts +1 -0
  51. package/package.json +1 -1
  52. package/dist/cjs/f-cell-19b57f8b.js.map +0 -1
  53. package/dist/collection/f-components/f-cell-options.tsx/f-cell-options.declarations.js +0 -2
  54. package/dist/collection/f-components/f-cell-options.tsx/f-cell-options.declarations.js.map +0 -1
  55. package/dist/collection/f-components/f-cell-options.tsx/f-cell-options.js +0 -105
  56. package/dist/collection/f-components/f-cell-options.tsx/f-cell-options.js.map +0 -1
  57. package/dist/esm/f-cell-0e7188e8.js.map +0 -1
  58. package/dist/ketchup/p-90316bea.entry.js +0 -2
  59. package/dist/ketchup/p-90316bea.entry.js.map +0 -1
  60. package/dist/ketchup/p-e41ef521.entry.js +0 -2
  61. package/dist/ketchup/p-e41ef521.entry.js.map +0 -1
  62. package/dist/ketchup/p-f63dd1ec.js +0 -2
  63. package/dist/ketchup/p-f63dd1ec.js.map +0 -1
  64. package/dist/types/f-components/f-cell-options.tsx/f-cell-options.d.ts +0 -3
  65. package/dist/types/f-components/f-cell-options.tsx/f-cell-options.declarations.d.ts +0 -19
  66. /package/dist/ketchup/{p-107388e3.entry.js.map → p-cb6c6e19.entry.js.map} +0 -0
  67. /package/dist/ketchup/{p-a97d6070.entry.js.map → p-e373bc7a.entry.js.map} +0 -0
@@ -4,7 +4,7 @@ import { f as filterRows, p as paginateRows, s as sortRows } from './kup-data-ta
4
4
  import { F as FImage } from './f-image-feab9f36.js';
5
5
  import { c as FChip } from './f-chip-c6c5029c.js';
6
6
  import { c as componentWrapperId } from './GenericVariables-d8d0541e.js';
7
- import { F as FCell } from './f-cell-0e7188e8.js';
7
+ import { F as FCell } from './f-cell-228429ce.js';
8
8
  import { p as pageChange, r as rowsPerPageChange, F as FPaginator } from './f-paginator-utils-eab9f07a.js';
9
9
  import { F as FTextFieldMDC } from './f-text-field-mdc-9a862967.js';
10
10
  import './kup-dates-b90227c6.js';
@@ -1,14 +1,14 @@
1
- import { h, r as registerInstance, c as createEvent, f as forceUpdate, H as Host, d as getElement } from './index-191ee7cb.js';
2
- import { a5 as FCellTypes, ac as CMBandACPAdapter, k as kupManagerInstance, f as FCellPadding, g as getProps, s as setProps$1, R as KupDragEffect, h as KupLanguageGeneric } from './kup-manager-07bfc644.js';
1
+ import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, d as getElement } from './index-191ee7cb.js';
2
+ import { k as kupManagerInstance, f as FCellPadding, g as getProps, s as setProps, R as KupDragEffect, h as KupLanguageGeneric } from './kup-manager-07bfc644.js';
3
3
  import { c as componentWrapperId } from './GenericVariables-d8d0541e.js';
4
- import { F as FCell } from './f-cell-0e7188e8.js';
5
4
  import { F as FButton } from './f-button-79148bc6.js';
5
+ import { F as FCell } from './f-cell-228429ce.js';
6
6
  import './kup-dates-b90227c6.js';
7
- import './f-checkbox-6a591860.js';
7
+ import './f-button-declarations-6c8f8abe.js';
8
8
  import './f-image-feab9f36.js';
9
+ import './f-checkbox-6a591860.js';
9
10
  import './f-text-field-492e7cfb.js';
10
11
  import './f-chip-c6c5029c.js';
11
- import './f-button-declarations-6c8f8abe.js';
12
12
 
13
13
  /**
14
14
  * Props of the kup-cell component.
@@ -29,80 +29,6 @@ var KupCellSubmitButtonPosition;
29
29
  KupCellSubmitButtonPosition["right"] = "row";
30
30
  })(KupCellSubmitButtonPosition || (KupCellSubmitButtonPosition = {}));
31
31
 
32
- var __rest = (undefined && undefined.__rest) || function (s, e) {
33
- var t = {};
34
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
35
- t[p] = s[p];
36
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
37
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
38
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
39
- t[p[i]] = s[p[i]];
40
- }
41
- return t;
42
- };
43
- const dom = document.documentElement;
44
- const FCellOptions = (props) => {
45
- const mappedCell = props.cell
46
- ? Object.assign(Object.assign({}, props.cell), { data: setProps(props.cell, props.column), slotData: slotData(props.cell, props.column), isEditable: true }) : null;
47
- const mappedProps = Object.assign(Object.assign({}, props), { editable: true, cell: mappedCell, column: generateColumn(mappedCell.data), row: generateRow(mappedCell.data) });
48
- return h(FCell, Object.assign({}, mappedProps));
49
- };
50
- const generateColumn = (data) => {
51
- const colname = data && data.obj && data.obj.t
52
- ? data.obj.t + ';' + data.obj.p
53
- : 'KUPCELL';
54
- const coltitle = data && data.obj && data.obj.t
55
- ? data.obj.t + ';' + data.obj.p
56
- : 'genericEmptyObject';
57
- return {
58
- name: colname,
59
- title: coltitle,
60
- };
61
- };
62
- const generateRow = (data) => {
63
- const col = generateColumn(data);
64
- const row = { cells: {} };
65
- row.cells[col.name] = data.cell;
66
- return row;
67
- };
68
- const slotData = (cell, col) => {
69
- const cellType = dom.ketchup.data.cell.getType(cell, cell.shape);
70
- if (!cell.isEditable) {
71
- return null;
72
- }
73
- if (cellType === FCellTypes.MULTI_AUTOCOMPLETE ||
74
- cellType === FCellTypes.MULTI_COMBOBOX) {
75
- return Object.assign(Object.assign({}, CMBandACPAdapter(null, col.title, cell.options)), { showDropDownIcon: true, class: '', style: { width: '100%' }, disabled: !cell.isEditable, id: col.name });
76
- }
77
- return null;
78
- };
79
- const setProps = (cell, column) => {
80
- const defaultProps = {
81
- disabled: !cell.isEditable,
82
- id: column.name,
83
- };
84
- const cellType = dom.ketchup.data.cell.getType(cell, cell.shape);
85
- const _a = cell.data || {}, noDataProps = __rest(_a, ["data"]);
86
- return cellType !== FCellTypes.MULTI_AUTOCOMPLETE &&
87
- cellType !== FCellTypes.MULTI_COMBOBOX
88
- ? deepObjectsMerge(defaultProps, Object.assign({}, cell.data))
89
- : // Add and ovverride defaultProps of Chip host component except data
90
- Object.assign(Object.assign({}, defaultProps), noDataProps);
91
- };
92
- const deepObjectsMerge = (target, source) => {
93
- for (const key in source) {
94
- if (source[key] instanceof Object &&
95
- !Array.isArray(source[key]) &&
96
- key in target) {
97
- target[key] = deepObjectsMerge(target[key], source[key]);
98
- }
99
- else {
100
- target[key] = source[key];
101
- }
102
- }
103
- return target;
104
- };
105
-
106
32
  const kupCellCss = ".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{display:block;height:100%;width:100%}#kup-component{height:100%;width:100%}";
107
33
  const KupCellStyle0 = kupCellCss;
108
34
 
@@ -187,7 +113,7 @@ const KupCell = class {
187
113
  * @param {GenericObject} props - Object containing props that will be set to the component.
188
114
  */
189
115
  async setProps(props) {
190
- setProps$1(this, KupCellProps, props);
116
+ setProps(this, KupCellProps, props);
191
117
  }
192
118
  /*-------------------------------------------------*/
193
119
  /* P r i v a t e M e t h o d s */
@@ -267,14 +193,14 @@ const KupCell = class {
267
193
  renderKup: true,
268
194
  row: this.generateRow(),
269
195
  };
270
- return (h(Host, { key: 'a4505e4d7ffa3784c6f5762f2b5a53e50cc5a627' }, h("style", { key: '83795fa9a931b49588e77d60b32bc27c0c11b203' }, __classPrivateFieldGet(this, _KupCell_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { key: '5fb3f00c4c3b543442084ab8231b232188296473', id: componentWrapperId, style: this.showSubmit
196
+ return (h(Host, { key: 'ad12d7c451150f8c7976c17399c525a5cd3c79fc' }, h("style", { key: '56988ed1ebc0835f0455a7299936c4400f59adde' }, __classPrivateFieldGet(this, _KupCell_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { key: '16b0c03d6d1e89d8c7bdd8e8beb39bb093d3a449', id: componentWrapperId, style: this.showSubmit
271
197
  ? {
272
198
  display: 'flex',
273
199
  'flex-direction': this.submitPosition,
274
200
  'align-items': 'center',
275
201
  gap: '0.5rem',
276
202
  }
277
- : {} }, h(FCellOptions, Object.assign({ key: '5875cef585519fef471a0566cb448bf4d96d26ed' }, props)), this.showSubmit ? (h(FButton, { buttonType: "submit", label: __classPrivateFieldGet(this, _KupCell_kupManager, "f").language.translate(KupLanguageGeneric.CONFIRM), wrapperClass: "form__submit", onClick: (e) => {
203
+ : {} }, h(FCell, Object.assign({ key: 'a67b19926a358ce04ea1e81bf4195ac5d02bbd20' }, props)), this.showSubmit ? (h(FButton, { buttonType: "submit", label: __classPrivateFieldGet(this, _KupCell_kupManager, "f").language.translate(KupLanguageGeneric.CONFIRM), wrapperClass: "form__submit", onClick: (e) => {
278
204
  this.submitClick(e);
279
205
  } })) : null)));
280
206
  }
@@ -1 +1 @@
1
- {"file":"kup-cell.entry.js","mappings":";;;;;;;;;;;;AAGA;;;;AAIA,IAAY,YAKX;AALD,WAAY,YAAY;IACpB,8DAA8C,CAAA;IAC9C,8CAA8B,CAAA;IAC9B,mHAAmG,CAAA;IACnG,6EAA6D,CAAA;AACjE,CAAC,EALW,YAAY,K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UAAU,CAAC,IAAI,CAAC,CAAC;KAC3C;;;;;;;;","names":["setProps"],"sources":["src/components/kup-cell/kup-cell-declarations.ts","src/f-components/f-cell-options.tsx/f-cell-options.tsx","src/components/kup-cell/kup-cell.scss?tag=kup-cell&encapsulation=shadow","src/components/kup-cell/kup-cell.tsx"],"sourcesContent":["import { KupDataCell, KupEventPayload } from '../../components';\nimport { KupDataCellOptions } from '../../managers/kup-data/kup-data-declarations';\n\n/**\n * Props of the kup-cell component.\n * Used to export every prop in an object.\n */\nexport enum KupCellProps {\n customStyle = 'Custom style of the component.',\n data = 'The data of the cell.',\n density = \"The density of the cell, defaults at 'dense' and can be also set to 'wide' or 'medium'.\",\n dragEnabled = 'When set to true, the component is draggable.',\n}\n\nexport enum KupCellSubmitButtonPosition {\n top = 'column-reverse',\n bottom = 'column',\n left = 'row-reverse',\n right = 'row',\n}\n\nexport interface KupCellSubmitClickEventPayload extends KupEventPayload {\n cell: KupDataCellOptions;\n}\n","import { FunctionalComponent, h, VNode } from '@stencil/core';\nimport { KupDom } from '../../managers/kup-manager/kup-manager-declarations';\nimport { GenericObject, KupDataColumn } from '../../components';\nimport { CMBandACPAdapter } from '../../utils/cell-utils';\nimport {\n FCellOptionsProps,\n FCellProps,\n FCellTypes,\n} from '../f-cell/f-cell-declarations';\nimport {\n KupDataCell,\n KupDataCellOptions,\n KupDataRow,\n} from '../../managers/kup-data/kup-data-declarations';\nimport { FCell } from '../f-cell/f-cell';\n\nconst dom: KupDom = document.documentElement as KupDom;\n\nconst treeOptionsNodeAdapter = (\n options: any,\n currentValue: string\n): GenericObject[] => {\n return options.children.map((child) => ({\n id: child.content.codice,\n value: child.content.testo,\n selected: currentValue === child.content.codice,\n children: child.children?.length\n ? treeOptionsNodeAdapter(child, currentValue)\n : [],\n }));\n};\n\nconst dataTreeOptionsChildrenAdapter = (\n options: any,\n currentValue: string\n): GenericObject[] => {\n return options.children.map((child) => ({\n id: child.obj.k,\n value: child.value,\n selected: currentValue === child.obj.k,\n children: child.children?.length\n ? dataTreeOptionsChildrenAdapter(child, currentValue)\n : [],\n }));\n};\n\nexport const FCellOptions: FunctionalComponent<FCellOptionsProps> = (\n props: FCellOptionsProps\n) => {\n const mappedCell = props.cell\n ? {\n ...props.cell,\n data: setProps(props.cell, props.column),\n slotData: slotData(props.cell, props.column),\n isEditable: true,\n }\n : null;\n\n const mappedProps: FCellProps = {\n ...props,\n editable: true,\n cell: mappedCell as KupDataCell,\n column: generateColumn(mappedCell.data),\n row: generateRow(mappedCell.data),\n };\n\n return <FCell {...mappedProps}></FCell>;\n};\n\nconst generateColumn = (data: GenericObject): KupDataColumn => {\n const colname: string =\n data && data.obj && data.obj.t\n ? data.obj.t + ';' + data.obj.p\n : 'KUPCELL';\n const coltitle: string =\n data && data.obj && data.obj.t\n ? data.obj.t + ';' + data.obj.p\n : 'genericEmptyObject';\n return {\n name: colname,\n title: coltitle,\n };\n};\n\nconst generateRow = (data: GenericObject): KupDataRow => {\n const col: KupDataColumn = generateColumn(data);\n const row: KupDataRow = { cells: {} };\n row.cells[col.name] = data.cell;\n return row;\n};\n\nconst slotData = (cell: KupDataCellOptions, col: KupDataColumn) => {\n const cellType = dom.ketchup.data.cell.getType(cell, cell.shape);\n\n if (!cell.isEditable) {\n return null;\n }\n\n if (\n cellType === FCellTypes.MULTI_AUTOCOMPLETE ||\n cellType === FCellTypes.MULTI_COMBOBOX\n ) {\n return {\n ...CMBandACPAdapter(null, col.title, cell.options),\n showDropDownIcon: true,\n class: '',\n style: { width: '100%' },\n disabled: !cell.isEditable,\n id: col.name,\n };\n }\n\n return null;\n};\n\nconst setProps = (cell: KupDataCellOptions, column: KupDataColumn) => {\n const defaultProps = {\n disabled: !cell.isEditable,\n id: column.name,\n };\n\n const cellType = dom.ketchup.data.cell.getType(cell, cell.shape);\n const { data, ...noDataProps } = cell.data || {};\n return cellType !== FCellTypes.MULTI_AUTOCOMPLETE &&\n cellType !== FCellTypes.MULTI_COMBOBOX\n ? deepObjectsMerge(defaultProps, {\n ...cell.data,\n })\n : // Add and ovverride defaultProps of Chip host component except data\n {\n ...defaultProps,\n ...noDataProps,\n };\n};\n\nconst deepObjectsMerge = (target: GenericObject, source: GenericObject) => {\n for (const key in source) {\n if (\n source[key] instanceof Object &&\n !Array.isArray(source[key]) &&\n key in target\n ) {\n target[key] = deepObjectsMerge(target[key], source[key]);\n } else {\n target[key] = source[key];\n }\n }\n return target;\n};\n","/**\n* @prop --kup-cell-background: Sets the background of the cell.\n* @prop --kup-cell-font-family: Sets the font family of the cell.\n* @prop --kup-cell-font-family-monospace: Sets the monospace font family of the cell (for numbers).\n* @prop --kup-cell-font-size: Sets the font size of the cell.\n* @prop --kup-cell-text-color: Sets the text color of the cell.\n*\n* NOTE: These variables are defined in the \"kup-theme.css\" file, because they must work even without the kup component (it's a functional component)\n*\n*/\n\n:host {\n display: block;\n height: 100%;\n width: 100%;\n}\n\n#kup-component {\n height: 100%;\n width: 100%;\n}\n","import {\n Component,\n Element,\n forceUpdate,\n h,\n Host,\n Event,\n EventEmitter,\n Method,\n Prop,\n} from '@stencil/core';\nimport {\n KupManager,\n kupManagerInstance,\n} from '../../managers/kup-manager/kup-manager';\nimport { GenericObject, KupComponent } from '../../types/GenericTypes';\nimport { getProps, setProps } from '../../utils/utils';\nimport { componentWrapperId } from '../../variables/GenericVariables';\nimport {\n KupCellProps,\n KupCellSubmitButtonPosition,\n KupCellSubmitClickEventPayload,\n} from './kup-cell-declarations';\nimport {\n FCellOptionsProps,\n FCellPadding,\n FCellShapes,\n} from '../../f-components/f-cell/f-cell-declarations';\nimport {\n KupDragDataTransferCallback,\n KupDragEffect,\n} from '../../managers/kup-interact/kup-interact-declarations';\nimport { KupLanguageGeneric } from '../../managers/kup-language/kup-language-declarations';\nimport {\n KupDataCell,\n KupDataCellOptions,\n KupDataColumn,\n KupDataRow,\n} from '../../managers/kup-data/kup-data-declarations';\nimport { FCellOptions } from '../../f-components/f-cell-options.tsx/f-cell-options';\nimport { FButton } from '../../f-components/f-button/f-button';\n\n@Component({\n tag: 'kup-cell',\n styleUrl: 'kup-cell.scss',\n shadow: true,\n})\nexport class KupCell {\n /**\n * References the root HTML element of the component (<kup-text-field>).\n */\n @Element() rootElement: HTMLElement;\n\n /*-------------------------------------------------*/\n /* P r o p s */\n /*-------------------------------------------------*/\n\n /**\n * Custom style of the component.\n * @default \"\"\n * @see https://smeup.github.io/ketchup/#/customization\n */\n @Prop() customStyle: string = '';\n /**\n * The data of the cell.\n * @default false\n */\n @Prop() data: KupDataCell = null;\n /**\n * The density of the cell, defaults at 'dense' and can be also set to 'wide' or 'medium'.\n */\n @Prop() density: FCellPadding = FCellPadding.NONE;\n /**\n * When set to true, the component is draggable.\n * @default false\n */\n @Prop() dragEnabled: boolean = false;\n\n /**\n * Show submit button\n */\n @Prop() showSubmit: boolean = false;\n\n /**\n * Submit button position, default is right\n */\n @Prop() submitPosition: KupCellSubmitButtonPosition =\n KupCellSubmitButtonPosition.right;\n\n /*-------------------------------------------------*/\n /* I n t e r n a l V a r i a b l e s */\n /*-------------------------------------------------*/\n\n /**\n * Instance of the KupManager class.\n */\n #kupManager: KupManager = kupManagerInstance();\n\n /*-------------------------------------------------*/\n /* P u b l i c M e t h o d s */\n /*-------------------------------------------------*/\n\n @Event({\n eventName: 'kup-cell-submit-click',\n composed: true,\n cancelable: false,\n bubbles: true,\n })\n kupCellSubmitClick: EventEmitter<KupCellSubmitClickEventPayload>;\n\n /**\n * Adds the given CSS classes to the cell's data.\n * @param {string[]} classes - Array of CSS classes.\n */\n @Method()\n async addCssClasses(classes?: string[]): Promise<void> {\n if (!this.data.cssClass) {\n this.data.cssClass = '';\n }\n if (classes) {\n for (let index = 0; index < classes.length; index++) {\n const cssClass = classes[index];\n if (this.data.cssClass.indexOf(cssClass) < 0) {\n this.data.cssClass += ` ${cssClass}`;\n }\n }\n }\n this.refresh();\n }\n /**\n * Used to retrieve component's props values.\n * @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.\n * @returns {Promise<GenericObject>} List of props as object, each key will be a prop.\n */\n @Method()\n async getProps(descriptions?: boolean): Promise<GenericObject> {\n return getProps(this, KupCellProps, descriptions);\n }\n /**\n * This method is used to trigger a new render of the component.\n */\n @Method()\n async refresh(): Promise<void> {\n forceUpdate(this);\n }\n /**\n * Removes the given CSS classes from the cell's data.\n * @param {string[]} classes - Array of CSS classes.\n */\n @Method()\n async removeCssClasses(classes?: string[]): Promise<void> {\n if (!this.data.cssClass) {\n return;\n }\n if (classes) {\n for (let index = 0; index < classes.length; index++) {\n const cssClass = classes[index];\n if (this.data.cssClass.indexOf(cssClass) > 0) {\n this.data.cssClass = this.data.cssClass.replace(\n new RegExp(cssClass, 'g'),\n ''\n );\n }\n }\n }\n this.refresh();\n }\n /**\n * Sets the props to the component.\n * @param {GenericObject} props - Object containing props that will be set to the component.\n */\n @Method()\n async setProps(props: GenericObject): Promise<void> {\n setProps(this, KupCellProps, props);\n }\n\n /*-------------------------------------------------*/\n /* P r i v a t e M e t h o d s */\n /*-------------------------------------------------*/\n\n private didRenderInteractables() {\n if (this.dragEnabled) {\n const dataCb: KupDragDataTransferCallback = () => {\n return {\n cell: this.data,\n column: this.generateColumn(),\n id: this.rootElement.id,\n multiple: false,\n row: this.generateRow(),\n };\n };\n\n this.#kupManager.interact.draggable(\n this.rootElement.shadowRoot.querySelector(\n '#' + componentWrapperId\n ),\n {\n cursorChecker() {\n return null;\n },\n },\n {\n callback: dataCb,\n },\n KupDragEffect.BADGE\n );\n }\n }\n\n private generateColumn(): KupDataColumn {\n const colname: string =\n this.data && this.data.obj && this.data.obj.t\n ? this.data.obj.t + ';' + this.data.obj.p\n : 'KUPCELL';\n const coltitle: string =\n this.data && this.data.obj && this.data.obj.t\n ? this.data.obj.t + ';' + this.data.obj.p\n : this.#kupManager.language.translate(\n KupLanguageGeneric.EMPTY_OBJECT\n );\n return {\n name: colname,\n title: coltitle,\n };\n }\n\n private generateRow(): KupDataRow {\n const col: KupDataColumn = this.generateColumn();\n const row: KupDataRow = { cells: {} };\n row.cells[col.name] = this.data;\n return row;\n }\n\n private submitClick(e: MouseEvent): void {\n e.stopPropagation();\n this.kupCellSubmitClick.emit({\n comp: this,\n id: this.rootElement.id,\n cell: this.data as KupDataCellOptions,\n });\n }\n\n /*-------------------------------------------------*/\n /* L i f e c y c l e H o o k s */\n /*-------------------------------------------------*/\n\n componentWillLoad() {\n this.#kupManager.dates.register(this);\n this.#kupManager.debug.logLoad(this, false);\n this.#kupManager.language.register(this);\n this.#kupManager.theme.register(this);\n }\n\n componentDidLoad() {\n this.#kupManager.debug.logLoad(this, true);\n }\n\n componentWillRender() {\n this.#kupManager.debug.logRender(this, false);\n }\n\n componentDidRender() {\n this.didRenderInteractables();\n this.#kupManager.debug.logRender(this, true);\n }\n\n render() {\n const props: FCellOptionsProps = {\n cell: this.data as KupDataCellOptions,\n column: this.generateColumn(),\n component: this,\n density: this.density,\n editable: this.data.isEditable,\n renderKup: true,\n row: this.generateRow(),\n };\n\n return (\n <Host>\n <style>\n {this.#kupManager.theme.setKupStyle(\n this.rootElement as KupComponent\n )}\n </style>\n <div\n id={componentWrapperId}\n style={\n this.showSubmit\n ? {\n display: 'flex',\n 'flex-direction': this.submitPosition,\n 'align-items': 'center',\n gap: '0.5rem',\n }\n : {}\n }\n >\n <FCellOptions {...props} />\n {this.showSubmit ? (\n <FButton\n buttonType=\"submit\"\n label={this.#kupManager.language.translate(\n KupLanguageGeneric.CONFIRM\n )}\n wrapperClass=\"form__submit\"\n onClick={(e) => {\n this.submitClick(e);\n }}\n ></FButton>\n ) : null}\n </div>\n </Host>\n );\n }\n\n disconnectedCallback() {\n this.#kupManager.dates.unregister(this);\n this.#kupManager.language.unregister(this);\n this.#kupManager.theme.unregister(this);\n }\n}\n"],"version":3}
1
+ {"file":"kup-cell.entry.js","mappings":";;;;;;;;;;;;AAGA;;;;AAIA,IAAY,YAKX;AALD,WAAY,YAAY;IACpB,8DAA8C,CAAA;IAC9C,8CAA8B,CAAA;IAC9B,mHAAmG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,GAAG,EAAE,QAAQ;iBAChB;kBACD,EAAE,IAGZ,EAAC,KAAK,qEAAK,KAAK,EAAI,EACnB,IAAI,CAAC,UAAU,IACZ,EAAC,OAAO,IACJ,UAAU,EAAC,QAAQ,EACnB,KAAK,EAAE,uBAAA,IAAI,2BAAY,CAAC,QAAQ,CAAC,SAAS,CACtC,kBAAkB,CAAC,OAAO,CAC7B,EACD,YAAY,EAAC,cAAc,EAC3B,OAAO,EAAE,CAAC,CAAC;gBACP,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;aACvB,GACM,IACX,IAAI,CACN,CACH,EACT;KACL;IAED,oBAAoB;QAChB,uBAAA,IAAI,2BAAY,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QACxC,uBAAA,IAAI,2BAAY,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAC3C,uBAAA,IAAI,2BAAY,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;KAC3C;;;;;;;;","names":[],"sources":["src/components/kup-cell/kup-cell-declarations.ts","src/components/kup-cell/kup-cell.scss?tag=kup-cell&encapsulation=shadow","src/components/kup-cell/kup-cell.tsx"],"sourcesContent":["import { KupDataCell, KupEventPayload } from '../../components';\nimport { KupDataCellOptions } from '../../managers/kup-data/kup-data-declarations';\n\n/**\n * Props of the kup-cell component.\n * Used to export every prop in an object.\n */\nexport enum KupCellProps {\n customStyle = 'Custom style of the component.',\n data = 'The data of the cell.',\n density = \"The density of the cell, defaults at 'dense' and can be also set to 'wide' or 'medium'.\",\n dragEnabled = 'When set to true, the component is draggable.',\n}\n\nexport enum KupCellSubmitButtonPosition {\n top = 'column-reverse',\n bottom = 'column',\n left = 'row-reverse',\n right = 'row',\n}\n\nexport interface KupCellSubmitClickEventPayload extends KupEventPayload {\n cell: KupDataCellOptions;\n}\n","/**\n* @prop --kup-cell-background: Sets the background of the cell.\n* @prop --kup-cell-font-family: Sets the font family of the cell.\n* @prop --kup-cell-font-family-monospace: Sets the monospace font family of the cell (for numbers).\n* @prop --kup-cell-font-size: Sets the font size of the cell.\n* @prop --kup-cell-text-color: Sets the text color of the cell.\n*\n* NOTE: These variables are defined in the \"kup-theme.css\" file, because they must work even without the kup component (it's a functional component)\n*\n*/\n\n:host {\n display: block;\n height: 100%;\n width: 100%;\n}\n\n#kup-component {\n height: 100%;\n width: 100%;\n}\n","import {\n Component,\n Element,\n forceUpdate,\n h,\n Host,\n Event,\n EventEmitter,\n Method,\n Prop,\n} from '@stencil/core';\nimport {\n KupManager,\n kupManagerInstance,\n} from '../../managers/kup-manager/kup-manager';\nimport { GenericObject, KupComponent } from '../../types/GenericTypes';\nimport { getProps, setProps } from '../../utils/utils';\nimport { componentWrapperId } from '../../variables/GenericVariables';\nimport {\n KupCellProps,\n KupCellSubmitButtonPosition,\n KupCellSubmitClickEventPayload,\n} from './kup-cell-declarations';\nimport {\n FCellOptionsProps,\n FCellPadding,\n FCellShapes,\n} from '../../f-components/f-cell/f-cell-declarations';\nimport {\n KupDragDataTransferCallback,\n KupDragEffect,\n} from '../../managers/kup-interact/kup-interact-declarations';\nimport { KupLanguageGeneric } from '../../managers/kup-language/kup-language-declarations';\nimport {\n KupDataCell,\n KupDataCellOptions,\n KupDataColumn,\n KupDataRow,\n} from '../../managers/kup-data/kup-data-declarations';\nimport { FButton } from '../../f-components/f-button/f-button';\nimport { FCell } from '../../f-components/f-cell/f-cell';\n\n@Component({\n tag: 'kup-cell',\n styleUrl: 'kup-cell.scss',\n shadow: true,\n})\nexport class KupCell {\n /**\n * References the root HTML element of the component (<kup-text-field>).\n */\n @Element() rootElement: HTMLElement;\n\n /*-------------------------------------------------*/\n /* P r o p s */\n /*-------------------------------------------------*/\n\n /**\n * Custom style of the component.\n * @default \"\"\n * @see https://smeup.github.io/ketchup/#/customization\n */\n @Prop() customStyle: string = '';\n /**\n * The data of the cell.\n * @default false\n */\n @Prop() data: KupDataCell = null;\n /**\n * The density of the cell, defaults at 'dense' and can be also set to 'wide' or 'medium'.\n */\n @Prop() density: FCellPadding = FCellPadding.NONE;\n /**\n * When set to true, the component is draggable.\n * @default false\n */\n @Prop() dragEnabled: boolean = false;\n\n /**\n * Show submit button\n */\n @Prop() showSubmit: boolean = false;\n\n /**\n * Submit button position, default is right\n */\n @Prop() submitPosition: KupCellSubmitButtonPosition =\n KupCellSubmitButtonPosition.right;\n\n /*-------------------------------------------------*/\n /* I n t e r n a l V a r i a b l e s */\n /*-------------------------------------------------*/\n\n /**\n * Instance of the KupManager class.\n */\n #kupManager: KupManager = kupManagerInstance();\n\n /*-------------------------------------------------*/\n /* P u b l i c M e t h o d s */\n /*-------------------------------------------------*/\n\n @Event({\n eventName: 'kup-cell-submit-click',\n composed: true,\n cancelable: false,\n bubbles: true,\n })\n kupCellSubmitClick: EventEmitter<KupCellSubmitClickEventPayload>;\n\n /**\n * Adds the given CSS classes to the cell's data.\n * @param {string[]} classes - Array of CSS classes.\n */\n @Method()\n async addCssClasses(classes?: string[]): Promise<void> {\n if (!this.data.cssClass) {\n this.data.cssClass = '';\n }\n if (classes) {\n for (let index = 0; index < classes.length; index++) {\n const cssClass = classes[index];\n if (this.data.cssClass.indexOf(cssClass) < 0) {\n this.data.cssClass += ` ${cssClass}`;\n }\n }\n }\n this.refresh();\n }\n /**\n * Used to retrieve component's props values.\n * @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.\n * @returns {Promise<GenericObject>} List of props as object, each key will be a prop.\n */\n @Method()\n async getProps(descriptions?: boolean): Promise<GenericObject> {\n return getProps(this, KupCellProps, descriptions);\n }\n /**\n * This method is used to trigger a new render of the component.\n */\n @Method()\n async refresh(): Promise<void> {\n forceUpdate(this);\n }\n /**\n * Removes the given CSS classes from the cell's data.\n * @param {string[]} classes - Array of CSS classes.\n */\n @Method()\n async removeCssClasses(classes?: string[]): Promise<void> {\n if (!this.data.cssClass) {\n return;\n }\n if (classes) {\n for (let index = 0; index < classes.length; index++) {\n const cssClass = classes[index];\n if (this.data.cssClass.indexOf(cssClass) > 0) {\n this.data.cssClass = this.data.cssClass.replace(\n new RegExp(cssClass, 'g'),\n ''\n );\n }\n }\n }\n this.refresh();\n }\n /**\n * Sets the props to the component.\n * @param {GenericObject} props - Object containing props that will be set to the component.\n */\n @Method()\n async setProps(props: GenericObject): Promise<void> {\n setProps(this, KupCellProps, props);\n }\n\n /*-------------------------------------------------*/\n /* P r i v a t e M e t h o d s */\n /*-------------------------------------------------*/\n\n private didRenderInteractables() {\n if (this.dragEnabled) {\n const dataCb: KupDragDataTransferCallback = () => {\n return {\n cell: this.data,\n column: this.generateColumn(),\n id: this.rootElement.id,\n multiple: false,\n row: this.generateRow(),\n };\n };\n\n this.#kupManager.interact.draggable(\n this.rootElement.shadowRoot.querySelector(\n '#' + componentWrapperId\n ),\n {\n cursorChecker() {\n return null;\n },\n },\n {\n callback: dataCb,\n },\n KupDragEffect.BADGE\n );\n }\n }\n\n private generateColumn(): KupDataColumn {\n const colname: string =\n this.data && this.data.obj && this.data.obj.t\n ? this.data.obj.t + ';' + this.data.obj.p\n : 'KUPCELL';\n const coltitle: string =\n this.data && this.data.obj && this.data.obj.t\n ? this.data.obj.t + ';' + this.data.obj.p\n : this.#kupManager.language.translate(\n KupLanguageGeneric.EMPTY_OBJECT\n );\n return {\n name: colname,\n title: coltitle,\n };\n }\n\n private generateRow(): KupDataRow {\n const col: KupDataColumn = this.generateColumn();\n const row: KupDataRow = { cells: {} };\n row.cells[col.name] = this.data;\n return row;\n }\n\n private submitClick(e: MouseEvent): void {\n e.stopPropagation();\n this.kupCellSubmitClick.emit({\n comp: this,\n id: this.rootElement.id,\n cell: this.data as KupDataCellOptions,\n });\n }\n\n /*-------------------------------------------------*/\n /* L i f e c y c l e H o o k s */\n /*-------------------------------------------------*/\n\n componentWillLoad() {\n this.#kupManager.dates.register(this);\n this.#kupManager.debug.logLoad(this, false);\n this.#kupManager.language.register(this);\n this.#kupManager.theme.register(this);\n }\n\n componentDidLoad() {\n this.#kupManager.debug.logLoad(this, true);\n }\n\n componentWillRender() {\n this.#kupManager.debug.logRender(this, false);\n }\n\n componentDidRender() {\n this.didRenderInteractables();\n this.#kupManager.debug.logRender(this, true);\n }\n\n render() {\n const props: FCellOptionsProps = {\n cell: this.data as KupDataCellOptions,\n column: this.generateColumn(),\n component: this,\n density: this.density,\n editable: this.data.isEditable,\n renderKup: true,\n row: this.generateRow(),\n };\n\n return (\n <Host>\n <style>\n {this.#kupManager.theme.setKupStyle(\n this.rootElement as KupComponent\n )}\n </style>\n <div\n id={componentWrapperId}\n style={\n this.showSubmit\n ? {\n display: 'flex',\n 'flex-direction': this.submitPosition,\n 'align-items': 'center',\n gap: '0.5rem',\n }\n : {}\n }\n >\n <FCell {...props} />\n {this.showSubmit ? (\n <FButton\n buttonType=\"submit\"\n label={this.#kupManager.language.translate(\n KupLanguageGeneric.CONFIRM\n )}\n wrapperClass=\"form__submit\"\n onClick={(e) => {\n this.submitClick(e);\n }}\n ></FButton>\n ) : null}\n </div>\n </Host>\n );\n }\n\n disconnectedCallback() {\n this.#kupManager.dates.unregister(this);\n this.#kupManager.language.unregister(this);\n this.#kupManager.theme.unregister(this);\n }\n}\n"],"version":3}
@@ -4,7 +4,7 @@ import { c as componentWrapperId } from './GenericVariables-d8d0541e.js';
4
4
  import { F as FImage } from './f-image-feab9f36.js';
5
5
  import { F as FButton } from './f-button-79148bc6.js';
6
6
  import { a as FButtonStyling } from './f-button-declarations-6c8f8abe.js';
7
- import { F as FCell } from './f-cell-0e7188e8.js';
7
+ import { F as FCell } from './f-cell-228429ce.js';
8
8
  import { M as MDCRipple } from './component-879e99bf.js';
9
9
  import './kup-dates-b90227c6.js';
10
10
  import './f-checkbox-6a591860.js';
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, d as getElement } from './index-191ee7cb.js';
2
2
  import { F as FButton } from './f-button-79148bc6.js';
3
- import { F as FCell } from './f-cell-0e7188e8.js';
3
+ import { F as FCell } from './f-cell-228429ce.js';
4
4
  import { k as kupManagerInstance, a5 as FCellTypes, F as FCellShapes, g as getProps, s as setProps, h as KupLanguageGeneric, aa as CHIAdapter, ac as CMBandACPAdapter, al as CHKAdapter, ab as RADAdapter, am as SWTAdapter, e as KupDebugCategory } from './kup-manager-07bfc644.js';
5
5
  import { F as FTextFieldMDC } from './f-text-field-mdc-9a862967.js';
6
6
  import { c as componentWrapperId } from './GenericVariables-d8d0541e.js';
@@ -227,7 +227,7 @@ const KupInputPanel = class {
227
227
  h("p", null, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.translate(KupLanguageGeneric.EMPTY_DATA)),
228
228
  ]
229
229
  : this.inputPanelCells.map((inputPanelCell) => __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderRow).call(this, inputPanelCell));
230
- return (h(Host, { key: '62cdea4b11e55aaf3a71231851f798bee78bf60e' }, h("style", { key: 'de02343d1c662d98d2fb9acce6222072cf61e4fb' }, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { key: '76c0582d6e71eff483aa177d252eea61b7804f1b', id: componentWrapperId }, inputPanelContent)));
230
+ return (h(Host, { key: '29ce4f646604e3757538ee257c10a5e3df7153bd' }, h("style", { key: '93f8c75e983d77533d19ad8b5cee6dce2be91c0f' }, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { key: 'd80dd72ef422b0057342cc89d99be3873d8a8575', id: componentWrapperId }, inputPanelContent)));
231
231
  }
232
232
  disconnectedCallback() {
233
233
  __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.unregister(this);
@@ -388,12 +388,23 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
388
388
  if (!this.tabSelected) {
389
389
  this.tabSelected = sections[0].id || '0';
390
390
  }
391
- const tabNodes = sections.map((section, i) => ({
392
- active: (section.id || `${i}`) === this.tabSelected,
393
- value: section.title,
394
- icon: section.icon,
395
- id: section.id || `${i}`,
396
- }));
391
+ const tabNodes = sections.map((section, i) => {
392
+ const cellIdsInSection = section.content.map((contentItem) => contentItem.id);
393
+ const hasError = cells.cells.some((cellData) => {
394
+ var _a;
395
+ console.log(cells);
396
+ const cell = cellData.cell;
397
+ const column = cellData.column;
398
+ return (cellIdsInSection.includes(column.name) && !!((_a = cell.data) === null || _a === void 0 ? void 0 : _a.error));
399
+ });
400
+ return {
401
+ active: (section.id || `${i}`) === this.tabSelected,
402
+ value: section.title,
403
+ icon: hasError ? 'error' : section.icon,
404
+ id: section.id || `${i}`,
405
+ danger: hasError,
406
+ };
407
+ });
397
408
  const sectionContent = sections.map((section, i) => {
398
409
  const sectionId = section.id || `${i}`;
399
410
  return __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderSection).call(this, cells, section, true, {