@sme.up/ketchup 11.0.0-SNAPSHOT-20241023124603 → 11.0.0-SNAPSHOT-20241023150629

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 (46) hide show
  1. package/dist/cjs/{f-cell-4fce3cc0.js → f-cell-dc1c25c5.js} +31 -1
  2. package/dist/cjs/f-cell-dc1c25c5.js.map +1 -0
  3. package/dist/cjs/kup-autocomplete_27.cjs.entry.js +1 -1
  4. package/dist/cjs/kup-box.cjs.entry.js +1 -1
  5. package/dist/cjs/kup-cell.cjs.entry.js +6 -32
  6. package/dist/cjs/kup-cell.cjs.entry.js.map +1 -1
  7. package/dist/cjs/kup-image-list.cjs.entry.js +1 -1
  8. package/dist/cjs/kup-input-panel.cjs.entry.js +1 -1
  9. package/dist/collection/f-components/f-cell/f-cell.js +30 -0
  10. package/dist/collection/f-components/f-cell/f-cell.js.map +1 -1
  11. package/dist/collection/f-components/f-cell-options.tsx/f-cell-options.js +6 -32
  12. package/dist/collection/f-components/f-cell-options.tsx/f-cell-options.js.map +1 -1
  13. package/dist/components/kup-autocomplete2.js +31 -1
  14. package/dist/components/kup-autocomplete2.js.map +1 -1
  15. package/dist/components/kup-cell.js +6 -32
  16. package/dist/components/kup-cell.js.map +1 -1
  17. package/dist/components/kup-input-panel.js +1 -1
  18. package/dist/components/kup-manager.js +1 -1
  19. package/dist/esm/{f-cell-11b7dcb3.js → f-cell-51df0212.js} +32 -2
  20. package/dist/esm/f-cell-51df0212.js.map +1 -0
  21. package/dist/esm/kup-autocomplete_27.entry.js +1 -1
  22. package/dist/esm/kup-box.entry.js +1 -1
  23. package/dist/esm/kup-cell.entry.js +7 -33
  24. package/dist/esm/kup-cell.entry.js.map +1 -1
  25. package/dist/esm/kup-image-list.entry.js +1 -1
  26. package/dist/esm/kup-input-panel.entry.js +1 -1
  27. package/dist/ketchup/ketchup.esm.js +1 -1
  28. package/dist/ketchup/{p-ee526a78.entry.js → p-96276a2b.entry.js} +2 -2
  29. package/dist/ketchup/{p-92199556.entry.js → p-992fd3e1.entry.js} +2 -2
  30. package/dist/ketchup/p-aa1b84ce.js +2 -0
  31. package/dist/ketchup/p-aa1b84ce.js.map +1 -0
  32. package/dist/ketchup/p-bd5d3adb.entry.js +2 -0
  33. package/dist/ketchup/p-bd5d3adb.entry.js.map +1 -0
  34. package/dist/ketchup/{p-aa28eef6.entry.js → p-c9168d92.entry.js} +2 -2
  35. package/dist/ketchup/{p-0d20ebc4.entry.js → p-edde6aec.entry.js} +2 -2
  36. package/package.json +1 -1
  37. package/dist/cjs/f-cell-4fce3cc0.js.map +0 -1
  38. package/dist/esm/f-cell-11b7dcb3.js.map +0 -1
  39. package/dist/ketchup/p-11f7e98b.js +0 -2
  40. package/dist/ketchup/p-11f7e98b.js.map +0 -1
  41. package/dist/ketchup/p-414148a2.entry.js +0 -2
  42. package/dist/ketchup/p-414148a2.entry.js.map +0 -1
  43. /package/dist/ketchup/{p-ee526a78.entry.js.map → p-96276a2b.entry.js.map} +0 -0
  44. /package/dist/ketchup/{p-92199556.entry.js.map → p-992fd3e1.entry.js.map} +0 -0
  45. /package/dist/ketchup/{p-aa28eef6.entry.js.map → p-c9168d92.entry.js.map} +0 -0
  46. /package/dist/ketchup/{p-0d20ebc4.entry.js.map → p-edde6aec.entry.js.map} +0 -0
