@sme.up/ketchup 11.0.0-SNAPSHOT-20241014112852 → 11.0.0-SNAPSHOT-20241015124120

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 (33) hide show
  1. package/dist/cjs/kup-autocomplete_27.cjs.entry.js +7 -7
  2. package/dist/cjs/kup-autocomplete_27.cjs.entry.js.map +1 -1
  3. package/dist/cjs/kup-input-panel.cjs.entry.js +1 -1
  4. package/dist/cjs/kup-input-panel.cjs.entry.js.map +1 -1
  5. package/dist/cjs/kup-typography.cjs.entry.js +8 -8
  6. package/dist/cjs/kup-typography.cjs.entry.js.map +1 -1
  7. package/dist/collection/components/kup-input-panel/kup-input-panel.js +1 -1
  8. package/dist/collection/components/kup-input-panel/kup-input-panel.js.map +1 -1
  9. package/dist/collection/components/kup-tab-bar/kup-tab-bar.js +7 -7
  10. package/dist/collection/components/kup-tab-bar/kup-tab-bar.js.map +1 -1
  11. package/dist/collection/components/kup-typography/kup-typography.js +8 -8
  12. package/dist/collection/components/kup-typography/kup-typography.js.map +1 -1
  13. package/dist/components/kup-autocomplete2.js +7 -7
  14. package/dist/components/kup-autocomplete2.js.map +1 -1
  15. package/dist/components/kup-input-panel.js +1 -1
  16. package/dist/components/kup-input-panel.js.map +1 -1
  17. package/dist/components/kup-typography.js +8 -8
  18. package/dist/components/kup-typography.js.map +1 -1
  19. package/dist/esm/kup-autocomplete_27.entry.js +7 -7
  20. package/dist/esm/kup-autocomplete_27.entry.js.map +1 -1
  21. package/dist/esm/kup-input-panel.entry.js +1 -1
  22. package/dist/esm/kup-input-panel.entry.js.map +1 -1
  23. package/dist/esm/kup-typography.entry.js +8 -8
  24. package/dist/esm/kup-typography.entry.js.map +1 -1
  25. package/dist/ketchup/ketchup.esm.js +1 -1
  26. package/dist/ketchup/{p-312debf2.entry.js → p-248c1472.entry.js} +2 -2
  27. package/dist/ketchup/{p-312debf2.entry.js.map → p-248c1472.entry.js.map} +1 -1
  28. package/dist/ketchup/{p-a7a86f7d.entry.js → p-b8622242.entry.js} +2 -2
  29. package/dist/ketchup/{p-a7a86f7d.entry.js.map → p-b8622242.entry.js.map} +1 -1
  30. package/dist/ketchup/{p-6ee80189.entry.js → p-d5fb7b8a.entry.js} +2 -2
  31. package/dist/ketchup/p-d5fb7b8a.entry.js.map +1 -0
  32. package/package.json +1 -1
  33. package/dist/ketchup/p-6ee80189.entry.js.map +0 -1
@@ -344,13 +344,13 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
344
344
  'input-panel__section': !section.horizontal,
345
345
  'input-panel__horizontal-section': section.horizontal,
346
346
  };
347
- const sectionStyle = Object.assign(Object.assign({}, styleObj), { gap: +section.gap > 0 ? `${section.gap}rem` : '', 'grid-template-columns': +section.gridCols > 0 ? `repeat(${section.gridCols}, 1fr)` : '', 'grid-template-rows': +section.gridRows > 0 ? `repeat(${section.gridRows}, 1fr)` : '' });
348
347
  if ((_d = (_c = cells.row) === null || _c === void 0 ? void 0 : _c.layout) === null || _d === void 0 ? void 0 : _d.horizontal) {
349
348
  styleObj.maxWidth = section.dim;
350
349
  }
351
350
  else {
352
351
  styleObj.maxHeight = section.dim;
353
352
  }
353
+ const sectionStyle = Object.assign(Object.assign({}, styleObj), { gap: +section.gap > 0 ? `${section.gap}rem` : '', 'grid-template-columns': +section.gridCols > 0 ? `repeat(${section.gridCols}, 1fr)` : '', 'grid-template-rows': +section.gridRows > 0 ? `repeat(${section.gridRows}, 1fr)` : '' });
354
354
  const sectionContent = (index.h("div", { class: classObj, style: sectionStyle }, content));
355
355
  return section.title && !customLabelRender ? (index.h("div", { class: { 'input-panel__section_label_container': true } }, index.h("h3", null, section.title), sectionContent)) : (sectionContent);
