@sankhyalabs/ezui 4.18.2 → 4.19.1
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/constants-3a1d64fb.js +7 -0
- package/dist/cjs/ez-check.cjs.entry.js +1 -1
- package/dist/cjs/ez-combo-box.cjs.entry.js +2 -2
- package/dist/cjs/ez-filter-input_2.cjs.entry.js +137 -0
- package/dist/cjs/ez-form-view.cjs.entry.js +1 -1
- package/dist/cjs/ez-grid.cjs.entry.js +373 -282
- package/dist/cjs/ez-list.cjs.entry.js +85 -72
- package/dist/cjs/ez-modal-container.cjs.entry.js +2 -2
- package/dist/cjs/ez-modal.cjs.entry.js +1 -1
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js +181 -0
- package/dist/cjs/{ez-filter-input_4.cjs.entry.js → ez-scroller_3.cjs.entry.js} +0 -116
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/filter-column.cjs.entry.js +108 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +3 -0
- package/dist/collection/components/ez-check/ez-check.css +1 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +1 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +186 -119
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridUtils.js +8 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.js +8 -1
- package/dist/collection/components/ez-grid/ez-grid.css +14 -4
- package/dist/collection/components/ez-grid/ez-grid.js +49 -20
- package/dist/collection/components/ez-grid/subcomponents/filter-column.css +34 -0
- package/dist/collection/components/ez-grid/subcomponents/filter-column.js +297 -0
- package/dist/collection/components/ez-list/ez-list.css +0 -1
- package/dist/collection/components/ez-list/ez-list.js +88 -77
- package/dist/collection/components/ez-modal/ez-modal.css +0 -1
- package/dist/collection/components/ez-modal-container/ez-modal-container.css +11 -0
- package/dist/collection/components/ez-modal-container/ez-modal-container.js +1 -1
- package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.css +36 -0
- package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.js +318 -0
- package/dist/collection/components/ez-multi-selection-list/interfaces/IMultiSelectionListDataSource.js +1 -0
- package/dist/collection/components/ez-multi-selection-list/interfaces/IMultiSelectionOption.js +1 -0
- package/dist/collection/components/ez-multi-selection-list/subcomponents/multi-selection-box-message.css +18 -0
- package/dist/collection/components/ez-multi-selection-list/subcomponents/multi-selection-box-message.js +41 -0
- package/dist/collection/utils/constants.js +1 -0
- package/dist/custom-elements/index.d.ts +18 -0
- package/dist/custom-elements/index.js +764 -365
- package/dist/esm/constants-6dab64f7.js +4 -0
- package/dist/esm/ez-check.entry.js +1 -1
- package/dist/esm/ez-combo-box.entry.js +2 -2
- package/dist/esm/ez-filter-input_2.entry.js +132 -0
- package/dist/esm/ez-form-view.entry.js +1 -1
- package/dist/esm/ez-grid.entry.js +373 -282
- package/dist/esm/ez-list.entry.js +85 -72
- package/dist/esm/ez-modal-container.entry.js +2 -2
- package/dist/esm/ez-modal.entry.js +1 -1
- package/dist/esm/ez-multi-selection-list.entry.js +177 -0
- package/dist/esm/{ez-filter-input_4.entry.js → ez-scroller_3.entry.js} +3 -118
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/filter-column.entry.js +104 -0
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-06b3c6cd.entry.js +1 -0
- package/dist/ezui/{p-967758ac.entry.js → p-0dc118f3.entry.js} +1 -1
- package/dist/ezui/p-27a01a26.js +1 -0
- package/dist/ezui/p-353be5eb.entry.js +1 -0
- package/dist/ezui/p-3e25ecbc.entry.js +1 -0
- package/dist/ezui/{p-b945133d.entry.js → p-4186ca4f.entry.js} +1 -1
- package/dist/ezui/{p-b2056805.entry.js → p-5c0ac5ba.entry.js} +1 -1
- package/dist/ezui/{p-5110b212.entry.js → p-71faa111.entry.js} +1 -1
- package/dist/ezui/{p-9334e296.entry.js → p-b7dd1382.entry.js} +2 -2
- package/dist/ezui/p-c72a799e.entry.js +1 -0
- package/dist/ezui/p-e04e9dbd.entry.js +1 -0
- package/dist/ezui/p-f9787309.entry.js +1 -0
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +5 -1
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +14 -5
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridUtils.d.ts +1 -0
- package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.d.ts +9 -7
- package/dist/types/components/ez-grid/ez-grid.d.ts +14 -4
- package/dist/types/components/ez-grid/subcomponents/filter-column.d.ts +45 -0
- package/dist/types/components/ez-list/ez-list.d.ts +5 -5
- package/dist/types/components/ez-multi-selection-list/ez-multi-selection-list.d.ts +64 -0
- package/dist/types/components/ez-multi-selection-list/interfaces/IMultiSelectionListDataSource.d.ts +4 -0
- package/dist/types/components/ez-multi-selection-list/interfaces/IMultiSelectionOption.d.ts +4 -0
- package/dist/types/components/ez-multi-selection-list/subcomponents/multi-selection-box-message.d.ts +4 -0
- package/dist/types/components.d.ts +117 -1
- package/dist/types/utils/constants.d.ts +1 -0
- package/package.json +1 -1
- package/react/components.d.ts +3 -0
- package/react/components.js +3 -0
- package/react/components.js.map +1 -1
- package/dist/cjs/constants-5a75e2f3.js +0 -5
- package/dist/esm/constants-ca136201.js +0 -3
- package/dist/ezui/p-3f4ae3a3.js +0 -1
- package/dist/ezui/p-4ebb1d15.entry.js +0 -1
- package/dist/ezui/p-afea6e50.entry.js +0 -1
- package/dist/ezui/p-f71f0aa2.entry.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLElement as HTMLElement$1, createEvent, h, Host, forceUpdate, Fragment, proxyCustomElement } from '@stencil/core/internal/client';
|
|
2
2
|
export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
|
|
3
|
-
import { UserInterface, DateUtils as DateUtils$1, Action, WaitingChangeException, ApplicationContext, DataUnitAction, FloatingManager, ElementIDUtils, ObjectUtils as ObjectUtils$1, JSUtils, StringUtils as StringUtils$1, TimeFormatter, DataUnit, NumberUtils as NumberUtils$1, DataType, SortMode, MaskFormatter } from '@sankhyalabs/core';
|
|
3
|
+
import { UserInterface, DateUtils as DateUtils$1, Action, WaitingChangeException, ApplicationContext, DataUnitAction, FloatingManager, ElementIDUtils, ObjectUtils as ObjectUtils$1, JSUtils, StringUtils as StringUtils$1, TimeFormatter, DataUnit, NumberUtils as NumberUtils$1, DataType, SortMode, ArrayUtils as ArrayUtils$1, MaskFormatter } from '@sankhyalabs/core';
|
|
4
4
|
import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
|
|
5
5
|
|
|
6
6
|
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
@@ -1742,7 +1742,7 @@ const EzCardItem$1 = class extends HTMLElement$1 {
|
|
|
1742
1742
|
static get style() { return ezCardItemCss; }
|
|
1743
1743
|
};
|
|
1744
1744
|
|
|
1745
|
-
const ezCheckCss = ":host{--ez-check--box--width:20px;--ez-check--box--height:20px;--ez-check--width:calc(var(--ez-check--box--width) + var(--ez-check--outter-gap, 14px));--ez-check--height:calc(var(--ez-check--box--width) + var(--ez-check--outter-gap, 14px));--ez-check--border-radius:var(--border--radius-small);--ez-check--checked--background-color:var(--color--primary-200);--ez-check--focus--background-color:var(--color--strokes, #FFFFFF);--ez-check--hover--background-color:var(--background--medium);--ez-check--checked--disabled--background-color:var(--color--disable-secondary);--ez-check--border:var(--border--medium) var(--title--primary);--ez-check--disabled--border:var(--border--medium) var(--color--strokes);--ez-check--checked--border:var(--border--medium) var(--color--primary);--ez-check--checked--hover--background-color:var(--color--primary-200);--ez-check--checked--focus--background-color:var(--color--primary-300, #FFFFFF);--ez-check--check--image:url('data:image/svg+xml;utf8,<svg width=\"8\" height=\"7\" viewBox=\"0 0 8 7\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M7.70002 0.398999L7.48502 0.207997C7.31524 0.0598858 7.09376 -0.0150438 6.86894 -0.000430025C6.64411 0.0141838 6.43419 0.117153 6.28502 0.285997L2.70002 4.332L1.61802 3.384C1.44837 3.23576 1.22697 3.16067 1.00214 3.17509C0.77732 3.18952 0.567332 3.2923 0.418019 3.461L0.229019 3.674C0.0752361 3.84797 -0.00437434 4.07521 0.00721192 4.30713C0.0187982 4.53904 0.120661 4.75722 0.291019 4.915L2.27402 6.762C2.35832 6.8432 2.45842 6.90618 2.56811 6.94702C2.67779 6.98787 2.79471 7.00571 2.91159 6.99942C3.02846 6.99314 3.14279 6.96287 3.24747 6.91049C3.35214 6.85812 3.44492 6.78477 3.52002 6.695L7.79102 1.638C7.94063 1.46048 8.01486 1.23149 7.99786 0.999963C7.98085 0.768436 7.87396 0.552749 7.70002 0.398999Z\"/></svg>');--ez-check--indeterminate--image:url('data:image/svg+xml;utf8,<svg width=\"10\" height=\"2\" viewBox=\"0 0 10 2\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m 1,0 h 8 c 0.554,0 1,0.446 1,1 0,0.554 -0.446,1 -1,1 H 1 C 0.446,2 0,1.554 0,1 0,0.446 0.446,0 1,0 Z\" /></svg>');--ez-check--check--background-color:var(--color--primary);--ez-check--check--disabled--background-color:var(--color--strokes);--ez-switch--slider--width:34px;--ez-switch--slider--height:14px;--ez-switch--pin--width:19px;--ez-switch--pin--height:19px;--ez-switch--focus--width:32px;--ez-switch--focus--height:32px;--ez-switch--background-color:var(--color--strokes);--ez-switch--disabled--background-color:var(--color--disable-secondary);--ez-switch--disabled--checked--background-color:var(--color--primary-300);--ez-switch--checked--background-color:var(--color--primary);--ez-switch--pin--background-color:var(--background--xlight);--ez-switch--pin--disabled--background-color:var(--color--disable-primary);--ez-switch--pin--checked--background-color:var(--background--xlight);--ez-switch--pin--checked--disabled--background-color:#E8F7F4;--ez-switch--pin--focus--background-color:var(--text--disable);--ez-switch--pin--checked--focus--background-color:var(--color--primary);--ez-switch--pin--border-color:var(--text--primary);--ez-switch--pin--disabled--border-color:var(--text--secondary);--ez-check--label--font-size:var(--text--medium, 14px);--ez-check--label--font-family:var(--font-pattern, Arial);--ez-check--label--color:var(--title--primary, #000);--ez-check--label--disabled--color:var(--text--disable, #AFB6C0);display:flex;width:100%;align-items:center;margin:0}input.regular-mode{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;box-sizing:border-box;-webkit-appearance:none;appearance:none;cursor:pointer;border-radius:50%;position:relative;width:var(--ez-check--width);height:var(--ez-check--height)}input.compact{margin-right:0px}input.regular-mode:enabled:hover{background-color:var(--ez-check--hover--background-color)}input.regular-mode:enabled:focus{outline:none;background-color:var(--ez-check--focus--background-color)}input.regular-mode:disabled{cursor:auto;background:none}input.regular-mode::before{box-sizing:border-box;content:\"\";display:block;width:var(--ez-check--box--width);height:var(--ez-check--box--height);border-radius:var(--ez-check--border-radius);border:var(--ez-check--border)}input.regular-mode:disabled::before{border:var(--ez-check--disabled--border)}input.regular-mode:checked:enabled:hover,input.regular-mode:indeterminate:enabled:hover{background-color:var(--ez-check--checked--hover--background-color)}input.regular-mode:checked:enabled:focus,input.regular-mode:indeterminate:enabled:focus{background-color:var(--ez-check--checked--focus--background-color)}input.regular-mode:checked::before,input.regular-mode:indeterminate::before{border:var(--ez-check--checked--border);background-color:var(--ez-check--checked--background-color)}input.regular-mode:disabled:before{border:var(--ez-check--disabled--border);background-color:var(--ez-check--checked--disabled--background-color)}input.regular-mode:checked::after,input.regular-mode:indeterminate:after{display:flex;position:absolute;content:\"\";background-color:var(--ez-check--check--background-color);width:8px;height:7px;-webkit-mask-image:var(--ez-check--check--image);mask-image:var(--ez-check--check--image)}input.regular-mode:indeterminate:after{display:flex;position:absolute;content:\"\";background-color:var(--ez-check--check--background-color);width:10px;height:2px;-webkit-mask-image:var(--ez-check--indeterminate--image);mask-image:var(--ez-check--indeterminate--image)}input.regular-mode:checked:disabled::after,input.regular-mode:indeterminate:disabled::after{background-color:var(--ez-check--check--disabled--background-color)}input.switch-mode{flex-shrink:0;-webkit-appearance:none;appearance:none;position:relative;outline:none;cursor:pointer;border-radius:20px;border:var(--border--small, 1px solid) var(--ez-switch--pin--border-color, #626e82);transition:background-color var(--transition);width:var(--ez-switch--slider--width);height:var(--ez-switch--slider--height);background-color:var(--ez-switch--background-color)}input.switch-mode:disabled{background-color:var(--ez-switch--disabled--background-color);border:var(--border--small, 1px solid) var(--ez-switch--pin--disabled--border-color, #a2abb9)}input.switch-mode:checked:disabled{background-color:var(--ez-switch--disabled--checked--background-color)}input.switch-mode::after{content:\"\";display:block;position:absolute;box-shadow:var(--shadow);transition:transform var(--transition);transition:background-color var(--transition);transition:border-color var(--transition);transform:translateX(-2px) translateY(-4px);border-radius:50%;border:var(--border--small, 1px solid) var(--ez-switch--pin--border-color, #626e82);width:var(--ez-switch--pin--width);height:var(--ez-switch--pin--height);background-color:var(--ez-switch--pin--background-color)}input.switch-mode:disabled::after{background-color:var(--ez-switch--pin--disabled--background-color);border:var(--border--small, 1px solid) var(--ez-switch--pin--disabled--border-color, #a2abb9)}input.switch-mode:checked{transition:background-color var(--transition), border var(--transition);background-color:var(--ez-switch--checked--background-color);border:var(--border--small, 1px solid) var(--color--primary, #008561)}input.switch-mode::before{display:block;content:\"\";display:block;position:absolute;border-radius:50%;opacity:0;width:var(--ez-switch--focus--width);height:var(--ez-switch--focus--height);top:calc((var(--ez-switch--slider--height) - var(--ez-switch--focus--height)) / 2);left:calc((var(--ez-switch--pin--width) - var(--ez-switch--focus--width) - 2px) / 2);background-color:var(--ez-switch--pin--focus--background-color)}input.switch-mode:focus::before{opacity:0.24;transition:opacity var(--transition)}input.switch-mode:checked:focus::before{background-color:var(--ez-switch--pin--checked--focus--background-color);transform:translateX(calc(var(--ez-switch--slider--width) - var(--ez-switch--pin--width) + 2px))}input.switch-mode:checked::after{transition:transform var(--transition);transition:background-color var(--transition);transition:border-color var(--transition);transform:translateX(calc(var(--ez-switch--slider--width) - var(--ez-switch--pin--width))) translateY(-4px);box-shadow:var(--shadow);background-color:var(--ez-switch--pin--checked--background-color);border:var(--border--small, 1px solid) var(--color--primary, #008561)}input.switch-mode:checked:disabled::after{background-color:var(--ez-switch--pin--checked--disabled--background-color)}.label{flex-shrink:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-check--label--color);font-size:var(--ez-check--label--font-size);font-family:var(--ez-check--label--font-family);cursor:default}.label--disabled{color:var(--ez-check--label--disabled--color)}.label--padding{padding-left:var(--space--small)}";
|
|
1745
|
+
const ezCheckCss = ":host{--ez-check--box--width:20px;--ez-check--box--height:20px;--ez-check--width:calc(var(--ez-check--box--width) + var(--ez-check--outter-gap, 14px));--ez-check--height:calc(var(--ez-check--box--width) + var(--ez-check--outter-gap, 14px));--ez-check--border-radius:var(--border--radius-small);--ez-check--checked--background-color:var(--color--primary-200);--ez-check--focus--background-color:var(--color--strokes, #FFFFFF);--ez-check--hover--background-color:var(--background--medium);--ez-check--checked--disabled--background-color:var(--color--disable-secondary);--ez-check--border:var(--border--medium) var(--title--primary);--ez-check--disabled--border:var(--border--medium) var(--color--strokes);--ez-check--checked--border:var(--border--medium) var(--color--primary);--ez-check--checked--hover--background-color:var(--color--primary-200);--ez-check--checked--focus--background-color:var(--color--primary-300, #FFFFFF);--ez-check--check--image:url('data:image/svg+xml;utf8,<svg width=\"8\" height=\"7\" viewBox=\"0 0 8 7\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M7.70002 0.398999L7.48502 0.207997C7.31524 0.0598858 7.09376 -0.0150438 6.86894 -0.000430025C6.64411 0.0141838 6.43419 0.117153 6.28502 0.285997L2.70002 4.332L1.61802 3.384C1.44837 3.23576 1.22697 3.16067 1.00214 3.17509C0.77732 3.18952 0.567332 3.2923 0.418019 3.461L0.229019 3.674C0.0752361 3.84797 -0.00437434 4.07521 0.00721192 4.30713C0.0187982 4.53904 0.120661 4.75722 0.291019 4.915L2.27402 6.762C2.35832 6.8432 2.45842 6.90618 2.56811 6.94702C2.67779 6.98787 2.79471 7.00571 2.91159 6.99942C3.02846 6.99314 3.14279 6.96287 3.24747 6.91049C3.35214 6.85812 3.44492 6.78477 3.52002 6.695L7.79102 1.638C7.94063 1.46048 8.01486 1.23149 7.99786 0.999963C7.98085 0.768436 7.87396 0.552749 7.70002 0.398999Z\"/></svg>');--ez-check--indeterminate--image:url('data:image/svg+xml;utf8,<svg width=\"10\" height=\"2\" viewBox=\"0 0 10 2\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m 1,0 h 8 c 0.554,0 1,0.446 1,1 0,0.554 -0.446,1 -1,1 H 1 C 0.446,2 0,1.554 0,1 0,0.446 0.446,0 1,0 Z\" /></svg>');--ez-check--check--background-color:var(--color--primary);--ez-check--check--disabled--background-color:var(--color--strokes);--ez-switch--slider--width:34px;--ez-switch--slider--height:14px;--ez-switch--pin--width:19px;--ez-switch--pin--height:19px;--ez-switch--focus--width:32px;--ez-switch--focus--height:32px;--ez-switch--background-color:var(--color--strokes);--ez-switch--disabled--background-color:var(--color--disable-secondary);--ez-switch--disabled--checked--background-color:var(--color--primary-300);--ez-switch--checked--background-color:var(--color--primary);--ez-switch--pin--background-color:var(--background--xlight);--ez-switch--pin--disabled--background-color:var(--color--disable-primary);--ez-switch--pin--checked--background-color:var(--background--xlight);--ez-switch--pin--checked--disabled--background-color:#E8F7F4;--ez-switch--pin--focus--background-color:var(--text--disable);--ez-switch--pin--checked--focus--background-color:var(--color--primary);--ez-switch--pin--border-color:var(--text--primary);--ez-switch--pin--disabled--border-color:var(--text--secondary);--ez-check--label--font-size:var(--text--medium, 14px);--ez-check--label--font-family:var(--font-pattern, Arial);--ez-check--label--color:var(--title--primary, #000);--ez-check--label--disabled--color:var(--text--disable, #AFB6C0);display:flex;width:100%;align-items:center;margin:0}input.regular-mode{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;box-sizing:border-box;-webkit-appearance:none;appearance:none;cursor:pointer;border-radius:50%;position:relative;width:var(--ez-check--width);height:var(--ez-check--height)}input.compact{margin-right:0px}input.regular-mode:enabled:hover{background-color:var(--ez-check--hover--background-color)}input.regular-mode:enabled:focus{outline:none;background-color:var(--ez-check--focus--background-color)}input.regular-mode:disabled{cursor:auto;background:none}input.regular-mode::before{box-sizing:border-box;content:\"\";display:block;width:var(--ez-check--box--width);height:var(--ez-check--box--height);border-radius:var(--ez-check--border-radius);border:var(--ez-check--border)}input.regular-mode:disabled::before{border:var(--ez-check--disabled--border)}input.regular-mode:checked:enabled:hover,input.regular-mode:indeterminate:enabled:hover{background-color:var(--ez-check--checked--hover--background-color)}input.regular-mode:checked:enabled:focus,input.regular-mode:indeterminate:enabled:focus{background-color:var(--ez-check--checked--focus--background-color)}input.regular-mode:checked::before,input.regular-mode:indeterminate::before{border:var(--ez-check--checked--border);background-color:var(--ez-check--checked--background-color)}input.regular-mode:disabled:before{border:var(--ez-check--disabled--border);background-color:var(--ez-check--checked--disabled--background-color)}input.regular-mode:checked::after,input.regular-mode:indeterminate:after{display:flex;position:absolute;content:\"\";background-color:var(--ez-check--check--background-color);width:8px;height:7px;-webkit-mask-image:var(--ez-check--check--image);mask-image:var(--ez-check--check--image)}input.regular-mode:indeterminate:after{display:flex;position:absolute;content:\"\";background-color:var(--ez-check--check--background-color);width:10px;height:2px;-webkit-mask-image:var(--ez-check--indeterminate--image);mask-image:var(--ez-check--indeterminate--image)}input.regular-mode:checked:disabled::after,input.regular-mode:indeterminate:disabled::after{background-color:var(--ez-check--check--disabled--background-color)}input.switch-mode{flex-shrink:0;-webkit-appearance:none;appearance:none;position:relative;outline:none;cursor:pointer;border-radius:20px;border:var(--border--small, 1px solid) var(--ez-switch--pin--border-color, #626e82);transition:background-color var(--transition);width:var(--ez-switch--slider--width);height:var(--ez-switch--slider--height);background-color:var(--ez-switch--background-color)}input.switch-mode:disabled{background-color:var(--ez-switch--disabled--background-color);border:var(--border--small, 1px solid) var(--ez-switch--pin--disabled--border-color, #a2abb9)}input.switch-mode:checked:disabled{background-color:var(--ez-switch--disabled--checked--background-color)}input.switch-mode::after{content:\"\";display:block;position:absolute;box-shadow:var(--shadow);transition:transform var(--transition);transition:background-color var(--transition);transition:border-color var(--transition);transform:translateX(-2px) translateY(-4px);border-radius:50%;border:var(--border--small, 1px solid) var(--ez-switch--pin--border-color, #626e82);width:var(--ez-switch--pin--width);height:var(--ez-switch--pin--height);background-color:var(--ez-switch--pin--background-color)}input.switch-mode:disabled::after{background-color:var(--ez-switch--pin--disabled--background-color);border:var(--border--small, 1px solid) var(--ez-switch--pin--disabled--border-color, #a2abb9)}input.switch-mode:checked{transition:background-color var(--transition), border var(--transition);background-color:var(--ez-switch--checked--background-color);border:var(--border--small, 1px solid) var(--color--primary, #008561)}input.switch-mode::before{display:block;content:\"\";display:block;position:absolute;border-radius:50%;opacity:0;width:var(--ez-switch--focus--width);height:var(--ez-switch--focus--height);top:calc((var(--ez-switch--slider--height) - var(--ez-switch--focus--height)) / 2);left:calc((var(--ez-switch--pin--width) - var(--ez-switch--focus--width) - 2px) / 2);background-color:var(--ez-switch--pin--focus--background-color)}input.switch-mode:focus::before{opacity:0.24;transition:opacity var(--transition)}input.switch-mode:checked:focus::before{background-color:var(--ez-switch--pin--checked--focus--background-color);transform:translateX(calc(var(--ez-switch--slider--width) - var(--ez-switch--pin--width) + 2px))}input.switch-mode:checked::after{transition:transform var(--transition);transition:background-color var(--transition);transition:border-color var(--transition);transform:translateX(calc(var(--ez-switch--slider--width) - var(--ez-switch--pin--width))) translateY(-4px);box-shadow:var(--shadow);background-color:var(--ez-switch--pin--checked--background-color);border:var(--border--small, 1px solid) var(--color--primary, #008561)}input.switch-mode:checked:disabled::after{background-color:var(--ez-switch--pin--checked--disabled--background-color)}.label{flex-shrink:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-check--label--color);font-size:var(--ez-check--label--font-size);font-family:var(--ez-check--label--font-family);cursor:default;width:inherit}.label--disabled{color:var(--ez-check--label--disabled--color)}.label--padding{padding-left:var(--space--small)}";
|
|
1746
1746
|
|
|
1747
1747
|
const EzCheck$1 = class extends HTMLElement$1 {
|
|
1748
1748
|
constructor() {
|
|
@@ -2063,6 +2063,7 @@ const EzCollapsibleBox$1 = class extends HTMLElement$1 {
|
|
|
2063
2063
|
};
|
|
2064
2064
|
|
|
2065
2065
|
const REQUIRED_INFO = " (obrigatório) *";
|
|
2066
|
+
const DISTINCT_FILTER_NAME_PREFIX = 'FILTRO_COLUNA_';
|
|
2066
2067
|
|
|
2067
2068
|
const ezComboBoxCss = ":host{--ez-combo-box--height:42px;--ez-combo-box--width:100%;--ez-combo-box__icon--width:48px;--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--border-radius-small:var(--border--radius-small, 6px);--ez-combo-box--font-size:var(--text--medium, 14px);--ez-combo-box--font-family:var(--font-pattern, Arial);--ez-combo-box--font-weight--large:var(--text-weight--large, 500);--ez-combo-box--font-weight--medium:var(--text-weight--medium, 400);--ez-combo-box--background-color--xlight:var(--background--xlight, #fff);--ez-combo-box--background-medium:var(--background--medium, #f0f3f7);--ez-combo-box--line-height:calc(var(--text--medium, 14px) + 4px);--ez-combo-box__input--background-color:var(--background--medium, #e0e0e0);--ez-combo-box__input--border:var(--border--medium, 2px solid);--ez-combo-box__input--border-color:var(--ez-combo-box__input--background-color);--ez-combo-box__input--focus--border-color:var(--color--primary, #008561);--ez-combo-box__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-combo-box__input--disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__input--error--border-color:#CC2936;--ez-combo-box__btn--color:var(--title--primary, #2B3A54);--ez-combo-box__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-hover--color:var(--color--primary, #4e4e4e);--ez-combo-box__label--color:var(--title--primary, #2B3A54);--ez-combo-box__list-title--primary:var(--title--primary, #2B3A54);--ez-combo-box__list-text--primary:var(--text--primary, #626e82);--ez-combo-box__list-height:calc(var(--ez-combo-box--font-size) + var(--ez-combo-box--space--medium) + 4px);--ez-combo-box--space--medium:var(--space--medium, 12px);--ez-combo-box--space--small:var(--space--small, 6px);--ez-combo-box__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-combo-box__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-combo-box__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-combo-box__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-combo-box__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-combo-box__scrollbar--width:var(--space--medium, 12px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-combo-box--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #2B3A54)}.list-container{position:relative;width:100%}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:100%;z-index:var(--more-visible, 2);max-height:calc(4*var(--ez-combo-box__list-height) + 2*var(--ez-combo-box--space--small) + 9px);background-color:var(--ez-combo-box--background-color--xlight);border-radius:var(--ez-combo-box--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000);padding:var(--ez-combo-box--space--small)}.list-options{box-sizing:border-box;width:100%;height:100%;display:flex;flex-direction:column;scroll-behavior:smooth;overflow:auto;scrollbar-width:thin;gap:3px;scrollbar-color:var(--ez-combo-box__scrollbar--color-clicked) var(--ez-combo-box__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--ez-combo-box__scrollbar--color-background);width:var(--ez-combo-box__scrollbar--width);max-width:var(--ez-combo-box__scrollbar--width);min-width:var(--ez-combo-box__scrollbar--width)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-combo-box__scrollbar--color-background);border-radius:var(--ez-combo-box__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-combo-box__scrollbar--color-default);border-radius:var(--ez-combo-box__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-combo-box__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-combo-box__scrollbar--color-clicked)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-combo-box--border-radius-small);padding:var(--ez-combo-box--space--small);min-height:var(--ez-combo-box__list-height);gap:var(--space--small, 6px)}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-combo-box__list-title--primary);font-family:var(--ez-combo-box--font-family);font-size:var(--ez-combo-box--font-size);line-height:var(--ez-combo-box--line-height)}.item__label{font-weight:var(--ez-combo-box--font-weight--medium)}.item__label--bold{font-weight:var(--ez-combo-box--font-weight--large)}.item__value{text-align:center;color:var(--ez-combo-box__list-text--primary);font-weight:var(--ez-combo-box--font-weight--large)}.item__value--hidden{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}.item__label{text-align:left}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;min-height:var(--ez-combo-box__list-height)}.message__no-result{color:var(--ez-combo-box__list-title--primary);font-family:var(--ez-combo-box--font-family);font-size:var(--ez-combo-box--font-size)}.message__loading{border-radius:50%;width:14px;height:14px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;border:3px solid var(--ez-combo-box__list-title--primary);border-top:3px solid transparent}li:hover{background-color:var(--ez-combo-box--background-medium)}.preselected{background-color:var(--background--medium)}.btn{outline:none;border:none;background:none;cursor:pointer;color:var(--ez-combo-box__btn--color)}.btn:disabled{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:disabled:hover{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:hover{color:var(--ez-combo-box__btn-hover--color)}.btn__close{visibility:hidden}ez-text-input:hover .btn__close,ez-text-input:focus .btn__close{visibility:visible}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
|
|
2068
2069
|
|
|
@@ -2279,7 +2280,7 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2279
2280
|
}
|
|
2280
2281
|
scrollToOption(opt, down) {
|
|
2281
2282
|
window.requestAnimationFrame(() => {
|
|
2282
|
-
const liElem = (opt === null || opt === void 0 ? void 0 : opt.value) ? this._optionsList.querySelector(`li#item_${opt.value.replace(/[<>\[\]#=]/g, '\\$&')}`) : undefined;
|
|
2283
|
+
const liElem = (opt === null || opt === void 0 ? void 0 : opt.value) ? this._optionsList.querySelector(`li#item_${opt.value.replace(/[<>\[\]#=]/g, '\\$&').replace(/:/g, '\\:')}`) : undefined;
|
|
2283
2284
|
if (liElem) {
|
|
2284
2285
|
const parent = liElem.parentElement;
|
|
2285
2286
|
const parentRect = parent.getBoundingClientRect();
|
|
@@ -123296,81 +123297,6 @@ var AllEnterpriseModules = [
|
|
|
123296
123297
|
|
|
123297
123298
|
ModuleRegistry.registerModules(AllEnterpriseModules);
|
|
123298
123299
|
|
|
123299
|
-
const gridTerms = {
|
|
123300
|
-
// for filter panel
|
|
123301
|
-
page: "Página",
|
|
123302
|
-
more: "mais",
|
|
123303
|
-
to: "para",
|
|
123304
|
-
of: "de",
|
|
123305
|
-
next: "Próximo",
|
|
123306
|
-
last: "Último",
|
|
123307
|
-
first: "Primeiro",
|
|
123308
|
-
previous: "Anterior",
|
|
123309
|
-
loadingOoo: "Carregar",
|
|
123310
|
-
// for set filter
|
|
123311
|
-
selectAll: "Selecionar tudo",
|
|
123312
|
-
searchOoo: "Procurar",
|
|
123313
|
-
blanks: "Vazio",
|
|
123314
|
-
// for number filter and text filter
|
|
123315
|
-
filterOoo: "Filtrar",
|
|
123316
|
-
applyFilter: "Aplicar filtro",
|
|
123317
|
-
// for number filter
|
|
123318
|
-
equals: "Igual",
|
|
123319
|
-
lessThan: "Menor que",
|
|
123320
|
-
greaterThan: "Maior que",
|
|
123321
|
-
// for text filter
|
|
123322
|
-
contains: "Contém",
|
|
123323
|
-
startsWith: "Começa com",
|
|
123324
|
-
endsWith: "Termina com",
|
|
123325
|
-
// the header of the default group column
|
|
123326
|
-
group: "Grupo",
|
|
123327
|
-
// tool panel
|
|
123328
|
-
columns: "Colunas",
|
|
123329
|
-
rowGroupColumns: "Colunas do grupo de linhas",
|
|
123330
|
-
rowGroupColumnsEmptyMessage: "Colunas do grupo de linhas vazias",
|
|
123331
|
-
valueColumns: "Valores das colunas",
|
|
123332
|
-
pivotMode: "Modo pivô",
|
|
123333
|
-
groups: "Grupos",
|
|
123334
|
-
values: "Valores",
|
|
123335
|
-
pivots: "Pivôs",
|
|
123336
|
-
valueColumnsEmptyMessage: "Valores de colunas vazias",
|
|
123337
|
-
pivotColumnsEmptyMessage: "Pivôs de colunas vazias",
|
|
123338
|
-
toolPanelButton: "Botão de painel de ferramentas",
|
|
123339
|
-
// other
|
|
123340
|
-
noRowsToShow: "Não há registros para mostrar.",
|
|
123341
|
-
// enterprise menu
|
|
123342
|
-
pinColumn: "Fixar coluna",
|
|
123343
|
-
valueAggregation: "Agregar valor",
|
|
123344
|
-
autosizeThiscolumn: "Redimensionar esta coluna",
|
|
123345
|
-
autosizeAllColumns: "Redimensionar todas colunas",
|
|
123346
|
-
groupBy: "Agrupar por",
|
|
123347
|
-
ungroupBy: "Desagrupar por",
|
|
123348
|
-
resetColumns: "Resetar colunas",
|
|
123349
|
-
expandAll: "Expandir tudo",
|
|
123350
|
-
collapseAll: "Contrair tudo",
|
|
123351
|
-
toolPanel: "Painel de ferramentas",
|
|
123352
|
-
export: "Exportar",
|
|
123353
|
-
csvExport: "Exportar para CSV",
|
|
123354
|
-
excelExport: "Exportar para Excel",
|
|
123355
|
-
// enterprise menu pinning
|
|
123356
|
-
pinLeft: "Fixar coluna",
|
|
123357
|
-
pinRight: "Fixar a direita",
|
|
123358
|
-
noPin: "Desfixar coluna",
|
|
123359
|
-
// enterprise menu aggregation and status panel
|
|
123360
|
-
sum: "Soma",
|
|
123361
|
-
min: "Mínimo",
|
|
123362
|
-
max: "Máximo",
|
|
123363
|
-
none: "Nenhum",
|
|
123364
|
-
count: "Contagem",
|
|
123365
|
-
average: "Média",
|
|
123366
|
-
// standard menu
|
|
123367
|
-
copy: "Copiar",
|
|
123368
|
-
copyWithHeaders: "Copiar com cabeçalho",
|
|
123369
|
-
ctrlC: "Ctrl+C",
|
|
123370
|
-
paste: "Colar",
|
|
123371
|
-
ctrlV: "Ctrl+V"
|
|
123372
|
-
};
|
|
123373
|
-
|
|
123374
123300
|
class DataSource {
|
|
123375
123301
|
constructor(dataUnit, controller, options) {
|
|
123376
123302
|
this.RECORD_ARCHIVE = "__RECORD_ARCHIVE__";
|
|
@@ -123471,6 +123397,103 @@ class DataSource {
|
|
|
123471
123397
|
}
|
|
123472
123398
|
}
|
|
123473
123399
|
|
|
123400
|
+
function calcFilterColumnLeftPosition(leftReference) {
|
|
123401
|
+
const FIX_MARGIN = 60;
|
|
123402
|
+
const FILTER_COLUMN_WIDTH = 330;
|
|
123403
|
+
const screenWidth = window.innerWidth;
|
|
123404
|
+
const maxLeft = screenWidth - (FILTER_COLUMN_WIDTH + FIX_MARGIN);
|
|
123405
|
+
const leftInt = leftReference - FIX_MARGIN;
|
|
123406
|
+
return leftInt > maxLeft ? maxLeft : leftInt;
|
|
123407
|
+
}
|
|
123408
|
+
|
|
123409
|
+
class EzGridCustomHeader {
|
|
123410
|
+
init(agParams) {
|
|
123411
|
+
var _a;
|
|
123412
|
+
this.params = agParams;
|
|
123413
|
+
this.element = document.createElement('div');
|
|
123414
|
+
this.element.classList.add('ag-cell-label-container');
|
|
123415
|
+
this.element.setAttribute('title', (_a = this.params.tooltip) !== null && _a !== void 0 ? _a : '');
|
|
123416
|
+
this.element.innerHTML = `
|
|
123417
|
+
<div class='ez-flex ez-flex--justify-between'>
|
|
123418
|
+
<i id='ez-grid-filter-icon' class='ez-icon-filter' style='color:#008561'></i>
|
|
123419
|
+
<i id='ez-grid-menu-icon' class='ez-icon-dots-vertical'></i>
|
|
123420
|
+
</div>
|
|
123421
|
+
<div id='ez-header-container' class='ez-flex ez-flex--justify-between ag-header-cell-text'>
|
|
123422
|
+
<span class='ag-header-cell-text'>${this.params.displayName}</span>
|
|
123423
|
+
<i id='ez-grid-sort-icon-down' class='ez-icon-arrow_downward' style='display: none;margin-left: 4px;font-size: var(--text--medium, 14px);align-self: center;'></i>
|
|
123424
|
+
<i id='ez-grid-sort-icon-up' class='ez-icon-arrow_downward' style='display: none; transform: rotate(180deg);margin-left: 4px;font-size: var(--text--medium, 14px);align-self: center;'></i>
|
|
123425
|
+
</div>
|
|
123426
|
+
`;
|
|
123427
|
+
this.configMenuClick();
|
|
123428
|
+
this.configSortClick();
|
|
123429
|
+
this.configSortListener();
|
|
123430
|
+
this.configFilterButton();
|
|
123431
|
+
}
|
|
123432
|
+
refresh(agParams) {
|
|
123433
|
+
this.params = agParams;
|
|
123434
|
+
this.configFilterButton();
|
|
123435
|
+
this.configSortIcon();
|
|
123436
|
+
}
|
|
123437
|
+
configFilterButton() {
|
|
123438
|
+
this.filterButton = this.element.querySelector('#ez-grid-filter-icon');
|
|
123439
|
+
this.filterButton.style.display = this.params.hasFilter() ? 'flex' : 'none';
|
|
123440
|
+
this.onFilterButtonClickListener = this.onClickFilter.bind(this);
|
|
123441
|
+
this.filterButton.addEventListener('click', this.onFilterButtonClickListener);
|
|
123442
|
+
}
|
|
123443
|
+
onClickFilter() {
|
|
123444
|
+
var _a;
|
|
123445
|
+
const iconLeft = (_a = this.filterButton) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().left;
|
|
123446
|
+
this.params.showColumnFilter(`${calcFilterColumnLeftPosition(iconLeft)}px`);
|
|
123447
|
+
}
|
|
123448
|
+
configSortIcon() {
|
|
123449
|
+
this.sortDownIcon.style.display = this.params.column.isSortDescending() ? 'flex' : 'none';
|
|
123450
|
+
this.sortUpIcon.style.display = this.params.column.isSortAscending() ? 'flex' : 'none';
|
|
123451
|
+
}
|
|
123452
|
+
configSortListener() {
|
|
123453
|
+
if (this.params.enableSorting) {
|
|
123454
|
+
this.sortUpIcon = this.element.querySelector('#ez-grid-sort-icon-up');
|
|
123455
|
+
this.sortDownIcon = this.element.querySelector('#ez-grid-sort-icon-down');
|
|
123456
|
+
this.onSortChangedListener = this.configSortIcon.bind(this);
|
|
123457
|
+
this.params.column.addEventListener('sortChanged', this.onSortChangedListener);
|
|
123458
|
+
this.configSortIcon();
|
|
123459
|
+
}
|
|
123460
|
+
}
|
|
123461
|
+
onSortClick(event) {
|
|
123462
|
+
this.params.progressSort(event.shiftKey);
|
|
123463
|
+
}
|
|
123464
|
+
configSortClick() {
|
|
123465
|
+
if (this.params.column.getColDef().sortable) {
|
|
123466
|
+
this.headerContainer = this.element.querySelector('#ez-header-container');
|
|
123467
|
+
this.onSortClickListener = this.onSortClick.bind(this);
|
|
123468
|
+
this.headerContainer.addEventListener('click', this.onSortClickListener);
|
|
123469
|
+
}
|
|
123470
|
+
}
|
|
123471
|
+
onMenuClick() {
|
|
123472
|
+
this.params.showColumnMenu(this.menuButton);
|
|
123473
|
+
}
|
|
123474
|
+
configMenuClick() {
|
|
123475
|
+
this.menuButton = this.element.querySelector('#ez-grid-menu-icon');
|
|
123476
|
+
this.onMenuClickListener = this.onMenuClick.bind(this);
|
|
123477
|
+
this.menuButton.addEventListener('click', this.onMenuClickListener);
|
|
123478
|
+
}
|
|
123479
|
+
getGui() {
|
|
123480
|
+
return this.element;
|
|
123481
|
+
}
|
|
123482
|
+
destroy() {
|
|
123483
|
+
if (this.onMenuClickListener) {
|
|
123484
|
+
this.menuButton.removeEventListener('click', this.onMenuClickListener);
|
|
123485
|
+
}
|
|
123486
|
+
if (this.onSortClickListener) {
|
|
123487
|
+
this.headerContainer.removeEventListener('click', this.onSortClickListener);
|
|
123488
|
+
}
|
|
123489
|
+
if (this.onFilterButtonClickListener) {
|
|
123490
|
+
this.filterButton.removeEventListener('click', this.onFilterButtonClickListener);
|
|
123491
|
+
}
|
|
123492
|
+
this.params.column.removeEventListener('sortChanged', this.onSortChangedListener);
|
|
123493
|
+
this.params.column.removeEventListener('applyFilterColumnOptions', this.onFilterAppliedListener);
|
|
123494
|
+
}
|
|
123495
|
+
}
|
|
123496
|
+
|
|
123474
123497
|
class CellRendererStatus {
|
|
123475
123498
|
constructor() {
|
|
123476
123499
|
this.DEFAULT_COLOR = 'transparent';
|
|
@@ -123556,102 +123579,111 @@ class SelectionHeader {
|
|
|
123556
123579
|
}
|
|
123557
123580
|
}
|
|
123558
123581
|
|
|
123559
|
-
|
|
123560
|
-
|
|
123561
|
-
|
|
123562
|
-
|
|
123563
|
-
|
|
123564
|
-
|
|
123565
|
-
|
|
123566
|
-
|
|
123567
|
-
|
|
123568
|
-
|
|
123569
|
-
|
|
123570
|
-
|
|
123571
|
-
|
|
123572
|
-
|
|
123573
|
-
|
|
123574
|
-
|
|
123575
|
-
|
|
123576
|
-
|
|
123577
|
-
|
|
123578
|
-
|
|
123579
|
-
|
|
123580
|
-
|
|
123581
|
-
|
|
123582
|
-
|
|
123583
|
-
|
|
123584
|
-
|
|
123585
|
-
|
|
123586
|
-
|
|
123587
|
-
|
|
123588
|
-
|
|
123589
|
-
|
|
123590
|
-
|
|
123591
|
-
|
|
123592
|
-
|
|
123593
|
-
|
|
123594
|
-
|
|
123595
|
-
|
|
123596
|
-
|
|
123597
|
-
|
|
123598
|
-
|
|
123599
|
-
|
|
123600
|
-
|
|
123601
|
-
|
|
123602
|
-
|
|
123603
|
-
|
|
123604
|
-
|
|
123605
|
-
|
|
123606
|
-
|
|
123607
|
-
|
|
123608
|
-
|
|
123609
|
-
|
|
123610
|
-
|
|
123611
|
-
|
|
123612
|
-
|
|
123613
|
-
|
|
123614
|
-
|
|
123615
|
-
|
|
123616
|
-
|
|
123617
|
-
|
|
123618
|
-
|
|
123619
|
-
|
|
123620
|
-
|
|
123621
|
-
|
|
123622
|
-
|
|
123582
|
+
const gridTerms = {
|
|
123583
|
+
// for filter panel
|
|
123584
|
+
page: "Página",
|
|
123585
|
+
more: "mais",
|
|
123586
|
+
to: "para",
|
|
123587
|
+
of: "de",
|
|
123588
|
+
next: "Próximo",
|
|
123589
|
+
last: "Último",
|
|
123590
|
+
first: "Primeiro",
|
|
123591
|
+
previous: "Anterior",
|
|
123592
|
+
loadingOoo: "Carregar",
|
|
123593
|
+
// for set filter
|
|
123594
|
+
selectAll: "Selecionar tudo",
|
|
123595
|
+
searchOoo: "Procurar",
|
|
123596
|
+
blanks: "Vazio",
|
|
123597
|
+
// for number filter and text filter
|
|
123598
|
+
filterOoo: "Filtrar",
|
|
123599
|
+
applyFilter: "Aplicar filtro",
|
|
123600
|
+
// for number filter
|
|
123601
|
+
equals: "Igual",
|
|
123602
|
+
lessThan: "Menor que",
|
|
123603
|
+
greaterThan: "Maior que",
|
|
123604
|
+
// for text filter
|
|
123605
|
+
contains: "Contém",
|
|
123606
|
+
startsWith: "Começa com",
|
|
123607
|
+
endsWith: "Termina com",
|
|
123608
|
+
// the header of the default group column
|
|
123609
|
+
group: "Grupo",
|
|
123610
|
+
// tool panel
|
|
123611
|
+
columns: "Colunas",
|
|
123612
|
+
rowGroupColumns: "Colunas do grupo de linhas",
|
|
123613
|
+
rowGroupColumnsEmptyMessage: "Colunas do grupo de linhas vazias",
|
|
123614
|
+
valueColumns: "Valores das colunas",
|
|
123615
|
+
pivotMode: "Modo pivô",
|
|
123616
|
+
groups: "Grupos",
|
|
123617
|
+
values: "Valores",
|
|
123618
|
+
pivots: "Pivôs",
|
|
123619
|
+
valueColumnsEmptyMessage: "Valores de colunas vazias",
|
|
123620
|
+
pivotColumnsEmptyMessage: "Pivôs de colunas vazias",
|
|
123621
|
+
toolPanelButton: "Botão de painel de ferramentas",
|
|
123622
|
+
// other
|
|
123623
|
+
noRowsToShow: "Não há registros para mostrar.",
|
|
123624
|
+
// enterprise menu
|
|
123625
|
+
pinColumn: "Fixar coluna",
|
|
123626
|
+
valueAggregation: "Agregar valor",
|
|
123627
|
+
autosizeThiscolumn: "Redimensionar esta coluna",
|
|
123628
|
+
autosizeAllColumns: "Redimensionar todas colunas",
|
|
123629
|
+
groupBy: "Agrupar por",
|
|
123630
|
+
ungroupBy: "Desagrupar por",
|
|
123631
|
+
resetColumns: "Resetar colunas",
|
|
123632
|
+
expandAll: "Expandir tudo",
|
|
123633
|
+
collapseAll: "Contrair tudo",
|
|
123634
|
+
toolPanel: "Painel de ferramentas",
|
|
123635
|
+
export: "Exportar",
|
|
123636
|
+
csvExport: "Exportar para CSV",
|
|
123637
|
+
excelExport: "Exportar para Excel",
|
|
123638
|
+
// enterprise menu pinning
|
|
123639
|
+
pinLeft: "Fixar coluna",
|
|
123640
|
+
pinRight: "Fixar a direita",
|
|
123641
|
+
noPin: "Desfixar coluna",
|
|
123642
|
+
// enterprise menu aggregation and status panel
|
|
123643
|
+
sum: "Soma",
|
|
123644
|
+
min: "Mínimo",
|
|
123645
|
+
max: "Máximo",
|
|
123646
|
+
none: "Nenhum",
|
|
123647
|
+
count: "Contagem",
|
|
123648
|
+
average: "Média",
|
|
123649
|
+
// standard menu
|
|
123650
|
+
copy: "Copiar",
|
|
123651
|
+
copyWithHeaders: "Copiar com cabeçalho",
|
|
123652
|
+
ctrlC: "Ctrl+C",
|
|
123653
|
+
paste: "Colar",
|
|
123654
|
+
ctrlV: "Ctrl+V"
|
|
123655
|
+
};
|
|
123656
|
+
|
|
123657
|
+
class AgGridController {
|
|
123658
|
+
configFilterColumn(filterColumn) {
|
|
123659
|
+
this._filterColumn = filterColumn;
|
|
123660
|
+
this._filterColumn.addEventListener('applyFilterColumnOptions', this.handleFilteredColumnsChanged.bind(this));
|
|
123623
123661
|
}
|
|
123624
|
-
|
|
123625
|
-
|
|
123662
|
+
handleFilteredColumnsChanged(event) {
|
|
123663
|
+
const applied = event.detail;
|
|
123664
|
+
this._filteredColumns.set(applied.field, applied.values);
|
|
123665
|
+
this._gridOptions.api.refreshHeader();
|
|
123666
|
+
this._dataUnit.loadData();
|
|
123626
123667
|
}
|
|
123627
|
-
|
|
123628
|
-
|
|
123629
|
-
|
|
123630
|
-
}
|
|
123631
|
-
if (this.onSortClickListener) {
|
|
123632
|
-
this.headerContainer.removeEventListener('click', this.onSortClickListener);
|
|
123633
|
-
}
|
|
123634
|
-
if (this.onFilterButtonClickListener) {
|
|
123635
|
-
this.filterButton.removeEventListener('click', this.onFilterButtonClickListener);
|
|
123636
|
-
}
|
|
123637
|
-
this.params.column.removeEventListener('sortChanged', this.onSortChangedListener);
|
|
123668
|
+
showFilterColumn(configs) {
|
|
123669
|
+
var _a;
|
|
123670
|
+
(_a = this._filterColumn) === null || _a === void 0 ? void 0 : _a.show(configs);
|
|
123638
123671
|
}
|
|
123639
|
-
}
|
|
123640
|
-
|
|
123641
|
-
class AgGridController {
|
|
123642
123672
|
constructor(enterprise) {
|
|
123643
123673
|
this.DEFAULT_ROW_HEIGHT = 30;
|
|
123644
123674
|
this.DEFAULT_HEADER_ROW_HEIGHT = 32;
|
|
123645
|
-
this.CHECK_BOX_COL_ID =
|
|
123646
|
-
this.STATUS_COL_ID =
|
|
123647
|
-
this.RECORD_ARCHIVE_COL_ID =
|
|
123675
|
+
this.CHECK_BOX_COL_ID = 'checkBoxColumn';
|
|
123676
|
+
this.STATUS_COL_ID = 'statusColumn';
|
|
123677
|
+
this.RECORD_ARCHIVE_COL_ID = '__RECORD_ARCHIVE__';
|
|
123648
123678
|
this.BLOCK_LOAD_DEBOUNCE = 400;
|
|
123649
123679
|
this.DEFAULT_FONT_SIZE = 14;
|
|
123650
123680
|
this.DEFAULT_ICON_SIZE = 12;
|
|
123651
123681
|
this.DEFAULT_MAX_SIZE = 200;
|
|
123652
123682
|
this._menuItems = [];
|
|
123653
|
-
this._idAttribName =
|
|
123683
|
+
this._idAttribName = '__record__id__';
|
|
123654
123684
|
this._gridConfig = [];
|
|
123685
|
+
this._filteredColumns = new Map();
|
|
123686
|
+
this._filterColumnleftPosition = '0px';
|
|
123655
123687
|
this._enterprise = enterprise;
|
|
123656
123688
|
}
|
|
123657
123689
|
getGridConfig() {
|
|
@@ -123659,23 +123691,59 @@ class AgGridController {
|
|
|
123659
123691
|
}
|
|
123660
123692
|
getSort() {
|
|
123661
123693
|
const sortedColumns = [];
|
|
123662
|
-
this._gridOptions.columnApi
|
|
123694
|
+
this._gridOptions.columnApi
|
|
123695
|
+
.getColumnState()
|
|
123663
123696
|
.sort((colA, colB) => colA.sortIndex - colB.sortIndex)
|
|
123664
123697
|
.forEach(({ colId, sort }) => {
|
|
123665
123698
|
if (sort) {
|
|
123666
123699
|
const field = this._dataUnit.getField(colId);
|
|
123667
|
-
const mode = sort ===
|
|
123700
|
+
const mode = sort === 'asc' ? SortMode.ASC : SortMode.DESC;
|
|
123668
123701
|
const sortField = field ? { field: field.name, dataType: field.dataType, mode } : { field: colId, dataType: DataType.TEXT, mode };
|
|
123669
123702
|
sortedColumns.push(sortField);
|
|
123670
123703
|
}
|
|
123671
123704
|
});
|
|
123672
123705
|
return sortedColumns;
|
|
123673
123706
|
}
|
|
123674
|
-
|
|
123707
|
+
getFilter() {
|
|
123708
|
+
if (!this._filteredColumns || this._filteredColumns.size === 0) {
|
|
123709
|
+
return;
|
|
123710
|
+
}
|
|
123711
|
+
return Array.from(this._filteredColumns.entries())
|
|
123712
|
+
.map(([column, items]) => {
|
|
123713
|
+
var _a;
|
|
123714
|
+
const checkedOptions = items.filter(option => option.check);
|
|
123715
|
+
if (checkedOptions.length > 0) {
|
|
123716
|
+
const fieldDescriptor = this._dataUnit.getField(column);
|
|
123717
|
+
const dataType = (_a = fieldDescriptor === null || fieldDescriptor === void 0 ? void 0 : fieldDescriptor.dataType) !== null && _a !== void 0 ? _a : DataType.TEXT;
|
|
123718
|
+
let placeholders = '';
|
|
123719
|
+
const params = [];
|
|
123720
|
+
checkedOptions.forEach(option => {
|
|
123721
|
+
if (placeholders.length > 0) {
|
|
123722
|
+
placeholders = placeholders + ',';
|
|
123723
|
+
}
|
|
123724
|
+
const paramName = `PARAM_${column}_${params.length + 1}`;
|
|
123725
|
+
placeholders = `${placeholders}:${paramName}`; //FIXME: trocar por ? quando o backend estiver funcionando
|
|
123726
|
+
params.push({
|
|
123727
|
+
dataType: dataType === DataType.OBJECT ? DataType.TEXT : dataType,
|
|
123728
|
+
name: paramName,
|
|
123729
|
+
value: option.value,
|
|
123730
|
+
});
|
|
123731
|
+
});
|
|
123732
|
+
const columnExpression = dataType === DataType.DATE ? `onlydate(this.${column})` : `this.${column}`;
|
|
123733
|
+
return {
|
|
123734
|
+
name: `${DISTINCT_FILTER_NAME_PREFIX}${column}`,
|
|
123735
|
+
expression: `${columnExpression} in (${placeholders})`,
|
|
123736
|
+
params,
|
|
123737
|
+
};
|
|
123738
|
+
}
|
|
123739
|
+
return undefined;
|
|
123740
|
+
})
|
|
123741
|
+
.filter(item => item != undefined);
|
|
123742
|
+
}
|
|
123675
123743
|
initDatagrid(container, options) {
|
|
123676
123744
|
var _a;
|
|
123677
123745
|
if (this._grid === undefined) {
|
|
123678
|
-
LicenseManager.setLicenseKey(ApplicationContext.getContextValue(
|
|
123746
|
+
LicenseManager.setLicenseKey(ApplicationContext.getContextValue('__EZUI__GRID_LICENSE__'));
|
|
123679
123747
|
this._columnStateChangeCallback = options.onColumnStateChange;
|
|
123680
123748
|
this._selectionChangeCallback = options.onSelectionChange;
|
|
123681
123749
|
this._doubleClickCallBack = options.onDoubleClick;
|
|
@@ -123684,28 +123752,30 @@ class AgGridController {
|
|
|
123684
123752
|
this._statusResolver = options.statusResolver;
|
|
123685
123753
|
if (this._dataUnit) {
|
|
123686
123754
|
this._dataUnit.sortingProvider = this;
|
|
123755
|
+
this._dataUnit.addFilterProvider(this);
|
|
123687
123756
|
}
|
|
123688
123757
|
this._gridOptions = {
|
|
123689
123758
|
localeText: gridTerms,
|
|
123690
|
-
rowSelection: this._multipleSelection ?
|
|
123759
|
+
rowSelection: this._multipleSelection ? 'multiple' : 'single',
|
|
123691
123760
|
sortingOrder: ['desc', 'asc', null],
|
|
123692
123761
|
blockLoadDebounceMillis: this.BLOCK_LOAD_DEBOUNCE,
|
|
123693
123762
|
navigateToNextCell: this.navigateToNextCell.bind(this),
|
|
123694
|
-
getRowNodeId: this._dataUnit ?
|
|
123763
|
+
getRowNodeId: this._dataUnit ? params => (typeof params === 'string' ? params : params[this._idAttribName]) : undefined,
|
|
123695
123764
|
getMainMenuItems: (params) => this.buildMenuItemOptions(params),
|
|
123765
|
+
postProcessPopup: (params) => this.setFilterColumnLeftPosition(params),
|
|
123696
123766
|
getRowHeight: this.getRowHeight.bind(this),
|
|
123697
123767
|
defaultColDef: {
|
|
123698
|
-
headerClass:
|
|
123699
|
-
cellClass:
|
|
123768
|
+
headerClass: 'ez-grid__cell-header',
|
|
123769
|
+
cellClass: 'ez-grid__cell-body',
|
|
123700
123770
|
},
|
|
123701
123771
|
components: {
|
|
123702
|
-
|
|
123703
|
-
|
|
123772
|
+
ezGridHeaderComponent: SelectionHeader,
|
|
123773
|
+
ezGridCustomHeader: EzGridCustomHeader,
|
|
123704
123774
|
},
|
|
123705
123775
|
context: {
|
|
123706
123776
|
headerCheckStatusGetter: () => this.getSelectionHeaderStatus(),
|
|
123707
|
-
headerCheckStatusSetter: (selectAll) => this.updateSelectionForAll(selectAll)
|
|
123708
|
-
}
|
|
123777
|
+
headerCheckStatusSetter: (selectAll) => this.updateSelectionForAll(selectAll),
|
|
123778
|
+
},
|
|
123709
123779
|
};
|
|
123710
123780
|
this.defineRowModelType(this._gridOptions, options);
|
|
123711
123781
|
this.setOptionsEvents(this._gridOptions);
|
|
@@ -123726,17 +123796,22 @@ class AgGridController {
|
|
|
123726
123796
|
this._gridOptions.api.setHeaderHeight(this.getHeaderRowHeight());
|
|
123727
123797
|
}
|
|
123728
123798
|
}
|
|
123799
|
+
setFilterColumnLeftPosition(params) {
|
|
123800
|
+
if (params.type === 'columnMenu') {
|
|
123801
|
+
const ePopup = params.ePopup;
|
|
123802
|
+
const leftString = ePopup.style.left.replace('px', '');
|
|
123803
|
+
this._filterColumnleftPosition = `${calcFilterColumnLeftPosition(parseInt(leftString))}px`;
|
|
123804
|
+
return;
|
|
123805
|
+
}
|
|
123806
|
+
}
|
|
123729
123807
|
buildMenuItemOptions(params) {
|
|
123730
123808
|
const col = params.column;
|
|
123731
123809
|
const items = [];
|
|
123732
123810
|
if (col.getColDef().sortable) {
|
|
123733
123811
|
items.push(this.buildMenuItemOptionSort(params, 'asc'));
|
|
123734
123812
|
items.push(this.buildMenuItemOptionSort(params, 'desc'));
|
|
123813
|
+
items.push(this.buildMenuItemFilterColumn(params));
|
|
123735
123814
|
}
|
|
123736
|
-
/*
|
|
123737
|
-
TODO: Adicionar quando filtro de colunar estiver finalizado.
|
|
123738
|
-
items.push(this.buildMenuItemFilterColumn(params));
|
|
123739
|
-
*/
|
|
123740
123815
|
this._menuItems.forEach(m => items.push({
|
|
123741
123816
|
icon: m.icon,
|
|
123742
123817
|
name: m.label,
|
|
@@ -123747,31 +123822,31 @@ class AgGridController {
|
|
|
123747
123822
|
}
|
|
123748
123823
|
buildMenuItemOptionSort(params, sortOrder) {
|
|
123749
123824
|
return {
|
|
123750
|
-
icon: `<
|
|
123751
|
-
name: sortOrder ===
|
|
123752
|
-
action: () => this.sortDataByColumn(params, sortOrder)
|
|
123753
|
-
};
|
|
123754
|
-
}
|
|
123755
|
-
|
|
123756
|
-
|
|
123757
|
-
|
|
123758
|
-
|
|
123759
|
-
|
|
123760
|
-
|
|
123761
|
-
|
|
123762
|
-
|
|
123763
|
-
}
|
|
123825
|
+
icon: `<i class='ez-icon-arrow_downward'></i>`,
|
|
123826
|
+
name: sortOrder === 'asc' ? 'Ordenar Ascendente' : 'Ordenar Descendente',
|
|
123827
|
+
action: () => this.sortDataByColumn(params, sortOrder),
|
|
123828
|
+
};
|
|
123829
|
+
}
|
|
123830
|
+
buildMenuItemFilterColumn(params) {
|
|
123831
|
+
const columnName = params.column.getId();
|
|
123832
|
+
const columnLabel = params.column.getColDef().headerName;
|
|
123833
|
+
return {
|
|
123834
|
+
icon: `<i class='ez-icon-filter'></i>`,
|
|
123835
|
+
name: 'Filtrar',
|
|
123836
|
+
action: () => this.showFilterColumn({ columnName, columnLabel, leftPosition: this._filterColumnleftPosition, filteredOptions: this._filteredColumns.get(columnName) }),
|
|
123837
|
+
};
|
|
123838
|
+
}
|
|
123764
123839
|
buildMenuItemOptionPin(params) {
|
|
123765
123840
|
const { column, columnApi } = params;
|
|
123766
123841
|
const isPinned = params.column.isPinned();
|
|
123767
123842
|
return {
|
|
123768
123843
|
icon: `<i class='ez-icon-${isPinned ? 'un-pin' : 'push-pin'}'></i>`,
|
|
123769
|
-
name: isPinned ?
|
|
123844
|
+
name: isPinned ? 'Desafixar coluna' : 'Fixar coluna',
|
|
123770
123845
|
action: () => {
|
|
123771
123846
|
columnApi.applyColumnState({
|
|
123772
123847
|
state: [{ colId: column.getColId(), pinned: column.isPinned() ? null : 'left' }],
|
|
123773
123848
|
});
|
|
123774
|
-
}
|
|
123849
|
+
},
|
|
123775
123850
|
};
|
|
123776
123851
|
}
|
|
123777
123852
|
sortDataByColumn(params, order) {
|
|
@@ -123823,9 +123898,9 @@ class AgGridController {
|
|
|
123823
123898
|
(_h = this._dataUnit) === null || _h === void 0 ? void 0 : _h.nextRecord();
|
|
123824
123899
|
}
|
|
123825
123900
|
return params.nextCellPosition;
|
|
123826
|
-
case
|
|
123827
|
-
case
|
|
123828
|
-
if (((_j = params.nextCellPosition) === null || _j === void 0 ? void 0 : _j.column.colDef.headerName) !==
|
|
123901
|
+
case 'ArrowLeft':
|
|
123902
|
+
case 'ArrowRight':
|
|
123903
|
+
if (((_j = params.nextCellPosition) === null || _j === void 0 ? void 0 : _j.column.colDef.headerName) !== '') {
|
|
123829
123904
|
return params.nextCellPosition;
|
|
123830
123905
|
}
|
|
123831
123906
|
else {
|
|
@@ -123836,21 +123911,21 @@ class AgGridController {
|
|
|
123836
123911
|
}
|
|
123837
123912
|
defineRowModelType(opt, sourceOptions) {
|
|
123838
123913
|
if (this._dataUnit != undefined) {
|
|
123839
|
-
opt.rowModelType =
|
|
123914
|
+
opt.rowModelType = 'serverSide';
|
|
123840
123915
|
opt.serverSideDatasource = new DataSource(this._dataUnit, this, sourceOptions);
|
|
123841
123916
|
opt.serverSideSortOnServer = true;
|
|
123842
123917
|
opt.columnDefs = this._colDefs;
|
|
123843
123918
|
}
|
|
123844
123919
|
}
|
|
123845
123920
|
setOptionsEvents(opt) {
|
|
123846
|
-
opt.onSortChanged = e => this.onCallStateChange(
|
|
123847
|
-
opt.onColumnResized = e => this.onCallStateChange(
|
|
123848
|
-
opt.onColumnPinned = e => this.onCallStateChange(
|
|
123849
|
-
opt.onColumnMoved = e => this.onCallStateChange(
|
|
123850
|
-
opt.onColumnVisible = e => this.onCallStateChange(
|
|
123921
|
+
opt.onSortChanged = e => this.onCallStateChange('sort', e);
|
|
123922
|
+
opt.onColumnResized = e => this.onCallStateChange('columnResize', e);
|
|
123923
|
+
opt.onColumnPinned = e => this.onCallStateChange('columnPinned', e);
|
|
123924
|
+
opt.onColumnMoved = e => this.onCallStateChange('columnMoved', e);
|
|
123925
|
+
opt.onColumnVisible = e => this.onCallStateChange('visibleChange', e);
|
|
123851
123926
|
opt.onSelectionChanged = e => this.onSelectionChange(e);
|
|
123852
123927
|
opt.onRowDoubleClicked = evt => this.onRowDoubleClick(evt);
|
|
123853
|
-
opt.onDragStopped = evt => this.onCallStateChange(
|
|
123928
|
+
opt.onDragStopped = evt => this.onCallStateChange('columnMovedEnd', evt);
|
|
123854
123929
|
}
|
|
123855
123930
|
setOptionsSupress(opt) {
|
|
123856
123931
|
opt.suppressDragLeaveHidesColumns = true;
|
|
@@ -123884,18 +123959,18 @@ class AgGridController {
|
|
|
123884
123959
|
}
|
|
123885
123960
|
setData(data) {
|
|
123886
123961
|
if (this._grid === undefined) {
|
|
123887
|
-
throw new Error(
|
|
123962
|
+
throw new Error('Erro interno: Grid ainda não inicializado.');
|
|
123888
123963
|
}
|
|
123889
123964
|
this._gridOptions.api.setRowData(data);
|
|
123890
123965
|
}
|
|
123891
123966
|
addRows() {
|
|
123892
123967
|
if (this._grid === undefined) {
|
|
123893
|
-
throw new Error(
|
|
123968
|
+
throw new Error('Erro interno: Grid ainda não inicializado.');
|
|
123894
123969
|
}
|
|
123895
123970
|
}
|
|
123896
123971
|
updateRows() {
|
|
123897
123972
|
if (this._grid === undefined) {
|
|
123898
|
-
throw new Error(
|
|
123973
|
+
throw new Error('Erro interno: Grid ainda não inicializado.');
|
|
123899
123974
|
}
|
|
123900
123975
|
}
|
|
123901
123976
|
selectAll(quietly = false) {
|
|
@@ -123918,7 +123993,7 @@ class AgGridController {
|
|
|
123918
123993
|
try {
|
|
123919
123994
|
this._gridOptions.context.selectionChangeQuietly = quietly;
|
|
123920
123995
|
if (this._grid === undefined) {
|
|
123921
|
-
throw new Error(
|
|
123996
|
+
throw new Error('Erro interno: Grid ainda não inicializado.');
|
|
123922
123997
|
}
|
|
123923
123998
|
let lastSelected;
|
|
123924
123999
|
this._gridOptions.api.forEachNode(node => {
|
|
@@ -123950,13 +124025,13 @@ class AgGridController {
|
|
|
123950
124025
|
}
|
|
123951
124026
|
removeRows() {
|
|
123952
124027
|
if (this._grid === undefined) {
|
|
123953
|
-
throw new Error(
|
|
124028
|
+
throw new Error('Erro interno: Grid ainda não inicializado.');
|
|
123954
124029
|
}
|
|
123955
124030
|
this._gridOptions.api.refreshServerSide({ purge: true });
|
|
123956
124031
|
}
|
|
123957
124032
|
changeValues(changes, rowIds) {
|
|
123958
124033
|
if (this._grid === undefined) {
|
|
123959
|
-
throw new Error(
|
|
124034
|
+
throw new Error('Erro interno: Grid ainda não inicializado.');
|
|
123960
124035
|
}
|
|
123961
124036
|
if (changes) {
|
|
123962
124037
|
let rowNodes;
|
|
@@ -123983,7 +124058,7 @@ class AgGridController {
|
|
|
123983
124058
|
}
|
|
123984
124059
|
refresh() {
|
|
123985
124060
|
if (this._grid === undefined) {
|
|
123986
|
-
throw new Error(
|
|
124061
|
+
throw new Error('Erro interno: Grid ainda não inicializado.');
|
|
123987
124062
|
}
|
|
123988
124063
|
this._gridOptions.api.refreshServerSide({ purge: false });
|
|
123989
124064
|
}
|
|
@@ -124001,17 +124076,19 @@ class AgGridController {
|
|
|
124001
124076
|
}
|
|
124002
124077
|
setFocusOnRow(rowIndex) {
|
|
124003
124078
|
let displayedColumns = this._gridOptions.columnApi.getAllDisplayedColumns();
|
|
124004
|
-
let firstCell = displayedColumns.find(
|
|
124079
|
+
let firstCell = displayedColumns.find(column => column.getColDef().headerName !== '');
|
|
124005
124080
|
this._gridOptions.api.ensureColumnVisible(firstCell);
|
|
124006
124081
|
this._gridOptions.api.ensureIndexVisible(rowIndex);
|
|
124007
124082
|
this._gridOptions.api.setFocusedCell(rowIndex, firstCell);
|
|
124008
124083
|
}
|
|
124009
124084
|
setColumnsDef(cols) {
|
|
124010
|
-
const newColDefs = [
|
|
124085
|
+
const newColDefs = [
|
|
124086
|
+
Object.assign({ colId: this.CHECK_BOX_COL_ID, headerName: '', checkboxSelection: true, width: 29, suppressMovable: true, suppressAutoSize: true, suppressMenu: true, lockPosition: true, pinned: true }, (this._multipleSelection && { headerComponent: 'ezGridHeaderComponent', headerClass: 'ag-column-select-header' })),
|
|
124087
|
+
];
|
|
124011
124088
|
if (this._statusResolver != undefined) {
|
|
124012
124089
|
newColDefs.push({
|
|
124013
124090
|
colId: this.STATUS_COL_ID,
|
|
124014
|
-
headerName:
|
|
124091
|
+
headerName: '',
|
|
124015
124092
|
checkboxSelection: false,
|
|
124016
124093
|
headerCheckboxSelection: false,
|
|
124017
124094
|
width: 29,
|
|
@@ -124022,11 +124099,11 @@ class AgGridController {
|
|
|
124022
124099
|
pinned: true,
|
|
124023
124100
|
cellRenderer: CellRendererStatus,
|
|
124024
124101
|
cellRendererParams: {
|
|
124025
|
-
statusResolver: this._statusResolver
|
|
124102
|
+
statusResolver: this._statusResolver,
|
|
124026
124103
|
},
|
|
124027
124104
|
cellStyle: {
|
|
124028
|
-
|
|
124029
|
-
}
|
|
124105
|
+
'text-align': 'center',
|
|
124106
|
+
},
|
|
124030
124107
|
});
|
|
124031
124108
|
}
|
|
124032
124109
|
cols.forEach(c => {
|
|
@@ -124039,25 +124116,27 @@ class AgGridController {
|
|
|
124039
124116
|
}
|
|
124040
124117
|
getColumnsDef() {
|
|
124041
124118
|
if (this._grid === undefined) {
|
|
124042
|
-
throw new Error(
|
|
124119
|
+
throw new Error('Erro interno: Grid ainda não inicializado.');
|
|
124043
124120
|
}
|
|
124044
124121
|
const colDef = this._gridOptions.columnApi.getColumns();
|
|
124045
|
-
return colDef
|
|
124122
|
+
return colDef
|
|
124123
|
+
.filter(c => ![this.CHECK_BOX_COL_ID, this.STATUS_COL_ID].includes(c.getColId()))
|
|
124124
|
+
.map(c => {
|
|
124046
124125
|
const def = c.getColDef();
|
|
124047
124126
|
const colDef = { name: def.field, label: def.headerName };
|
|
124048
|
-
this.conditionalSet(colDef,
|
|
124049
|
-
this.conditionalSet(colDef,
|
|
124050
|
-
this.conditionalSet(colDef,
|
|
124051
|
-
this.conditionalSet(colDef,
|
|
124052
|
-
this.conditionalSet(colDef,
|
|
124053
|
-
this.conditionalSet(colDef,
|
|
124054
|
-
this.conditionalSet(colDef,
|
|
124127
|
+
this.conditionalSet(colDef, 'sortable', def.sortable);
|
|
124128
|
+
this.conditionalSet(colDef, 'resizable', def.resizable);
|
|
124129
|
+
this.conditionalSet(colDef, 'sort', def.sort);
|
|
124130
|
+
this.conditionalSet(colDef, 'sortIndex', def.sortIndex);
|
|
124131
|
+
this.conditionalSet(colDef, 'width', def.width);
|
|
124132
|
+
this.conditionalSet(colDef, 'pinned', def.pinned !== null);
|
|
124133
|
+
this.conditionalSet(colDef, 'hidden', def.hide);
|
|
124055
124134
|
return colDef;
|
|
124056
124135
|
});
|
|
124057
124136
|
}
|
|
124058
124137
|
setColumnsState(state) {
|
|
124059
124138
|
if (this._grid === undefined) {
|
|
124060
|
-
throw new Error(
|
|
124139
|
+
throw new Error('Erro interno: Grid ainda não inicializado.');
|
|
124061
124140
|
}
|
|
124062
124141
|
const colDef = this._gridOptions.columnApi.getColumns();
|
|
124063
124142
|
let columns = this.getColumnsDef();
|
|
@@ -124086,24 +124165,26 @@ class AgGridController {
|
|
|
124086
124165
|
}
|
|
124087
124166
|
getColumnsState() {
|
|
124088
124167
|
if (this._grid === undefined) {
|
|
124089
|
-
throw new Error(
|
|
124168
|
+
throw new Error('Erro interno: Grid ainda não inicializado.');
|
|
124090
124169
|
}
|
|
124091
124170
|
const colState = this._gridOptions.columnApi.getColumnState();
|
|
124092
|
-
return colState
|
|
124171
|
+
return colState
|
|
124172
|
+
.map(s => {
|
|
124093
124173
|
const def = this._gridOptions.columnApi.getColumn(s.colId).getColDef();
|
|
124094
124174
|
const label = def.headerName;
|
|
124095
|
-
const name = def.checkboxSelection ?
|
|
124175
|
+
const name = def.checkboxSelection ? '__SELECTION__' : s.colId;
|
|
124096
124176
|
const colState = { label, name };
|
|
124097
|
-
this.conditionalSet(colState,
|
|
124098
|
-
this.conditionalSet(colState,
|
|
124099
|
-
this.conditionalSet(colState,
|
|
124100
|
-
this.conditionalSet(colState,
|
|
124101
|
-
this.conditionalSet(colState,
|
|
124177
|
+
this.conditionalSet(colState, 'sort', s.sort);
|
|
124178
|
+
this.conditionalSet(colState, 'sortIndex', s.sortIndex);
|
|
124179
|
+
this.conditionalSet(colState, 'width', s.width);
|
|
124180
|
+
this.conditionalSet(colState, 'pinned', s.pinned !== null);
|
|
124181
|
+
this.conditionalSet(colState, 'hidden', s.hide);
|
|
124102
124182
|
const props = new Map();
|
|
124103
124183
|
props.set('sortable', def.sortable);
|
|
124104
|
-
this.conditionalSet(colState,
|
|
124184
|
+
this.conditionalSet(colState, 'props', props);
|
|
124105
124185
|
return colState;
|
|
124106
|
-
})
|
|
124186
|
+
})
|
|
124187
|
+
.filter(c => c.name !== '__SELECTION__' && c.name !== this.STATUS_COL_ID);
|
|
124107
124188
|
}
|
|
124108
124189
|
getSelection() {
|
|
124109
124190
|
return this._gridOptions.api.getSelectedRows();
|
|
@@ -124121,7 +124202,7 @@ class AgGridController {
|
|
|
124121
124202
|
fields: this._gridOptions.columnApi
|
|
124122
124203
|
.getColumns()
|
|
124123
124204
|
.filter(col => col.isVisible() && ![this.CHECK_BOX_COL_ID, this.STATUS_COL_ID, this.RECORD_ARCHIVE_COL_ID].includes(col.getColId()))
|
|
124124
|
-
.map(col => col.getColId())
|
|
124205
|
+
.map(col => col.getColId()),
|
|
124125
124206
|
};
|
|
124126
124207
|
this._dataSource.quickFilter = quickFilter;
|
|
124127
124208
|
}
|
|
@@ -124133,23 +124214,20 @@ class AgGridController {
|
|
|
124133
124214
|
var _a;
|
|
124134
124215
|
(_a = this._gridOptions.api.getDisplayedRowAtIndex(index)) === null || _a === void 0 ? void 0 : _a.setSelected(true);
|
|
124135
124216
|
}
|
|
124136
|
-
hasFilterColumn(
|
|
124137
|
-
|
|
124138
|
-
|
|
124139
|
-
|
|
124140
|
-
/*
|
|
124141
|
-
TODO: Implementar chamada para apresentar filtro de coluna na grid
|
|
124142
|
-
*/
|
|
124217
|
+
hasFilterColumn(columnName) {
|
|
124218
|
+
var _a;
|
|
124219
|
+
const filterOptions = (_a = this._filteredColumns.get(columnName)) !== null && _a !== void 0 ? _a : [];
|
|
124220
|
+
return filterOptions.map(item => item.check).includes(true);
|
|
124143
124221
|
}
|
|
124144
124222
|
buildColDef(source) {
|
|
124145
124223
|
var _a, _b, _c;
|
|
124146
124224
|
let tooltip = undefined;
|
|
124147
|
-
const propSortable = StringUtils$1.getBooleanValue((_a = source.props) === null || _a === void 0 ? void 0 : _a.get(
|
|
124148
|
-
if ((_b = source.props) === null || _b === void 0 ? void 0 : _b.get(
|
|
124149
|
-
tooltip = (_c = source.props) === null || _c === void 0 ? void 0 : _c.get(
|
|
124225
|
+
const propSortable = StringUtils$1.getBooleanValue((_a = source.props) === null || _a === void 0 ? void 0 : _a.get('gridSortable'), true);
|
|
124226
|
+
if ((_b = source.props) === null || _b === void 0 ? void 0 : _b.get('gridHeaderTooltip')) {
|
|
124227
|
+
tooltip = (_c = source.props) === null || _c === void 0 ? void 0 : _c.get('gridHeaderTooltip');
|
|
124150
124228
|
}
|
|
124151
124229
|
else if (propSortable === false) {
|
|
124152
|
-
tooltip =
|
|
124230
|
+
tooltip = 'Coluna não pode ser ordenada';
|
|
124153
124231
|
}
|
|
124154
124232
|
return {
|
|
124155
124233
|
headerName: source.label,
|
|
@@ -124159,18 +124237,19 @@ class AgGridController {
|
|
|
124159
124237
|
headerComponent: 'ezGridCustomHeader',
|
|
124160
124238
|
headerComponentParams: {
|
|
124161
124239
|
tooltip: tooltip,
|
|
124240
|
+
isSortable: propSortable,
|
|
124162
124241
|
hasFilter: () => this.hasFilterColumn(source.name),
|
|
124163
|
-
showColumnFilter: () => this.
|
|
124242
|
+
showColumnFilter: (leftPosition) => this.showFilterColumn({ columnName: source.name, columnLabel: source.label, leftPosition, filteredOptions: this._filteredColumns.get(source.name) }),
|
|
124164
124243
|
},
|
|
124165
124244
|
valueFormatter: params => {
|
|
124166
124245
|
return this.getFormatterByColumn(params, source);
|
|
124167
124246
|
},
|
|
124168
|
-
cellStyle: this.getStyleByColumn(source)
|
|
124247
|
+
cellStyle: this.getStyleByColumn(source),
|
|
124169
124248
|
};
|
|
124170
124249
|
}
|
|
124171
124250
|
getInitCellStyle() {
|
|
124172
124251
|
return {
|
|
124173
|
-
|
|
124252
|
+
'line-height': this.getRowHeight() - 1 + 'px',
|
|
124174
124253
|
};
|
|
124175
124254
|
}
|
|
124176
124255
|
getStyleByColumn(source) {
|
|
@@ -124178,32 +124257,34 @@ class AgGridController {
|
|
|
124178
124257
|
switch (source === null || source === void 0 ? void 0 : source.userInterface) {
|
|
124179
124258
|
case UserInterface.DECIMALNUMBER:
|
|
124180
124259
|
case UserInterface.INTEGERNUMBER:
|
|
124181
|
-
cellStyle[
|
|
124260
|
+
cellStyle['text-align'] = 'right';
|
|
124182
124261
|
break;
|
|
124183
124262
|
case UserInterface.DATE:
|
|
124184
124263
|
case UserInterface.DATETIME:
|
|
124185
124264
|
case UserInterface.TIME:
|
|
124186
|
-
cellStyle[
|
|
124265
|
+
cellStyle['text-align'] = 'center';
|
|
124187
124266
|
break;
|
|
124188
124267
|
default:
|
|
124189
|
-
cellStyle[
|
|
124268
|
+
cellStyle['text-align'] = 'left';
|
|
124190
124269
|
}
|
|
124191
124270
|
return cellStyle;
|
|
124192
124271
|
}
|
|
124193
124272
|
getFormatterByColumn(params, source) {
|
|
124194
124273
|
var _a;
|
|
124195
|
-
if ((source === null || source === void 0 ? void 0 : source.userInterface) ===
|
|
124274
|
+
if ((source === null || source === void 0 ? void 0 : source.userInterface) === 'OPTIONSELECTOR' && source.options) {
|
|
124196
124275
|
const prop = source === null || source === void 0 ? void 0 : source.options;
|
|
124197
124276
|
let options;
|
|
124198
|
-
if (typeof prop ===
|
|
124277
|
+
if (typeof prop === 'string') {
|
|
124199
124278
|
const parsed = JSON.parse(prop);
|
|
124200
|
-
options = Object.keys(parsed).map(key => {
|
|
124279
|
+
options = Object.keys(parsed).map(key => {
|
|
124280
|
+
return { value: key, label: parsed[key] };
|
|
124281
|
+
});
|
|
124201
124282
|
}
|
|
124202
124283
|
else {
|
|
124203
124284
|
options = prop;
|
|
124204
124285
|
}
|
|
124205
124286
|
let optionSelected;
|
|
124206
|
-
options.forEach(
|
|
124287
|
+
options.forEach(option => {
|
|
124207
124288
|
if (option.value == params.value) {
|
|
124208
124289
|
optionSelected = option;
|
|
124209
124290
|
}
|
|
@@ -124211,16 +124292,16 @@ class AgGridController {
|
|
|
124211
124292
|
return optionSelected === null || optionSelected === void 0 ? void 0 : optionSelected.label;
|
|
124212
124293
|
}
|
|
124213
124294
|
if ((source === null || source === void 0 ? void 0 : source.userInterface) === UserInterface.SWITCH) {
|
|
124214
|
-
if ((params === null || params === void 0 ? void 0 : params.value) ===
|
|
124215
|
-
return
|
|
124295
|
+
if ((params === null || params === void 0 ? void 0 : params.value) === 'S' || (params === null || params === void 0 ? void 0 : params.value) === true || (params === null || params === void 0 ? void 0 : params.value) === 'true') {
|
|
124296
|
+
return 'Sim';
|
|
124216
124297
|
}
|
|
124217
|
-
else if ((params === null || params === void 0 ? void 0 : params.value) ===
|
|
124218
|
-
return
|
|
124298
|
+
else if ((params === null || params === void 0 ? void 0 : params.value) === 'N' || (params === null || params === void 0 ? void 0 : params.value) === false || (params === null || params === void 0 ? void 0 : params.value) === 'false') {
|
|
124299
|
+
return 'Não';
|
|
124219
124300
|
}
|
|
124220
124301
|
}
|
|
124221
124302
|
if ((source === null || source === void 0 ? void 0 : source.userInterface) === UserInterface.SEARCH) {
|
|
124222
124303
|
if (((_a = params === null || params === void 0 ? void 0 : params.value) === null || _a === void 0 ? void 0 : _a.value) != undefined) {
|
|
124223
|
-
return params.value.value +
|
|
124304
|
+
return params.value.value + ' - ' + params.value.label;
|
|
124224
124305
|
}
|
|
124225
124306
|
else {
|
|
124226
124307
|
return params === null || params === void 0 ? void 0 : params.value;
|
|
@@ -124228,7 +124309,7 @@ class AgGridController {
|
|
|
124228
124309
|
}
|
|
124229
124310
|
if ((source === null || source === void 0 ? void 0 : source.userInterface) === UserInterface.DECIMALNUMBER) {
|
|
124230
124311
|
if (params.value != undefined) {
|
|
124231
|
-
const precision = Number(source.props.get(
|
|
124312
|
+
const precision = Number(source.props.get('precision')) || 2;
|
|
124232
124313
|
return NumberUtils$1.format(params.value.toString(), precision, precision);
|
|
124233
124314
|
}
|
|
124234
124315
|
}
|
|
@@ -124239,7 +124320,7 @@ class AgGridController {
|
|
|
124239
124320
|
}
|
|
124240
124321
|
}
|
|
124241
124322
|
onCallStateChange(type, e) {
|
|
124242
|
-
const finished = !(
|
|
124323
|
+
const finished = !('finished' in e) || e['finished'];
|
|
124243
124324
|
if (finished && this._columnStateChangeCallback) {
|
|
124244
124325
|
let info = {};
|
|
124245
124326
|
let isUserChange = this.isUIEvent(e['source'], e['type']);
|
|
@@ -124252,10 +124333,10 @@ class AgGridController {
|
|
|
124252
124333
|
}
|
|
124253
124334
|
}
|
|
124254
124335
|
isElementResize(e) {
|
|
124255
|
-
return e[
|
|
124336
|
+
return e['target'] && e['target'].getAttribute('ref') === 'eResize';
|
|
124256
124337
|
}
|
|
124257
124338
|
isUIEvent(source, type) {
|
|
124258
|
-
let optionsArr = [
|
|
124339
|
+
let optionsArr = ['uiColumnMoved', 'uiColumnResized', 'uiColumnDragged', 'uiColumnExpanded', 'uiColumnSorted'];
|
|
124259
124340
|
if (type === 'dragStopped') {
|
|
124260
124341
|
return true;
|
|
124261
124342
|
}
|
|
@@ -124273,14 +124354,14 @@ class AgGridController {
|
|
|
124273
124354
|
const selectionInfo = this._dataUnit;
|
|
124274
124355
|
this._selectionChangeCallback({
|
|
124275
124356
|
selection: selectionInfo.records,
|
|
124276
|
-
selectionHeaderStatus: this.getSelectionHeaderStatus()
|
|
124357
|
+
selectionHeaderStatus: this.getSelectionHeaderStatus(),
|
|
124277
124358
|
});
|
|
124278
124359
|
}
|
|
124279
124360
|
else {
|
|
124280
124361
|
this._dataUnit.updatePageSelection(this._gridOptions.api.getSelectedRows().map((r) => r.__record__id__)).then(selectionInfo => {
|
|
124281
124362
|
this._selectionChangeCallback({
|
|
124282
124363
|
selection: selectionInfo.records,
|
|
124283
|
-
selectionHeaderStatus: this.getSelectionHeaderStatus()
|
|
124364
|
+
selectionHeaderStatus: this.getSelectionHeaderStatus(),
|
|
124284
124365
|
});
|
|
124285
124366
|
});
|
|
124286
124367
|
}
|
|
@@ -124288,7 +124369,7 @@ class AgGridController {
|
|
|
124288
124369
|
else {
|
|
124289
124370
|
this._selectionChangeCallback({
|
|
124290
124371
|
selection: this._gridOptions.api.getSelectedRows(),
|
|
124291
|
-
selectionHeaderStatus: this.getSelectionHeaderStatus()
|
|
124372
|
+
selectionHeaderStatus: this.getSelectionHeaderStatus(),
|
|
124292
124373
|
});
|
|
124293
124374
|
}
|
|
124294
124375
|
}, 0);
|
|
@@ -124316,7 +124397,7 @@ class AgGridController {
|
|
|
124316
124397
|
if ((field === null || field === void 0 ? void 0 : field.userInterface) === UserInterface.SEARCH) {
|
|
124317
124398
|
return this.DEFAULT_MAX_SIZE;
|
|
124318
124399
|
}
|
|
124319
|
-
const labelSize = (((
|
|
124400
|
+
const labelSize = (((_b = field === null || field === void 0 ? void 0 : field.label) === null || _b === void 0 ? void 0 : _b.length) || 0) * this.DEFAULT_FONT_SIZE + this.DEFAULT_ICON_SIZE;
|
|
124320
124401
|
return labelSize > this.DEFAULT_MAX_SIZE ? this.DEFAULT_MAX_SIZE : labelSize;
|
|
124321
124402
|
}
|
|
124322
124403
|
}
|
|
@@ -124349,8 +124430,9 @@ function getElementID(sufix) {
|
|
|
124349
124430
|
};
|
|
124350
124431
|
}
|
|
124351
124432
|
|
|
124352
|
-
const ezGridCss = ".sc-ez-grid-h{display:grid;grid-template-rows:auto 1fr auto;height:100%;width:100%;--ez-grid__header--background-color:var(--background--xlight, #FFF);--ez-grid__selection-counter--z-index:var(--more-visible, 2);--ez-grid__container--shadow:0 0 16px 0 rgb(0 38 111 / 12%)}[no-header].sc-ez-grid-h{grid-template-rows:1fr auto}.grid-header.sc-ez-grid{display:
|
|
124433
|
+
const ezGridCss = ".sc-ez-grid-h{display:grid;grid-template-rows:auto 1fr auto;height:100%;width:100%;--ez-grid__header--background-color:var(--background--xlight, #FFF);--ez-grid__selection-counter--z-index:var(--more-visible, 2);--ez-grid__container--shadow:0 0 16px 0 rgb(0 38 111 / 12%)}[no-header].sc-ez-grid-h{grid-template-rows:1fr auto}.grid-header.sc-ez-grid{display:grid;justify-content:space-between;align-items:center;grid-template-columns:1fr;background-color:var(--ez-grid__header--background-color, #FFF);z-index:var(--visible)}.grid__container.sc-ez-grid{padding-top:15px;margin-top:-12px;box-shadow:var(--ez-grid__container--shadow);background-color:var(--ez-grid__header--background-color)}.grid-header__popover.sc-ez-grid{position:relative;top:var(--space--sm, 16px)}.grid-header__container.sc-ez-grid{display:flex;align-items:center}.grid-header__position.sc-ez-grid{display:flex;align-items:center;justify-content:space-between}.grid__selection-counter.sc-ez-grid{position:fixed;white-space:nowrap;transform:translate(-50%, 0px);left:50%;opacity:0;bottom:-100%;transition:opacity 0.1s, bottom 0.5s;z-index:var(--ez-grid__selection-counter--z-index)}.grid__selection-counter--opened.sc-ez-grid{opacity:1;bottom:0px}.grid__btn-close.sc-ez-grid{display:flex;align-items:center;justify-content:center;padding:0;outline:none;width:20px;height:20px;border:none;background-color:unset;cursor:pointer}.grid__btn-clear.sc-ez-grid{--ez-button--link-color:var(--color--alert-warning-900, #8C6B00);--ez-button--link--hover-color:var(--color--alert-warning-900, #8C6B00)}[no-header].sc-ez-grid-h .grid-header.sc-ez-grid{display:none}";
|
|
124353
124434
|
|
|
124435
|
+
const windowInstace$1 = window;
|
|
124354
124436
|
const EzGrid$1 = class extends HTMLElement$1 {
|
|
124355
124437
|
constructor() {
|
|
124356
124438
|
super();
|
|
@@ -124361,6 +124443,8 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
124361
124443
|
this.configChange = createEvent(this, "configChange", 7);
|
|
124362
124444
|
this.componentReady = createEvent(this, "componentReady", 7);
|
|
124363
124445
|
this._gridController = new AgGridController(false);
|
|
124446
|
+
this.timeFadeOutInMs = 3000;
|
|
124447
|
+
this.toastMessageToUpdateFilterColumn = 'Filtro de coluna aplicado com sucesso!';
|
|
124364
124448
|
this._paginationInfo = undefined;
|
|
124365
124449
|
this._paginationChangedByKeyboard = true;
|
|
124366
124450
|
this._showSelectionCounter = false;
|
|
@@ -124372,6 +124456,7 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
124372
124456
|
this.serverUrl = undefined;
|
|
124373
124457
|
this.dataUnit = undefined;
|
|
124374
124458
|
this.statusResolver = undefined;
|
|
124459
|
+
this.columnfilterDataSource = undefined;
|
|
124375
124460
|
}
|
|
124376
124461
|
/**
|
|
124377
124462
|
* Aplica a definição de colunas.
|
|
@@ -124458,7 +124543,7 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
124458
124543
|
newConfigColumn['width'] = columnState.width;
|
|
124459
124544
|
}
|
|
124460
124545
|
if (columnState.sort) {
|
|
124461
|
-
newConfigColumn['ascending'] =
|
|
124546
|
+
newConfigColumn['ascending'] = columnState.sort.toUpperCase() === 'ASC';
|
|
124462
124547
|
newConfigColumn['orderIndex'] = columnState.sortIndex;
|
|
124463
124548
|
}
|
|
124464
124549
|
else {
|
|
@@ -124482,23 +124567,23 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
124482
124567
|
return;
|
|
124483
124568
|
}
|
|
124484
124569
|
const limitBottom = boundingContainer.bottom - 30;
|
|
124485
|
-
this._gridSelectionCounter.style.bottom =
|
|
124570
|
+
this._gridSelectionCounter.style.bottom = document.body.clientHeight - limitBottom + 'px';
|
|
124486
124571
|
}
|
|
124487
124572
|
else {
|
|
124488
|
-
this._gridSelectionCounter.style.bottom =
|
|
124573
|
+
this._gridSelectionCounter.style.bottom = '';
|
|
124489
124574
|
}
|
|
124490
124575
|
}
|
|
124491
124576
|
setEvents() {
|
|
124492
|
-
window.removeEventListener(
|
|
124493
|
-
window.addEventListener(
|
|
124577
|
+
window.removeEventListener('scroll', this.positionSelectionCounter.bind(this));
|
|
124578
|
+
window.addEventListener('scroll', this.positionSelectionCounter.bind(this));
|
|
124494
124579
|
}
|
|
124495
124580
|
resizeSelectionCounter() {
|
|
124496
124581
|
if (this._gridSelectionCounter == undefined) {
|
|
124497
124582
|
return;
|
|
124498
124583
|
}
|
|
124499
|
-
this._gridSelectionCounter.style.width =
|
|
124584
|
+
this._gridSelectionCounter.style.width = '';
|
|
124500
124585
|
if (this._gridSelectionCounter.clientHeight > 42) {
|
|
124501
|
-
this._gridSelectionCounter.style.width =
|
|
124586
|
+
this._gridSelectionCounter.style.width = 'min-content';
|
|
124502
124587
|
}
|
|
124503
124588
|
this.positionSelectionCounter();
|
|
124504
124589
|
}
|
|
@@ -124557,8 +124642,8 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
124557
124642
|
buildDataElementId() {
|
|
124558
124643
|
const dataInfo = { dataUnit: this.dataUnit };
|
|
124559
124644
|
ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
124560
|
-
const dtInfo = { id:
|
|
124561
|
-
ElementIDUtils.addIDInfo(this._refPaginationControl,
|
|
124645
|
+
const dtInfo = { id: 'ezGrid' };
|
|
124646
|
+
ElementIDUtils.addIDInfo(this._refPaginationControl, 'pagination', dtInfo);
|
|
124562
124647
|
}
|
|
124563
124648
|
previousPage() {
|
|
124564
124649
|
if (this.dataUnit) {
|
|
@@ -124578,7 +124663,7 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
124578
124663
|
return [
|
|
124579
124664
|
h("div", { class: "ez-text ez-text--primary ez-text--medium ez-margin-right--medium" }, h("strong", { class: "ez-text ez-text--primary ez-text--medium" }, `${firstRecord}-${lastRecord}`), ` de ${total}`),
|
|
124580
124665
|
h("ez-button", { size: "small", iconName: "chevron-left", class: "ez-margin-right--medium", mode: "icon", enabled: currentPage > 0, onClick: () => this.previousPage(), label: "P\u00E1gina anterior" }),
|
|
124581
|
-
h("ez-button", { size: "small", iconName: "chevron-right", class: "ez-margin-right--medium", mode: "icon", enabled: hasMore, onClick: () => this.nextPage(), label: "Pr\u00F3xima P\u00E1gina" })
|
|
124666
|
+
h("ez-button", { size: "small", iconName: "chevron-right", class: "ez-margin-right--medium", mode: "icon", enabled: hasMore, onClick: () => this.nextPage(), label: "Pr\u00F3xima P\u00E1gina" }),
|
|
124582
124667
|
];
|
|
124583
124668
|
}
|
|
124584
124669
|
return null;
|
|
@@ -124604,7 +124689,7 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
124604
124689
|
allowMultipleSelection: this.multipleSelection,
|
|
124605
124690
|
serverURL: this.serverUrl,
|
|
124606
124691
|
dataUnit: this.dataUnit,
|
|
124607
|
-
statusResolver: this.statusResolver
|
|
124692
|
+
statusResolver: this.statusResolver,
|
|
124608
124693
|
});
|
|
124609
124694
|
if (this.config) {
|
|
124610
124695
|
this.observeConfig(this.config);
|
|
@@ -124612,15 +124697,21 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
124612
124697
|
this.buildDataElementId();
|
|
124613
124698
|
this.setEvents();
|
|
124614
124699
|
this.componentReady.emit();
|
|
124700
|
+
this._gridController.configFilterColumn(this._filterColumn);
|
|
124615
124701
|
}
|
|
124616
124702
|
componentWillRender() {
|
|
124617
124703
|
this.configSelectionCounter();
|
|
124618
124704
|
}
|
|
124705
|
+
componentDidRender() {
|
|
124706
|
+
windowInstace$1.addEventListener('onSubmitFilter', () => {
|
|
124707
|
+
this.toastElementRef.show(this.toastMessageToUpdateFilterColumn, this.timeFadeOutInMs, true, true);
|
|
124708
|
+
});
|
|
124709
|
+
}
|
|
124619
124710
|
render() {
|
|
124620
124711
|
var _a;
|
|
124621
|
-
return (h(Host, null, h("div", { class: "ez-box ez-box--shadow ez-padding--medium grid-header" }, h("div", { class: "grid-header__container" }, h("slot", { name: "leftButtons" })), h("div", { class: "grid-header__container", ref: ref => this._refPaginationControl = ref }, this.getPaginationControl())), h("div", { ref: (ref) => this._gridSelectionCounter = ref, class: `grid__selection-counter
|
|
124622
|
-
${this._showSelectionCounter ?
|
|
124623
|
-
` }, h(SelectionCounter, { selectionCount: this._selectionCount, currentPageSelected: this._currentPageSelected, hasPagination: !!this._paginationInfo, total: (_a = this._paginationInfo) === null || _a === void 0 ? void 0 : _a.total, allRecordSelected: this._isAllSelection, onSelectAll: () => this.onSelectAllRecords(), onSelectPage: () => this.onSelectPageRecords(), onClearAll: () => this.onClearSelectedRecords(), onClose: () => this._showSelectionCounter = false })), h("div", { class: "grid__container ez-grid", ref: elem => this._container = elem }), h("div", { class: "grid__footer" }, h("slot", { name: "footer" }))));
|
|
124712
|
+
return (h(Host, null, h("div", { class: "ez-box ez-box--shadow ez-padding--medium grid-header" }, h("filter-column", { class: "grid-header__popover", dataSource: this.columnfilterDataSource, dataUnit: this.dataUnit, ref: (element) => (this._filterColumn = element) }), h("div", { class: "grid-header__position" }, h("div", { class: "grid-header__container" }, h("slot", { name: "leftButtons" })), h("div", { class: "grid-header__container", ref: ref => (this._refPaginationControl = ref) }, this.getPaginationControl()))), h("div", { ref: (ref) => (this._gridSelectionCounter = ref), class: `grid__selection-counter
|
|
124713
|
+
${this._showSelectionCounter ? 'grid__selection-counter--opened' : ''}
|
|
124714
|
+
` }, h(SelectionCounter, { selectionCount: this._selectionCount, currentPageSelected: this._currentPageSelected, hasPagination: !!this._paginationInfo, total: (_a = this._paginationInfo) === null || _a === void 0 ? void 0 : _a.total, allRecordSelected: this._isAllSelection, onSelectAll: () => this.onSelectAllRecords(), onSelectPage: () => this.onSelectPageRecords(), onClearAll: () => this.onClearSelectedRecords(), onClose: () => (this._showSelectionCounter = false) })), h("div", { class: "grid__container ez-grid", ref: elem => (this._container = elem) }), h("div", { class: "grid__footer" }, h("slot", { name: "footer" })), h("ez-toast", { ref: (element) => (this.toastElementRef = element) }, h("ez-icon", { slot: "icon", iconName: "check" }))));
|
|
124624
124715
|
}
|
|
124625
124716
|
static get assetsDirs() { return ["../assets"]; }
|
|
124626
124717
|
get _element() { return this; }
|
|
@@ -124764,7 +124855,7 @@ const EzIcon$1 = class extends HTMLElement$1 {
|
|
|
124764
124855
|
static get style() { return ezIconCss; }
|
|
124765
124856
|
};
|
|
124766
124857
|
|
|
124767
|
-
const ezListCss = ":host{--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:var(--border--small, 1px solid);--ez-list__item--border-color:var(--title--primary, #2b3a54);--ez-list__item--font-family:var(--font-pattern, \"Roboto\");--ez-list__item--font-size:var(--text--medium, 14px);--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{margin:0}.draggable{width:100%;display:grid;grid-template-columns:minmax(0px, auto) minmax(0px, auto);place-items:center;border-top:1px dashed #fff;justify-content:space-between;font-family:var(--ez-list__item--font-family);font-size:var(--ez-list__item--font-size)}.dragging{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{cursor:pointer;padding-right:var(--ez-list__selectable--padding-right);padding-left:var(--ez-list__selectable--padding-left)}.selectable-container{margin:0px !important}.hover-feedback:hover{background-color:var(--background--medium);border-radius:var(--border--radius-regular)}.item-content{display:flex;overflow:hidden;justify-content:flex-start;align-items:center;width:100%}.draggable-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 li{display:flex;height:32px;margin:var(--ez-list__item--margin);font-family:var(--ez-list__item--font-family);font-size:var(--ez-list__item--font-size);color:var(--ez-list__item--color)}.over{border-top:1px dashed var(--ez-list__over--border--color)}.last-droppable-space{height:var(--ez-list__last-droppable-space--height)}.draggable-selected{background-color:var(--background--strong) !important}.draggable-selected div:hover{background-color:var(--background--strong) !important}.draggable-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::-webkit-scrollbar-track{background-color:var(--ez-list__scrollbar--color-background);border-radius:var(--ez-list__scrollbar--border-radius)}.draggable-list::-webkit-scrollbar-thumb{background-color:var(--ez-list__scrollbar--color-default);border-radius:var(--ez-list__scrollbar--border-radius)}.draggable-list::-webkit-scrollbar-thumb:vertical:hover,.draggable-list::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-list__scrollbar--color-hover)}.draggable-list::-webkit-scrollbar-thumb:vertical:active,.draggable-list::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-list__scrollbar--color-clicked)}.draggable-icon{align-items:flex-start;display:flex;outline:none;border:none;background-color:unset}.draggable-icon::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)}*{box-sizing:border-box}.checkbox{width:fit-content}.text--ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.group-container{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{-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{display:flex;flex-direction:column}.group-container::-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::-webkit-scrollbar-track{background-color:var(--ez-list__scrollbar--color-background);border-radius:var(--ez-list__scrollbar--border-radius)}.group-container::-webkit-scrollbar-thumb{background-color:var(--ez-list__scrollbar--color-default);border-radius:var(--ez-list__scrollbar--border-radius)}.group-container::-webkit-scrollbar-thumb:vertical:hover,.group-container::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-list__scrollbar--color-hover)}.group-container::-webkit-scrollbar-thumb:vertical:active,.group-container::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-list__scrollbar--color-clicked)}.section-container{display:flex;position:relative;height:100%}.items-container{width:100%;max-height:100%;
|
|
124858
|
+
const ezListCss = ":host{--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:var(--border--small, 1px solid);--ez-list__item--border-color:var(--title--primary, #2b3a54);--ez-list__item--font-family:var(--font-pattern, \"Roboto\");--ez-list__item--font-size:var(--text--medium, 14px);--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{margin:0}.draggable{width:100%;display:grid;grid-template-columns:minmax(0px, auto) minmax(0px, auto);place-items:center;border-top:1px dashed #fff;justify-content:space-between;font-family:var(--ez-list__item--font-family);font-size:var(--ez-list__item--font-size)}.dragging{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{cursor:pointer;padding-right:var(--ez-list__selectable--padding-right);padding-left:var(--ez-list__selectable--padding-left)}.selectable-container{margin:0px !important}.hover-feedback:hover{background-color:var(--background--medium);border-radius:var(--border--radius-regular)}.item-content{display:flex;overflow:hidden;justify-content:flex-start;align-items:center;width:100%}.draggable-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 li{display:flex;height:32px;margin:var(--ez-list__item--margin);font-family:var(--ez-list__item--font-family);font-size:var(--ez-list__item--font-size);color:var(--ez-list__item--color)}.over{border-top:1px dashed var(--ez-list__over--border--color)}.last-droppable-space{height:var(--ez-list__last-droppable-space--height)}.draggable-selected{background-color:var(--background--strong) !important}.draggable-selected div:hover{background-color:var(--background--strong) !important}.draggable-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::-webkit-scrollbar-track{background-color:var(--ez-list__scrollbar--color-background);border-radius:var(--ez-list__scrollbar--border-radius)}.draggable-list::-webkit-scrollbar-thumb{background-color:var(--ez-list__scrollbar--color-default);border-radius:var(--ez-list__scrollbar--border-radius)}.draggable-list::-webkit-scrollbar-thumb:vertical:hover,.draggable-list::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-list__scrollbar--color-hover)}.draggable-list::-webkit-scrollbar-thumb:vertical:active,.draggable-list::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-list__scrollbar--color-clicked)}.draggable-icon{align-items:flex-start;display:flex;outline:none;border:none;background-color:unset}.draggable-icon::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)}*{box-sizing:border-box}.checkbox{width:fit-content}.text--ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.group-container{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{-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{display:flex;flex-direction:column}.group-container::-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::-webkit-scrollbar-track{background-color:var(--ez-list__scrollbar--color-background);border-radius:var(--ez-list__scrollbar--border-radius)}.group-container::-webkit-scrollbar-thumb{background-color:var(--ez-list__scrollbar--color-default);border-radius:var(--ez-list__scrollbar--border-radius)}.group-container::-webkit-scrollbar-thumb:vertical:hover,.group-container::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-list__scrollbar--color-hover)}.group-container::-webkit-scrollbar-thumb:vertical:active,.group-container::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-list__scrollbar--color-clicked)}.section-container{display:flex;position:relative;height:100%}.items-container{width:100%;max-height:100%;outline:none;scrollbar-width:thin;scrollbar-color:var(--ez-list__scrollbar--color-clicked) var(--ez-list__scrollbar--color-background)}.group-items-container{width:100%;max-height:100%;height:100%;outline:none}.items-container::-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::-webkit-scrollbar-track{background-color:var(--ez-list__scrollbar--color-background);border-radius:var(--ez-list__scrollbar--border-radius)}.items-container::-webkit-scrollbar-thumb{background-color:var(--ez-list__scrollbar--color-default);border-radius:var(--ez-list__scrollbar--border-radius)}.items-container::-webkit-scrollbar-thumb:vertical:hover,.items-container::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-list__scrollbar--color-hover)}.items-container::-webkit-scrollbar-thumb:vertical:active,.items-container::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-list__scrollbar--color-clicked)}.group-overlay{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{min-height:100px}.overlay-text{position:absolute;top:50%;left:50%;font-size:50px;color:white;transform:translate(-50%, -50%);-ms-transform:translate(-50%, -50%)}.selected-item{background:var(--ez-list__selected-item--background-color);border-radius:var(--ez-list__selected-item--border-radius)}.slot-item{align-items:flex-end}.overGroup{background:rgba(226, 244, 239, 0.8);border:1px solid #008561;box-sizing:border-box;border-radius:8px;padding-top:6px}";
|
|
124768
124859
|
|
|
124769
124860
|
const EzList$1 = class extends HTMLElement$1 {
|
|
124770
124861
|
constructor() {
|
|
@@ -124778,7 +124869,7 @@ const EzList$1 = class extends HTMLElement$1 {
|
|
|
124778
124869
|
this._listItems = [];
|
|
124779
124870
|
this._listGroupItems = [];
|
|
124780
124871
|
this.dataSource = [];
|
|
124781
|
-
this.listMode =
|
|
124872
|
+
this.listMode = 'regular';
|
|
124782
124873
|
this.useGroups = false;
|
|
124783
124874
|
this.ezDraggable = false;
|
|
124784
124875
|
this.ezSelectable = false;
|
|
@@ -124796,10 +124887,10 @@ const EzList$1 = class extends HTMLElement$1 {
|
|
|
124796
124887
|
*/
|
|
124797
124888
|
async scrollToTop() {
|
|
124798
124889
|
if (this.useGroups) {
|
|
124799
|
-
this._element.shadowRoot.querySelector(
|
|
124890
|
+
this._element.shadowRoot.querySelector('.group-container').scrollTop = 0;
|
|
124800
124891
|
}
|
|
124801
124892
|
else {
|
|
124802
|
-
this._element.shadowRoot.querySelector(
|
|
124893
|
+
this._element.shadowRoot.querySelector('.items-container').scrollTop = 0;
|
|
124803
124894
|
}
|
|
124804
124895
|
}
|
|
124805
124896
|
/**
|
|
@@ -124835,9 +124926,9 @@ const EzList$1 = class extends HTMLElement$1 {
|
|
|
124835
124926
|
this._listItems = newList;
|
|
124836
124927
|
}
|
|
124837
124928
|
if (scrollToOption) {
|
|
124838
|
-
let liElem = this.useGroups
|
|
124839
|
-
this._groupContainer.querySelector(
|
|
124840
|
-
: this._itemContainer.querySelector(
|
|
124929
|
+
let liElem = this.useGroups
|
|
124930
|
+
? this._groupContainer.querySelector('li#item_' + this.getItemId(selectedItem.label))
|
|
124931
|
+
: this._itemContainer.querySelector('li#item_' + this.getItemId(selectedItem.label));
|
|
124841
124932
|
if (liElem) {
|
|
124842
124933
|
liElem.scrollIntoView();
|
|
124843
124934
|
}
|
|
@@ -124854,7 +124945,7 @@ const EzList$1 = class extends HTMLElement$1 {
|
|
|
124854
124945
|
let selectedItem;
|
|
124855
124946
|
if (this.useGroups) {
|
|
124856
124947
|
this._listGroupItems.every(group => {
|
|
124857
|
-
let item = group.items.find(
|
|
124948
|
+
let item = group.items.find(item => item.selected == true);
|
|
124858
124949
|
if (item) {
|
|
124859
124950
|
selectedItem = item;
|
|
124860
124951
|
return false;
|
|
@@ -124863,7 +124954,7 @@ const EzList$1 = class extends HTMLElement$1 {
|
|
|
124863
124954
|
});
|
|
124864
124955
|
}
|
|
124865
124956
|
else {
|
|
124866
|
-
selectedItem = this._listItems.find(
|
|
124957
|
+
selectedItem = this._listItems.find(item => item.selected == true);
|
|
124867
124958
|
}
|
|
124868
124959
|
return selectedItem;
|
|
124869
124960
|
}
|
|
@@ -124893,7 +124984,7 @@ const EzList$1 = class extends HTMLElement$1 {
|
|
|
124893
124984
|
itemGroup.items.sort(function (a, b) {
|
|
124894
124985
|
return a.label < b.label ? -1 : a.label > b.label ? 1 : 0;
|
|
124895
124986
|
});
|
|
124896
|
-
if (itemGroup.sort ===
|
|
124987
|
+
if (itemGroup.sort === 'DSC') {
|
|
124897
124988
|
itemGroup.items.reverse();
|
|
124898
124989
|
}
|
|
124899
124990
|
}
|
|
@@ -124918,19 +125009,19 @@ const EzList$1 = class extends HTMLElement$1 {
|
|
|
124918
125009
|
}
|
|
124919
125010
|
buildIdDraggableListAndSelectable() {
|
|
124920
125011
|
const shadow = this._element.shadowRoot;
|
|
124921
|
-
const draggableList = shadow.querySelectorAll(
|
|
125012
|
+
const draggableList = shadow.querySelectorAll('.draggable-list');
|
|
124922
125013
|
draggableList === null || draggableList === void 0 ? void 0 : draggableList.forEach((draggable, index) => {
|
|
124923
125014
|
var _a, _b;
|
|
124924
|
-
let suffix =
|
|
125015
|
+
let suffix = 'draggableList';
|
|
124925
125016
|
const group = (_b = (_a = this._listGroupItems) === null || _a === void 0 ? void 0 : _a[index]) === null || _b === void 0 ? void 0 : _b.group;
|
|
124926
125017
|
if (this.useGroups && group) {
|
|
124927
125018
|
suffix = suffix.concat('_', group);
|
|
124928
125019
|
}
|
|
124929
125020
|
ElementIDUtils.addIDInfoIfNotExists(draggable, suffix);
|
|
124930
125021
|
});
|
|
124931
|
-
const selectable = shadow.querySelectorAll(
|
|
125022
|
+
const selectable = shadow.querySelectorAll('.selectable-container');
|
|
124932
125023
|
selectable === null || selectable === void 0 ? void 0 : selectable.forEach((item) => {
|
|
124933
|
-
ElementIDUtils.addIDInfoIfNotExists(item,
|
|
125024
|
+
ElementIDUtils.addIDInfoIfNotExists(item, 'selectable');
|
|
124934
125025
|
});
|
|
124935
125026
|
}
|
|
124936
125027
|
componentWillLoad() {
|
|
@@ -124957,15 +125048,17 @@ const EzList$1 = class extends HTMLElement$1 {
|
|
|
124957
125048
|
//Adiciona item arrastado
|
|
124958
125049
|
if (groupEnd.sort) {
|
|
124959
125050
|
newList.find(group => group.group == dragEndItem.groupName).items.push(this._dragStartItem.item);
|
|
124960
|
-
newList
|
|
125051
|
+
newList
|
|
125052
|
+
.find(group => group.group == dragEndItem.groupName)
|
|
125053
|
+
.items.sort(function (a, b) {
|
|
124961
125054
|
return a.label < b.label ? -1 : a.label > b.label ? 1 : 0;
|
|
124962
125055
|
});
|
|
124963
|
-
if (groupEnd.sort ===
|
|
125056
|
+
if (groupEnd.sort === 'DSC') {
|
|
124964
125057
|
newList.find(group => group.group == dragEndItem.groupName).items.reverse();
|
|
124965
125058
|
}
|
|
124966
125059
|
}
|
|
124967
125060
|
else {
|
|
124968
|
-
let indexForAdd =
|
|
125061
|
+
let indexForAdd = dragEndItem.index > this._dragStartItem.index ? dragEndItem.index - 1 : dragEndItem.index;
|
|
124969
125062
|
newList.find(group => group.group == dragEndItem.groupName).items.splice(indexForAdd, 0, this._dragStartItem.item);
|
|
124970
125063
|
}
|
|
124971
125064
|
this._listGroupItems = newList;
|
|
@@ -124994,10 +125087,12 @@ const EzList$1 = class extends HTMLElement$1 {
|
|
|
124994
125087
|
//Adiciona item arrastado
|
|
124995
125088
|
newList.find(group => group.group == groupDropped.group).items.push(this._dragStartItem.item);
|
|
124996
125089
|
if (groupEnd.sort) {
|
|
124997
|
-
newList
|
|
125090
|
+
newList
|
|
125091
|
+
.find(group => group.group == groupDropped.group)
|
|
125092
|
+
.items.sort(function (a, b) {
|
|
124998
125093
|
return a.label < b.label ? -1 : a.label > b.label ? 1 : 0;
|
|
124999
125094
|
});
|
|
125000
|
-
if (groupEnd.sort ===
|
|
125095
|
+
if (groupEnd.sort === 'DSC') {
|
|
125001
125096
|
newList.find(group => group.group == groupDropped.group).items.reverse();
|
|
125002
125097
|
}
|
|
125003
125098
|
}
|
|
@@ -125060,23 +125155,23 @@ const EzList$1 = class extends HTMLElement$1 {
|
|
|
125060
125155
|
}
|
|
125061
125156
|
}
|
|
125062
125157
|
addOverClass(element) {
|
|
125063
|
-
if ((element === null || element === void 0 ? void 0 : element.__proto__) == HTMLDivElement.prototype && element.classList.contains(
|
|
125064
|
-
element.classList.add(
|
|
125158
|
+
if ((element === null || element === void 0 ? void 0 : element.__proto__) == HTMLDivElement.prototype && element.classList.contains('draggable')) {
|
|
125159
|
+
element.classList.add('over');
|
|
125065
125160
|
}
|
|
125066
|
-
else if ((element === null || element === void 0 ? void 0 : element.parentElement) && !element.parentElement.classList.contains(
|
|
125161
|
+
else if ((element === null || element === void 0 ? void 0 : element.parentElement) && !element.parentElement.classList.contains('draggable-list')) {
|
|
125067
125162
|
this.addOverClass(element.parentElement);
|
|
125068
125163
|
}
|
|
125069
125164
|
}
|
|
125070
125165
|
addOverGroupClass(ev, group) {
|
|
125071
125166
|
if (ev.target) {
|
|
125072
|
-
let groupContainer = this._groupContainer.querySelector(
|
|
125073
|
-
let groupOverlay = groupContainer.getElementsByClassName(
|
|
125167
|
+
let groupContainer = this._groupContainer.querySelector('div#' + this.getDivGroupId(group.group));
|
|
125168
|
+
let groupOverlay = groupContainer.getElementsByClassName('group-overlay')[0];
|
|
125074
125169
|
if (group.items.length > 0) {
|
|
125075
|
-
groupOverlay.setAttribute(
|
|
125170
|
+
groupOverlay.setAttribute('style', 'display:grid');
|
|
125076
125171
|
}
|
|
125077
125172
|
else {
|
|
125078
|
-
groupOverlay.classList.add(
|
|
125079
|
-
groupOverlay.setAttribute(
|
|
125173
|
+
groupOverlay.classList.add('presetedHeight');
|
|
125174
|
+
groupOverlay.setAttribute('style', 'display:grid');
|
|
125080
125175
|
groupOverlay.scrollIntoView(false);
|
|
125081
125176
|
}
|
|
125082
125177
|
}
|
|
@@ -125086,31 +125181,31 @@ const EzList$1 = class extends HTMLElement$1 {
|
|
|
125086
125181
|
let overCollection;
|
|
125087
125182
|
let overLastDroppableCollection;
|
|
125088
125183
|
if (this.useGroups) {
|
|
125089
|
-
overCollection = (_a = this._groupContainer) === null || _a === void 0 ? void 0 : _a.getElementsByClassName(
|
|
125090
|
-
overLastDroppableCollection = this._groupContainer.getElementsByClassName(
|
|
125184
|
+
overCollection = (_a = this._groupContainer) === null || _a === void 0 ? void 0 : _a.getElementsByClassName('over');
|
|
125185
|
+
overLastDroppableCollection = this._groupContainer.getElementsByClassName('last-droppable-space');
|
|
125091
125186
|
}
|
|
125092
125187
|
else {
|
|
125093
|
-
overCollection = (_b = this._itemContainer) === null || _b === void 0 ? void 0 : _b.getElementsByClassName(
|
|
125094
|
-
overLastDroppableCollection = this._itemContainer.getElementsByClassName(
|
|
125188
|
+
overCollection = (_b = this._itemContainer) === null || _b === void 0 ? void 0 : _b.getElementsByClassName('over');
|
|
125189
|
+
overLastDroppableCollection = this._itemContainer.getElementsByClassName('last-droppable-space');
|
|
125095
125190
|
}
|
|
125096
125191
|
if (overCollection) {
|
|
125097
125192
|
Array.from(overCollection).forEach(function (element) {
|
|
125098
|
-
element.classList.remove(
|
|
125193
|
+
element.classList.remove('over');
|
|
125099
125194
|
});
|
|
125100
125195
|
}
|
|
125101
125196
|
if (overLastDroppableCollection) {
|
|
125102
125197
|
Array.from(overLastDroppableCollection).forEach(function (element) {
|
|
125103
|
-
element.classList.remove(
|
|
125198
|
+
element.classList.remove('over');
|
|
125104
125199
|
});
|
|
125105
125200
|
}
|
|
125106
125201
|
}
|
|
125107
125202
|
removeOverGroupClass(ev, group) {
|
|
125108
125203
|
if (ev.target) {
|
|
125109
|
-
let groupContainer = this._groupContainer.querySelector(
|
|
125110
|
-
let groupOverlay = groupContainer.getElementsByClassName(
|
|
125204
|
+
let groupContainer = this._groupContainer.querySelector('div#' + this.getDivGroupId(group.group));
|
|
125205
|
+
let groupOverlay = groupContainer.getElementsByClassName('group-overlay')[0];
|
|
125111
125206
|
if (groupOverlay) {
|
|
125112
|
-
groupOverlay.classList.remove(
|
|
125113
|
-
groupOverlay.setAttribute(
|
|
125207
|
+
groupOverlay.classList.remove('presetedHeight');
|
|
125208
|
+
groupOverlay.setAttribute('style', 'display:none');
|
|
125114
125209
|
}
|
|
125115
125210
|
}
|
|
125116
125211
|
}
|
|
@@ -125175,7 +125270,7 @@ const EzList$1 = class extends HTMLElement$1 {
|
|
|
125175
125270
|
let itemIndex = group.items.findIndex(item => item.label == selectedItem.label);
|
|
125176
125271
|
if (itemIndex != undefined && itemIndex != -1) {
|
|
125177
125272
|
if (itemIndex === 0) {
|
|
125178
|
-
if (
|
|
125273
|
+
if (groupIndex - 1 >= 0) {
|
|
125179
125274
|
item = { label: listGroupItems[groupIndex - 1].items[listGroupItems[groupIndex - 1].items.length - 1].label };
|
|
125180
125275
|
}
|
|
125181
125276
|
}
|
|
@@ -125203,10 +125298,10 @@ const EzList$1 = class extends HTMLElement$1 {
|
|
|
125203
125298
|
this.getSelection().then(selectedItem => {
|
|
125204
125299
|
if (selectedItem) {
|
|
125205
125300
|
switch (event.key) {
|
|
125206
|
-
case
|
|
125301
|
+
case 'ArrowDown':
|
|
125207
125302
|
this.nextOption(selectedItem);
|
|
125208
125303
|
break;
|
|
125209
|
-
case
|
|
125304
|
+
case 'ArrowUp':
|
|
125210
125305
|
this.previousOption(selectedItem);
|
|
125211
125306
|
break;
|
|
125212
125307
|
}
|
|
@@ -125219,19 +125314,19 @@ const EzList$1 = class extends HTMLElement$1 {
|
|
|
125219
125314
|
}
|
|
125220
125315
|
getItemId(itemLabel) {
|
|
125221
125316
|
if (itemLabel) {
|
|
125222
|
-
return itemLabel.replace(/[^a-z0-9_]/gi,
|
|
125317
|
+
return itemLabel.replace(/[^a-z0-9_]/gi, '_');
|
|
125223
125318
|
}
|
|
125224
125319
|
return undefined;
|
|
125225
125320
|
}
|
|
125226
125321
|
getDivGroupId(groupName) {
|
|
125227
125322
|
if (groupName) {
|
|
125228
|
-
return
|
|
125323
|
+
return 'group-' + groupName.replace(/[^a-z0-9_]/gi, '_');
|
|
125229
125324
|
}
|
|
125230
125325
|
return undefined;
|
|
125231
125326
|
}
|
|
125232
125327
|
getGroupOverlayId(groupName) {
|
|
125233
125328
|
if (groupName) {
|
|
125234
|
-
return
|
|
125329
|
+
return 'group-overlay-' + groupName.replace(/[^a-z0-9_]/gi, '_');
|
|
125235
125330
|
}
|
|
125236
125331
|
return undefined;
|
|
125237
125332
|
}
|
|
@@ -125251,26 +125346,26 @@ const EzList$1 = class extends HTMLElement$1 {
|
|
|
125251
125346
|
onDragOverLastIndex(ev) {
|
|
125252
125347
|
ev.preventDefault();
|
|
125253
125348
|
if (this._dragStartItem) {
|
|
125254
|
-
ev.target.classList.add(
|
|
125349
|
+
ev.target.classList.add('over');
|
|
125255
125350
|
ev.stopPropagation();
|
|
125256
125351
|
}
|
|
125257
125352
|
}
|
|
125258
125353
|
showOverlays(groupDragStart) {
|
|
125259
|
-
let groupOverlayCollection = this._groupContainer.getElementsByClassName(
|
|
125354
|
+
let groupOverlayCollection = this._groupContainer.getElementsByClassName('group-overlay');
|
|
125260
125355
|
Array.from(groupOverlayCollection).forEach(groupOverlay => {
|
|
125261
125356
|
let groupOverlayID = this.getGroupOverlayId(groupDragStart.group);
|
|
125262
|
-
if (groupOverlayID && groupOverlay.getAttribute(
|
|
125263
|
-
groupOverlay.classList.add(
|
|
125264
|
-
groupOverlay.setAttribute(
|
|
125357
|
+
if (groupOverlayID && groupOverlay.getAttribute('id') && groupOverlayID != groupOverlay.getAttribute('id')) {
|
|
125358
|
+
groupOverlay.classList.add('presetedHeight');
|
|
125359
|
+
groupOverlay.setAttribute('style', 'display:grid');
|
|
125265
125360
|
}
|
|
125266
125361
|
});
|
|
125267
125362
|
}
|
|
125268
125363
|
hideOverlays() {
|
|
125269
125364
|
var _a;
|
|
125270
|
-
let groupOverlayCollection = (_a = this._groupContainer) === null || _a === void 0 ? void 0 : _a.getElementsByClassName(
|
|
125365
|
+
let groupOverlayCollection = (_a = this._groupContainer) === null || _a === void 0 ? void 0 : _a.getElementsByClassName('group-overlay');
|
|
125271
125366
|
Array.from(groupOverlayCollection).forEach(groupOverlay => {
|
|
125272
|
-
groupOverlay.classList.remove(
|
|
125273
|
-
groupOverlay.setAttribute(
|
|
125367
|
+
groupOverlay.classList.remove('presetedHeight');
|
|
125368
|
+
groupOverlay.setAttribute('style', 'display:none');
|
|
125274
125369
|
});
|
|
125275
125370
|
}
|
|
125276
125371
|
getContainerItemBuilder(item, group, className) {
|
|
@@ -125281,30 +125376,39 @@ const EzList$1 = class extends HTMLElement$1 {
|
|
|
125281
125376
|
if (customContent == undefined) {
|
|
125282
125377
|
return;
|
|
125283
125378
|
}
|
|
125284
|
-
if (typeof customContent !==
|
|
125285
|
-
return
|
|
125379
|
+
if (typeof customContent !== 'string') {
|
|
125380
|
+
return h("div", { class: className }, customContent);
|
|
125286
125381
|
}
|
|
125287
|
-
return
|
|
125382
|
+
return h("div", { class: className, innerHTML: customContent });
|
|
125288
125383
|
}
|
|
125289
125384
|
render() {
|
|
125290
|
-
return (h(Host, { ref:
|
|
125291
|
-
|
|
125292
|
-
|
|
125293
|
-
|
|
125294
|
-
|
|
125295
|
-
|
|
125296
|
-
|
|
125297
|
-
|
|
125298
|
-
|
|
125299
|
-
|
|
125300
|
-
|
|
125301
|
-
|
|
125302
|
-
|
|
125303
|
-
|
|
125304
|
-
|
|
125305
|
-
|
|
125306
|
-
|
|
125307
|
-
|
|
125385
|
+
return (h(Host, { ref: el => (this._element = el) }, this.useGroups ? (h("div", { class: "group-container", ref: el => (this._groupContainer = el), tabIndex: 0, onKeyDown: event => {
|
|
125386
|
+
this.keyDownHandler(event);
|
|
125387
|
+
} }, this._listGroupItems.map(group => {
|
|
125388
|
+
return (h("div", { id: this.getDivGroupId(group.group), class: "group", key: group.group + group.items.length, onDrop: () => this.onDropGroup(group) }, h("label", { draggable: false, class: "group-name", title: group.group }, group.group), h("section", { class: "section-container", onDragOver: ev => ev.preventDefault() }, h("div", { class: "group-items-container" }, h("div", { class: "draggable-list" }, group.items.map((item, index) => (h("li", Object.assign({ id: 'item_' + this.getItemId(item.label), class: {
|
|
125389
|
+
'selectable-container': this.ezSelectable,
|
|
125390
|
+
'hover-feedback': this.hoverFeedback,
|
|
125391
|
+
}, key: 'item_' + this.getItemId(item.label) }, {
|
|
125392
|
+
[ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`ezListItem__${StringUtils$1.replaceAccentuatedChars(item.label)}`),
|
|
125393
|
+
}), h("div", { class: 'draggable' + (item.selected == true ? ' selected-item ' : '') + (this.ezSelectable == true ? ' selectable ' : ''), onClick: () => {
|
|
125394
|
+
this.setSelection(item);
|
|
125395
|
+
}, onDragLeave: () => {
|
|
125396
|
+
group.sort ? undefined : this.removeOverClass();
|
|
125397
|
+
}, onDragEnd: () => this.onDragEnd(), onDragStart: () => this.onDragStart(item, group, index), onDragOver: event => {
|
|
125398
|
+
group.sort ? undefined : this.onDragOverItem(event);
|
|
125399
|
+
}, onDrop: event => this.onDrop(event, { groupName: group.group, item: item, index: index }), draggable: this.ezDraggable }, h("div", { class: "item-content" }, this.ezDraggable ? h("span", { class: "draggable-icon" }) : undefined, this.listMode === 'regular' ? (h("p", { title: item.label, class: "person-name text--ellipsis" }, item.label)) : (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(item, group, 'slot-item') : undefined))))), h("div", { class: "last-droppable-space", onDragLeave: () => this.removeOverClass(), onDragOver: event => {
|
|
125400
|
+
this.onDragOverLastIndex(event);
|
|
125401
|
+
}, onDragEnd: () => this.onDragEnd(), onDrop: event => this.onDropLastIndex(event, group) })), group.sort ? (h("div", { id: this.getGroupOverlayId(group.group), class: "group-overlay" }, "Mover para ", group.group)) : undefined)));
|
|
125402
|
+
}))) : (h("div", { class: "items-container", ref: el => (this._itemContainer = el), tabIndex: 0, onKeyDown: event => {
|
|
125403
|
+
this.keyDownHandler(event);
|
|
125404
|
+
} }, h("div", { class: "draggable-list" }, this._listItems.map((item, index) => (h("li", Object.assign({ id: 'item_' + this.getItemId(item.label), class: {
|
|
125405
|
+
'selectable-container': this.ezSelectable,
|
|
125406
|
+
'hover-feedback': this.hoverFeedback,
|
|
125407
|
+
}, key: 'item_' + this.getItemId(item.label) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`ezListItem__${StringUtils$1.replaceAccentuatedChars(item.label)}`) }), h("div", { class: 'draggable' + (item.selected == true ? ' selected-item ' : '') + (this.ezSelectable == true ? ' selectable ' : ''), onDragStart: () => this.onDragStart({ item: item, index: index }), onClick: () => {
|
|
125408
|
+
this.setSelection(item);
|
|
125409
|
+
}, onDragLeave: () => this.removeOverClass(), onDragOver: event => this.onDragOverItem(event), onDragEnd: () => this.onDragEnd(), onDrop: event => this.onDrop(event, { item: item, index: index }), draggable: this.ezDraggable }, h("div", { class: "item-content" }, this.listMode === 'regular' ? (h(Fragment, null, this.ezDraggable ? h("span", { class: "draggable-icon" }) : undefined, h("p", { title: item.label, class: "person-name text--ellipsis" }, item.label))) : (h(Fragment, null, this.ezDraggable ? h("span", { class: "draggable-icon" }) : undefined, 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(item) : undefined)))), h("div", { class: "last-droppable-space", onDragLeave: () => this.removeOverClass(), onDragOver: event => {
|
|
125410
|
+
this.onDragOverLastIndex(event);
|
|
125411
|
+
}, onDragEnd: () => this.onDragEnd(), onDrop: event => this.onDropLastIndex(event) }))))));
|
|
125308
125412
|
}
|
|
125309
125413
|
static get style() { return ezListCss; }
|
|
125310
125414
|
};
|
|
@@ -125336,7 +125440,7 @@ const EzLoadingBar$1 = class extends HTMLElement$1 {
|
|
|
125336
125440
|
static get style() { return ezLoadingBarCss; }
|
|
125337
125441
|
};
|
|
125338
125442
|
|
|
125339
|
-
const ezModalCss = ":host{--ez-modal-z-index:var(--most-visible, 3);--ez-modal-vertical-padding:var(--space--large, 24px);--ez-modal-content-padding:24px;display:block}.modal{position:fixed;display:flex;top:0px;z-index:var(--ez-modal-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh}.modal__screen-light{background:rgba(0, 4, 12, 0.1)}.modal__screen-medium{backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.modal__vertical-padding{padding:var(--ez-modal-vertical-padding) 0}@keyframes expand-modal--left{from{transform:translate(-100%)}}@keyframes expand-modal--right{from{transform:translate(100%)}}.modal__container{display:flex;flex-wrap:wrap;height:100%;box-sizing:border-box;width:100%;align-items:flex-start}.modal__container--right{animation:expand-modal--right .2s ease-in-out 1;justify-content:flex-end}.modal__container--left{animation:expand-modal--left .2s ease-in-out 1;justify-content:flex-start}.modal__content{display:flex;flex-wrap:wrap;box-sizing:border-box;max-height:100%;height:100%;
|
|
125443
|
+
const ezModalCss = ":host{--ez-modal-z-index:var(--most-visible, 3);--ez-modal-vertical-padding:var(--space--large, 24px);--ez-modal-content-padding:24px;display:block}.modal{position:fixed;display:flex;top:0px;z-index:var(--ez-modal-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh}.modal__screen-light{background:rgba(0, 4, 12, 0.1)}.modal__screen-medium{backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.modal__vertical-padding{padding:var(--ez-modal-vertical-padding) 0}@keyframes expand-modal--left{from{transform:translate(-100%)}}@keyframes expand-modal--right{from{transform:translate(100%)}}.modal__container{display:flex;flex-wrap:wrap;height:100%;box-sizing:border-box;width:100%;align-items:flex-start}.modal__container--right{animation:expand-modal--right .2s ease-in-out 1;justify-content:flex-end}.modal__container--left{animation:expand-modal--left .2s ease-in-out 1;justify-content:flex-start}.modal__content{display:flex;flex-wrap:wrap;box-sizing:border-box;max-height:100%;height:100%;background-color:rgb(255, 255, 255);padding:var(--ez-modal-content-padding);box-shadow:rgb(0 38 111 / 12%) 0px 0px 16px 0px}.modal__content--right{border-radius:12px 0px 0px 12px}.modal__content--left{border-radius:0px 12px 12px 0px}.modal__box__container{display:flex;flex-wrap:wrap;background-color:#fff;width:100%;border-radius:12px}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
|
|
125340
125444
|
|
|
125341
125445
|
const EzModal$1 = class extends HTMLElement$1 {
|
|
125342
125446
|
constructor() {
|
|
@@ -125419,7 +125523,7 @@ var ModalButtonStatus;
|
|
|
125419
125523
|
})(ModalButtonStatus || (ModalButtonStatus = {}));
|
|
125420
125524
|
const ModalButtonStatus$1 = ModalButtonStatus;
|
|
125421
125525
|
|
|
125422
|
-
const ezModalContainerCss = ".sc-ez-modal-container-h{display:grid;grid-template-rows:0 auto 1fr auto;width:100%;height:100
|
|
125526
|
+
const ezModalContainerCss = ".sc-ez-modal-container-h{display:grid;grid-template-rows:0 auto 1fr auto;width:100%;height:100%;--ez-modal-container__content--subtract-height:154px}.ez-modal-container__header.sc-ez-modal-container{display:flex;flex-wrap:nowrap;flex-direction:row;justify-content:space-between}.ez-modal-container__content.sc-ez-modal-container{display:flex;overflow-y:auto;overflow-x:clip;height:calc(100vh - var(--ez-modal-container__content--subtract-height))}.ez-modal-container__title.sc-ez-modal-container{display:grid}.ez-modal-container__close-button.sc-ez-modal-container{cursor:pointer;background-color:transparent;border:none}.ez-modal-container__close-icon.sc-ez-modal-container{--icon--color:var(--title--primary, #2B3A54)}.ez-modal-container__focus-ctrl.sc-ez-modal-container{height:0px;width:0px;background-color:transparent;border:none}.ez-modal-container__footer.sc-ez-modal-container{padding-top:var(--space--small, 6px)}";
|
|
125423
125527
|
|
|
125424
125528
|
const EzModalContainer$1 = class extends HTMLElement$1 {
|
|
125425
125529
|
constructor() {
|
|
@@ -125455,11 +125559,185 @@ const EzModalContainer$1 = class extends HTMLElement$1 {
|
|
|
125455
125559
|
this._closeButton.focus();
|
|
125456
125560
|
}
|
|
125457
125561
|
render() {
|
|
125458
|
-
return (h(Host, null, h("button", { class: "ez-modal-container__focus-ctrl", onFocusin: () => this.focusLast() }), this.showTitleBar && h("div", { class: "ez-modal-container__header ez-margin-bottom--large ez-align--middle" }, h("div", { class: "ez-col ez-align--middle ez-modal-container__title" }, h("h2", { class: "ez-text ez-title--large ez-title--primary ez-text--bold ez-margin-vertical--extra-small" }, this.modalTitle), this.modalSubTitle ? h("div", { class: "ez-text ez-text--medium ez-text--primary ez-margin-vertical--extra-small" }, this.modalSubTitle) : undefined), h("button", { ref: ref => this._closeButton = ref, class: "ez-modal-container__close-button", onClick: () => this.ezModalAction.emit(ModalAction$1.CLOSE) }, h("ez-icon", { class: "ez-modal-container__close-icon", size: "medium", iconName: "close" }))), h("div", { class: "ez-modal-container__content" }, h("slot", null)), h("div", { class: "ez-flex ez-flex--justify-end" }, this.cancelIsVisible() ? h("ez-button", { label: this.cancelButtonLabel, enabled: this.cancelButtonStatus !== ModalButtonStatus$1.DISABLED, onClick: () => this.ezModalAction.emit(ModalAction$1.CANCEL) }) : undefined, this.okIsVisible() ? h("ez-button", { ref: ref => this._okButton = ref, label: this.okButtonLabel, enabled: this.okButtonStatus !== ModalButtonStatus$1.DISABLED, class: "ez-button--primary ez-margin-left--medium", onClick: () => this.ezModalAction.emit(ModalAction$1.OK) }) : undefined), h("button", { class: "ez-modal-container__focus-ctrl", onFocusin: () => this.focusFirst() })));
|
|
125562
|
+
return (h(Host, null, h("button", { class: "ez-modal-container__focus-ctrl", onFocusin: () => this.focusLast() }), this.showTitleBar && h("div", { class: "ez-modal-container__header ez-margin-bottom--large ez-align--middle" }, h("div", { class: "ez-col ez-align--middle ez-modal-container__title" }, h("h2", { class: "ez-text ez-title--large ez-title--primary ez-text--bold ez-margin-vertical--extra-small" }, this.modalTitle), this.modalSubTitle ? h("div", { class: "ez-text ez-text--medium ez-text--primary ez-margin-vertical--extra-small" }, this.modalSubTitle) : undefined), h("button", { ref: ref => this._closeButton = ref, class: "ez-modal-container__close-button", onClick: () => this.ezModalAction.emit(ModalAction$1.CLOSE) }, h("ez-icon", { class: "ez-modal-container__close-icon", size: "medium", iconName: "close" }))), h("div", { class: "ez-modal-container__content" }, h("slot", null)), h("div", { class: "ez-flex ez-flex--justify-end ez-modal-container__footer" }, this.cancelIsVisible() ? h("ez-button", { label: this.cancelButtonLabel, enabled: this.cancelButtonStatus !== ModalButtonStatus$1.DISABLED, onClick: () => this.ezModalAction.emit(ModalAction$1.CANCEL) }) : undefined, this.okIsVisible() ? h("ez-button", { ref: ref => this._okButton = ref, label: this.okButtonLabel, enabled: this.okButtonStatus !== ModalButtonStatus$1.DISABLED, class: "ez-button--primary ez-margin-left--medium", onClick: () => this.ezModalAction.emit(ModalAction$1.OK) }) : undefined), h("button", { class: "ez-modal-container__focus-ctrl", onFocusin: () => this.focusFirst() })));
|
|
125459
125563
|
}
|
|
125460
125564
|
static get style() { return ezModalContainerCss; }
|
|
125461
125565
|
};
|
|
125462
125566
|
|
|
125567
|
+
const ezMultiSelectionListCss = ".sc-ez-multi-selection-list-h{--ez-check--outter-gap:0px;display:block;width:304px;height:322px;max-height:calc(100vh - 350px)}.multi-selection__input.sc-ez-multi-selection-list{margin-bottom:var(--space--2xs, 8px)}.multi-selection__content-options.sc-ez-multi-selection-list{position:relative;top:-12px;left:-4px}.multi-selection__select-all.sc-ez-multi-selection-list{height:var(--space--xl);margin:0 var(--space--small, 6px)}.multi-selection__list.sc-ez-multi-selection-list{height:235px;max-height:calc(100vh - 435px);overflow-y:auto;overflow-x:clip}.multi-selection__list.sc-ez-multi-selection-list::-webkit-scrollbar{width:var(--space--small);min-width:var(--space--small);max-width:var(--space--small)}";
|
|
125568
|
+
|
|
125569
|
+
var ViewScenarios;
|
|
125570
|
+
(function (ViewScenarios) {
|
|
125571
|
+
ViewScenarios["DATASOURCE_RESULTS"] = "DATASOURCE_RESULTS";
|
|
125572
|
+
ViewScenarios["DATASOURCE_RESULTS_EMPTY"] = "DATASOURCE_RESULTS_EMPTY";
|
|
125573
|
+
ViewScenarios["DATASOURCE_INIT"] = "DATASOURCE_INIT";
|
|
125574
|
+
ViewScenarios["OPTIONS_EMPTY"] = "OPTIONS_EMPTY";
|
|
125575
|
+
ViewScenarios["OPTIONS"] = "OPTIONS";
|
|
125576
|
+
})(ViewScenarios || (ViewScenarios = {}));
|
|
125577
|
+
const EzMuiltiSelectionList = class extends HTMLElement$1 {
|
|
125578
|
+
constructor() {
|
|
125579
|
+
super();
|
|
125580
|
+
this.__registerHost();
|
|
125581
|
+
this.changeFilteredOptions = createEvent(this, "changeFilteredOptions", 7);
|
|
125582
|
+
this.columnName = undefined;
|
|
125583
|
+
this.dataSource = undefined;
|
|
125584
|
+
this.useOptions = false;
|
|
125585
|
+
this.options = undefined;
|
|
125586
|
+
this.filteredOptions = undefined;
|
|
125587
|
+
this.displayOptions = undefined;
|
|
125588
|
+
this.viewScenario = undefined;
|
|
125589
|
+
this.displayOptionToCheckAllItems = true;
|
|
125590
|
+
}
|
|
125591
|
+
async clearFilteredOptions() {
|
|
125592
|
+
this.setInitialScenario();
|
|
125593
|
+
this.filteredOptions = [];
|
|
125594
|
+
if (this.searchInput) {
|
|
125595
|
+
this.searchInput.value = '';
|
|
125596
|
+
}
|
|
125597
|
+
if (this.filterInput) {
|
|
125598
|
+
this.filterInput.value = '';
|
|
125599
|
+
}
|
|
125600
|
+
}
|
|
125601
|
+
onChangeUseOptions() {
|
|
125602
|
+
this.setInitialScenario();
|
|
125603
|
+
}
|
|
125604
|
+
onChangeOptions() {
|
|
125605
|
+
if (this.options) {
|
|
125606
|
+
this.filteredOptions = this.ordenationByCheckStateAndAlphabetically(this.options);
|
|
125607
|
+
}
|
|
125608
|
+
this.checkInput && this.changeCheckAllValeuFromFilteredOptions();
|
|
125609
|
+
this.setInitialScenario();
|
|
125610
|
+
}
|
|
125611
|
+
onChangeFilteredOptions(optionsListUpdated) {
|
|
125612
|
+
this.displayOptions = this.filteredOptions;
|
|
125613
|
+
this.displayOptionToCheckAllItems = this.filteredOptions.length > 1;
|
|
125614
|
+
this.checkInput && this.changeCheckAllValeuFromFilteredOptions();
|
|
125615
|
+
this.changeFilteredOptions.emit(optionsListUpdated);
|
|
125616
|
+
}
|
|
125617
|
+
componentDidRender() {
|
|
125618
|
+
this.changeCheckAllValeuFromFilteredOptions();
|
|
125619
|
+
}
|
|
125620
|
+
ordenationByCheckStateAndAlphabetically(filteredOptions) {
|
|
125621
|
+
const listWithSelectChecked = [];
|
|
125622
|
+
const listWithNotSelectChecked = [];
|
|
125623
|
+
filteredOptions.forEach(item => (item.check ? listWithSelectChecked.push(item) : listWithNotSelectChecked.push(item)));
|
|
125624
|
+
return [...ArrayUtils$1.sortAlphabetically(listWithSelectChecked), ...ArrayUtils$1.sortAlphabetically(listWithNotSelectChecked)];
|
|
125625
|
+
}
|
|
125626
|
+
changeCheckAllValeuFromFilteredOptions() {
|
|
125627
|
+
var _a, _b, _c, _d;
|
|
125628
|
+
const selectAll = (_a = this.filteredOptions) === null || _a === void 0 ? void 0 : _a.every(item => item.check === true);
|
|
125629
|
+
const notSelectAll = (_b = this.filteredOptions) === null || _b === void 0 ? void 0 : _b.every(item => item.check === false);
|
|
125630
|
+
const selectIndeterminated = ((_c = this.filteredOptions) === null || _c === void 0 ? void 0 : _c.some(item => item.check === false)) && ((_d = this.filteredOptions) === null || _d === void 0 ? void 0 : _d.some(item => item.check === true)) && (!selectAll || !notSelectAll);
|
|
125631
|
+
if (this.checkInput && selectAll) {
|
|
125632
|
+
this.checkInput.indeterminate = false;
|
|
125633
|
+
this.checkInput.value = true;
|
|
125634
|
+
return;
|
|
125635
|
+
}
|
|
125636
|
+
if (this.checkInput && selectIndeterminated) {
|
|
125637
|
+
this.checkInput.indeterminate = true;
|
|
125638
|
+
this.checkInput.value = false;
|
|
125639
|
+
return;
|
|
125640
|
+
}
|
|
125641
|
+
if (this.checkInput && notSelectAll) {
|
|
125642
|
+
this.checkInput.indeterminate = false;
|
|
125643
|
+
this.checkInput.value = false;
|
|
125644
|
+
return;
|
|
125645
|
+
}
|
|
125646
|
+
}
|
|
125647
|
+
setInitialScenario() {
|
|
125648
|
+
if (this.useOptions) {
|
|
125649
|
+
this.viewScenario = ViewScenarios.OPTIONS;
|
|
125650
|
+
this.changeCheckAllValeuFromFilteredOptions();
|
|
125651
|
+
return;
|
|
125652
|
+
}
|
|
125653
|
+
this.viewScenario = this.options && this.options.length > 0 ? ViewScenarios.DATASOURCE_RESULTS : ViewScenarios.DATASOURCE_INIT;
|
|
125654
|
+
}
|
|
125655
|
+
async searchWithDataSource(searchArgument, fieldName) {
|
|
125656
|
+
const { argument, mode } = searchArgument;
|
|
125657
|
+
if (mode !== 'PRELOAD') {
|
|
125658
|
+
return this.dataSource.fetchData(argument, fieldName);
|
|
125659
|
+
}
|
|
125660
|
+
}
|
|
125661
|
+
handleSearchOnDataSource(event) {
|
|
125662
|
+
var _a;
|
|
125663
|
+
const optionsToSort = (_a = this.filteredOptions) !== null && _a !== void 0 ? _a : [];
|
|
125664
|
+
if (event.detail && !optionsToSort.some(item => item.value == event.detail.value)) {
|
|
125665
|
+
this.filteredOptions = this.ordenationByCheckStateAndAlphabetically([...optionsToSort, event.detail]);
|
|
125666
|
+
}
|
|
125667
|
+
this.viewScenario = ViewScenarios.DATASOURCE_RESULTS;
|
|
125668
|
+
}
|
|
125669
|
+
handleRemoveItemFromOptions(item) {
|
|
125670
|
+
this.filteredOptions = this.ordenationByCheckStateAndAlphabetically(this.filteredOptions.filter(i => i.value !== item.value));
|
|
125671
|
+
if (this.filteredOptions.length === 0) {
|
|
125672
|
+
this.viewScenario = ViewScenarios.DATASOURCE_INIT;
|
|
125673
|
+
}
|
|
125674
|
+
if (this.searchInput) {
|
|
125675
|
+
this.searchInput.value = '';
|
|
125676
|
+
}
|
|
125677
|
+
}
|
|
125678
|
+
handleSearchOnOption(event) {
|
|
125679
|
+
if (event.detail) {
|
|
125680
|
+
this.displayOptions = ArrayUtils$1.applyStringFilter(event.detail, this.filteredOptions, true);
|
|
125681
|
+
this.viewScenario = this.displayOptions.length === 0 ? ViewScenarios.OPTIONS_EMPTY : ViewScenarios.OPTIONS;
|
|
125682
|
+
return;
|
|
125683
|
+
}
|
|
125684
|
+
this.displayOptions = this.filteredOptions;
|
|
125685
|
+
this.viewScenario = ViewScenarios.OPTIONS;
|
|
125686
|
+
}
|
|
125687
|
+
handleChangeSelectAllItems(event) {
|
|
125688
|
+
this.filteredOptions = this.ordenationByCheckStateAndAlphabetically([
|
|
125689
|
+
...this.filteredOptions.map(item => {
|
|
125690
|
+
item.check = !!event.detail;
|
|
125691
|
+
return item;
|
|
125692
|
+
}),
|
|
125693
|
+
]);
|
|
125694
|
+
}
|
|
125695
|
+
handleChangeSelectedItem(event) {
|
|
125696
|
+
const { detail: itemCheckSelected } = event;
|
|
125697
|
+
this.filteredOptions = this.filteredOptions.map(item => {
|
|
125698
|
+
if (item.label === itemCheckSelected.label) {
|
|
125699
|
+
return Object.assign(Object.assign({}, item), { check: itemCheckSelected.check });
|
|
125700
|
+
}
|
|
125701
|
+
return item;
|
|
125702
|
+
});
|
|
125703
|
+
this.clearInputs();
|
|
125704
|
+
}
|
|
125705
|
+
clearInputs() {
|
|
125706
|
+
this.filterInput ? (this.filterInput.value = '') : (this.searchInput.value = '');
|
|
125707
|
+
}
|
|
125708
|
+
buildViewList(hasDelete) {
|
|
125709
|
+
return (h(Fragment, null, this.displayOptionToCheckAllItems && (h("ez-check", { ref: (element) => (this.checkInput = element), label: "Selecionar todos", class: "multi-selection__select-all", onEzChange: this.handleChangeSelectAllItems.bind(this) })), h("ez-list", { class: "multi-selection__list", dataSource: this.displayOptions, listMode: "check", hoverFeedback: true, onEzCheckChange: this.handleChangeSelectedItem.bind(this), itemSlotBuilder: hasDelete ? this.buildDeleteIconSlot.bind(this) : null })));
|
|
125710
|
+
}
|
|
125711
|
+
buildDeleteIconSlot(item) {
|
|
125712
|
+
return h("ez-icon", { style: { cursor: 'pointer' }, iconName: "delete", onClick: () => this.handleRemoveItemFromOptions(item) });
|
|
125713
|
+
}
|
|
125714
|
+
buildInitViewWithDataSource() {
|
|
125715
|
+
return h("multi-selection-box-message", { message: "Selecione os valores a serem filtrados atrav\u00E9s do campo de busca." });
|
|
125716
|
+
}
|
|
125717
|
+
buildViewEmptyResults() {
|
|
125718
|
+
return h("multi-selection-box-message", { message: "Nenhum resultado encontrado." });
|
|
125719
|
+
}
|
|
125720
|
+
scenarioToDisplay(view) {
|
|
125721
|
+
const scenarios = {
|
|
125722
|
+
[ViewScenarios.DATASOURCE_INIT]: this.buildInitViewWithDataSource(),
|
|
125723
|
+
[ViewScenarios.DATASOURCE_RESULTS]: this.buildViewList(true),
|
|
125724
|
+
[ViewScenarios.DATASOURCE_RESULTS_EMPTY]: this.buildViewEmptyResults(),
|
|
125725
|
+
[ViewScenarios.OPTIONS_EMPTY]: this.buildViewEmptyResults(),
|
|
125726
|
+
[ViewScenarios.OPTIONS]: this.buildViewList(false),
|
|
125727
|
+
};
|
|
125728
|
+
return scenarios[view];
|
|
125729
|
+
}
|
|
125730
|
+
render() {
|
|
125731
|
+
return (h(Host, null, h("div", { class: "multi-selection" }, this.useOptions ? (h("ez-filter-input", { ref: (element) => (this.filterInput = element), label: `Buscar..`, onEzChange: this.handleSearchOnOption.bind(this) })) : (h("ez-search", { class: "multi-selection__input", label: `Buscar...`, ref: (element) => (this.searchInput = element), suppressEmptyOption: true, showOptionValue: false, showSelectedValue: false, optionLoader: (search) => this.searchWithDataSource(search, this.columnName), onEzChange: this.handleSearchOnDataSource.bind(this) })), h("ez-scroll", { class: "multi-selection__content-options" }, this.scenarioToDisplay(this.viewScenario)))));
|
|
125732
|
+
}
|
|
125733
|
+
static get watchers() { return {
|
|
125734
|
+
"useOptions": ["onChangeUseOptions"],
|
|
125735
|
+
"options": ["onChangeOptions"],
|
|
125736
|
+
"filteredOptions": ["onChangeFilteredOptions"]
|
|
125737
|
+
}; }
|
|
125738
|
+
static get style() { return ezMultiSelectionListCss; }
|
|
125739
|
+
};
|
|
125740
|
+
|
|
125463
125741
|
const ezNumberInputCss = ":host{display:block;width:100%}";
|
|
125464
125742
|
|
|
125465
125743
|
const EzNumberInput$1 = class extends HTMLElement$1 {
|
|
@@ -128191,6 +128469,121 @@ const EzViewStack$1 = class extends HTMLElement$1 {
|
|
|
128191
128469
|
static get style() { return ezViewStackCss; }
|
|
128192
128470
|
};
|
|
128193
128471
|
|
|
128472
|
+
const filterColumnCss = ".filter-column{padding:var(--space--2xs, 8px);position:relative}.filter-column__header{margin-bottom:var(--space--2xs, 8px);display:flex;flex-direction:row;align-items:center;justify-content:space-between;height:var(--space--xl, 32px)}.filter-column__footer{position:relative;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;width:100%;bottom:0;left:0;padding-top:var(--space--2xs, 8px);border-top:var(--border--medium) var(--color--disable-secondary)}.filter-column__popover{position:absolute}.filter-column__header-title{margin-left:8px}";
|
|
128473
|
+
|
|
128474
|
+
const windowInstace = window;
|
|
128475
|
+
const onSubmitFilter = new CustomEvent('onSubmitFilter', {
|
|
128476
|
+
detail: {
|
|
128477
|
+
showToast: true,
|
|
128478
|
+
},
|
|
128479
|
+
});
|
|
128480
|
+
const FilterColumn$1 = class extends HTMLElement$1 {
|
|
128481
|
+
constructor() {
|
|
128482
|
+
super();
|
|
128483
|
+
this.__registerHost();
|
|
128484
|
+
this.applyFilterColumnOptions = createEvent(this, "applyFilterColumnOptions", 7);
|
|
128485
|
+
this.TOP_POSITION = '65px';
|
|
128486
|
+
this.opened = true;
|
|
128487
|
+
this.columnName = undefined;
|
|
128488
|
+
this.columnLabel = undefined;
|
|
128489
|
+
this.dataSource = undefined;
|
|
128490
|
+
this.dataUnit = undefined;
|
|
128491
|
+
this.options = undefined;
|
|
128492
|
+
this.selectedItems = undefined;
|
|
128493
|
+
this.fieldDescriptor = undefined;
|
|
128494
|
+
this.useOptions = false;
|
|
128495
|
+
}
|
|
128496
|
+
async hide() {
|
|
128497
|
+
await this.ezPopoverElement.hide();
|
|
128498
|
+
await this.clearConfigs();
|
|
128499
|
+
}
|
|
128500
|
+
/**
|
|
128501
|
+
* Abre o filtro de coluna.
|
|
128502
|
+
* @Params IFilterColumnConfigs informações para configurar o filtro
|
|
128503
|
+
*/
|
|
128504
|
+
async show(configs) {
|
|
128505
|
+
if (this.canShow(configs)) {
|
|
128506
|
+
await this.hide();
|
|
128507
|
+
this.fieldDescriptor = this.dataUnit.getField(configs.columnName);
|
|
128508
|
+
this.setOptions(configs.filteredOptions);
|
|
128509
|
+
this.columnName = configs.columnName;
|
|
128510
|
+
this.columnLabel = configs.columnLabel;
|
|
128511
|
+
await this.ezPopoverElement.show(this.TOP_POSITION, configs.leftPosition);
|
|
128512
|
+
}
|
|
128513
|
+
}
|
|
128514
|
+
async clearConfigs() {
|
|
128515
|
+
var _a;
|
|
128516
|
+
await ((_a = this.ezMultiSelectionList) === null || _a === void 0 ? void 0 : _a.clearFilteredOptions());
|
|
128517
|
+
this.options = null;
|
|
128518
|
+
this.columnName = null;
|
|
128519
|
+
}
|
|
128520
|
+
canShow(configs) {
|
|
128521
|
+
return !this.ezPopoverElement.opened || configs.columnName !== this.columnName;
|
|
128522
|
+
}
|
|
128523
|
+
submit() {
|
|
128524
|
+
this.applyFilterColumnOptions.emit({ field: this.columnName, values: this.selectedItems });
|
|
128525
|
+
windowInstace.dispatchEvent(onSubmitFilter);
|
|
128526
|
+
this.hide();
|
|
128527
|
+
}
|
|
128528
|
+
changeSelectedItems(items) {
|
|
128529
|
+
this.selectedItems = items;
|
|
128530
|
+
}
|
|
128531
|
+
hasToUseOptions() {
|
|
128532
|
+
return this.fieldDescriptor.userInterface === UserInterface.OPTIONSELECTOR
|
|
128533
|
+
|| this.fieldDescriptor.userInterface === UserInterface.SWITCH
|
|
128534
|
+
|| this.fieldDescriptor.userInterface === UserInterface.CHECKBOX;
|
|
128535
|
+
}
|
|
128536
|
+
isCheckBoxOrSwitch() {
|
|
128537
|
+
return this.fieldDescriptor.userInterface === UserInterface.SWITCH
|
|
128538
|
+
|| this.fieldDescriptor.userInterface === UserInterface.CHECKBOX;
|
|
128539
|
+
}
|
|
128540
|
+
setOptions(selectedItems) {
|
|
128541
|
+
const validateFieldUserInterfaceOptionSelector = this.hasToUseOptions();
|
|
128542
|
+
this.useOptions = validateFieldUserInterfaceOptionSelector;
|
|
128543
|
+
this.options = validateFieldUserInterfaceOptionSelector ? this.buildOptions(selectedItems) : (selectedItems !== null && selectedItems !== void 0 ? selectedItems : null);
|
|
128544
|
+
}
|
|
128545
|
+
buildOptions(selectedItems) {
|
|
128546
|
+
var _a, _b;
|
|
128547
|
+
if (selectedItems && selectedItems.length > 0) {
|
|
128548
|
+
return selectedItems;
|
|
128549
|
+
}
|
|
128550
|
+
if (this.isCheckBoxOrSwitch()) {
|
|
128551
|
+
return [
|
|
128552
|
+
{ label: "Sim", value: "true", check: true },
|
|
128553
|
+
{ label: "Não", value: "false", check: true }
|
|
128554
|
+
];
|
|
128555
|
+
}
|
|
128556
|
+
const optionsObject = JSON.parse((_b = (_a = this.fieldDescriptor) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.options);
|
|
128557
|
+
const objectKeys = Object.keys(optionsObject);
|
|
128558
|
+
return objectKeys.map(key => {
|
|
128559
|
+
return { label: optionsObject[key], value: key, check: true };
|
|
128560
|
+
});
|
|
128561
|
+
}
|
|
128562
|
+
handleEzVisibilityChange(event) {
|
|
128563
|
+
if (event.detail === false) {
|
|
128564
|
+
this.clearConfigs();
|
|
128565
|
+
}
|
|
128566
|
+
}
|
|
128567
|
+
render() {
|
|
128568
|
+
return (h("ez-popover", { class: "filter-column__popover", "overlay-type": "none", ref: (element) => (this.ezPopoverElement = element), autoClose: true, onEzVisibilityChange: this.handleEzVisibilityChange.bind(this) }, h("section", { class: "filter-column" }, h("header", { class: "filter-column__header" }, h("span", { class: "ez-text ez-text--medium filter-column__header-title" }, "Filtro da coluna ", this.columnLabel), h("ez-button", { mode: "icon", "icon-name": "close", class: "ez-button--tertiary", onClick: () => this.hide() })), h("ez-multi-selection-list", { columnName: this.columnName, dataSource: this.dataSource, options: this.options, useOptions: this.useOptions, ref: (element) => (this.ezMultiSelectionList = element), onChangeFilteredOptions: (event) => this.changeSelectedItems(event.detail) }), h("footer", { class: "filter-column__footer" }, h("ez-button", { label: "Aplicar", class: "ez-button--primary", onClick: this.submit.bind(this) })))));
|
|
128569
|
+
}
|
|
128570
|
+
static get style() { return filterColumnCss; }
|
|
128571
|
+
};
|
|
128572
|
+
|
|
128573
|
+
const multiSelectionBoxMessageCss = ".multi-selection__message{display:flex;flex-direction:row;align-items:center;justify-content:center;width:100%;min-height:320px;text-align:center}.multi-selection__text-message{margin-top:-30px;font-family:var(--font-pattern);font-size:var(--text--meduim);padding:var(--space-xs);color:var(--text--primary)}";
|
|
128574
|
+
|
|
128575
|
+
const MultiSelectionBoxMessage$1 = class extends HTMLElement$1 {
|
|
128576
|
+
constructor() {
|
|
128577
|
+
super();
|
|
128578
|
+
this.__registerHost();
|
|
128579
|
+
this.message = undefined;
|
|
128580
|
+
}
|
|
128581
|
+
render() {
|
|
128582
|
+
return (h("div", { class: "multi-selection__message" }, h("span", { class: "multi-selection__text-message" }, this.message)));
|
|
128583
|
+
}
|
|
128584
|
+
static get style() { return multiSelectionBoxMessageCss; }
|
|
128585
|
+
};
|
|
128586
|
+
|
|
128194
128587
|
const EzActionsButton = /*@__PURE__*/proxyCustomElement(EzActionsButton$1, [1,"ez-actions-button",{"enabled":[516],"actions":[1040],"size":[513],"showLabel":[516,"show-label"],"displayIcon":[513,"display-icon"],"checkOption":[516,"check-option"],"value":[513],"isTransparent":[516,"is-transparent"],"arrowActive":[516,"arrow-active"],"_selectedAction":[32]}]);
|
|
128195
128588
|
const EzAlert = /*@__PURE__*/proxyCustomElement(EzAlert$1, [1,"ez-alert",{"alertType":[513,"alert-type"]}]);
|
|
128196
128589
|
const EzApplication = /*@__PURE__*/proxyCustomElement(EzApplication$1, [0,"ez-application"]);
|
|
@@ -128211,13 +128604,14 @@ const EzFileItem = /*@__PURE__*/proxyCustomElement(EzFileItem$1, [1,"ez-file-ite
|
|
|
128211
128604
|
const EzFilterInput = /*@__PURE__*/proxyCustomElement(EzFilterInput$1, [1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"asyncSearch":[516,"async-search"],"canShowError":[516,"can-show-error"]}]);
|
|
128212
128605
|
const EzForm = /*@__PURE__*/proxyCustomElement(EzForm$1, [2,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16]}]);
|
|
128213
128606
|
const EzFormView = /*@__PURE__*/proxyCustomElement(EzFormView$1, [2,"ez-form-view",{"fields":[16]}]);
|
|
128214
|
-
const EzGrid = /*@__PURE__*/proxyCustomElement(EzGrid$1, [6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"_paginationInfo":[32],"_paginationChangedByKeyboard":[32],"_showSelectionCounter":[32],"_isAllSelection":[32],"_currentPageSelected":[32],"_selectionCount":[32]},[[0,"ezSelectionChange","onSelectionChange"]]]);
|
|
128607
|
+
const EzGrid = /*@__PURE__*/proxyCustomElement(EzGrid$1, [6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"columnfilterDataSource":[16],"_paginationInfo":[32],"_paginationChangedByKeyboard":[32],"_showSelectionCounter":[32],"_isAllSelection":[32],"_currentPageSelected":[32],"_selectionCount":[32]},[[0,"ezSelectionChange","onSelectionChange"]]]);
|
|
128215
128608
|
const EzGuideNavigator = /*@__PURE__*/proxyCustomElement(EzGuideNavigator$1, [1,"ez-guide-navigator",{"open":[1540],"selectedId":[1537,"selected-id"],"items":[16],"tooltipResolver":[16],"filterText":[32]}]);
|
|
128216
128609
|
const EzIcon = /*@__PURE__*/proxyCustomElement(EzIcon$1, [1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]);
|
|
128217
128610
|
const EzList = /*@__PURE__*/proxyCustomElement(EzList$1, [1,"ez-list",{"dataSource":[1040],"listMode":[1,"list-mode"],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"hoverFeedback":[1028,"hover-feedback"],"_listItems":[32],"_listGroupItems":[32]}]);
|
|
128218
128611
|
const EzLoadingBar = /*@__PURE__*/proxyCustomElement(EzLoadingBar$1, [1,"ez-loading-bar",{"_showLoading":[32]}]);
|
|
128219
128612
|
const EzModal = /*@__PURE__*/proxyCustomElement(EzModal$1, [1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"heightMode":[1,"height-mode"],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"],"scrim":[1]}]);
|
|
128220
128613
|
const EzModalContainer = /*@__PURE__*/proxyCustomElement(EzModalContainer$1, [6,"ez-modal-container",{"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"showTitleBar":[4,"show-title-bar"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"cancelButtonStatus":[1,"cancel-button-status"],"okButtonStatus":[1,"ok-button-status"]}]);
|
|
128614
|
+
const EzMultiSelectionList = /*@__PURE__*/proxyCustomElement(EzMuiltiSelectionList, [2,"ez-multi-selection-list",{"columnName":[1,"column-name"],"dataSource":[16],"useOptions":[1028,"use-options"],"options":[16],"filteredOptions":[32],"displayOptions":[32],"viewScenario":[32],"displayOptionToCheckAllItems":[32]}]);
|
|
128221
128615
|
const EzNumberInput = /*@__PURE__*/proxyCustomElement(EzNumberInput$1, [1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"canShowError":[516,"can-show-error"],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513]}]);
|
|
128222
128616
|
const EzPopover = /*@__PURE__*/proxyCustomElement(EzPopover$1, [1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"overlayType":[513,"overlay-type"]}]);
|
|
128223
128617
|
const EzPopup = /*@__PURE__*/proxyCustomElement(EzPopup$1, [1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[516,"use-header"],"heightMode":[513,"height-mode"],"ezTitle":[1,"ez-title"]}]);
|
|
@@ -128235,6 +128629,8 @@ const EzToast = /*@__PURE__*/proxyCustomElement(EzToast$1, [1,"ez-toast",{"messa
|
|
|
128235
128629
|
const EzTree = /*@__PURE__*/proxyCustomElement(EzTree$1, [1,"ez-tree",{"items":[1040],"value":[1040],"selectedId":[1537,"selected-id"],"iconResolver":[16],"tooltipResolver":[16],"_tree":[32],"_waintingForLoad":[32]},[[2,"keydown","onKeyDownListener"]]]);
|
|
128236
128630
|
const EzUpload = /*@__PURE__*/proxyCustomElement(EzUpload$1, [1,"ez-upload",{"label":[1],"subtitle":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040]}]);
|
|
128237
128631
|
const EzViewStack = /*@__PURE__*/proxyCustomElement(EzViewStack$1, [0,"ez-view-stack"]);
|
|
128632
|
+
const FilterColumn = /*@__PURE__*/proxyCustomElement(FilterColumn$1, [0,"filter-column",{"opened":[4],"columnName":[1,"column-name"],"columnLabel":[1,"column-label"],"dataSource":[16],"dataUnit":[16],"options":[1040],"selectedItems":[32],"fieldDescriptor":[32],"useOptions":[32]}]);
|
|
128633
|
+
const MultiSelectionBoxMessage = /*@__PURE__*/proxyCustomElement(MultiSelectionBoxMessage$1, [0,"multi-selection-box-message",{"message":[1]}]);
|
|
128238
128634
|
const defineCustomElements = (opts) => {
|
|
128239
128635
|
if (typeof customElements !== 'undefined') {
|
|
128240
128636
|
[
|
|
@@ -128265,6 +128661,7 @@ const defineCustomElements = (opts) => {
|
|
|
128265
128661
|
EzLoadingBar,
|
|
128266
128662
|
EzModal,
|
|
128267
128663
|
EzModalContainer,
|
|
128664
|
+
EzMultiSelectionList,
|
|
128268
128665
|
EzNumberInput,
|
|
128269
128666
|
EzPopover,
|
|
128270
128667
|
EzPopup,
|
|
@@ -128281,7 +128678,9 @@ const defineCustomElements = (opts) => {
|
|
|
128281
128678
|
EzToast,
|
|
128282
128679
|
EzTree,
|
|
128283
128680
|
EzUpload,
|
|
128284
|
-
EzViewStack
|
|
128681
|
+
EzViewStack,
|
|
128682
|
+
FilterColumn,
|
|
128683
|
+
MultiSelectionBoxMessage
|
|
128285
128684
|
].forEach(cmp => {
|
|
128286
128685
|
if (!customElements.get(cmp.is)) {
|
|
128287
128686
|
customElements.define(cmp.is, cmp, opts);
|
|
@@ -128290,4 +128689,4 @@ const defineCustomElements = (opts) => {
|
|
|
128290
128689
|
}
|
|
128291
128690
|
};
|
|
128292
128691
|
|
|
128293
|
-
export { EzActionsButton, EzAlert, EzApplication, EzBadge, EzBreadcrumb, EzButton, EzCalendar, EzCardItem, EzCheck, EzChip, EzCollapsibleBox, EzComboBox, EzDateInput, EzDateTimeInput, EzDialog, EzDropdown, EzFileItem, EzFilterInput, EzForm, EzFormView, EzGrid, EzGuideNavigator, EzIcon, EzList, EzLoadingBar, EzModal, EzModalContainer, EzNumberInput, EzPopover, EzPopup, EzRadioButton, EzScroller, EzSearch, EzSidebarButton, EzSkeleton, EzTabselector, EzTextArea, EzTextEdit, EzTextInput, EzTimeInput, EzToast, EzTree, EzUpload, EzViewStack, defineCustomElements };
|
|
128692
|
+
export { EzActionsButton, EzAlert, EzApplication, EzBadge, EzBreadcrumb, EzButton, EzCalendar, EzCardItem, EzCheck, EzChip, EzCollapsibleBox, EzComboBox, EzDateInput, EzDateTimeInput, EzDialog, EzDropdown, EzFileItem, EzFilterInput, EzForm, EzFormView, EzGrid, EzGuideNavigator, EzIcon, EzList, EzLoadingBar, EzModal, EzModalContainer, EzMultiSelectionList, EzNumberInput, EzPopover, EzPopup, EzRadioButton, EzScroller, EzSearch, EzSidebarButton, EzSkeleton, EzTabselector, EzTextArea, EzTextEdit, EzTextInput, EzTimeInput, EzToast, EzTree, EzUpload, EzViewStack, FilterColumn, MultiSelectionBoxMessage, defineCustomElements };
|