@sme.up/ketchup 11.0.0-SNAPSHOT-20241118162146 → 11.0.0-SNAPSHOT-20241118173527

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.
@@ -1 +1 @@
1
- {"version":3,"file":"kup-dialog.js","sourceRoot":"","sources":["../../../src/components/kup-dialog/kup-dialog.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EACH,SAAS,EACT,OAAO,EACP,KAAK,EAEL,WAAW,EACX,CAAC,EACD,IAAI,EACJ,MAAM,EACN,IAAI,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAM5E,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAIH,cAAc,GACjB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iDAAiD,CAAC;AAOnF,MAAM,OAAO,SAAS;;QA+ClB,qDAAqD;QACrD,qDAAqD;QACrD,qDAAqD;QAErD,4BAAuB,IAAI,EAAC;QAC5B,gCAAc,kBAAkB,EAAE,EAAC;QACnC,qCAAmB,CAAC,EAAC;0BAvCqB,EAAE,OAAO,EAAE,IAAI,EAAE;2BAMrC,EAAE;sBAKU,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;qBAK5B,EAAE,oBAAoB,EAAE,IAAI,EAAE;yBAK1C,IAAI;qBAKR,MAAM;qBAKN,MAAM;;IA8BtB,qDAAqD;IACrD,qDAAqD;IACrD,qDAAqD;IAErD;;OAEG;IAEH,KAAK,CAAC,KAAK;QACP,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;YACf,IAAI,EAAE,IAAI;YACV,EAAE,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import {\n Component,\n Element,\n Event,\n EventEmitter,\n forceUpdate,\n h,\n Host,\n Method,\n Prop,\n} from '@stencil/core';\nimport { FImage } from '../../f-components/f-image/f-image';\nimport { kupManagerInstance } from '../../managers/kup-manager/kup-manager';\nimport {\n GenericObject,\n KupComponent,\n KupEventPayload,\n} from '../../types/GenericTypes';\nimport { getProps, setProps } from '../../utils/utils';\nimport { componentWrapperId } from '../../variables/GenericVariables';\nimport {\n KupDialogAutoCenter,\n KupDialogHeader,\n KupDialogModal,\n KupDialogProps,\n} from './kup-dialog-declarations';\nimport { KupDebugCategory } from '../../managers/kup-debug/kup-debug-declarations';\n\n@Component({\n tag: 'kup-dialog',\n styleUrl: 'kup-dialog.scss',\n shadow: true,\n})\nexport class KupDialog {\n /**\n * References the root HTML element of the component (<kup-dialog>).\n */\n @Element() rootElement: HTMLElement;\n\n /*-------------------------------------------------*/\n /* P r o p s */\n /*-------------------------------------------------*/\n\n /**\n * Auto centers the dialog relatively to the viewport.\n * @default \"{ onReady: true }\"\n */\n @Prop() autoCenter: KupDialogAutoCenter = { onReady: true };\n /**\n * Custom style of the component.\n * @default \"\"\n * @see https://smeup.github.io/ketchup/#/customization\n */\n @Prop() customStyle = '';\n /**\n * Header options.\n * @default \"{ icons: { close: true } }\"\n */\n @Prop() header: KupDialogHeader = { icons: { close: true } };\n /**\n * Set of options to display the dialog as a modal.\n * @default \"{ closeOnBackdropClick: true }\"\n */\n @Prop() modal: KupDialogModal = { closeOnBackdropClick: true };\n /**\n * Sets whether the dialog is resizable or not.\n * @default \"true\"\n */\n @Prop() resizable = true;\n /**\n * The width of the dialog, defaults to auto. Accepts any valid CSS format (px, %, vw, etc.).\n * @default \"auto\"\n */\n @Prop() sizeX = 'auto';\n /**\n * The height of the card, defaults to auto. Accepts any valid CSS format (px, %, vh, etc.).\n * @default \"auto\"\n */\n @Prop() sizeY = 'auto';\n\n /*-------------------------------------------------*/\n /* I n t e r n a l V a r i a b l e s */\n /*-------------------------------------------------*/\n\n #header: HTMLElement = null;\n #kupManager = kupManagerInstance();\n #recalcSafeguard = 0;\n\n /*-------------------------------------------------*/\n /* E v e n t s */\n /*-------------------------------------------------*/\n\n @Event({\n eventName: 'kup-dialog-close',\n composed: true,\n cancelable: false,\n bubbles: true,\n })\n kupClose: EventEmitter<KupEventPayload>;\n\n @Event({\n eventName: 'kup-dialog-ready',\n composed: true,\n cancelable: false,\n bubbles: true,\n })\n kupReady: EventEmitter<KupEventPayload>;\n\n /*-------------------------------------------------*/\n /* P u b l i c M e t h o d s */\n /*-------------------------------------------------*/\n\n /**\n * Closes the dialog detaching it from the DOM.\n */\n @Method()\n async close(): Promise<void> {\n this.kupClose.emit({\n comp: this,\n id: this.rootElement.id,\n });\n this.rootElement.remove();\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, KupDialogProps, descriptions);\n }\n /**\n * Places the dialog at the center of the screen.\n */\n @Method()\n async recalcPosition(): Promise<void> {\n const rect = this.rootElement.getBoundingClientRect();\n if (!rect.x && !rect.y && !rect.height && !rect.width) {\n this.#kupManager.debug.logMessage(\n this,\n `recalcPosition() ran before the component finished being drawn. Running again (attempt #${\n this.#recalcSafeguard\n }).`,\n KupDebugCategory.INFO\n );\n if (this.#recalcSafeguard < 50) {\n this.#recalcSafeguard++;\n setTimeout(async () => this.recalcPosition(), 50);\n return;\n } else {\n this.#kupManager.debug.logMessage(\n this,\n `Too many attempts centering the dialog.`,\n KupDebugCategory.WARNING\n );\n }\n }\n this.#recalcSafeguard = 0;\n const left = window.innerWidth / 2 - rect.width / 2;\n const top = window.innerHeight / 2 - rect.height / 2 + window.scrollY;\n this.rootElement.style.setProperty('--kup_dialog_left', left + 'px');\n this.rootElement.style.setProperty('--kup_dialog_top', top + 'px');\n this.rootElement.removeAttribute('fade-in');\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, KupDialogProps, 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.interact.dialogify(\n this.rootElement,\n this.#header ? this.#header : null,\n !this.resizable\n );\n if (this.autoCenter?.onReady) {\n this.recalcPosition();\n } else {\n this.rootElement.removeAttribute('fade-in');\n }\n if (this.modal) {\n this.#kupManager.interact.showModalBackdrop(\n this.modal.closeOnBackdropClick\n ? () => {\n this.close();\n }\n : null\n );\n }\n this.kupReady.emit({\n comp: this,\n id: this.rootElement.id,\n });\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 style = {\n '--kup_dialog_height': this.sizeY ? this.sizeY : 'auto',\n '--kup_dialog_width': this.sizeX ? this.sizeX : 'auto',\n };\n\n return (\n <Host fade-in style={style}>\n <style>\n {this.#kupManager.theme.setKupStyle(\n this.rootElement as KupComponent\n )}\n </style>\n <div id={componentWrapperId}>\n {this.header ? (\n <div class=\"header\" ref={(el) => (this.#header = el)}>\n {this.header.title ? (\n <div class=\"header__title\">\n {this.header.title}\n </div>\n ) : null}\n {this.header.icons?.close ? (\n <FImage\n onClick={() => this.close()}\n sizeX=\"1.25em\"\n sizeY=\"100%\"\n resource=\"clear\"\n wrapperClass=\"header__close\"\n ></FImage>\n ) : null}\n </div>\n ) : (\n <slot\n name=\"header\"\n ref={(el: HTMLElement) => (this.#header = el)}\n ></slot>\n )}\n <div class=\"content\">\n <slot name=\"content\"></slot>\n </div>\n </div>\n </Host>\n );\n }\n\n disconnectedCallback() {\n if (this.modal) {\n this.#kupManager.interact.hideModalBackdrop();\n }\n this.#kupManager.theme.unregister(this);\n }\n}\n"]}
1
+ {"version":3,"file":"kup-dialog.js","sourceRoot":"","sources":["../../../src/components/kup-dialog/kup-dialog.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EACH,SAAS,EACT,OAAO,EACP,KAAK,EAEL,WAAW,EACX,CAAC,EACD,IAAI,EACJ,MAAM,EACN,IAAI,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAM5E,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAIH,cAAc,GACjB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iDAAiD,CAAC;AAOnF,MAAM,OAAO,SAAS;;QA+ClB,qDAAqD;QACrD,qDAAqD;QACrD,qDAAqD;QAErD,4BAAuB,IAAI,EAAC;QAC5B,gCAAc,kBAAkB,EAAE,EAAC;QACnC,qCAAmB,CAAC,EAAC;0BAvCqB,EAAE,OAAO,EAAE,IAAI,EAAE;2BAMrC,EAAE;sBAKU,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;qBAK5B,EAAE,oBAAoB,EAAE,IAAI,EAAE;yBAK1C,IAAI;qBAKR,MAAM;qBAKN,MAAM;;IA8BtB,qDAAqD;IACrD,qDAAqD;IACrD,qDAAqD;IAErD;;OA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import {\n Component,\n Element,\n Event,\n EventEmitter,\n forceUpdate,\n h,\n Host,\n Method,\n Prop,\n} from '@stencil/core';\nimport { FImage } from '../../f-components/f-image/f-image';\nimport { kupManagerInstance } from '../../managers/kup-manager/kup-manager';\nimport {\n GenericObject,\n KupComponent,\n KupEventPayload,\n} from '../../types/GenericTypes';\nimport { getProps, setProps } from '../../utils/utils';\nimport { componentWrapperId } from '../../variables/GenericVariables';\nimport {\n KupDialogAutoCenter,\n KupDialogHeader,\n KupDialogModal,\n KupDialogProps,\n} from './kup-dialog-declarations';\nimport { KupDebugCategory } from '../../managers/kup-debug/kup-debug-declarations';\n\n@Component({\n tag: 'kup-dialog',\n styleUrl: 'kup-dialog.scss',\n shadow: true,\n})\nexport class KupDialog {\n /**\n * References the root HTML element of the component (<kup-dialog>).\n */\n @Element() rootElement: HTMLElement;\n\n /*-------------------------------------------------*/\n /* P r o p s */\n /*-------------------------------------------------*/\n\n /**\n * Auto centers the dialog relatively to the viewport.\n * @default \"{ onReady: true }\"\n */\n @Prop() autoCenter: KupDialogAutoCenter = { onReady: true };\n /**\n * Custom style of the component.\n * @default \"\"\n * @see https://smeup.github.io/ketchup/#/customization\n */\n @Prop() customStyle = '';\n /**\n * Header options.\n * @default \"{ icons: { close: true } }\"\n */\n @Prop() header: KupDialogHeader = { icons: { close: true } };\n /**\n * Set of options to display the dialog as a modal.\n * @default \"{ closeOnBackdropClick: true }\"\n */\n @Prop() modal: KupDialogModal = { closeOnBackdropClick: true };\n /**\n * Sets whether the dialog is resizable or not.\n * @default \"true\"\n */\n @Prop() resizable = true;\n /**\n * The width of the dialog, defaults to auto. Accepts any valid CSS format (px, %, vw, etc.).\n * @default \"auto\"\n */\n @Prop() sizeX = 'auto';\n /**\n * The height of the card, defaults to auto. Accepts any valid CSS format (px, %, vh, etc.).\n * @default \"auto\"\n */\n @Prop() sizeY = 'auto';\n\n /*-------------------------------------------------*/\n /* I n t e r n a l V a r i a b l e s */\n /*-------------------------------------------------*/\n\n #header: HTMLElement = null;\n #kupManager = kupManagerInstance();\n #recalcSafeguard = 0;\n\n /*-------------------------------------------------*/\n /* E v e n t s */\n /*-------------------------------------------------*/\n\n @Event({\n eventName: 'kup-dialog-close',\n composed: true,\n cancelable: false,\n bubbles: true,\n })\n kupClose: EventEmitter<KupEventPayload>;\n\n @Event({\n eventName: 'kup-dialog-ready',\n composed: true,\n cancelable: false,\n bubbles: true,\n })\n kupReady: EventEmitter<KupEventPayload>;\n\n /*-------------------------------------------------*/\n /* P u b l i c M e t h o d s */\n /*-------------------------------------------------*/\n\n /**\n * Closes the dialog detaching it from the DOM.\n */\n @Method()\n async close(): Promise<void> {\n this.kupClose.emit({\n comp: this,\n id: this.rootElement.id,\n });\n this.rootElement.remove();\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, KupDialogProps, descriptions);\n }\n /**\n * Places the dialog at the center of the screen.\n */\n @Method()\n async recalcPosition(): Promise<void> {\n const rect = this.rootElement.getBoundingClientRect();\n if (!rect.x && !rect.y && !rect.height && !rect.width) {\n this.#kupManager.debug.logMessage(\n this,\n `recalcPosition() ran before the component finished being drawn. Running again (attempt #${\n this.#recalcSafeguard\n }).`,\n KupDebugCategory.INFO\n );\n if (this.#recalcSafeguard < 50) {\n this.#recalcSafeguard++;\n setTimeout(async () => this.recalcPosition(), 50);\n return;\n } else {\n this.#kupManager.debug.logMessage(\n this,\n `Too many attempts centering the dialog.`,\n KupDebugCategory.WARNING\n );\n }\n }\n this.#recalcSafeguard = 0;\n const left = window.innerWidth / 2 - rect.width / 2;\n const top = window.innerHeight / 2 - rect.height / 2 + window.scrollY;\n this.rootElement.style.setProperty('--kup_dialog_left', left + 'px');\n this.rootElement.style.setProperty('--kup_dialog_top', top + 'px');\n this.rootElement.removeAttribute('fade-in');\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, KupDialogProps, 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.interact.dialogify(\n this.rootElement,\n this.#header ? this.#header : null,\n !this.resizable\n );\n if (this.autoCenter?.onReady) {\n this.recalcPosition();\n } else {\n this.rootElement.removeAttribute('fade-in');\n }\n if (this.modal) {\n this.#kupManager.interact.showModalBackdrop(\n this.modal.closeOnBackdropClick\n ? () => {\n this.close();\n }\n : null\n );\n }\n this.kupReady.emit({\n comp: this,\n id: this.rootElement.id,\n });\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 style = {\n '--kup_dialog_height': this.sizeY ? this.sizeY : 'auto',\n '--kup_dialog_width': this.sizeX ? this.sizeX : 'auto',\n };\n\n const headerSlot = this.rootElement.querySelector('[slot=\"header\"]');\n if (headerSlot) {\n this.#header = headerSlot as HTMLElement;\n }\n\n return (\n <Host fade-in style={style}>\n <style>\n {this.#kupManager.theme.setKupStyle(\n this.rootElement as KupComponent\n )}\n </style>\n <div id={componentWrapperId}>\n {this.header ? (\n <div class=\"header\" ref={(el) => (this.#header = el)}>\n {this.header.title ? (\n <div class=\"header__title\">\n {this.header.title}\n </div>\n ) : null}\n {this.header.icons?.close ? (\n <FImage\n onClick={() => this.close()}\n sizeX=\"1.25em\"\n sizeY=\"100%\"\n resource=\"clear\"\n wrapperClass=\"header__close\"\n ></FImage>\n ) : null}\n </div>\n ) : headerSlot ? (\n <slot name=\"header\"></slot>\n ) : null}\n <div class=\"content\">\n <slot name=\"content\"></slot>\n </div>\n </div>\n </Host>\n );\n }\n\n disconnectedCallback() {\n if (this.modal) {\n this.#kupManager.interact.hideModalBackdrop();\n }\n this.#kupManager.theme.unregister(this);\n }\n}\n"]}
@@ -191,7 +191,7 @@ export class KupInputPanel {
191
191
  h("p", null, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.translate(KupLanguageGeneric.EMPTY_DATA)),
192
192
  ]