@@ -281,6 +281,9 @@ const FCell = (props, children) => {
281
281
  isEditable = isEditable && props.editable;
282
282
  if (cell.options) {
283
283
  cell.data = (_a = mapData(cell, column)) !== null && _a !== void 0 ? _a : cell.data;
284
+ if (props.cell.shape === kupManager.FCellShapes.TEXT_FIELD) {
285
+ cell.value = cell.data.value;
286
+ }
284
287
  }
285
288
  const valueToDisplay = props.previousValue !== cell.value ? cell.value : '';
286
289
  const cellType = dom.ketchup.data.cell.getType(cell, shape);
@@ -386,15 +389,42 @@ const mapData = (cell, col) => {
386
389
  const cellType = dom.ketchup.data.cell.getType(cell, cell.shape);
387
390
  const dataAdapterMap = new Map([
388
391
  [kupManager.FCellTypes.BUTTON_LIST, MainBTNAdapter.bind(undefined)],
392
+ [kupManager.FCellTypes.STRING, MainITXAdapter.bind(undefined)],
389
393
  [kupManager.FCellTypes.RADIO, MainRADAdapter.bind(undefined)],
390
394
  [kupManager.FCellTypes.AUTOCOMPLETE, MainCMBandACPAdapter.bind(undefined)],
391
395
  [kupManager.FCellTypes.COMBOBOX, MainCMBandACPAdapter.bind(undefined)],
396
+ [kupManager.FCellTypes.CHECKBOX, MainCHKAdapter.bind(undefined)],
397
+ [kupManager.FCellTypes.OBJECT, MainObjectAdapter.bind(undefined)],
392
398
  ]);
393
399
  const adapter = dataAdapterMap.get(cellType);
394
400
  return adapter
395
401
  ? adapter(options, fieldLabel, currentValue, cell, col.name)
396
402
  : null;
397
403
  };
404
+ const MainObjectAdapter = (options, _fieldLabel, currentValue, _cell, _id) => {
405
+ if (options[0]) {
406
+ return {
407
+ initialValue: currentValue,
408
+ label: options[0].label,
409
+ value: options[0].value,
410
+ };
411
+ }
412
+ };
413
+ const MainCHKAdapter = (options, _fieldLabel, _currentValue) => {
414
+ if (options === null || options === void 0 ? void 0 : options[0]) {
415
+ return {
416
+ checked: options[0].checked,
417
+ label: options[0].label,
418
+ };
419
+ }
420
+ };
421
+ const MainITXAdapter = (options, _fieldLabel, _currentValue, _cell) => {
422
+ if (options === null || options === void 0 ? void 0 : options[0]) {
423
+ return {
424
+ value: options[0].label,
425
+ };
426
+ }
427
+ };
398
428
  const MainRADAdapter = (options, _fieldLabel, currentValue) => {
399
429
  return kupManager.RADAdapter(currentValue, options);
400
430
  };
@@ -1046,4 +1076,4 @@ exports.FRadio = FRadio;
1046
1076
  exports.FRating = FRating;
1047
1077
  exports.FSwitch = FSwitch;
1048
1078
 
1049
- //# sourceMappingURL=f-cell-4fce3cc0.js.map
1079
+ //# sourceMappingURL=f-cell-dc1c25c5.js.map
@@ -0,0 +1 @@
1
+ {"file":"f-cell-dc1c25c5.js","mappings":";;;;;;;;;;AAI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KAAK,EACLW,2BAAgB,CAAC,KAAK,CACzB,CAAC;aACL;SACJ;KACJ;AACL,CAAC;AAED,SAAS,sBAAsB,CAC3B,CAAwD,EACxD,QAAoB;IAEpB,MAAM,YAAY,GAAG,CAAC,EAAG,CAAC,CAAC,MAAsB,CAAC,OAAO,KAAK,OAAO,CAAC,CAAC;IACvE,IAAI,KAAK,GAAG,YAAY;UACjB,CAAC,CAAC,MAA2B,CAAC,KAAK;UACpC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;IAErB,IAAI,QAAQ,KAAKf,qBAAU,CAAC,QAAQ,IAAI,YAAY,EAAE;QAClD,KAAK,GAAI,CAAC,CAAC,MAA2B,CAAC,OAAO,GAAG,KAAK,GAAG,IAAI,CAAC;KACjE;IAED,IAAI,QAAQ,KAAKA,qBAAU,CAAC,MAAM,IAAI,YAAY,EAAE;QAChD,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,6BAA6B,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;KACrE;IACD,OAAO,KAAK,CAAC;AACjB,CAAC;AAED,SAAS,cAAc,CAAC,KAAiB;;IACrC,OAAOgB,0BAAe,CAAC,QAAQ,CAC3B,MAAC,KAAK,CAAC,SAA0B,0CAAE,WAAW,CAAC,OAAsB,CACxE,CAAC;AACN,CAAC;AAED,SAAS,WAAW,CAAC,KAAiB;;IAClC,OAAOC,+BAAoB,CAAC,QAAQ,CAChC,MAAC,KAAK,CAAC,SAA0B,0CAAE,WAAW,CAAC,OAAsB,CACxE,CAAC;AACN;;;;;;;;","names":["KupListProps","KupListRole","ItemsDisplayMode","FSwitchSizing","h","getAssetPath","FImage","FCellShapes","FCellClasses","FCellTypes","editableTypes","kupTypes","KupThemeColorValues","FCellEvents","this","RADAdapter","CMBandACPAdapter","KupTagNames","FCheckbox","FChipType","FTextField","getCellValueForDisplay","FButton","FChip","KupDebugCategory","autoCenterComps","fullWidthFieldsComps"],"sources":["src/components/kup-list/kup-list-declarations.ts","src/f-components/f-switch/f-switch-declarations.ts","src/f-components/f-switch/f-switch.tsx","src/f-components/f-progress-bar/f-progress-bar.tsx","src/f-components/f-radio/f-radio-declarations.ts","src/f-components/f-radio/f-radio.tsx","src/f-components/f-rating/f-rating.tsx","src/f-components/f-cell/f-cell.tsx"],"sourcesContent":["import { KupEventPayload } from '../../types/GenericTypes';\nimport { ValueDisplayedValue as vdv } from '../../utils/filters/filters-declarations';\nimport { KupDataNode } from '../../managers/kup-data/kup-data-declarations';\n\n/**\n * Props of the kup-list component.\n * Used to export every prop in an object.\n */\nexport enum KupListProps {\n customStyle = 'Custom style of the component.',\n data = 'The data of the list.',\n displayMode = 'Selects how the items must display their label and how they can be filtered for.',\n filter = 'Keeps string for filtering elements when filter mode is active',\n hideText = \"Hides rows' text, ideally to display a list of icons only.\",\n isMenu = 'Defines whether the list is a menu or not.',\n keyboardNavigation = \"When true, enables items' navigation through arrow keys.\",\n menuVisible = \"Sets the status of the menu, when false it's hidden otherwise it's visible.\",\n roleType = 'Defines the type of selection. Values accepted: listbox, radiogroup or group.',\n selectable = 'Defines whether items are selectable or not.',\n showIcons = 'Displays the icons associated to each row when set to true.',\n twoLine = 'The list elements descriptions will be arranged in two lines.',\n}\n/**\n * Data structure of a single list item.\n */\nexport interface KupListNode extends KupDataNode {\n secondaryText?: string;\n selected?: boolean;\n separator?: boolean;\n}\n/**\n * Available types of selection.\n */\nexport enum KupListRole {\n LISTBOX = 'listbox',\n RADIOGROUP = 'radiogroup',\n GROUP = 'group',\n}\n\nexport interface ValueDisplayedValue extends vdv {\n exists: boolean;\n}\n\nexport enum ItemsDisplayMode {\n CODE = 'code',\n DESCRIPTION = 'description',\n DESCRIPTION_AND_CODE = 'both',\n}\nexport interface KupListEventPayload extends KupEventPayload {\n selected: KupListNode;\n index?: number;\n}\n","import type { FComponent } from '../../types/GenericTypes';\n/**\n * Props of the f-switch component.\n */\nexport interface FSwitchProps extends FComponent {\n checked?: boolean;\n disabled?: boolean;\n label?: string;\n leadingLabel?: boolean;\n onBlur?: (event: FocusEvent) => void;\n onClick?: (event: MouseEvent) => void;\n onChange?: (event: Event) => void;\n onFocus?: (event: FocusEvent) => void;\n sizing?: FSwitchSizing;\n}\n\n/**\n * Types of the f-chip component.\n * @enum {string}\n * @property {string} SMALL - Small size: height = 24px\n * @property {string} MEDIUM - Medium size: height = 32px (default)\n */\n\nexport enum FSwitchSizing { // GenericTypes to be studied because small chips goes with small button/textfield but has different sizes\n SMALL = 'small',\n MEDIUM = 'medium',\n}\n","import { FSwitchSizing, type FSwitchProps } from './f-switch-declarations';\nimport { FunctionalComponent, h } from '@stencil/core';\n\n/*-------------------------------------------------*/\n/* C o m p o n e n t */\n/*-------------------------------------------------*/\n\nexport const FSwitch: FunctionalComponent<FSwitchProps> = (\n props: FSwitchProps\n) => {\n if (!props.sizing) {\n props.sizing = FSwitchSizing.MEDIUM;\n }\n const isSmall: boolean = props.sizing.toLowerCase() === FSwitchSizing.SMALL;\n const classObj: Record<string, boolean> = {\n switch: true,\n 'switch--checked': props.checked,\n 'switch--disabled': props.disabled,\n [`switch--${props.sizing}`]: props.sizing ? true : false,\n };\n\n return (\n <div\n class={`f-switch ${props.danger ? 'kup-danger' : ''} ${\n props.info ? 'kup-info' : ''\n } ${props.secondary ? 'kup-secondary' : ''} ${\n props.success ? 'kup-success' : ''\n } ${props.warning ? 'kup-warning' : ''} ${\n props.wrapperClass ? props.wrapperClass : ''\n }`}\n {...props.dataSet}\n id={props.id}\n title={props.title}\n >\n <div\n class={`form-field ${\n props.leadingLabel ? 'form-field--align-end' : ''\n }`}\n >\n <div class={classObj}>\n <div class=\"switch__track\"></div>\n <div class=\"switch__thumb-underlay\">\n <div class=\"switch__thumb\">\n <input\n type=\"checkbox\"\n class=\"switch__native-control\"\n role=\"switch\"\n checked={props.checked}\n disabled={props.disabled}\n value={props.checked ? 'on' : 'off'}\n onBlur={props.onBlur}\n onChange={props.onChange}\n onFocus={props.onFocus}\n ></input>\n </div>\n </div>\n </div>\n <label onClick={props.onChange}>{props.label}</label>\n </div>\n </div>\n );\n};\n","import type { FProgressBarProps } from './f-progress-bar-declarations';\nimport { FunctionalComponent, getAssetPath, h } from '@stencil/core';\n\n/*-------------------------------------------------*/\n/* C o m p o n e n t */\n/*-------------------------------------------------*/\n\nexport const FProgressBar: FunctionalComponent<FProgressBarProps> = (\n props: FProgressBarProps\n) => {\n if (!props.centeredLabel && !props.centeredLabel !== false) {\n props.centeredLabel = true;\n }\n\n let componentClass = `f-progress-bar ${props.danger ? 'kup-danger' : ''} ${\n props.animated ? 'kup-animated' : ''\n } ${props.padded ? 'kup-padded' : ''} ${props.info ? 'kup-info' : ''} ${\n props.slim ? 'kup-slim' : ''\n } ${props.striped ? 'kup-striped' : ''} ${\n props.secondary ? 'kup-secondary' : ''\n } ${props.slim ? 'kup-slim' : ''} ${props.success ? 'kup-success' : ''} ${\n props.warning ? 'kup-warning' : ''\n } ${props.wrapperClass ? props.wrapperClass : ''}`;\n let pieClass: string = 'pie';\n let radialStyle = undefined;\n if (props.isRadial) {\n componentClass += ' pie-wrapper is-radial';\n } else {\n componentClass += ' progress-bar';\n }\n\n let labelStyle = undefined;\n\n const valueStyle = {\n width: `${props.value}%`,\n };\n\n if (!props.centeredLabel) {\n labelStyle = valueStyle;\n if (props.value > 2) {\n componentClass += ' text-color-on-primary';\n }\n } else if (props.value > 49) {\n componentClass += ' text-color-on-primary';\n }\n\n let label = null;\n if (props.icon) {\n label = createIconElement(props);\n } else {\n if (!props.hideLabel) {\n if (props.isRadial) {\n if (props.label) {\n label = <span class=\"label\">{props.label}</span>;\n } else {\n label = (\n <span class=\"label\">\n {props.value}\n <span class=\"smaller\">%</span>\n </span>\n );\n }\n } else {\n if (props.label) {\n label = props.label;\n } else {\n label = props.value + '%';\n }\n }\n }\n }\n\n if (props.value > 0) {\n pieClass += ' has-value';\n if (props.value > 50) {\n pieClass += ' is-more-than-half';\n } else {\n pieClass += ' is-less-than-half';\n }\n }\n\n if (props.isRadial) {\n return (\n <div class={componentClass}>\n {label}\n <div class={pieClass}>\n <div\n style={radialStyle}\n class=\"left-side half-circle\"\n ></div>\n <div class=\"right-side half-circle\"></div>\n </div>\n <div class=\"shadow\"></div>\n </div>\n );\n } else {\n return (\n <div class={componentClass}>\n <div class=\"progress-bar-percentage\" style={valueStyle}>\n <span style={labelStyle}>{label}</span>\n </div>\n </div>\n );\n }\n};\n\nfunction createIconElement(props: FProgressBarProps) {\n if (!props.icon) {\n return undefined;\n }\n\n if (\n props.icon.indexOf('.') > -1 ||\n props.icon.indexOf('/') > -1 ||\n props.icon.indexOf('\\\\') > -1\n ) {\n return (\n <span class=\"label kup-icon is-image\">\n <img src={props.icon}></img>\n </span>\n );\n } else {\n let svg: string = `url('${getAssetPath(\n `./assets/svg/${props.icon}.svg`\n )}') no-repeat center`;\n let iconStyle = {\n mask: svg,\n webkitMask: svg,\n };\n return <span style={iconStyle} class=\"label kup-icon\"></span>;\n }\n}\n","import type { FComponent } from '../../types/GenericTypes';\n/**\n * Props of the f-radio component.\n */\nexport interface FRadioProps extends FComponent {\n type?: FRadioType;\n columns?: number;\n data?: FRadioData[];\n disabled?: boolean;\n label?: string;\n leadingLabel?: boolean;\n onBlur?: (event: FocusEvent) => void;\n onChange?: (i: number, event: Event) => void;\n onFocus?: (event: FocusEvent) => void;\n horizontal?: boolean;\n}\n/**\n * The object of a single radio.\n */\nexport interface FRadioData {\n checked: boolean;\n label: string;\n value: string;\n}\n\nexport enum FRadioType {\n RADIO = 'radio',\n CHEVRON = 'chevron',\n}\n","import { FunctionalComponent, VNode, h, Fragment } from '@stencil/core';\nimport { GenericObject } from '../../components';\nimport {\n FRadioType,\n type FRadioData,\n type FRadioProps,\n} from './f-radio-declarations';\nimport { FImage } from '../f-image/f-image';\n\n/*-------------------------------------------------*/\n/* C o m p o n e n t */\n/*-------------------------------------------------*/\n\nexport const FRadio: FunctionalComponent<FRadioProps> = (\n props: FRadioProps\n) => {\n const hasColumns: boolean = !!props.columns;\n const radioList: Array<VNode> = [];\n\n // Default to 'radio' if props.type is not specified\n const radioType = props.type || FRadioType.RADIO;\n for (let i = 0; i < props.data?.length; i++) {\n const data: FRadioData = props.data[i];\n const classObj: GenericObject = {\n radio: true,\n 'radio--checked': data.checked ? true : false,\n 'radio--disabled': props.disabled ? true : false,\n [`radio--${props.type}`]: props.type ? true : false,\n };\n\n radioList.push(\n <div\n class={`form-field \n ${props.leadingLabel ? ' form-field--align-end' : ''} ${\n props.disabled ? 'radio--disabled' : ''\n }`}\n >\n <div class={classObj}>\n {radioType === FRadioType.RADIO ? (\n // Radio button type rendering\n <input\n class=\"radio__native-control\"\n type=\"radio\"\n name=\"radio-element\"\n value={data.value}\n checked={data.checked}\n disabled={props.disabled}\n onBlur={props.onBlur}\n onChange={\n props.onChange\n ? props.onChange.bind(props.onChange, i)\n : null\n }\n onFocus={props.onFocus}\n ></input>\n ) : (\n // Chevron type rendering\n <>\n {data.checked ? (\n <FImage\n resource=\"check\"\n sizeX=\"14px\"\n sizeY=\"14px\"\n ></FImage>\n ) : (\n <FImage\n sizeX=\"14px\"\n sizeY=\"14px\"\n onClick={\n props.onChange\n ? props.onChange.bind(\n props.onChange,\n i\n )\n : null\n }\n ></FImage>\n )}\n </>\n )}\n {radioType === FRadioType.RADIO && (\n <div class=\"radio__background\">\n <div class=\"radio__outer-circle\"></div>\n <div class=\"radio__inner-circle\"></div>\n </div>\n )}\n </div>\n <label\n htmlFor={'radio-element'}\n onClick={\n props.onChange\n ? props.onChange.bind(props.onChange, i)\n : null\n }\n >\n {data.label ? data.label : ''}\n </label>\n </div>\n );\n }\n\n const styleObj: GenericObject = {\n '--kup_radio_columns': hasColumns\n ? `repeat(${props.columns}, 1fr)`\n : '',\n };\n\n return (\n <div\n class={`f-radio radio-wrapper\n ${hasColumns ? 'radio-wrapper-grid' : ''} ${\n props.danger ? 'kup-danger' : ''\n } ${props.info ? 'kup-info' : ''} ${\n props.secondary ? 'kup-secondary' : ''\n } ${props.success ? 'kup-success' : ''} ${\n props.warning ? 'kup-warning' : ''\n } ${props.wrapperClass ? props.wrapperClass : ''} ${\n props.horizontal ? 'kup-horizontal' : ''\n }`}\n style={styleObj}\n >\n {radioList}\n </div>\n );\n};\n","import { FunctionalComponent, VNode, h } from '@stencil/core';\nimport type { FRatingProps } from './f-rating-declarations';\n\n/*-------------------------------------------------*/\n/* C o m p o n e n t */\n/*-------------------------------------------------*/\n\nexport const FRating: FunctionalComponent<FRatingProps> = (\n props: FRatingProps\n) => {\n if (!props.maxValue) {\n props.maxValue = 5;\n }\n return (\n <div\n class={`f-rating ${props.disabled ? 'disabled' : ''} ${\n props.danger ? 'kup-danger' : ''\n } ${props.info ? 'kup-info' : ''} ${\n props.secondary ? 'kup-secondary' : ''\n } ${props.success ? 'kup-success' : ''} ${\n props.warning ? 'kup-warning' : ''\n } ${props.wrapperClass ? props.wrapperClass : ''}`}\n >\n {buildStars(props)}\n </div>\n );\n};\n\nfunction buildStars(props: FRatingProps) {\n const stars: VNode[] = [];\n\n for (let i = 1; i <= props.maxValue; i++) {\n if (i <= props.value) {\n stars.push(\n <span\n class=\"rating\"\n onClick={\n props.onClick\n ? props.onClick.bind(props.onClick, i)\n : null\n }\n >\n &#x2605;\n </span>\n );\n } else {\n stars.push(\n <span\n class=\"rating\"\n onClick={\n props.onClick\n ? props.onClick.bind(props.onClick, i)\n : null\n }\n >\n &#x2606;\n </span>\n );\n }\n }\n\n return stars;\n}\n","import type { FCheckboxProps } from '../f-checkbox/f-checkbox-declarations';\nimport type { FImageData, FImageProps } from '../f-image/f-image-declarations';\nimport type { FButtonProps } from '../f-button/f-button-declarations';\nimport type { KupChart } from '../../components/kup-chart/kup-chart';\nimport type { KupDom } from '../../managers/kup-manager/kup-manager-declarations';\nimport type { KupAutocompleteEventPayload } from '../../components/kup-autocomplete/kup-autocomplete-declarations';\nimport type { KupComboboxEventPayload } from '../../components/kup-combobox/kup-combobox-declarations';\nimport type { KupDatePickerEventPayload } from '../../components/kup-date-picker/kup-date-picker-declarations';\nimport type { KupTimePickerEventPayload } from '../../components/kup-time-picker/kup-time-picker-declarations';\nimport type { KupRatingClickEventPayload } from '../../components/kup-rating/kup-rating-declarations';\nimport type { KupColorPickerEventPayload } from '../../components/kup-color-picker/kup-color-picker-declarations';\nimport {\n GenericObject,\n KupComponent,\n KupTagNames,\n} from '../../types/GenericTypes';\nimport {\n autoCenterComps,\n editableTypes,\n FCellClasses,\n FCellEventPayload,\n FCellEvents,\n FCellInfo,\n FCellProps,\n FCellShapes,\n FCellTypes,\n fullWidthFieldsComps,\n kupTypes,\n} from './f-cell-declarations';\nimport { FunctionalComponent, h, VNode } from '@stencil/core';\nimport {\n CMBandACPAdapter,\n getCellValueForDisplay,\n RADAdapter,\n} from '../../utils/cell-utils';\nimport { FCheckbox } from '../f-checkbox/f-checkbox';\nimport { FTextField } from '../f-text-field/f-text-field';\nimport { FImage } from '../f-image/f-image';\nimport { FChip } from '../f-chip/f-chip';\nimport { KupThemeColorValues } from '../../managers/kup-theme/kup-theme-declarations';\nimport {\n KupDataCell,\n KupDataCellOptions,\n KupDataColumn,\n KupDataNode,\n KupDataRow,\n} from '../../managers/kup-data/kup-data-declarations';\nimport { FSwitch } from '../f-switch/f-switch';\nimport { KupChipChangeEventPayload } from '../../components/kup-chip/kup-chip-declarations';\nimport { FChipsProps, FChipType } from '../f-chip/f-chip-declarations';\nimport { ItemsDisplayMode } from '../../components/kup-list/kup-list-declarations';\nimport { FButton } from '../f-button/f-button';\nimport { FProgressBar } from '../f-progress-bar/f-progress-bar';\nimport { FRadio } from '../f-radio/f-radio';\nimport { FRating } from '../f-rating/f-rating';\nimport type { KupDataTable } from '../../components/kup-data-table/kup-data-table';\nimport { FRadioProps } from '../f-radio/f-radio-declarations';\nimport { KupDebugCategory } from '../../managers/kup-debug/kup-debug-declarations';\nimport {\n DataAdapterFn,\n KupInputPanelCell,\n} from '../../components/kup-input-panel/kup-input-panel-declarations';\n\nconst dom: KupDom = document.documentElement as KupDom;\n\n/*-------------------------------------------------*/\n/* C o m p o n e n t */\n/*-------------------------------------------------*/\n\nexport const FCell: FunctionalComponent<FCellProps> = (\n props: FCellProps,\n children?: VNode[]\n) => {\n const cell = props.cell;\n const column = props.column;\n const row = props.row;\n const shape = props.shape\n ? props.shape\n : cell.shape\n ? cell.shape\n : column.shape\n ? column.shape\n : null;\n const hasObj = !dom.ketchup.objects.isEmptyKupObj(cell.obj);\n\n let isEditable = false;\n if (cell.hasOwnProperty('isEditable')) {\n isEditable = cell.isEditable;\n } else if (column.hasOwnProperty('isEditable')) {\n isEditable = column.isEditable;\n }\n isEditable = isEditable && props.editable;\n\n if (cell.options) {\n cell.data = mapData(cell, column) ?? cell.data;\n\n if (props.cell.shape === FCellShapes.TEXT_FIELD) {\n cell.value = cell.data.value;\n }\n }\n\n const valueToDisplay = props.previousValue !== cell.value ? cell.value : '';\n const cellType = dom.ketchup.data.cell.getType(cell, shape);\n const subcomponentProps: unknown = { ...cell.data };\n let cssClasses = cell.cssClass\n ? cell.cssClass\n : column.cssClass\n ? column.cssClass\n : '';\n if ((props.component as KupDataTable).legacyLook) {\n cssClasses += ' monospace c-pre';\n }\n const classObj: Record<string, boolean> = {\n 'f-cell': true,\n [FCellClasses.OBJ]: hasObj ? true : false,\n [cellType + '-cell']: true,\n [props.wrapperClass]: props.wrapperClass ? true : false,\n [props.density]:\n props.density && cellType !== FCellTypes.BAR ? true : false,\n [cssClasses]: cssClasses ? true : false,\n };\n let content: unknown = valueToDisplay;\n if (!cell.data) {\n setDefaults(cellType, cell);\n }\n if (isEditable && editableTypes.includes(cellType)) {\n content = setEditableCell(cellType, classObj, cell, column, props);\n } else if (cell.data && kupTypes.includes(cellType)) {\n if (props.setSizes) {\n setCellSizeKup(cellType, subcomponentProps, cell);\n }\n if (!props.renderKup) {\n const lazyClass = 'cell-' + cellType + ' placeholder';\n content = <span class={lazyClass}></span>;\n } else {\n content = setKupCell(\n cellType,\n classObj,\n subcomponentProps,\n cell,\n row,\n column,\n props\n );\n }\n } else {\n if (props.setSizes) {\n setCellSize(cellType, subcomponentProps, cell, props);\n }\n content = setCell(\n cellType,\n subcomponentProps,\n content,\n classObj,\n cell,\n column,\n props\n );\n }\n\n let icon: VNode = null;\n if (!isEditable && (column.icon || cell.icon) && content) {\n const fProps: FImageProps = {\n color: `rgba(var(${KupThemeColorValues.TEXT}-rgb), 0.375)`,\n resource: cell.icon ? cell.icon : column.icon,\n placeholderResource: cell.placeholderIcon\n ? cell.placeholderIcon\n : column.placeholderIcon,\n sizeX: '1.25em',\n sizeY: '1.25em',\n wrapperClass: 'obj-icon',\n };\n icon = <FImage {...fProps} />;\n }\n\n let cellTitle: string = null;\n if (dom.ketchup.debug.isDebug() && hasObj) {\n cellTitle = cell.obj.t + '; ' + cell.obj.p + '; ' + cell.obj.k + ';';\n } else if (cell.title != null && cell.title.trim() != '') {\n cellTitle = cell.title;\n }\n\n let infoEl: HTMLElement = null;\n if (cell.info) {\n const info: FCellInfo = { ...cell.info };\n if (!info.color) {\n info.color = `var(${KupThemeColorValues.INFO})`;\n }\n if (!info.icon) {\n info.icon = 'info';\n }\n const fProps: FImageProps = {\n color: info.color,\n resource: info.icon,\n placeholderResource: info.placeholderIcon,\n sizeX: '1.25em',\n sizeY: '1.25em',\n title: info.message ? info.message : '',\n wrapperClass: 'cell-info',\n };\n infoEl = <FImage {...fProps} />;\n }\n\n return (\n <div\n onKeyUp={(e) => cellEvent(e, props, cellType, FCellEvents.KEYUP)}\n class={classObj}\n kup-get-cell-props={() => {\n return props;\n }}\n ref={(el) => (cell.element = el)}\n style={cell.style}\n >\n <div\n class=\"f-cell__content\"\n style={cell.styleContent}\n title={cellTitle}\n >\n {props.cellActionIcon && (\n <FImage\n resource=\"more_vert\"\n sizeX=\"16px\"\n sizeY=\"16px\"\n wrapperClass={`f-cell__iconfunction ${\n cellType === FCellTypes.NUMBER ? 'left' : 'right'\n }`}\n onClick={props.cellActionIcon.onClick}\n tabIndex={0}\n />\n )}\n {children && children.length > 0\n ? children\n : [props.indents, infoEl, icon, content]}\n </div>\n </div>\n );\n};\n\nconst mapData = (cell: KupDataCellOptions, col: KupDataColumn) => {\n if (!cell) {\n return null;\n }\n\n const options = cell.options;\n const fieldLabel = col.title;\n const currentValue = cell.value;\n const cellType = dom.ketchup.data.cell.getType(cell, cell.shape);\n const dataAdapterMap = new Map<FCellTypes, DataAdapterFn>([\n [FCellTypes.BUTTON_LIST, MainBTNAdapter.bind(this)],\n [FCellTypes.STRING, MainITXAdapter.bind(this)],\n [FCellTypes.RADIO, MainRADAdapter.bind(this)],\n [FCellTypes.AUTOCOMPLETE, MainCMBandACPAdapter.bind(this)],\n [FCellTypes.COMBOBOX, MainCMBandACPAdapter.bind(this)],\n [FCellTypes.CHECKBOX, MainCHKAdapter.bind(this)],\n [FCellTypes.OBJECT, MainObjectAdapter.bind(this)],\n ]);\n\n const adapter = dataAdapterMap.get(cellType);\n return adapter\n ? adapter(options, fieldLabel, currentValue, cell, col.name)\n : null;\n};\n\nconst MainObjectAdapter = (\n options: GenericObject,\n _fieldLabel: string,\n currentValue: string,\n _cell: KupInputPanelCell,\n _id: string\n) => {\n if (options[0]) {\n return {\n initialValue: currentValue,\n label: options[0].label,\n value: options[0].value,\n };\n }\n};\n\nconst MainCHKAdapter = (\n options: GenericObject,\n _fieldLabel: string,\n _currentValue: string\n) => {\n if (options?.[0]) {\n return {\n checked: options[0].checked,\n label: options[0].label,\n };\n }\n};\n\nconst MainITXAdapter = (\n options: GenericObject,\n _fieldLabel: string,\n _currentValue: string,\n _cell: KupDataCellOptions\n) => {\n if (options?.[0]) {\n return {\n value: options[0].label,\n };\n }\n};\n\nconst MainRADAdapter = (\n options: GenericObject,\n _fieldLabel: string,\n currentValue: string\n) => {\n return RADAdapter(currentValue, options);\n};\n\nconst MainCMBandACPAdapter = (\n rawOptions: GenericObject,\n fieldLabel: string,\n currentValue: string\n) => {\n const configCMandACP = CMBandACPAdapter(currentValue, fieldLabel, []);\n\n configCMandACP.data['kup-list'].data = optionsTreeComboAdapter(\n rawOptions,\n currentValue\n );\n return configCMandACP;\n};\n\nconst optionsTreeComboAdapter = (options: any, currentValue: string) => {\n const adapter = optionsAdapterMap.get(options.type);\n\n if (adapter) {\n return adapter(options, currentValue);\n } else {\n return options.map((option) => ({\n value: option.label,\n id: option.id,\n selected: currentValue === option.id,\n }));\n }\n};\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\nconst tableOptionsAdapter = (\n options: any,\n currentValue: string\n): GenericObject[] => {\n return options.rows.map((row) => {\n const cells = row.fields || row.cells;\n const [id, value] = Object.keys(cells);\n\n return {\n id: cells[id].value,\n value: cells[value]?.value || cells[id].value,\n selected: currentValue === cells[id].value,\n };\n });\n};\n\nconst optionsAdapterMap = new Map<\n string,\n (options: any, currentValue: string) => GenericObject[]\n>([\n ['SmeupTreeNode', treeOptionsNodeAdapter.bind(this)],\n ['SmeupDataTree', dataTreeOptionsChildrenAdapter.bind(this)],\n ['SmeupTable', tableOptionsAdapter.bind(this)],\n ['SmeupDataTable', tableOptionsAdapter.bind(this)],\n]);\n\nconst MainBTNAdapter = (\n _options: GenericObject,\n _fieldLabel: string,\n _currentValue: string,\n cell: KupDataCellOptions\n) => {\n return {\n data: cell.options?.length\n ? cell.options?.map((option) => ({\n icon: option.icon,\n value: option.value,\n }))\n : [],\n };\n};\n\nfunction setCellSize(\n cellType: string,\n subcomponentProps: unknown,\n cell: KupDataCell,\n props: FCellProps\n) {\n switch (cellType) {\n case FCellTypes.CHECKBOX:\n case FCellTypes.ICON:\n if (!(subcomponentProps as FImageProps).sizeX) {\n (subcomponentProps as FImageProps).sizeX = '18px';\n }\n if (!(subcomponentProps as FImageProps).sizeY) {\n (subcomponentProps as FImageProps).sizeY = '18px';\n }\n if (cell.style) {\n if (!cell.style.height) {\n cell.style['minHeight'] = (\n subcomponentProps as FImageProps\n ).sizeY;\n }\n } else {\n cell.style = {\n minHeight: (subcomponentProps as FImageProps).sizeY,\n };\n }\n break;\n case FCellTypes.IMAGE:\n const cellValue = props.cell?.value || '';\n const hasExternalResource =\n cellValue.indexOf('.') > -1 ||\n cellValue.indexOf('/') > -1 ||\n cellValue.indexOf('\\\\') > -1;\n if (\n (props.component as KupComponent).rootElement.tagName ===\n KupTagNames.DATA_TABLE &&\n !hasExternalResource\n ) {\n if (\n !(subcomponentProps as FImageProps).sizeX &&\n !(subcomponentProps as FImageProps).sizeY\n ) {\n (subcomponentProps as FImageProps).sizeX = '100%';\n (subcomponentProps as FImageProps).sizeY = '64px';\n (subcomponentProps as FImageProps).wrapperClass = 'noWidth';\n } else {\n if (!(subcomponentProps as FImageProps).sizeX) {\n (subcomponentProps as FImageProps).sizeX = '100%';\n (subcomponentProps as FImageProps).wrapperClass =\n 'noWidth';\n }\n if (!(subcomponentProps as FImageProps).sizeY) {\n (subcomponentProps as FImageProps).sizeY = 'auto';\n }\n }\n }\n if (\n (props.component as KupComponent).rootElement.tagName ===\n KupTagNames.BOX\n ) {\n if (!(subcomponentProps as FImageProps).sizeY) {\n (subcomponentProps as FImageProps).sizeY = 'auto';\n }\n if ((subcomponentProps as FImageProps).fit === undefined) {\n (subcomponentProps as FImageProps).fit = true;\n }\n } else if (!(subcomponentProps as FImageProps).sizeX) {\n (subcomponentProps as FImageProps).sizeX = 'auto';\n }\n if (!(subcomponentProps as FImageProps).sizeY) {\n (subcomponentProps as FImageProps).sizeY = '64px';\n }\n\n break;\n }\n}\n\nfunction setCellSizeKup(\n cellType: string,\n subcomponentProps: unknown,\n cell: KupDataCell\n) {\n switch (cellType) {\n case FCellTypes.BAR:\n if (!(subcomponentProps as FImageProps).sizeY) {\n (subcomponentProps as FImageProps).sizeY = '26px';\n }\n break;\n case FCellTypes.BUTTON:\n let height: string = '';\n if ((subcomponentProps as FButtonProps).label) {\n height = '36px';\n }\n if (cell.style) {\n if (!cell.style.height) {\n cell.style['minHeight'] = height;\n }\n } else {\n cell.style = { minHeight: height };\n }\n break;\n case FCellTypes.CHART:\n if (!(subcomponentProps as KupChart).sizeX) {\n (subcomponentProps as KupChart).sizeX = '100%';\n }\n if (!(subcomponentProps as KupChart).sizeY) {\n (subcomponentProps as KupChart).sizeY = '100%';\n }\n break;\n case FCellTypes.CHIP:\n if (cell.style) {\n if (!cell.style.height) {\n cell.style['minHeight'] = '40px';\n }\n } else {\n cell.style = { minHeight: '40px' };\n }\n break;\n case FCellTypes.RADIO:\n if (cell.style) {\n if (!cell.style.height) {\n cell.style['minHeight'] = '40px';\n }\n } else {\n cell.style = { minHeight: '40px' };\n }\n break;\n }\n}\n\nfunction setEditableCell(\n cellType: string,\n classObj: Record<string, boolean>,\n cell: KupDataCell,\n column: KupDataColumn,\n props: FCellProps\n): unknown {\n switch (cellType) {\n case FCellTypes.AUTOCOMPLETE:\n return (\n <kup-autocomplete\n key={column.name + props.row.id}\n initialValue={cell.value}\n {...cell.data}\n class={isFullWidth(props) ? 'kup-full-width' : ''}\n onkup-autocomplete-change={(\n e: CustomEvent<KupAutocompleteEventPayload>\n ) => cellEvent(e, props, cellType, FCellEvents.UPDATE)}\n onkup-autocomplete-input={(\n e: CustomEvent<KupAutocompleteEventPayload>\n ) => cellEvent(e, props, cellType, FCellEvents.INPUT)}\n onkup-autocomplete-iconclick={(\n e: CustomEvent<KupAutocompleteEventPayload>\n ) => cellEvent(e, props, cellType, FCellEvents.ICON_CLICK)}\n />\n );\n case FCellTypes.CHECKBOX:\n if (isAutoCentered(props)) {\n classObj[FCellClasses.C_CENTERED] = true;\n }\n\n if (cell.shape === FCellShapes.INPUT_CHECKBOX) {\n return (\n <input\n checked={\n cell.value === 'on' || cell.value === '1'\n ? true\n : false\n }\n class=\"input-checkbox\"\n onChange={(e: InputEvent) =>\n cellEvent(e, props, cellType, FCellEvents.UPDATE)\n }\n type=\"checkbox\"\n ></input>\n );\n } else {\n return (\n <FCheckbox\n {...cell.data}\n onChange={(e: InputEvent) =>\n cellEvent(e, props, cellType, FCellEvents.UPDATE)\n }\n />\n );\n }\n case FCellTypes.CHIP:\n return (\n <kup-chip\n {...cell.data}\n type={FChipType.INPUT}\n enableInput={true}\n onKup-chip-change={(\n e: CustomEvent<KupChipChangeEventPayload>\n ) => cellEvent(e, props, cellType, FCellEvents.UPDATE)}\n >\n <kup-text-field\n fullWidth={true}\n slot=\"field\"\n {...cell.slotData}\n ></kup-text-field>\n </kup-chip>\n );\n case FCellTypes.COLOR_PICKER:\n return (\n <kup-color-picker\n key={column.name + props.row.id}\n initialValue={cell.value}\n {...cell.data}\n class={isFullWidth(props) ? 'kup-full-width' : ''}\n disabled={false}\n onkup-colorpicker-change={(\n e: CustomEvent<KupColorPickerEventPayload>\n ) => cellEvent(e, props, cellType, FCellEvents.UPDATE)}\n ></kup-color-picker>\n );\n case FCellTypes.COMBOBOX:\n return (\n <kup-combobox\n key={column.name + props.row.id}\n initialValue={cell.value}\n {...cell.data}\n class={isFullWidth(props) ? 'kup-full-width' : ''}\n onkup-combobox-change={(\n e: CustomEvent<KupComboboxEventPayload>\n ) => cellEvent(e, props, cellType, FCellEvents.UPDATE)}\n onkup-combobox-input={(\n e: CustomEvent<KupComboboxEventPayload>\n ) => cellEvent(e, props, cellType, FCellEvents.INPUT)}\n onkup-combobox-iconclick={(\n e: CustomEvent<KupComboboxEventPayload>\n ) => cellEvent(e, props, cellType, FCellEvents.ICON_CLICK)}\n />\n );\n case FCellTypes.DATE:\n return (\n <kup-date-picker\n key={column.name + props.row.id}\n initialValue={cell.value}\n {...cell.data}\n class={isFullWidth(props) ? 'kup-full-width' : ''}\n onkup-datepicker-change={(\n e: CustomEvent<KupDatePickerEventPayload>\n ) => cellEvent(e, props, cellType, FCellEvents.UPDATE)}\n onkup-datepicker-input={(\n e: CustomEvent<KupDatePickerEventPayload>\n ) => cellEvent(e, props, cellType, FCellEvents.INPUT)}\n />\n );\n case FCellTypes.MULTI_AUTOCOMPLETE:\n return (\n <kup-chip\n displayId={true}\n {...cell.data}\n type={FChipType.INPUT}\n enableInput={true}\n onKup-chip-change={(\n e: CustomEvent<KupChipChangeEventPayload>\n ) => cellEvent(e, props, cellType, FCellEvents.UPDATE)}\n >\n <kup-autocomplete\n class=\"kup-full-width\"\n slot=\"field\"\n displayMode={ItemsDisplayMode.DESCRIPTION_AND_CODE}\n selectMode={ItemsDisplayMode.DESCRIPTION_AND_CODE}\n onkup-autocomplete-input={(\n e: CustomEvent<KupAutocompleteEventPayload>\n ) => cellEvent(e, props, cellType, FCellEvents.INPUT)}\n onkup-autocomplete-iconclick={(\n e: CustomEvent<KupComboboxEventPayload>\n ) =>\n cellEvent(\n e,\n props,\n cellType,\n FCellEvents.ICON_CLICK\n )\n }\n showDropDownIcon={false}\n {...cell.slotData}\n ></kup-autocomplete>\n </kup-chip>\n );\n case FCellTypes.MULTI_COMBOBOX:\n return (\n <kup-chip\n displayId={true}\n {...cell.data}\n type={FChipType.INPUT}\n enableInput={true}\n onKup-chip-change={(\n e: CustomEvent<KupChipChangeEventPayload>\n ) => cellEvent(e, props, cellType, FCellEvents.UPDATE)}\n >\n <kup-combobox\n class=\"kup-full-width\"\n slot=\"field\"\n displayMode={ItemsDisplayMode.DESCRIPTION_AND_CODE}\n selectMode={ItemsDisplayMode.DESCRIPTION_AND_CODE}\n onkup-combobox-input={(\n e: CustomEvent<KupComboboxEventPayload>\n ) => cellEvent(e, props, cellType, FCellEvents.INPUT)}\n onkup-combobox-iconclick={(\n e: CustomEvent<KupComboboxEventPayload>\n ) =>\n cellEvent(\n e,\n props,\n cellType,\n FCellEvents.ICON_CLICK\n )\n }\n {...cell.slotData}\n ></kup-combobox>\n </kup-chip>\n );\n case FCellTypes.RADIO:\n return (\n <FRadio\n {...cell.data}\n disabled={false}\n onChange={(i: number, e: InputEvent) => {\n const radioData = (cell.data as FRadioProps).data;\n for (let index = 0; index < radioData.length; index++) {\n const radioEl = radioData[index];\n if (index === i) {\n radioEl.checked = true;\n } else {\n radioEl.checked = false;\n }\n }\n cellEvent(e, props, cellType, FCellEvents.UPDATE);\n }}\n ></FRadio>\n );\n case FCellTypes.RATING:\n return (\n <kup-rating\n key={column.name + props.row.id}\n {...cell.data}\n disabled={false}\n onkup-rating-click={(\n e: CustomEvent<KupRatingClickEventPayload>\n ) => cellEvent(e, props, cellType, FCellEvents.UPDATE)}\n ></kup-rating>\n );\n case FCellTypes.SWITCH:\n return (\n <FSwitch\n {...cell.data}\n disabled={false}\n onChange={(e: InputEvent) =>\n cellEvent(e, props, cellType, FCellEvents.UPDATE)\n }\n ></FSwitch>\n );\n case FCellTypes.TIME:\n return (\n <kup-time-picker\n key={column.name + props.row.id}\n initialValue={cell.value}\n {...cell.data}\n class={isFullWidth(props) ? 'kup-full-width' : ''}\n onkup-timepicker-change={(\n e: CustomEvent<KupTimePickerEventPayload>\n ) => cellEvent(e, props, cellType, FCellEvents.UPDATE)}\n onkup-timepicker-input={(\n e: CustomEvent<KupTimePickerEventPayload>\n ) => cellEvent(e, props, cellType, FCellEvents.INPUT)}\n />\n );\n case FCellTypes.OBJECT:\n return (\n <FTextField\n icon={'table'}\n {...cell.data}\n disabled={false}\n onIconClick={(e) =>\n cellEvent(e, props, cellType, FCellEvents.ICON_CLICK)\n }\n ></FTextField>\n );\n case FCellTypes.NUMBER:\n classObj[FCellClasses.C_RIGHT_ALIGNED] = true;\n case FCellTypes.LINK:\n case FCellTypes.STRING:\n const onChange = (e: InputEvent) =>\n cellEvent(e, props, cellType, FCellEvents.UPDATE);\n const onInput = (e: InputEvent) =>\n cellEvent(e, props, cellType, FCellEvents.INPUT);\n const type = cellType === FCellTypes.NUMBER ? 'number' : null;\n const value =\n cellType === FCellTypes.NUMBER && cell.value\n ? dom.ketchup.math.numberifySafe(cell.value).toString()\n : cell.value;\n if (cell.shape === FCellShapes.INPUT_FIELD) {\n return (\n <input\n class={'input-field'}\n onChange={onChange}\n onInput={onInput}\n type={type}\n value={value}\n maxLength={column.cellData?.maxLength ?? -1}\n ></input>\n );\n } else {\n return (\n <FTextField\n inputType={type}\n fullWidth={isFullWidth(props) ? true : false}\n {...cell.data}\n icon={\n cell.data && cell.data.icon\n ? cell.data.icon\n : cell.icon\n ? cell.icon\n : column.icon\n ? column.icon\n : null\n }\n value={value}\n onChange={onChange}\n onInput={onInput}\n onIconClick={(e: MouseEvent) =>\n cellEvent(\n e,\n props,\n cellType,\n FCellEvents.ICON_CLICK\n )\n }\n />\n );\n }\n }\n}\n\nfunction setCell(\n cellType: string,\n subcomponentProps: GenericObject,\n content: unknown,\n classObj: Record<string, boolean>,\n cell: KupDataCell,\n column: KupDataColumn,\n props: FCellProps\n): unknown {\n switch (cellType) {\n case FCellTypes.AUTOCOMPLETE:\n case FCellTypes.COMBOBOX:\n case FCellTypes.DATE:\n case FCellTypes.DATETIME:\n case FCellTypes.TIME:\n if (content && content != '') {\n const cellValue = getCellValueForDisplay(column, cell);\n return <div class=\"f-cell__text\">{cellValue}</div>;\n }\n return content;\n case FCellTypes.CHECKBOX:\n if (isAutoCentered(props)) {\n classObj[FCellClasses.C_CENTERED] = true;\n }\n return (\n <FImage\n resource={\n (subcomponentProps as FCheckboxProps).checked\n ? 'check_box'\n : 'check_box_outline_blank'\n }\n sizeX=\"18px\"\n sizeY=\"18px\"\n />\n );\n case FCellTypes.EDITOR:\n return <div innerHTML={cell.value}></div>;\n case FCellTypes.ICON:\n if (isAutoCentered(props)) {\n classObj[FCellClasses.C_CENTERED] = true;\n }\n if ((subcomponentProps as FImageProps).badgeData) {\n classObj[FCellClasses.C_PADDED] = true;\n }\n return <FImage {...subcomponentProps} />;\n case FCellTypes.IMAGE:\n if (isAutoCentered(props)) {\n classObj[FCellClasses.C_CENTERED] = true;\n }\n if ((subcomponentProps as FImageProps).badgeData) {\n classObj[FCellClasses.C_PADDED] = true;\n }\n\n return <FImage {...subcomponentProps} />;\n\n case FCellTypes.LINK:\n return (\n <a href={content as string} target=\"_blank\">\n {cell.value}\n </a>\n );\n case FCellTypes.NUMBER:\n if (content && content != '') {\n const cellValueNumber = dom.ketchup.math.numberifySafe(\n cell.value\n );\n const cellValue = getCellValueForDisplay(column, cell);\n if (cellValueNumber < 0) {\n classObj[FCellClasses.TEXT_DANGER] = true;\n }\n if (isAutoCentered(props)) {\n classObj[FCellClasses.C_RIGHT_ALIGNED] = true;\n }\n return <div class=\"f-cell__text\">{cellValue}</div>;\n }\n return <div class=\"f-cell__text\">{content}</div>;\n case FCellTypes.SWITCH:\n if (isAutoCentered(props)) {\n classObj[FCellClasses.C_CENTERED] = true;\n }\n subcomponentProps['disabled'] = true;\n return <FSwitch {...subcomponentProps}></FSwitch>;\n default:\n return <div class=\"f-cell__text\">{content}</div>;\n }\n}\n\nfunction setKupCell(\n cellType: string,\n classObj: Record<string, boolean>,\n subcomponentProps: GenericObject,\n cell: KupDataCell,\n row: KupDataRow,\n column: KupDataColumn,\n props: FCellProps\n): unknown {\n switch (cellType) {\n case FCellTypes.BAR:\n if (!(subcomponentProps as FImageProps).data) {\n return (\n <kup-image\n key={column.name + props.row.id}\n sizeX=\"250px\"\n {...subcomponentProps}\n />\n );\n } else {\n const barStyle = {\n height: (subcomponentProps as FImageProps).sizeY,\n width: '100%',\n };\n return (\n <div style={barStyle}>\n <FImage {...subcomponentProps} />\n </div>\n );\n }\n case FCellTypes.BUTTON:\n if (isAutoCentered(props)) {\n classObj[FCellClasses.C_CENTERED] = true;\n }\n return (\n <FButton\n {...subcomponentProps}\n onClick={(e) =>\n cellEvent(e, props, cellType, FCellEvents.CLICK)\n }\n ></FButton>\n );\n case FCellTypes.BUTTON_LIST:\n if (isAutoCentered(props)) {\n classObj[FCellClasses.C_CENTERED] = true;\n }\n subcomponentProps['data-storage'] = {\n cell: cell,\n row: row,\n column: column,\n };\n return (\n <kup-button-list\n key={column.name + props.row.id}\n {...subcomponentProps}\n ></kup-button-list>\n );\n case FCellTypes.CHART:\n if (isAutoCentered(props)) {\n classObj[FCellClasses.C_CENTERED] = true;\n }\n return (\n <kup-chart\n key={column.name + props.row.id}\n {...subcomponentProps}\n />\n );\n case FCellTypes.MULTI_AUTOCOMPLETE:\n case FCellTypes.MULTI_COMBOBOX:\n case FCellTypes.CHIP:\n return <FChip {...subcomponentProps} />;\n case FCellTypes.COLOR_PICKER:\n return (\n <kup-color-picker\n key={column.name + props.row.id}\n {...subcomponentProps}\n class={isFullWidth(props) ? 'kup-full-width' : ''}\n disabled\n ></kup-color-picker>\n );\n case FCellTypes.GAUGE:\n return (\n <kup-gauge\n key={column.name + props.row.id}\n value={dom.ketchup.math.numberifySafe(cell.value)}\n width-component=\"280px\"\n {...subcomponentProps}\n ></kup-gauge>\n );\n case FCellTypes.KNOB:\n case FCellTypes.PROGRESS_BAR:\n return subcomponentProps.customStyle ? (\n <kup-progress-bar\n key={column.name + props.row.id}\n {...subcomponentProps}\n ></kup-progress-bar>\n ) : (\n <FProgressBar {...subcomponentProps}></FProgressBar>\n );\n case FCellTypes.RADIO:\n if (isAutoCentered(props)) {\n classObj[FCellClasses.C_CENTERED] = true;\n }\n subcomponentProps['disabled'] = row.readOnly;\n return <FRadio {...subcomponentProps}></FRadio>;\n case FCellTypes.RATING:\n return <FRating {...subcomponentProps} disabled={true}></FRating>;\n case FCellTypes.OBJECT:\n return (\n <FTextField\n icon={'table'}\n {...subcomponentProps}\n disabled={true}\n ></FTextField>\n );\n }\n}\n\nfunction setDefaults(cellType: string, cell: KupDataCell): void {\n function isShapeBarMarker(value: string): boolean {\n return value.toUpperCase().startsWith('SHAPE;BAR');\n }\n\n function isShapeMarker(value: string): boolean {\n return value.toUpperCase().startsWith('SHAPE;');\n }\n\n function isBgColorMarker(value: string): boolean {\n return value.toUpperCase().startsWith('BCOLOR;');\n }\n\n function isHeightMarker(value: string): boolean {\n return value.toUpperCase().startsWith('HEIGHT;');\n }\n\n function isDecoratorMarker(value: string): boolean {\n return (\n value.toUpperCase().startsWith('SEP;') ||\n value.toUpperCase().startsWith('DIV;') ||\n value.toUpperCase().startsWith('ARW;') ||\n value.toUpperCase().startsWith('GRID;')\n );\n }\n function getData(value: string): FImageData[] | null {\n if (!value) {\n return null;\n }\n const graphicElementDefinitionArr = value.split('\\\\\\\\AND\\\\');\n const data: FImageData[] = [];\n for (const graphicElem of graphicElementDefinitionArr) {\n const elementData = getElementData(graphicElem);\n if (elementData) {\n data.push(...elementData);\n } else {\n return null;\n }\n }\n return data;\n }\n\n function getElementData(value: string): FImageData[] | null {\n const commonsData: FImageData = {};\n\n const markersArray = value.split('\\\\\\\\');\n const shapesArray: FImageData[] = [];\n\n for (const vString of markersArray) {\n if (vString) {\n if (isDecoratorMarker(vString)) {\n return null;\n }\n\n if (isShapeMarker(vString)) {\n if (!isShapeBarMarker(vString)) {\n return null;\n } else {\n const attr = vString.split(';');\n if (attr.length === 3) {\n const width = attr[2].replace(',', '.');\n if (!isNaN(parseFloat(width))) {\n commonsData.width = `${width}%`;\n }\n }\n }\n } else if (isBgColorMarker(vString)) {\n // Background color handling can be added here if needed\n } else if (isHeightMarker(vString)) {\n const height = vString\n .substring('HEIGHT;'.length)\n .replace(',', '.');\n if (!isNaN(parseFloat(height))) {\n commonsData.height = `${height}%`;\n }\n } else {\n shapesArray.push(getShapeData(vString, commonsData));\n }\n }\n return shapesArray.length ? shapesArray : null;\n }\n\n function getShapeData(\n value: string,\n commonsData: FImageData\n ): FImageData {\n const shapeData: FImageData = { ...commonsData };\n const attr = value.split(';');\n if (attr.length >= 1) {\n const pattern = /R(\\d+)G(\\d+)B(\\d+)/;\n const match = pattern.exec(attr[0]);\n if (match) {\n const [, r, g, b] = match;\n if (\n !isNaN(parseInt(r, 10)) &&\n !isNaN(parseInt(g, 10)) &&\n !isNaN(parseInt(b, 10))\n ) {\n shapeData.color = `rgb(${parseInt(r)},${parseInt(\n g\n )},${parseInt(b)})`;\n }\n }\n if (attr.length >= 2) {\n const width = attr[1].replace(',', '.');\n if (!isNaN(parseFloat(width))) {\n shapeData.width = `${width}%`;\n }\n }\n }\n return shapeData;\n }\n }\n\n cell.data = {};\n\n const createDataset = () => {\n const parts = cell.value?.split(';');\n if (parts?.[parts.length - 1].trim() === '') {\n parts.pop();\n }\n if (parts && parts.length) {\n cell.data.data = [];\n for (let part of parts) {\n (cell.data.data as KupDataNode[]).push({\n id: part,\n value: part,\n });\n }\n }\n };\n\n switch (cellType) {\n case FCellTypes.CHECKBOX:\n case FCellTypes.SWITCH:\n cell.data.checked = cell.value === '1' ? true : false;\n break;\n\n case FCellTypes.BAR:\n if (isShapeMarker(cell.value)) {\n cell.data.isCanvas = true;\n cell.data.resource = cell.value;\n } else {\n cell.data.data = getData(cell.value);\n }\n break;\n\n case FCellTypes.BUTTON:\n cell.data.label = cell.value;\n break;\n\n case FCellTypes.CHART:\n Object.assign(cell.data, {\n sizeX: '100px',\n sizeY: '100px',\n offlineMode: {\n value: cell.value,\n shape: 'pie',\n },\n });\n break;\n\n case FCellTypes.BUTTON_LIST:\n case FCellTypes.CHIP:\n case FCellTypes.MULTI_AUTOCOMPLETE:\n case FCellTypes.MULTI_COMBOBOX:\n case FCellTypes.RADIO:\n createDataset();\n break;\n\n case FCellTypes.COLOR_PICKER:\n cell.data.initialValue = cell.value;\n break;\n\n case FCellTypes.GAUGE:\n case FCellTypes.KNOB:\n case FCellTypes.PROGRESS_BAR:\n case FCellTypes.RATING:\n cell.data.value = parseInt(cell.value);\n break;\n\n case FCellTypes.ICON:\n case FCellTypes.IMAGE:\n cell.data.resource = cell.value;\n break;\n }\n}\n\nfunction cellEvent(\n e: InputEvent | CustomEvent | MouseEvent | KeyboardEvent,\n props: FCellProps,\n cellType: FCellTypes,\n cellEventName: FCellEvents\n): void {\n const cell = props.cell;\n const column = props.column;\n const comp = props.component;\n const row = props.row;\n if (cellEventName === FCellEvents.UPDATE) {\n let value = getValueFromEventTaget(e, cellType);\n switch (cellType) {\n case FCellTypes.AUTOCOMPLETE:\n case FCellTypes.COMBOBOX:\n case FCellTypes.DATE:\n case FCellTypes.TIME:\n if (cell.data) {\n cell.data['initialValue'] = value;\n }\n break;\n case FCellTypes.CHECKBOX:\n case FCellTypes.SWITCH:\n value = value === 'on' ? '0' : '1';\n if (cell.data) {\n (cell.data as FCheckboxProps).checked =\n value === '0' ? false : true;\n }\n break;\n case FCellTypes.RADIO:\n // data change handled outside this switchcase to avoid passing the index\n break;\n case FCellTypes.CHIP:\n case FCellTypes.MULTI_AUTOCOMPLETE:\n case FCellTypes.MULTI_COMBOBOX:\n value = (e as CustomEvent<KupChipChangeEventPayload>).detail\n .stringifiedValues;\n if (cell.data) {\n (cell.data as FChipsProps).data = (\n e as CustomEvent<KupChipChangeEventPayload>\n ).detail.comp.data;\n }\n break;\n }\n if (cell.obj) {\n cell.obj.k = value.toString();\n }\n cell.value = value.toString();\n cell.displayedValue = null;\n cell.displayedValue = getCellValueForDisplay(column, cell);\n }\n if (comp && (comp as KupComponent).rootElement) {\n const cellEvent = new CustomEvent<FCellEventPayload>(cellEventName, {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: {\n comp: comp,\n id: (comp as KupComponent).rootElement.id,\n cell: cell,\n column: column,\n event: e,\n row: row,\n type: cellType,\n },\n });\n (comp as KupComponent).rootElement.dispatchEvent(cellEvent);\n if (cellEventName === FCellEvents.UPDATE) {\n try {\n (comp as KupComponent).refresh();\n } catch (error) {\n dom.ketchup.debug.logMessage(\n comp,\n error,\n KupDebugCategory.ERROR\n );\n }\n }\n }\n}\n\nfunction getValueFromEventTaget(\n e: InputEvent | CustomEvent | MouseEvent | KeyboardEvent,\n cellType: FCellTypes\n): string {\n const isInputEvent = !!((e.target as HTMLElement).tagName === 'INPUT');\n let value = isInputEvent\n ? (e.target as HTMLInputElement).value\n : e.detail.value;\n\n if (cellType === FCellTypes.CHECKBOX && isInputEvent) {\n value = (e.target as HTMLInputElement).checked ? 'off' : 'on';\n }\n\n if (cellType === FCellTypes.NUMBER && isInputEvent) {\n value = dom.ketchup.math.formattedStringToNumberString(value, '');\n }\n return value;\n}\n\nfunction isAutoCentered(props: FCellProps) {\n return autoCenterComps.includes(\n (props.component as KupComponent)?.rootElement.tagName as KupTagNames\n );\n}\n\nfunction isFullWidth(props: FCellProps) {\n return fullWidthFieldsComps.includes(\n (props.component as KupComponent)?.rootElement.tagName as KupTagNames\n );\n}\n"],"version":3}
@@ -6,7 +6,7 @@ const index = require('./index-4e97f23f.js');
6
6
  const kupManager$1 = require('./kup-manager-3e7452e3.js');
7
7
  const fTextField = require('./f-text-field-a8db3416.js');
8
8
  const fTextFieldMdc = require('./f-text-field-mdc-2a3c8c01.js');
9
- const fCell = require('./f-cell-4fce3cc0.js');
9
+ const fCell = require('./f-cell-dc1c25c5.js');
10
10
  const GenericVariables = require('./GenericVariables-1d52ba57.js');
11
11
  const fImage = require('./f-image-8dbf27a2.js');
12
12
  const fButton = require('./f-button-54d0f017.js');
@@ -8,7 +8,7 @@ const kupDataTableHelper = require('./kup-data-table-helper-ecda1d0f.js');
8
8
  const fImage = require('./f-image-8dbf27a2.js');
9
9
  const fChip = require('./f-chip-cb102c29.js');
10
10
  const GenericVariables = require('./GenericVariables-1d52ba57.js');
11
- const fCell = require('./f-cell-4fce3cc0.js');
11
+ const fCell = require('./f-cell-dc1c25c5.js');
12
12
  const fPaginatorUtils = require('./f-paginator-utils-da6cd873.js');
13
13
  const fTextFieldMdc = require('./f-text-field-mdc-2a3c8c01.js');
14
14
  require('./kup-dates-3fc9697c.js');
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-4e97f23f.js');
6
6
  const kupManager = require('./kup-manager-3e7452e3.js');
7
7
  const GenericVariables = require('./GenericVariables-1d52ba57.js');
8
- const fCell = require('./f-cell-4fce3cc0.js');
8
+ const fCell = require('./f-cell-dc1c25c5.js');
9
9
  const fButton = require('./f-button-54d0f017.js');
10
10
  require('./kup-dates-3fc9697c.js');
11
11
  require('./f-checkbox-4e8f39f8.js');
@@ -49,9 +49,6 @@ const FCellOptions = (props) => {
49
49
  const mappedCell = props.cell
50
50
  ? Object.assign(Object.assign({}, props.cell), { data: setProps(props.cell, props.column), slotData: slotData(props.cell, props.column), isEditable: true }) : null;
51
51
  const mappedProps = Object.assign(Object.assign({}, props), { editable: true, cell: mappedCell, column: generateColumn(mappedCell.data), row: generateRow(mappedCell.data) });
52
- if (props.cell.shape === kupManager.FCellShapes.TEXT_FIELD) {
53
- mappedProps.cell.value = mappedProps.cell.data.value;
54
- }
55
52
  return index.h(fCell.FCell, Object.assign({}, mappedProps));
56
53
  };
57
54
  const generateColumn = (data) => {
@@ -79,15 +76,15 @@ const slotData = (cell, col) => {
79
76
  }
80
77
  if (cellType === kupManager.FCellTypes.MULTI_AUTOCOMPLETE ||
81
78
  cellType === kupManager.FCellTypes.MULTI_COMBOBOX) {
82
- return Object.assign(Object.assign({}, kupManager.CMBandACPAdapter(null, col.title, cell.options
83
- // cell,
84
- // col.name
85
- )), { showDropDownIcon: true, class: '', style: { width: '100%' }, disabled: !cell.isEditable, id: col.name });
79
+ return Object.assign(Object.assign({}, kupManager.CMBandACPAdapter(null, col.title, cell.options)), { showDropDownIcon: true, class: '', style: { width: '100%' }, disabled: !cell.isEditable, id: col.name });
86
80
  }
87
81
  return null;
88
82
  };
89
83
  const setProps = (cell, column) => {
90
- const defaultProps = Object.assign(Object.assign({}, mapData(cell, column)), { disabled: !cell.isEditable, id: column.name });
84
+ const defaultProps = {
85
+ disabled: !cell.isEditable,
86
+ id: column.name,
87
+ };
91
88
  const cellType = dom.ketchup.data.cell.getType(cell, cell.shape);
92
89
  const _a = cell.data || {}, noDataProps = __rest(_a, ["data"]);
93
90
  return cellType !== kupManager.FCellTypes.MULTI_AUTOCOMPLETE &&
@@ -109,29 +106,6 @@ const deepObjectsMerge = (target, source) => {
109
106
  }
110
107
  return target;
111
108
  };
112
- const mapData = (cell, col) => {
113
- if (!cell) {
114
- return null;
115
- }
116
- const options = cell.options;
117
- const fieldLabel = col.title;
118
- const currentValue = cell.value;
119
- const cellType = dom.ketchup.data.cell.getType(cell, cell.shape);
120
- const dataAdapterMap = new Map([
121
- [kupManager.FCellTypes.STRING, MainITXAdapter.bind(undefined)],
122
- ]);
123
- const adapter = dataAdapterMap.get(cellType);
124
- return adapter
125
- ? adapter(options, fieldLabel, currentValue, cell, col.name)
126
- : null;
127
- };
128
- const MainITXAdapter = (options, _fieldLabel, _currentValue, _cell) => {
129
- if (options === null || options === void 0 ? void 0 : options[0]) {
130
- return {
131
- value: options[0].label,
132
- };
133
- }
134
- };
135
109
 
136
110
  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%}";