356
356
  }, _KupInputPanel_renderAbsoluteSection = function _KupInputPanel_renderAbsoluteSection(cells, section) {
@@ -1 +1 @@
1
- {"file":"kup-input-panel.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;AA4DA,IAAY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AAI,wEAAyB,MAA7B,IAAI,EAA0B,OAAO,EAAE,YAAY,CAAC,mCAAI,EAAE,CAAC;QAC/D,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;KACzB,CAAC,CAAC;AACP,CAAC;;;;;","names":["kupManagerInstance","FCellTypes","FCellShapes","getProps","forceUpdate","setProps","FTextFieldMDC","h","KupLanguageGeneric","Host","componentWrapperId","FButton","FCell","CHIAdapter","CMBandACPAdapter","CHKAdapter","RADAdapter","SWTAdapter","KupDebugCategory"],"sources":["src/components/kup-input-panel/kup-input-panel-declarations.ts","src/components/kup-input-panel/kup-input-panel-utils.ts","src/components/kup-input-panel/kup-input-panel.scss?tag=kup-input-panel&encapsulation=shadow","src/components/kup-input-panel/kup-input-panel.tsx"],"sourcesContent":["import { GenericObject } from '../../components';\nimport {\n KupDataCell,\n KupDataColumn,\n} from '../../managers/kup-data/kup-data-declarations';\n\nexport interface KupInputPanelSubmit {\n value: KupInputPanelSubmitValue;\n cell?: string;\n}\nexport interface KupInputPanelSubmitValue {\n after: KupInputPanelData;\n before: KupInputPanelData;\n}\n\nexport interface KupInputPanelData {\n columns?: KupDataColumn[];\n rows?: KupInputPanelRow[];\n actions?: KupInputPanelAction[];\n}\n\nexport interface KupInputPanelAction {\n type?: string;\n fun?: string;\n}\n\nexport interface KupInputPanelColumn {\n name: string;\n title: string;\n visible?: boolean;\n}\n\nexport interface KupInputPanelRow {\n cells?: KupInputPanelRowCells;\n layout?: KupInputPanelLayout;\n}\n\nexport interface KupInputPanelRowCells {\n [key: string]: KupInputPanelCell;\n}\n\nexport interface KupInputPanelCell extends KupDataCell {\n options?: GenericObject | GenericObject[];\n editable?: boolean;\n mandatory?: boolean;\n fun?: string;\n}\n\nexport interface KupInputPanelCellOptions {\n id: string;\n label: string;\n}\n\nexport interface KupInputPanelLayout {\n horizontal?: boolean;\n absolute?: boolean;\n sections?: KupInputPanelLayoutSection[];\n sectionsType?: KupInputPanelLayoutSectionType;\n}\n\nexport enum KupInputPanelLayoutSectionType {\n TAB = 'tab',\n}\n\nexport interface KupInputPanelLayoutSection {\n id?: string;\n title?: string;\n icon?: string;\n content?: KupInputPanelLayoutField[];\n sections?: KupInputPanelLayoutSection[];\n dim?: string;\n horizontal?: boolean;\n gridCols?: number;\n gridRows?: number;\n // Gap is in rem\n gap?: number;\n sectionsType?: KupInputPanelLayoutSectionType;\n // absolute Attributes\n absoluteColumn?: number;\n absoluteWidth?: number;\n absoluteRow?: number;\n absoluteHeight?: number;\n}\n\nexport interface KupInputPanelLayoutField {\n id: string;\n // Span is referred to start\n colSpan?: number;\n colStart?: number;\n colEnd?: number;\n // Span is referred to start\n rowSpan?: number;\n rowStart?: number;\n rowEnd?: number;\n // absolute Attributes\n absoluteColumn?: number;\n absoluteRow?: number;\n absoluteLength?: number;\n}\n\nexport type DataAdapterFn = (\n options: GenericObject,\n fieldLabel: string,\n currentValue: string,\n cell?: KupInputPanelCell,\n id?: string\n) => Object;\n\nexport type InputPanelCells = {\n cells: { cell: KupDataCell; column: KupDataColumn }[];\n row?: KupInputPanelRow;\n};\n\nexport type InputPanelEvent = {\n state: { cell: KupDataCell; column: KupDataColumn }[];\n data: {\n field: string;\n value: number | string | object;\n };\n};\n\nexport type InputPanelOptionsHandler = (\n fun: string,\n inputValue: string,\n currentState: KupInputPanelData,\n cellId: string\n) => Promise<GenericObject>;\n\nexport type InputPanelButtonClickHandler = (event: {\n fun: string;\n cellId: string;\n currentState: KupInputPanelData;\n}) => void;\n\nexport enum KupInputPanelProps {\n customStyle = 'Custom style of the component.',\n data = 'Actual data of the input panel.',\n hiddenSubmitButton = 'Creates a hidden submit button in order to submit the form with enter.',\n submitCb = 'Sets the callback function on submit form',\n optionsHandler = 'Sets the callback function to recieve options',\n}\n","const CHAR_WIDTH = 12;\nconst ROW_HEIGHT = 22;\n\nexport const getAbsoluteWidth = (length: number) => {\n if (length == 0) {\n return CHAR_WIDTH / 2;\n }\n\n if (!length) {\n return null;\n }\n\n if (length === 1) {\n return 1.5 * CHAR_WIDTH;\n }\n\n return length * CHAR_WIDTH;\n};\n\nexport const getAbsoluteHeight = (height: number) => {\n if (!height) {\n return null;\n }\n\n return height * ROW_HEIGHT;\n};\n\nexport const getAbsoluteTop = (row: number) => {\n if (!row) {\n return null;\n }\n\n return (row - 1) * ROW_HEIGHT;\n};\n\nexport const getAbsoluteLeft = (col: number) => {\n if (!col) {\n return null;\n }\n\n return col * CHAR_WIDTH;\n};\n","/**\n* @prop --kup-input-panel-background-color: Sets background of the component.\n* @prop --kup-input-panel-color: Sets text color of the component.\n* @prop --kup-input-panel-font-family: Sets font family of the component.\n* @prop --kup-input-panel-font-size: Sets font size of the component.\n* @prop --kup-input-panel-label-alignment: Sets the text alignment of labels.\n* @prop --kup-input-panel-label-width: Sets the width of labels.\n* @prop --kup-input-panel-padding: Sets the padding of the input panel.\n*/\n\n:host {\n --kup_input_panel_background_color: var(\n --kup-input-panel-background-color,\n var(--kup-layer-0)\n );\n --kup_input_panel_color: var(\n --kup-input-panel-color,\n var(--kup-text-secondary)\n );\n --kup_input_panel_font_family: var(\n --kup-input-panel-font-family,\n var(--kup-font-family)\n );\n --kup_input_panel_font_size: var(\n --kup-input-panel-font-size,\n var(--kup-font-size)\n );\n --kup_input_panel_label_alignment: var(--kup-input-panel-label-alignment);\n --kup_input_panel_label_width: var(--kup-input-panel-label-width);\n --kup_input_panel_padding: var(--kup-input-panel-padding, 1em 0);\n\n .input-panel {\n background: var(--kup_input_panel_background_color);\n color: var(--kup_input_panel_color);\n display: flex;\n flex-grow: 1;\n overflow: auto;\n padding: var(--kup_input_panel_padding);\n position: relative;\n gap: 2rem;\n\n &--column {\n flex-direction: column;\n }\n\n &__section_label_container {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n }\n\n &__section {\n display: grid;\n\n .f-cell__content {\n > * {\n width: 100%;\n }\n }\n }\n\n &__horizontal-section {\n display: inline-grid;\n }\n\n .f-cell .f-checkbox .checkbox .checkbox__native-control {\n height: 40px;\n width: 40px;\n }\n\n &__label_container {\n display: flex;\n flex-direction: column;\n justify-content: center;\n\n > .f-cell {\n flex: 1;\n }\n }\n\n &__tabs_container {\n display: flex;\n flex-direction: column;\n justify-content: center;\n gap: 2rem;\n }\n\n .f-cell.number-cell {\n .f-cell__content {\n --kup-textfield-font-family: var(--kup_cell_font_family);\n\n font-family: var(--kup_cell_font_family);\n }\n }\n\n .input-panel-label {\n display: flex;\n width: 100%;\n height: 100%;\n align-items: center;\n justify-content: center;\n }\n\n &--absolute {\n height: 87ch;\n justify-content: flex-end;\n\n .input-panel-label {\n justify-content: start;\n }\n\n .mdc-text-field {\n height: unset !important;\n }\n }\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Method,\n Prop,\n State,\n VNode,\n Watch,\n forceUpdate,\n h,\n} from '@stencil/core';\nimport {\n KupAutocompleteEventPayload,\n KupComboboxIconClickEventPayload,\n KupDataCell,\n KupDataTableDataset,\n KupDataTableRow,\n KupEditorEventPayload,\n KupTabBarEventPayload,\n KupTabBarNode,\n} from '../../components';\nimport { FButton } from '../../f-components/f-button/f-button';\nimport { FCell } from '../../f-components/f-cell/f-cell';\nimport {\n FCellEventPayload,\n FCellEvents,\n FCellProps,\n FCellShapes,\n FCellTypes,\n} from '../../f-components/f-cell/f-cell-declarations';\nimport { FTextFieldMDC } from '../../f-components/f-text-field/f-text-field-mdc';\nimport { KupLanguageGeneric } from '../../managers/kup-language/kup-language-declarations';\nimport {\n KupManager,\n kupManagerInstance,\n} from '../../managers/kup-manager/kup-manager';\nimport { KupDom } from '../../managers/kup-manager/kup-manager-declarations';\nimport {\n GenericObject,\n KupComponent,\n KupEventPayload,\n} from '../../types/GenericTypes';\nimport { getProps, setProps } from '../../utils/utils';\nimport { componentWrapperId } from '../../variables/GenericVariables';\nimport {\n DataAdapterFn,\n InputPanelButtonClickHandler,\n InputPanelCells,\n InputPanelOptionsHandler,\n KupInputPanelCell,\n KupInputPanelColumn,\n KupInputPanelData,\n KupInputPanelLayout,\n KupInputPanelLayoutField,\n KupInputPanelLayoutSection,\n KupInputPanelLayoutSectionType,\n KupInputPanelProps,\n KupInputPanelRow,\n KupInputPanelSubmit,\n} from './kup-input-panel-declarations';\nimport { KupDebugCategory } from '../../managers/kup-debug/kup-debug-declarations';\nimport {\n getAbsoluteHeight,\n getAbsoluteLeft,\n getAbsoluteTop,\n getAbsoluteWidth,\n} from './kup-input-panel-utils';\nimport {\n CHIAdapter,\n CHKAdapter,\n CMBandACPAdapter,\n RADAdapter,\n SWTAdapter,\n} from '../../utils/cell-utils';\n\nconst dom: KupDom = document.documentElement as KupDom;\n@Component({\n tag: 'kup-input-panel',\n styleUrl: 'kup-input-panel.scss',\n shadow: true,\n})\nexport class KupInputPanel {\n /**\n * References the root HTML element of the component (<kup-form>).\n */\n @Element() rootElement: HTMLElement;\n\n //#region PROPS\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 /**\n * Actual data of the form.\n * @default null\n */\n @Prop() data: KupInputPanelData = null;\n\n /**\n * Creates a hidden submit button in order to submit the form with enter.\n * @default false\n */\n @Prop() hiddenSubmitButton: boolean = false;\n\n /**\n * Sets the callback function on submit form\n * @default null\n */\n @Prop() submitCb: (e: KupInputPanelSubmit) => unknown = null;\n\n /**\n * Sets the callback function on loading options via FUN\n * @default null\n */\n @Prop() optionsHandler: InputPanelOptionsHandler = null;\n\n /**\n * Sets the handler to use when click on custom buttons\n * @default null\n */\n @Prop() customButtonClickHandler?: InputPanelButtonClickHandler = null;\n //#endregion\n\n //#region STATES\n /*-------------------------------------------------*/\n /* S t a t e s */\n /*-------------------------------------------------*/\n\n /**\n * Values to send as props to FCell\n * @default []\n */\n @State() private inputPanelCells: InputPanelCells[] = [];\n\n /**\n * Id of selected tab if exists\n * @default null\n */\n @State() private tabSelected: string = null;\n //#endregion\n\n //#region VARIABLES\n /*-------------------------------------------------*/\n /* I n t e r n a l V a r i a b l e s */\n /*-------------------------------------------------*/\n\n #kupManager: KupManager = kupManagerInstance();\n\n #optionsAdapterMap = new Map<\n string,\n (options: any, currentValue: string) => GenericObject[]\n >([\n ['SmeupTreeNode', this.#treeOptionsNodeAdapter.bind(this)],\n ['SmeupDataTree', this.#dataTreeOptionsChildrenAdapter.bind(this)],\n ['SmeupTable', this.#tableOptionsAdapter.bind(this)],\n ['SmeupDataTable', this.#tableOptionsAdapter.bind(this)],\n ]);\n\n #originalData: KupInputPanelData = null;\n\n #eventNames = new Map<FCellTypes, string[]>([\n [\n FCellTypes.AUTOCOMPLETE,\n ['kup-autocomplete-input', 'kup-autocomplete-iconclick'],\n ],\n [\n FCellTypes.MULTI_AUTOCOMPLETE,\n ['kup-autocomplete-input', 'kup-autocomplete-iconclick'],\n ],\n [FCellTypes.COMBOBOX, ['kup-combobox-iconclick']],\n [FCellTypes.MULTI_COMBOBOX, ['kup-combobox-iconclick']],\n ]);\n #listeners: { event: string; handler: (e) => void }[] = [];\n #cellTypeComponents: Map<FCellTypes, string> = new Map<FCellTypes, string>([\n [FCellTypes.DATE, 'kup-date-picker'],\n [FCellTypes.TIME, 'kup-time-picker'],\n ]);\n #cellCustomRender: Map<\n FCellShapes,\n (cell: KupDataCell, cellId: string) => any\n > = new Map<FCellShapes, (cell: KupDataCell, cellId: string) => any>([\n [FCellShapes.BUTTON_LIST, this.#renderButton.bind(this)],\n [FCellShapes.EDITOR, this.#renderEditor.bind(this)],\n [FCellShapes.LABEL, this.#renderLabel.bind(this)],\n [FCellShapes.TABLE, this.#renderDataTable.bind(this)],\n ]);\n #sectionRenderMap: Map<\n KupInputPanelLayoutSectionType,\n (cells: InputPanelCells, sections: KupInputPanelLayoutSection[]) => any\n > = new Map<\n KupInputPanelLayoutSectionType,\n (cells: InputPanelCells, sections: KupInputPanelLayoutSection[]) => any\n >([\n [KupInputPanelLayoutSectionType.TAB, this.#renderSectionTab.bind(this)],\n ]);\n #keysShortcut: string[] = [];\n //#endregion\n\n //#region WATCHERS\n /*-------------------------------------------------*/\n /* W a t c h e r s */\n /*-------------------------------------------------*/\n\n @Watch('data')\n onDataChanged() {\n this.#originalData = structuredClone(this.data);\n if (this.#listeners.length) {\n this.#listeners.map(({ event, handler }) => {\n this.rootElement.removeEventListener(event, handler);\n });\n this.#listeners = [];\n }\n\n if (this.#keysShortcut.length) {\n this.#keysShortcut.map((key) => {\n this.#kupManager.keysBinding.unregister(key);\n });\n this.#keysShortcut = [];\n }\n\n this.#mapCells(this.data);\n }\n //#endregion\n\n //#region PUBLIC METHODS\n /*-------------------------------------------------*/\n /* P u b l i c M e t h o d s */\n /*-------------------------------------------------*/\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, KupInputPanelProps, 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 * 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, KupInputPanelProps, props);\n }\n //#endregion\n\n //#region EVENTS\n /*-------------------------------------------------*/\n /* Events */\n /*-------------------------------------------------*/\n\n /**\n * When component load is complete\n */\n @Event({\n eventName: 'kup-input-panel-ready',\n composed: true,\n cancelable: false,\n bubbles: true,\n })\n kupReady: EventEmitter<KupEventPayload>;\n //#endregion\n\n //#region PRIVATE METHODS\n /*-------------------------------------------------*/\n /* P r i v a t e M e t h o d s */\n /*-------------------------------------------------*/\n\n #renderRow(inputPanelCell: InputPanelCells) {\n const layout = inputPanelCell.row.layout;\n\n const horizontal = layout?.horizontal || false;\n\n let rowContent: VNode[];\n\n if (!layout?.sections?.length) {\n rowContent = inputPanelCell.cells.map((cell) =>\n this.#renderCell(cell.cell, inputPanelCell.row, cell.column)\n );\n } else {\n rowContent = layout.absolute\n ? this.#renderAbsoluteLayout(inputPanelCell, layout)\n : this.#renderGridLayout(inputPanelCell, layout);\n }\n\n const classObj = {\n 'input-panel': true,\n 'input-panel--column': !horizontal,\n 'input-panel--absolute': layout?.absolute,\n };\n\n // We create a form for each row in data\n return (\n <form\n class={classObj}\n name={this.rootElement.id}\n onSubmit={(e: SubmitEvent) => {\n e.preventDefault();\n this.submitCb({\n value: {\n before: { ...this.#originalData },\n after: this.#reverseMapCells(),\n },\n });\n }}\n >\n {rowContent}\n {!this.hiddenSubmitButton ? (\n <FButton\n buttonType=\"submit\"\n label={this.#kupManager.language.translate(\n KupLanguageGeneric.CONFIRM\n )}\n wrapperClass=\"form__submit\"\n ></FButton>\n ) : null}\n </form>\n );\n }\n\n #renderCell(\n cell: KupDataCell,\n row: KupInputPanelRow,\n column: KupInputPanelColumn\n ) {\n if (!cell) {\n return;\n }\n\n const customRender = this.#cellCustomRender.get(cell.shape);\n\n if (customRender !== undefined) {\n return customRender(cell, column.name);\n }\n\n const cellProps: FCellProps = {\n cell,\n column,\n row,\n component: this,\n editable: true,\n renderKup: true,\n setSizes: true,\n };\n\n const label = this.#getLabelComponent(cell, column.title);\n\n if (label) {\n return (\n <div class={{ 'input-panel__label_container': true }}>\n {label}\n <FCell {...cellProps} />\n </div>\n );\n }\n\n return <FCell {...cellProps} />;\n }\n\n #renderButton(cell: KupDataCell, cellId: string) {\n return (\n <FButton\n icon={cell.icon}\n id={cellId}\n {...cell.data}\n wrapperClass=\"form__submit\"\n ></FButton>\n );\n }\n\n #renderEditor(cell: KupDataCell, cellId: string) {\n const event = 'kup-editor-save';\n const handler = (e: CustomEvent<KupEditorEventPayload>) => {\n const edtCell: KupDataCell =\n this.inputPanelCells.reduce<KupDataCell>((cell, { cells }) => {\n if (!cell) {\n return cells.find(\n ({ column }) => column.name === cellId\n ).cell;\n }\n return cell;\n }, null);\n edtCell.value = e.detail.htmlValue.replace(/\\n/g, '<br>');\n };\n\n this.rootElement.addEventListener(event, handler);\n\n this.#listeners.push({\n event,\n handler,\n });\n\n return (\n <kup-editor\n {...cell.data}\n id={cellId}\n isReadOnly={!cell.isEditable}\n showToolbar={true}\n ></kup-editor>\n );\n }\n\n #renderDataTable(cell: KupDataCell, cellId: string) {\n return (\n <kup-data-table\n id={cellId}\n editableData={true}\n showGroups={true}\n showFilters={true}\n showFooter={true}\n {...cell.data}\n ></kup-data-table>\n );\n }\n\n #renderLabel(cell: KupDataCell, cellId: string) {\n return (\n <span class=\"input-panel-label\" id={cellId}>\n {cell.value}\n </span>\n );\n }\n\n #getLabelComponent(cell: KupDataCell, label: string) {\n if (!label) {\n return null;\n }\n\n const cellType = dom.ketchup.data.cell.getType(cell, cell.shape);\n\n if (cellType === FCellTypes.RADIO) {\n return <span>{label}</span>;\n }\n\n return null;\n }\n\n #renderGridLayout(\n inputPanelCell: InputPanelCells,\n layout: KupInputPanelLayout\n ) {\n const sectionRender = this.#sectionRenderMap.get(layout.sectionsType);\n\n return sectionRender\n ? sectionRender(inputPanelCell, layout.sections)\n : layout.sections.map((section) =>\n this.#renderSection(inputPanelCell, section)\n );\n }\n\n #renderAbsoluteLayout(\n inputPanelCell: InputPanelCells,\n layout: KupInputPanelLayout\n ) {\n return layout.sections.map((section) =>\n this.#renderAbsoluteSection(inputPanelCell, section)\n );\n }\n\n #renderSection(\n cells: InputPanelCells,\n section: KupInputPanelLayoutSection,\n customLabelRender: boolean = false,\n styleObj: GenericObject = {}\n ) {\n let content = [];\n\n if (section.sections?.length) {\n content = section.sections.map((innerSection) =>\n this.#renderSection(cells, innerSection)\n );\n } else if (section.content?.length) {\n content = section.content.map((field) =>\n this.#renderField(cells, field)\n );\n }\n\n const classObj = {\n 'input-panel__section': !section.horizontal,\n 'input-panel__horizontal-section': section.horizontal,\n };\n\n const sectionStyle = {\n ...styleObj,\n gap: +section.gap > 0 ? `${section.gap}rem` : '',\n 'grid-template-columns':\n +section.gridCols > 0 ? `repeat(${section.gridCols}, 1fr)` : '',\n 'grid-template-rows':\n +section.gridRows > 0 ? `repeat(${section.gridRows}, 1fr)` : '',\n };\n\n if (cells.row?.layout?.horizontal) {\n styleObj.maxWidth = section.dim;\n } else {\n styleObj.maxHeight = section.dim;\n }\n\n const sectionContent = (\n <div class={classObj} style={sectionStyle}>\n {content}\n </div>\n );\n\n return section.title && !customLabelRender ? (\n <div class={{ 'input-panel__section_label_container': true }}>\n <h3>{section.title}</h3>\n {sectionContent}\n </div>\n ) : (\n sectionContent\n );\n }\n\n #renderAbsoluteSection(\n cells: InputPanelCells,\n section: KupInputPanelLayoutSection\n ) {\n let content = [];\n\n if (section.sections?.length) {\n content = section.sections.map((innerSection) =>\n this.#renderAbsoluteSection(cells, innerSection)\n );\n } else if (section.content?.length) {\n content = section.content.map((field) =>\n this.#renderAbsoluteField(cells, field)\n );\n }\n\n const width = `${getAbsoluteWidth(section.absoluteWidth)}px`;\n const height = `${getAbsoluteHeight(section.absoluteHeight)}px`;\n const top = `${getAbsoluteTop(section.absoluteRow)}px`;\n const left = `${getAbsoluteLeft(section.absoluteColumn)}px`;\n\n const sectionStyle = {\n position: 'absolute',\n width,\n 'min-width': width,\n 'max-width': width,\n height,\n 'min-height': height,\n 'max-height': height,\n top,\n left,\n overflow: 'auto',\n };\n\n return <div style={sectionStyle}>{content}</div>;\n }\n\n #renderSectionTab(\n cells: InputPanelCells,\n sections: KupInputPanelLayoutSection[]\n ) {\n if (!this.tabSelected) {\n this.tabSelected = sections[0].id || '0';\n }\n\n const tabNodes: KupTabBarNode[] = sections.map((section, i) => ({\n active: (section.id || `${i}`) === this.tabSelected,\n value: section.title,\n icon: section.icon,\n id: section.id || `${i}`,\n }));\n\n const sectionContent = sections.map((section, i) => {\n const sectionId = section.id || `${i}`;\n return this.#renderSection(cells, section, true, {\n display: this.tabSelected !== sectionId ? 'none' : 'grid',\n });\n });\n\n const tabCustomStyle =\n '.tab-bar .tab-scroller .tab .tab__content { justify-content: flex-start; }';\n\n if (!this.#listeners.map((l) => l.event).includes('kup-tabbar-click')) {\n const event = 'kup-tabbar-click';\n const handler = (e: CustomEvent<KupTabBarEventPayload>) => {\n this.tabSelected = e.detail.node.id;\n };\n\n this.rootElement.addEventListener(event, handler);\n this.#listeners.push({\n event,\n handler,\n });\n }\n\n return (\n <div class={{ 'input-panel__tabs_container': true }}>\n <kup-tab-bar\n data={tabNodes}\n customStyle={tabCustomStyle}\n ></kup-tab-bar>\n {sectionContent}\n </div>\n );\n }\n\n #renderField(cells: InputPanelCells, field: KupInputPanelLayoutField) {\n const fieldCell = cells.cells.find(\n (cell) => cell.column.name === field.id\n );\n\n const colSpan =\n +field.colSpan > 0\n ? field.colSpan\n : !(+field.colSpan > 0) && !(+field.colStart > 0)\n ? 1\n : null;\n\n const colStart = colSpan ? `span ${colSpan}` : `${field.colStart}`;\n\n const colEnd = +field.colEnd > 0 ? `${field.colEnd}` : '';\n\n const rowSpan =\n +field.rowSpan > 0\n ? field.rowSpan\n : !(+field.rowSpan > 0) && !(+field.rowStart > 0)\n ? 1\n : null;\n\n const rowStart = rowSpan ? `span ${rowSpan}` : `${field.rowStart}`;\n\n const rowEnd = +field.rowEnd > 0 ? `${field.rowEnd}` : '';\n\n const styleObj = {\n 'grid-column-start': colStart,\n 'grid-column-end': colEnd,\n 'grid-row-start': rowStart,\n 'grid-row-end': rowEnd,\n };\n\n if (!fieldCell || !fieldCell.cell) {\n return;\n }\n\n return (\n <div style={styleObj}>\n {this.#renderCell(fieldCell.cell, cells.row, fieldCell.column)}\n </div>\n );\n }\n\n #renderAbsoluteField(\n cells: InputPanelCells,\n field: KupInputPanelLayoutField\n ) {\n const fieldCell = cells.cells.find(\n (cell) => cell.column.name === field.id\n );\n if (!fieldCell || !fieldCell.cell) {\n return;\n }\n\n let length: number;\n if (fieldCell.cell.shape == FCellShapes.DATE) {\n length = field.absoluteLength > 8 ? field.absoluteLength : 8;\n } else {\n length = field.absoluteLength;\n }\n\n const width = `${getAbsoluteWidth(length)}px`;\n const height = `${getAbsoluteHeight(1)}px`;\n const top = `${getAbsoluteTop(field.absoluteRow)}px`;\n const left = `${getAbsoluteLeft(field.absoluteColumn)}px`;\n\n const styleObj = {\n position: 'absolute',\n width,\n 'min-width': width,\n 'max-width': width,\n height,\n 'min-height': height,\n 'max-height': height,\n top,\n left,\n overflow: 'auto',\n };\n\n const cell = {\n ...fieldCell.cell,\n data: {\n ...fieldCell.cell.data,\n customStyle:\n (fieldCell.cell.data.customStyle || '') +\n '.mdc-text-field {height: unset !important;}',\n },\n };\n\n return (\n <div style={styleObj}>\n {this.#renderCell(cell, cells.row, fieldCell.column)}\n </div>\n );\n }\n\n #mapCells(data: KupInputPanelData) {\n const inpuPanelCells = data?.rows?.length\n ? data.rows.reduce((inpuPanelCells, row) => {\n const cells = data.columns\n .filter((column) => column.visible)\n .map((column) => {\n const cell = structuredClone(row.cells[column.name]);\n const mappedCell = cell\n ? {\n ...cell,\n data: this.#setProps(cell, column),\n slotData: this.#slotData(cell, column),\n isEditable: true,\n }\n : null;\n return { column, cell: mappedCell };\n });\n return [...inpuPanelCells, { cells, row }];\n }, [])\n : [];\n\n inpuPanelCells.map(({ cells }: InputPanelCells) =>\n cells.map(({ cell, column }) => {\n const cellType = dom.ketchup.data.cell.getType(\n cell,\n cell.shape\n );\n const componentQuery = this.#cellTypeComponents.get(cellType);\n if (!componentQuery) {\n return;\n }\n\n const el: any = this.rootElement.shadowRoot.querySelector(\n `${componentQuery}[id=${column.name}]`\n );\n el?.setValue(cell.value);\n })\n );\n\n this.inputPanelCells = inpuPanelCells;\n }\n\n #setProps(cell: KupInputPanelCell, column: KupInputPanelColumn) {\n const defaultProps = {\n ...this.#mapData(cell, column),\n disabled: !cell.editable,\n id: column.name,\n };\n const cellType = dom.ketchup.data.cell.getType(cell, cell.shape);\n const { data, ...noDataProps } = cell.data || {};\n\n return cellType !== FCellTypes.MULTI_AUTOCOMPLETE &&\n cellType !== FCellTypes.MULTI_COMBOBOX\n ? this.#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\n #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] = this.#deepObjectsMerge(target[key], source[key]);\n } else {\n target[key] = source[key];\n }\n }\n return target;\n }\n\n #reverseMapCells(): KupInputPanelData {\n return this.inputPanelCells.reduce(\n (data, curr) => {\n const updatedCells = Object.keys(curr.row.cells).reduce(\n (cells, key) => {\n const cellState = curr.cells.find(\n (c) => c.column.name === key\n )?.cell;\n\n let value: any = cellState?.value;\n\n if (cellState?.shape === FCellShapes.TABLE) {\n value = JSON.stringify(\n this.#getTableUpdatedCell(\n cellState.data.data,\n key\n )\n );\n }\n\n return {\n ...cells,\n [key]: {\n ...curr.row.cells[key],\n value,\n obj: cellState?.obj,\n },\n };\n },\n {}\n );\n\n return {\n columns: [\n ...data.columns,\n ...curr.cells.map((cell) => cell.column),\n ],\n rows: [\n ...data.rows,\n {\n cells: updatedCells,\n layout: curr.row.layout,\n },\n ],\n };\n },\n {\n columns: [],\n rows: [],\n }\n );\n }\n\n #mapData(cell: KupInputPanelCell, col: KupInputPanelColumn) {\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\n const dataAdapterMap = new Map<FCellTypes, DataAdapterFn>([\n [FCellTypes.AUTOCOMPLETE, this.#CMBandACPAdapter.bind(this)],\n [FCellTypes.BUTTON_LIST, this.#BTNAdapter.bind(this)],\n [FCellTypes.CHART, this.#GRAAdapter.bind(this)],\n [FCellTypes.CHIP, this.#CHIAdapter.bind(this)],\n [FCellTypes.CHECKBOX, this.#CHKAdapter.bind(this)],\n [FCellTypes.COLOR_PICKER, this.#CLPAdapter.bind(this)],\n [FCellTypes.COMBOBOX, this.#CMBandACPAdapter.bind(this)],\n [FCellTypes.EDITOR, this.#EDTAdapter.bind(this)],\n [FCellTypes.MULTI_AUTOCOMPLETE, this.#CHIAdapter.bind(this)],\n [FCellTypes.MULTI_COMBOBOX, this.#CHIAdapter.bind(this)],\n [FCellTypes.NUMBER, this.#NumberAdapter.bind(this)],\n [FCellTypes.DATE, this.#DateAdapter.bind(this)],\n [FCellTypes.RADIO, this.#RADAdapter.bind(this)],\n [FCellTypes.STRING, this.#ITXAdapter.bind(this)],\n [FCellTypes.SWITCH, this.#SWTAdapter.bind(this)],\n [FCellTypes.TABLE, this.#DataTableAdapter.bind(this)],\n [FCellTypes.TIME, this.#TimeAdapter.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\n #slotData(cell: KupInputPanelCell, col: KupInputPanelColumn) {\n const cellType = dom.ketchup.data.cell.getType(cell, cell.shape);\n\n if (!cell.editable) {\n return null;\n }\n\n if (cellType === FCellTypes.CHIP) {\n return {\n trailingIcon: true,\n label: col.title,\n disabled: !cell.editable,\n id: col.name,\n fullWidth: false,\n };\n }\n\n if (\n cellType === FCellTypes.MULTI_AUTOCOMPLETE ||\n cellType === FCellTypes.MULTI_COMBOBOX\n ) {\n return {\n ...this.#CMBandACPAdapter(\n cell.options,\n col.title,\n null,\n cell,\n col.name\n ),\n showDropDownIcon: true,\n class: '',\n style: { width: '100%' },\n disabled: !cell.editable,\n id: col.name,\n };\n }\n\n return null;\n }\n\n #CHIAdapter(\n _options: GenericObject,\n _fieldLabel: string,\n currentValue: string\n ) {\n return CHIAdapter(currentValue);\n }\n\n #GRAAdapter() {\n //TODO: definire mapping\n return {\n data: {\n sizeX: '50px',\n offlineMode: {\n value: '8;4;5',\n },\n id: 'i1012_GREF_0',\n cellId: 'i1012_GREF_0',\n sizeY: '50px',\n },\n };\n }\n\n #BTNAdapter(\n _options: GenericObject,\n _fieldLabel: string,\n _currentValue: string,\n cell: KupInputPanelCell,\n id: string\n ) {\n cell.data = cell.data || {};\n\n cell.data.onClick = () => {\n cell.fun\n ? this.customButtonClickHandler({\n fun: cell.fun,\n cellId: id,\n currentState: this.#reverseMapCells(),\n })\n : this.submitCb({\n value: {\n before: { ...this.#originalData },\n after: this.#reverseMapCells(),\n },\n cell: id,\n });\n };\n\n if (cell.data?.keyShortcut && !cell.data?.disabled) {\n this.#keysShortcut.push(cell.data?.keyShortcut);\n this.#kupManager.keysBinding.register(\n cell.data?.keyShortcut,\n cell.data.onClick.bind(this)\n );\n }\n\n return {\n label: cell.value,\n fun: cell.fun,\n ...cell.data,\n };\n }\n\n #CMBandACPAdapter(\n rawOptions: GenericObject,\n fieldLabel: string,\n currentValue: string,\n cell: KupInputPanelCell,\n id: string\n ) {\n const configCMandACP = CMBandACPAdapter(currentValue, fieldLabel, []);\n\n if (cell.fun) {\n const cellType = dom.ketchup.data.cell.getType(cell, cell.shape);\n\n const evNames = this.#eventNames.get(cellType);\n\n if (!evNames) {\n return;\n }\n\n evNames.map((evName) => {\n const handler = (\n e: CustomEvent<KupAutocompleteEventPayload>\n ) => {\n this.#getAutocompleteEventCallback(\n e.detail,\n cell.fun,\n configCMandACP,\n id,\n currentValue\n );\n };\n this.rootElement.addEventListener(evName, handler);\n this.#listeners.push({\n event: evName,\n handler,\n });\n });\n } else if (rawOptions) {\n configCMandACP.data['kup-list'].data =\n this.#optionsTreeComboAdapter(rawOptions, currentValue);\n }\n\n return configCMandACP;\n }\n\n #CHKAdapter(\n _options: GenericObject,\n fieldLabel: string,\n currentValue: string\n ) {\n return CHKAdapter(currentValue, fieldLabel);\n }\n\n #CLPAdapter(\n _options: GenericObject,\n fieldLabel: string,\n _currentValue: string\n ) {\n return {\n data: {\n 'kup-text-field': {\n label: fieldLabel,\n },\n },\n };\n }\n\n #EDTAdapter(\n _options: GenericObject,\n _fieldLabel: string,\n currentValue: string\n ) {\n return {\n initialValue: currentValue,\n };\n }\n\n #ITXAdapter(\n _options: GenericObject,\n fieldLabel: string,\n _currentValue: string\n ) {\n return { label: fieldLabel };\n }\n\n #RADAdapter(\n options: GenericObject,\n _fieldLabel: string,\n currentValue: string\n ) {\n return RADAdapter(currentValue, options);\n }\n\n #SWTAdapter(\n _options: GenericObject,\n fieldLabel: string,\n currentValue: string\n ) {\n return SWTAdapter(currentValue, fieldLabel);\n }\n\n #DateAdapter(\n _options: GenericObject,\n fieldLabel: string,\n currentValue: string\n ) {\n return {\n data: {\n 'kup-text-field': {\n label: fieldLabel,\n },\n },\n initialValue: currentValue,\n };\n }\n\n #TimeAdapter(\n _options: GenericObject,\n fieldLabel: string,\n _currentValue: string\n ) {\n return {\n data: {\n 'kup-text-field': {\n label: fieldLabel,\n },\n },\n };\n }\n\n #NumberAdapter(\n _options: GenericObject,\n fieldLabel: string,\n _currentValue: string\n ) {\n return { label: fieldLabel };\n }\n\n #DataTableAdapter(\n _rawOptions: GenericObject,\n _fieldLabel: string,\n _value: string,\n cell: KupInputPanelCell,\n id: string\n ) {\n try {\n let data = JSON.parse(cell.value);\n\n if (!data) {\n this.#kupManager.debug.logMessage(\n this,\n `Empty value for ${id} cell.`,\n KupDebugCategory.WARNING\n );\n return null;\n }\n\n if ((data as any).type !== 'SmeupDataTable') {\n this.#kupManager.debug.logMessage(\n this,\n `Wrong data table type for ${id} cell. Type \\`SmeupDataTable\\` in value expected`,\n KupDebugCategory.ERROR\n );\n return null;\n }\n\n return {\n data: {\n columns: data.columns.map((col) => ({\n ...col,\n obj: data.rows[0].cells[col.name].obj,\n })),\n rows: data.rows.map((row) => ({\n ...row,\n cells: Object.keys(row.cells).reduce((cell, key) => {\n const column = data.columns.find(\n (col) => col.name === key\n );\n return {\n ...cell,\n [key]: {\n ...row.cells[key],\n data: {\n ...this.#mapData(\n row.cells[key],\n column\n ),\n disabled:\n row.cells[key].editable === false,\n id: column.id,\n },\n },\n };\n }, {}),\n })),\n },\n };\n } catch (e) {\n this.#kupManager.debug.logMessage(\n this,\n `Invalid value for ${id} cell. Type \\`SmeupDataTable\\` expected`,\n KupDebugCategory.ERROR\n );\n return null;\n }\n }\n\n #getTableUpdatedCell(\n tableValue: KupDataTableDataset,\n cellId: string\n ): KupDataTableDataset {\n const updated: KupDataTableDataset = {\n ...tableValue,\n rows: tableValue.rows.map((row) => ({ ...row, cells: {} })),\n };\n\n const editableColsId = tableValue.columns\n .filter((col) => col.isEditable)\n .map((col) => col.name);\n\n if (!editableColsId.length) {\n return updated;\n }\n\n try {\n const beforeTableValue = JSON.parse(\n this.#originalData.rows[0].cells[cellId].value\n );\n\n updated.rows = tableValue.rows.map((row, i) =>\n editableColsId.reduce<KupDataTableRow>(\n (updatedRow, colId) => {\n const changed =\n beforeTableValue.rows[i].cells[colId] &&\n row.cells[colId].value !==\n beforeTableValue.rows[i].cells[colId].value;\n\n if (changed) {\n return {\n ...beforeTableValue.rows[i],\n cells: {\n ...updatedRow.cells,\n [colId]: {\n ...beforeTableValue.rows[i].cells[\n colId\n ],\n value: row.cells[colId].value,\n },\n },\n };\n }\n\n return {\n ...beforeTableValue.rows[i],\n cells: updatedRow.cells,\n };\n },\n { ...beforeTableValue.rows[i], cells: {} }\n )\n );\n\n return updated;\n } catch (e) {\n return updated;\n }\n }\n\n #optionsTreeComboAdapter(options: any, currentValue: string) {\n const adapter = this.#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\n #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 ? this.#treeOptionsNodeAdapter(child, currentValue)\n : [],\n }));\n }\n\n #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 ? this.#dataTreeOptionsChildrenAdapter(child, currentValue)\n : [],\n }));\n }\n\n #tableOptionsAdapter(options: any, currentValue: string): 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\n #getAutocompleteEventCallback(\n detail: KupAutocompleteEventPayload | KupComboboxIconClickEventPayload,\n fun: string,\n data: any,\n id: string,\n currentValue: string\n ) {\n if (\n detail.id !== id ||\n (detail as KupComboboxIconClickEventPayload).open === false\n ) {\n return;\n }\n this.optionsHandler(\n fun,\n detail.inputValue,\n this.#reverseMapCells(),\n detail.id\n ).then((options) => {\n data.data['kup-list'].data =\n this.#optionsTreeComboAdapter(options, currentValue) ?? [];\n detail.comp.refresh();\n });\n }\n\n //#endregion\n\n //#region LIFECYCLE HOOKS\n /*-------------------------------------------------*/\n /* L i f e c y c l e H o o k s */\n /*-------------------------------------------------*/\n\n componentWillLoad() {\n this.#kupManager.debug.logLoad(this, false);\n this.#kupManager.language.register(this);\n this.#kupManager.theme.register(this);\n this.onDataChanged();\n }\n\n componentDidLoad() {\n this.kupReady.emit({ comp: this, id: this.rootElement.id });\n this.#kupManager.debug.logLoad(this, true);\n }\n\n componentWillRender() {\n this.#kupManager.debug.logRender(this, false);\n }\n\n componentDidRender() {\n const root: ShadowRoot = this.rootElement.shadowRoot;\n if (root) {\n const fs: NodeListOf<HTMLElement> =\n root.querySelectorAll('.f-text-field');\n for (let index = 0; index < fs.length; index++) {\n FTextFieldMDC(fs[index]);\n }\n }\n this.#kupManager.debug.logRender(this, true);\n }\n\n render() {\n const isEmptyData = Boolean(!this.inputPanelCells.length);\n\n const inputPanelContent: VNode[] = isEmptyData\n ? [\n <p>\n {this.#kupManager.language.translate(\n KupLanguageGeneric.EMPTY_DATA\n )}\n </p>,\n ]\n : this.inputPanelCells.map((inputPanelCell) =>\n this.#renderRow(inputPanelCell)\n );\n\n return (\n <Host>\n <style>\n {this.#kupManager.theme.setKupStyle(\n this.rootElement as KupComponent\n )}\n </style>\n <div id={componentWrapperId}>{inputPanelContent}</div>\n </Host>\n );\n }\n\n disconnectedCallback() {\n this.#kupManager.language.unregister(this);\n this.#kupManager.theme.unregister(this);\n }\n //#endregion\n}\n"],"version":3}
1
+ {"file":"kup-input-panel.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;AA4DA,IAAY,8BAEX;AAFD,WAAY,8BAA8B;IACtC,6CAAW,CAAA;AACf,CAAC,EAFW,8BAA8B,KAA9B,8BAA8B,QAEzC;AAwED,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAC1B,oEAA8C,CAAA;IAC9C,8DAAwC,CAAA;IACxC,mHAA6F,CAAA;IAC7F,4EAAsD,CAAA;IACtD,sFAAgE,CAAA;AACpE,CAAC,EANW,kBAAkB,KAAlB,kBAAkB;;ACtI9B,MAAM,UAAU,GAAG,EAAE,CAAC;AACtB,MAAM,UAAU,GAAG,EAAE,CAAC;AAEf,MAAM,gBAAgB,GAAG,CAAC,MAAc;IAC3C,IAAI,MAAM,IAAI,CAAC,EAAE;QACb,OAAO,UAAU,GAAG,CAAC,CAAC;KACzB;IAED,IAAI,CAAC,MAAM,EAAE;QACT,OAAO,IAAI,CAAC;KACf;IAED,IAAI,MAAM,KAAK,CAAC,EAAE;QACd,OAAO,GAAG,GAAG,UAAU,CAAC;KAC3B;IAED,OAAO,MAAM,GAAG,UAAU,CAAC;AAC/B,CAAC,CAAC;AAEK,MAAM,iBAAiB,GAAG,CAAC,MAAc;IAC5C,IAAI,CAAC,MAAM,EAAE;QACT,OAAO,IAAI,CAAC;KACf;IAED,OAAO,MAAM,GAAG,UAAU,CAAC;AAC/B,CAAC,CAAC;AAEK,MAAM,cAAc,GAAG,CAAC,GAAW;IACtC,IAAI,CAAC,GAAG,EAAE;QACN,OAAO,IAAI,CAAC;KACf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AAM,CAAC,EAAE,KAAK,EAAE;QACf,MAA2C,CAAC,IAAI,KAAK,KAAK,EAC7D;QACE,OAAO;KACV;IACD,IAAI,CAAC,cAAc,CACf,GAAG,EACH,MAAM,CAAC,UAAU,EACjB,uBAAA,IAAI,gEAAiB,MAArB,IAAI,CAAmB,EACvB,MAAM,CAAC,EAAE,CACZ,CAAC,IAAI,CAAC,CAAC,OAAO;;QACX,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,IAAI;YACtB,MAAA,uBAAA,IAAI,wEAAyB,MAA7B,IAAI,EAA0B,OAAO,EAAE,YAAY,CAAC,mCAAI,EAAE,CAAC;QAC/D,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;KACzB,CAAC,CAAC;AACP,CAAC;;;;;","names":["kupManagerInstance","FCellTypes","FCellShapes","getProps","forceUpdate","setProps","FTextFieldMDC","h","KupLanguageGeneric","Host","componentWrapperId","FButton","FCell","CHIAdapter","CMBandACPAdapter","CHKAdapter","RADAdapter","SWTAdapter","KupDebugCategory"],"sources":["src/components/kup-input-panel/kup-input-panel-declarations.ts","src/components/kup-input-panel/kup-input-panel-utils.ts","src/components/kup-input-panel/kup-input-panel.scss?tag=kup-input-panel&encapsulation=shadow","src/components/kup-input-panel/kup-input-panel.tsx"],"sourcesContent":["import { GenericObject } from '../../components';\nimport {\n KupDataCell,\n KupDataColumn,\n} from '../../managers/kup-data/kup-data-declarations';\n\nexport interface KupInputPanelSubmit {\n value: KupInputPanelSubmitValue;\n cell?: string;\n}\nexport interface KupInputPanelSubmitValue {\n after: KupInputPanelData;\n before: KupInputPanelData;\n}\n\nexport interface KupInputPanelData {\n columns?: KupDataColumn[];\n rows?: KupInputPanelRow[];\n actions?: KupInputPanelAction[];\n}\n\nexport interface KupInputPanelAction {\n type?: string;\n fun?: string;\n}\n\nexport interface KupInputPanelColumn {\n name: string;\n title: string;\n visible?: boolean;\n}\n\nexport interface KupInputPanelRow {\n cells?: KupInputPanelRowCells;\n layout?: KupInputPanelLayout;\n}\n\nexport interface KupInputPanelRowCells {\n [key: string]: KupInputPanelCell;\n}\n\nexport interface KupInputPanelCell extends KupDataCell {\n options?: GenericObject | GenericObject[];\n editable?: boolean;\n mandatory?: boolean;\n fun?: string;\n}\n\nexport interface KupInputPanelCellOptions {\n id: string;\n label: string;\n}\n\nexport interface KupInputPanelLayout {\n horizontal?: boolean;\n absolute?: boolean;\n sections?: KupInputPanelLayoutSection[];\n sectionsType?: KupInputPanelLayoutSectionType;\n}\n\nexport enum KupInputPanelLayoutSectionType {\n TAB = 'tab',\n}\n\nexport interface KupInputPanelLayoutSection {\n id?: string;\n title?: string;\n icon?: string;\n content?: KupInputPanelLayoutField[];\n sections?: KupInputPanelLayoutSection[];\n dim?: string;\n horizontal?: boolean;\n gridCols?: number;\n gridRows?: number;\n // Gap is in rem\n gap?: number;\n sectionsType?: KupInputPanelLayoutSectionType;\n // absolute Attributes\n absoluteColumn?: number;\n absoluteWidth?: number;\n absoluteRow?: number;\n absoluteHeight?: number;\n}\n\nexport interface KupInputPanelLayoutField {\n id: string;\n // Span is referred to start\n colSpan?: number;\n colStart?: number;\n colEnd?: number;\n // Span is referred to start\n rowSpan?: number;\n rowStart?: number;\n rowEnd?: number;\n // absolute Attributes\n absoluteColumn?: number;\n absoluteRow?: number;\n absoluteLength?: number;\n}\n\nexport type DataAdapterFn = (\n options: GenericObject,\n fieldLabel: string,\n currentValue: string,\n cell?: KupInputPanelCell,\n id?: string\n) => Object;\n\nexport type InputPanelCells = {\n cells: { cell: KupDataCell; column: KupDataColumn }[];\n row?: KupInputPanelRow;\n};\n\nexport type InputPanelEvent = {\n state: { cell: KupDataCell; column: KupDataColumn }[];\n data: {\n field: string;\n value: number | string | object;\n };\n};\n\nexport type InputPanelOptionsHandler = (\n fun: string,\n inputValue: string,\n currentState: KupInputPanelData,\n cellId: string\n) => Promise<GenericObject>;\n\nexport type InputPanelButtonClickHandler = (event: {\n fun: string;\n cellId: string;\n currentState: KupInputPanelData;\n}) => void;\n\nexport enum KupInputPanelProps {\n customStyle = 'Custom style of the component.',\n data = 'Actual data of the input panel.',\n hiddenSubmitButton = 'Creates a hidden submit button in order to submit the form with enter.',\n submitCb = 'Sets the callback function on submit form',\n optionsHandler = 'Sets the callback function to recieve options',\n}\n","const CHAR_WIDTH = 12;\nconst ROW_HEIGHT = 22;\n\nexport const getAbsoluteWidth = (length: number) => {\n if (length == 0) {\n return CHAR_WIDTH / 2;\n }\n\n if (!length) {\n return null;\n }\n\n if (length === 1) {\n return 1.5 * CHAR_WIDTH;\n }\n\n return length * CHAR_WIDTH;\n};\n\nexport const getAbsoluteHeight = (height: number) => {\n if (!height) {\n return null;\n }\n\n return height * ROW_HEIGHT;\n};\n\nexport const getAbsoluteTop = (row: number) => {\n if (!row) {\n return null;\n }\n\n return (row - 1) * ROW_HEIGHT;\n};\n\nexport const getAbsoluteLeft = (col: number) => {\n if (!col) {\n return null;\n }\n\n return col * CHAR_WIDTH;\n};\n","/**\n* @prop --kup-input-panel-background-color: Sets background of the component.\n* @prop --kup-input-panel-color: Sets text color of the component.\n* @prop --kup-input-panel-font-family: Sets font family of the component.\n* @prop --kup-input-panel-font-size: Sets font size of the component.\n* @prop --kup-input-panel-label-alignment: Sets the text alignment of labels.\n* @prop --kup-input-panel-label-width: Sets the width of labels.\n* @prop --kup-input-panel-padding: Sets the padding of the input panel.\n*/\n\n:host {\n --kup_input_panel_background_color: var(\n --kup-input-panel-background-color,\n var(--kup-layer-0)\n );\n --kup_input_panel_color: var(\n --kup-input-panel-color,\n var(--kup-text-secondary)\n );\n --kup_input_panel_font_family: var(\n --kup-input-panel-font-family,\n var(--kup-font-family)\n );\n --kup_input_panel_font_size: var(\n --kup-input-panel-font-size,\n var(--kup-font-size)\n );\n --kup_input_panel_label_alignment: var(--kup-input-panel-label-alignment);\n --kup_input_panel_label_width: var(--kup-input-panel-label-width);\n --kup_input_panel_padding: var(--kup-input-panel-padding, 1em 0);\n\n .input-panel {\n background: var(--kup_input_panel_background_color);\n color: var(--kup_input_panel_color);\n display: flex;\n flex-grow: 1;\n overflow: auto;\n padding: var(--kup_input_panel_padding);\n position: relative;\n gap: 2rem;\n\n &--column {\n flex-direction: column;\n }\n\n &__section_label_container {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n }\n\n &__section {\n display: grid;\n\n .f-cell__content {\n > * {\n width: 100%;\n }\n }\n }\n\n &__horizontal-section {\n display: inline-grid;\n }\n\n .f-cell .f-checkbox .checkbox .checkbox__native-control {\n height: 40px;\n width: 40px;\n }\n\n &__label_container {\n display: flex;\n flex-direction: column;\n justify-content: center;\n\n > .f-cell {\n flex: 1;\n }\n }\n\n &__tabs_container {\n display: flex;\n flex-direction: column;\n justify-content: center;\n gap: 2rem;\n }\n\n .f-cell.number-cell {\n .f-cell__content {\n --kup-textfield-font-family: var(--kup_cell_font_family);\n\n font-family: var(--kup_cell_font_family);\n }\n }\n\n .input-panel-label {\n display: flex;\n width: 100%;\n height: 100%;\n align-items: center;\n justify-content: center;\n }\n\n &--absolute {\n height: 87ch;\n justify-content: flex-end;\n\n .input-panel-label {\n justify-content: start;\n }\n\n .mdc-text-field {\n height: unset !important;\n }\n }\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Method,\n Prop,\n State,\n VNode,\n Watch,\n forceUpdate,\n h,\n} from '@stencil/core';\nimport {\n KupAutocompleteEventPayload,\n KupComboboxIconClickEventPayload,\n KupDataCell,\n KupDataTableDataset,\n KupDataTableRow,\n KupEditorEventPayload,\n KupTabBarEventPayload,\n KupTabBarNode,\n} from '../../components';\nimport { FButton } from '../../f-components/f-button/f-button';\nimport { FCell } from '../../f-components/f-cell/f-cell';\nimport {\n FCellEventPayload,\n FCellEvents,\n FCellProps,\n FCellShapes,\n FCellTypes,\n} from '../../f-components/f-cell/f-cell-declarations';\nimport { FTextFieldMDC } from '../../f-components/f-text-field/f-text-field-mdc';\nimport { KupLanguageGeneric } from '../../managers/kup-language/kup-language-declarations';\nimport {\n KupManager,\n kupManagerInstance,\n} from '../../managers/kup-manager/kup-manager';\nimport { KupDom } from '../../managers/kup-manager/kup-manager-declarations';\nimport {\n GenericObject,\n KupComponent,\n KupEventPayload,\n} from '../../types/GenericTypes';\nimport { getProps, setProps } from '../../utils/utils';\nimport { componentWrapperId } from '../../variables/GenericVariables';\nimport {\n DataAdapterFn,\n InputPanelButtonClickHandler,\n InputPanelCells,\n InputPanelOptionsHandler,\n KupInputPanelCell,\n KupInputPanelColumn,\n KupInputPanelData,\n KupInputPanelLayout,\n KupInputPanelLayoutField,\n KupInputPanelLayoutSection,\n KupInputPanelLayoutSectionType,\n KupInputPanelProps,\n KupInputPanelRow,\n KupInputPanelSubmit,\n} from './kup-input-panel-declarations';\nimport { KupDebugCategory } from '../../managers/kup-debug/kup-debug-declarations';\nimport {\n getAbsoluteHeight,\n getAbsoluteLeft,\n getAbsoluteTop,\n getAbsoluteWidth,\n} from './kup-input-panel-utils';\nimport {\n CHIAdapter,\n CHKAdapter,\n CMBandACPAdapter,\n RADAdapter,\n SWTAdapter,\n} from '../../utils/cell-utils';\n\nconst dom: KupDom = document.documentElement as KupDom;\n@Component({\n tag: 'kup-input-panel',\n styleUrl: 'kup-input-panel.scss',\n shadow: true,\n})\nexport class KupInputPanel {\n /**\n * References the root HTML element of the component (<kup-form>).\n */\n @Element() rootElement: HTMLElement;\n\n //#region PROPS\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 /**\n * Actual data of the form.\n * @default null\n */\n @Prop() data: KupInputPanelData = null;\n\n /**\n * Creates a hidden submit button in order to submit the form with enter.\n * @default false\n */\n @Prop() hiddenSubmitButton: boolean = false;\n\n /**\n * Sets the callback function on submit form\n * @default null\n */\n @Prop() submitCb: (e: KupInputPanelSubmit) => unknown = null;\n\n /**\n * Sets the callback function on loading options via FUN\n * @default null\n */\n @Prop() optionsHandler: InputPanelOptionsHandler = null;\n\n /**\n * Sets the handler to use when click on custom buttons\n * @default null\n */\n @Prop() customButtonClickHandler?: InputPanelButtonClickHandler = null;\n //#endregion\n\n //#region STATES\n /*-------------------------------------------------*/\n /* S t a t e s */\n /*-------------------------------------------------*/\n\n /**\n * Values to send as props to FCell\n * @default []\n */\n @State() private inputPanelCells: InputPanelCells[] = [];\n\n /**\n * Id of selected tab if exists\n * @default null\n */\n @State() private tabSelected: string = null;\n //#endregion\n\n //#region VARIABLES\n /*-------------------------------------------------*/\n /* I n t e r n a l V a r i a b l e s */\n /*-------------------------------------------------*/\n\n #kupManager: KupManager = kupManagerInstance();\n\n #optionsAdapterMap = new Map<\n string,\n (options: any, currentValue: string) => GenericObject[]\n >([\n ['SmeupTreeNode', this.#treeOptionsNodeAdapter.bind(this)],\n ['SmeupDataTree', this.#dataTreeOptionsChildrenAdapter.bind(this)],\n ['SmeupTable', this.#tableOptionsAdapter.bind(this)],\n ['SmeupDataTable', this.#tableOptionsAdapter.bind(this)],\n ]);\n\n #originalData: KupInputPanelData = null;\n\n #eventNames = new Map<FCellTypes, string[]>([\n [\n FCellTypes.AUTOCOMPLETE,\n ['kup-autocomplete-input', 'kup-autocomplete-iconclick'],\n ],\n [\n FCellTypes.MULTI_AUTOCOMPLETE,\n ['kup-autocomplete-input', 'kup-autocomplete-iconclick'],\n ],\n [FCellTypes.COMBOBOX, ['kup-combobox-iconclick']],\n [FCellTypes.MULTI_COMBOBOX, ['kup-combobox-iconclick']],\n ]);\n #listeners: { event: string; handler: (e) => void }[] = [];\n #cellTypeComponents: Map<FCellTypes, string> = new Map<FCellTypes, string>([\n [FCellTypes.DATE, 'kup-date-picker'],\n [FCellTypes.TIME, 'kup-time-picker'],\n ]);\n #cellCustomRender: Map<\n FCellShapes,\n (cell: KupDataCell, cellId: string) => any\n > = new Map<FCellShapes, (cell: KupDataCell, cellId: string) => any>([\n [FCellShapes.BUTTON_LIST, this.#renderButton.bind(this)],\n [FCellShapes.EDITOR, this.#renderEditor.bind(this)],\n [FCellShapes.LABEL, this.#renderLabel.bind(this)],\n [FCellShapes.TABLE, this.#renderDataTable.bind(this)],\n ]);\n #sectionRenderMap: Map<\n KupInputPanelLayoutSectionType,\n (cells: InputPanelCells, sections: KupInputPanelLayoutSection[]) => any\n > = new Map<\n KupInputPanelLayoutSectionType,\n (cells: InputPanelCells, sections: KupInputPanelLayoutSection[]) => any\n >([\n [KupInputPanelLayoutSectionType.TAB, this.#renderSectionTab.bind(this)],\n ]);\n #keysShortcut: string[] = [];\n //#endregion\n\n //#region WATCHERS\n /*-------------------------------------------------*/\n /* W a t c h e r s */\n /*-------------------------------------------------*/\n\n @Watch('data')\n onDataChanged() {\n this.#originalData = structuredClone(this.data);\n if (this.#listeners.length) {\n this.#listeners.map(({ event, handler }) => {\n this.rootElement.removeEventListener(event, handler);\n });\n this.#listeners = [];\n }\n\n if (this.#keysShortcut.length) {\n this.#keysShortcut.map((key) => {\n this.#kupManager.keysBinding.unregister(key);\n });\n this.#keysShortcut = [];\n }\n\n this.#mapCells(this.data);\n }\n //#endregion\n\n //#region PUBLIC METHODS\n /*-------------------------------------------------*/\n /* P u b l i c M e t h o d s */\n /*-------------------------------------------------*/\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, KupInputPanelProps, 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 * 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, KupInputPanelProps, props);\n }\n //#endregion\n\n //#region EVENTS\n /*-------------------------------------------------*/\n /* Events */\n /*-------------------------------------------------*/\n\n /**\n * When component load is complete\n */\n @Event({\n eventName: 'kup-input-panel-ready',\n composed: true,\n cancelable: false,\n bubbles: true,\n })\n kupReady: EventEmitter<KupEventPayload>;\n //#endregion\n\n //#region PRIVATE METHODS\n /*-------------------------------------------------*/\n /* P r i v a t e M e t h o d s */\n /*-------------------------------------------------*/\n\n #renderRow(inputPanelCell: InputPanelCells) {\n const layout = inputPanelCell.row.layout;\n\n const horizontal = layout?.horizontal || false;\n\n let rowContent: VNode[];\n\n if (!layout?.sections?.length) {\n rowContent = inputPanelCell.cells.map((cell) =>\n this.#renderCell(cell.cell, inputPanelCell.row, cell.column)\n );\n } else {\n rowContent = layout.absolute\n ? this.#renderAbsoluteLayout(inputPanelCell, layout)\n : this.#renderGridLayout(inputPanelCell, layout);\n }\n\n const classObj = {\n 'input-panel': true,\n 'input-panel--column': !horizontal,\n 'input-panel--absolute': layout?.absolute,\n };\n\n // We create a form for each row in data\n return (\n <form\n class={classObj}\n name={this.rootElement.id}\n onSubmit={(e: SubmitEvent) => {\n e.preventDefault();\n this.submitCb({\n value: {\n before: { ...this.#originalData },\n after: this.#reverseMapCells(),\n },\n });\n }}\n >\n {rowContent}\n {!this.hiddenSubmitButton ? (\n <FButton\n buttonType=\"submit\"\n label={this.#kupManager.language.translate(\n KupLanguageGeneric.CONFIRM\n )}\n wrapperClass=\"form__submit\"\n ></FButton>\n ) : null}\n </form>\n );\n }\n\n #renderCell(\n cell: KupDataCell,\n row: KupInputPanelRow,\n column: KupInputPanelColumn\n ) {\n if (!cell) {\n return;\n }\n\n const customRender = this.#cellCustomRender.get(cell.shape);\n\n if (customRender !== undefined) {\n return customRender(cell, column.name);\n }\n\n const cellProps: FCellProps = {\n cell,\n column,\n row,\n component: this,\n editable: true,\n renderKup: true,\n setSizes: true,\n };\n\n const label = this.#getLabelComponent(cell, column.title);\n\n if (label) {\n return (\n <div class={{ 'input-panel__label_container': true }}>\n {label}\n <FCell {...cellProps} />\n </div>\n );\n }\n\n return <FCell {...cellProps} />;\n }\n\n #renderButton(cell: KupDataCell, cellId: string) {\n return (\n <FButton\n icon={cell.icon}\n id={cellId}\n {...cell.data}\n wrapperClass=\"form__submit\"\n ></FButton>\n );\n }\n\n #renderEditor(cell: KupDataCell, cellId: string) {\n const event = 'kup-editor-save';\n const handler = (e: CustomEvent<KupEditorEventPayload>) => {\n const edtCell: KupDataCell =\n this.inputPanelCells.reduce<KupDataCell>((cell, { cells }) => {\n if (!cell) {\n return cells.find(\n ({ column }) => column.name === cellId\n ).cell;\n }\n return cell;\n }, null);\n edtCell.value = e.detail.htmlValue.replace(/\\n/g, '<br>');\n };\n\n this.rootElement.addEventListener(event, handler);\n\n this.#listeners.push({\n event,\n handler,\n });\n\n return (\n <kup-editor\n {...cell.data}\n id={cellId}\n isReadOnly={!cell.isEditable}\n showToolbar={true}\n ></kup-editor>\n );\n }\n\n #renderDataTable(cell: KupDataCell, cellId: string) {\n return (\n <kup-data-table\n id={cellId}\n editableData={true}\n showGroups={true}\n showFilters={true}\n showFooter={true}\n {...cell.data}\n ></kup-data-table>\n );\n }\n\n #renderLabel(cell: KupDataCell, cellId: string) {\n return (\n <span class=\"input-panel-label\" id={cellId}>\n {cell.value}\n </span>\n );\n }\n\n #getLabelComponent(cell: KupDataCell, label: string) {\n if (!label) {\n return null;\n }\n\n const cellType = dom.ketchup.data.cell.getType(cell, cell.shape);\n\n if (cellType === FCellTypes.RADIO) {\n return <span>{label}</span>;\n }\n\n return null;\n }\n\n #renderGridLayout(\n inputPanelCell: InputPanelCells,\n layout: KupInputPanelLayout\n ) {\n const sectionRender = this.#sectionRenderMap.get(layout.sectionsType);\n\n return sectionRender\n ? sectionRender(inputPanelCell, layout.sections)\n : layout.sections.map((section) =>\n this.#renderSection(inputPanelCell, section)\n );\n }\n\n #renderAbsoluteLayout(\n inputPanelCell: InputPanelCells,\n layout: KupInputPanelLayout\n ) {\n return layout.sections.map((section) =>\n this.#renderAbsoluteSection(inputPanelCell, section)\n );\n }\n\n #renderSection(\n cells: InputPanelCells,\n section: KupInputPanelLayoutSection,\n customLabelRender: boolean = false,\n styleObj: GenericObject = {}\n ) {\n let content = [];\n\n if (section.sections?.length) {\n content = section.sections.map((innerSection) =>\n this.#renderSection(cells, innerSection)\n );\n } else if (section.content?.length) {\n content = section.content.map((field) =>\n this.#renderField(cells, field)\n );\n }\n\n const classObj = {\n 'input-panel__section': !section.horizontal,\n 'input-panel__horizontal-section': section.horizontal,\n };\n\n if (cells.row?.layout?.horizontal) {\n styleObj.maxWidth = section.dim;\n } else {\n styleObj.maxHeight = section.dim;\n }\n\n const sectionStyle = {\n ...styleObj,\n gap: +section.gap > 0 ? `${section.gap}rem` : '',\n 'grid-template-columns':\n +section.gridCols > 0 ? `repeat(${section.gridCols}, 1fr)` : '',\n 'grid-template-rows':\n +section.gridRows > 0 ? `repeat(${section.gridRows}, 1fr)` : '',\n };\n\n const sectionContent = (\n <div class={classObj} style={sectionStyle}>\n {content}\n </div>\n );\n\n return section.title && !customLabelRender ? (\n <div class={{ 'input-panel__section_label_container': true }}>\n <h3>{section.title}</h3>\n {sectionContent}\n </div>\n ) : (\n sectionContent\n );\n }\n\n #renderAbsoluteSection(\n cells: InputPanelCells,\n section: KupInputPanelLayoutSection\n ) {\n let content = [];\n\n if (section.sections?.length) {\n content = section.sections.map((innerSection) =>\n this.#renderAbsoluteSection(cells, innerSection)\n );\n } else if (section.content?.length) {\n content = section.content.map((field) =>\n this.#renderAbsoluteField(cells, field)\n );\n }\n\n const width = `${getAbsoluteWidth(section.absoluteWidth)}px`;\n const height = `${getAbsoluteHeight(section.absoluteHeight)}px`;\n const top = `${getAbsoluteTop(section.absoluteRow)}px`;\n const left = `${getAbsoluteLeft(section.absoluteColumn)}px`;\n\n const sectionStyle = {\n position: 'absolute',\n width,\n 'min-width': width,\n 'max-width': width,\n height,\n 'min-height': height,\n 'max-height': height,\n top,\n left,\n overflow: 'auto',\n };\n\n return <div style={sectionStyle}>{content}</div>;\n }\n\n #renderSectionTab(\n cells: InputPanelCells,\n sections: KupInputPanelLayoutSection[]\n ) {\n if (!this.tabSelected) {\n this.tabSelected = sections[0].id || '0';\n }\n\n const tabNodes: KupTabBarNode[] = sections.map((section, i) => ({\n active: (section.id || `${i}`) === this.tabSelected,\n value: section.title,\n icon: section.icon,\n id: section.id || `${i}`,\n }));\n\n const sectionContent = sections.map((section, i) => {\n const sectionId = section.id || `${i}`;\n return this.#renderSection(cells, section, true, {\n display: this.tabSelected !== sectionId ? 'none' : 'grid',\n });\n });\n\n const tabCustomStyle =\n '.tab-bar .tab-scroller .tab .tab__content { justify-content: flex-start; }';\n\n if (!this.#listeners.map((l) => l.event).includes('kup-tabbar-click')) {\n const event = 'kup-tabbar-click';\n const handler = (e: CustomEvent<KupTabBarEventPayload>) => {\n this.tabSelected = e.detail.node.id;\n };\n\n this.rootElement.addEventListener(event, handler);\n this.#listeners.push({\n event,\n handler,\n });\n }\n\n return (\n <div class={{ 'input-panel__tabs_container': true }}>\n <kup-tab-bar\n data={tabNodes}\n customStyle={tabCustomStyle}\n ></kup-tab-bar>\n {sectionContent}\n </div>\n );\n }\n\n #renderField(cells: InputPanelCells, field: KupInputPanelLayoutField) {\n const fieldCell = cells.cells.find(\n (cell) => cell.column.name === field.id\n );\n\n const colSpan =\n +field.colSpan > 0\n ? field.colSpan\n : !(+field.colSpan > 0) && !(+field.colStart > 0)\n ? 1\n : null;\n\n const colStart = colSpan ? `span ${colSpan}` : `${field.colStart}`;\n\n const colEnd = +field.colEnd > 0 ? `${field.colEnd}` : '';\n\n const rowSpan =\n +field.rowSpan > 0\n ? field.rowSpan\n : !(+field.rowSpan > 0) && !(+field.rowStart > 0)\n ? 1\n : null;\n\n const rowStart = rowSpan ? `span ${rowSpan}` : `${field.rowStart}`;\n\n const rowEnd = +field.rowEnd > 0 ? `${field.rowEnd}` : '';\n\n const styleObj = {\n 'grid-column-start': colStart,\n 'grid-column-end': colEnd,\n 'grid-row-start': rowStart,\n 'grid-row-end': rowEnd,\n };\n\n if (!fieldCell || !fieldCell.cell) {\n return;\n }\n\n return (\n <div style={styleObj}>\n {this.#renderCell(fieldCell.cell, cells.row, fieldCell.column)}\n </div>\n );\n }\n\n #renderAbsoluteField(\n cells: InputPanelCells,\n field: KupInputPanelLayoutField\n ) {\n const fieldCell = cells.cells.find(\n (cell) => cell.column.name === field.id\n );\n if (!fieldCell || !fieldCell.cell) {\n return;\n }\n\n let length: number;\n if (fieldCell.cell.shape == FCellShapes.DATE) {\n length = field.absoluteLength > 8 ? field.absoluteLength : 8;\n } else {\n length = field.absoluteLength;\n }\n\n const width = `${getAbsoluteWidth(length)}px`;\n const height = `${getAbsoluteHeight(1)}px`;\n const top = `${getAbsoluteTop(field.absoluteRow)}px`;\n const left = `${getAbsoluteLeft(field.absoluteColumn)}px`;\n\n const styleObj = {\n position: 'absolute',\n width,\n 'min-width': width,\n 'max-width': width,\n height,\n 'min-height': height,\n 'max-height': height,\n top,\n left,\n overflow: 'auto',\n };\n\n const cell = {\n ...fieldCell.cell,\n data: {\n ...fieldCell.cell.data,\n customStyle:\n (fieldCell.cell.data.customStyle || '') +\n '.mdc-text-field {height: unset !important;}',\n },\n };\n\n return (\n <div style={styleObj}>\n {this.#renderCell(cell, cells.row, fieldCell.column)}\n </div>\n );\n }\n\n #mapCells(data: KupInputPanelData) {\n const inpuPanelCells = data?.rows?.length\n ? data.rows.reduce((inpuPanelCells, row) => {\n const cells = data.columns\n .filter((column) => column.visible)\n .map((column) => {\n const cell = structuredClone(row.cells[column.name]);\n const mappedCell = cell\n ? {\n ...cell,\n data: this.#setProps(cell, column),\n slotData: this.#slotData(cell, column),\n isEditable: true,\n }\n : null;\n return { column, cell: mappedCell };\n });\n return [...inpuPanelCells, { cells, row }];\n }, [])\n : [];\n\n inpuPanelCells.map(({ cells }: InputPanelCells) =>\n cells.map(({ cell, column }) => {\n const cellType = dom.ketchup.data.cell.getType(\n cell,\n cell.shape\n );\n const componentQuery = this.#cellTypeComponents.get(cellType);\n if (!componentQuery) {\n return;\n }\n\n const el: any = this.rootElement.shadowRoot.querySelector(\n `${componentQuery}[id=${column.name}]`\n );\n el?.setValue(cell.value);\n })\n );\n\n this.inputPanelCells = inpuPanelCells;\n }\n\n #setProps(cell: KupInputPanelCell, column: KupInputPanelColumn) {\n const defaultProps = {\n ...this.#mapData(cell, column),\n disabled: !cell.editable,\n id: column.name,\n };\n const cellType = dom.ketchup.data.cell.getType(cell, cell.shape);\n const { data, ...noDataProps } = cell.data || {};\n\n return cellType !== FCellTypes.MULTI_AUTOCOMPLETE &&\n cellType !== FCellTypes.MULTI_COMBOBOX\n ? this.#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\n #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] = this.#deepObjectsMerge(target[key], source[key]);\n } else {\n target[key] = source[key];\n }\n }\n return target;\n }\n\n #reverseMapCells(): KupInputPanelData {\n return this.inputPanelCells.reduce(\n (data, curr) => {\n const updatedCells = Object.keys(curr.row.cells).reduce(\n (cells, key) => {\n const cellState = curr.cells.find(\n (c) => c.column.name === key\n )?.cell;\n\n let value: any = cellState?.value;\n\n if (cellState?.shape === FCellShapes.TABLE) {\n value = JSON.stringify(\n this.#getTableUpdatedCell(\n cellState.data.data,\n key\n )\n );\n }\n\n return {\n ...cells,\n [key]: {\n ...curr.row.cells[key],\n value,\n obj: cellState?.obj,\n },\n };\n },\n {}\n );\n\n return {\n columns: [\n ...data.columns,\n ...curr.cells.map((cell) => cell.column),\n ],\n rows: [\n ...data.rows,\n {\n cells: updatedCells,\n layout: curr.row.layout,\n },\n ],\n };\n },\n {\n columns: [],\n rows: [],\n }\n );\n }\n\n #mapData(cell: KupInputPanelCell, col: KupInputPanelColumn) {\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\n const dataAdapterMap = new Map<FCellTypes, DataAdapterFn>([\n [FCellTypes.AUTOCOMPLETE, this.#CMBandACPAdapter.bind(this)],\n [FCellTypes.BUTTON_LIST, this.#BTNAdapter.bind(this)],\n [FCellTypes.CHART, this.#GRAAdapter.bind(this)],\n [FCellTypes.CHIP, this.#CHIAdapter.bind(this)],\n [FCellTypes.CHECKBOX, this.#CHKAdapter.bind(this)],\n [FCellTypes.COLOR_PICKER, this.#CLPAdapter.bind(this)],\n [FCellTypes.COMBOBOX, this.#CMBandACPAdapter.bind(this)],\n [FCellTypes.EDITOR, this.#EDTAdapter.bind(this)],\n [FCellTypes.MULTI_AUTOCOMPLETE, this.#CHIAdapter.bind(this)],\n [FCellTypes.MULTI_COMBOBOX, this.#CHIAdapter.bind(this)],\n [FCellTypes.NUMBER, this.#NumberAdapter.bind(this)],\n [FCellTypes.DATE, this.#DateAdapter.bind(this)],\n [FCellTypes.RADIO, this.#RADAdapter.bind(this)],\n [FCellTypes.STRING, this.#ITXAdapter.bind(this)],\n [FCellTypes.SWITCH, this.#SWTAdapter.bind(this)],\n [FCellTypes.TABLE, this.#DataTableAdapter.bind(this)],\n [FCellTypes.TIME, this.#TimeAdapter.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\n #slotData(cell: KupInputPanelCell, col: KupInputPanelColumn) {\n const cellType = dom.ketchup.data.cell.getType(cell, cell.shape);\n\n if (!cell.editable) {\n return null;\n }\n\n if (cellType === FCellTypes.CHIP) {\n return {\n trailingIcon: true,\n label: col.title,\n disabled: !cell.editable,\n id: col.name,\n fullWidth: false,\n };\n }\n\n if (\n cellType === FCellTypes.MULTI_AUTOCOMPLETE ||\n cellType === FCellTypes.MULTI_COMBOBOX\n ) {\n return {\n ...this.#CMBandACPAdapter(\n cell.options,\n col.title,\n null,\n cell,\n col.name\n ),\n showDropDownIcon: true,\n class: '',\n style: { width: '100%' },\n disabled: !cell.editable,\n id: col.name,\n };\n }\n\n return null;\n }\n\n #CHIAdapter(\n _options: GenericObject,\n _fieldLabel: string,\n currentValue: string\n ) {\n return CHIAdapter(currentValue);\n }\n\n #GRAAdapter() {\n //TODO: definire mapping\n return {\n data: {\n sizeX: '50px',\n offlineMode: {\n value: '8;4;5',\n },\n id: 'i1012_GREF_0',\n cellId: 'i1012_GREF_0',\n sizeY: '50px',\n },\n };\n }\n\n #BTNAdapter(\n _options: GenericObject,\n _fieldLabel: string,\n _currentValue: string,\n cell: KupInputPanelCell,\n id: string\n ) {\n cell.data = cell.data || {};\n\n cell.data.onClick = () => {\n cell.fun\n ? this.customButtonClickHandler({\n fun: cell.fun,\n cellId: id,\n currentState: this.#reverseMapCells(),\n })\n : this.submitCb({\n value: {\n before: { ...this.#originalData },\n after: this.#reverseMapCells(),\n },\n cell: id,\n });\n };\n\n if (cell.data?.keyShortcut && !cell.data?.disabled) {\n this.#keysShortcut.push(cell.data?.keyShortcut);\n this.#kupManager.keysBinding.register(\n cell.data?.keyShortcut,\n cell.data.onClick.bind(this)\n );\n }\n\n return {\n label: cell.value,\n fun: cell.fun,\n ...cell.data,\n };\n }\n\n #CMBandACPAdapter(\n rawOptions: GenericObject,\n fieldLabel: string,\n currentValue: string,\n cell: KupInputPanelCell,\n id: string\n ) {\n const configCMandACP = CMBandACPAdapter(currentValue, fieldLabel, []);\n\n if (cell.fun) {\n const cellType = dom.ketchup.data.cell.getType(cell, cell.shape);\n\n const evNames = this.#eventNames.get(cellType);\n\n if (!evNames) {\n return;\n }\n\n evNames.map((evName) => {\n const handler = (\n e: CustomEvent<KupAutocompleteEventPayload>\n ) => {\n this.#getAutocompleteEventCallback(\n e.detail,\n cell.fun,\n configCMandACP,\n id,\n currentValue\n );\n };\n this.rootElement.addEventListener(evName, handler);\n this.#listeners.push({\n event: evName,\n handler,\n });\n });\n } else if (rawOptions) {\n configCMandACP.data['kup-list'].data =\n this.#optionsTreeComboAdapter(rawOptions, currentValue);\n }\n\n return configCMandACP;\n }\n\n #CHKAdapter(\n _options: GenericObject,\n fieldLabel: string,\n currentValue: string\n ) {\n return CHKAdapter(currentValue, fieldLabel);\n }\n\n #CLPAdapter(\n _options: GenericObject,\n fieldLabel: string,\n _currentValue: string\n ) {\n return {\n data: {\n 'kup-text-field': {\n label: fieldLabel,\n },\n },\n };\n }\n\n #EDTAdapter(\n _options: GenericObject,\n _fieldLabel: string,\n currentValue: string\n ) {\n return {\n initialValue: currentValue,\n };\n }\n\n #ITXAdapter(\n _options: GenericObject,\n fieldLabel: string,\n _currentValue: string\n ) {\n return { label: fieldLabel };\n }\n\n #RADAdapter(\n options: GenericObject,\n _fieldLabel: string,\n currentValue: string\n ) {\n return RADAdapter(currentValue, options);\n }\n\n #SWTAdapter(\n _options: GenericObject,\n fieldLabel: string,\n currentValue: string\n ) {\n return SWTAdapter(currentValue, fieldLabel);\n }\n\n #DateAdapter(\n _options: GenericObject,\n fieldLabel: string,\n currentValue: string\n ) {\n return {\n data: {\n 'kup-text-field': {\n label: fieldLabel,\n },\n },\n initialValue: currentValue,\n };\n }\n\n #TimeAdapter(\n _options: GenericObject,\n fieldLabel: string,\n _currentValue: string\n ) {\n return {\n data: {\n 'kup-text-field': {\n label: fieldLabel,\n },\n },\n };\n }\n\n #NumberAdapter(\n _options: GenericObject,\n fieldLabel: string,\n _currentValue: string\n ) {\n return { label: fieldLabel };\n }\n\n #DataTableAdapter(\n _rawOptions: GenericObject,\n _fieldLabel: string,\n _value: string,\n cell: KupInputPanelCell,\n id: string\n ) {\n try {\n let data = JSON.parse(cell.value);\n\n if (!data) {\n this.#kupManager.debug.logMessage(\n this,\n `Empty value for ${id} cell.`,\n KupDebugCategory.WARNING\n );\n return null;\n }\n\n if ((data as any).type !== 'SmeupDataTable') {\n this.#kupManager.debug.logMessage(\n this,\n `Wrong data table type for ${id} cell. Type \\`SmeupDataTable\\` in value expected`,\n KupDebugCategory.ERROR\n );\n return null;\n }\n\n return {\n data: {\n columns: data.columns.map((col) => ({\n ...col,\n obj: data.rows[0].cells[col.name].obj,\n })),\n rows: data.rows.map((row) => ({\n ...row,\n cells: Object.keys(row.cells).reduce((cell, key) => {\n const column = data.columns.find(\n (col) => col.name === key\n );\n return {\n ...cell,\n [key]: {\n ...row.cells[key],\n data: {\n ...this.#mapData(\n row.cells[key],\n column\n ),\n disabled:\n row.cells[key].editable === false,\n id: column.id,\n },\n },\n };\n }, {}),\n })),\n },\n };\n } catch (e) {\n this.#kupManager.debug.logMessage(\n this,\n `Invalid value for ${id} cell. Type \\`SmeupDataTable\\` expected`,\n KupDebugCategory.ERROR\n );\n return null;\n }\n }\n\n #getTableUpdatedCell(\n tableValue: KupDataTableDataset,\n cellId: string\n ): KupDataTableDataset {\n const updated: KupDataTableDataset = {\n ...tableValue,\n rows: tableValue.rows.map((row) => ({ ...row, cells: {} })),\n };\n\n const editableColsId = tableValue.columns\n .filter((col) => col.isEditable)\n .map((col) => col.name);\n\n if (!editableColsId.length) {\n return updated;\n }\n\n try {\n const beforeTableValue = JSON.parse(\n this.#originalData.rows[0].cells[cellId].value\n );\n\n updated.rows = tableValue.rows.map((row, i) =>\n editableColsId.reduce<KupDataTableRow>(\n (updatedRow, colId) => {\n const changed =\n beforeTableValue.rows[i].cells[colId] &&\n row.cells[colId].value !==\n beforeTableValue.rows[i].cells[colId].value;\n\n if (changed) {\n return {\n ...beforeTableValue.rows[i],\n cells: {\n ...updatedRow.cells,\n [colId]: {\n ...beforeTableValue.rows[i].cells[\n colId\n ],\n value: row.cells[colId].value,\n },\n },\n };\n }\n\n return {\n ...beforeTableValue.rows[i],\n cells: updatedRow.cells,\n };\n },\n { ...beforeTableValue.rows[i], cells: {} }\n )\n );\n\n return updated;\n } catch (e) {\n return updated;\n }\n }\n\n #optionsTreeComboAdapter(options: any, currentValue: string) {\n const adapter = this.#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\n #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 ? this.#treeOptionsNodeAdapter(child, currentValue)\n : [],\n }));\n }\n\n #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 ? this.#dataTreeOptionsChildrenAdapter(child, currentValue)\n : [],\n }));\n }\n\n #tableOptionsAdapter(options: any, currentValue: string): 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\n #getAutocompleteEventCallback(\n detail: KupAutocompleteEventPayload | KupComboboxIconClickEventPayload,\n fun: string,\n data: any,\n id: string,\n currentValue: string\n ) {\n if (\n detail.id !== id ||\n (detail as KupComboboxIconClickEventPayload).open === false\n ) {\n return;\n }\n this.optionsHandler(\n fun,\n detail.inputValue,\n this.#reverseMapCells(),\n detail.id\n ).then((options) => {\n data.data['kup-list'].data =\n this.#optionsTreeComboAdapter(options, currentValue) ?? [];\n detail.comp.refresh();\n });\n }\n\n //#endregion\n\n //#region LIFECYCLE HOOKS\n /*-------------------------------------------------*/\n /* L i f e c y c l e H o o k s */\n /*-------------------------------------------------*/\n\n componentWillLoad() {\n this.#kupManager.debug.logLoad(this, false);\n this.#kupManager.language.register(this);\n this.#kupManager.theme.register(this);\n this.onDataChanged();\n }\n\n componentDidLoad() {\n this.kupReady.emit({ comp: this, id: this.rootElement.id });\n this.#kupManager.debug.logLoad(this, true);\n }\n\n componentWillRender() {\n this.#kupManager.debug.logRender(this, false);\n }\n\n componentDidRender() {\n const root: ShadowRoot = this.rootElement.shadowRoot;\n if (root) {\n const fs: NodeListOf<HTMLElement> =\n root.querySelectorAll('.f-text-field');\n for (let index = 0; index < fs.length; index++) {\n FTextFieldMDC(fs[index]);\n }\n }\n this.#kupManager.debug.logRender(this, true);\n }\n\n render() {\n const isEmptyData = Boolean(!this.inputPanelCells.length);\n\n const inputPanelContent: VNode[] = isEmptyData\n ? [\n <p>\n {this.#kupManager.language.translate(\n KupLanguageGeneric.EMPTY_DATA\n )}\n </p>,\n ]\n : this.inputPanelCells.map((inputPanelCell) =>\n this.#renderRow(inputPanelCell)\n );\n\n return (\n <Host>\n <style>\n {this.#kupManager.theme.setKupStyle(\n this.rootElement as KupComponent\n )}\n </style>\n <div id={componentWrapperId}>{inputPanelContent}</div>\n </Host>\n );\n }\n\n disconnectedCallback() {\n this.#kupManager.language.unregister(this);\n this.#kupManager.theme.unregister(this);\n }\n //#endregion\n}\n"],"version":3}
@@ -98,15 +98,15 @@ const KupTypography = class {
98
98
  /* P r i v a t e M e t h o d s */
99
99
  /*-------------------------------------------------*/
100
100
  closeRowToolbarList() {
101
- this.kupManager.dynamicPosition.stop(this.toolbarList);
102
- this.kupManager.removeClickCallback(__classPrivateFieldGet(this, _KupTypography_clickCbDropCard, "f"));
103
- this.toolbarList.remove();
104
- this.toolbarList = null;
105
- }
106
- createDropDownToolbarList() {
107
101
  if (this.toolbarList) {
108
- this.closeRowToolbarList();
102
+ this.kupManager.dynamicPosition.stop(this.toolbarList);
103
+ this.kupManager.removeClickCallback(__classPrivateFieldGet(this, _KupTypography_clickCbDropCard, "f"));
104
+ this.toolbarList.remove();
105
+ this.toolbarList = null;
109
106
  }
107
+ }
108
+ createDropDownToolbarList() {
109
+ this.closeRowToolbarList();
110
110
  const listEl = document.createElement('kup-list');
111
111
  listEl.data = this.toolbarData;
112
112
  listEl.isMenu = true;
@@ -187,7 +187,7 @@ const KupTypography = class {
187
187
  const classObjParent = {
188
188
  'kup-typography--wrap': props.toolbar ? true : false,
189
189
  };
190
- return (index.h(index.Host, { key: '8b9fef23ec03cae54fedea66a85c1757c7dd96af' }, index.h("style", { key: '521ee86cfe403d56a2f9a396ed74f0f630d98b4a' }, this.kupManager.theme.setKupStyle(this.rootElement)), index.h("div", { key: 'd3bbde361fe80de9b7d3f0814793cd3aa0dac074', id: GenericVariables.componentWrapperId, class: classObjParent, onClick: () => this.onKupClick }, index.h(fTypography.FTypography, Object.assign({ key: 'f4533e06f928a221ca455ed51dd2c97b62ae0fb4' }, props)), index.h(fImage.FImage, Object.assign({ key: '84114a34ecf2a5aaf73ea9f9fd1338ed0fd029cb' }, propsFImage, { onClick: (event) => {
190
+ return (index.h(index.Host, { key: '981f5e75f5014b5ef747f943ffb6905ee03a07b5' }, index.h("style", { key: '4a77e168bda23918fcbd1aded179d9cb54027385' }, this.kupManager.theme.setKupStyle(this.rootElement)), index.h("div", { key: '7b4d3cd14a278c481cac14077fa16c899c81fc56', id: GenericVariables.componentWrapperId, class: classObjParent, onClick: () => this.onKupClick }, index.h(fTypography.FTypography, Object.assign({ key: '4e487b2d58d1161b443f7823a0c3e0f7e977ac6e' }, props)), index.h(fImage.FImage, Object.assign({ key: 'c62c2a74f3687836c9cfb1f3cc8afe65822ece9f' }, propsFImage, { onClick: (event) => {
191
191
  event.stopPropagation();
192
192
  this.onKupIconClick(event.currentTarget);
193
193
  } })))));
@@ -1 +1 @@
1
- {"file":"kup-typography.entry.cjs.js","mappings":";;;;;;;;;;;AAEA;;;;AAIA,IAAY,kBAcX;AAdD,WAAY,kBAAkB;IAC1B,mDAA6B,CAAA;IAC7B,2DAAqC,CAAA;IACrC,kEAA4C,CAAA;IAC5C,mEAA6C,CAAA;IAC7C,8CAAwB,CAAA;IACxB,0EAAoD,CAAA;IACpD,qFAA+D,CAAA;IAC/D,6DAAuC,CAAA;IACvC,yEAAmD,CAAA;IACnD,wEAAkD,CAAA;IAClD,2EAAqD,CAAA;IACrD,0EAAoD,CAAA;IACpD,uJAAiI,CAAA;AACrI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ACK,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,WAAW,CAC9B,IAAI,CAAC,WAA2B,CACnC,CACG,EACRA,kEACI,EAAE,EAAEE,mCAAkB,EACtB,KAAK,EAAE,cAAc,EACrB,OAAO,EAAE,MAAM,IAAI,CAAC,UAAU,IAE9BF,QAACG,uBAAW,qEAAK,KAAK,EAAI,EAC1BH,QAACI,aAAM,qEACC,WAAW,IACf,OAAO,EAAE,CAAC,KAAiB;gBACvB,KAAK,CAAC,eAAe,EAAE,CAAC;gBACxB,IAAI,CAAC,cAAc,CACf,KAAK,CAAC,aAA4B,CACrC,CAAC;aACL,IACH,CACA,CACH,EACT;KACL;IACD,oBAAoB;QAChB,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;KAC1C;;;;;;;;","names":["kupManagerInstance","FTypographyType","KupDynamicPositionPlacement","getProps","forceUpdate","setProps","h","Host","componentWrapperId","FTypography","FImage"],"sources":["src/components/kup-typography/kup-typography-declarations.ts","src/components/kup-typography/kup-typography.scss?tag=kup-typography&encapsulation=shadow","src/components/kup-typography/kup-typography.tsx"],"sourcesContent":["import { KupEventPayload } from '../../types/GenericTypes';\n\n/**\n * Props of the kup-typography component.\n * Used to export every prop in an object.\n */\nexport enum KupTypographyProps {\n data = 'the text of the text',\n Style = 'it is the style of the text',\n Border = 'when true it will appear a border',\n BorderWidth = 'it is the width of the border',\n Align = 'text alignment',\n FontBold = 'when true it will display the bold font',\n FontItalic = 'when true it will display the italic ( cursive )',\n FontName = 'it is the name of the font',\n FontSize = 'it is the size of the font of the text',\n FontULine = 'when true it will show the underline',\n FontColor = 'it is the color of the font of the text',\n BackColor = 'it is the background color of the text',\n Type = 'it is the type of the font. It is an enum that can take from different variant such as body, heading1, caption and so on',\n}\n\nexport interface KupTypographyIconClickEventPayload extends KupEventPayload {}\n\nexport interface KupTypographyClickEventPayload extends KupEventPayload {\n value: string;\n}\n","@import 'styles/kup-typography-main.scss';\n@import 'styles/kup-typography-classes.scss';\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n forceUpdate,\n h,\n Host,\n Method,\n Prop,\n} from '@stencil/core';\nimport { GenericObject, KupComponent } from '../../types/GenericTypes';\nimport { getProps, setProps } from '../../utils/utils';\nimport {\n KupManager,\n KupManagerClickCb,\n} from '../../managers/kup-manager/kup-manager-declarations';\nimport { kupManagerInstance } from '../../managers/kup-manager/kup-manager';\nimport { FTypography } from '../../f-components/f-typography/f-typography';\nimport {\n FTypographyProps,\n FTypographyType,\n} from '../../f-components/f-typography/f-typography-declarations';\nimport {\n KupTypographyClickEventPayload,\n KupTypographyIconClickEventPayload,\n KupTypographyProps,\n} from './kup-typography-declarations';\nimport { KupDataNode } from '../../managers/kup-data/kup-data-declarations';\nimport {\n KupDynamicPositionAnchor,\n KupDynamicPositionElement,\n KupDynamicPositionPlacement,\n} from '../../managers/kup-dynamic-position/kup-dynamic-position-declarations';\nimport { componentWrapperId } from '../../variables/GenericVariables';\nimport { FImage } from '../../f-components/f-image/f-image';\nimport { FImageProps } from '../../f-components/f-image/f-image-declarations';\nimport { KupToolbarItemClickEventPayload } from '../../managers/kup-toolbar/kup-toolbar-declarations';\n\n@Component({\n tag: 'kup-typography',\n styleUrl: 'kup-typography.scss',\n shadow: true,\n})\nexport class KupTypography {\n /**\n * References the root HTML element of the component (<kup-typography>).\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 * Manage the toolbar icon. If true is visible, otherwise is not\n * @default null\n */\n @Prop() toolbar: boolean = true;\n /**\n * Display DataNode Toolbar.\n * @default null\n */\n @Prop() toolbarData: KupDataNode[];\n /**\n * Sets the sizing of the textfield\n * @default FTypographyType.BODY_COMPACT\n */\n @Prop() type: FTypographyType = FTypographyType.BODY_COMPACT;\n /**\n * This is the content of the text\n * @default null\n */\n @Prop() value: string = null;\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 private kupManager: KupManager = kupManagerInstance();\n #clickCbDropCard: KupManagerClickCb = null;\n /**\n * Toolbar List.\n */\n private toolbarList: KupDynamicPositionElement;\n #dropDownActionCardAnchor: HTMLElement = null;\n\n /*-------------------------------------------------*/\n /* E v e n t s */\n /*-------------------------------------------------*/\n\n @Event({\n eventName: 'kup-typography-iconclick',\n composed: true,\n cancelable: false,\n bubbles: true,\n })\n kupIconClick: EventEmitter<KupTypographyIconClickEventPayload>;\n\n @Event({\n eventName: 'kup-typography-click',\n composed: true,\n cancelable: false,\n bubbles: true,\n })\n kupClick: EventEmitter<KupTypographyClickEventPayload>;\n\n @Event({\n eventName: 'kup-typography-itemclick',\n composed: true,\n cancelable: false,\n bubbles: true,\n })\n kupItemClick: EventEmitter<KupToolbarItemClickEventPayload>;\n\n onKupClick() {\n this.kupClick.emit({\n comp: this,\n id: this.rootElement.id,\n value: this.value,\n });\n }\n\n onKupIconClick(el: HTMLElement) {\n this.#dropDownActionCardAnchor = el;\n this.kupIconClick.emit({\n comp: this,\n id: this.rootElement.id,\n });\n this.createDropDownToolbarList();\n }\n\n onKupToolbarItemClick(e: CustomEvent) {\n this.kupItemClick.emit({\n comp: this,\n id: this.rootElement.id,\n value: this.value,\n node: e.detail.selected,\n });\n }\n\n /*-------------------------------------------------*/\n /* P r i v a t e M e t h o d s */\n /*-------------------------------------------------*/\n\n closeRowToolbarList() {\n this.kupManager.dynamicPosition.stop(\n this.toolbarList as KupDynamicPositionElement\n );\n this.kupManager.removeClickCallback(this.#clickCbDropCard);\n this.toolbarList.remove();\n this.toolbarList = null;\n }\n\n createDropDownToolbarList() {\n if (this.toolbarList) {\n this.closeRowToolbarList();\n }\n const listEl = document.createElement('kup-list');\n listEl.data = this.toolbarData;\n listEl.isMenu = true;\n listEl.menuVisible = true;\n listEl.addEventListener('kup-list-click', (e: CustomEvent) => {\n this.onKupToolbarItemClick(e);\n setTimeout(() => {\n this.closeRowToolbarList();\n }, 0);\n });\n this.toolbarList = listEl;\n this.#clickCbDropCard = {\n cb: () => {\n this.closeRowToolbarList();\n },\n el: this.toolbarList,\n };\n\n this.kupManager.addClickCallback(this.#clickCbDropCard, true);\n this.rootElement.shadowRoot.appendChild(this.toolbarList);\n requestAnimationFrame(() => {\n this.kupManager.dynamicPosition.register(\n this.toolbarList as unknown as KupDynamicPositionElement,\n this.#dropDownActionCardAnchor as KupDynamicPositionAnchor,\n 0,\n KupDynamicPositionPlacement.AUTO,\n true\n );\n this.kupManager.dynamicPosition.start(\n this.toolbarList as unknown as KupDynamicPositionElement\n );\n });\n }\n\n /*-------------------------------------------------*/\n /* P u b l i c M e t h o d s */\n /*-------------------------------------------------*/\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, KupTypographyProps, 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 * 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, KupTypographyProps, props);\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.debug.logLoad(this, false);\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.kupManager.debug.logRender(this, true);\n }\n\n render() {\n const props: FTypographyProps = {\n toolbar: this.toolbar,\n value: this.value,\n type: this.type,\n };\n\n const propsFImage: FImageProps = {\n color: 'var(--kup-gray-color-70)',\n resource: 'more_vert',\n sizeX: '16px',\n sizeY: '16px',\n wrapperClass: 'image__iconToolbar',\n };\n const classObjParent: Record<string, boolean> = {\n 'kup-typography--wrap': props.toolbar ? true : false,\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 class={classObjParent}\n onClick={() => this.onKupClick}\n >\n <FTypography {...props} />\n <FImage\n {...propsFImage}\n onClick={(event: MouseEvent) => {\n event.stopPropagation();\n this.onKupIconClick(\n event.currentTarget as HTMLElement\n );\n }}\n />\n </div>\n </Host>\n );\n }\n disconnectedCallback() {\n this.kupManager.theme.unregister(this);\n }\n}\n"],"version":3}
1
+ {"file":"kup-typography.entry.cjs.js","mappings":";;;;;;;;;;;AAEA;;;;AAIA,IAAY,kBAcX;AAdD,WAAY,kBAAkB;IAC1B,mDAA6B,CAAA;IAC7B,2DAAqC,CAAA;IACrC,kEAA4C,CAAA;IAC5C,mEAA6C,CAAA;IAC7C,8CAAwB,CAAA;IACxB,0EAAoD,CAAA;IACpD,qFAA+D,CAAA;IAC/D,6DAAuC,CAAA;IACvC,yEAAmD,CAAA;IACnD,wEAAkD,CAAA;IAClD,2EAAqD,CAAA;IACrD,0EAAoD,CAAA;IACpD,uJAAiI,CAAA;AACrI,CAAC,EAdW,kBAAkB,KAAlB,kBAAkB;;ACN9B,MAAM,gBAAgB,GAAG,uxEAAuxE,CAAC;AACjzE,4BAAe,gBAAgB;;;;;;;;;;;;;;;;;;;MC2ClB,aAAa;;;;;;;;;;;;QA4Cd,eAAU,GAAeA,6BAAkB,EAAE,CAAC;QACtD,yCAAsC,IAAI,EAAC;QAK3C,kDAAyC,IAAI,EAAC;2BAnChB,EAAE;uBAKL,IAAI;;oBAUCC,2BAAe,CAAC,YAAY;qBAKpC,IAAI;;IA6C5B,UAAU;QACN,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;YAC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AC;aACL,IACH,CACA,CACH,EACT;KACL;IACD,oBAAoB;QAChB,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;KAC1C;;;;;;;;","names":["kupManagerInstance","FTypographyType","KupDynamicPositionPlacement","getProps","forceUpdate","setProps","h","Host","componentWrapperId","FTypography","FImage"],"sources":["src/components/kup-typography/kup-typography-declarations.ts","src/components/kup-typography/kup-typography.scss?tag=kup-typography&encapsulation=shadow","src/components/kup-typography/kup-typography.tsx"],"sourcesContent":["import { KupEventPayload } from '../../types/GenericTypes';\n\n/**\n * Props of the kup-typography component.\n * Used to export every prop in an object.\n */\nexport enum KupTypographyProps {\n data = 'the text of the text',\n Style = 'it is the style of the text',\n Border = 'when true it will appear a border',\n BorderWidth = 'it is the width of the border',\n Align = 'text alignment',\n FontBold = 'when true it will display the bold font',\n FontItalic = 'when true it will display the italic ( cursive )',\n FontName = 'it is the name of the font',\n FontSize = 'it is the size of the font of the text',\n FontULine = 'when true it will show the underline',\n FontColor = 'it is the color of the font of the text',\n BackColor = 'it is the background color of the text',\n Type = 'it is the type of the font. It is an enum that can take from different variant such as body, heading1, caption and so on',\n}\n\nexport interface KupTypographyIconClickEventPayload extends KupEventPayload {}\n\nexport interface KupTypographyClickEventPayload extends KupEventPayload {\n value: string;\n}\n","@import 'styles/kup-typography-main.scss';\n@import 'styles/kup-typography-classes.scss';\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n forceUpdate,\n h,\n Host,\n Method,\n Prop,\n} from '@stencil/core';\nimport { GenericObject, KupComponent } from '../../types/GenericTypes';\nimport { getProps, setProps } from '../../utils/utils';\nimport {\n KupManager,\n KupManagerClickCb,\n} from '../../managers/kup-manager/kup-manager-declarations';\nimport { kupManagerInstance } from '../../managers/kup-manager/kup-manager';\nimport { FTypography } from '../../f-components/f-typography/f-typography';\nimport {\n FTypographyProps,\n FTypographyType,\n} from '../../f-components/f-typography/f-typography-declarations';\nimport {\n KupTypographyClickEventPayload,\n KupTypographyIconClickEventPayload,\n KupTypographyProps,\n} from './kup-typography-declarations';\nimport { KupDataNode } from '../../managers/kup-data/kup-data-declarations';\nimport {\n KupDynamicPositionAnchor,\n KupDynamicPositionElement,\n KupDynamicPositionPlacement,\n} from '../../managers/kup-dynamic-position/kup-dynamic-position-declarations';\nimport { componentWrapperId } from '../../variables/GenericVariables';\nimport { FImage } from '../../f-components/f-image/f-image';\nimport { FImageProps } from '../../f-components/f-image/f-image-declarations';\nimport { KupToolbarItemClickEventPayload } from '../../managers/kup-toolbar/kup-toolbar-declarations';\n\n@Component({\n tag: 'kup-typography',\n styleUrl: 'kup-typography.scss',\n shadow: true,\n})\nexport class KupTypography {\n /**\n * References the root HTML element of the component (<kup-typography>).\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 * Manage the toolbar icon. If true is visible, otherwise is not\n * @default null\n */\n @Prop() toolbar: boolean = true;\n /**\n * Display DataNode Toolbar.\n * @default null\n */\n @Prop() toolbarData: KupDataNode[];\n /**\n * Sets the sizing of the textfield\n * @default FTypographyType.BODY_COMPACT\n */\n @Prop() type: FTypographyType = FTypographyType.BODY_COMPACT;\n /**\n * This is the content of the text\n * @default null\n */\n @Prop() value: string = null;\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 private kupManager: KupManager = kupManagerInstance();\n #clickCbDropCard: KupManagerClickCb = null;\n /**\n * Toolbar List.\n */\n private toolbarList: KupDynamicPositionElement;\n #dropDownActionCardAnchor: HTMLElement = null;\n\n /*-------------------------------------------------*/\n /* E v e n t s */\n /*-------------------------------------------------*/\n\n @Event({\n eventName: 'kup-typography-iconclick',\n composed: true,\n cancelable: false,\n bubbles: true,\n })\n kupIconClick: EventEmitter<KupTypographyIconClickEventPayload>;\n\n @Event({\n eventName: 'kup-typography-click',\n composed: true,\n cancelable: false,\n bubbles: true,\n })\n kupClick: EventEmitter<KupTypographyClickEventPayload>;\n\n @Event({\n eventName: 'kup-typography-itemclick',\n composed: true,\n cancelable: false,\n bubbles: true,\n })\n kupItemClick: EventEmitter<KupToolbarItemClickEventPayload>;\n\n onKupClick() {\n this.kupClick.emit({\n comp: this,\n id: this.rootElement.id,\n value: this.value,\n });\n }\n\n onKupIconClick(el: HTMLElement) {\n this.#dropDownActionCardAnchor = el;\n this.kupIconClick.emit({\n comp: this,\n id: this.rootElement.id,\n });\n this.createDropDownToolbarList();\n }\n\n onKupToolbarItemClick(e: CustomEvent) {\n this.kupItemClick.emit({\n comp: this,\n id: this.rootElement.id,\n value: this.value,\n node: e.detail.selected,\n });\n }\n\n /*-------------------------------------------------*/\n /* P r i v a t e M e t h o d s */\n /*-------------------------------------------------*/\n\n closeRowToolbarList() {\n if (this.toolbarList) {\n this.kupManager.dynamicPosition.stop(\n this.toolbarList as KupDynamicPositionElement\n );\n this.kupManager.removeClickCallback(this.#clickCbDropCard);\n this.toolbarList.remove();\n this.toolbarList = null;\n }\n }\n\n createDropDownToolbarList() {\n this.closeRowToolbarList();\n const listEl = document.createElement('kup-list');\n listEl.data = this.toolbarData;\n listEl.isMenu = true;\n listEl.menuVisible = true;\n listEl.addEventListener('kup-list-click', (e: CustomEvent) => {\n this.onKupToolbarItemClick(e);\n setTimeout(() => {\n this.closeRowToolbarList();\n }, 0);\n });\n this.toolbarList = listEl;\n this.#clickCbDropCard = {\n cb: () => {\n this.closeRowToolbarList();\n },\n el: this.toolbarList,\n };\n\n this.kupManager.addClickCallback(this.#clickCbDropCard, true);\n this.rootElement.shadowRoot.appendChild(this.toolbarList);\n requestAnimationFrame(() => {\n this.kupManager.dynamicPosition.register(\n this.toolbarList as unknown as KupDynamicPositionElement,\n this.#dropDownActionCardAnchor as KupDynamicPositionAnchor,\n 0,\n KupDynamicPositionPlacement.AUTO,\n true\n );\n this.kupManager.dynamicPosition.start(\n this.toolbarList as unknown as KupDynamicPositionElement\n );\n });\n }\n\n /*-------------------------------------------------*/\n /* P u b l i c M e t h o d s */\n /*-------------------------------------------------*/\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, KupTypographyProps, 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 * 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, KupTypographyProps, props);\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.debug.logLoad(this, false);\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.kupManager.debug.logRender(this, true);\n }\n\n render() {\n const props: FTypographyProps = {\n toolbar: this.toolbar,\n value: this.value,\n type: this.type,\n };\n\n const propsFImage: FImageProps = {\n color: 'var(--kup-gray-color-70)',\n resource: 'more_vert',\n sizeX: '16px',\n sizeY: '16px',\n wrapperClass: 'image__iconToolbar',\n };\n const classObjParent: Record<string, boolean> = {\n 'kup-typography--wrap': props.toolbar ? true : false,\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 class={classObjParent}\n onClick={() => this.onKupClick}\n >\n <FTypography {...props} />\n <FImage\n {...propsFImage}\n onClick={(event: MouseEvent) => {\n event.stopPropagation();\n this.onKupIconClick(\n event.currentTarget as HTMLElement\n );\n }}\n />\n </div>\n </Host>\n );\n }\n disconnectedCallback() {\n this.kupManager.theme.unregister(this);\n }\n}\n"],"version":3}
@@ -564,13 +564,13 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
564
564
  'input-panel__section': !section.horizontal,
565
565
  'input-panel__horizontal-section': section.horizontal,
566
566
  };
567
- const sectionStyle = Object.assign(Object.assign({}, styleObj), { gap: +section.gap > 0 ? `${section.gap}rem` : '', 'grid-template-columns': +section.gridCols > 0 ? `repeat(${section.gridCols}, 1fr)` : '', 'grid-template-rows': +section.gridRows > 0 ? `repeat(${section.gridRows}, 1fr)` : '' });
568
567
  if ((_d = (_c = cells.row) === null || _c === void 0 ? void 0 : _c.layout) === null || _d === void 0 ? void 0 : _d.horizontal) {
569
568
  styleObj.maxWidth = section.dim;
570
569
  }
571
570
  else {
572
571
  styleObj.maxHeight = section.dim;
573
572
  }
573
+ const sectionStyle = Object.assign(Object.assign({}, styleObj), { gap: +section.gap > 0 ? `${section.gap}rem` : '', 'grid-template-columns': +section.gridCols > 0 ? `repeat(${section.gridCols}, 1fr)` : '', 'grid-template-rows': +section.gridRows > 0 ? `repeat(${section.gridRows}, 1fr)` : '' });
574
574
  const sectionContent = (h("div", { class: classObj, style: sectionStyle }, content));
575
575
  return section.title && !customLabelRender ? (h("div", { class: { 'input-panel__section_label_container': true } }, h("h3", null, section.title), sectionContent)) : (sectionContent);
576
576
  }, _KupInputPanel_renderAbsoluteSection = function _KupInputPanel_renderAbsoluteSection(cells, section) {