193
193
  : this.inputPanelCells.map((inputPanelCell) => __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderRow).call(this, inputPanelCell));
194
- return (h(Host, { key: '4dfa278417a976d678f4d17b92709fee129f2761' }, h("style", { key: '6ecaae03195df43b0ccf8e5c2cd2160009b2d5f9' }, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { key: '0740765eb3c4e079a9eab9e206b1d93d1d6b2f1f', id: componentWrapperId }, inputPanelContent)));
194
+ return (h(Host, { key: '208ef39dde9b30e142b33e1883ee8a0a675b6cec' }, h("style", { key: '840da84aeb634e5038acf6166c79c3b1816219d5' }, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { key: '527da35c3c333cd961dea61b9289cd63f8d45539', id: componentWrapperId }, inputPanelContent)));
195
195
  }
196
196
  disconnectedCallback() {
197
197
  __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.unregister(this);
@@ -855,7 +855,7 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
855
855
  left,
856
856
  overflow: 'auto',
857
857
  };
858
- fieldCell.cell.data = Object.assign(Object.assign({}, fieldCell.cell.data), { customStyle: (fieldCell.cell.data.customStyle || '') +
858
+ fieldCell.cell.data = Object.assign(Object.assign({}, fieldCell.cell.data), { sizing: 'extra-small', customStyle: (fieldCell.cell.data.customStyle || '') +
859
859
  '.mdc-text-field {height: unset !important;}' });
860
860
  return (h("div", { style: styleObj }, __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderCell).call(this, fieldCell.cell, cells.row, fieldCell.column)));
861
861
  }, _KupInputPanel_mapCommands = function _KupInputPanel_mapCommands() {
@@ -1008,7 +1008,7 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
1008
1008
  }
1009
1009
  if (cellType === FCellTypes.MULTI_AUTOCOMPLETE ||
1010
1010
  cellType === FCellTypes.MULTI_COMBOBOX) {
1011
- return Object.assign(Object.assign({}, __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_CMBandACPAdapter).call(this, cell.options, col.title, null, cell, col.name)), { showDropDownIcon: true, class: '', style: { width: '100%' }, disabled: !cell.editable, id: col.name });
1011
+ return Object.assign(Object.assign({}, __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_CMBandACPAdapter).call(this, cell.options, col.title, null, cell, col.name)), { showDropDownIcon: true, class: '', style: { width: '100%' }, disabled: !cell.editable, id: col.name, sizing: KupComponentSizing.EXTRA_SMALL });
1012
1012
  }
1013
1013
  return null;
1014
1014
  }, _KupInputPanel_CHIAdapter = function _KupInputPanel_CHIAdapter(_options, _fieldLabel, currentValue, cell, id) {