137
111
  const KupCellStyle0 = kupCellCss;
@@ -1 +1 @@
1
- {"file":"kup-cell.entry.cjs.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,KAAZ,YAAY,QAKvB;AAED,IAAY,2BAKX;AALD,WAAY,2BAA2B;IACnC,qDAAsB,CAAA;IACtB,gDAAiB,CAAA;IACjB,mDAAoB,CAAA;IACpB,4CAAa,CAAA;AACjB,CAAC,EALW,2BAA2B,KAA3B,2BAA2B;;;;;;;;;;;;;ACIvC,MAAM,GAAG,GAAW,QAAQ,CAAC,eAAyB,CAAC;AA8BhD,MAAM,YAAY,GAA2C,CAChE,KAAwB;IAExB,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI;0CAEhB,KAAK,CAAC,IAAI,KACb,IAAI,EAAE,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,EACxC,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,EAC5C,UAAU,EAAE,IAAI,MAEpB,IAAI,CAAC;IAEX,MAAM,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AAI,CAAC,cAAc;oBACrC,aAAa,EAAE,QAAQ;oBACvB,GAAG,EAAE,QAAQ;iBAChB;kBACD,EAAE,IAGZV,QAAC,YAAY,qEAAK,KAAK,EAAI,EAC1B,IAAI,CAAC,UAAU,IACZA,QAACc,eAAO,IACJ,UAAU,EAAC,QAAQ,EACnB,KAAK,EAAE,uBAAA,IAAI,2BAAY,CAAC,QAAQ,CAAC,SAAS,CACtCF,6BAAkB,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":["FCellShapes","h","FCell","FCellTypes","CMBandACPAdapter","this","kupManagerInstance","FCellPadding","getProps","forceUpdate","setProps","componentWrapperId","KupDragEffect","KupLanguageGeneric","Host","FButton"],"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 FCellShapes,\n FCellTypes,\n} from '../f-cell/f-cell-declarations';\nimport { DataAdapterFn } from '../../components/kup-input-panel/kup-input-panel-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 if (props.cell.shape === FCellShapes.TEXT_FIELD) {\n mappedProps.cell.value = mappedProps.cell.data.value;\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(\n null,\n col.title,\n cell.options\n // cell,\n // col.name\n ),\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 ...mapData(cell, column),\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\nconst mapData = (cell: KupDataCellOptions, col: KupDataColumn) => {\n if (!cell) {\n return null;\n }\n\n const options = cell.options;\n const fieldLabel = col.title;\n const currentValue = cell.value;\n const cellType = dom.ketchup.data.cell.getType(cell, cell.shape);\n const dataAdapterMap = new Map<FCellTypes, DataAdapterFn>([\n [FCellTypes.STRING, MainITXAdapter.bind(this)],\n ]);\n\n const adapter = dataAdapterMap.get(cellType);\n\n return adapter\n ? adapter(options, fieldLabel, currentValue, cell, col.name)\n : null;\n};\n\nconst MainITXAdapter = (\n options: GenericObject,\n _fieldLabel: string,\n _currentValue: string,\n _cell: KupDataCellOptions\n) => {\n if (options?.[0]) {\n return {\n value: options[0].label,\n };\n }\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
+ {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AI,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":["h","FCell","FCellTypes","CMBandACPAdapter","kupManagerInstance","FCellPadding","getProps","forceUpdate","setProps","componentWrapperId","KupDragEffect","KupLanguageGeneric","Host","FButton"],"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}
@@ -8,7 +8,7 @@ const GenericVariables = require('./GenericVariables-1d52ba57.js');
8
8
  const fImage = require('./f-image-8dbf27a2.js');
9
9
  const fButton = require('./f-button-54d0f017.js');
10
10
  const fButtonDeclarations = require('./f-button-declarations-76ef9f87.js');
11
- const fCell = require('./f-cell-4fce3cc0.js');
11
+ const fCell = require('./f-cell-dc1c25c5.js');
12
12
  const component = require('./component-cb3b32f5.js');
13
13
  require('./kup-dates-3fc9697c.js');
14
14
  require('./f-checkbox-4e8f39f8.js');
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-4e97f23f.js');
6
6
  const fButton = require('./f-button-54d0f017.js');
7
- const fCell = require('./f-cell-4fce3cc0.js');
7
+ const fCell = require('./f-cell-dc1c25c5.js');
8
8
  const kupManager = require('./kup-manager-3e7452e3.js');
9
9
  const fTextFieldMdc = require('./f-text-field-mdc-2a3c8c01.js');
10
10
  const GenericVariables = require('./GenericVariables-1d52ba57.js');
@@ -42,6 +42,9 @@ export const FCell = (props, children) => {
42
42
  isEditable = isEditable && props.editable;
43
43
  if (cell.options) {
44
44
  cell.data = (_a = mapData(cell, column)) !== null && _a !== void 0 ? _a : cell.data;
45
+ if (props.cell.shape === FCellShapes.TEXT_FIELD) {
46
+ cell.value = cell.data.value;
47
+ }
45
48
  }
46
49
  const valueToDisplay = props.previousValue !== cell.value ? cell.value : '';
47
50
  const cellType = dom.ketchup.data.cell.getType(cell, shape);
@@ -144,15 +147,42 @@ const mapData = (cell, col) => {
144
147
  const cellType = dom.ketchup.data.cell.getType(cell, cell.shape);
145
148
  const dataAdapterMap = new Map([
146
149
  [FCellTypes.BUTTON_LIST, MainBTNAdapter.bind(this)],
150
+ [FCellTypes.STRING, MainITXAdapter.bind(this)],
147
151
  [FCellTypes.RADIO, MainRADAdapter.bind(this)],
148
152
  [FCellTypes.AUTOCOMPLETE, MainCMBandACPAdapter.bind(this)],
149
153
  [FCellTypes.COMBOBOX, MainCMBandACPAdapter.bind(this)],
154
+ [FCellTypes.CHECKBOX, MainCHKAdapter.bind(this)],
155
+ [FCellTypes.OBJECT, MainObjectAdapter.bind(this)],
150
156
  ]);
151
157
  const adapter = dataAdapterMap.get(cellType);
152
158
  return adapter
153
159
  ? adapter(options, fieldLabel, currentValue, cell, col.name)
154
160
  : null;
155
161
  };
162
+ const MainObjectAdapter = (options, _fieldLabel, currentValue, _cell, _id) => {
163
+ if (options[0]) {
164
+ return {
165
+ initialValue: currentValue,
166
+ label: options[0].label,
167
+ value: options[0].value,
168
+ };
169
+ }
170
+ };
171
+ const MainCHKAdapter = (options, _fieldLabel, _currentValue) => {
172
+ if (options === null || options === void 0 ? void 0 : options[0]) {
173
+ return {
174
+ checked: options[0].checked,
175
+ label: options[0].label,
176
+ };
177
+ }
178
+ };
179
+ const MainITXAdapter = (options, _fieldLabel, _currentValue, _cell) => {
180
+ if (options === null || options === void 0 ? void 0 : options[0]) {
181
+ return {
182
+ value: options[0].label,
183
+ };
184
+ }
185
+ };
156
186
  const MainRADAdapter = (options, _fieldLabel, currentValue) => {
157
187
  return RADAdapter(currentValue, options);
158
188
  };