ids-enterprise-wc 1.15.9-patch.19 → 1.15.9-patch.20
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.
- package/chunks/{ids-chunk-AOCK6PF3-full.js → ids-chunk-IZWNCK4C-full.js} +32 -5
- package/chunks/{ids-chunk-AOCK6PF3-full.js.map → ids-chunk-IZWNCK4C-full.js.map} +2 -2
- package/chunks/{ids-chunk-EDQ2YH35-full.js → ids-chunk-MHSSTALO-full.js} +3 -3
- package/chunks/{ids-chunk-AKBAXNZI-full.js → ids-chunk-TRPOCB4F-full.js} +32 -5
- package/chunks/ids-chunk-TRPOCB4F-full.js.map +7 -0
- package/components/ids-accordion/ids-accordion.css +77 -141
- package/components/ids-calendar/ids-calendar.css +190 -265
- package/components/ids-checkbox/ids-checkbox.css +7 -580
- package/components/ids-data-grid/ids-data-grid-editors.js +1 -1
- package/components/ids-data-grid/ids-data-grid-formatters.js +1 -1
- package/components/ids-data-grid/ids-data-grid.js +3 -3
- package/components/ids-date-picker/ids-date-picker.css +389 -31
- package/components/ids-hierarchy/ids-hierarchy.css +14 -117
- package/components/ids-hyperlink/ids-hyperlink.css +15 -188
- package/components/ids-layout-flex/ids-layout-flex.css +6 -69
- package/components/ids-menu/ids-menu.css +17 -11
- package/components/ids-modal/ids-modal.css +94 -23
- package/components/ids-pager/ids-pager.css +28 -25
- package/components/ids-tabs/ids-tabs.css +11 -336
- package/components/ids-toolbar/ids-toolbar.css +12 -122
- package/custom-elements.json +54 -0
- package/enterprise-wc.all.iife.js +59 -8
- package/enterprise-wc.all.iife.js.map +2 -2
- package/enterprise-wc.js +3 -3
- package/package.json +1 -1
- package/chunks/ids-chunk-AKBAXNZI-full.js.map +0 -7
- /package/chunks/{ids-chunk-EDQ2YH35-full.js.map → ids-chunk-MHSSTALO-full.js.map} +0 -0
|
@@ -496,11 +496,31 @@ var DatePickerEditor = class {
|
|
|
496
496
|
applyEditorSettings(component, cell?.column.editor?.editorSettings);
|
|
497
497
|
return component;
|
|
498
498
|
}
|
|
499
|
+
/**
|
|
500
|
+
* Resolves the date format used for the value the user sees while editing.
|
|
501
|
+
* Falls back to the editor format, then the locale default, so grids that
|
|
502
|
+
* only configure `editorSettings.format` keep their previous behavior.
|
|
503
|
+
* @param {IdsDataGridCell} cell the editing cell
|
|
504
|
+
* @returns {string | undefined} the display date format, if any
|
|
505
|
+
*/
|
|
506
|
+
#displayFormat(cell) {
|
|
507
|
+
const formatOptionsFormat = cell?.column?.formatOptions?.format;
|
|
508
|
+
const editorFormat = cell?.column?.editor?.editorSettings?.format;
|
|
509
|
+
return formatOptionsFormat || editorFormat || void 0;
|
|
510
|
+
}
|
|
499
511
|
#update(cell, dateString) {
|
|
500
|
-
const
|
|
512
|
+
const displayFormat = this.#displayFormat(cell);
|
|
513
|
+
const editorFormat = cell?.column?.editor?.editorSettings?.format || void 0;
|
|
514
|
+
let inputDate = cell?.dataGrid.localeAPI.parseDate(
|
|
501
515
|
dateString,
|
|
502
|
-
{ dateFormat:
|
|
516
|
+
{ dateFormat: displayFormat }
|
|
503
517
|
);
|
|
518
|
+
if ((!inputDate || !isValidDate(inputDate)) && editorFormat && editorFormat !== displayFormat) {
|
|
519
|
+
inputDate = cell?.dataGrid.localeAPI.parseDate(
|
|
520
|
+
dateString,
|
|
521
|
+
{ dateFormat: editorFormat }
|
|
522
|
+
);
|
|
523
|
+
}
|
|
504
524
|
if (!dateString || !isValidDate(inputDate)) {
|
|
505
525
|
this.#displayValue = dateString;
|
|
506
526
|
this.#value = void 0;
|
|
@@ -519,7 +539,7 @@ var DatePickerEditor = class {
|
|
|
519
539
|
} else {
|
|
520
540
|
this.#value = inputDate;
|
|
521
541
|
}
|
|
522
|
-
this.#displayValue = cell.dataGrid.localeAPI.formatDate(this.#value,
|
|
542
|
+
this.#displayValue = cell.dataGrid.localeAPI.formatDate(this.#value, { dateFormat: displayFormat });
|
|
523
543
|
}
|
|
524
544
|
#stopPropagation(evt) {
|
|
525
545
|
const isOpen = this.input?.popup?.hidden === false;
|
|
@@ -537,8 +557,15 @@ var DatePickerEditor = class {
|
|
|
537
557
|
}
|
|
538
558
|
save(cell) {
|
|
539
559
|
this.#update(cell, cell?.value);
|
|
560
|
+
const editorFormat = cell?.column?.editor?.editorSettings?.format || void 0;
|
|
561
|
+
let dateValue;
|
|
562
|
+
if (editorFormat && this.#value instanceof Date) {
|
|
563
|
+
dateValue = cell.dataGrid.localeAPI.formatDate(this.#value, { dateFormat: editorFormat });
|
|
564
|
+
} else {
|
|
565
|
+
dateValue = this.#value?.toISOString();
|
|
566
|
+
}
|
|
540
567
|
return {
|
|
541
|
-
value: this.#
|
|
568
|
+
value: (dateValue || this.#displayValue) ?? "",
|
|
542
569
|
dirtyCheckValue: this.#displayValue
|
|
543
570
|
};
|
|
544
571
|
}
|
|
@@ -815,4 +842,4 @@ export {
|
|
|
815
842
|
LookupEditor,
|
|
816
843
|
editors
|
|
817
844
|
};
|
|
818
|
-
//# sourceMappingURL=ids-chunk-
|
|
845
|
+
//# sourceMappingURL=ids-chunk-IZWNCK4C-full.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/components/ids-data-grid/ids-data-grid-editors.ts"],
|
|
4
|
-
"sourcesContent": ["// eslint-disable-next-line max-classes-per-file\nimport { isValidDate } from '../../utils/ids-date-utils/ids-date-utils';\nimport { stringToBool } from '../../utils/ids-string-utils/ids-string-utils';\nimport IdsCheckbox from '../ids-checkbox/ids-checkbox';\nimport IdsDropdown from '../ids-dropdown/ids-dropdown';\nimport IdsDropdownList from '../ids-dropdown/ids-dropdown-list';\nimport IdsInput from '../ids-input/ids-input';\nimport IdsTriggerField from '../ids-trigger-field/ids-trigger-field';\nimport type IdsButton from '../ids-button/ids-button';\nimport type IdsDataGridCell from './ids-data-grid-cell';\nimport type IdsDatePicker from '../ids-date-picker/ids-date-picker';\nimport type IdsDatePickerPopup from '../ids-date-picker/ids-date-picker-popup';\nimport type IdsLookup from '../ids-lookup/ids-lookup';\nimport type IdsModal from '../ids-modal/ids-modal';\nimport type IdsTimePicker from '../ids-time-picker/ids-time-picker';\nimport type IdsTimePickerPopup from '../ids-time-picker/ids-time-picker-popup';\nimport '../ids-time-picker/ids-time-picker';\nimport '../ids-date-picker/ids-date-picker';\nimport '../ids-lookup/ids-lookup';\nimport { IdsValidationRule } from '../../mixins/ids-validation-mixin/ids-validation-mixin';\nimport { attributes } from '../../core/ids-attributes';\nimport IdsIcon from '../ids-icon/ids-icon';\nimport { getClosest } from '../../utils/ids-dom-utils/ids-dom-utils';\n\nexport interface IdsDataGridEditorOptions {\n /** The type of editor (i.e. text, data, time, dropdown, checkbox, number ect) */\n type: string;\n /** The field in the data set to show */\n field: string;\n /** If true the editor will remain visible */\n inline: boolean;\n}\n\nexport interface IdsDataGridSaveValue {\n // value to be saved in data set\n value?: string | number | boolean | null;\n // (optional) value used for dirty checking\n dirtyCheckValue?: string | number | boolean | null;\n}\n\nexport interface IdsDataGridEditor {\n /** The type of editor (i.e. input, dropdown, checkbox ect) */\n type: string;\n /** The main editor element */\n input?: IdsInput | IdsCheckbox | IdsDropdown | IdsDatePicker | IdsTimePicker | IdsLookup;\n /** Optional Popup interface for some cell types */\n popup?: IdsDatePickerPopup | IdsTimePickerPopup | IdsModal;\n /** The function that invokes and sets values on the input */\n init: (cell?: IdsDataGridCell) => void;\n /** The function that transforms and saved the editor */\n save: (cell?: IdsDataGridCell) => IdsDataGridSaveValue | undefined | null;\n /** The function that tears down all aspects of the editor */\n destroy: (cell?: IdsDataGridCell) => void;\n /** MouseEvent if click was used to edit */\n clickEvent?: MouseEvent;\n /** The function that returns the input-element's value */\n value: () => boolean | number | string;\n /** The function that changes the input-element's value */\n change: (newValue: boolean | number | string) => void;\n}\n\nconst applyEditorSettings = (elem: any, settings?: Record<string, any>) => {\n // eslint-disable-next-line guard-for-in\n for (const setting in settings) {\n elem[setting] = settings[setting];\n }\n};\n\nconst applyEditorValidation = (elem: any, validation?: Partial<IdsValidationRule>) => {\n if (elem?.addValidationRule && validation) {\n validation.type = 'error';\n elem?.addValidationRule?.(validation);\n }\n};\n\nconst applyEditorDropdownFocus = async (editor: IdsDataGridEditor) => {\n const autoOpen = (<HTMLElement> editor.clickEvent?.target)?.classList?.contains('editor-cell-icon');\n if (autoOpen) {\n await editor.input?.open();\n }\n editor.input?.dropdownList?.focus();\n};\n\nconst applyEditorPopupFocus = async (editor: IdsDataGridEditor) => {\n const autoOpen = (<HTMLElement> editor.clickEvent?.target)?.classList?.contains('editor-cell-icon');\n if (autoOpen) {\n await editor.popup?.show();\n editor.popup?.focus();\n } else {\n editor.input?.focus();\n }\n};\n\nconst applyEditorEndCellEdit = (cell: IdsDataGridCell, e: KeyboardEvent) => {\n if (e.code === 'Escape') {\n e.stopImmediatePropagation();\n e.stopPropagation();\n e.preventDefault();\n cell?.cancelCellEdit();\n cell?.focus();\n }\n};\n\nexport class InputEditor implements IdsDataGridEditor {\n /** The type of editor (i.e. input, dropdown, checkbox ect) */\n type = 'input';\n\n /** Holds the Editor */\n input?: IdsInput;\n\n /**\n * Create an input and set the value and focus states\n * @param {IdsDataGridCell} cell the cell element\n */\n init(cell?: IdsDataGridCell) {\n const isInline = cell?.column.editor?.inline;\n this.input = <IdsInput> document.createElement('ids-input');\n this.input.colorVariant = isInline ? 'in-cell' : 'borderless';\n this.input.size = 'full';\n this.input.fieldHeight = String(cell?.dataGrid?.rowHeight) === 'xxs' ? `xs` : String(cell?.dataGrid?.rowHeight);\n this.input.labelState = 'collapsed';\n\n // Clear cell and set value\n const value = cell?.innerText;\n const treeFieldContainer = cell?.querySelector('.ids-data-grid-tree-field-container');\n if (treeFieldContainer) {\n // For tree-formatted cells, replace only the text container to preserve the expand/collapse icon\n treeFieldContainer.innerHTML = '';\n treeFieldContainer.appendChild(this.input as any);\n } else {\n cell!.innerHTML = '';\n cell?.appendChild(this.input as any);\n }\n this.input.addEventListener('keydown', (e) => applyEditorEndCellEdit(cell!, e));\n\n this.input.value = value;\n\n if (this.input instanceof IdsInput && cell) {\n if (!isInline) this.input.shadowRoot?.querySelector('input')?.style.setProperty('width', `${cell.offsetWidth - 5}px`);\n const settings = { ...cell?.column.editor?.editorSettings };\n const shouldAutoselect = settings?.autoselect;\n delete settings.autoselect;\n applyEditorSettings(this.input, settings);\n applyEditorValidation(this.input, cell?.column.editor?.editorValidation);\n const nativeInput = this.input.shadowRoot?.querySelector('input');\n if (shouldAutoselect) {\n nativeInput?.select();\n }\n }\n this.input.focus();\n }\n\n /* Transform the value */\n save() {\n return { value: this.input?.value };\n }\n\n /* Destroy the editor */\n destroy() {\n this.input = undefined;\n }\n\n value() {\n return this.input?.value ?? '';\n }\n\n change(newValue: boolean | number | string) {\n if (this.input) this.input.value = String(newValue);\n }\n}\n\n/**\n * Password Input Editor for IDS Data Grid\n * Shows masked input with revealed last characters and toggle button\n */\nexport class PasswordInputEditor extends InputEditor {\n type = 'password';\n\n #toggleButton?: IdsIcon;\n\n /**\n * Create a password input and set the value and focus states\n * @param {IdsDataGridCell} cell the cell element\n */\n init(cell?: IdsDataGridCell) {\n super.init(cell);\n const dataIndex = getClosest(cell, 'ids-data-grid-row').getAttribute('data-index');\n const rowData = getClosest(cell, 'ids-data-grid').data[dataIndex];\n const isInline = cell?.column.editor?.inline;\n\n // Make the input password type\n this.input!.type = 'password';\n\n // Create toggle button\n this.#toggleButton = <IdsIcon> document.createElement('ids-icon');\n this.#toggleButton.icon = 'show-item';\n this.#toggleButton.classList.add('editor-cell-icon');\n this.#toggleButton.classList.add('text-mask');\n\n // Clear cell and set value\n const value = rowData[cell!.column.id];\n cell!.innerHTML = '';\n\n // Add input and button to container\n cell?.appendChild(this.input as any);\n cell?.appendChild(this.#toggleButton as any);\n\n // set value to the input\n this.input!.value = value;\n\n // Handle toggle button click\n this.#toggleButton.offEvent('click');\n this.#toggleButton.onEvent('click', this.#toggleButton, () => {\n if (!this.input || !this.#toggleButton) {\n return;\n }\n\n const masked = this.input.type === 'password';\n\n const inputEl = this.input.shadowRoot?.querySelector('input');\n\n // Store current cursor position\n let cursorPos = 0;\n if (inputEl) {\n cursorPos = inputEl.selectionStart || 0;\n }\n\n if (masked) {\n this.input.type = 'text';\n this.#toggleButton.icon = 'hide-item';\n } else {\n this.#toggleButton.icon = 'show-item';\n this.input.type = 'password';\n }\n\n this.input.focus();\n\n // Restore cursor position\n if (inputEl) {\n setTimeout(() => {\n inputEl.setSelectionRange(cursorPos, cursorPos);\n }, 0);\n }\n });\n\n if (this.input instanceof IdsInput && cell) {\n if (!isInline) this.input.shadowRoot?.querySelector('input')?.style.setProperty('width', `100%`);\n applyEditorSettings(this.input, cell?.column.editor?.editorSettings);\n applyEditorValidation(this.input, cell?.column.editor?.editorValidation);\n }\n this.input!.focus();\n }\n\n /**\n * Transform the value for saving\n * @returns {IdsDataGridSaveValue} The value to save\n */\n save() {\n return { value: this.input?.value };\n }\n\n /**\n * Destroy the editor\n */\n destroy() {\n this.input?.removeEventListener('input', () => {});\n this.#toggleButton?.removeEventListener('click', () => {});\n this.input = undefined;\n this.#toggleButton = undefined;\n }\n}\n\nexport class CheckboxEditor implements IdsDataGridEditor {\n /** The type of editor (i.e. input, dropdown, checkbox ect) */\n type = 'checkbox';\n\n /** Holds the Editor */\n input?: IdsCheckbox;\n\n /** MouseEvent if click was used to edit */\n clickEvent?: MouseEvent;\n\n /** Cache original value type for proper saving */\n #originalValue?: any;\n\n /** Cache custom functions from editorSettings */\n #customSave?: (value: any) => void;\n\n #customValidate?: (value: any) => void;\n\n /**\n * Create an input and set the value and focus states\n * @param {IdsDataGridCell} cell the cell element\n */\n init(cell?: IdsDataGridCell) {\n this.input = <IdsCheckbox> document.createElement('ids-checkbox');\n\n const row = getClosest(cell, 'ids-data-grid-row');\n const dataIndex = row?.getAttribute('data-index');\n const grid = getClosest(cell, 'ids-data-grid');\n const rowData = dataIndex !== null && grid?.data ? grid.data[dataIndex] : undefined;\n this.#originalValue = rowData && cell ? rowData[cell.column.id] : undefined;\n\n const settings = cell?.column.editor?.editorSettings;\n this.#customSave = typeof settings?.customSave === 'function' ? settings.customSave as (value: any) => void : undefined;\n this.#customValidate = typeof settings?.customValidate === 'function' ? settings.customValidate as (value: any) => void : undefined;\n\n // Clear cell and set value\n const value = stringToBool(cell?.querySelector('[aria-checked]')?.getAttribute('aria-checked'));\n cell!.innerHTML = '';\n if (!this.clickEvent) this.input.noAnimation = true;\n this.input.checked = this.clickEvent ? !value : value;\n (this.input as any).isDirty = !!this.clickEvent;\n\n applyEditorSettings(this.input, settings);\n\n cell?.appendChild(this.input as any);\n\n requestAnimationFrame(() => {\n cell?.endCellEdit();\n cell?.focus();\n });\n }\n\n /* Transform the value */\n save() {\n const checked = this.input?.checked;\n let value: any = checked;\n\n if (typeof this.#originalValue === 'number') {\n value = checked ? 1 : 0;\n } else if (typeof this.#originalValue === 'string') {\n value = checked ? 'true' : 'false';\n }\n if (this.#customValidate) this.#customValidate(value);\n if (this.#customSave) this.#customSave(value);\n\n return { value };\n }\n\n /* Destroy the editor */\n destroy() {\n this.input?.offEvent('keydown');\n this.input = undefined;\n this.#originalValue = undefined;\n this.#customSave = undefined;\n this.#customValidate = undefined;\n }\n\n value() {\n return !!this.input?.checked;\n }\n\n change(newValue: boolean | number | string) {\n if (this.input) this.input.checked = Boolean(newValue);\n }\n}\n\nexport class DropdownEditor implements IdsDataGridEditor {\n /** The type of editor (i.e. input, dropdown, checkbox ect) */\n type = 'dropdown';\n\n /** Holds the Editor */\n input?: IdsDropdown;\n\n /** Holds the separate Dropdown List */\n list?: IdsDropdownList;\n\n /** Cache cell reference */\n #cell?: IdsDataGridCell;\n\n /** Cache dropdown value */\n #value?: string | null;\n\n /** Callback reference to handle blur event propagation */\n #stopPropagationCb = this.stopPropagation.bind(this);\n\n /** MouseEvent if click was used to edit */\n clickEvent?: MouseEvent;\n\n async init(cell?: IdsDataGridCell): Promise<void> {\n this.#value = cell?.querySelector('[data-value]')?.getAttribute('data-value') ?? cell?.value ?? null;\n const isInline = cell?.column.editor?.inline;\n const settings = { ...cell?.column?.editor?.editorSettings };\n const validation = { ...cell?.column?.editor?.editorValidation };\n let settingsOptions = <any[]>settings?.options ?? [];\n\n this.input = <IdsDropdown>document.createElement('ids-dropdown');\n this.list = <IdsDropdownList>document.createElement('ids-dropdown-list');\n\n // Set combobox if specified in settings\n if (cell?.column?.editor?.editorSettings?.comboBox) {\n this.input.combobox = true;\n }\n\n if (cell?.column?.editor?.editorSettings?.source !== undefined\n && cell?.column?.editor?.editorSettings?.source instanceof Function) {\n cell?.column?.editor?.editorSettings?.source().then(async (result: any) => {\n const newOptions = await result;\n settings.options = newOptions;\n settingsOptions = newOptions;\n this.input?.loadDataSet(settingsOptions);\n });\n }\n\n // apply user settings\n delete settings.options;\n applyEditorSettings(this.input, settings);\n if ([null, false, undefined].includes(this.input.typeahead)) {\n this.input.typeahead = false;\n }\n\n cell!.innerHTML = '';\n cell!.appendChild(this.input);\n this.input.addEventListener('keydown', (e) => applyEditorEndCellEdit(cell!, e));\n\n cell!.appendChild(this.list);\n cell!.classList.add('is-focused');\n this.#cell = cell!;\n\n this.list.insertAdjacentHTML('beforeend', '<ids-list-box></ids-list-box>');\n this.list.setAttribute('trigger-type', 'custom');\n this.input.setAttribute('id', 'ids-dropdown-active-cell');\n this.list.setAttribute('id', 'ids-dropdown-list-active-cell');\n this.input.setAttribute('list', '#ids-dropdown-list-active-cell');\n\n const optionValues = settingsOptions.map((row) => String(row.value).toLowerCase());\n const defaultValue = cell?.defaultValue || this.#value;\n\n if (defaultValue && !optionValues.includes(defaultValue.toLowerCase())) {\n const [firstOption, ...remainingOptions] = settingsOptions;\n const defaultValueOption = { id: defaultValue, label: defaultValue, value: defaultValue };\n if (this.input.comboBox) {\n settingsOptions = [firstOption, ...remainingOptions];\n } else {\n settingsOptions = [firstOption, defaultValueOption, ...remainingOptions];\n }\n }\n\n this.input.loadDataSet(settingsOptions);\n\n this.list.configurePopup();\n this.list.setAttribute('slot', 'menu-container');\n this.list.setAttribute('size', 'full');\n this.list.setAttribute('attachment', '.ids-data-grid-wrapper');\n this.list.appendToTargetParent();\n\n if (this.list?.popup) {\n this.list.popup.alignTarget = this.input;\n this.list.popup.onPlaceEnd = (popupRect: DOMRect, domElement) => {\n if (cell?.dataGrid?.rowHeight === 'xxs') {\n domElement.style.top = `${parseInt(domElement.style.top) - 1}px`;\n }\n\n // Get the current x position of cell\n const cellLeft = cell?.getBoundingClientRect().left || 0;\n // Get the current x position of container\n const containerLeft = domElement.offsetParent?.getBoundingClientRect().left || 0;\n domElement.style.left = `${cellLeft - containerLeft}px`;\n return popupRect;\n };\n }\n\n this.input.value = this.#value ?? '';\n this.input.size = 'full';\n this.input.labelState = 'collapsed';\n this.input.colorVariant = isInline ? 'in-cell' : 'borderless';\n this.input.fieldHeight = String(cell?.dataGrid?.rowHeight);\n const triggerField = this.input.container?.querySelector<IdsTriggerField>('ids-trigger-field');\n if (triggerField) {\n triggerField.focus();\n triggerField.colorVariant = isInline ? 'in-cell' : 'borderless';\n }\n\n if (this.input.comboBox) {\n this.input.dropdownList?.classList.add('is-combobox');\n triggerField?.setAttribute('combobox', 'true');\n triggerField?.setAttribute('autoselect', 'true');\n triggerField?.classList.add('combo-filter');\n if (triggerField?.input) triggerField.input.value = this.input.value;\n }\n\n // apply user validation\n if (validation) {\n applyEditorValidation(this.input.input, validation);\n }\n\n this.#attachEventListeners();\n // Only open if initiated by a click\n if (this.clickEvent && !this.input.comboBox) {\n await this.input?.open(this.input.typeahead);\n }\n if (this.input.comboBox) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n applyEditorDropdownFocus(this);\n }\n }\n\n /**\n * Overrides data grid cell's focusout event handling\n * @param {FocusEvent} evt focus event\n */\n stopPropagation(evt: FocusEvent) {\n const tagName = evt.relatedTarget instanceof HTMLElement ? evt.relatedTarget.tagName : evt.relatedTarget;\n\n if (tagName === 'IDS-DROPDOWN' || tagName === 'IDS-LIST-BOX-OPTION') {\n evt.stopPropagation();\n evt.stopImmediatePropagation();\n }\n }\n\n /**\n * Attach dropdown event handlers\n */\n #attachEventListeners() {\n this.input?.onEvent('change', this.input, (evt) => { this.#value = evt.detail.value; });\n this.input?.onEvent('focusout', this.input, this.#stopPropagationCb);\n if (this.list) {\n this.list.onOutsideClick = (e: MouseEvent) => {\n if (!e.composedPath().includes(this.list!)) {\n this.input?.close();\n }\n };\n this.list.refreshTriggerEvents();\n // Close code is in #startCellEdit\n }\n\n this.input?.onEvent('keydown', this.list, (e) => {\n const key = e.key;\n if (key === 'Enter') {\n e.stopPropagation();\n }\n });\n }\n\n /* Save selected dropdown value */\n save() {\n return {\n value: this.input?.value,\n dirtyCheckValue: this.input?.input?.value\n };\n }\n\n /**\n * Destroy dropdown editor\n */\n destroy(): void {\n this.input?.offEvent('click');\n this.input?.offEvent('change');\n this.input?.offEvent('focusout', this.input, this.#stopPropagationCb);\n this.list?.offEvent('keydown');\n this.list?.remove();\n this.#value = undefined;\n\n this.#cell?.classList?.remove('is-focused');\n this.#cell = undefined;\n }\n\n value() {\n return this.input?.value ?? '';\n }\n\n change(newValue: boolean | number | string) {\n if (this.input) this.input.value = String(newValue);\n }\n}\n\nexport class DatePickerEditor implements IdsDataGridEditor {\n public type = 'datepicker';\n\n public input?: IdsTriggerField;\n\n public popup?: IdsDatePickerPopup;\n\n clickEvent?: MouseEvent;\n\n #value?: Date;\n\n #displayValue = '';\n\n init(cell?: IdsDataGridCell) {\n this.input = this.#buildDatePickerTriggerField(cell!);\n this.popup = this.#buildDatePickerPopup(cell!);\n\n // parse date string\n this.#update(cell!, cell!.originalValue as string);\n\n // insert datepicker component and focus\n cell!.innerHTML = '';\n cell!.appendChild(this.popup);\n cell!.appendChild(this.input);\n this.input.addEventListener('keydown', (e) => applyEditorEndCellEdit(cell!, e));\n\n this.input.value = this.#displayValue;\n this.popup?.syncDateAttributes(this.#value ?? new Date());\n if (this.input) this.input.autoselect = (cell?.column?.editor?.editorSettings?.autoselect as boolean) || true;\n\n const validation = cell?.column.editor?.editorValidation;\n if (validation) {\n applyEditorValidation(this.input, validation);\n }\n\n if (this.popup) {\n const popup = this.popup;\n this.popup.value = this.#displayValue;\n this.popup.attachment = '.ids-data-grid-wrapper';\n this.popup.slot = 'menu-container';\n\n this.popup.appendToTargetParent();\n if (this.popup.popup) {\n this.popup.popup.positionStyle = 'fixed';\n this.popup.popup.popupOpenEventsTarget = document.body;\n this.popup.popup.onOutsideClick = (e: MouseEvent) => {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n if (!e.composedPath().includes(popup)) { popup.hide(); }\n };\n }\n\n // apply popup required settings\n this.popup.id = `${cell!.column.field}-date-picker-popup`;\n this.popup.triggerType = 'click';\n this.popup.triggerElem = `#${cell!.column.field}-date-picker-btn`;\n this.popup.target = `#${cell!.column.field}-date-picker`;\n this.popup.popup!.align = 'bottom, right';\n this.popup.popup!.arrowTarget = `#${cell!.column.field}-date-picker-btn`;\n this.popup.popup!.y = 16;\n this.popup.refreshTriggerEvents();\n\n // Show button group\n if (this.popup.hasTime()) {\n this.popup.showApply = true;\n const buttonGroup = this.popup.container?.querySelector('.popup-footer');\n buttonGroup?.classList.remove('hidden');\n }\n\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n applyEditorPopupFocus(this);\n }\n\n this.#attachEventListeners(cell);\n }\n\n #buildDatePickerTriggerField(cell: IdsDataGridCell): IdsTriggerField {\n const component = <IdsTriggerField>document.createElement('ids-trigger-field');\n\n // apply user settings\n applyEditorSettings(component, cell?.column.editor?.editorSettings);\n\n component.id = `${cell.column.field}-date-picker`;\n component.fieldHeight = String(cell?.dataGrid?.rowHeight) === 'xxs' ? `xs` : String(cell?.dataGrid?.rowHeight);\n component.labelState = 'collapsed';\n component.colorVariant = 'borderless';\n component.size = 'full';\n component.mask = true;\n\n component.insertAdjacentHTML(\n 'beforeend',\n `<ids-trigger-button\n class=\"ids-trigger-field-slot-trigger-end\"\n id=\"${cell.column.field}-date-picker-btn\"\n slot=\"trigger-end\"\n icon=\"calendar\"></ids-trigger-button>`\n );\n\n return component;\n }\n\n #buildDatePickerPopup(cell: IdsDataGridCell): IdsDatePickerPopup {\n const component = <IdsDatePickerPopup>document.createElement('ids-date-picker-popup');\n // apply user settings\n applyEditorSettings(component, cell?.column.editor?.editorSettings);\n return component;\n }\n\n #update(cell: IdsDataGridCell, dateString: string) {\n const inputDate = cell?.dataGrid.localeAPI.parseDate(\n dateString,\n { dateFormat: cell?.column?.editor?.editorSettings?.format || undefined }\n ) as Date;\n\n if (!dateString || !isValidDate(inputDate)) {\n this.#displayValue = dateString;\n this.#value = undefined;\n return;\n }\n\n // update original date value, preserving time from input if available\n if (this.#value instanceof Date) {\n this.#value.setFullYear(inputDate.getFullYear());\n this.#value.setMonth(inputDate.getMonth());\n this.#value.setDate(inputDate.getDate());\n // Update time components if they differ from default (00:00:00)\n if (inputDate.getHours() !== 0 || inputDate.getMinutes() !== 0\n || inputDate.getSeconds() !== 0 || inputDate.getMilliseconds() !== 0) {\n this.#value.setHours(inputDate.getHours());\n this.#value.setMinutes(inputDate.getMinutes());\n this.#value.setSeconds(inputDate.getSeconds());\n this.#value.setMilliseconds(inputDate.getMilliseconds());\n }\n } else {\n this.#value = inputDate;\n }\n\n this.#displayValue = cell!.dataGrid.localeAPI.formatDate(this.#value, cell.column?.editor?.editorSettings);\n }\n\n #stopPropagation(evt: FocusEvent): void {\n const isOpen = this.input?.popup?.hidden === false;\n if (isOpen) evt.stopImmediatePropagation();\n }\n\n #attachEventListeners(cell?: IdsDataGridCell | undefined) {\n const focusOutHandler = (evt: FocusEvent) => this.#stopPropagation(evt);\n this.input?.onEvent('focusout', this.input, focusOutHandler, { capture: true });\n this.popup?.onEvent('hide', this.popup, () => {\n if (cell!.contains(cell!.dataGrid!.shadowRoot!.activeElement)) return;\n if (!cell!.dataGrid!.contains(document.activeElement)) return;\n if (!cell!.dataGrid!.shadowRoot!.contains(document.activeElement)) return;\n\n cell?.focus();\n });\n }\n\n save(cell?: IdsDataGridCell) {\n this.#update(cell!, cell?.value);\n\n return {\n value: this.#value?.toISOString() ?? '',\n dirtyCheckValue: this.#displayValue\n };\n }\n\n destroy() {\n this.input?.offEvent('focusout');\n this.input?.offEvent('outsideclick.datepicker');\n this.popup?.offEvent('hide');\n this.popup?.remove();\n\n this.#value = undefined;\n this.#displayValue = '';\n }\n\n value() {\n return this.input?.input?.value ?? '';\n }\n\n change(newValue: boolean | number | string) {\n if (this.input?.input) this.input.input.value = String(newValue);\n }\n}\n\nexport class TimePickerEditor implements IdsDataGridEditor {\n type = 'timepicker';\n\n input?: IdsTriggerField;\n\n popup?: IdsTimePickerPopup;\n\n clickEvent?: MouseEvent;\n\n #originalDate?: Date;\n\n init(cell?: IdsDataGridCell | undefined) {\n this.input = this.#buildTimePickerTriggerField(cell!);\n this.popup = this.#buildTimePickerPopup(cell!);\n\n // parse date string\n const dateString = cell!.originalValue as string ?? '';\n const date = cell!.dataGrid!.localeAPI!.parseDate(dateString, undefined, true) as Date;\n const isValid = isValidDate(date);\n this.#originalDate = isValid ? date : undefined;\n this.input.value = isValid ? cell!.dataGrid!.localeAPI!.formatDate(this.#originalDate, { pattern: this.input.format }) : '';\n\n // insert time picker and focus\n cell!.innerHTML = '';\n cell!.appendChild(this.popup);\n cell!.appendChild(this.input);\n this.input.addEventListener('keydown', (e) => applyEditorEndCellEdit(cell!, e));\n\n this.input.autoselect = (cell?.column?.editor?.editorSettings?.autoselect as boolean) || true;\n\n if (this.popup) {\n const popup = this.popup;\n this.popup.attachment = '.ids-data-grid-wrapper';\n this.popup.slot = 'menu-container';\n\n this.popup.appendToTargetParent();\n if (this.popup.popup) {\n this.popup.popup.positionStyle = 'fixed';\n this.popup.popup.popupOpenEventsTarget = document.body;\n this.popup.popup.onOutsideClick = async (e: MouseEvent) => {\n if (!e.composedPath().includes(popup)) { await popup.hide(); }\n };\n }\n\n // apply popup required settings\n this.popup.id = `${cell!.column.field}-time-picker-popup`;\n this.popup.triggerType = 'click';\n this.popup.triggerElem = `#${cell!.column.field}-time-picker-btn`;\n this.popup.target = `#${cell!.column.field}-time-picker`;\n this.popup.popup!.align = 'bottom, right';\n this.popup.popup!.arrowTarget = `#${cell!.column.field}-time-picker-btn`;\n this.popup.popup!.y = 16;\n this.popup.refreshTriggerEvents();\n\n if (this.#originalDate) {\n const hours = this.#originalDate.getHours();\n this.popup.hours = hours > 11 ? hours - 12 : hours;\n this.popup.minutes = this.#originalDate.getMinutes();\n this.popup.seconds = this.#originalDate.getSeconds();\n this.popup.period = hours > 11 ? 'PM' : 'AM';\n }\n\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n applyEditorPopupFocus(this);\n }\n\n this.#attachEventListeners(cell);\n }\n\n #buildTimePickerTriggerField(cell: IdsDataGridCell): IdsTriggerField {\n const component = <IdsTriggerField>document.createElement('ids-trigger-field');\n\n // apply user settings\n applyEditorSettings(component, cell?.column.editor?.editorSettings);\n\n // apply required settings\n component.id = `${cell.column.field}-time-picker`;\n component.fieldHeight = String(cell?.dataGrid?.rowHeight) === 'xxs' ? `xs` : String(cell?.dataGrid?.rowHeight);\n component.labelState = 'collapsed';\n component.colorVariant = 'borderless';\n component.size = 'full';\n component.mask = true;\n\n component.insertAdjacentHTML(\n 'beforeend',\n `<ids-trigger-button\n class=\"ids-trigger-field-slot-trigger-end\"\n id=\"${cell.column.field}-time-picker-btn\"\n slot=\"trigger-end\"\n icon=\"clock\"></ids-trigger-button>`\n );\n\n return component;\n }\n\n #buildTimePickerPopup(cell: IdsDataGridCell): IdsTimePickerPopup {\n const popup = <IdsTimePickerPopup>document.createElement('ids-time-picker-popup');\n\n // apply user settings\n applyEditorSettings(popup, cell?.column.editor?.editorSettings);\n\n return popup;\n }\n\n #attachEventListeners(cell?: IdsDataGridCell | undefined) {\n this.popup?.onEvent('hide', this.popup, () => {\n if (cell!.contains(cell!.dataGrid!.shadowRoot!.activeElement)) return;\n cell?.focus();\n });\n }\n\n save(cell?: IdsDataGridCell) {\n let date;\n const inputValue = this.input!.value;\n if (inputValue) {\n date = cell!.dataGrid.localeAPI!.parseDate(inputValue, { pattern: this.input!.format }, true) as Date;\n\n // Timepicker formats don't include the \"date\" portion,\n // So this fills in the missing parts from the `#originalDate` if possible to save a valid date value.\n if (this.#originalDate && (\n this.#originalDate.getMonth() !== date?.getMonth()\n || this.#originalDate.getFullYear() !== date?.getFullYear()\n || this.#originalDate.getDate() !== date?.getDate()\n )) {\n date?.setMonth(this.#originalDate.getMonth());\n date?.setFullYear(this.#originalDate.getFullYear());\n date?.setDate(this.#originalDate.getDate());\n }\n }\n\n return {\n value: date && isValidDate(date) ? date?.toISOString() : undefined,\n dirtyCheckValue: inputValue\n };\n }\n\n destroy() {\n this.input?.offEvent('focusout');\n this.input?.detachAllListeners();\n this.input?.remove();\n this.popup?.offEvent('hide');\n this.popup?.detachAllListeners();\n this.popup?.remove();\n this.#originalDate = undefined;\n }\n\n value() {\n return this.input?.value ?? '';\n }\n\n change(newValue: boolean | number | string) {\n if (this.input) this.input.value = String(newValue);\n }\n}\n\nexport class TreeEditor extends InputEditor {\n expandButton?: IdsButton;\n\n fieldContainer?: HTMLElement;\n\n /**\n * Adds extra button element for mimicking the tree formatter's display\n * @param {IdsDataGridCell} cell the cell element\n */\n init(cell?: IdsDataGridCell) {\n super.init(cell);\n\n const buttonHTML = this.#isExpandable(cell!) ? `<ids-button class=\"expand-button\" disabled=\"true\">\n <ids-icon icon=\"plusminus-folder-${this.#isExpanded(cell!) ? 'open' : 'closed'}\"></ids-icon>\n </ids-button>` : '';\n\n cell!.insertAdjacentHTML('afterbegin', `<span class=\"ids-data-grid-tree-container\">\n ${buttonHTML}\n <span class=\"ids-data-grid-tree-field-container\"></span>\n </span>`);\n\n this.expandButton = cell!.querySelector<IdsButton>('.expand-button')!;\n this.fieldContainer = cell!.querySelector<HTMLElement>('.ids-data-grid-tree-field-container')!;\n this.fieldContainer.appendChild(this.input!);\n }\n\n #isExpanded(cell: IdsDataGridCell) {\n const rowData = cell.dataGrid.data[cell.rowIndex];\n if (rowData) return rowData.rowExpanded !== false;\n return false;\n }\n\n #isExpandable(cell: IdsDataGridCell) {\n const rowData = cell.dataGrid.data[cell.rowIndex];\n if (rowData && Array.isArray(rowData.children)) {\n return rowData.children.length > 0;\n }\n return false;\n }\n\n destroy() {\n super.destroy();\n this.expandButton?.remove();\n this.fieldContainer?.remove();\n this.expandButton = undefined;\n this.fieldContainer = undefined;\n }\n}\n\nexport class LookupEditor implements IdsDataGridEditor {\n type = 'lookup';\n\n input?: IdsLookup;\n\n popup?: IdsModal;\n\n clickEvent?: MouseEvent;\n\n /**\n * Create an input and set the value and focus states\n * @param {IdsDataGridCell} cell the cell element\n */\n init(cell?: IdsDataGridCell) {\n const isInline = cell?.column.editor?.inline;\n this.input = <IdsLookup>document.createElement('ids-lookup');\n this.input.size = isInline ? 'full' : '';\n\n this.input.clearable = true;\n this.input.labelState = 'collapsed';\n\n // Clear cell and set value\n const value = cell?.innerText ?? '';\n cell!.innerHTML = '';\n cell?.appendChild(this.input as any);\n this.input.addEventListener('keydown', (e) => applyEditorEndCellEdit(cell!, e));\n\n this.input.value = value;\n\n this.popup = this.input.modal ?? undefined;\n\n applyEditorSettings(this.input, { ...cell?.column.editor?.editorSettings });\n applyEditorValidation(this.input?.input, cell?.column.editor?.editorValidation);\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n applyEditorPopupFocus(this);\n\n if (this.input?.triggerField) {\n this.input.triggerField.labelState = 'collapsed';\n this.input.triggerField.colorVariant = isInline ? 'in-cell' : 'borderless';\n this.input.triggerField.focus();\n this.input.triggerField.offEvent('paste', this.input.triggerField.input);\n this.input.triggerField.onEvent('paste', this.input.triggerField.input, (e) => {\n e.stopPropagation();\n });\n }\n\n const rowHeight = String(cell?.dataGrid?.rowHeight);\n\n // TODO: these are hacks... we should fix styles for xxs and not cheat by giving them styles for xs\n this.input.fieldHeight = rowHeight === 'xxs' ? `xs` : rowHeight;\n this.input.triggerField?.toggleAttribute(attributes.NO_MARGINS, rowHeight !== 'xxs');\n this.input.triggerField?.clearableButton?.toggleAttribute(attributes.NO_MARGINS, rowHeight !== 'xxs');\n this.input.triggerButton?.toggleAttribute(attributes.NO_MARGINS, rowHeight !== 'xxs');\n }\n\n value() {\n return this.input?.value ?? '';\n }\n\n change(newValue: boolean | number | string) {\n if (this.input) this.input.value = String(newValue);\n }\n\n /* Save selected dropdown value */\n save(): IdsDataGridSaveValue | undefined | null {\n return {\n value: this.input?.value,\n dirtyCheckValue: this.input?.input?.value\n };\n }\n\n /* Destroy the editor */\n destroy() {\n this.input?.offEvent('keydown');\n this.input?.offEvent('change');\n this.input = undefined;\n }\n}\n\nexport const editors: Array<{ type: string, editor?: IdsDataGridEditor }> = [];\n\neditors.push({\n type: 'input',\n editor: new InputEditor()\n});\n\neditors.push({\n type: 'password',\n editor: new PasswordInputEditor()\n});\n\neditors.push({\n type: 'checkbox',\n editor: new CheckboxEditor()\n});\n\neditors.push({\n type: 'dropdown',\n editor: new DropdownEditor()\n});\n\neditors.push({\n type: 'datepicker',\n editor: new DatePickerEditor()\n});\n\neditors.push({\n type: 'timepicker',\n editor: new TimePickerEditor()\n});\n\neditors.push({\n type: 'tree',\n editor: new TreeEditor()\n});\n\neditors.push({\n type: 'lookup',\n editor: new LookupEditor()\n});\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;AA6DA,IAAM,sBAAsB,CAAC,MAAW,aAAmC;AAEzE,aAAW,WAAW,UAAU;AAC9B,SAAK,OAAO,IAAI,SAAS,OAAO;AAAA,EAClC;AACF;AAEA,IAAM,wBAAwB,CAAC,MAAW,eAA4C;AACpF,MAAI,MAAM,qBAAqB,YAAY;AACzC,eAAW,OAAO;AAClB,UAAM,oBAAoB,UAAU;AAAA,EACtC;AACF;AAEA,IAAM,2BAA2B,OAAO,WAA8B;AACpE,QAAM,WAA0B,OAAO,YAAY,QAAS,WAAW,SAAS,kBAAkB;AAClG,MAAI,UAAU;AACZ,UAAM,OAAO,OAA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AC3B,CAAC;",
|
|
4
|
+
"sourcesContent": ["// eslint-disable-next-line max-classes-per-file\nimport { isValidDate } from '../../utils/ids-date-utils/ids-date-utils';\nimport { stringToBool } from '../../utils/ids-string-utils/ids-string-utils';\nimport IdsCheckbox from '../ids-checkbox/ids-checkbox';\nimport IdsDropdown from '../ids-dropdown/ids-dropdown';\nimport IdsDropdownList from '../ids-dropdown/ids-dropdown-list';\nimport IdsInput from '../ids-input/ids-input';\nimport IdsTriggerField from '../ids-trigger-field/ids-trigger-field';\nimport type IdsButton from '../ids-button/ids-button';\nimport type IdsDataGridCell from './ids-data-grid-cell';\nimport type IdsDatePicker from '../ids-date-picker/ids-date-picker';\nimport type IdsDatePickerPopup from '../ids-date-picker/ids-date-picker-popup';\nimport type IdsLookup from '../ids-lookup/ids-lookup';\nimport type IdsModal from '../ids-modal/ids-modal';\nimport type IdsTimePicker from '../ids-time-picker/ids-time-picker';\nimport type IdsTimePickerPopup from '../ids-time-picker/ids-time-picker-popup';\nimport '../ids-time-picker/ids-time-picker';\nimport '../ids-date-picker/ids-date-picker';\nimport '../ids-lookup/ids-lookup';\nimport { IdsValidationRule } from '../../mixins/ids-validation-mixin/ids-validation-mixin';\nimport { attributes } from '../../core/ids-attributes';\nimport IdsIcon from '../ids-icon/ids-icon';\nimport { getClosest } from '../../utils/ids-dom-utils/ids-dom-utils';\n\nexport interface IdsDataGridEditorOptions {\n /** The type of editor (i.e. text, data, time, dropdown, checkbox, number ect) */\n type: string;\n /** The field in the data set to show */\n field: string;\n /** If true the editor will remain visible */\n inline: boolean;\n}\n\nexport interface IdsDataGridSaveValue {\n // value to be saved in data set\n value?: string | number | boolean | null;\n // (optional) value used for dirty checking\n dirtyCheckValue?: string | number | boolean | null;\n}\n\nexport interface IdsDataGridEditor {\n /** The type of editor (i.e. input, dropdown, checkbox ect) */\n type: string;\n /** The main editor element */\n input?: IdsInput | IdsCheckbox | IdsDropdown | IdsDatePicker | IdsTimePicker | IdsLookup;\n /** Optional Popup interface for some cell types */\n popup?: IdsDatePickerPopup | IdsTimePickerPopup | IdsModal;\n /** The function that invokes and sets values on the input */\n init: (cell?: IdsDataGridCell) => void;\n /** The function that transforms and saved the editor */\n save: (cell?: IdsDataGridCell) => IdsDataGridSaveValue | undefined | null;\n /** The function that tears down all aspects of the editor */\n destroy: (cell?: IdsDataGridCell) => void;\n /** MouseEvent if click was used to edit */\n clickEvent?: MouseEvent;\n /** The function that returns the input-element's value */\n value: () => boolean | number | string;\n /** The function that changes the input-element's value */\n change: (newValue: boolean | number | string) => void;\n}\n\nconst applyEditorSettings = (elem: any, settings?: Record<string, any>) => {\n // eslint-disable-next-line guard-for-in\n for (const setting in settings) {\n elem[setting] = settings[setting];\n }\n};\n\nconst applyEditorValidation = (elem: any, validation?: Partial<IdsValidationRule>) => {\n if (elem?.addValidationRule && validation) {\n validation.type = 'error';\n elem?.addValidationRule?.(validation);\n }\n};\n\nconst applyEditorDropdownFocus = async (editor: IdsDataGridEditor) => {\n const autoOpen = (<HTMLElement> editor.clickEvent?.target)?.classList?.contains('editor-cell-icon');\n if (autoOpen) {\n await editor.input?.open();\n }\n editor.input?.dropdownList?.focus();\n};\n\nconst applyEditorPopupFocus = async (editor: IdsDataGridEditor) => {\n const autoOpen = (<HTMLElement> editor.clickEvent?.target)?.classList?.contains('editor-cell-icon');\n if (autoOpen) {\n await editor.popup?.show();\n editor.popup?.focus();\n } else {\n editor.input?.focus();\n }\n};\n\nconst applyEditorEndCellEdit = (cell: IdsDataGridCell, e: KeyboardEvent) => {\n if (e.code === 'Escape') {\n e.stopImmediatePropagation();\n e.stopPropagation();\n e.preventDefault();\n cell?.cancelCellEdit();\n cell?.focus();\n }\n};\n\nexport class InputEditor implements IdsDataGridEditor {\n /** The type of editor (i.e. input, dropdown, checkbox ect) */\n type = 'input';\n\n /** Holds the Editor */\n input?: IdsInput;\n\n /**\n * Create an input and set the value and focus states\n * @param {IdsDataGridCell} cell the cell element\n */\n init(cell?: IdsDataGridCell) {\n const isInline = cell?.column.editor?.inline;\n this.input = <IdsInput> document.createElement('ids-input');\n this.input.colorVariant = isInline ? 'in-cell' : 'borderless';\n this.input.size = 'full';\n this.input.fieldHeight = String(cell?.dataGrid?.rowHeight) === 'xxs' ? `xs` : String(cell?.dataGrid?.rowHeight);\n this.input.labelState = 'collapsed';\n\n // Clear cell and set value\n const value = cell?.innerText;\n const treeFieldContainer = cell?.querySelector('.ids-data-grid-tree-field-container');\n if (treeFieldContainer) {\n // For tree-formatted cells, replace only the text container to preserve the expand/collapse icon\n treeFieldContainer.innerHTML = '';\n treeFieldContainer.appendChild(this.input as any);\n } else {\n cell!.innerHTML = '';\n cell?.appendChild(this.input as any);\n }\n this.input.addEventListener('keydown', (e) => applyEditorEndCellEdit(cell!, e));\n\n this.input.value = value;\n\n if (this.input instanceof IdsInput && cell) {\n if (!isInline) this.input.shadowRoot?.querySelector('input')?.style.setProperty('width', `${cell.offsetWidth - 5}px`);\n const settings = { ...cell?.column.editor?.editorSettings };\n const shouldAutoselect = settings?.autoselect;\n delete settings.autoselect;\n applyEditorSettings(this.input, settings);\n applyEditorValidation(this.input, cell?.column.editor?.editorValidation);\n const nativeInput = this.input.shadowRoot?.querySelector('input');\n if (shouldAutoselect) {\n nativeInput?.select();\n }\n }\n this.input.focus();\n }\n\n /* Transform the value */\n save() {\n return { value: this.input?.value };\n }\n\n /* Destroy the editor */\n destroy() {\n this.input = undefined;\n }\n\n value() {\n return this.input?.value ?? '';\n }\n\n change(newValue: boolean | number | string) {\n if (this.input) this.input.value = String(newValue);\n }\n}\n\n/**\n * Password Input Editor for IDS Data Grid\n * Shows masked input with revealed last characters and toggle button\n */\nexport class PasswordInputEditor extends InputEditor {\n type = 'password';\n\n #toggleButton?: IdsIcon;\n\n /**\n * Create a password input and set the value and focus states\n * @param {IdsDataGridCell} cell the cell element\n */\n init(cell?: IdsDataGridCell) {\n super.init(cell);\n const dataIndex = getClosest(cell, 'ids-data-grid-row').getAttribute('data-index');\n const rowData = getClosest(cell, 'ids-data-grid').data[dataIndex];\n const isInline = cell?.column.editor?.inline;\n\n // Make the input password type\n this.input!.type = 'password';\n\n // Create toggle button\n this.#toggleButton = <IdsIcon> document.createElement('ids-icon');\n this.#toggleButton.icon = 'show-item';\n this.#toggleButton.classList.add('editor-cell-icon');\n this.#toggleButton.classList.add('text-mask');\n\n // Clear cell and set value\n const value = rowData[cell!.column.id];\n cell!.innerHTML = '';\n\n // Add input and button to container\n cell?.appendChild(this.input as any);\n cell?.appendChild(this.#toggleButton as any);\n\n // set value to the input\n this.input!.value = value;\n\n // Handle toggle button click\n this.#toggleButton.offEvent('click');\n this.#toggleButton.onEvent('click', this.#toggleButton, () => {\n if (!this.input || !this.#toggleButton) {\n return;\n }\n\n const masked = this.input.type === 'password';\n\n const inputEl = this.input.shadowRoot?.querySelector('input');\n\n // Store current cursor position\n let cursorPos = 0;\n if (inputEl) {\n cursorPos = inputEl.selectionStart || 0;\n }\n\n if (masked) {\n this.input.type = 'text';\n this.#toggleButton.icon = 'hide-item';\n } else {\n this.#toggleButton.icon = 'show-item';\n this.input.type = 'password';\n }\n\n this.input.focus();\n\n // Restore cursor position\n if (inputEl) {\n setTimeout(() => {\n inputEl.setSelectionRange(cursorPos, cursorPos);\n }, 0);\n }\n });\n\n if (this.input instanceof IdsInput && cell) {\n if (!isInline) this.input.shadowRoot?.querySelector('input')?.style.setProperty('width', `100%`);\n applyEditorSettings(this.input, cell?.column.editor?.editorSettings);\n applyEditorValidation(this.input, cell?.column.editor?.editorValidation);\n }\n this.input!.focus();\n }\n\n /**\n * Transform the value for saving\n * @returns {IdsDataGridSaveValue} The value to save\n */\n save() {\n return { value: this.input?.value };\n }\n\n /**\n * Destroy the editor\n */\n destroy() {\n this.input?.removeEventListener('input', () => {});\n this.#toggleButton?.removeEventListener('click', () => {});\n this.input = undefined;\n this.#toggleButton = undefined;\n }\n}\n\nexport class CheckboxEditor implements IdsDataGridEditor {\n /** The type of editor (i.e. input, dropdown, checkbox ect) */\n type = 'checkbox';\n\n /** Holds the Editor */\n input?: IdsCheckbox;\n\n /** MouseEvent if click was used to edit */\n clickEvent?: MouseEvent;\n\n /** Cache original value type for proper saving */\n #originalValue?: any;\n\n /** Cache custom functions from editorSettings */\n #customSave?: (value: any) => void;\n\n #customValidate?: (value: any) => void;\n\n /**\n * Create an input and set the value and focus states\n * @param {IdsDataGridCell} cell the cell element\n */\n init(cell?: IdsDataGridCell) {\n this.input = <IdsCheckbox> document.createElement('ids-checkbox');\n\n const row = getClosest(cell, 'ids-data-grid-row');\n const dataIndex = row?.getAttribute('data-index');\n const grid = getClosest(cell, 'ids-data-grid');\n const rowData = dataIndex !== null && grid?.data ? grid.data[dataIndex] : undefined;\n this.#originalValue = rowData && cell ? rowData[cell.column.id] : undefined;\n\n const settings = cell?.column.editor?.editorSettings;\n this.#customSave = typeof settings?.customSave === 'function' ? settings.customSave as (value: any) => void : undefined;\n this.#customValidate = typeof settings?.customValidate === 'function' ? settings.customValidate as (value: any) => void : undefined;\n\n // Clear cell and set value\n const value = stringToBool(cell?.querySelector('[aria-checked]')?.getAttribute('aria-checked'));\n cell!.innerHTML = '';\n if (!this.clickEvent) this.input.noAnimation = true;\n this.input.checked = this.clickEvent ? !value : value;\n (this.input as any).isDirty = !!this.clickEvent;\n\n applyEditorSettings(this.input, settings);\n\n cell?.appendChild(this.input as any);\n\n requestAnimationFrame(() => {\n cell?.endCellEdit();\n cell?.focus();\n });\n }\n\n /* Transform the value */\n save() {\n const checked = this.input?.checked;\n let value: any = checked;\n\n if (typeof this.#originalValue === 'number') {\n value = checked ? 1 : 0;\n } else if (typeof this.#originalValue === 'string') {\n value = checked ? 'true' : 'false';\n }\n if (this.#customValidate) this.#customValidate(value);\n if (this.#customSave) this.#customSave(value);\n\n return { value };\n }\n\n /* Destroy the editor */\n destroy() {\n this.input?.offEvent('keydown');\n this.input = undefined;\n this.#originalValue = undefined;\n this.#customSave = undefined;\n this.#customValidate = undefined;\n }\n\n value() {\n return !!this.input?.checked;\n }\n\n change(newValue: boolean | number | string) {\n if (this.input) this.input.checked = Boolean(newValue);\n }\n}\n\nexport class DropdownEditor implements IdsDataGridEditor {\n /** The type of editor (i.e. input, dropdown, checkbox ect) */\n type = 'dropdown';\n\n /** Holds the Editor */\n input?: IdsDropdown;\n\n /** Holds the separate Dropdown List */\n list?: IdsDropdownList;\n\n /** Cache cell reference */\n #cell?: IdsDataGridCell;\n\n /** Cache dropdown value */\n #value?: string | null;\n\n /** Callback reference to handle blur event propagation */\n #stopPropagationCb = this.stopPropagation.bind(this);\n\n /** MouseEvent if click was used to edit */\n clickEvent?: MouseEvent;\n\n async init(cell?: IdsDataGridCell): Promise<void> {\n this.#value = cell?.querySelector('[data-value]')?.getAttribute('data-value') ?? cell?.value ?? null;\n const isInline = cell?.column.editor?.inline;\n const settings = { ...cell?.column?.editor?.editorSettings };\n const validation = { ...cell?.column?.editor?.editorValidation };\n let settingsOptions = <any[]>settings?.options ?? [];\n\n this.input = <IdsDropdown>document.createElement('ids-dropdown');\n this.list = <IdsDropdownList>document.createElement('ids-dropdown-list');\n\n // Set combobox if specified in settings\n if (cell?.column?.editor?.editorSettings?.comboBox) {\n this.input.combobox = true;\n }\n\n if (cell?.column?.editor?.editorSettings?.source !== undefined\n && cell?.column?.editor?.editorSettings?.source instanceof Function) {\n cell?.column?.editor?.editorSettings?.source().then(async (result: any) => {\n const newOptions = await result;\n settings.options = newOptions;\n settingsOptions = newOptions;\n this.input?.loadDataSet(settingsOptions);\n });\n }\n\n // apply user settings\n delete settings.options;\n applyEditorSettings(this.input, settings);\n if ([null, false, undefined].includes(this.input.typeahead)) {\n this.input.typeahead = false;\n }\n\n cell!.innerHTML = '';\n cell!.appendChild(this.input);\n this.input.addEventListener('keydown', (e) => applyEditorEndCellEdit(cell!, e));\n\n cell!.appendChild(this.list);\n cell!.classList.add('is-focused');\n this.#cell = cell!;\n\n this.list.insertAdjacentHTML('beforeend', '<ids-list-box></ids-list-box>');\n this.list.setAttribute('trigger-type', 'custom');\n this.input.setAttribute('id', 'ids-dropdown-active-cell');\n this.list.setAttribute('id', 'ids-dropdown-list-active-cell');\n this.input.setAttribute('list', '#ids-dropdown-list-active-cell');\n\n const optionValues = settingsOptions.map((row) => String(row.value).toLowerCase());\n const defaultValue = cell?.defaultValue || this.#value;\n\n if (defaultValue && !optionValues.includes(defaultValue.toLowerCase())) {\n const [firstOption, ...remainingOptions] = settingsOptions;\n const defaultValueOption = { id: defaultValue, label: defaultValue, value: defaultValue };\n if (this.input.comboBox) {\n settingsOptions = [firstOption, ...remainingOptions];\n } else {\n settingsOptions = [firstOption, defaultValueOption, ...remainingOptions];\n }\n }\n\n this.input.loadDataSet(settingsOptions);\n\n this.list.configurePopup();\n this.list.setAttribute('slot', 'menu-container');\n this.list.setAttribute('size', 'full');\n this.list.setAttribute('attachment', '.ids-data-grid-wrapper');\n this.list.appendToTargetParent();\n\n if (this.list?.popup) {\n this.list.popup.alignTarget = this.input;\n this.list.popup.onPlaceEnd = (popupRect: DOMRect, domElement) => {\n if (cell?.dataGrid?.rowHeight === 'xxs') {\n domElement.style.top = `${parseInt(domElement.style.top) - 1}px`;\n }\n\n // Get the current x position of cell\n const cellLeft = cell?.getBoundingClientRect().left || 0;\n // Get the current x position of container\n const containerLeft = domElement.offsetParent?.getBoundingClientRect().left || 0;\n domElement.style.left = `${cellLeft - containerLeft}px`;\n return popupRect;\n };\n }\n\n this.input.value = this.#value ?? '';\n this.input.size = 'full';\n this.input.labelState = 'collapsed';\n this.input.colorVariant = isInline ? 'in-cell' : 'borderless';\n this.input.fieldHeight = String(cell?.dataGrid?.rowHeight);\n const triggerField = this.input.container?.querySelector<IdsTriggerField>('ids-trigger-field');\n if (triggerField) {\n triggerField.focus();\n triggerField.colorVariant = isInline ? 'in-cell' : 'borderless';\n }\n\n if (this.input.comboBox) {\n this.input.dropdownList?.classList.add('is-combobox');\n triggerField?.setAttribute('combobox', 'true');\n triggerField?.setAttribute('autoselect', 'true');\n triggerField?.classList.add('combo-filter');\n if (triggerField?.input) triggerField.input.value = this.input.value;\n }\n\n // apply user validation\n if (validation) {\n applyEditorValidation(this.input.input, validation);\n }\n\n this.#attachEventListeners();\n // Only open if initiated by a click\n if (this.clickEvent && !this.input.comboBox) {\n await this.input?.open(this.input.typeahead);\n }\n if (this.input.comboBox) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n applyEditorDropdownFocus(this);\n }\n }\n\n /**\n * Overrides data grid cell's focusout event handling\n * @param {FocusEvent} evt focus event\n */\n stopPropagation(evt: FocusEvent) {\n const tagName = evt.relatedTarget instanceof HTMLElement ? evt.relatedTarget.tagName : evt.relatedTarget;\n\n if (tagName === 'IDS-DROPDOWN' || tagName === 'IDS-LIST-BOX-OPTION') {\n evt.stopPropagation();\n evt.stopImmediatePropagation();\n }\n }\n\n /**\n * Attach dropdown event handlers\n */\n #attachEventListeners() {\n this.input?.onEvent('change', this.input, (evt) => { this.#value = evt.detail.value; });\n this.input?.onEvent('focusout', this.input, this.#stopPropagationCb);\n if (this.list) {\n this.list.onOutsideClick = (e: MouseEvent) => {\n if (!e.composedPath().includes(this.list!)) {\n this.input?.close();\n }\n };\n this.list.refreshTriggerEvents();\n // Close code is in #startCellEdit\n }\n\n this.input?.onEvent('keydown', this.list, (e) => {\n const key = e.key;\n if (key === 'Enter') {\n e.stopPropagation();\n }\n });\n }\n\n /* Save selected dropdown value */\n save() {\n return {\n value: this.input?.value,\n dirtyCheckValue: this.input?.input?.value\n };\n }\n\n /**\n * Destroy dropdown editor\n */\n destroy(): void {\n this.input?.offEvent('click');\n this.input?.offEvent('change');\n this.input?.offEvent('focusout', this.input, this.#stopPropagationCb);\n this.list?.offEvent('keydown');\n this.list?.remove();\n this.#value = undefined;\n\n this.#cell?.classList?.remove('is-focused');\n this.#cell = undefined;\n }\n\n value() {\n return this.input?.value ?? '';\n }\n\n change(newValue: boolean | number | string) {\n if (this.input) this.input.value = String(newValue);\n }\n}\n\nexport class DatePickerEditor implements IdsDataGridEditor {\n public type = 'datepicker';\n\n public input?: IdsTriggerField;\n\n public popup?: IdsDatePickerPopup;\n\n clickEvent?: MouseEvent;\n\n #value?: Date;\n\n #displayValue = '';\n\n init(cell?: IdsDataGridCell) {\n this.input = this.#buildDatePickerTriggerField(cell!);\n this.popup = this.#buildDatePickerPopup(cell!);\n\n // parse date string\n this.#update(cell!, cell!.originalValue as string);\n\n // insert datepicker component and focus\n cell!.innerHTML = '';\n cell!.appendChild(this.popup);\n cell!.appendChild(this.input);\n this.input.addEventListener('keydown', (e) => applyEditorEndCellEdit(cell!, e));\n\n this.input.value = this.#displayValue;\n this.popup?.syncDateAttributes(this.#value ?? new Date());\n if (this.input) this.input.autoselect = (cell?.column?.editor?.editorSettings?.autoselect as boolean) || true;\n\n const validation = cell?.column.editor?.editorValidation;\n if (validation) {\n applyEditorValidation(this.input, validation);\n }\n\n if (this.popup) {\n const popup = this.popup;\n this.popup.value = this.#displayValue;\n this.popup.attachment = '.ids-data-grid-wrapper';\n this.popup.slot = 'menu-container';\n\n this.popup.appendToTargetParent();\n if (this.popup.popup) {\n this.popup.popup.positionStyle = 'fixed';\n this.popup.popup.popupOpenEventsTarget = document.body;\n this.popup.popup.onOutsideClick = (e: MouseEvent) => {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n if (!e.composedPath().includes(popup)) { popup.hide(); }\n };\n }\n\n // apply popup required settings\n this.popup.id = `${cell!.column.field}-date-picker-popup`;\n this.popup.triggerType = 'click';\n this.popup.triggerElem = `#${cell!.column.field}-date-picker-btn`;\n this.popup.target = `#${cell!.column.field}-date-picker`;\n this.popup.popup!.align = 'bottom, right';\n this.popup.popup!.arrowTarget = `#${cell!.column.field}-date-picker-btn`;\n this.popup.popup!.y = 16;\n this.popup.refreshTriggerEvents();\n\n // Show button group\n if (this.popup.hasTime()) {\n this.popup.showApply = true;\n const buttonGroup = this.popup.container?.querySelector('.popup-footer');\n buttonGroup?.classList.remove('hidden');\n }\n\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n applyEditorPopupFocus(this);\n }\n\n this.#attachEventListeners(cell);\n }\n\n #buildDatePickerTriggerField(cell: IdsDataGridCell): IdsTriggerField {\n const component = <IdsTriggerField>document.createElement('ids-trigger-field');\n\n // apply user settings\n applyEditorSettings(component, cell?.column.editor?.editorSettings);\n\n component.id = `${cell.column.field}-date-picker`;\n component.fieldHeight = String(cell?.dataGrid?.rowHeight) === 'xxs' ? `xs` : String(cell?.dataGrid?.rowHeight);\n component.labelState = 'collapsed';\n component.colorVariant = 'borderless';\n component.size = 'full';\n component.mask = true;\n\n component.insertAdjacentHTML(\n 'beforeend',\n `<ids-trigger-button\n class=\"ids-trigger-field-slot-trigger-end\"\n id=\"${cell.column.field}-date-picker-btn\"\n slot=\"trigger-end\"\n icon=\"calendar\"></ids-trigger-button>`\n );\n\n return component;\n }\n\n #buildDatePickerPopup(cell: IdsDataGridCell): IdsDatePickerPopup {\n const component = <IdsDatePickerPopup>document.createElement('ids-date-picker-popup');\n // apply user settings\n applyEditorSettings(component, cell?.column.editor?.editorSettings);\n return component;\n }\n\n /**\n * Resolves the date format used for the value the user sees while editing.\n * Falls back to the editor format, then the locale default, so grids that\n * only configure `editorSettings.format` keep their previous behavior.\n * @param {IdsDataGridCell} cell the editing cell\n * @returns {string | undefined} the display date format, if any\n */\n #displayFormat(cell: IdsDataGridCell): string | undefined {\n const formatOptionsFormat = (cell?.column?.formatOptions as Record<string, string> | undefined)?.format;\n const editorFormat = cell?.column?.editor?.editorSettings?.format as string | undefined;\n return formatOptionsFormat || editorFormat || undefined;\n }\n\n #update(cell: IdsDataGridCell, dateString: string) {\n const displayFormat = this.#displayFormat(cell);\n const editorFormat = (cell?.column?.editor?.editorSettings?.format as string | undefined) || undefined;\n\n // The incoming string may be in the display format (formatOptions) or the\n // editor/internal format (editorSettings). Try the display format first and\n // fall back to the editor format so both cases parse correctly.\n let inputDate = cell?.dataGrid.localeAPI.parseDate(\n dateString,\n { dateFormat: displayFormat }\n ) as Date;\n\n if ((!inputDate || !isValidDate(inputDate)) && editorFormat && editorFormat !== displayFormat) {\n inputDate = cell?.dataGrid.localeAPI.parseDate(\n dateString,\n { dateFormat: editorFormat }\n ) as Date;\n }\n\n if (!dateString || !isValidDate(inputDate)) {\n this.#displayValue = dateString;\n this.#value = undefined;\n return;\n }\n\n // update original date value, preserving time from input if available\n if (this.#value instanceof Date) {\n this.#value.setFullYear(inputDate.getFullYear());\n this.#value.setMonth(inputDate.getMonth());\n this.#value.setDate(inputDate.getDate());\n // Update time components if they differ from default (00:00:00)\n if (inputDate.getHours() !== 0 || inputDate.getMinutes() !== 0\n || inputDate.getSeconds() !== 0 || inputDate.getMilliseconds() !== 0) {\n this.#value.setHours(inputDate.getHours());\n this.#value.setMinutes(inputDate.getMinutes());\n this.#value.setSeconds(inputDate.getSeconds());\n this.#value.setMilliseconds(inputDate.getMilliseconds());\n }\n } else {\n this.#value = inputDate;\n }\n\n // Show the value in the user-facing display format (formatOptions) while editing.\n // The internal value (#value) and saved value stay driven by editorSettings.\n this.#displayValue = cell!.dataGrid.localeAPI.formatDate(this.#value, { dateFormat: displayFormat });\n }\n\n #stopPropagation(evt: FocusEvent): void {\n const isOpen = this.input?.popup?.hidden === false;\n if (isOpen) evt.stopImmediatePropagation();\n }\n\n #attachEventListeners(cell?: IdsDataGridCell | undefined) {\n const focusOutHandler = (evt: FocusEvent) => this.#stopPropagation(evt);\n this.input?.onEvent('focusout', this.input, focusOutHandler, { capture: true });\n this.popup?.onEvent('hide', this.popup, () => {\n if (cell!.contains(cell!.dataGrid!.shadowRoot!.activeElement)) return;\n if (!cell!.dataGrid!.contains(document.activeElement)) return;\n if (!cell!.dataGrid!.shadowRoot!.contains(document.activeElement)) return;\n\n cell?.focus();\n });\n }\n\n save(cell?: IdsDataGridCell) {\n this.#update(cell!, cell?.value);\n const editorFormat = (cell?.column?.editor?.editorSettings?.format as string | undefined) || undefined;\n\n // Determine the value saved back to the dataset (what grid APIs return):\n // 1. `editorSettings.format` set -> use that internal format (e.g. 'yyyyMMdd' -> '20260818').\n // 2. otherwise -> ISO 8601 string (e.g. '2025-01-15T00:00:00.000Z').\n // Falls back to displayValue when input is not a valid date (preserves free-text input).\n let dateValue: string | undefined;\n if (editorFormat && this.#value instanceof Date) {\n dateValue = cell!.dataGrid.localeAPI.formatDate(this.#value, { dateFormat: editorFormat });\n } else {\n dateValue = this.#value?.toISOString();\n }\n\n return {\n value: (dateValue || this.#displayValue) ?? '',\n dirtyCheckValue: this.#displayValue\n };\n }\n\n destroy() {\n this.input?.offEvent('focusout');\n this.input?.offEvent('outsideclick.datepicker');\n this.popup?.offEvent('hide');\n this.popup?.remove();\n\n this.#value = undefined;\n this.#displayValue = '';\n }\n\n value() {\n return this.input?.input?.value ?? '';\n }\n\n change(newValue: boolean | number | string) {\n if (this.input?.input) this.input.input.value = String(newValue);\n }\n}\n\nexport class TimePickerEditor implements IdsDataGridEditor {\n type = 'timepicker';\n\n input?: IdsTriggerField;\n\n popup?: IdsTimePickerPopup;\n\n clickEvent?: MouseEvent;\n\n #originalDate?: Date;\n\n init(cell?: IdsDataGridCell | undefined) {\n this.input = this.#buildTimePickerTriggerField(cell!);\n this.popup = this.#buildTimePickerPopup(cell!);\n\n // parse date string\n const dateString = cell!.originalValue as string ?? '';\n const date = cell!.dataGrid!.localeAPI!.parseDate(dateString, undefined, true) as Date;\n const isValid = isValidDate(date);\n this.#originalDate = isValid ? date : undefined;\n this.input.value = isValid ? cell!.dataGrid!.localeAPI!.formatDate(this.#originalDate, { pattern: this.input.format }) : '';\n\n // insert time picker and focus\n cell!.innerHTML = '';\n cell!.appendChild(this.popup);\n cell!.appendChild(this.input);\n this.input.addEventListener('keydown', (e) => applyEditorEndCellEdit(cell!, e));\n\n this.input.autoselect = (cell?.column?.editor?.editorSettings?.autoselect as boolean) || true;\n\n if (this.popup) {\n const popup = this.popup;\n this.popup.attachment = '.ids-data-grid-wrapper';\n this.popup.slot = 'menu-container';\n\n this.popup.appendToTargetParent();\n if (this.popup.popup) {\n this.popup.popup.positionStyle = 'fixed';\n this.popup.popup.popupOpenEventsTarget = document.body;\n this.popup.popup.onOutsideClick = async (e: MouseEvent) => {\n if (!e.composedPath().includes(popup)) { await popup.hide(); }\n };\n }\n\n // apply popup required settings\n this.popup.id = `${cell!.column.field}-time-picker-popup`;\n this.popup.triggerType = 'click';\n this.popup.triggerElem = `#${cell!.column.field}-time-picker-btn`;\n this.popup.target = `#${cell!.column.field}-time-picker`;\n this.popup.popup!.align = 'bottom, right';\n this.popup.popup!.arrowTarget = `#${cell!.column.field}-time-picker-btn`;\n this.popup.popup!.y = 16;\n this.popup.refreshTriggerEvents();\n\n if (this.#originalDate) {\n const hours = this.#originalDate.getHours();\n this.popup.hours = hours > 11 ? hours - 12 : hours;\n this.popup.minutes = this.#originalDate.getMinutes();\n this.popup.seconds = this.#originalDate.getSeconds();\n this.popup.period = hours > 11 ? 'PM' : 'AM';\n }\n\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n applyEditorPopupFocus(this);\n }\n\n this.#attachEventListeners(cell);\n }\n\n #buildTimePickerTriggerField(cell: IdsDataGridCell): IdsTriggerField {\n const component = <IdsTriggerField>document.createElement('ids-trigger-field');\n\n // apply user settings\n applyEditorSettings(component, cell?.column.editor?.editorSettings);\n\n // apply required settings\n component.id = `${cell.column.field}-time-picker`;\n component.fieldHeight = String(cell?.dataGrid?.rowHeight) === 'xxs' ? `xs` : String(cell?.dataGrid?.rowHeight);\n component.labelState = 'collapsed';\n component.colorVariant = 'borderless';\n component.size = 'full';\n component.mask = true;\n\n component.insertAdjacentHTML(\n 'beforeend',\n `<ids-trigger-button\n class=\"ids-trigger-field-slot-trigger-end\"\n id=\"${cell.column.field}-time-picker-btn\"\n slot=\"trigger-end\"\n icon=\"clock\"></ids-trigger-button>`\n );\n\n return component;\n }\n\n #buildTimePickerPopup(cell: IdsDataGridCell): IdsTimePickerPopup {\n const popup = <IdsTimePickerPopup>document.createElement('ids-time-picker-popup');\n\n // apply user settings\n applyEditorSettings(popup, cell?.column.editor?.editorSettings);\n\n return popup;\n }\n\n #attachEventListeners(cell?: IdsDataGridCell | undefined) {\n this.popup?.onEvent('hide', this.popup, () => {\n if (cell!.contains(cell!.dataGrid!.shadowRoot!.activeElement)) return;\n cell?.focus();\n });\n }\n\n save(cell?: IdsDataGridCell) {\n let date;\n const inputValue = this.input!.value;\n if (inputValue) {\n date = cell!.dataGrid.localeAPI!.parseDate(inputValue, { pattern: this.input!.format }, true) as Date;\n\n // Timepicker formats don't include the \"date\" portion,\n // So this fills in the missing parts from the `#originalDate` if possible to save a valid date value.\n if (this.#originalDate && (\n this.#originalDate.getMonth() !== date?.getMonth()\n || this.#originalDate.getFullYear() !== date?.getFullYear()\n || this.#originalDate.getDate() !== date?.getDate()\n )) {\n date?.setMonth(this.#originalDate.getMonth());\n date?.setFullYear(this.#originalDate.getFullYear());\n date?.setDate(this.#originalDate.getDate());\n }\n }\n\n return {\n value: date && isValidDate(date) ? date?.toISOString() : undefined,\n dirtyCheckValue: inputValue\n };\n }\n\n destroy() {\n this.input?.offEvent('focusout');\n this.input?.detachAllListeners();\n this.input?.remove();\n this.popup?.offEvent('hide');\n this.popup?.detachAllListeners();\n this.popup?.remove();\n this.#originalDate = undefined;\n }\n\n value() {\n return this.input?.value ?? '';\n }\n\n change(newValue: boolean | number | string) {\n if (this.input) this.input.value = String(newValue);\n }\n}\n\nexport class TreeEditor extends InputEditor {\n expandButton?: IdsButton;\n\n fieldContainer?: HTMLElement;\n\n /**\n * Adds extra button element for mimicking the tree formatter's display\n * @param {IdsDataGridCell} cell the cell element\n */\n init(cell?: IdsDataGridCell) {\n super.init(cell);\n\n const buttonHTML = this.#isExpandable(cell!) ? `<ids-button class=\"expand-button\" disabled=\"true\">\n <ids-icon icon=\"plusminus-folder-${this.#isExpanded(cell!) ? 'open' : 'closed'}\"></ids-icon>\n </ids-button>` : '';\n\n cell!.insertAdjacentHTML('afterbegin', `<span class=\"ids-data-grid-tree-container\">\n ${buttonHTML}\n <span class=\"ids-data-grid-tree-field-container\"></span>\n </span>`);\n\n this.expandButton = cell!.querySelector<IdsButton>('.expand-button')!;\n this.fieldContainer = cell!.querySelector<HTMLElement>('.ids-data-grid-tree-field-container')!;\n this.fieldContainer.appendChild(this.input!);\n }\n\n #isExpanded(cell: IdsDataGridCell) {\n const rowData = cell.dataGrid.data[cell.rowIndex];\n if (rowData) return rowData.rowExpanded !== false;\n return false;\n }\n\n #isExpandable(cell: IdsDataGridCell) {\n const rowData = cell.dataGrid.data[cell.rowIndex];\n if (rowData && Array.isArray(rowData.children)) {\n return rowData.children.length > 0;\n }\n return false;\n }\n\n destroy() {\n super.destroy();\n this.expandButton?.remove();\n this.fieldContainer?.remove();\n this.expandButton = undefined;\n this.fieldContainer = undefined;\n }\n}\n\nexport class LookupEditor implements IdsDataGridEditor {\n type = 'lookup';\n\n input?: IdsLookup;\n\n popup?: IdsModal;\n\n clickEvent?: MouseEvent;\n\n /**\n * Create an input and set the value and focus states\n * @param {IdsDataGridCell} cell the cell element\n */\n init(cell?: IdsDataGridCell) {\n const isInline = cell?.column.editor?.inline;\n this.input = <IdsLookup>document.createElement('ids-lookup');\n this.input.size = isInline ? 'full' : '';\n\n this.input.clearable = true;\n this.input.labelState = 'collapsed';\n\n // Clear cell and set value\n const value = cell?.innerText ?? '';\n cell!.innerHTML = '';\n cell?.appendChild(this.input as any);\n this.input.addEventListener('keydown', (e) => applyEditorEndCellEdit(cell!, e));\n\n this.input.value = value;\n\n this.popup = this.input.modal ?? undefined;\n\n applyEditorSettings(this.input, { ...cell?.column.editor?.editorSettings });\n applyEditorValidation(this.input?.input, cell?.column.editor?.editorValidation);\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n applyEditorPopupFocus(this);\n\n if (this.input?.triggerField) {\n this.input.triggerField.labelState = 'collapsed';\n this.input.triggerField.colorVariant = isInline ? 'in-cell' : 'borderless';\n this.input.triggerField.focus();\n this.input.triggerField.offEvent('paste', this.input.triggerField.input);\n this.input.triggerField.onEvent('paste', this.input.triggerField.input, (e) => {\n e.stopPropagation();\n });\n }\n\n const rowHeight = String(cell?.dataGrid?.rowHeight);\n\n // TODO: these are hacks... we should fix styles for xxs and not cheat by giving them styles for xs\n this.input.fieldHeight = rowHeight === 'xxs' ? `xs` : rowHeight;\n this.input.triggerField?.toggleAttribute(attributes.NO_MARGINS, rowHeight !== 'xxs');\n this.input.triggerField?.clearableButton?.toggleAttribute(attributes.NO_MARGINS, rowHeight !== 'xxs');\n this.input.triggerButton?.toggleAttribute(attributes.NO_MARGINS, rowHeight !== 'xxs');\n }\n\n value() {\n return this.input?.value ?? '';\n }\n\n change(newValue: boolean | number | string) {\n if (this.input) this.input.value = String(newValue);\n }\n\n /* Save selected dropdown value */\n save(): IdsDataGridSaveValue | undefined | null {\n return {\n value: this.input?.value,\n dirtyCheckValue: this.input?.input?.value\n };\n }\n\n /* Destroy the editor */\n destroy() {\n this.input?.offEvent('keydown');\n this.input?.offEvent('change');\n this.input = undefined;\n }\n}\n\nexport const editors: Array<{ type: string, editor?: IdsDataGridEditor }> = [];\n\neditors.push({\n type: 'input',\n editor: new InputEditor()\n});\n\neditors.push({\n type: 'password',\n editor: new PasswordInputEditor()\n});\n\neditors.push({\n type: 'checkbox',\n editor: new CheckboxEditor()\n});\n\neditors.push({\n type: 'dropdown',\n editor: new DropdownEditor()\n});\n\neditors.push({\n type: 'datepicker',\n editor: new DatePickerEditor()\n});\n\neditors.push({\n type: 'timepicker',\n editor: new TimePickerEditor()\n});\n\neditors.push({\n type: 'tree',\n editor: new TreeEditor()\n});\n\neditors.push({\n type: 'lookup',\n editor: new LookupEditor()\n});\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AA6DA,IAAM,sBAAsB,CAAC,MAAW,aAAmC;AAEzE,aAAW,WAAW,UAAU;AAC9B,SAAK,OAAO,IAAI,SAAS,OAAO;AAAA,EAClC;AACF;AAEA,IAAM,wBAAwB,CAAC,MAAW,eAA4C;AACpF,MAAI,MAAM,qBAAqB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9C,WAAO;AAAA,MACL,OAAO,KAAK,OAAO;AAAA,MACnB,iBAAiB,KAAK,OAAO,OAAO;AAAA,IACtC;AAAA,EACF;AAAA;AAAA,EAGA,UAAU;AACR,SAAK,OAAO,SAAS,SAAS;AAC9B,SAAK,OAAO,SAAS,QAAQ;AAC7B,SAAK,QAAQ;AAAA,EACf;AACF;AAEO,IAAM,UAA+D,CAAC;AAE7E,QAAQ,KAAK;AAAA,EACX,MAAM;AAAA,EACN,QAAQ,IAAI,YAAY;AAC1B,CAAC;AAED,QAAQ,KAAK;AAAA,EACX,MAAM;AAAA,EACN,QAAQ,IAAI,oBAAoB;AAClC,CAAC;AAED,QAAQ,KAAK;AAAA,EACX,MAAM;AAAA,EACN,QAAQ,IAAI,eAAe;AAC7B,CAAC;AAED,QAAQ,KAAK;AAAA,EACX,MAAM;AAAA,EACN,QAAQ,IAAI,eAAe;AAC7B,CAAC;AAED,QAAQ,KAAK;AAAA,EACX,MAAM;AAAA,EACN,QAAQ,IAAI,iBAAiB;AAC/B,CAAC;AAED,QAAQ,KAAK;AAAA,EACX,MAAM;AAAA,EACN,QAAQ,IAAI,iBAAiB;AAC/B,CAAC;AAED,QAAQ,KAAK;AAAA,EACX,MAAM;AAAA,EACN,QAAQ,IAAI,WAAW;AACzB,CAAC;AAED,QAAQ,KAAK;AAAA,EACX,MAAM;AAAA,EACN,QAAQ,IAAI,aAAa;AAC3B,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
} from "./ids-chunk-6QUPN2OT-full.js";
|
|
25
25
|
import {
|
|
26
26
|
editors
|
|
27
|
-
} from "./ids-chunk-
|
|
27
|
+
} from "./ids-chunk-IZWNCK4C-full.js";
|
|
28
28
|
import {
|
|
29
29
|
IdsDataGridToggleEmptyMessage,
|
|
30
30
|
emptyMessageTemplate,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
} from "./ids-chunk-OITRWBV5-full.js";
|
|
38
38
|
import {
|
|
39
39
|
IdsDataGridFormatters
|
|
40
|
-
} from "./ids-chunk-
|
|
40
|
+
} from "./ids-chunk-TRPOCB4F-full.js";
|
|
41
41
|
import {
|
|
42
42
|
IdsDataGridHeader
|
|
43
43
|
} from "./ids-chunk-WCEYHKG2-full.js";
|
|
@@ -7678,4 +7678,4 @@ IdsDataGrid = __decorateClass([
|
|
|
7678
7678
|
export {
|
|
7679
7679
|
IdsDataGrid
|
|
7680
7680
|
};
|
|
7681
|
-
//# sourceMappingURL=ids-chunk-
|
|
7681
|
+
//# sourceMappingURL=ids-chunk-MHSSTALO-full.js.map
|
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
import {
|
|
6
6
|
escapeHTML
|
|
7
7
|
} from "./ids-chunk-2PYTBNLE-full.js";
|
|
8
|
+
import {
|
|
9
|
+
isValidDate
|
|
10
|
+
} from "./ids-chunk-PMRZAFUD-full.js";
|
|
8
11
|
import {
|
|
9
12
|
maskText
|
|
10
13
|
} from "./ids-chunk-6S4RCFTT-full.js";
|
|
@@ -101,11 +104,32 @@ var IdsDataGridFormatters = class {
|
|
|
101
104
|
}
|
|
102
105
|
/** Formats date data as a date string in the desired format */
|
|
103
106
|
date(rowData, columnData, index, api) {
|
|
104
|
-
|
|
105
|
-
value = api.localeAPI?.formatDate(
|
|
107
|
+
const rawValue = this.#extractValue(rowData, columnData.field);
|
|
108
|
+
let value = api.localeAPI?.formatDate(rawValue, columnData.formatOptions) ?? rawValue?.toString();
|
|
109
|
+
if (value === rawValue) {
|
|
110
|
+
value = this.#reformatFromEditorFormat(rawValue, columnData, api) ?? value;
|
|
111
|
+
}
|
|
106
112
|
const icon = columnData.editor?.type === "datepicker" ? `<ids-icon icon="schedule" class="editor-cell-icon ${columnData.editor?.showEditorIcons ? "show-cell-icon-always" : ""}"></ids-icon>` : "";
|
|
107
113
|
return `<span class="text-ellipsis">${value}</span>${icon}`;
|
|
108
114
|
}
|
|
115
|
+
/**
|
|
116
|
+
* Reformats a value stored in the editor's internal format into the column's
|
|
117
|
+
* display format. Returns undefined when the value cannot be parsed with the
|
|
118
|
+
* editor format (so callers can fall back to the raw string).
|
|
119
|
+
* @param {unknown} value the raw cell value
|
|
120
|
+
* @param {IdsDataGridColumn} columnData the column configuration
|
|
121
|
+
* @param {IdsDataGrid} api the data grid instance
|
|
122
|
+
* @returns {string | undefined} the reformatted display value, if any
|
|
123
|
+
*/
|
|
124
|
+
#reformatFromEditorFormat(value, columnData, api) {
|
|
125
|
+
const editorFormat = columnData.editor?.editorSettings?.format;
|
|
126
|
+
const displayFormat = columnData.formatOptions?.format;
|
|
127
|
+
if (!editorFormat || !displayFormat || editorFormat === displayFormat) return void 0;
|
|
128
|
+
if (typeof value !== "string" || value.trim() === "" || !/\d/.test(value)) return void 0;
|
|
129
|
+
const parsed = api.localeAPI?.parseDate(value, { dateFormat: editorFormat });
|
|
130
|
+
if (!parsed || !isValidDate(parsed)) return void 0;
|
|
131
|
+
return api.localeAPI?.formatDate(parsed, { dateFormat: displayFormat });
|
|
132
|
+
}
|
|
109
133
|
/** Formats adds search-list to cells that have lookup editor associated with them */
|
|
110
134
|
lookup(rowData, columnData) {
|
|
111
135
|
const value = this.#extractValue(rowData, columnData.field);
|
|
@@ -114,8 +138,11 @@ var IdsDataGridFormatters = class {
|
|
|
114
138
|
}
|
|
115
139
|
/** Formats date data as a time string in the desired format */
|
|
116
140
|
time(rowData, columnData, index, api) {
|
|
117
|
-
|
|
118
|
-
value = api.localeAPI?.formatDate(
|
|
141
|
+
const rawValue = this.#extractValue(rowData, columnData.field);
|
|
142
|
+
let value = api.localeAPI?.formatDate(rawValue, columnData.formatOptions || { timeStyle: "short" }) ?? rawValue?.toString();
|
|
143
|
+
if (value === rawValue) {
|
|
144
|
+
value = this.#reformatFromEditorFormat(rawValue, columnData, api) ?? value;
|
|
145
|
+
}
|
|
119
146
|
const icon = columnData.editor?.type === "timepicker" ? `<ids-icon icon="clock" class="editor-cell-icon ${columnData.editor?.showEditorIcons ? "show-cell-icon-always" : ""}"></ids-icon>` : "";
|
|
120
147
|
return `<span class="text-ellipsis">${value}</span>${icon}`;
|
|
121
148
|
}
|
|
@@ -505,4 +532,4 @@ var IdsDataGridFormatters = class {
|
|
|
505
532
|
export {
|
|
506
533
|
IdsDataGridFormatters
|
|
507
534
|
};
|
|
508
|
-
//# sourceMappingURL=ids-chunk-
|
|
535
|
+
//# sourceMappingURL=ids-chunk-TRPOCB4F-full.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/components/ids-data-grid/ids-data-grid-formatters.ts"],
|
|
4
|
+
"sourcesContent": ["import '../ids-hyperlink/ids-hyperlink';\nimport '../ids-button/ids-button';\nimport '../ids-alert/ids-alert';\nimport '../ids-badge/ids-badge';\nimport '../ids-card/ids-card';\nimport '../ids-color/ids-color';\nimport '../ids-counts/ids-counts';\nimport '../ids-icon/ids-icon';\nimport '../ids-image/ids-image';\nimport '../ids-progress-bar/ids-progress-bar';\nimport '../ids-rating/ids-rating';\nimport '../ids-slider/ids-slider';\nimport '../ids-step-chart/ids-step-chart';\nimport '../ids-tag/ids-tag';\n\nimport { escapeHTML } from '../../utils/ids-xss-utils/ids-xss-utils';\nimport type { IdsDataGridColumn } from './ids-data-grid-column';\nimport type IdsDataGrid from './ids-data-grid';\nimport IdsDataGridCell from './ids-data-grid-cell';\nimport { attributes } from '../../core/ids-attributes';\nimport { maskText } from '../../utils/ids-string-utils/ids-string-utils';\nimport { isValidDate } from '../../utils/ids-date-utils/ids-date-utils';\n\n/* eslint-disable jsdoc/require-returns */\n/* eslint-disable jsdoc/require-param */\nexport default class IdsDataGridFormatters {\n #extractValue(item: Record<string, any>, field: string | undefined) {\n if (!field) return '';\n\n let rawValue;\n if (field.indexOf('.') > -1) {\n rawValue = field.split('.').reduce((o: any, x: any) => (o ? o[x] : ''), item);\n } else {\n rawValue = item[field];\n }\n\n if (rawValue === undefined || rawValue === null) {\n return '';\n }\n\n if (typeof rawValue !== 'string') {\n return rawValue;\n }\n return escapeHTML(rawValue || '');\n }\n\n #extractBoolean(item: Record<string, any>, field: string | undefined) {\n const dataValue = this.#extractValue(item, field);\n let value: boolean;\n const trueValues: Set<string | number | boolean> = new Set([1, '1', 'true', true, 'yes']);\n switch (typeof dataValue) {\n case 'string': {\n const normalizedValue = dataValue.toLowerCase();\n value = trueValues.has(normalizedValue);\n break;\n }\n case 'number':\n case 'boolean':\n value = trueValues.has(dataValue);\n break;\n default:\n value = false;\n }\n return value;\n }\n\n /** Used to check if the column should show as disabled */\n #columnDisabled(row: number, value: any, col: IdsDataGridColumn, item: Record<string, any>): boolean {\n const isTrue = (v: any) => (typeof v !== 'undefined' && v !== null && ((typeof v === 'boolean' && v === true) || (typeof v === 'string' && v.toLowerCase() === 'true')));\n const disabled = col.disabled;\n\n return typeof disabled === 'function' ? disabled(row, value, col, item) : isTrue(disabled);\n }\n\n /** Used to check if the row or column should show as disabled */\n #isDisabled(row: number, value: any, col: IdsDataGridColumn, item: Record<string, any>): boolean {\n return item?.idstempcanrowdisabled || item?.disabled === true || this.#columnDisabled(row, value, col, item);\n }\n\n /** Used to get the color via the function or text */\n #color(row: number, value: any, col: IdsDataGridColumn, item: Record<string, any>): string | null | undefined {\n const color = col.color;\n return typeof color === 'function' ? color(row, value, col, item) : color;\n }\n\n /** Used to get the icon via the function or text */\n #icon(row: number, value: any, col: IdsDataGridColumn, item: Record<string, any>): string | null | undefined {\n const icon = col.icon;\n return typeof icon === 'function' ? icon(row, value, col, item) : icon;\n }\n\n /** Used to get the text via the function or text */\n #text(row: number, value: any, col: IdsDataGridColumn, item: Record<string, any>): string | null | undefined {\n const text = col.text;\n return typeof text === 'function' ? text(row, value, col, item) : text;\n }\n\n #readonly(row: number, value: any, col: IdsDataGridColumn, item: Record<string, any>): boolean | undefined {\n const readonly = col.readonly;\n\n return typeof readonly === 'function' ? readonly(row, value, col, item) : readonly;\n }\n\n #size(row: number, value: any, col: IdsDataGridColumn, item: Record<string, any>): string | undefined {\n const size = col.size;\n\n return typeof size === 'function' ? size(row, value, col, item) : size;\n }\n\n /** Displays a Text String */\n text(rowData: Record<string, unknown>, columnData: IdsDataGridColumn): string {\n return `<span class=\"text-ellipsis\">${this.#extractValue(rowData, columnData.field)}</span>`;\n }\n\n /** Masks text with stars with reveal icon */\n textmask(rowData: Record<string, unknown>, columnData: IdsDataGridColumn): string {\n const icon = `<ids-icon icon=\"show-item\" class=\"editor-cell-icon text-mask ${columnData.editor?.showEditorIcons ? 'show-cell-icon-always' : ''}\"></ids-icon>`;\n return `<span class=\"text-ellipsis is-textmask\">${maskText(this.#extractValue(rowData, columnData.field).toString(), columnData?.textMaskCharacter)}</span>${icon}`;\n }\n\n /** Masks text with stars */\n password(rowData: Record<string, unknown>, columnData: IdsDataGridColumn): string {\n return `<span class=\"text-ellipsis\">${this.#extractValue(rowData, columnData.field).toString().replace(/./g, '\u2022')}</span>`;\n }\n\n /** Formats a sequencing running count of rows */\n rowNumber(_rowData: Record<string, unknown>, columnData: IdsDataGridColumn, index: number): string {\n return `<span class=\"text-ellipsis\">${index + 1}</span>`;\n }\n\n /** Formats date data as a date string in the desired format */\n date(rowData: Record<string, unknown>, columnData: IdsDataGridColumn, index: number, api: IdsDataGrid): string {\n const rawValue: any = this.#extractValue(rowData, columnData.field);\n let value: any = api.localeAPI?.formatDate(rawValue, columnData.formatOptions) ?? rawValue?.toString();\n // The value may be stored in the editor's internal format (editorSettings.format)\n // while the column displays a different format (formatOptions). When the direct\n // format could not reformat it (result unchanged), convert from the editor format\n // to a Date, then display using the column's format (IDS-25756).\n if (value === rawValue) {\n value = this.#reformatFromEditorFormat(rawValue, columnData, api) ?? value;\n }\n const icon = columnData.editor?.type === 'datepicker' ? `<ids-icon icon=\"schedule\" class=\"editor-cell-icon ${columnData.editor?.showEditorIcons ? 'show-cell-icon-always' : ''}\"></ids-icon>` : '';\n return `<span class=\"text-ellipsis\">${value}</span>${icon}`;\n }\n\n /**\n * Reformats a value stored in the editor's internal format into the column's\n * display format. Returns undefined when the value cannot be parsed with the\n * editor format (so callers can fall back to the raw string).\n * @param {unknown} value the raw cell value\n * @param {IdsDataGridColumn} columnData the column configuration\n * @param {IdsDataGrid} api the data grid instance\n * @returns {string | undefined} the reformatted display value, if any\n */\n #reformatFromEditorFormat(value: unknown, columnData: IdsDataGridColumn, api: IdsDataGrid): string | undefined {\n const editorFormat = columnData.editor?.editorSettings?.format as string | undefined;\n const displayFormat = (columnData.formatOptions as Record<string, string> | undefined)?.format;\n if (!editorFormat || !displayFormat || editorFormat === displayFormat) return undefined;\n if (typeof value !== 'string' || value.trim() === '' || !/\\d/.test(value)) return undefined;\n\n const parsed = api.localeAPI?.parseDate(value, { dateFormat: editorFormat });\n if (!parsed || !isValidDate(parsed)) return undefined;\n\n return api.localeAPI?.formatDate(parsed, { dateFormat: displayFormat });\n }\n\n /** Formats adds search-list to cells that have lookup editor associated with them */\n lookup(rowData: Record<string, unknown>, columnData: IdsDataGridColumn): string {\n const value: any = this.#extractValue(rowData, columnData.field);\n const icon = columnData.editor?.type === 'lookup' ? `<ids-icon icon=\"search-list\" class=\"editor-cell-icon ${columnData.editor?.showEditorIcons ? 'show-cell-icon-always' : ''}\"></ids-icon>` : '';\n return `<span class=\"text-ellipsis\">${value}</span>${icon}`;\n }\n\n /** Formats date data as a time string in the desired format */\n time(rowData: Record<string, unknown>, columnData: IdsDataGridColumn, index: number, api: IdsDataGrid): string {\n const rawValue: any = this.#extractValue(rowData, columnData.field);\n let value: any = api.localeAPI?.formatDate(rawValue, columnData.formatOptions || { timeStyle: 'short' }) ?? rawValue?.toString();\n if (value === rawValue) {\n value = this.#reformatFromEditorFormat(rawValue, columnData, api) ?? value;\n }\n const icon = columnData.editor?.type === 'timepicker' ? `<ids-icon icon=\"clock\" class=\"editor-cell-icon ${columnData.editor?.showEditorIcons ? 'show-cell-icon-always' : ''}\"></ids-icon>` : '';\n return `<span class=\"text-ellipsis\">${value}</span>${icon}`;\n }\n\n /** Formats number data as a decimal string in the specific localeAPI */\n decimal(rowData: Record<string, unknown>, columnData: IdsDataGridColumn, index: number, api: IdsDataGrid): string {\n let value: any = this.#extractValue(rowData, columnData.field);\n value = api.localeAPI?.formatNumber(value, columnData.formatOptions\n || { minimumFractionDigits: 2, maximumFractionDigits: 2 }) ?? value.toString();\n return `<span class=\"text-ellipsis\">${value === 'NaN' ? '' : value}</span>`;\n }\n\n /** Formats number data as a integer string in the specific locale */\n integer(rowData: Record<string, unknown>, columnData: IdsDataGridColumn, index: number, api: IdsDataGrid): string {\n let value: any = this.#extractValue(rowData, columnData.field);\n const opts = columnData.formatOptions || {};\n opts.style = 'integer';\n\n value = api.localeAPI?.formatNumber(value, opts) ?? value.toString();\n return `<span class=\"text-ellipsis\">${value === 'NaN' ? '' : value}</span>`;\n }\n\n /** Formats number data as a ids-hyperlink */\n hyperlink(rowData: Record<string, unknown>, columnData: IdsDataGridColumn, index: number): string {\n const value = columnData.text || this.#extractValue(rowData, columnData.field).toString();\n if (!value) {\n return '';\n }\n let colHref: any = columnData.href || '';\n const isDisabled = this.#isDisabled(index, value, columnData, rowData);\n const disabled = isDisabled ? ' disabled=\"true\"' : '';\n\n // Support for dynamic links based on content\n if (columnData.href && typeof columnData.href === 'function') {\n colHref = columnData.href(rowData, columnData);\n // Passing a null href will produce \"just text\" with no link\n if (colHref == null) {\n return columnData.text || value;\n }\n } else {\n colHref = colHref.replace('{{value}}', value);\n }\n return `<ids-hyperlink text-ellipsis href=\"${colHref}\" tabindex=\"-1\"${disabled}>${value}</ids-hyperlink>`;\n }\n\n /** Shows a selection checkbox column */\n selectionCheckbox(rowData: Record<string, unknown>, columnData: IdsDataGridColumn, index: number): string {\n const isDisabled = this.#isDisabled(index, '', columnData, rowData);\n\n return `<span class=\"ids-data-grid-checkbox-container is-selection-checkbox\"><span role=\"checkbox\" aria-checked=\"${rowData?.rowSelected ? 'true' : 'false'}\" aria-label=\"${columnData.name}\" class=\"ids-data-grid-checkbox${rowData?.rowSelected ? ' checked' : ''}${isDisabled ? ' disabled' : ''}\"></span></span>`;\n }\n\n /** Shows a checkbox column */\n checkbox(rowData: Record<string, unknown>, columnData: IdsDataGridColumn, index: number): string {\n const isDisabled = this.#isDisabled(index, '', columnData, rowData);\n const value = this.#extractBoolean(rowData, columnData.field);\n\n return `<span class=\"ids-data-grid-checkbox-container\"><span role=\"checkbox\" aria-checked=\"${value ? 'true' : 'false'}\" aria-label=\"${columnData.name}\" class=\"ids-data-grid-checkbox${value ? ' checked' : ''}${isDisabled ? ' disabled' : ''}\"></span></span>`;\n }\n\n rowReorder(rowData: Record<string, unknown>, columnData: IdsDataGridColumn, index: number): string {\n const value = this.#extractBoolean(rowData, columnData.field);\n\n const color = this.#color(index, value, columnData, rowData) || '';\n const badgeColor = color ? ` badge-color=\"${color}\" badge-position=\"top-left\"` : '';\n\n const sizes = ['small', 'medium', 'large', 'xl', 'xxl'];\n let size = this.#size(index, value, columnData, rowData) || '';\n size = sizes.includes(size) ? size : 'medium';\n\n let icon = this.#icon(index, value, columnData, rowData) || 'drag';\n icon = icon.replace('icon-', '');\n\n const isDisabled = this.#isDisabled(index, value, columnData, rowData);\n const disabled = isDisabled ? ' disabled' : '';\n\n return `<ids-icon icon=\"${icon}\" size=\"${size}\"${badgeColor}${disabled}></ids-icon>`;\n }\n\n /** Shows a selection radio column */\n selectionRadio(rowData: Record<string, unknown>, columnData: IdsDataGridColumn, index: number): string {\n const isDisabled = this.#isDisabled(index, '', columnData, rowData);\n const disabled = isDisabled ? ' disabled' : '';\n return `<span class=\"ids-data-grid-radio-container is-selection-radio\"><span role=\"radio\" aria-checked=\"${rowData?.rowSelected ? 'true' : 'false'}\" aria-label=\"${columnData.name}\" class=\"ids-data-grid-radio${rowData?.rowSelected ? ' checked' : ''}${disabled}\"></span></span>`;\n }\n\n /** Shows an ids-button */\n button(rowData: Record<string, unknown>, columnData: IdsDataGridColumn, index: number): string {\n const value: any = this.#extractValue(rowData, columnData.field);\n const isDisabled = this.#isDisabled(index, value, columnData, rowData);\n const disabled = isDisabled ? ' disabled' : '';\n\n // Type / disabled / icon / text\n return `<ids-button tabindex=\"-1\"${disabled}${columnData.type ? ` type=\"${columnData.type}\"` : ' appearance=\"tertiary\"'}>\n <span class=\"audible\">${columnData.text || ' Button'}</span>\n ${columnData.icon ? `<ids-icon icon=\"${columnData.icon}\"></ids-icon>` : ''}\n </ids-button>`;\n }\n\n /** Shows an ids-badge */\n badge(rowData: Record<string, unknown>, columnData: IdsDataGridColumn, index: number): string {\n const value: any = this.#extractValue(rowData, columnData.field);\n if (!value) return '';\n const color = this.#color(index, value, columnData, rowData);\n const isDisabled = this.#isDisabled(index, value, columnData, rowData);\n const disabled = isDisabled ? ' disabled' : '';\n\n return `<ids-badge color=\"${color || ''}\"${disabled}>${value}</ids-badge>`;\n }\n\n /** Shows an Tree */\n tree(rowData: Record<string, unknown>, columnData: IdsDataGridColumn): string {\n const value = this.#extractValue(rowData, columnData.field);\n const button = (rowData?.children as any)?.length ? `<ids-button tabindex=\"-1\" class=\"expand-button\">\n <ids-icon icon=\"plusminus-folder-${rowData.rowExpanded === false ? 'closed' : 'open'}\"></ids-icon>\n </ids-button>` : '';\n return `<span class=\"ids-data-grid-tree-container\">\n ${button}\n <span class=\"ids-data-grid-tree-field-container\">\n <span class=\"text-ellipsis\">${value}</span>\n </span>\n </span>`;\n }\n\n /** Shows an expander button */\n expander(rowData: Record<string, unknown>, columnData: IdsDataGridColumn): string {\n const value: any = this.#extractValue(rowData, columnData.field);\n const button = `<ids-button tabindex=\"-1\" class=\"expand-button\">\n <ids-icon icon=\"${rowData.rowExpanded === true ? 'caret-up' : 'caret-down'}\"></ids-icon>\n </ids-button>`;\n return `<span class=\"ids-data-grid-tree-container\">\n ${button}\n <span class=\"ids-data-grid-tree-field-container\">\n <span class=\"text-ellipsis\">${value}</span>\n </span>\n </span>`;\n }\n\n /** Shows a dropdown list */\n dropdown(rowData: Record<string, unknown>, columnData: IdsDataGridColumn, index: number, api: IdsDataGrid): string {\n const isShowValue = columnData.editor?.editorSettings?.showValue ?? false;\n const field = columnData.field ?? '';\n const options = <any[]>columnData.editor?.editorSettings?.options || [];\n const value = rowData[field];\n let valueOpt = options.find((opt) => {\n if (!value) return opt.value === '';\n return isShowValue ? opt.value === value || opt.label === value || opt.value.includes(value) : opt.value === value;\n });\n\n if (!valueOpt || !options || options.length === 0) {\n valueOpt = {\n value: rowData[field], id: rowData[field], label: rowData[field]\n };\n }\n\n return `<span\n class=\"text-ellipsis dropdown-cell-value\"\n data-value=\"${valueOpt?.value ?? ''}\"\n data-id=\"${valueOpt?.id ?? ''}\">\n ${isShowValue ? valueOpt?.value ?? '' : valueOpt?.label ?? ''}\n </span>\n ${columnData.editor && api.editable ? `<ids-icon\n icon=\"dropdown\"\n class=\"editor-cell-icon ${columnData.editor?.showEditorIcons ? 'show-cell-icon-always' : ''}\">\n </ids-icon>` : ''}`;\n }\n\n /* Shows ids-alert, and the field value will appear in a tooltip. An `icon` option can be provided as an override. */\n alert(rowData: Record<string, unknown>, columnData: IdsDataGridColumn, index: number): string {\n const value: any = this.#extractValue(rowData, columnData.field);\n if (!value && !columnData.icon) return '';\n\n const icon = this.#icon(index, value, columnData, rowData);\n const tooltip = value ? `tooltip=\"${value}\"` : '';\n const isDisabled = this.#isDisabled(index, value, columnData, rowData);\n const disabled = isDisabled ? ' disabled' : '';\n\n return `\n <span class=\"text-ellipsis\">\n <ids-alert icon=\"${icon}\"${tooltip}${disabled}></ids-alert>\n </span>\n `;\n }\n\n /* Shows ids-color. If a `color` option is provided, the field's value will appear in a tooltip. */\n color(rowData: Record<string, unknown>, columnData: IdsDataGridColumn, index: number): string {\n const value: any = this.#extractValue(rowData, columnData.field);\n const isDisabled = this.#isDisabled(index, value, columnData, rowData);\n const disabled = isDisabled ? ' disabled' : '';\n\n // Regular expression to match common color formats\n // const colorRegex = /^(#(?:[0-9a-fA-F]{3}){1,2}|(?:rgb|hsl)a?\\((?:\\s*\\d+\\s*,){2,3}\\s*\\d*\\.*\\d*\\))$/;\n const colorRegex = /^(#(?:[0-9a-fA-F]{3}){1,2}|(?:rgb|hsl)a?\\(\\s*(?:\\d{1,3}\\s+){2}\\d{1,3}\\s*(\\/\\s*(0|1|0?\\.\\d+))?\\s*\\))$/;\n\n // Check if the value is a color\n const isColor = colorRegex.test(value);\n\n if (!columnData.color && !isColor) {\n return `<span class=\"text-ellipsis\">–</span>`;\n }\n\n if (!columnData.color && !value) return `<span class=\"text-ellipsis\"><ids-color${disabled}></ids-color></span>`;\n\n const color = this.#color(index, value, columnData, rowData);\n\n const hex = color || value || '#C2A1F1';\n const tooltip = !color && value ? ` tooltip=\"${value}\"` : '';\n\n return columnData.suppressColorTooltip\n ? `<span class=\"text-ellipsis\">\n <ids-color hex=\"${hex}\"${disabled} suppress-tooltip></ids-color>\n </span>`\n : `<span class=\"text-ellipsis\">\n <ids-color hex=\"${hex}\"${tooltip}${disabled}></ids-color>\n </span>\n `;\n }\n\n /* Shows the field value as an ids-icon. An `icon` and `size` option can be provided as overrides. */\n icon(rowData: Record<string, unknown>, columnData: IdsDataGridColumn, index: number): string {\n const value: any = this.#extractValue(rowData, columnData.field);\n if (!value && !columnData.icon) return '';\n\n const color = this.#color(index, value, columnData, rowData) || '';\n const badgeColor = color ? ` badge-color=\"${color}\" badge-position=\"top-left\"` : '';\n\n const sizes = ['small', 'medium', 'large', 'xl', 'xxl'];\n let size = this.#size(index, value, columnData, rowData) || '';\n size = sizes.includes(size) ? size : 'large';\n\n let icon = this.#icon(index, value, columnData, rowData) || '';\n icon = icon.replace('icon-', '');\n\n const text = this.#text(index, value, columnData, rowData) || '';\n const isDisabled = this.#isDisabled(index, value, columnData, rowData);\n const disabled = isDisabled ? ' disabled' : '';\n\n return `\n <span class=\"text-ellipsis\">\n <ids-icon icon=\"${icon}\" size=\"${size}\"${badgeColor}${disabled}></ids-icon><span>${text}</span>\n </span>\n `;\n }\n\n /* Shows the field value as a `star-filled` or `star-outlined`. A `size` option can be provided as an override. */\n favorite(rowData: Record<string, unknown>, columnData: IdsDataGridColumn, index: number): string {\n const value: any = this.#extractValue(rowData, columnData.field);\n\n return this.rating(\n {\n ...rowData,\n [String(columnData.field)]: value ? 1 : 0,\n },\n {\n ...columnData,\n max: 1,\n min: 0,\n },\n index,\n );\n }\n\n /* Shows the field value as an `ids-tag`. A `color` option can be provdied as an override. */\n tag(rowData: Record<string, unknown>, columnData: IdsDataGridColumn, index: number): string {\n const value: any = this.#extractValue(rowData, columnData.field);\n if (!value) return '';\n const color = this.#color(index, value, columnData, rowData);\n const isDisabled = this.#isDisabled(index, value, columnData, rowData);\n const disabled = isDisabled ? ' disabled' : '';\n\n return `<ids-tag color=\"${color || ''}\"${disabled}>${value}</ids-tag>`;\n }\n\n /*\n Shows the field value as an `ids-progress`. A `text` option can be provided to customize the label.\n A `color` and `max` option can be provided as overrides.\n */\n progress(rowData: Record<string, unknown>, columnData: IdsDataGridColumn, index: number): string {\n const value: any = parseFloat(this.#extractValue(rowData, columnData.field));\n const val = Number.isNaN(value) ? 0 : value;\n let max = columnData.max ?? 10;\n if (!columnData.max && value > 1) {\n const digitCount = String(Math.floor(value)).length;\n max = parseInt(`1`.padEnd(digitCount + 1, '0'));\n }\n\n const isDisabled = this.#isDisabled(index, val, columnData, rowData);\n const disabled = isDisabled ? ' disabled' : '';\n\n const label = `label=\"${columnData?.text || `${val} of ${max}`}\" label-audible`;\n\n return `\n <ids-progress-bar ${label} max=\"${max}\"${disabled} value=\"${val}\" readonly>\n </ids-progress-bar>\n `;\n }\n\n /*\n Shows the field value as an `ids-rating`. A `text` option can be provided to customize the label.\n A `color` and `max` option can be provided as overrides.\n */\n rating(rowData: Record<string, unknown>, columnData: IdsDataGridColumn, index: number): string {\n const value: any = parseFloat(this.#extractValue(rowData, columnData.field));\n const color = this.#color(index, value, columnData, rowData);\n\n const max = columnData.max ?? 5;\n let val = Number.isNaN(value) ? 0 : value;\n if ((!columnData.max && val > 1) || val > max) {\n const digitCount = String(Math.floor(val)).length;\n const divisor = parseInt(`1`.padEnd(digitCount + 1, '0'));\n\n if (val > 10) {\n val = (val / divisor) * max;\n }\n }\n\n const sizes = ['small', 'medium', 'large', 'xl', 'xxl'];\n let size = this.#size(index, value, columnData, rowData) || '';\n size = sizes.includes(size) ? size : 'large';\n\n const label = columnData.text ?? `${val} of ${max} stars`;\n const readonly = this.#readonly(index, value, columnData, rowData) ?? true;\n const isDisabled = this.#isDisabled(index, val, columnData, rowData);\n\n return `\n <span class=\"text-ellipsis\">\n <ids-rating\n label=\"${label}\"\n size=\"${size}\"\n stars=\"${max}\"\n value=\"${val}\"\n ${color ? `color=\"${color}\"` : ''}\n ${readonly ? 'readonly' : ''}\n ${isDisabled ? 'disabled' : ''}\n >\n </ids-rating>\n </span>\n `;\n }\n\n /*\n Shows the field value as an `ids-slider`. A `text` option can be provided to customize the label.\n A `color`, `max`, `min` and `type` option can be provided as overrides.\n */\n slider(rowData: Record<string, unknown>, columnData: IdsDataGridColumn, index: number): string {\n const value: any = parseFloat(this.#extractValue(rowData, columnData.field));\n const color = this.#color(index, value, columnData, rowData);\n\n const min = columnData.min ?? 0;\n const max = columnData.max ?? 100;\n let val = Number.isNaN(value) ? 0 : value;\n if ((!columnData.max && val > 1) || val > max) {\n const digitCount = String(Math.floor(val)).length;\n const divisor = parseInt(`1`.padEnd(digitCount + 1, '0'));\n\n if (val > 10) {\n val = (val / divisor) * max;\n }\n }\n\n const type = columnData.type ?? 'single';\n const label = columnData.text ?? `${val} of ${max} stars`;\n const readonly = this.#readonly(index, value, columnData, rowData) ?? true;\n const isDisabled = this.#isDisabled(index, val, columnData, rowData);\n\n return `\n <ids-slider\n type=\"${type}\"\n label=\"${label}\"\n min=\"${Math.max(min, 0)}\"\n max=\"${max}\"\n value=\"${Math.min(val, max)}\"\n show-tooltip\n ${color ? `color=\"${color}\"` : ''}\n ${readonly ? 'readonly' : ''}\n ${isDisabled ? 'disabled' : ''}\n >\n </ids-slider>\n `;\n }\n\n /*\n Shows the field value as an `ids-step-chart`. A `text` option can be provided to customize the label.\n A `color` and `max` option can be provided as overrides.\n */\n stepChart(rowData: Record<string, unknown>, columnData: IdsDataGridColumn, index: number): string {\n const value: any = parseFloat(this.#extractValue(rowData, columnData.field));\n const color = this.#color(index, value, columnData, rowData);\n\n let max = columnData.max ?? 5;\n if (!columnData.max && value > 1) {\n const digitCount = String(Math.floor(value)).length;\n max = parseInt(`1`.padEnd(digitCount + 1, '0'));\n }\n\n let val = Number.isNaN(value) ? 0 : value;\n if (max > 10) {\n val = (val / max) * 10;\n max = 10;\n }\n\n const completedSteps = Math.floor(val);\n const stepsInProgress = Math.ceil(val);\n const showStepsInProgress = completedSteps !== stepsInProgress;\n const isDisabled = this.#isDisabled(index, val, columnData, rowData);\n\n return `\n <ids-step-chart\n step-number=\"${Math.min(max, 10)}\"\n steps-in-progress=\"${showStepsInProgress ? stepsInProgress : 0}\"\n value=\"${Math.floor(val)}\"\n progress-color=\"red-20\"\n ${color ? `color=\"${color}\"` : ''}\n ${isDisabled ? 'disabled' : ''}\n >\n </ids-step-chart>\n `;\n }\n\n /* Shows the field value as an `ids-image`. A `text` option can be provided to the `alt` and `title` attributes. */\n image(rowData: Record<string, unknown>, columnData: IdsDataGridColumn, index: number): string {\n const value: any = this.#extractValue(rowData, columnData.field);\n if (!value) return '';\n\n const metadata = columnData.text ? ` alt=\"${columnData.text}\" title=\"${columnData.text}\"` : '';\n const isDisabled = this.#isDisabled(index, value, columnData, rowData);\n const disabled = isDisabled ? ' disabled' : '';\n\n return `<ids-image src=\"${value}\"${metadata}${disabled}></ids-image>`;\n }\n\n card(rowData: Record<string, unknown>, columnData: IdsDataGridColumn): string {\n const value: any = this.#extractValue(rowData, columnData.field);\n if (!value) return '';\n\n return `<ids-card>${value}</ids-card>`;\n }\n\n /**\n * Toggles text masking for a specific data grid cell.\n * @param {string} cellData - The original cell data to mask/unmask\n * @param {IdsDataGridCell} cellElement - The cell element containing the mask button and text\n * @param {IdsDataGridColumn} columnSettings - Column configuration with mask settings\n * @param {boolean | undefined} mask - Optional mask state; if undefined, toggles current state\n * @returns {void}\n */\n textmaskAction(\n cellData: string,\n cellElement: IdsDataGridCell,\n columnSettings: IdsDataGridColumn,\n mask: boolean | undefined = undefined\n ): void {\n const maskButton = cellElement.querySelector('ids-icon.text-mask');\n let revealChar = (columnSettings?.textMaskCharacter || 0);\n revealChar = revealChar > 4 ? 4 : revealChar;\n\n const masked = mask !== undefined ? mask : maskButton?.getAttribute(attributes.ICON) === 'show-item';\n const label = cellElement.querySelector('.is-textmask');\n if (!label || !maskButton) {\n return;\n }\n\n if (masked) {\n label.textContent = cellData;\n maskButton.setAttribute(attributes.ICON, 'hide-item');\n } else {\n label.textContent = maskText(cellData, revealChar || 0);\n maskButton.setAttribute(attributes.ICON, 'show-item');\n }\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAyBA,IAAqB,wBAArB,MAA2C;AAAA,EACzC,cAAc,MAA2B,OAA2B;AAClE,QAAI,CAAC,MAAO,QAAO;AAEnB,QAAI;AACJ,QAAI,MAAM,QAAQ,GAAG,IAAI,IAAI;AAC3B,iBAAW,MAAM,MAAM,GAAG,EAAE,OAAO,CAAC,GAAQ,MAAY,IAAI,EAAE,CAAC,IAAI,IAAK,IAAI;AAAA,IAC9E,OAAO;AACL,iBAAW,KAAK,KAAK;AAAA,IACvB;AAEA,QAAI,aAAa,UAAa,aAAa,MAAM;AAC/C,aAAO;AAAA,IACT;AAEA,QAAI,OAAO,aAAa,UAAU;AAChC,aAAO;AAAA,IACT;AACA,WAAO,WAAW,YAAY,EAAE;AAAA,EAClC;AAAA,EAEA,gBAAgB,MAA2B,OAA2B;AACpE,UAAM,YAAY,KAAK,cAAc,MAAM,KAAK;AAChD,QAAI;AACJ,UAAM,aAA6C,oBAAI,IAAI,CAAC,GAAG,KAAK,QAAQ,MAAM,KAAK,CAAC;AACxF,YAAQ,OAAO,WAAW;AAAA,MACx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