@sankhyalabs/sankhyablocks 8.15.0-rc.9 → 8.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{ConfigStorage-d4c99a5e.js → ConfigStorage-942ce74b.js} +70 -7
- package/dist/cjs/{DataFetcher-99f0f6ed.js → DataFetcher-313debd8.js} +13 -5
- package/dist/cjs/{SnkFormConfigManager-3621bfc4.js → SnkFormConfigManager-f9dc0d28.js} +21 -13
- package/dist/cjs/{SnkMessageBuilder-141aa18d.js → SnkMessageBuilder-66aa2557.js} +4 -0
- package/dist/cjs/SnkMultiSelectionListDataSource-303e85d1.js +140 -0
- package/dist/cjs/{auth-fetcher-5161d082.js → auth-fetcher-54f5ff9d.js} +1 -1
- package/dist/cjs/{form-config-fetcher-9f1a13ca.js → form-config-fetcher-2dd00e5b.js} +13 -1
- package/dist/cjs/index-f9e81701.js +2 -10
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{pesquisa-fetcher-8bbee432.js → pesquisa-fetcher-213797ec.js} +273 -50
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/{snk-actions-button_2.cjs.entry.js → snk-actions-button_4.cjs.entry.js} +519 -4
- package/dist/cjs/snk-application.cjs.entry.js +13 -8
- package/dist/cjs/snk-attach.cjs.entry.js +66 -46
- package/dist/cjs/snk-configurator.cjs.entry.js +1 -1
- package/dist/cjs/snk-crud.cjs.entry.js +25 -17
- package/dist/cjs/snk-custom-slot-elements.cjs.entry.js +6 -2
- package/dist/cjs/snk-data-exporter.cjs.entry.js +5 -5
- package/dist/cjs/{snk-data-unit-6026a9f7.js → snk-data-unit-41c29713.js} +1 -1
- package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
- package/dist/cjs/snk-detail-view.cjs.entry.js +8 -9
- package/dist/cjs/snk-filter-bar.cjs.entry.js +31 -7
- package/dist/cjs/snk-filter-detail.cjs.entry.js +4 -1
- package/dist/cjs/snk-filter-item.cjs.entry.js +10 -6
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
- package/dist/cjs/snk-form-config.cjs.entry.js +8 -2
- package/dist/cjs/snk-form.cjs.entry.js +11 -4
- package/dist/cjs/snk-grid.cjs.entry.js +40 -21
- package/dist/cjs/{snk-guides-viewer-e87f01b9.js → snk-guides-viewer-4b6ecda8.js} +20 -11
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +6 -7
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
- package/dist/cjs/snk-simple-crud.cjs.entry.js +255 -21
- package/dist/cjs/snk-taskbar.cjs.entry.js +69 -8
- package/dist/collection/collection-manifest.json +6 -6
- package/dist/collection/components/snk-application/snk-application.js +42 -2
- package/dist/collection/components/snk-attach/snk-attach.js +39 -24
- package/dist/collection/components/snk-attach/structure/builder/attach-crud-config.builder.js +1 -1
- package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js +29 -22
- package/dist/collection/components/snk-configurator/snk-configurator.js +1 -1
- package/dist/collection/components/snk-crud/snk-crud.js +71 -11
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +2 -2
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +50 -7
- package/dist/collection/components/snk-custom-slot-elements/snk-custom-slot-elements.css +1 -1
- package/dist/collection/components/snk-custom-slot-elements/snk-custom-slot-elements.js +22 -1
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +2 -2
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +22 -1
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +28 -6
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +2 -1
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +44 -3
- package/dist/collection/components/snk-form/snk-form.js +25 -1
- package/dist/collection/components/{snk-form → snk-form-config}/SnkFormConfigManager.js +20 -12
- package/dist/collection/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.js +11 -5
- package/dist/collection/components/snk-grid/snk-grid.js +86 -16
- package/dist/collection/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.js +130 -123
- package/dist/collection/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.js +1 -1
- package/dist/collection/components/snk-simple-crud/regular-buttons.js +3 -0
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.css +10 -2
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +421 -17
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +86 -8
- package/dist/collection/lib/configs/ConfigStorage.js +63 -3
- package/dist/collection/lib/dataUnit/InMemoryLoader.js +9 -40
- package/dist/collection/lib/dataUnit/dataUnitInMemoryUtils.js +33 -0
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +13 -5
- package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +12 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.js +6 -3
- package/dist/collection/lib/message/resources/snk-simple-crud.msg.js +4 -0
- package/dist/collection/lib/utils/CrudUtils.js +13 -1
- package/dist/components/ConfigStorage.js +68 -5
- package/dist/components/DataFetcher.js +13 -5
- package/dist/components/SnkFormConfigManager.js +19 -11
- package/dist/components/SnkMessageBuilder.js +4 -0
- package/dist/components/dataunit-fetcher.js +41 -39
- package/dist/components/field-search.js +93 -3
- package/dist/components/form-config-fetcher.js +12 -0
- package/dist/components/index.d.ts +6 -6
- package/dist/components/snk-application2.js +9 -1
- package/dist/components/snk-attach2.js +115 -52
- package/dist/components/snk-configurator2.js +1 -1
- package/dist/components/snk-crud.js +23 -11
- package/dist/components/snk-custom-slot-elements.js +7 -3
- package/dist/components/snk-data-exporter2.js +2 -2
- package/dist/components/snk-detail-view2.js +48 -11
- package/dist/components/snk-filter-bar2.js +29 -4
- package/dist/components/snk-filter-detail2.js +5 -1
- package/dist/components/snk-filter-item2.js +11 -6
- package/dist/components/snk-form-config2.js +7 -1
- package/dist/components/snk-form.js +8 -0
- package/dist/components/snk-grid-config2.js +128 -102
- package/dist/components/snk-grid2.js +42 -18
- package/dist/components/snk-simple-crud2.js +317 -29
- package/dist/components/snk-taskbar2.js +75 -11
- package/dist/esm/{ConfigStorage-39ed8aeb.js → ConfigStorage-86187da3.js} +70 -7
- package/dist/esm/{DataFetcher-a650ae58.js → DataFetcher-c1baf61d.js} +13 -5
- package/dist/esm/{SnkFormConfigManager-692e20c7.js → SnkFormConfigManager-f53f9f87.js} +21 -13
- package/dist/esm/{SnkMessageBuilder-9747ddd2.js → SnkMessageBuilder-0a4becdd.js} +4 -0
- package/dist/esm/SnkMultiSelectionListDataSource-36918dbf.js +133 -0
- package/dist/esm/{auth-fetcher-17dc5b5e.js → auth-fetcher-039abba3.js} +1 -1
- package/dist/esm/{form-config-fetcher-f121f880.js → form-config-fetcher-30fb808f.js} +13 -1
- package/dist/esm/index-a7d3d3f1.js +2 -10
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{pesquisa-fetcher-5a8cae10.js → pesquisa-fetcher-fe6f3826.js} +262 -43
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/{snk-actions-button_2.entry.js → snk-actions-button_4.entry.js} +518 -5
- package/dist/esm/snk-application.entry.js +13 -8
- package/dist/esm/snk-attach.entry.js +65 -45
- package/dist/esm/snk-configurator.entry.js +1 -1
- package/dist/esm/snk-crud.entry.js +25 -17
- package/dist/esm/snk-custom-slot-elements.entry.js +7 -3
- package/dist/esm/snk-data-exporter.entry.js +5 -5
- package/dist/esm/{snk-data-unit-4c343635.js → snk-data-unit-de1d140d.js} +1 -1
- package/dist/esm/snk-data-unit.entry.js +2 -2
- package/dist/esm/snk-detail-view.entry.js +8 -9
- package/dist/esm/snk-filter-bar.entry.js +31 -7
- package/dist/esm/snk-filter-detail.entry.js +4 -1
- package/dist/esm/snk-filter-item.entry.js +10 -6
- package/dist/esm/snk-filter-modal-item.entry.js +3 -3
- package/dist/esm/snk-form-config.entry.js +9 -3
- package/dist/esm/snk-form.entry.js +11 -4
- package/dist/esm/snk-grid.entry.js +41 -22
- package/dist/esm/{snk-guides-viewer-ba8ce538.js → snk-guides-viewer-113be3fd.js} +20 -11
- package/dist/esm/snk-guides-viewer.entry.js +6 -7
- package/dist/esm/snk-personalized-filter.entry.js +3 -3
- package/dist/esm/snk-simple-crud.entry.js +256 -22
- package/dist/esm/snk-taskbar.entry.js +70 -9
- package/dist/sankhyablocks/p-032fe52e.js +1 -0
- package/dist/sankhyablocks/p-07a61550.entry.js +1 -0
- package/dist/sankhyablocks/p-0899e0b5.entry.js +1 -0
- package/dist/sankhyablocks/p-14a08904.entry.js +1 -0
- package/dist/sankhyablocks/p-154a7f33.entry.js +1 -0
- package/dist/sankhyablocks/p-15802c59.entry.js +1 -0
- package/dist/sankhyablocks/p-164666b1.js +65 -0
- package/dist/sankhyablocks/p-21a81901.entry.js +1 -0
- package/dist/sankhyablocks/p-32556aa6.js +1 -0
- package/dist/sankhyablocks/p-328585d0.entry.js +1 -0
- package/dist/sankhyablocks/p-47bad461.entry.js +11 -0
- package/dist/sankhyablocks/{p-9a5d1b39.js → p-52c8e589.js} +1 -1
- package/dist/sankhyablocks/p-54a5d52a.entry.js +1 -0
- package/dist/sankhyablocks/p-5cb07080.js +1 -0
- package/dist/sankhyablocks/p-74d349c3.entry.js +1 -0
- package/dist/sankhyablocks/p-7663f597.entry.js +1 -0
- package/dist/sankhyablocks/{p-50783a8b.js → p-913a9979.js} +1 -1
- package/dist/sankhyablocks/{p-827e4b01.entry.js → p-a1d72395.entry.js} +1 -1
- package/dist/sankhyablocks/p-add17f6a.entry.js +1 -0
- package/dist/sankhyablocks/p-af1ac81f.entry.js +1 -0
- package/dist/sankhyablocks/p-aff76a53.js +56 -0
- package/dist/sankhyablocks/p-b4525fc0.entry.js +1 -0
- package/dist/sankhyablocks/p-cce0865d.js +1 -0
- package/dist/sankhyablocks/{p-be75153c.js → p-dc7c9047.js} +1 -1
- package/dist/sankhyablocks/p-dec65f6c.entry.js +1 -0
- package/dist/sankhyablocks/p-df5451c7.js +26 -0
- package/dist/sankhyablocks/p-e8763234.entry.js +1 -0
- package/dist/sankhyablocks/{p-9d608b62.entry.js → p-eae7a817.entry.js} +1 -1
- package/dist/sankhyablocks/{p-20b46647.entry.js → p-ee9536bc.entry.js} +1 -1
- package/dist/sankhyablocks/p-f13f7616.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/snk-application.d.ts +8 -0
- package/dist/types/components/snk-attach/snk-attach.d.ts +2 -1
- package/dist/types/components/snk-attach/structure/builder/attach-crud-config.builder.d.ts +10 -1
- package/dist/types/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.d.ts +5 -4
- package/dist/types/components/snk-crud/snk-crud.d.ts +12 -0
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +1 -1
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +11 -1
- package/dist/types/components/snk-custom-slot-elements/snk-custom-slot-elements.d.ts +6 -0
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +4 -0
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +6 -2
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +8 -0
- package/dist/types/components/snk-form/snk-form.d.ts +6 -1
- package/dist/types/components/{snk-form → snk-form-config}/SnkFormConfigManager.d.ts +2 -1
- package/dist/types/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.d.ts +4 -3
- package/dist/types/components/snk-grid/snk-grid.d.ts +14 -1
- package/dist/types/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.d.ts +11 -6
- package/dist/types/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.d.ts +1 -1
- package/dist/types/components/snk-simple-crud/regular-buttons.d.ts +3 -0
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +76 -3
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +11 -0
- package/dist/types/components.d.ts +171 -10
- package/dist/types/lib/configs/ConfigStorage.d.ts +21 -1
- package/dist/types/lib/dataUnit/InMemoryLoader.d.ts +0 -2
- package/dist/types/lib/dataUnit/dataUnitInMemoryUtils.d.ts +4 -0
- package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +2 -0
- package/dist/types/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.d.ts +2 -1
- package/dist/types/lib/utils/CrudUtils.d.ts +3 -0
- package/package.json +1 -1
- package/dist/cjs/PreloadManager-84466da6.js +0 -224
- package/dist/cjs/SnkMultiSelectionListDataSource-ba5838c2.js +0 -49
- package/dist/cjs/snk-grid-config.cjs.entry.js +0 -483
- package/dist/cjs/snk-select-box.cjs.entry.js +0 -25
- package/dist/esm/PreloadManager-c1c2f2b4.js +0 -222
- package/dist/esm/SnkMultiSelectionListDataSource-44494b0e.js +0 -43
- package/dist/esm/snk-grid-config.entry.js +0 -479
- package/dist/esm/snk-select-box.entry.js +0 -21
- package/dist/sankhyablocks/p-094c30cb.js +0 -1
- package/dist/sankhyablocks/p-1c55becf.entry.js +0 -1
- package/dist/sankhyablocks/p-230f5148.entry.js +0 -1
- package/dist/sankhyablocks/p-2936303b.js +0 -1
- package/dist/sankhyablocks/p-2e4eb644.entry.js +0 -1
- package/dist/sankhyablocks/p-3e2e2424.entry.js +0 -1
- package/dist/sankhyablocks/p-3e91d5ea.entry.js +0 -1
- package/dist/sankhyablocks/p-43de1258.entry.js +0 -1
- package/dist/sankhyablocks/p-4ce6cb02.entry.js +0 -11
- package/dist/sankhyablocks/p-5e681b7b.js +0 -65
- package/dist/sankhyablocks/p-5f74c859.entry.js +0 -1
- package/dist/sankhyablocks/p-67aedbe0.js +0 -56
- package/dist/sankhyablocks/p-69754d94.entry.js +0 -1
- package/dist/sankhyablocks/p-725d04ba.js +0 -1
- package/dist/sankhyablocks/p-86801b08.entry.js +0 -1
- package/dist/sankhyablocks/p-8a3a2631.entry.js +0 -1
- package/dist/sankhyablocks/p-965b79a9.js +0 -1
- package/dist/sankhyablocks/p-98674137.entry.js +0 -1
- package/dist/sankhyablocks/p-a13ccb86.js +0 -26
- package/dist/sankhyablocks/p-aba0e87f.entry.js +0 -1
- package/dist/sankhyablocks/p-c22c1d8e.js +0 -1
- package/dist/sankhyablocks/p-d26e0a02.entry.js +0 -1
- package/dist/sankhyablocks/p-d6317851.entry.js +0 -1
- package/dist/sankhyablocks/p-d7d85fa9.entry.js +0 -1
- package/dist/sankhyablocks/p-e3bd000e.entry.js +0 -1
- package/dist/sankhyablocks/p-e7dbe53a.entry.js +0 -1
- package/dist/sankhyablocks/p-fcdcb0e2.entry.js +0 -1
- /package/dist/collection/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.css +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.css +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.js +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.css +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.js +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.css +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.js +0 -0
- /package/dist/collection/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.css +0 -0
- /package/dist/collection/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.css +0 -0
- /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.d.ts +0 -0
- /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.d.ts +0 -0
- /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.d.ts +0 -0
@@ -253,7 +253,7 @@ class SnkFilterModalFactory {
|
|
253
253
|
}
|
254
254
|
}
|
255
255
|
|
256
|
-
const snkFilterBarCss = ".sc-snk-filter-bar-h{display:grid;grid-template-columns:1fr minmax(100px, 100%) 1fr 1fr;--snk-personalized-filter--z-index:var(--elevation--20, 20);--snk-personalized-filter--background-color:var(--background--xlight, #fff)}.snk-filter-bar__title.sc-snk-filter-bar{max-width:260px;display:inline-block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:16px;font-family:var(--font-pattern, Arial);font-weight:var(--text-weight--large, 600);color:var(--color--title-primary, #2B3A54);margin-top:8px}[data-mode=\"hidden\"].sc-snk-filter-bar-h{
|
256
|
+
const snkFilterBarCss = ".sc-snk-filter-bar-h{display:grid;grid-template-columns:1fr minmax(100px, 100%) 1fr 1fr;--snk-personalized-filter--z-index:var(--elevation--20, 20);--snk-personalized-filter--background-color:var(--background--xlight, #fff)}.snk-filter-bar__title.sc-snk-filter-bar{max-width:260px;display:inline-block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:16px;font-family:var(--font-pattern, Arial);font-weight:var(--text-weight--large, 600);color:var(--color--title-primary, #2B3A54);margin-top:8px}[data-mode=\"hidden\"].sc-snk-filter-bar-h{width:0px;height:0px}[data-mode=\"button\"].sc-snk-filter-bar-h{grid-template-columns:1fr;width:fit-content}.snk-filter__popover-container.sc-snk-filter-bar{display:flex;cursor:auto}.filter-bar__personalized-filter.sc-snk-filter-bar{display:flex;flex-direction:column;position:fixed;top:0;left:0;width:100%;height:100%;overflow:auto;z-index:var(--snk-personalized-filter--z-index);background-color:var(--snk-personalized-filter--background-color)}.snk-filter__popover.sc-snk-filter-bar{display:flex;flex-direction:column;position:absolute;width:fit-content;height:fit-content;min-width:265px;background-color:var(--background--xlight, #fff);border-radius:var(--border--radius-medium, 12px);box-shadow:var(--shadow, 0px 0px 16px 0px #000)}.snk-filter-item__editor-header.sc-snk-filter-bar{flex-grow:1;font-weight:var(--text-weight--medium, 400);color:var(--color--title-primary, #2B3A54)}.snk-filter__popover-rule.sc-snk-filter-bar{border-style:solid;border-color:var(--color--disable-secondary, #F2F5F8);border-radius:1px;border-width:1px;width:100%}.editor__ez-check.sc-snk-filter-bar{--ez-check__label--padding-left:0}.snk-filter-item__editor-header-button.sc-snk-filter-bar{cursor:pointer;background-color:transparent;border:none;padding:3px;outline-color:var(--color--primary)}.snk-filter-bar__divider.sc-snk-filter-bar{margin-bottom:var(--space--small)}.snk-filter-bar__scroller.sc-snk-filter-bar{height:calc(100% + var(--space-extra-small, 3px))}.snk-filter-bar__filter-item-container.sc-snk-filter-bar{display:flex;align-self:center}.snk-filter-bar__scroller.sc-snk-filter-bar .sc-snk-filter-bar:first-child{margin-left:var(--space-extra-small, 3px)}.snk-filter-bar__filter-list-items-container.sc-snk-filter-bar{overflow-y:auto;max-height:360px;margin-top:var(--space--small, 6px)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar{cursor:pointer;border-radius:var(--border--radius-small, 6px);border:none;background-color:transparent}.snk-filter-bar__filter-list-item__label.sc-snk-filter-bar{color:var(--title--primary)}.snk-filter-bar__filter-list-item__label--secondary.sc-snk-filter-bar{color:var(--text--primary)}.snk-filter-bar__filter-list-item__icon.sc-snk-filter-bar{--ez-icon--color:var(--title--primary)}.snk-filter-bar__filter-list-item__icon--secondary.sc-snk-filter-bar{--ez-icon--color:var(--text--secondary)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:focus-visible{outline:none;background-color:var(--background--medium)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:hover{background-color:var(--background--medium)}.snk-filter-bar__filter-list-items-container--empty.sc-snk-filter-bar{width:100%;height:100px;display:flex;justify-content:center;align-self:center;align-items:center}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar{position:relative}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar::after{display:flex;position:absolute;content:\"\";width:8px;height:8px;top:7px;left:17px;background-color:var(--icon--alert--color, #008561);border-radius:50%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar{--modal-item-border-width:2px;display:flex;flex-direction:row;margin-left:var(--modal-item-border-width);border-radius:var(--border--radius-medium, 12px);background-color:var(--background--medium, #f0f3f7);border:none;width:100%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar:focus-visible{outline:var(--color--primary) solid var(--modal-item-border-width)}.snk-filter-bar__filter-modal-item__check.sc-snk-filter-bar{width:auto}.snk-filter-bar__filter-modal-item__label.sc-snk-filter-bar{font-weight:var(--text-weight--medium)}.snk-filter-bar__filter-modal-content.sc-snk-filter-bar{display:grid;grid-template-rows:auto auto 1fr auto;width:99%;height:100%}";
|
257
257
|
|
258
258
|
const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
259
259
|
constructor() {
|
@@ -287,12 +287,18 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
287
287
|
this.filterConfig = undefined;
|
288
288
|
this.messagesBuilder = undefined;
|
289
289
|
this.disablePersonalizedFilter = undefined;
|
290
|
+
this.filterBarLegacyConfigName = undefined;
|
290
291
|
this.allowDefault = undefined;
|
291
292
|
this.scrollerLocked = false;
|
292
293
|
this.showPersonalizedFilter = false;
|
293
294
|
this.personalizedFilterId = undefined;
|
294
295
|
}
|
295
296
|
observeFilterConfig(newValue, oldValue) {
|
297
|
+
if (ObjectUtils.equals(newValue, oldValue))
|
298
|
+
return;
|
299
|
+
this.handleFilterConfigsChanged(oldValue, newValue);
|
300
|
+
}
|
301
|
+
handleFilterConfigsChanged(oldValue, newValue) {
|
296
302
|
if (oldValue != undefined && newValue == undefined) {
|
297
303
|
this._loadingPending = true;
|
298
304
|
this._configUpdated = true;
|
@@ -495,6 +501,17 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
495
501
|
filterActiveFilter(item) {
|
496
502
|
return item.visible || item.removalBlocked;
|
497
503
|
}
|
504
|
+
filterPersonalizedItems(item) {
|
505
|
+
return item.type === FilterItemType.PERSONALIZED;
|
506
|
+
}
|
507
|
+
getPersonalizedFilterVariableItems() {
|
508
|
+
return this.filterConfig
|
509
|
+
.filter(this.filterPersonalizedItems)
|
510
|
+
.map(item => {
|
511
|
+
const itemId = `filter-${item.id}`;
|
512
|
+
return (h("snk-filter-item", { key: item.id, id: itemId, config: Object.assign({}, item), onFocusin: () => this.itemFocused(itemId), onVisibleChanged: (evt) => this.scrollerLocked = evt.detail, onFilterChange: (event) => this.updateFilter(event.detail), getMessage: (key, props) => this.getMessage(key, props), showChips: false }));
|
513
|
+
});
|
514
|
+
}
|
498
515
|
getFilterItems() {
|
499
516
|
const pinnedItems = [];
|
500
517
|
const unpinnedItems = [];
|
@@ -554,6 +571,11 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
554
571
|
loadPermitions() {
|
555
572
|
this._application.isUserSup().then(value => this.allowDefault = value);
|
556
573
|
}
|
574
|
+
addFilterBarLegacyConfigName() {
|
575
|
+
if (this.filterBarLegacyConfigName && this.configName) {
|
576
|
+
ConfigStorage.addFilterBarLegacyConfig(this.configName, this.filterBarLegacyConfigName);
|
577
|
+
}
|
578
|
+
}
|
557
579
|
async loadConfigFromStorage(clearCache) {
|
558
580
|
if (clearCache) {
|
559
581
|
await ConfigStorage.deleteFilterBarConfigCache(this.configName, this.resourceID);
|
@@ -660,6 +682,7 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
660
682
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
661
683
|
if (this._application) {
|
662
684
|
this.loadPermitions();
|
685
|
+
this.addFilterBarLegacyConfigName();
|
663
686
|
this.loadConfigFromStorage();
|
664
687
|
}
|
665
688
|
this.attachDataUnit();
|
@@ -674,9 +697,10 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
674
697
|
if (this.showPersonalizedFilter) {
|
675
698
|
return h("snk-personalized-filter", { class: "filter-bar__personalized-filter", filterId: this.personalizedFilterId, ref: (el) => this._elPersonalizedFilter = el, onEzCancel: () => this.handleHidePersonalizedFilter(false), onEzAfterSave: () => this.handleHidePersonalizedFilter(true), entityUri: this.dataUnit.name, configName: this.configName, resourceID: this.resourceID });
|
676
699
|
}
|
677
|
-
if (this.mode
|
678
|
-
return (h(Host, { "data-mode": this.mode }, h("ez-button", { class: "ez-margin-left--medium", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, 'Filtros'), onClick: this.showFilterModal.bind(this) })));
|
679
|
-
|
700
|
+
if (this.mode !== "regular") {
|
701
|
+
return (h(Host, { "data-mode": this.mode }, this.getPersonalizedFilterVariableItems(), this.mode === 'button' && (h("ez-button", { class: "ez-margin-left--medium", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, 'Filtros'), onClick: this.showFilterModal.bind(this) }))));
|
702
|
+
}
|
703
|
+
return (h(Host, null, h("div", null, h("span", { class: "snk-filter-bar__title", title: this.title, "data-tooltip": this.title, "data-flow": "bottom" }, this.title)), h("ez-scroller", { class: "snk-filter-bar__scroller", direction: EzScrollDirection.HORIZONTAL, activeShadow: true, locked: this.scrollerLocked }, h("section", { class: "snk-filter-bar__filter-item-container" }, this.getFilterItems())), h("ez-button", { class: "ez-padding-left--medium", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, 'Filtros'), onClick: this.showFilterModal.bind(this) }, h("ez-icon", { slot: "leftIcon", iconName: "plus", class: "ez-padding-right--small" }))));
|
680
704
|
}
|
681
705
|
get _element() { return this; }
|
682
706
|
static get watchers() { return {
|
@@ -692,6 +716,7 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
692
716
|
"filterConfig": [1040],
|
693
717
|
"messagesBuilder": [1040],
|
694
718
|
"disablePersonalizedFilter": [4, "disable-personalized-filter"],
|
719
|
+
"filterBarLegacyConfigName": [1, "filter-bar-legacy-config-name"],
|
695
720
|
"allowDefault": [32],
|
696
721
|
"scrollerLocked": [32],
|
697
722
|
"showPersonalizedFilter": [32],
|
@@ -12,6 +12,7 @@ const SnkFilterDetail = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
12
12
|
this.filterChange = createEvent(this, "filterChange", 7);
|
13
13
|
this.config = undefined;
|
14
14
|
this.getMessage = undefined;
|
15
|
+
this.showHardFixed = true;
|
15
16
|
}
|
16
17
|
/**
|
17
18
|
* Exibe o componente snk-filter-detail.
|
@@ -89,7 +90,9 @@ const SnkFilterDetail = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
89
90
|
return Object.assign(Object.assign({}, item), { visible: false, fixed: false, value: undefined });
|
90
91
|
}
|
91
92
|
getPopUpHeaderButtons() {
|
92
|
-
return (h(Fragment, null, !this.config.removalBlocked &&
|
93
|
+
return (h(Fragment, null, !this.config.removalBlocked &&
|
94
|
+
this.buildIcon(this.getMessage("snkFilterBar.removeFilter"), "delete", () => this.removeItem()), this.showHardFixed && !this.config.hardFixed &&
|
95
|
+
this.buildIcon(this.getMessage(this.config.fixed ? "snkFilterBar.unpinFilter" : "snkFilterBar.pinFilter"), this.config.fixed ? "un-pin" : "push-pin", () => this.changeConfig(Object.assign(Object.assign({}, this.config), { fixed: !this.config.fixed })))));
|
93
96
|
}
|
94
97
|
buildIcon(title, iconName, action) {
|
95
98
|
return (h("button", { onClick: () => action(), class: "sc-snk-filter-bar snk-filter-item__editor-header-button", ref: elem => elem && this.buildIdButton(elem, title) }, h("ez-icon", Object.assign({ title: title, iconName: iconName }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo(`_${title}`)}` }))));
|
@@ -170,6 +173,7 @@ const SnkFilterDetail = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
170
173
|
}, [0, "snk-filter-detail", {
|
171
174
|
"config": [1040],
|
172
175
|
"getMessage": [16],
|
176
|
+
"showHardFixed": [4, "show-hard-fixed"],
|
173
177
|
"show": [64]
|
174
178
|
}]);
|
175
179
|
function defineCustomElement() {
|
@@ -20,6 +20,7 @@ const SnkFilterItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
20
20
|
this.detailIsVisible = undefined;
|
21
21
|
this.config = undefined;
|
22
22
|
this.getMessage = undefined;
|
23
|
+
this.showChips = true;
|
23
24
|
}
|
24
25
|
observeDetailIsVisible(value) {
|
25
26
|
this.visibleChanged.emit(value);
|
@@ -51,19 +52,22 @@ const SnkFilterItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
51
52
|
autoClose: true,
|
52
53
|
innerClickTest: this.innerClickCheck,
|
53
54
|
backClickListener: () => this.onDetailCloseCallback(),
|
54
|
-
left: this.
|
55
|
-
top: this.
|
55
|
+
left: this.getOffsetLeft(),
|
56
|
+
top: this.getOffsetTop(),
|
56
57
|
useOverlay: true,
|
57
58
|
overlayClassName: 'ez-scrim ez-scrim--light',
|
58
59
|
isFixed: true
|
59
60
|
};
|
60
61
|
}
|
61
|
-
|
62
|
+
getOffsetLeft() {
|
62
63
|
const padding = getComputedStyle(this._filterItemElement).getPropertyValue("padding-left");
|
63
64
|
const rect = this._filterItemElement.getBoundingClientRect();
|
64
|
-
|
65
|
+
// Width baseado no conteudo do snk-filter-detail. Nesse momento ele retorna 0px pois ainda não foi criado em tela.
|
66
|
+
const filterDetailWidth = 430;
|
67
|
+
const adjustRightPosition = filterDetailWidth - (document.body.clientWidth - rect.left);
|
68
|
+
return `calc(${rect.x}px + ${padding} - ${adjustRightPosition > 0 ? adjustRightPosition : 0}px)`;
|
65
69
|
}
|
66
|
-
|
70
|
+
getOffsetTop() {
|
67
71
|
const rect = this._filterItemElement.getBoundingClientRect();
|
68
72
|
return (rect.y + rect.height) + "px";
|
69
73
|
}
|
@@ -295,7 +299,7 @@ const SnkFilterItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
295
299
|
}
|
296
300
|
render() {
|
297
301
|
const leftIcon = this.getLeftIconName();
|
298
|
-
return (h(Host, null, h("ez-chip", { id: this.config.id, ref: ref => this._chipElement = ref, label: this.getLabel(), value: this.getEnabledChip() }, leftIcon
|
302
|
+
return (h(Host, null, this.showChips && (h("ez-chip", { id: this.config.id, ref: ref => this._chipElement = ref, label: this.getLabel(), value: this.getEnabledChip() }, leftIcon && (h("ez-icon", { ref: ref => this._leftIconElement = ref, iconName: leftIcon, class: "ez-padding-right--small", slot: "leftIcon" })), h("ez-icon", { ref: ref => this._rightIconElement = ref, iconName: this.getRightIconName(), class: "ez-padding-left--small", slot: "rightIcon", id: "removeFilter" }))), h("section", { class: "ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container", ref: elem => this._popoverContainer = elem }, h("snk-filter-detail", { config: this.config, getMessage: this.getMessage, class: "sc-snk-filter-bar snk-filter__popover ez-padding--small ez-elevation--16", ref: elem => this._popover = elem, key: this.config.id, "data-element-id": this._idSnkFilterDetail, showHardFixed: this.showChips }))));
|
299
303
|
}
|
300
304
|
get _filterItemElement() { return this; }
|
301
305
|
static get watchers() { return {
|
@@ -304,6 +308,7 @@ const SnkFilterItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
304
308
|
}, [0, "snk-filter-item", {
|
305
309
|
"config": [1040],
|
306
310
|
"getMessage": [16],
|
311
|
+
"showChips": [4, "show-chips"],
|
307
312
|
"detailIsVisible": [32],
|
308
313
|
"showUp": [64],
|
309
314
|
"hideDetail": [64]
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
2
2
|
import { a as Sortable, d as defineCustomElement$1 } from './snk-tab-config2.js';
|
3
|
-
import { ObjectUtils, ElementIDUtils, ArrayUtils } from '@sankhyalabs/core';
|
3
|
+
import { ObjectUtils, ElementIDUtils, ArrayUtils, ApplicationContext } from '@sankhyalabs/core';
|
4
4
|
import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
|
5
5
|
import { C as CONFIG_EVENTS, b as CONFIG_SORTABLE_EVENTS, c as TAB_NAMES, A as ACTION_CONFIG, D as DEFAULT_TYPE } from './constants.js';
|
6
6
|
import { U as UserConfigType } from './form-config-fetcher.js';
|
@@ -952,6 +952,12 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
952
952
|
this.controlSortableField();
|
953
953
|
this.controlSortableGroup();
|
954
954
|
}
|
955
|
+
async componentWillRender() {
|
956
|
+
if (this.messagesBuilder == undefined) {
|
957
|
+
const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
958
|
+
this.messagesBuilder = application.messagesBuilder;
|
959
|
+
}
|
960
|
+
}
|
955
961
|
componentWillLoad() {
|
956
962
|
this.loadConfig();
|
957
963
|
}
|
@@ -23,6 +23,7 @@ const SnkForm$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
23
23
|
this.configName = undefined;
|
24
24
|
this.recordsValidator = undefined;
|
25
25
|
this.messagesBuilder = undefined;
|
26
|
+
this.formLegacyConfigName = undefined;
|
26
27
|
this.resourceID = undefined;
|
27
28
|
}
|
28
29
|
/**
|
@@ -70,8 +71,14 @@ const SnkForm$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
70
71
|
this.resourceID = await ResourceIDUtils.getResourceID();
|
71
72
|
}
|
72
73
|
this._configManager = new SnkFormConfigManager(this.configName, this.resourceID);
|
74
|
+
this.addFormLegacyConfig();
|
73
75
|
this._configManager.loadConfig();
|
74
76
|
}
|
77
|
+
addFormLegacyConfig() {
|
78
|
+
if (this.formLegacyConfigName) {
|
79
|
+
this._configManager.addFormLegacyConfig(this.formLegacyConfigName);
|
80
|
+
}
|
81
|
+
}
|
75
82
|
render() {
|
76
83
|
if (!this._dataUnit || !this._dataState) {
|
77
84
|
return undefined;
|
@@ -85,6 +92,7 @@ const SnkForm$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
85
92
|
"configName": [1, "config-name"],
|
86
93
|
"recordsValidator": [16],
|
87
94
|
"messagesBuilder": [1040],
|
95
|
+
"formLegacyConfigName": [1, "form-legacy-config-name"],
|
88
96
|
"resourceID": [1, "resource-i-d"],
|
89
97
|
"_dataUnit": [32],
|
90
98
|
"_dataState": [32],
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
2
|
-
import { StringUtils, ElementIDUtils } from '@sankhyalabs/core';
|
2
|
+
import { ApplicationContext, StringUtils, ElementIDUtils } from '@sankhyalabs/core';
|
3
3
|
import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
|
4
4
|
import { CheckMode } from '@sankhyalabs/ezui/dist/collection/components/ez-check/CheckMode';
|
5
5
|
import { C as ConfigStorage } from './ConfigStorage.js';
|
@@ -21,7 +21,6 @@ const SnkGridConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
21
21
|
this._dataChanged = false;
|
22
22
|
this._componenteInternalKey = Date.now();
|
23
23
|
this.selectedIndex = 0;
|
24
|
-
this.application = undefined;
|
25
24
|
this.columns = undefined;
|
26
25
|
this.config = undefined;
|
27
26
|
this.configName = undefined;
|
@@ -35,9 +34,10 @@ const SnkGridConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
35
34
|
* Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-grid.msg.ts"
|
36
35
|
*/
|
37
36
|
getMessage(key, params) {
|
38
|
-
|
37
|
+
const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
38
|
+
return application.messagesBuilder.getMessage(key, params);
|
39
39
|
}
|
40
|
-
|
40
|
+
getSortableColumns() {
|
41
41
|
let newList = [];
|
42
42
|
this.columns.filter(col => { var _a; return StringUtils.getBooleanValue((_a = col === null || col === void 0 ? void 0 : col.props) === null || _a === void 0 ? void 0 : _a.get("sortable"), true); }).forEach((column) => {
|
43
43
|
var _a;
|
@@ -51,7 +51,11 @@ const SnkGridConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
51
51
|
newList.push(item);
|
52
52
|
}
|
53
53
|
});
|
54
|
-
newList
|
54
|
+
return newList;
|
55
|
+
}
|
56
|
+
createOrderList() {
|
57
|
+
let newSortableList = this.getSortableColumns();
|
58
|
+
newSortableList.sort((a, b) => {
|
55
59
|
//OS dois tem order index 0 e pelo menos um deles tem orientação de ordenação.
|
56
60
|
if (a.orderIndex == 0 && b.orderIndex == 0 && (a.ascending != undefined || b.ascending != undefined)) {
|
57
61
|
if (a.ascending != undefined)
|
@@ -74,7 +78,7 @@ const SnkGridConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
74
78
|
}
|
75
79
|
return (a.orderIndex - b.orderIndex);
|
76
80
|
});
|
77
|
-
this._orderListItems =
|
81
|
+
this._orderListItems = newSortableList;
|
78
82
|
}
|
79
83
|
createColumnList() {
|
80
84
|
let visibleGroup = {
|
@@ -97,12 +101,18 @@ const SnkGridConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
97
101
|
});
|
98
102
|
this._columListItems = [visibleGroup, hiddenGroup];
|
99
103
|
}
|
104
|
+
createColumnListSlotDataElementId(item) {
|
105
|
+
return `configItem_${StringUtils.replaceAccentuatedChars(StringUtils.toCamelCase(item.label))}`;
|
106
|
+
}
|
100
107
|
buildColumnListSlot(item, group) {
|
101
|
-
const dataElementId =
|
108
|
+
const dataElementId = this.createColumnListSlotDataElementId(item);
|
102
109
|
return (h("div", null, h("ez-check", { mode: CheckMode.SWITCH, id: CheckMode.SWITCH + ((item === null || item === void 0 ? void 0 : item.label) || '') + ((group === null || group === void 0 ? void 0 : group.group) || ''), value: group.group === this.getMessage("snkGridConfig.group.visible"), "data-element-id": dataElementId, onEzChange: (evt) => { this.switchColumnGroup(evt, item); } })));
|
103
110
|
}
|
111
|
+
createOrderListSlotDataElementId(item) {
|
112
|
+
return `${this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME)}_configItem_${StringUtils.toCamelCase(item.label)}`;
|
113
|
+
}
|
104
114
|
buildOrderListSlot(item) {
|
105
|
-
const dataElementId =
|
115
|
+
const dataElementId = this.createOrderListSlotDataElementId(item);
|
106
116
|
let selectedOption = ORDER_VALUES.none.value;
|
107
117
|
if ((item === null || item === void 0 ? void 0 : item.ascending) != undefined) {
|
108
118
|
selectedOption = item.ascending == true ? ORDER_VALUES.asc.value : ORDER_VALUES.desc.value;
|
@@ -120,7 +130,7 @@ const SnkGridConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
120
130
|
let orderArray;
|
121
131
|
if (((_a = this._orderPriorityList) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
122
132
|
this._orderPriorityList.find((item) => item.label === newItem.label).sort = sortOrder;
|
123
|
-
this._orderPriorityList.filter((item) => item.sort).
|
133
|
+
this._orderPriorityList.filter((item) => item.sort).forEach((item, index) => {
|
124
134
|
if (item.label === newItem.label) {
|
125
135
|
newItem.sortIndex = index;
|
126
136
|
}
|
@@ -189,6 +199,35 @@ const SnkGridConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
189
199
|
this.closeConfig();
|
190
200
|
this.save();
|
191
201
|
}
|
202
|
+
saveGridConfigOnStorage(_newConfig) {
|
203
|
+
ConfigStorage.saveGridConfig(_newConfig, this.configName, this.resourceID)
|
204
|
+
.then((savedConfig) => {
|
205
|
+
this.configChange.emit(savedConfig);
|
206
|
+
this._orderList.clearHistory();
|
207
|
+
ApplicationUtils.info(this.getMessage("snkGridConfig.info.successfullyConfigSaved"), { iconName: "check" });
|
208
|
+
});
|
209
|
+
}
|
210
|
+
reOrderPriorityColumns(columns, orderPriorityList) {
|
211
|
+
let orderArray = [];
|
212
|
+
orderArray = columns.filter((item) => item.sort && item.hidden !== true)
|
213
|
+
.map((item) => {
|
214
|
+
return { label: item.label, orderIndex: 0 };
|
215
|
+
});
|
216
|
+
let indexCount = 0;
|
217
|
+
let newOrderArray = [];
|
218
|
+
orderPriorityList.forEach((orderPriorityItem) => {
|
219
|
+
let item = orderArray.find((column) => column.label === orderPriorityItem.label);
|
220
|
+
if (item) {
|
221
|
+
item.orderIndex = indexCount;
|
222
|
+
newOrderArray.push(item);
|
223
|
+
indexCount++;
|
224
|
+
}
|
225
|
+
});
|
226
|
+
if (newOrderArray.length > 0) {
|
227
|
+
orderArray = newOrderArray;
|
228
|
+
}
|
229
|
+
return orderArray;
|
230
|
+
}
|
192
231
|
save() {
|
193
232
|
var _a;
|
194
233
|
let _newConfig;
|
@@ -201,30 +240,12 @@ const SnkGridConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
201
240
|
let _newColumnConfigList = [];
|
202
241
|
let orderArray;
|
203
242
|
if (((_a = this._orderPriorityList) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
204
|
-
orderArray = this.
|
205
|
-
.map((item) => {
|
206
|
-
return { label: item.label, orderIndex: 0 };
|
207
|
-
});
|
208
|
-
let indexCount = 0;
|
209
|
-
let newOrderArray = [];
|
210
|
-
this._orderPriorityList.forEach((orderPriorityItem) => {
|
211
|
-
let item = orderArray.find((column) => column.label === orderPriorityItem.label);
|
212
|
-
if (item) {
|
213
|
-
item.orderIndex = indexCount;
|
214
|
-
newOrderArray.push(item);
|
215
|
-
indexCount++;
|
216
|
-
}
|
217
|
-
});
|
218
|
-
if (newOrderArray.length > 0) {
|
219
|
-
orderArray = newOrderArray;
|
220
|
-
}
|
243
|
+
orderArray = this.reOrderPriorityColumns(this.columns, this._orderPriorityList);
|
221
244
|
}
|
222
|
-
|
223
|
-
const column = this.columns[i];
|
245
|
+
this.columns.forEach((column) => {
|
224
246
|
let _newColumnConfig = _newConfig.columns.find((_newColumnConfig) => column.name === _newColumnConfig.name);
|
225
|
-
if (column.hidden === true && _newColumnConfig)
|
226
|
-
|
227
|
-
}
|
247
|
+
if (column.hidden === true && _newColumnConfig)
|
248
|
+
return;
|
228
249
|
if (_newColumnConfig) {
|
229
250
|
_newColumnConfig.width = column.width;
|
230
251
|
}
|
@@ -247,14 +268,9 @@ const SnkGridConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
247
268
|
}
|
248
269
|
_newColumnConfigList.push(_newColumnConfig);
|
249
270
|
}
|
250
|
-
}
|
251
|
-
_newConfig.columns = _newColumnConfigList;
|
252
|
-
ConfigStorage.saveGridConfig(_newConfig, this.configName, this.resourceID)
|
253
|
-
.then((savedConfig) => {
|
254
|
-
this.configChange.emit(savedConfig);
|
255
|
-
this._orderList.clearHistory();
|
256
|
-
ApplicationUtils.info(this.getMessage("snkGridConfig.info.successfullyConfigSaved"), { iconName: "check" });
|
257
271
|
});
|
272
|
+
_newConfig.columns = _newColumnConfigList;
|
273
|
+
this.saveGridConfigOnStorage(_newConfig);
|
258
274
|
function adjustPriorityOrder(column, _newColumnConfig) {
|
259
275
|
if (orderArray) {
|
260
276
|
let orderItem = orderArray.find((item) => item.label === column.label);
|
@@ -289,85 +305,96 @@ const SnkGridConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
289
305
|
async locateColumn(evt, searchingText) {
|
290
306
|
var _a;
|
291
307
|
const hitEnter = evt.key === "Enter";
|
308
|
+
searchingText = searchingText || ((_a = evt.currentTarget) === null || _a === void 0 ? void 0 : _a.value);
|
292
309
|
if (!searchingText) {
|
293
|
-
|
310
|
+
this.removeSelection();
|
311
|
+
return;
|
294
312
|
}
|
295
|
-
|
313
|
+
const matchedIndexes = await this.getMatchedIndexes(searchingText);
|
314
|
+
const newSelected = this.getNewSelectedIndex(matchedIndexes, hitEnter);
|
315
|
+
this._selectedIndex = newSelected;
|
296
316
|
if (this.selectedIndex === 1) {
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
if (
|
309
|
-
|
310
|
-
for (let j = 0; j < matchedIndexes.length; j++) {
|
311
|
-
if (matchedIndexes[j] > this._selectedIndex) {
|
312
|
-
newSelected = matchedIndexes[j];
|
313
|
-
break;
|
314
|
-
}
|
315
|
-
}
|
316
|
-
}
|
317
|
-
if (newSelected === -1) {
|
318
|
-
newSelected = matchedIndexes[0];
|
319
|
-
}
|
317
|
+
this.updateOrderListSelection(newSelected);
|
318
|
+
}
|
319
|
+
else {
|
320
|
+
this.updateColumnListSelection(newSelected);
|
321
|
+
}
|
322
|
+
}
|
323
|
+
async getMatchedIndexes(searchingText) {
|
324
|
+
const matchedIndexes = [];
|
325
|
+
if (this.selectedIndex === 1) {
|
326
|
+
const orderListDatasource = await this._orderList.getList();
|
327
|
+
orderListDatasource.forEach((column, index) => {
|
328
|
+
if (this.compareWords(column, searchingText)) {
|
329
|
+
matchedIndexes.push(index);
|
320
330
|
}
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
331
|
+
});
|
332
|
+
}
|
333
|
+
else {
|
334
|
+
this.columns.forEach((column, index) => {
|
335
|
+
if (this.compareWords(column, searchingText)) {
|
336
|
+
matchedIndexes.push(index);
|
326
337
|
}
|
327
|
-
|
328
|
-
|
338
|
+
});
|
339
|
+
}
|
340
|
+
return matchedIndexes;
|
341
|
+
}
|
342
|
+
getNewSelectedIndex(matchedIndexes, hitEnter) {
|
343
|
+
if (matchedIndexes.length === 0)
|
344
|
+
return -1;
|
345
|
+
if (hitEnter) {
|
346
|
+
for (const index of matchedIndexes) {
|
347
|
+
if (index > this._selectedIndex) {
|
348
|
+
return index;
|
329
349
|
}
|
330
350
|
}
|
351
|
+
}
|
352
|
+
return matchedIndexes[0];
|
353
|
+
}
|
354
|
+
updateOrderListSelection(newSelected) {
|
355
|
+
if (newSelected === -1) {
|
356
|
+
this._orderList.removeSelection();
|
357
|
+
return;
|
358
|
+
}
|
359
|
+
this._orderList.getList().then((orderListDatasource) => {
|
360
|
+
const selectedColumn = orderListDatasource[newSelected];
|
361
|
+
if (selectedColumn) {
|
362
|
+
this._orderList.setSelection(selectedColumn, true);
|
363
|
+
}
|
331
364
|
else {
|
332
365
|
this._orderList.removeSelection();
|
333
366
|
}
|
367
|
+
});
|
368
|
+
}
|
369
|
+
updateColumnListSelection(newSelected) {
|
370
|
+
if (newSelected === -1) {
|
371
|
+
this._columnList.removeSelection();
|
372
|
+
return;
|
334
373
|
}
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
if (matchedIndexes.length > 0) {
|
344
|
-
if (hitEnter) {
|
345
|
-
for (let j = 0; j < matchedIndexes.length; j++) {
|
346
|
-
if (matchedIndexes[j] > this._selectedIndex) {
|
347
|
-
newSelected = matchedIndexes[j];
|
348
|
-
break;
|
349
|
-
}
|
350
|
-
}
|
351
|
-
}
|
352
|
-
if (newSelected === -1) {
|
353
|
-
newSelected = matchedIndexes[0];
|
354
|
-
}
|
355
|
-
}
|
356
|
-
this._selectedIndex = newSelected;
|
357
|
-
let selectedColumn = this.columns[newSelected];
|
358
|
-
if (selectedColumn) {
|
359
|
-
const listItem = this._columListItems.map(group => group.items).flat().find(item => item.label === selectedColumn.label);
|
360
|
-
if (listItem)
|
361
|
-
this._columnList.setSelection(listItem, true);
|
362
|
-
}
|
363
|
-
else {
|
364
|
-
this._columnList.removeSelection();
|
365
|
-
}
|
374
|
+
const selectedColumn = this.columns[newSelected];
|
375
|
+
if (selectedColumn) {
|
376
|
+
const listItem = this._columListItems
|
377
|
+
.map(group => group.items)
|
378
|
+
.flat()
|
379
|
+
.find(item => item.label === selectedColumn.label);
|
380
|
+
if (listItem) {
|
381
|
+
this._columnList.setSelection(listItem, true);
|
366
382
|
}
|
367
383
|
else {
|
368
384
|
this._columnList.removeSelection();
|
369
385
|
}
|
370
386
|
}
|
387
|
+
else {
|
388
|
+
this._columnList.removeSelection();
|
389
|
+
}
|
390
|
+
}
|
391
|
+
removeSelection() {
|
392
|
+
if (this.selectedIndex === 1) {
|
393
|
+
this._orderList.removeSelection();
|
394
|
+
}
|
395
|
+
else {
|
396
|
+
this._columnList.removeSelection();
|
397
|
+
}
|
371
398
|
}
|
372
399
|
compareWords(column, searchingText) {
|
373
400
|
var _a, _b;
|
@@ -473,7 +500,6 @@ const SnkGridConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
473
500
|
static get style() { return snkGridConfigCss; }
|
474
501
|
}, [2, "snk-grid-config", {
|
475
502
|
"selectedIndex": [1026, "selected-index"],
|
476
|
-
"application": [16],
|
477
503
|
"columns": [1040],
|
478
504
|
"config": [1040],
|
479
505
|
"configName": [1, "config-name"],
|