@sankhyalabs/ezui 0.0.0-bugfix-dev-KB-77126.0 → 0.0.0-bugfix-dev-KB-77074.0
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/dist/cjs/RecordValidationProcessor-10846595.js +108 -0
- package/dist/cjs/ez-card-item_3.cjs.entry.js +19 -12
- package/dist/cjs/ez-chart.cjs.entry.js +1 -1
- package/dist/cjs/ez-combo-box.cjs.entry.js +10 -46
- package/dist/cjs/ez-date-input.cjs.entry.js +2 -8
- package/dist/cjs/ez-date-time-input.cjs.entry.js +2 -8
- package/dist/cjs/ez-dialog.cjs.entry.js +2 -10
- package/dist/cjs/ez-form-view.cjs.entry.js +2 -2
- package/dist/cjs/ez-form.cjs.entry.js +324 -4
- package/dist/cjs/ez-grid.cjs.entry.js +70542 -14645
- package/dist/cjs/ez-list.cjs.entry.js +100 -151
- package/dist/cjs/ez-number-input.cjs.entry.js +0 -7
- package/dist/cjs/ez-popover.cjs.entry.js +1 -1
- package/dist/cjs/ez-popup.cjs.entry.js +1 -1
- package/dist/cjs/ez-search.cjs.entry.js +12 -28
- package/dist/cjs/ez-text-area.cjs.entry.js +4 -66
- package/dist/cjs/ez-text-input.cjs.entry.js +7 -49
- package/dist/cjs/ez-time-input.cjs.entry.js +0 -6
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/ez-card-item/ez-card-item.css +5 -14
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +14 -75
- package/dist/collection/components/ez-date-input/ez-date-input.js +4 -35
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +4 -35
- package/dist/collection/components/ez-dialog/ez-dialog.css +3 -3
- package/dist/collection/components/ez-dialog/ez-dialog.js +1 -9
- package/dist/collection/components/ez-filter-input/ez-filter-input.css +11 -0
- package/dist/collection/components/ez-filter-input/ez-filter-input.js +52 -22
- package/dist/collection/components/ez-form/ez-form.js +0 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.js +2 -2
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +25 -80
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +0 -8
- package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +46 -167
- package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.js +0 -7
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/ComboBox.tpl.js +0 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/DateInput.tpl.js +0 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/NumberInput.tpl.js +0 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/Search.tpl.js +0 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/TextInput.tpl.js +1 -4
- package/dist/collection/components/ez-grid/ez-grid.js +3 -90
- package/dist/collection/components/ez-list/ez-list.css +5 -5
- package/dist/collection/components/ez-list/ez-list.js +170 -152
- package/dist/collection/components/ez-number-input/ez-number-input.js +0 -25
- package/dist/collection/components/ez-popover/ez-popover.css +10 -3
- package/dist/collection/components/ez-popup/ez-popup.js +1 -1
- package/dist/collection/components/ez-search/ez-search.css +1 -1
- package/dist/collection/components/ez-search/ez-search.js +14 -55
- package/dist/collection/components/ez-text-area/ez-text-area.css +0 -49
- package/dist/collection/components/ez-text-area/ez-text-area.js +2 -102
- package/dist/collection/components/ez-text-input/ez-text-input.css +53 -27
- package/dist/collection/components/ez-text-input/ez-text-input.js +6 -84
- package/dist/collection/components/ez-time-input/ez-time-input.js +0 -24
- package/dist/collection/utils/form/DataBinder.js +3 -18
- package/dist/collection/utils/interfaces/AbstractFieldMetadata.js +1 -1
- package/dist/custom-elements/index.js +70890 -15272
- package/dist/esm/RecordValidationProcessor-9c6cc267.js +105 -0
- package/dist/esm/ez-card-item_3.entry.js +19 -12
- package/dist/esm/ez-chart.entry.js +1 -1
- package/dist/esm/ez-combo-box.entry.js +11 -47
- package/dist/esm/ez-date-input.entry.js +2 -8
- package/dist/esm/ez-date-time-input.entry.js +2 -8
- package/dist/esm/ez-dialog.entry.js +2 -10
- package/dist/esm/ez-form-view.entry.js +2 -2
- package/dist/esm/ez-form.entry.js +323 -3
- package/dist/esm/ez-grid.entry.js +70542 -14645
- package/dist/esm/ez-list.entry.js +101 -152
- package/dist/esm/ez-number-input.entry.js +0 -7
- package/dist/esm/ez-popover.entry.js +1 -1
- package/dist/esm/ez-popup.entry.js +1 -1
- package/dist/esm/ez-search.entry.js +12 -28
- package/dist/esm/ez-text-area.entry.js +4 -66
- package/dist/esm/ez-text-input.entry.js +7 -49
- package/dist/esm/ez-time-input.entry.js +0 -6
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-188f1c4c.entry.js +1 -0
- package/dist/ezui/p-49456b34.entry.js +1 -0
- package/dist/ezui/p-5a90d7d1.entry.js +1 -0
- package/dist/ezui/p-5b205c80.entry.js +1 -0
- package/dist/ezui/p-62732269.entry.js +1 -0
- package/dist/ezui/p-86b6aa01.entry.js +1 -0
- package/dist/ezui/p-b3b94f72.entry.js +1 -0
- package/dist/ezui/p-b95632e8.entry.js +1 -0
- package/dist/ezui/p-bcd47eda.entry.js +1 -0
- package/dist/ezui/p-c3c3d640.entry.js +304 -0
- package/dist/ezui/p-cdc472cc.entry.js +1 -0
- package/dist/ezui/p-d2c06f38.entry.js +1 -0
- package/dist/ezui/p-d8f64bb7.entry.js +1 -0
- package/dist/ezui/p-dc4ada32.entry.js +1 -0
- package/dist/ezui/p-e85c48d7.entry.js +1 -0
- package/dist/ezui/p-f299c608.entry.js +1 -0
- package/dist/ezui/p-f42855b9.js +1 -0
- package/dist/ezui/p-f80ac647.entry.js +1 -0
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +1 -7
- package/dist/types/components/ez-date-input/ez-date-input.d.ts +1 -6
- package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +1 -6
- package/dist/types/components/ez-dialog/ez-dialog.d.ts +0 -2
- package/dist/types/components/ez-filter-input/ez-filter-input.d.ts +11 -4
- package/dist/types/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +0 -12
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +2 -7
- package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +1 -2
- package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +7 -19
- package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.d.ts +1 -3
- package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellRender.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/components/cellRendererStatus.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/components/selectionHeader.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellEditor.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellRender.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/editor/IUICellEditor.d.ts +0 -1
- package/dist/types/components/ez-grid/controller/ag-grid/mock/Server.d.ts +1 -1
- package/dist/types/components/ez-grid/ez-grid.d.ts +1 -11
- package/dist/types/components/ez-list/ez-list.d.ts +26 -3
- package/dist/types/components/ez-number-input/ez-number-input.d.ts +0 -4
- package/dist/types/components/ez-search/ez-search.d.ts +1 -6
- package/dist/types/components/ez-text-area/ez-text-area.d.ts +0 -17
- package/dist/types/components/ez-text-input/ez-text-input.d.ts +0 -9
- package/dist/types/components/ez-time-input/ez-time-input.d.ts +0 -4
- package/dist/types/components.d.ts +42 -107
- package/dist/types/utils/form/DataBinder.d.ts +0 -3
- package/package.json +4 -11
- package/dist/cjs/DataBinder-3b083480.js +0 -445
- package/dist/cjs/FocusResolver-885f2173.js +0 -35
- package/dist/collection/utils/FocusResolver.js +0 -31
- package/dist/esm/DataBinder-02fa9bb9.js +0 -441
- package/dist/esm/FocusResolver-1ccbf850.js +0 -33
- package/dist/ezui/p-0a75bb05.entry.js +0 -1
- package/dist/ezui/p-0db68715.entry.js +0 -1
- package/dist/ezui/p-19098a3f.entry.js +0 -1
- package/dist/ezui/p-1f830a2f.entry.js +0 -1
- package/dist/ezui/p-2aa8e4b2.entry.js +0 -1
- package/dist/ezui/p-3dd919b7.entry.js +0 -1
- package/dist/ezui/p-455e737c.js +0 -1
- package/dist/ezui/p-8d0f02c7.entry.js +0 -309
- package/dist/ezui/p-91266ddd.entry.js +0 -1
- package/dist/ezui/p-97af4b13.entry.js +0 -1
- package/dist/ezui/p-a5b91a77.entry.js +0 -1
- package/dist/ezui/p-a80b1287.entry.js +0 -1
- package/dist/ezui/p-b54e17d2.entry.js +0 -1
- package/dist/ezui/p-bfad39eb.entry.js +0 -1
- package/dist/ezui/p-c27b2e17.entry.js +0 -1
- package/dist/ezui/p-cd2e78f0.entry.js +0 -1
- package/dist/ezui/p-d0ca26fe.entry.js +0 -1
- package/dist/ezui/p-dc628ed3.js +0 -1
- package/dist/ezui/p-ffd246f5.entry.js +0 -1
- package/dist/types/utils/FocusResolver.d.ts +0 -5
|
@@ -5,18 +5,20 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-a7b0c73d.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
|
|
8
|
-
const ezListCss = ".sc-ez-list-h {\n \n --ez-list__host--z-index: var(--visible, 1);\n\n \n --ez-list__host--border-radius: var(--border--radius-medium, 12px);\n\n \n --ez-list__host--padding: var(--space--medium, 12px);\n\n \n --ez-list__icon--padding: var(--space--small, 6px);\n\n \n --ez-list__icon--color: #AFB6C0;\n\n \n --ez-list__item--margin: 0 var(--space--small, 6px);\n\n \n --ez-list__item--color: var(--title--primary, #2b3a54);\n\n \n --ez-list__item--border-bottom;\n\n \n --ez-list__item--border-bottom-color;\n\n \n --ez-list__item--font-family: var(--font-pattern, \"Roboto\");\n\n \n --ez-list__item--font-size: var(--text--medium, 14px);\n \n \n --ez-list__item--white-space: var(--ez-list__item--white-space, nowrap);\n\n \n --ez-list__selectable--padding-right: var(--space--small, 6px);\n \n \n --ez-list__selectable--padding-left: var(--space--small, 6px);\n\n \n --ez-list__selected-item--border-radius: var(--border--radius-small, 6px);\n \n \n --ez-list__selected-item--background-color: var(--color--primary-300, #E2F4EF);\n\n \n --ez-list__group--font-family: var(--font-pattern, \"Roboto\");\n \n \n --ez-list__group--font-size: var(--text--medium, 14px);\n \n \n --ez-list__group--font-weight: var(--text-weight--large, 600);\n \n \n --ez-list__group--padding-bottom: var(--space-small, 6px);\n\n \n --ez-list__group-overlay--font-family: var(--font-pattern, \"Roboto\");\n\n \n --ez-list__group-overlay--font-size: var(--text--medium, 14px);\n \n \n --ez-list__over--border--color: var(--color--primary, #008561);\n\n \n --ez-list__last-droppable-space--height: var(--space--small, 6px);\n \n \n --ez-list__draggable-list--padding-bottom: var(--space--small, 6px);\n\n \n --ez-list__draggable-icon--image: url('data:image/svg+xml;utf8,<svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m 6.75,2.25 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z\"/></svg>');\n\n \n \n --ez-list__scrollbar--color-default: var(--scrollbar--default, #626e82);\n \n --ez-list__scrollbar--color-background: var(--scrollbar--background, #E5EAF0);\n \n --ez-list__scrollbar--color-hover: var(--scrollbar--hover, #2B3A54);\n \n --ez-list__scrollbar--color-clicked: var(--scrollbar--clicked, #a2abb9);\n \n --ez-list__scrollbar--border-radius: var(--border--radius-small, 6px);\n \n --ez-list__scrollbar--width: var(--space--medium, 12px);\n\n max-height: 100%;\n width: 100%;\n background-color: #fff;\n display: flex;\n\n \n z-index: var(--ez-list__host--z-index);\n}\n\np.sc-ez-list {\n margin: 0;\n}\n\n.draggable.sc-ez-list {\n \n width: 100%;\n display: grid;\n grid-template-columns: minmax(0px, auto) minmax(0px, auto);\n place-items: center;\n border-top: 1px dashed #fff;\n justify-content: space-between;\n\n \n font-family: var(--ez-list__item--font-family);\n font-size: var(--ez-list__item--font-size);\n}\n\n.dragging.sc-ez-list {\n background: #FFFFFF;\n \n\n border: 1px solid #008561;\n box-sizing: border-box;\n box-shadow: 0px 0px 16px rgba(0, 38, 111, 0.122);\n border-radius: 6px;\n}\n\n.selectable.sc-ez-list {\n cursor: pointer;\n\n \n padding-right: var(--ez-list__selectable--padding-right);\n padding-left: var(--ez-list__selectable--padding-left);\n}\n\n.selectable-container.sc-ez-list {\n margin: 0px !important;\n}\n\n.hover-feedback.sc-ez-list:hover {\n background-color: var(--background--medium);\n border-radius: var(--border--radius-regular);\n}\n\n.item-content.sc-ez-list {\n display: flex;\n align-items: center;\n overflow: hidden;\n justify-content: flex-start;\n width: 100%;\n}\n\n.draggable-list.sc-ez-list {\n padding: 0;\n margin: 0;\n width: 100%;\n max-height: 100%;\n scrollbar-width: thin;\n \n \n color: var(--text-color);\n scrollbar-color: var(--ez-list__scrollbar--color-clicked) var(--ez-list__scrollbar--color-background);\n}\n\n.draggable-list.sc-ez-list li.sc-ez-list {\n display: flex;\n \n \n font-family: var(--ez-list__item--font-family);\n font-size: var(--ez-list__item--font-size);\n color: var(--ez-list__item--color);\n border-bottom: var(--ez-list__item--border-bottom, none) var(--ez-list__item--border-bottom-color);\n}\n\n.draggable-list.sc-ez-list li.sc-ez-list > div.sc-ez-list {\n \n padding: var(--space--3xs, 4px) var(--space--3xs, 4px);\n margin: var(--ez-list__item--margin);\n}\n\n.over.sc-ez-list {\n \n border-top: 1px dashed var(--ez-list__over--border--color);\n}\n\n.last-droppable-space.sc-ez-list {\n \n height: var(--ez-list__last-droppable-space--height);\n}\n\n.draggable-selected.sc-ez-list {\n \n background-color: var(--background--strong) !important;\n}\n\n.draggable-selected.sc-ez-list div.sc-ez-list:hover {\n \n background-color: var(--background--strong) !important;\n}\n\n.draggable-list.sc-ez-list::-webkit-scrollbar {\n \n background-color: var(--ez-list__scrollbar--color-background);\n width: var(--ez-list__scrollbar--width);\n max-width: var(--ez-list__scrollbar--width);\n min-width: var(--ez-list__scrollbar--width);\n}\n\n.draggable-list.sc-ez-list::-webkit-scrollbar-track {\n \n background-color: var(--ez-list__scrollbar--color-background);\n border-radius: var(--ez-list__scrollbar--border-radius);\n}\n\n.draggable-list.sc-ez-list::-webkit-scrollbar-thumb {\n \n background-color: var(--ez-list__scrollbar--color-default);\n border-radius: var(--ez-list__scrollbar--border-radius);\n}\n\n.draggable-list.sc-ez-list::-webkit-scrollbar-thumb:vertical:hover, .draggable-list.sc-ez-list::-webkit-scrollbar-thumb:horizontal:hover {\n \n background-color: var(--ez-list__scrollbar--color-hover);\n}\n\n.draggable-list.sc-ez-list::-webkit-scrollbar-thumb:vertical:active, .draggable-list.sc-ez-list::-webkit-scrollbar-thumb:horizontal:active {\n \n background-color: var(--ez-list__scrollbar--color-clicked);\n}\n\n.draggable-icon.sc-ez-list {\n align-items: flex-start;\n display: flex;\n outline: none;\n border: none;\n background-color: unset;\n}\n\n.draggable-icon.sc-ez-list::after {\n content: '';\n display: flex;\n width: 18px;\n height: 18px;\n\n \n background-color: var(--ez-list__icon--color);\n -webkit-mask-image: var(--ez-list__draggable-icon--image);\n mask-image: var(--ez-list__draggable-icon--image);\n}\n\n*.sc-ez-list {\n box-sizing: border-box;\n}\n\n.checkbox.sc-ez-list {\n width: fit-content;\n}\n\n.text--ellipsis.sc-ez-list {\n overflow: hidden;\n text-overflow: ellipsis;\n \n \n white-space: var(--ez-list__item--white-space);\n}\n\n.group-container.sc-ez-list {\n display: flex;\n flex-direction: column;\n max-height: 100%;\n overflow-y: auto;\n outline: none;\n width: 100%;\n scrollbar-width: thin;\n\n \n scrollbar-color: var(--ez-list__scrollbar--color-clicked) var(--ez-list__scrollbar--color-background);\n}\n\n.group-name.sc-ez-list {\n -webkit-user-select: none;\n -moz-user-select: -moz-none;\n -ms-user-select: none;\n user-select: none;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n\n \n color: var(--title--primary);\n font-family: var(--ez-list__group--font-family);\n font-size: var(--ez-list__group--font-size);\n font-weight: var(--ez-list__group--font-weight);\n padding-bottom: var(--ez-list__group--padding-bottom);\n}\n\n.group.sc-ez-list {\n display: flex;\n flex-direction: column;\n}\n\n.group-container.sc-ez-list::-webkit-scrollbar {\n \n background-color: var(--ez-list__scrollbar--color-background);\n width: var(--ez-list__scrollbar--width);\n max-width: var(--ez-list__scrollbar--width);\n min-width: var(--ez-list__scrollbar--width);\n}\n\n.group-container.sc-ez-list::-webkit-scrollbar-track {\n \n background-color: var(--ez-list__scrollbar--color-background);\n border-radius: var(--ez-list__scrollbar--border-radius);\n}\n\n.group-container.sc-ez-list::-webkit-scrollbar-thumb {\n \n background-color: var(--ez-list__scrollbar--color-default);\n border-radius: var(--ez-list__scrollbar--border-radius);\n}\n\n.group-container.sc-ez-list::-webkit-scrollbar-thumb:vertical:hover, .group-container.sc-ez-list::-webkit-scrollbar-thumb:horizontal:hover {\n \n background-color: var(--ez-list__scrollbar--color-hover);\n}\n\n.group-container.sc-ez-list::-webkit-scrollbar-thumb:vertical:active, .group-container.sc-ez-list::-webkit-scrollbar-thumb:horizontal:active {\n \n background-color: var(--ez-list__scrollbar--color-clicked);\n}\n\n.section-container.sc-ez-list {\n display: flex;\n position: relative;\n height: 100%;\n}\n\n.items-container.sc-ez-list {\n width: 100%;\n max-height: 100%;\n outline: none;\n scrollbar-width: thin;\n\n \n scrollbar-color: var(--ez-list__scrollbar--color-clicked) var(--ez-list__scrollbar--color-background);\n}\n\n.group-items-container.sc-ez-list {\n width: 100%;\n max-height: 100%;\n height: 100%;\n outline: none;\n}\n\n.items-container.sc-ez-list::-webkit-scrollbar {\n \n background-color: var(--ez-list__scrollbar--color-background);\n width: var(--ez-list__scrollbar--width);\n max-width: var(--ez-list__scrollbar--width);\n min-width: var(--ez-list__scrollbar--width);\n}\n\n.items-container.sc-ez-list::-webkit-scrollbar-track {\n \n background-color: var(--ez-list__scrollbar--color-background);\n border-radius: var(--ez-list__scrollbar--border-radius);\n}\n\n.items-container.sc-ez-list::-webkit-scrollbar-thumb {\n \n background-color: var(--ez-list__scrollbar--color-default);\n border-radius: var(--ez-list__scrollbar--border-radius);\n}\n\n.items-container.sc-ez-list::-webkit-scrollbar-thumb:vertical:hover, .items-container.sc-ez-list::-webkit-scrollbar-thumb:horizontal:hover {\n \n background-color: var(--ez-list__scrollbar--color-hover);\n}\n\n.items-container.sc-ez-list::-webkit-scrollbar-thumb:vertical:active, .items-container.sc-ez-list::-webkit-scrollbar-thumb:horizontal:active {\n \n background-color: var(--ez-list__scrollbar--color-clicked);\n}\n\n.group-overlay.sc-ez-list {\n background: rgba(226, 244, 239, 0.8);\n border: 1px solid #008561;\n border-radius: 8px;\n position: absolute;\n display: none;\n place-items: center;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 2;\n margin: 0;\n cursor: pointer;\n\n \n font-family: var(--ez-list__group-overlay--font-family);\n font-size: var(--ez-list__group-overlay--font-size);\n}\n\n.presetedHeight.sc-ez-list {\n min-height: 100px;\n}\n\n.overlay-text.sc-ez-list {\n position: absolute;\n top: 50%;\n left: 50%;\n font-size: 50px;\n color: white;\n transform: translate(-50%, -50%);\n -ms-transform: translate(-50%, -50%);\n}\n\n.selected-item.sc-ez-list {\n \n background: var(--ez-list__selected-item--background-color);\n border-radius: var(--ez-list__selected-item--border-radius);\n}\n\n.slot-item.sc-ez-list {\n align-items: flex-end;\n}\n\n.overGroup.sc-ez-list {\n background: rgba(226, 244, 239, 0.8);\n border: 1px solid #008561;\n box-sizing: border-box;\n border-radius: 8px;\n padding-top: 6px;\n}";
|
|
8
|
+
const ezListCss = ".sc-ez-list-h{--ez-list__host--z-index:var(--visible, 1);--ez-list__host--border-radius:var(--border--radius-medium, 12px);--ez-list__host--padding:var(--space--medium, 12px);--ez-list__icon--padding:var(--space--small, 6px);--ez-list__icon--color:#AFB6C0;--ez-list__item--margin:0 var(--space--small, 6px);--ez-list__item--color:var(--title--primary, #2b3a54);--ez-list__item--border-bottom:none;--ez-list__item--border-bottom-color:none;--ez-list__item--font-family:var(--font-pattern, \"Roboto\");--ez-list__item--font-size:var(--text--medium, 14px);--ez-list__item--white-space:var(--ez-list__item--white-space, nowrap);--ez-list__selectable--padding-right:var(--space--small, 6px);--ez-list__selectable--padding-left:var(--space--small, 6px);--ez-list__selected-item--border-radius:var(--border--radius-small, 6px);--ez-list__selected-item--background-color:var(--color--primary-300, #E2F4EF);--ez-list__group--font-family:var(--font-pattern, \"Roboto\");--ez-list__group--font-size:var(--text--medium, 14px);--ez-list__group--font-weight:var(--text-weight--large, 600);--ez-list__group--padding-bottom:var(--space-small, 6px);--ez-list__group-overlay--font-family:var(--font-pattern, \"Roboto\");--ez-list__group-overlay--font-size:var(--text--medium, 14px);--ez-list__over--border--color:var(--color--primary, #008561);--ez-list__last-droppable-space--height:var(--space--small, 6px);--ez-list__draggable-list--padding-bottom:var(--space--small, 6px);--ez-list__draggable-icon--image:url('data:image/svg+xml;utf8,<svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m 6.75,2.25 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z\"/></svg>');--ez-list__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-list__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-list__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-list__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-list__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-list__scrollbar--width:var(--space--medium, 12px);max-height:100%;width:100%;background-color:#fff;display:flex;z-index:var(--ez-list__host--z-index)}p.sc-ez-list{margin:0}.draggable.sc-ez-list{width:100%;display:grid;grid-template-columns:minmax(0px, auto) minmax(0px, auto);place-items:center;border-top:1px solid #fff;justify-content:space-between;font-family:var(--ez-list__item--font-family);font-size:var(--ez-list__item--font-size)}.dragging.sc-ez-list{background:#FFFFFF;border:1px solid #008561;box-sizing:border-box;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);border-radius:6px}.selectable.sc-ez-list{cursor:pointer;padding-right:var(--ez-list__selectable--padding-right);padding-left:var(--ez-list__selectable--padding-left)}.selectable-container.sc-ez-list{margin:0px !important}.hover-feedback.sc-ez-list:hover{background-color:var(--background--medium);border-radius:var(--border--radius-regular)}.item-content.sc-ez-list{display:flex;align-items:center;overflow:hidden;justify-content:flex-start;width:100%}.draggable-list.sc-ez-list{padding:0;margin:0;width:100%;max-height:100%;scrollbar-width:thin;color:var(--text-color);scrollbar-color:var(--ez-list__scrollbar--color-clicked) var(--ez-list__scrollbar--color-background)}.draggable-list.sc-ez-list li.sc-ez-list{display:flex;font-family:var(--ez-list__item--font-family);font-size:var(--ez-list__item--font-size);color:var(--ez-list__item--color);border-bottom:var(--ez-list__item--border-bottom, none) var(--ez-list__item--border-bottom-color)}.draggable-list.sc-ez-list li.sc-ez-list>div.sc-ez-list{padding:var(--space--2xs, 8px) var(--space--3xs, 4px);margin:var(--ez-list__item--margin)}.over.sc-ez-list{border-top:1px dashed var(--ez-list__over--border--color)}.last-droppable-space.sc-ez-list{height:var(--ez-list__last-droppable-space--height)}.draggable-selected.sc-ez-list{background-color:var(--background--strong) !important}.draggable-selected.sc-ez-list div.sc-ez-list:hover{background-color:var(--background--strong) !important}.draggable-list.sc-ez-list::-webkit-scrollbar{background-color:var(--ez-list__scrollbar--color-background);width:var(--ez-list__scrollbar--width);max-width:var(--ez-list__scrollbar--width);min-width:var(--ez-list__scrollbar--width)}.draggable-list.sc-ez-list::-webkit-scrollbar-track{background-color:var(--ez-list__scrollbar--color-background);border-radius:var(--ez-list__scrollbar--border-radius)}.draggable-list.sc-ez-list::-webkit-scrollbar-thumb{background-color:var(--ez-list__scrollbar--color-default);border-radius:var(--ez-list__scrollbar--border-radius)}.draggable-list.sc-ez-list::-webkit-scrollbar-thumb:vertical:hover,.draggable-list.sc-ez-list::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-list__scrollbar--color-hover)}.draggable-list.sc-ez-list::-webkit-scrollbar-thumb:vertical:active,.draggable-list.sc-ez-list::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-list__scrollbar--color-clicked)}.draggable-icon.sc-ez-list{align-items:flex-start;display:flex;outline:none;border:none;background-color:unset}.draggable-icon.sc-ez-list::after{content:'';display:flex;width:18px;height:18px;background-color:var(--ez-list__icon--color);-webkit-mask-image:var(--ez-list__draggable-icon--image);mask-image:var(--ez-list__draggable-icon--image)}*.sc-ez-list{box-sizing:border-box}.checkbox.sc-ez-list{width:fit-content}.text--ellipsis.sc-ez-list{overflow:hidden;text-overflow:ellipsis;white-space:var(--ez-list__item--white-space)}.group-container.sc-ez-list{display:flex;flex-direction:column;max-height:100%;overflow-y:auto;outline:none;width:100%;scrollbar-width:thin;scrollbar-color:var(--ez-list__scrollbar--color-clicked) var(--ez-list__scrollbar--color-background)}.group-name.sc-ez-list{-webkit-user-select:none;-moz-user-select:-moz-none;-ms-user-select:none;user-select:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--title--primary);font-family:var(--ez-list__group--font-family);font-size:var(--ez-list__group--font-size);font-weight:var(--ez-list__group--font-weight);padding-bottom:var(--ez-list__group--padding-bottom)}.group.sc-ez-list{display:flex;flex-direction:column}.group-container.sc-ez-list::-webkit-scrollbar{background-color:var(--ez-list__scrollbar--color-background);width:var(--ez-list__scrollbar--width);max-width:var(--ez-list__scrollbar--width);min-width:var(--ez-list__scrollbar--width)}.group-container.sc-ez-list::-webkit-scrollbar-track{background-color:var(--ez-list__scrollbar--color-background);border-radius:var(--ez-list__scrollbar--border-radius)}.group-container.sc-ez-list::-webkit-scrollbar-thumb{background-color:var(--ez-list__scrollbar--color-default);border-radius:var(--ez-list__scrollbar--border-radius)}.group-container.sc-ez-list::-webkit-scrollbar-thumb:vertical:hover,.group-container.sc-ez-list::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-list__scrollbar--color-hover)}.group-container.sc-ez-list::-webkit-scrollbar-thumb:vertical:active,.group-container.sc-ez-list::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-list__scrollbar--color-clicked)}.section-container.sc-ez-list{display:flex;position:relative;height:100%}.items-container.sc-ez-list{width:100%;max-height:100%;outline:none;scrollbar-width:thin;overflow:auto;scrollbar-color:var(--ez-list__scrollbar--color-clicked) var(--ez-list__scrollbar--color-background)}.group-items-container.sc-ez-list{width:100%;max-height:100%;height:100%;outline:none}.items-container.sc-ez-list::-webkit-scrollbar{background-color:var(--ez-list__scrollbar--color-background);width:var(--ez-list__scrollbar--width);max-width:var(--ez-list__scrollbar--width);min-width:var(--ez-list__scrollbar--width)}.items-container.sc-ez-list::-webkit-scrollbar-track{background-color:var(--ez-list__scrollbar--color-background);border-radius:var(--ez-list__scrollbar--border-radius)}.items-container.sc-ez-list::-webkit-scrollbar-thumb{background-color:var(--ez-list__scrollbar--color-default);border-radius:var(--ez-list__scrollbar--border-radius)}.items-container.sc-ez-list::-webkit-scrollbar-thumb:vertical:hover,.items-container.sc-ez-list::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-list__scrollbar--color-hover)}.items-container.sc-ez-list::-webkit-scrollbar-thumb:vertical:active,.items-container.sc-ez-list::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-list__scrollbar--color-clicked)}.group-overlay.sc-ez-list{background:rgba(226, 244, 239, 0.8);border:1px solid #008561;border-radius:8px;position:absolute;display:none;place-items:center;top:0;bottom:0;left:0;right:0;z-index:2;margin:0;cursor:pointer;font-family:var(--ez-list__group-overlay--font-family);font-size:var(--ez-list__group-overlay--font-size)}.presetedHeight.sc-ez-list{min-height:100px}.overlay-text.sc-ez-list{position:absolute;top:50%;left:50%;font-size:50px;color:white;transform:translate(-50%, -50%);-ms-transform:translate(-50%, -50%)}.selected-item.sc-ez-list{background:var(--ez-list__selected-item--background-color);border-radius:var(--ez-list__selected-item--border-radius)}.slot-item.sc-ez-list{align-items:flex-end}.overGroup.sc-ez-list{background:rgba(226, 244, 239, 0.8);border:1px solid #008561;box-sizing:border-box;border-radius:8px;padding-top:6px}";
|
|
9
9
|
|
|
10
10
|
const EzList = class {
|
|
11
11
|
constructor(hostRef) {
|
|
12
12
|
index.registerInstance(this, hostRef);
|
|
13
13
|
this.ezChange = index.createEvent(this, "ezChange", 7);
|
|
14
14
|
this.ezSelectItem = index.createEvent(this, "ezSelectItem", 7);
|
|
15
|
+
this.ezClickItem = index.createEvent(this, "ezClickItem", 7);
|
|
15
16
|
this.ezCheckChange = index.createEvent(this, "ezCheckChange", 7);
|
|
16
17
|
this.ezDoubleClick = index.createEvent(this, "ezDoubleClick", 7);
|
|
17
18
|
this._listItemsHistory = [];
|
|
18
19
|
this._listItems = [];
|
|
19
20
|
this._listGroupItems = [];
|
|
21
|
+
this._selectedItem = undefined;
|
|
20
22
|
this.dataSource = [];
|
|
21
23
|
this.listMode = 'regular';
|
|
22
24
|
this.useGroups = false;
|
|
@@ -25,6 +27,19 @@ const EzList = class {
|
|
|
25
27
|
this.itemSlotBuilder = undefined;
|
|
26
28
|
this.itemLeftSlotBuilder = undefined;
|
|
27
29
|
this.hoverFeedback = false;
|
|
30
|
+
this.disableShortcuts = false;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Seleciona o próximo item.
|
|
34
|
+
*/
|
|
35
|
+
async selectNextItem() {
|
|
36
|
+
this.nextOption();
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Seleciona o item anterior.
|
|
40
|
+
*/
|
|
41
|
+
async selectPreviousItem() {
|
|
42
|
+
this.previousOption();
|
|
28
43
|
}
|
|
29
44
|
/**
|
|
30
45
|
* Limpa o histórico da lista.
|
|
@@ -48,23 +63,8 @@ const EzList = class {
|
|
|
48
63
|
*/
|
|
49
64
|
async setSelection(selectedItem, scrollToOption) {
|
|
50
65
|
if (selectedItem && this.ezSelectable) {
|
|
66
|
+
this._selectedItem = Object.assign({}, selectedItem);
|
|
51
67
|
this.ezSelectItem.emit(selectedItem);
|
|
52
|
-
if (this.useGroups) {
|
|
53
|
-
let newList = [...this._listGroupItems];
|
|
54
|
-
newList.forEach(groupItem => {
|
|
55
|
-
groupItem.items.forEach(item => {
|
|
56
|
-
item.selected = item.id === selectedItem.id;
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
this._listGroupItems = newList;
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
let newList = [...this._listItems];
|
|
63
|
-
newList.forEach(item => {
|
|
64
|
-
item.selected = item.id === selectedItem.id;
|
|
65
|
-
});
|
|
66
|
-
this._listItems = newList;
|
|
67
|
-
}
|
|
68
68
|
if (scrollToOption) {
|
|
69
69
|
let liElem = this.useGroups
|
|
70
70
|
? this._groupContainer.querySelector('li#item_' + selectedItem.id)
|
|
@@ -82,21 +82,7 @@ const EzList = class {
|
|
|
82
82
|
* Obtém o item selecionado.
|
|
83
83
|
*/
|
|
84
84
|
async getSelection() {
|
|
85
|
-
|
|
86
|
-
if (this.useGroups) {
|
|
87
|
-
this._listGroupItems.every(group => {
|
|
88
|
-
let item = group.items.find(item => item.selected == true);
|
|
89
|
-
if (item) {
|
|
90
|
-
selectedItem = item;
|
|
91
|
-
return false;
|
|
92
|
-
}
|
|
93
|
-
return true;
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
else {
|
|
97
|
-
selectedItem = this._listItems.find(item => item.selected == true);
|
|
98
|
-
}
|
|
99
|
-
return selectedItem;
|
|
85
|
+
return this._selectedItem;
|
|
100
86
|
}
|
|
101
87
|
/**
|
|
102
88
|
* Obtém a lista de items ou grupos.
|
|
@@ -111,22 +97,7 @@ const EzList = class {
|
|
|
111
97
|
* Limpa a seleção atual
|
|
112
98
|
*/
|
|
113
99
|
async removeSelection() {
|
|
114
|
-
|
|
115
|
-
let newList = [...this._listGroupItems];
|
|
116
|
-
newList.forEach(groupItem => {
|
|
117
|
-
groupItem.items.forEach(item => {
|
|
118
|
-
item.selected = false;
|
|
119
|
-
});
|
|
120
|
-
});
|
|
121
|
-
this._listGroupItems = newList;
|
|
122
|
-
}
|
|
123
|
-
else {
|
|
124
|
-
let newList = [...this._listItems];
|
|
125
|
-
newList.forEach(item => {
|
|
126
|
-
item.selected = false;
|
|
127
|
-
});
|
|
128
|
-
this._listItems = newList;
|
|
129
|
-
}
|
|
100
|
+
this._selectedItem = undefined;
|
|
130
101
|
}
|
|
131
102
|
applyUUID(item) {
|
|
132
103
|
if (!item.id) {
|
|
@@ -186,6 +157,10 @@ const EzList = class {
|
|
|
186
157
|
}
|
|
187
158
|
componentDidLoad() {
|
|
188
159
|
core.ElementIDUtils.addIDInfo(this._element);
|
|
160
|
+
this.bindKeyboardManager();
|
|
161
|
+
}
|
|
162
|
+
disconnectCallback() {
|
|
163
|
+
this.unbindKeyboardManager();
|
|
189
164
|
}
|
|
190
165
|
onDrop(ev, dragEndItem) {
|
|
191
166
|
this.removeOverClass();
|
|
@@ -378,92 +353,58 @@ const EzList = class {
|
|
|
378
353
|
if (this.useGroups) {
|
|
379
354
|
this.setSelection(this._listGroupItems[0].items[0]);
|
|
380
355
|
}
|
|
381
|
-
{
|
|
356
|
+
else {
|
|
382
357
|
this.setSelection(this._listItems[0]);
|
|
383
358
|
}
|
|
384
359
|
}
|
|
385
|
-
|
|
386
|
-
let nextItem = undefined;
|
|
360
|
+
getFlatedItems() {
|
|
387
361
|
if (this.useGroups) {
|
|
388
|
-
this._listGroupItems.
|
|
389
|
-
|
|
390
|
-
let itemIndex = group.items.findIndex(item => item.id == selectedItem.id);
|
|
391
|
-
if (itemIndex != undefined && itemIndex != -1) {
|
|
392
|
-
if (itemIndex === group.items.length - 1) {
|
|
393
|
-
if (groupIndex + 1 <= listGroupItems.length - 1) {
|
|
394
|
-
item = { label: listGroupItems[groupIndex + 1].items[0].label };
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
else {
|
|
398
|
-
item = { label: group.items[itemIndex + 1].label };
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
if (item != undefined) {
|
|
402
|
-
nextItem = item;
|
|
403
|
-
return false;
|
|
404
|
-
}
|
|
405
|
-
return true;
|
|
406
|
-
});
|
|
362
|
+
const itemsGroups = this._listGroupItems.map(({ items }) => items).flat();
|
|
363
|
+
return itemsGroups;
|
|
407
364
|
}
|
|
408
|
-
|
|
409
|
-
let itemIndex = this._listItems.findIndex(item => item.id === selectedItem.id);
|
|
410
|
-
if (itemIndex >= 0 && itemIndex < this._listItems.length) {
|
|
411
|
-
nextItem = this._listItems[itemIndex + 1];
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
this.setSelection(nextItem, true);
|
|
365
|
+
return this._listItems;
|
|
415
366
|
}
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
if (groupIndex - 1 >= 0) {
|
|
425
|
-
item = { label: listGroupItems[groupIndex - 1].items[listGroupItems[groupIndex - 1].items.length - 1].label };
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
else {
|
|
429
|
-
item = { label: group.items[itemIndex - 1].label };
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
if (item != undefined) {
|
|
433
|
-
previousItem = item;
|
|
434
|
-
return false;
|
|
435
|
-
}
|
|
436
|
-
return true;
|
|
437
|
-
});
|
|
367
|
+
getSelectedIndex(items) {
|
|
368
|
+
const itemIndex = items.findIndex(item => { var _a; return item.id === ((_a = this._selectedItem) === null || _a === void 0 ? void 0 : _a.id); });
|
|
369
|
+
return itemIndex;
|
|
370
|
+
}
|
|
371
|
+
nextOption() {
|
|
372
|
+
if (!this._selectedItem) {
|
|
373
|
+
this.selectFirstItem();
|
|
374
|
+
return;
|
|
438
375
|
}
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
376
|
+
const items = this.getFlatedItems();
|
|
377
|
+
const itemIndex = this.getSelectedIndex(items);
|
|
378
|
+
if (itemIndex < (items.length - 1)) {
|
|
379
|
+
const nextItem = items[itemIndex + 1];
|
|
380
|
+
this.setSelection(nextItem, true);
|
|
444
381
|
}
|
|
445
|
-
this.setSelection(previousItem, true);
|
|
446
382
|
}
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
383
|
+
previousOption() {
|
|
384
|
+
const items = this.getFlatedItems();
|
|
385
|
+
const itemIndex = this.getSelectedIndex(items);
|
|
386
|
+
if (itemIndex > 0) {
|
|
387
|
+
const previousItem = items[itemIndex - 1];
|
|
388
|
+
this.setSelection(previousItem, true);
|
|
450
389
|
}
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
390
|
+
}
|
|
391
|
+
bindKeyboardManager() {
|
|
392
|
+
this._keyboardManager = new core.KeyboardManager({ propagate: false, element: this._element });
|
|
393
|
+
if (this.disableShortcuts) {
|
|
394
|
+
return;
|
|
395
|
+
}
|
|
396
|
+
this._keyboardManager
|
|
397
|
+
.bind("ArrowDown", () => this.nextOption())
|
|
398
|
+
.bind("ArrowUp", () => this.previousOption())
|
|
399
|
+
.bind("shift+Tab", () => this.previousOption())
|
|
400
|
+
.bind("Tab", () => this.nextOption());
|
|
401
|
+
}
|
|
402
|
+
unbindKeyboardManager() {
|
|
403
|
+
this._keyboardManager
|
|
404
|
+
.unbind("ArrowDown")
|
|
405
|
+
.unbind("ArrowUp")
|
|
406
|
+
.unbind("shift+Tab")
|
|
407
|
+
.unbind("Tab");
|
|
467
408
|
}
|
|
468
409
|
getDivGroupId(groupName) {
|
|
469
410
|
if (groupName) {
|
|
@@ -528,38 +469,46 @@ const EzList = class {
|
|
|
528
469
|
doubleClickItem(item) {
|
|
529
470
|
this.ezDoubleClick.emit(item);
|
|
530
471
|
}
|
|
472
|
+
onClickItem(item) {
|
|
473
|
+
this.setSelection(item);
|
|
474
|
+
this.ezClickItem.emit(item);
|
|
475
|
+
}
|
|
531
476
|
render() {
|
|
532
|
-
return (index.h(index.Host, { ref: el => (this._element = el) }, this.useGroups ? (index.h("div", { class: "group-container", ref: el => (this._groupContainer = el), tabIndex: 0,
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
477
|
+
return (index.h(index.Host, { ref: el => (this._element = el) }, this.useGroups ? (index.h("div", { class: "group-container", ref: el => (this._groupContainer = el), tabIndex: 0 }, this._listGroupItems.map(group => {
|
|
478
|
+
return (index.h("div", { id: this.getDivGroupId(group.group), class: "group", key: group.group + group.items.length, onDrop: () => this.onDropGroup(group) }, index.h("label", { draggable: false, class: "group-name", title: group.group }, group.group), index.h("section", { class: "section-container", onDragOver: ev => ev.preventDefault() }, index.h("div", { class: "group-items-container" }, index.h("div", { class: "draggable-list" }, group.items.map((item, index$1) => {
|
|
479
|
+
var _a;
|
|
480
|
+
return (index.h("li", Object.assign({ id: 'item_' + item.id, class: {
|
|
481
|
+
'selectable-container': this.ezSelectable,
|
|
482
|
+
'hover-feedback': this.hoverFeedback,
|
|
483
|
+
}, key: 'item_' + item.id }, {
|
|
484
|
+
[core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: core.ElementIDUtils.getInternalIDInfo(`ezListItem__${core.StringUtils.replaceAccentuatedChars(item.label)}`),
|
|
485
|
+
}), index.h("div", { class: 'draggable' + (((_a = this._selectedItem) === null || _a === void 0 ? void 0 : _a.id) === item.id ? ' selected-item ' : '') + (this.ezSelectable == true ? ' selectable ' : ''), onDblClick: () => {
|
|
486
|
+
this.doubleClickItem(item);
|
|
487
|
+
}, onClick: () => {
|
|
488
|
+
this.onClickItem(item);
|
|
489
|
+
}, onDragLeave: () => {
|
|
490
|
+
group.sort ? undefined : this.removeOverClass();
|
|
491
|
+
}, onDragEnd: () => this.onDragEnd(), onDragStart: () => this.onDragStart(item, group, index$1), onDragOver: event => {
|
|
492
|
+
group.sort ? undefined : this.onDragOverItem(event);
|
|
493
|
+
}, onDrop: event => this.onDrop(event, { groupName: group.group, item: item, index: index$1 }), draggable: this.ezDraggable }, index.h("div", { class: "item-content" }, this.ezDraggable ? index.h("span", { class: "draggable-icon" }) : undefined, this.listMode === 'regular' ? (index.h(index.Fragment, null, !!this.itemLeftSlotBuilder && this.getContainerItemBuilder('left', item, group), index.h("p", { title: item.label, class: "person-name text--ellipsis" }, item.label))) : (index.h("ez-check", { label: item.label, value: item.check, onEzChange: evt => this.ezCheckChange.emit({ id: item.id, label: item.label, check: evt.detail }) }))), !!this.itemSlotBuilder && this.getContainerItemBuilder('right', item, group, 'slot-item'))));
|
|
494
|
+
})), index.h("div", { class: "last-droppable-space", onDragLeave: () => this.removeOverClass(), onDragOver: event => {
|
|
495
|
+
this.onDragOverLastIndex(event);
|
|
496
|
+
}, onDragEnd: () => this.onDragEnd(), onDrop: event => this.onDropLastIndex(event, group) })), group.sort ? (index.h("div", { id: this.getGroupOverlayId(group.group), class: "group-overlay" }, "Mover para ", group.group)) : undefined)));
|
|
497
|
+
}))) : (index.h("div", { class: "items-container", ref: el => (this._itemContainer = el), tabIndex: 0 }, index.h("ul", { class: "draggable-list" }, this._listItems.map((item, index$1) => {
|
|
498
|
+
var _a, _b;
|
|
499
|
+
return (index.h("li", Object.assign({ id: 'item_' + item.id, class: {
|
|
536
500
|
'selectable-container': this.ezSelectable,
|
|
537
|
-
'
|
|
538
|
-
|
|
539
|
-
[core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: core.ElementIDUtils.getInternalIDInfo(`ezListItem__${core.StringUtils.replaceAccentuatedChars(item.label)}`),
|
|
540
|
-
}), index.h("div", { class: 'draggable' + (item.selected == true ? ' selected-item ' : '') + (this.ezSelectable == true ? ' selectable ' : ''), onDblClick: () => {
|
|
501
|
+
'selected-item': ((_a = this._selectedItem) === null || _a === void 0 ? void 0 : _a.id) === item.id,
|
|
502
|
+
'hover-feedback': this.hoverFeedback && ((_b = this._selectedItem) === null || _b === void 0 ? void 0 : _b.id) !== item.id,
|
|
503
|
+
}, key: 'item_' + item.id }, { [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: core.ElementIDUtils.getInternalIDInfo(`ezListItem__${core.StringUtils.replaceAccentuatedChars(item.label)}`) }), index.h("div", { class: 'draggable' + (this.ezSelectable == true ? ' selectable ' : ''), onDragStart: () => this.onDragStart({ item: item, index: index$1 }), onDblClick: () => {
|
|
541
504
|
this.doubleClickItem(item);
|
|
542
505
|
}, onClick: () => {
|
|
543
|
-
this.
|
|
544
|
-
}, onDragLeave: () => {
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
group.sort ? undefined : this.onDragOverItem(event);
|
|
548
|
-
}, onDrop: event => this.onDrop(event, { groupName: group.group, item: item, index: index$1 }), draggable: this.ezDraggable }, index.h("div", { class: "item-content" }, this.ezDraggable ? index.h("span", { class: "draggable-icon" }) : undefined, this.listMode === 'regular' ? (index.h(index.Fragment, null, !!this.itemLeftSlotBuilder && this.getContainerItemBuilder('left', item, group), index.h("p", { title: item.label, class: "person-name text--ellipsis" }, item.label))) : (index.h("ez-check", { label: item.label, value: item.check, onEzChange: evt => this.ezCheckChange.emit({ id: item.id, label: item.label, check: evt.detail }) }))), !!this.itemSlotBuilder && this.getContainerItemBuilder('right', item, group, 'slot-item')))))), index.h("div", { class: "last-droppable-space", onDragLeave: () => this.removeOverClass(), onDragOver: event => {
|
|
506
|
+
this.onClickItem(item);
|
|
507
|
+
}, onDragLeave: () => this.removeOverClass(), onDragOver: event => this.onDragOverItem(event), onDragEnd: () => this.onDragEnd(), onDrop: event => this.onDrop(event, { item: item, index: index$1 }), draggable: this.ezDraggable }, index.h("div", { class: "item-content" }, this.listMode === 'regular' ? (index.h(index.Fragment, null, this.ezDraggable ? index.h("span", { class: "draggable-icon" }) : undefined, !!this.itemLeftSlotBuilder && this.getContainerItemBuilder('left', item), index.h("p", { title: item.label, class: "person-name text--ellipsis" }, item.label))) : (index.h(index.Fragment, null, this.ezDraggable ? index.h("span", { class: "draggable-icon" }) : undefined, index.h("ez-check", { label: item.label, value: item.check, onEzChange: evt => this.ezCheckChange.emit({ id: item.id, label: item.label, check: evt.detail }) })))), !!this.itemSlotBuilder && this.getContainerItemBuilder('right', item))));
|
|
508
|
+
}), this.ezDraggable &&
|
|
509
|
+
index.h("div", { class: "last-droppable-space", onDragLeave: () => this.removeOverClass(), onDragOver: event => {
|
|
549
510
|
this.onDragOverLastIndex(event);
|
|
550
|
-
}, onDragEnd: () => this.onDragEnd(), onDrop: event => this.onDropLastIndex(event
|
|
551
|
-
}))) : (index.h("div", { class: "items-container", ref: el => (this._itemContainer = el), tabIndex: 0, onKeyDown: event => {
|
|
552
|
-
this.keyDownHandler(event);
|
|
553
|
-
} }, index.h("div", { class: "draggable-list" }, this._listItems.map((item, index$1) => (index.h("li", Object.assign({ id: 'item_' + item.id, class: {
|
|
554
|
-
'selectable-container': this.ezSelectable,
|
|
555
|
-
'hover-feedback': this.hoverFeedback,
|
|
556
|
-
}, key: 'item_' + item.id }, { [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: core.ElementIDUtils.getInternalIDInfo(`ezListItem__${core.StringUtils.replaceAccentuatedChars(item.label)}`) }), index.h("div", { class: 'draggable' + (item.selected == true ? ' selected-item ' : '') + (this.ezSelectable == true ? ' selectable ' : ''), onDragStart: () => this.onDragStart({ item: item, index: index$1 }), onDblClick: () => {
|
|
557
|
-
this.doubleClickItem(item);
|
|
558
|
-
}, onClick: () => {
|
|
559
|
-
this.setSelection(item);
|
|
560
|
-
}, onDragLeave: () => this.removeOverClass(), onDragOver: event => this.onDragOverItem(event), onDragEnd: () => this.onDragEnd(), onDrop: event => this.onDrop(event, { item: item, index: index$1 }), draggable: this.ezDraggable }, index.h("div", { class: "item-content" }, this.listMode === 'regular' ? (index.h(index.Fragment, null, this.ezDraggable ? index.h("span", { class: "draggable-icon" }) : undefined, !!this.itemLeftSlotBuilder && this.getContainerItemBuilder('left', item), index.h("p", { title: item.label, class: "person-name text--ellipsis" }, item.label))) : (index.h(index.Fragment, null, this.ezDraggable ? index.h("span", { class: "draggable-icon" }) : undefined, index.h("ez-check", { label: item.label, value: item.check, onEzChange: evt => this.ezCheckChange.emit({ id: item.id, label: item.label, check: evt.detail }) })))), !!this.itemSlotBuilder && this.getContainerItemBuilder('right', item))))), index.h("div", { class: "last-droppable-space", onDragLeave: () => this.removeOverClass(), onDragOver: event => {
|
|
561
|
-
this.onDragOverLastIndex(event);
|
|
562
|
-
}, onDragEnd: () => this.onDragEnd(), onDrop: event => this.onDropLastIndex(event) }))))));
|
|
511
|
+
}, onDragEnd: () => this.onDragEnd(), onDrop: event => this.onDropLastIndex(event) }))))));
|
|
563
512
|
}
|
|
564
513
|
};
|
|
565
514
|
EzList.style = ezListCss;
|
|
@@ -27,7 +27,6 @@ const EzNumberInput = class {
|
|
|
27
27
|
this.precision = undefined;
|
|
28
28
|
this.prettyPrecision = undefined;
|
|
29
29
|
this.mode = "regular";
|
|
30
|
-
this.autoFocus = false;
|
|
31
30
|
}
|
|
32
31
|
/**
|
|
33
32
|
* Aplica o foco no campo.
|
|
@@ -168,17 +167,11 @@ const EzNumberInput = class {
|
|
|
168
167
|
const textValue = this.getTextValue(this.value) || '';
|
|
169
168
|
if ((this._value || '') !== textValue) {
|
|
170
169
|
this._value = textValue;
|
|
171
|
-
this._textInput.value = this._value;
|
|
172
170
|
}
|
|
173
171
|
}
|
|
174
172
|
componentDidLoad() {
|
|
175
173
|
CSSVarsUtils.CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
176
174
|
this.setInputValue();
|
|
177
|
-
if (this.autoFocus) {
|
|
178
|
-
requestAnimationFrame(() => {
|
|
179
|
-
this.setFocus({ selectText: true });
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
175
|
}
|
|
183
176
|
render() {
|
|
184
177
|
core.ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-a7b0c73d.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
|
|
8
|
-
const ezPopoverCss = ":host{--ez-popover__box--border-radius:var(--border--radius-medium, 12px);--ez-popover__box--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-popover__box--background-color:var(--background--xlight, #fff);--ez-popover__box--z-index:var(--most-visible, 3);position:relative;display:flex;user-select:none}.popover__box{z-index:var(--ez-popover__box--z-index);display:flex;flex-direction:column;height:
|
|
8
|
+
const ezPopoverCss = ":host{--ez-popover__box--border-radius:var(--border--radius-medium, 12px);--ez-popover__box--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-popover__box--background-color:var(--background--xlight, #fff);--ez-popover__box--z-index:var(--most-visible, 3);--ez-popover__height:fit-content;--ez-popover__max-height:fit-content;--ez-popover__margin:0;position:relative;display:flex;user-select:none}.popover__box{z-index:var(--ez-popover__box--z-index);display:flex;flex-direction:column;height:var(--ez-popover__height);max-height:var(--ez-popover__max-height);background-color:var(--ez-popover__box--background-color);border-radius:var(--ez-popover__box--border-radius);box-shadow:var(--ez-popover__box--box-shadow);margin:var(--ez-popover__margin)}.popover__box--fit-content{width:fit-content}.popover__box--full-width{width:100%}";
|
|
9
9
|
|
|
10
10
|
const EzPopover = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -35,7 +35,7 @@ const EzPopup = class {
|
|
|
35
35
|
this._popupRef.focus();
|
|
36
36
|
}
|
|
37
37
|
new core.KeyboardManager({ propagate: false, element: this._element })
|
|
38
|
-
.bind("Enter", this.ezPopupAction.emit
|
|
38
|
+
.bind("Enter", () => this.ezPopupAction.emit("OK"))
|
|
39
39
|
.bind("Escape", () => this.closePopup())
|
|
40
40
|
.bind("Esc", () => this.closePopup());
|
|
41
41
|
}
|
|
@@ -51,7 +51,6 @@ const EzSearch = class {
|
|
|
51
51
|
this.suppressSearch = false;
|
|
52
52
|
this.ensureClearButtonVisible = false;
|
|
53
53
|
this.suppressPreLoad = false;
|
|
54
|
-
this.autoFocus = false;
|
|
55
54
|
}
|
|
56
55
|
observeErrorMessage() {
|
|
57
56
|
var _a;
|
|
@@ -110,9 +109,9 @@ const EzSearch = class {
|
|
|
110
109
|
/**
|
|
111
110
|
* Aplica o foco no campo.
|
|
112
111
|
*/
|
|
113
|
-
async setFocus(
|
|
112
|
+
async setFocus() {
|
|
114
113
|
if (this._textInput) {
|
|
115
|
-
this._textInput.setFocus(
|
|
114
|
+
this._textInput.setFocus();
|
|
116
115
|
}
|
|
117
116
|
}
|
|
118
117
|
/**
|
|
@@ -385,16 +384,15 @@ const EzSearch = class {
|
|
|
385
384
|
replaceHighlight(value) {
|
|
386
385
|
const startHighlight = new RegExp(this._startHighlightTag, 'g');
|
|
387
386
|
const endHighlight = new RegExp(this._endHighlightTag, 'g');
|
|
388
|
-
return
|
|
387
|
+
return (value !== null && value !== void 0 ? value : "").replace(startHighlight, '').replace(endHighlight, '');
|
|
389
388
|
}
|
|
390
|
-
selectOption(newOption
|
|
389
|
+
selectOption(newOption) {
|
|
391
390
|
var _a, _b;
|
|
392
391
|
const currentValue = this.getSelectedOption(this.value);
|
|
393
392
|
const newOptionsReplaced = Object.assign(Object.assign({}, newOption), { value: this.replaceHighlight(newOption === null || newOption === void 0 ? void 0 : newOption.value), label: this.replaceHighlight(newOption === null || newOption === void 0 ? void 0 : newOption.label) });
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
const adjustedOpt = !(newOptionsFormatted === null || newOptionsFormatted === void 0 ? void 0 : newOptionsFormatted.value) ? undefined : newOptionsFormatted;
|
|
393
|
+
if ((((_a = currentValue === null || currentValue === void 0 ? void 0 : currentValue.value) === null || _a === void 0 ? void 0 : _a.toString()) !== ((_b = newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.value) === null || _b === void 0 ? void 0 : _b.toString()))
|
|
394
|
+
|| (currentValue == undefined && newOptionsReplaced != undefined && "value" in newOptionsReplaced)) {
|
|
395
|
+
const adjustedOpt = !(newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.value) ? undefined : newOptionsReplaced;
|
|
398
396
|
this.value = adjustedOpt;
|
|
399
397
|
this._currentValue = adjustedOpt;
|
|
400
398
|
}
|
|
@@ -404,11 +402,6 @@ const EzSearch = class {
|
|
|
404
402
|
}
|
|
405
403
|
this._visibleOptions = [];
|
|
406
404
|
this.clearSource();
|
|
407
|
-
if (focusOnInput) {
|
|
408
|
-
setTimeout(() => {
|
|
409
|
-
this.setFocus();
|
|
410
|
-
}, 0);
|
|
411
|
-
}
|
|
412
405
|
}
|
|
413
406
|
loadOptions(mode, argument = "") {
|
|
414
407
|
this._criteria = argument;
|
|
@@ -445,7 +438,7 @@ const EzSearch = class {
|
|
|
445
438
|
this.value = null;
|
|
446
439
|
this._currentValue = null;
|
|
447
440
|
}
|
|
448
|
-
controlListWithOnlyOne(
|
|
441
|
+
controlListWithOnlyOne() {
|
|
449
442
|
var _a, _b;
|
|
450
443
|
const source = (_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.filter((opt) => opt.label !== "" && opt.value != undefined);
|
|
451
444
|
if ((source === null || source === void 0 ? void 0 : source.length) > 0) {
|
|
@@ -456,7 +449,7 @@ const EzSearch = class {
|
|
|
456
449
|
value: (_b = source[0].value) === null || _b === void 0 ? void 0 : _b.replace(startHighlight, '').replace(endHighlight, ''),
|
|
457
450
|
label: title === null || title === void 0 ? void 0 : title.replace(startHighlight, '').replace(endHighlight, '')
|
|
458
451
|
};
|
|
459
|
-
this.selectOption(option
|
|
452
|
+
this.selectOption(option);
|
|
460
453
|
}
|
|
461
454
|
}
|
|
462
455
|
controlEmptySearch() {
|
|
@@ -582,11 +575,6 @@ const EzSearch = class {
|
|
|
582
575
|
}
|
|
583
576
|
});
|
|
584
577
|
});
|
|
585
|
-
if (this.autoFocus) {
|
|
586
|
-
requestAnimationFrame(() => {
|
|
587
|
-
this.setFocus({ selectText: true });
|
|
588
|
-
});
|
|
589
|
-
}
|
|
590
578
|
}
|
|
591
579
|
//---------------------------------------------
|
|
592
580
|
// Event handlers
|
|
@@ -656,16 +644,12 @@ const EzSearch = class {
|
|
|
656
644
|
}
|
|
657
645
|
switch (event.key) {
|
|
658
646
|
case "ArrowDown":
|
|
659
|
-
event.stopPropagation();
|
|
660
|
-
if (this.canShowListOptions())
|
|
661
|
-
event.preventDefault();
|
|
662
647
|
this.nextOption();
|
|
648
|
+
event.stopPropagation();
|
|
663
649
|
break;
|
|
664
650
|
case "ArrowUp":
|
|
665
|
-
event.stopPropagation();
|
|
666
|
-
if (this.canShowListOptions())
|
|
667
|
-
event.preventDefault();
|
|
668
651
|
this.previousOption();
|
|
652
|
+
event.stopPropagation();
|
|
669
653
|
break;
|
|
670
654
|
case "Enter":
|
|
671
655
|
this.handleEventPropagation(event);
|
|
@@ -676,7 +660,7 @@ const EzSearch = class {
|
|
|
676
660
|
break;
|
|
677
661
|
case "Tab":
|
|
678
662
|
this._tabPressed = true;
|
|
679
|
-
this.controlListWithOnlyOne(
|
|
663
|
+
this.controlListWithOnlyOne();
|
|
680
664
|
break;
|
|
681
665
|
}
|
|
682
666
|
//ATENÇÃO: Existe a necessidade de propagar o evento de teclado.
|