@sankhyalabs/sankhyablocks 10.1.0-dev.2 → 10.1.0-dev.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{ConfigStorage-5a73e979.js → ConfigStorage-a4e1e518.js} +2 -2
- package/dist/cjs/{DataFetcher-eeb3b0b7.js → DataFetcher-0b6aa084.js} +34 -24
- package/dist/cjs/{FormConfigHelper-ebb77625.js → FormConfigHelper-28fe4668.js} +44 -0
- package/dist/cjs/{ISave-861e9d6d.js → ISave-2c455a77.js} +4 -4
- package/dist/cjs/{PersonalizedFilterUtils-7259cf65.js → PersonalizedFilterUtils-eccb267a.js} +13 -0
- package/dist/cjs/{SnkFormConfigManager-8d4fded8.js → SnkFormConfigManager-b8c81493.js} +7 -7
- package/dist/cjs/{SnkMultiSelectionListDataSource-3b93f6a6.js → SnkMultiSelectionListDataSource-03b58f5a.js} +5 -5
- package/dist/cjs/{auth-fetcher-8d8acd69.js → auth-fetcher-7e7796c9.js} +1 -1
- package/dist/cjs/config-header.cjs.entry.js +1 -1
- package/dist/cjs/configs-button.cjs.entry.js +1 -1
- package/dist/cjs/css-shim-a27d231b.js +6 -0
- package/dist/cjs/{dataunit-fetcher-1cea0695.js → dataunit-fetcher-8dffbcdf.js} +1 -1
- package/dist/cjs/dom-ff96a4bc.js +75 -0
- package/dist/cjs/field-config_2.cjs.entry.js +3 -3
- package/dist/cjs/fields-layout.cjs.entry.js +7 -4
- package/dist/cjs/fields-selector.cjs.entry.js +2 -2
- package/dist/cjs/{form-config-fetcher-f347f884.js → form-config-fetcher-5516d68a.js} +1 -1
- package/dist/cjs/guides-configurator.cjs.entry.js +6 -4
- package/dist/cjs/{index-1cf293c1.js → index-1894343a.js} +1515 -171
- package/dist/cjs/{index-13d05f03.js → index-f0fe7e6e.js} +90 -21
- package/dist/cjs/loader.cjs.js +16 -2
- package/dist/cjs/pesquisa-grid_2.cjs.entry.js +5 -5
- package/dist/cjs/sankhyablocks.cjs.js +132 -4
- package/dist/cjs/shadow-css-7e3e0ab1.js +389 -0
- package/dist/cjs/snk-actions-button_9.cjs.entry.js +6 -6
- package/dist/cjs/snk-actions-form.cjs.entry.js +1 -1
- package/dist/cjs/snk-application.cjs.entry.js +99 -70
- package/dist/cjs/snk-attach.cjs.entry.js +8 -8
- package/dist/cjs/snk-client-confirm.cjs.entry.js +1 -1
- package/dist/cjs/snk-configurator.cjs.entry.js +1 -1
- package/dist/cjs/snk-crud.cjs.entry.js +100 -9
- package/dist/cjs/snk-custom-slot-elements.cjs.entry.js +1 -1
- package/dist/cjs/snk-custom-slot-guide.cjs.entry.js +40 -0
- package/dist/cjs/snk-data-exporter.cjs.entry.js +6 -6
- package/dist/cjs/{snk-data-unit-de248308.js → snk-data-unit-036ce58c.js} +12 -3
- package/dist/cjs/snk-data-unit.cjs.entry.js +4 -4
- package/dist/cjs/snk-default-filter.cjs.entry.js +1 -1
- package/dist/cjs/snk-detail-view.cjs.entry.js +10 -10
- package/dist/cjs/snk-entity-list.cjs.entry.js +1 -1
- package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +1 -1
- package/dist/cjs/snk-expression-group_2.cjs.entry.js +2 -2
- package/dist/cjs/snk-filter-advanced-mode_2.cjs.entry.js +2 -2
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +58 -25
- package/dist/cjs/snk-filter-binary-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-checkbox-list.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-detail.cjs.entry.js +2 -2
- package/dist/cjs/snk-filter-field-search_2.cjs.entry.js +2 -2
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +4 -4
- package/dist/cjs/snk-filter-multi-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-number.cjs.entry.js +2 -2
- package/dist/cjs/snk-filter-period.cjs.entry.js +11 -6
- package/dist/cjs/snk-filter-search.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-text.cjs.entry.js +2 -2
- package/dist/cjs/snk-form-summary.cjs.entry.js +1 -1
- package/dist/cjs/snk-form-view.cjs.entry.js +1 -1
- package/dist/cjs/snk-form_2.cjs.entry.js +33 -10
- package/dist/cjs/snk-grid.cjs.entry.js +28 -19
- package/dist/cjs/{snk-guides-viewer-4ec3e7e1.js → snk-guides-viewer-164c063e.js} +86 -40
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +10 -10
- package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +1 -1
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +6 -6
- package/dist/cjs/snk-pesquisa.cjs.entry.js +17 -6
- package/dist/cjs/snk-print-selector.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-bar.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-crud.cjs.entry.js +12 -20
- package/dist/cjs/snk-taskbar.cjs.entry.js +67 -51
- package/dist/cjs/{taskbar-elements-fb5d1e08.js → taskbar-elements-8a80420e.js} +2 -2
- package/dist/cjs/teste-pesquisa.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/snk-application/search-strategy/exec-prepared-search-advaced-mode.js +27 -0
- package/dist/collection/components/snk-application/search-strategy/exec-prepared-search-plus.js +5 -25
- package/dist/collection/components/snk-application/snk-application.js +104 -44
- package/dist/collection/components/snk-attach/snk-attach.js +1 -1
- package/dist/collection/components/snk-crud/snk-crud.js +151 -2
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +133 -34
- package/dist/collection/components/snk-custom-slot-guide/snk-custom-slot-guide.css +3 -0
- package/dist/collection/components/snk-custom-slot-guide/snk-custom-slot-guide.js +95 -0
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +9 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +2 -2
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js +11 -6
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-text.js +1 -1
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.css +4 -0
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +7 -1
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.css +1 -0
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +15 -4
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +30 -13
- package/dist/collection/components/snk-form-config/FormConfigHelper.js +42 -0
- package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +6 -6
- package/dist/collection/components/snk-form-config/field-item/field-config/field-config.css +1 -0
- package/dist/collection/components/snk-form-config/fields-layout/fields-layout.css +16 -0
- package/dist/collection/components/snk-form-config/fields-layout/fields-layout.js +6 -3
- package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.css +3 -3
- package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.js +5 -3
- package/dist/collection/components/snk-form-config/snk-form-config.js +53 -6
- package/dist/collection/components/snk-grid/snk-grid.css +12 -0
- package/dist/collection/components/snk-grid/snk-grid.js +39 -12
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/utils/PersonalizedFilterUtils.js +13 -0
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +5 -1
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +43 -0
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +3 -11
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +87 -48
- package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +3 -3
- package/dist/collection/lib/message/SnkMessageBuilder.js +11 -2
- package/dist/collection/lib/message/resources/en-us/snk-form.msg.js +7 -0
- package/dist/collection/lib/message/resources/es-es/snk-form.msg.js +7 -0
- package/dist/collection/lib/message/resources/pt-br/snk-form.msg.js +8 -1
- package/dist/collection/lib/message/resources/pt-br/snk-pesquisa.msg.js +1 -1
- package/dist/components/DataFetcher.js +34 -4
- package/dist/components/ISave.js +3 -3
- package/dist/components/PersonalizedFilterUtils.js +13 -0
- package/dist/components/SnkFormConfigManager.js +6 -6
- package/dist/components/field-config2.js +44 -2
- package/dist/components/fields-layout2.js +6 -3
- package/dist/components/guides-configurator2.js +5 -3
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/index2.js +90 -21
- package/dist/components/snk-application2.js +93 -63
- package/dist/components/snk-attach2.js +1 -1
- package/dist/components/snk-crud.js +96 -1
- package/dist/components/snk-custom-slot-guide.d.ts +11 -0
- package/dist/components/snk-custom-slot-guide.js +55 -0
- package/dist/components/snk-data-unit2.js +9 -0
- package/dist/components/snk-detail-view2.js +81 -34
- package/dist/components/snk-filter-bar2.js +30 -13
- package/dist/components/snk-filter-item2.js +8 -2
- package/dist/components/snk-filter-modal2.js +16 -6
- package/dist/components/snk-filter-number.js +2 -2
- package/dist/components/snk-filter-period.js +10 -5
- package/dist/components/snk-filter-text.js +1 -1
- package/dist/components/snk-form-config2.js +29 -5
- package/dist/components/snk-grid2.js +22 -11
- package/dist/components/snk-pesquisa2.js +14 -2
- package/dist/components/snk-simple-crud2.js +3 -11
- package/dist/components/snk-taskbar2.js +66 -49
- package/dist/esm/{ConfigStorage-568dc227.js → ConfigStorage-39ac8fef.js} +2 -2
- package/dist/esm/{DataFetcher-743feb3b.js → DataFetcher-0b9da57d.js} +34 -4
- package/dist/esm/{FormConfigHelper-4e42f0b6.js → FormConfigHelper-d09669f3.js} +43 -1
- package/dist/esm/{ISave-345481c1.js → ISave-f1c9269b.js} +4 -4
- package/dist/esm/{PersonalizedFilterUtils-2db38ff2.js → PersonalizedFilterUtils-d2439a9a.js} +13 -0
- package/dist/esm/{SnkFormConfigManager-d61df0c8.js → SnkFormConfigManager-a87566c8.js} +7 -7
- package/dist/esm/{SnkMultiSelectionListDataSource-ca8d7a09.js → SnkMultiSelectionListDataSource-01b3744b.js} +5 -5
- package/dist/esm/{auth-fetcher-c353127d.js → auth-fetcher-acdc1cb4.js} +1 -1
- package/dist/esm/config-header.entry.js +1 -1
- package/dist/esm/configs-button.entry.js +1 -1
- package/dist/esm/css-shim-9f2d321e.js +4 -0
- package/dist/esm/{dataunit-fetcher-7f2c61ca.js → dataunit-fetcher-4c312b43.js} +1 -1
- package/dist/esm/dom-64053c71.js +73 -0
- package/dist/esm/field-config_2.entry.js +3 -3
- package/dist/esm/fields-layout.entry.js +7 -4
- package/dist/esm/fields-selector.entry.js +2 -2
- package/dist/esm/{form-config-fetcher-898d2dd1.js → form-config-fetcher-7cda6254.js} +1 -1
- package/dist/esm/guides-configurator.entry.js +6 -4
- package/dist/esm/{index-479e1293.js → index-04f73a26.js} +1507 -171
- package/dist/esm/{index-446f9341.js → index-ea250be6.js} +90 -21
- package/dist/esm/loader.js +17 -3
- package/dist/esm/pesquisa-grid_2.entry.js +5 -5
- package/dist/esm/sankhyablocks.js +133 -5
- package/dist/esm/shadow-css-98135883.js +387 -0
- package/dist/esm/snk-actions-button_9.entry.js +6 -6
- package/dist/esm/snk-actions-form.entry.js +1 -1
- package/dist/esm/snk-application.entry.js +99 -70
- package/dist/esm/snk-attach.entry.js +8 -8
- package/dist/esm/snk-client-confirm.entry.js +1 -1
- package/dist/esm/snk-configurator.entry.js +1 -1
- package/dist/esm/snk-crud.entry.js +100 -9
- package/dist/esm/snk-custom-slot-elements.entry.js +1 -1
- package/dist/esm/snk-custom-slot-guide.entry.js +36 -0
- package/dist/esm/snk-data-exporter.entry.js +6 -6
- package/dist/esm/{snk-data-unit-60b338c5.js → snk-data-unit-130021b3.js} +12 -3
- package/dist/esm/snk-data-unit.entry.js +4 -4
- package/dist/esm/snk-default-filter.entry.js +1 -1
- package/dist/esm/snk-detail-view.entry.js +10 -10
- package/dist/esm/snk-entity-list.entry.js +1 -1
- package/dist/esm/snk-exporter-email-sender.entry.js +1 -1
- package/dist/esm/snk-expression-group_2.entry.js +2 -2
- package/dist/esm/snk-filter-advanced-mode_2.entry.js +2 -2
- package/dist/esm/snk-filter-bar_4.entry.js +58 -25
- package/dist/esm/snk-filter-binary-select.entry.js +1 -1
- package/dist/esm/snk-filter-checkbox-list.entry.js +1 -1
- package/dist/esm/snk-filter-detail.entry.js +2 -2
- package/dist/esm/snk-filter-field-search_2.entry.js +2 -2
- package/dist/esm/snk-filter-modal-item.entry.js +4 -4
- package/dist/esm/snk-filter-multi-select.entry.js +1 -1
- package/dist/esm/snk-filter-number.entry.js +2 -2
- package/dist/esm/snk-filter-period.entry.js +11 -6
- package/dist/esm/snk-filter-search.entry.js +1 -1
- package/dist/esm/snk-filter-text.entry.js +2 -2
- package/dist/esm/snk-form-summary.entry.js +1 -1
- package/dist/esm/snk-form-view.entry.js +1 -1
- package/dist/esm/snk-form_2.entry.js +33 -10
- package/dist/esm/snk-grid.entry.js +28 -19
- package/dist/esm/{snk-guides-viewer-339e10b3.js → snk-guides-viewer-3fd18298.js} +86 -40
- package/dist/esm/snk-guides-viewer.entry.js +10 -10
- package/dist/esm/snk-personalized-filter-editor.entry.js +1 -1
- package/dist/esm/snk-personalized-filter.entry.js +6 -6
- package/dist/esm/snk-pesquisa.entry.js +17 -6
- package/dist/esm/snk-print-selector.entry.js +1 -1
- package/dist/esm/snk-simple-bar.entry.js +1 -1
- package/dist/esm/snk-simple-crud.entry.js +12 -20
- package/dist/esm/snk-taskbar.entry.js +68 -52
- package/dist/esm/{taskbar-elements-faaf5d8f.js → taskbar-elements-d1e63fb2.js} +2 -2
- package/dist/esm/teste-pesquisa.entry.js +1 -1
- package/dist/sankhyablocks/{p-7f7fe6c4.entry.js → p-0a160fb5.entry.js} +1 -1
- package/dist/sankhyablocks/{p-144da1d1.entry.js → p-12f595a6.entry.js} +1 -1
- package/dist/sankhyablocks/{p-162bddae.entry.js → p-175c9576.entry.js} +1 -1
- package/dist/sankhyablocks/p-18d66638.entry.js +1 -0
- package/dist/sankhyablocks/{p-1788d191.js → p-1f310bc6.js} +1 -1
- package/dist/sankhyablocks/{p-c4fcf1fb.entry.js → p-27e0cd68.entry.js} +1 -1
- package/dist/sankhyablocks/p-2ac55a5d.js +1 -0
- package/dist/sankhyablocks/{p-9a63f3f7.entry.js → p-2b882835.entry.js} +1 -1
- package/dist/sankhyablocks/{p-1f8cb438.entry.js → p-2c6be187.entry.js} +1 -1
- package/dist/sankhyablocks/p-2c9d0870.js +2 -0
- package/dist/sankhyablocks/{p-cb4343c4.entry.js → p-2cc2526e.entry.js} +1 -1
- package/dist/sankhyablocks/{p-75af335e.entry.js → p-2ebda226.entry.js} +1 -1
- package/dist/sankhyablocks/{p-093f58fa.entry.js → p-2f94cf87.entry.js} +1 -1
- package/dist/sankhyablocks/p-3a35917e.entry.js +1 -0
- package/dist/sankhyablocks/p-3a443150.entry.js +1 -0
- package/dist/sankhyablocks/{p-c90f337a.entry.js → p-3b6d8d33.entry.js} +1 -1
- package/dist/sankhyablocks/p-3db72758.entry.js +1 -0
- package/dist/sankhyablocks/{p-e8c49c12.js → p-48a5c311.js} +2 -2
- package/dist/sankhyablocks/p-52691b42.js +1 -0
- package/dist/sankhyablocks/{p-27482793.entry.js → p-5aae5c74.entry.js} +1 -1
- package/dist/sankhyablocks/p-6564180d.entry.js +1 -0
- package/dist/sankhyablocks/{p-6d241415.js → p-6768f176.js} +1 -1
- package/dist/sankhyablocks/p-68c1a093.js +1 -0
- package/dist/sankhyablocks/p-6d322b0a.js +1 -0
- package/dist/sankhyablocks/{p-7b3ca294.entry.js → p-7150eacf.entry.js} +1 -1
- package/dist/sankhyablocks/{p-825098c1.entry.js → p-752c57f4.entry.js} +1 -1
- package/dist/sankhyablocks/{p-49ddc27a.entry.js → p-752f4e29.entry.js} +1 -1
- package/dist/sankhyablocks/{p-e258de96.entry.js → p-76729994.entry.js} +1 -1
- package/dist/sankhyablocks/{p-7fc46290.js → p-7ee6b1bf.js} +1 -1
- package/dist/sankhyablocks/{p-27005fac.entry.js → p-877d9614.entry.js} +1 -1
- package/dist/sankhyablocks/p-8b4d6719.js +1 -0
- package/dist/sankhyablocks/{p-3d41f5a8.entry.js → p-8d946600.entry.js} +1 -1
- package/dist/sankhyablocks/{p-96d45943.entry.js → p-90ae6c2e.entry.js} +1 -1
- package/dist/sankhyablocks/p-94267a30.entry.js +1 -0
- package/dist/sankhyablocks/{p-59b8f277.js → p-998a9d6f.js} +1 -1
- package/dist/sankhyablocks/{p-21107f0d.entry.js → p-9c1ff75e.entry.js} +1 -1
- package/dist/sankhyablocks/{p-2fdac5e6.entry.js → p-9e109f5e.entry.js} +1 -1
- package/dist/sankhyablocks/{p-88ed2793.js → p-9e4555ab.js} +1 -1
- package/dist/sankhyablocks/p-a46ac091.js +1 -0
- package/dist/sankhyablocks/p-a73b6b00.js +1 -0
- package/dist/sankhyablocks/{p-164c822d.entry.js → p-acd2ba28.entry.js} +1 -1
- package/dist/sankhyablocks/{p-180716b2.entry.js → p-ae326d06.entry.js} +1 -1
- package/dist/sankhyablocks/p-b471bfab.entry.js +1 -0
- package/dist/sankhyablocks/p-b533edab.entry.js +1 -0
- package/dist/sankhyablocks/p-b555ce38.entry.js +1 -0
- package/dist/sankhyablocks/p-c2d33fc8.entry.js +1 -0
- package/dist/sankhyablocks/p-c3ec6642.js +19 -0
- package/dist/sankhyablocks/{p-91a9abb6.entry.js → p-c8043a53.entry.js} +1 -1
- package/dist/sankhyablocks/{p-c3dbf441.entry.js → p-cc64239c.entry.js} +1 -1
- package/dist/sankhyablocks/{p-b987e15d.js → p-cc9935af.js} +1 -1
- package/dist/sankhyablocks/{p-471b34f4.entry.js → p-cd00a3d1.entry.js} +1 -1
- package/dist/sankhyablocks/{p-b7e891cc.entry.js → p-cd40c8cf.entry.js} +1 -1
- package/dist/sankhyablocks/{p-bd203e8d.entry.js → p-cd412add.entry.js} +1 -1
- package/dist/sankhyablocks/{p-4c763b10.entry.js → p-d657f71f.entry.js} +1 -1
- package/dist/sankhyablocks/{p-e6b1c769.entry.js → p-d6dad5e4.entry.js} +1 -1
- package/dist/sankhyablocks/p-d714b6ca.js +1 -0
- package/dist/sankhyablocks/p-da455c82.js +12 -0
- package/dist/sankhyablocks/p-dea58642.entry.js +11 -0
- package/dist/sankhyablocks/p-e30acdca.entry.js +1 -0
- package/dist/sankhyablocks/p-ec9027a7.entry.js +1 -0
- package/dist/sankhyablocks/p-ef9343c3.entry.js +1 -0
- package/dist/sankhyablocks/{p-667cab42.entry.js → p-f152ef98.entry.js} +1 -1
- package/dist/sankhyablocks/{p-7e250432.entry.js → p-f7170e10.entry.js} +1 -1
- package/dist/sankhyablocks/p-f8c5395a.entry.js +1 -0
- package/dist/sankhyablocks/p-f8da8569.entry.js +1 -0
- package/dist/sankhyablocks/{p-7345782c.entry.js → p-f921270b.entry.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/search-strategy/exec-prepared-search-advaced-mode.d.ts +5 -0
- package/dist/types/components/snk-application/snk-application.d.ts +9 -0
- package/dist/types/components/snk-crud/snk-crud.d.ts +22 -0
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +23 -0
- package/dist/types/components/snk-custom-slot-guide/snk-custom-slot-guide.d.ts +16 -0
- package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +1 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-period.d.ts +1 -0
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +1 -1
- package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +2 -1
- package/dist/types/components/snk-form-config/FormConfigHelper.d.ts +6 -1
- package/dist/types/components/snk-form-config/SnkFormConfigManager.d.ts +1 -1
- package/dist/types/components/snk-form-config/fields-layout/fields-layout.d.ts +2 -2
- package/dist/types/components/snk-form-config/guides-configurator/guides-configurator.d.ts +1 -1
- package/dist/types/components/snk-form-config/snk-form-config.d.ts +9 -2
- package/dist/types/components/snk-grid/snk-grid.d.ts +6 -0
- package/dist/types/components/snk-personalized-filter/interfaces/IParameter.d.ts +1 -0
- package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +8 -0
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +0 -1
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +12 -4
- package/dist/types/components.d.ts +105 -0
- package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +1 -0
- package/package.json +1 -1
- package/react/components.d.ts +1 -0
- package/react/components.js +1 -0
- package/react/components.js.map +1 -1
- package/dist/sankhyablocks/p-0cf9aa38.js +0 -1
- package/dist/sankhyablocks/p-11346b8d.entry.js +0 -1
- package/dist/sankhyablocks/p-1649f51e.entry.js +0 -1
- package/dist/sankhyablocks/p-1d585081.js +0 -1
- package/dist/sankhyablocks/p-3ed04f0d.entry.js +0 -1
- package/dist/sankhyablocks/p-4759912d.entry.js +0 -1
- package/dist/sankhyablocks/p-55798617.js +0 -1
- package/dist/sankhyablocks/p-56948f00.entry.js +0 -11
- package/dist/sankhyablocks/p-60dd1d27.entry.js +0 -1
- package/dist/sankhyablocks/p-626b7a17.js +0 -1
- package/dist/sankhyablocks/p-8f73da95.js +0 -1
- package/dist/sankhyablocks/p-95c71f5e.entry.js +0 -1
- package/dist/sankhyablocks/p-988afe78.js +0 -1
- package/dist/sankhyablocks/p-9f2cdaab.entry.js +0 -1
- package/dist/sankhyablocks/p-9fe91526.js +0 -1
- package/dist/sankhyablocks/p-a5108625.entry.js +0 -1
- package/dist/sankhyablocks/p-aae4258d.entry.js +0 -1
- package/dist/sankhyablocks/p-af9d79e0.entry.js +0 -1
- package/dist/sankhyablocks/p-bb0de89c.entry.js +0 -1
- package/dist/sankhyablocks/p-d8d8169b.js +0 -2
- package/dist/sankhyablocks/p-e64958ba.entry.js +0 -1
- package/dist/sankhyablocks/p-f25c50f7.entry.js +0 -1
- package/dist/sankhyablocks/p-f8f29e1a.entry.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance,
|
|
1
|
+
import { r as registerInstance, e as createEvent, h, g as getElement } from './index-04f73a26.js';
|
|
2
2
|
import { ApplicationContext } from '@sankhyalabs/core';
|
|
3
3
|
import { V as VIEW_MODE } from './constants-7b422de0.js';
|
|
4
4
|
import { A as AuthorizationConfig } from './AuthorizationConfig-dcbd207a.js';
|
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import { r as registerInstance,
|
|
1
|
+
import { r as registerInstance, e as createEvent, h, f as Host, g as getElement } from './index-04f73a26.js';
|
|
2
2
|
import { Action, StringUtils, ElementIDUtils, ApplicationContext, KeyboardManager } from '@sankhyalabs/core';
|
|
3
|
-
import './DataFetcher-
|
|
4
|
-
import './ISave-
|
|
3
|
+
import './DataFetcher-0b9da57d.js';
|
|
4
|
+
import './ISave-f1c9269b.js';
|
|
5
5
|
import { P as PresentationMode, E as ExporterStrategy } from './index-b40568ff.js';
|
|
6
6
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
7
7
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
8
|
-
import './dataunit-fetcher-
|
|
8
|
+
import './dataunit-fetcher-4c312b43.js';
|
|
9
9
|
import './filter-item-type.enum-d45e026f.js';
|
|
10
|
-
import './form-config-fetcher-
|
|
10
|
+
import './form-config-fetcher-7cda6254.js';
|
|
11
11
|
import { V as VIEW_MODE } from './constants-7b422de0.js';
|
|
12
|
-
import { A as AutorizationType } from './auth-fetcher-
|
|
12
|
+
import { A as AutorizationType } from './auth-fetcher-acdc1cb4.js';
|
|
13
13
|
import { S as ServicesNumberingConfig } from './ServicesNumberingConfig-2f7b050e.js';
|
|
14
|
-
import { T as TaskbarElement } from './taskbar-elements-
|
|
14
|
+
import { T as TaskbarElement } from './taskbar-elements-d1e63fb2.js';
|
|
15
15
|
import './PrintUtils-3e4ff0f5.js';
|
|
16
16
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
|
17
17
|
import '@sankhyalabs/core/dist/utils/SortingUtils';
|
|
18
18
|
import './ResourceIDUtils-a114189a.js';
|
|
19
|
-
import './index-
|
|
19
|
+
import './index-ea250be6.js';
|
|
20
20
|
|
|
21
21
|
const snkCrudCss = ".sc-snk-crud-h{display:flex;flex-direction:column;height:100%;width:100%}";
|
|
22
22
|
|
|
23
23
|
const SnkCrud = class {
|
|
24
24
|
constructor(hostRef) {
|
|
25
25
|
registerInstance(this, hostRef);
|
|
26
|
+
this.snkShowGuide = createEvent(this, "snkShowGuide", 7);
|
|
26
27
|
this.actionClick = createEvent(this, "actionClick", 7);
|
|
27
28
|
this.configuratorSave = createEvent(this, "configuratorSave", 7);
|
|
28
29
|
this.configuratorCancel = createEvent(this, "configuratorCancel", 7);
|
|
@@ -32,6 +33,38 @@ const SnkCrud = class {
|
|
|
32
33
|
this._viewHistory = [];
|
|
33
34
|
this._customEditors = new Map();
|
|
34
35
|
this._customRenders = new Map();
|
|
36
|
+
this.loadEntitySuggestions = async (argument) => {
|
|
37
|
+
var _a;
|
|
38
|
+
const value = (_a = argument === null || argument === void 0 ? void 0 : argument.argument) !== null && _a !== void 0 ? _a : '';
|
|
39
|
+
const mode = (argument === null || argument === void 0 ? void 0 : argument.mode) || "PREDICTIVE";
|
|
40
|
+
if (!value || value.trim().length === 0) {
|
|
41
|
+
return [];
|
|
42
|
+
}
|
|
43
|
+
try {
|
|
44
|
+
this._showMoreOnSearch = false;
|
|
45
|
+
const entityName = this._snkDataUnit.entityName;
|
|
46
|
+
if (mode === "PREDICTIVE") {
|
|
47
|
+
return await this.handlePredictiveSearch(value, entityName);
|
|
48
|
+
}
|
|
49
|
+
return await this._application.executePreparedSearch(mode, value, this.buildSearchOptions(entityName));
|
|
50
|
+
}
|
|
51
|
+
catch (error) {
|
|
52
|
+
console.error('Erro ao carregar sugestões de entidades:', error);
|
|
53
|
+
return [];
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
this.searchEntitySelect = async (item) => {
|
|
57
|
+
if (!this._entityPKField || !item) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
try {
|
|
61
|
+
const pk = [{ name: this._entityPKField, value: item.value }];
|
|
62
|
+
await this.refreshDataUnitByPk(pk);
|
|
63
|
+
}
|
|
64
|
+
catch (error) {
|
|
65
|
+
console.error('Erro ao selecionar entidade:', error);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
35
68
|
this.dataUnitInterceptor = {
|
|
36
69
|
interceptAction: (action) => {
|
|
37
70
|
if (action.type === Action.DATA_SAVED) {
|
|
@@ -48,6 +81,8 @@ const SnkCrud = class {
|
|
|
48
81
|
this._resourceID = undefined;
|
|
49
82
|
this.customContainerId = `SNK-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
|
|
50
83
|
this.numberingConfig = undefined;
|
|
84
|
+
this._showMoreOnSearch = false;
|
|
85
|
+
this._entityPKField = undefined;
|
|
51
86
|
this.enableLockManagerLoadingComp = false;
|
|
52
87
|
this.enableLockManagerTaskbarClick = false;
|
|
53
88
|
this.configName = undefined;
|
|
@@ -76,6 +111,8 @@ const SnkCrud = class {
|
|
|
76
111
|
this.layoutFormConfig = true;
|
|
77
112
|
this.multipleEditionEnabled = true;
|
|
78
113
|
this.paginationCounterMode = 'auto';
|
|
114
|
+
this.customGuidesConfig = [];
|
|
115
|
+
this.showEntitySearch = true;
|
|
79
116
|
this.disableNumberingConfig = false;
|
|
80
117
|
}
|
|
81
118
|
/**
|
|
@@ -371,6 +408,49 @@ const SnkCrud = class {
|
|
|
371
408
|
var _a;
|
|
372
409
|
(_a = this._keyboardManager) === null || _a === void 0 ? void 0 : _a.unbindAllShortcutKeys();
|
|
373
410
|
}
|
|
411
|
+
async handlePredictiveSearch(argument, entityName) {
|
|
412
|
+
var _a, _b;
|
|
413
|
+
const response = await this._application.executePreparedSearchWithFullResponse(argument, this.buildSearchOptions(entityName, 5));
|
|
414
|
+
this._showMoreOnSearch = (_a = response === null || response === void 0 ? void 0 : response.hasMore) !== null && _a !== void 0 ? _a : false;
|
|
415
|
+
this._entityPKField = response === null || response === void 0 ? void 0 : response.pkField;
|
|
416
|
+
return (_b = response === null || response === void 0 ? void 0 : response.data) !== null && _b !== void 0 ? _b : [];
|
|
417
|
+
}
|
|
418
|
+
async refreshDataUnitByPk(pks) {
|
|
419
|
+
try {
|
|
420
|
+
const pkField = pks[0].name;
|
|
421
|
+
const pkValue = pks[0].value;
|
|
422
|
+
// Criar filtro para a busca específica
|
|
423
|
+
const quickFilter = {
|
|
424
|
+
term: '',
|
|
425
|
+
filter: {
|
|
426
|
+
name: '',
|
|
427
|
+
params: [],
|
|
428
|
+
expression: `(${pkField} = ${pkValue})`
|
|
429
|
+
}
|
|
430
|
+
};
|
|
431
|
+
// Carregar dados com o filtro aplicado diretamente
|
|
432
|
+
await this._dataUnit.loadData(quickFilter);
|
|
433
|
+
// Navegar para o formulário se houver apenas um registro
|
|
434
|
+
if (this._dataUnit.records.length === 1) {
|
|
435
|
+
this._dataUnit.selectFirst();
|
|
436
|
+
this.gridToForm(true);
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
catch (error) {
|
|
440
|
+
console.error('Erro ao atualizar dataset:', error);
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
buildSearchOptions(entityName, limit) {
|
|
444
|
+
return {
|
|
445
|
+
entity: entityName,
|
|
446
|
+
entityDescription: entityName,
|
|
447
|
+
executeOnOpen: true,
|
|
448
|
+
searchOptions: {
|
|
449
|
+
localEntityName: entityName,
|
|
450
|
+
limit,
|
|
451
|
+
}
|
|
452
|
+
};
|
|
453
|
+
}
|
|
374
454
|
async toggleView() {
|
|
375
455
|
const currentView = await this._viewStack.getSelectedIndex();
|
|
376
456
|
this.setViewMode(VIEW_MODE.GRID === currentView ? VIEW_MODE.FORM : VIEW_MODE.GRID);
|
|
@@ -477,12 +557,23 @@ const SnkCrud = class {
|
|
|
477
557
|
}
|
|
478
558
|
this.configuratorCancel.emit();
|
|
479
559
|
}
|
|
560
|
+
renderCustomGuideSlots() {
|
|
561
|
+
if (!this.customGuidesConfig)
|
|
562
|
+
return;
|
|
563
|
+
return this.customGuidesConfig.map(g => h("slot", { name: g.id }));
|
|
564
|
+
}
|
|
565
|
+
renderDynamicSearch(slotName) {
|
|
566
|
+
var _a;
|
|
567
|
+
if (!this.showEntitySearch || ((_a = this._dataState) === null || _a === void 0 ? void 0 : _a.insertionMode) === true)
|
|
568
|
+
return;
|
|
569
|
+
return (h("div", { slot: slotName, class: "entity-search-container", style: { position: 'relative', display: 'inline-block', marginLeft: '10px', minWidth: '200px' } }, h("ez-search", { label: "Buscar registros", optionLoader: this.loadEntitySuggestions, onEzChange: (evt) => this.searchEntitySelect(evt.detail), mode: "slim", showMore: this._showMoreOnSearch, suppressEmptyOption: true, suppressInputPersist: true })));
|
|
570
|
+
}
|
|
480
571
|
render() {
|
|
481
572
|
if (this._resourceID == undefined) {
|
|
482
573
|
return;
|
|
483
574
|
}
|
|
484
575
|
this._snkDataUnit.ignoreSaveMessage = (this._currentViewMode === VIEW_MODE.GRID && !this.enableGridInsert);
|
|
485
|
-
return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", { class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full ez-padding--medium' }, h("snk-grid", { ref: (ref) => this._snkGrid = ref, class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full', filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, strategyExporter: this.strategyExporter, multipleEditionEnabled: this.multipleEditionEnabled, paginationCounterMode: this.paginationCounterMode }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId, formLegacyConfigName: this.formLegacyConfigName, enableGridInsert: this.enableGridInsert, getCustomTitle: this.setCustomFormTitle, ignoreReadOnlyFormFields: this.ignoreReadOnlyFormFields }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", { tabIndex: "0" }, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, entityName: this._snkDataUnit.entityName, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId, layoutFormConfig: this.layoutFormConfig })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
|
|
576
|
+
return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", { class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full ez-padding--medium' }, h("snk-grid", { ref: (ref) => this._snkGrid = ref, class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full', filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, strategyExporter: this.strategyExporter, multipleEditionEnabled: this.multipleEditionEnabled, paginationCounterMode: this.paginationCounterMode }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }), this.renderDynamicSearch("GRID_HEADER_DYNAMIC_SEARCH"))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, customGuidesConfig: this.customGuidesConfig, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId, formLegacyConfigName: this.formLegacyConfigName, enableGridInsert: this.enableGridInsert, getCustomTitle: this.setCustomFormTitle, ignoreReadOnlyFormFields: this.ignoreReadOnlyFormFields }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), this.renderCustomGuideSlots(), this.renderDynamicSearch("GUIDES_VIEWER_DYNAMIC_SEARCH"), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", { tabIndex: "0" }, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, entityName: this._snkDataUnit.entityName, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId, layoutFormConfig: this.layoutFormConfig })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
|
|
486
577
|
}
|
|
487
578
|
get _element() { return getElement(this); }
|
|
488
579
|
static get watchers() { return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance,
|
|
1
|
+
import { r as registerInstance, e as createEvent, h, f as Host } from './index-04f73a26.js';
|
|
2
2
|
|
|
3
3
|
const snkCustomSlotElementsCss = ".sc-snk-custom-slot-elements-h{display:none}";
|
|
4
4
|
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { r as registerInstance, e as createEvent, h, f as Host, g as getElement } from './index-04f73a26.js';
|
|
2
|
+
|
|
3
|
+
const snkCustomSlotGuideCss = ".sc-snk-custom-slot-guide-h{display:none}";
|
|
4
|
+
|
|
5
|
+
const SnkCustomSlotGuide = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this.snkCustomSlotGuideLoaded = createEvent(this, "snkCustomSlotGuideLoaded", 7);
|
|
9
|
+
this.slotName = 'CUSTOM_SLOT_GUIDE';
|
|
10
|
+
}
|
|
11
|
+
onGuideChange(evt) {
|
|
12
|
+
const guideName = evt.detail;
|
|
13
|
+
if (guideName === this.slotName) {
|
|
14
|
+
this._element.style.setProperty('display', 'block');
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
this._element.style.setProperty('display', 'none');
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
onFormConfigVisibilityChange(evt) {
|
|
21
|
+
const isFormConfigVisible = evt.detail;
|
|
22
|
+
if (isFormConfigVisible) {
|
|
23
|
+
this._element.style.setProperty('display', 'none');
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
componentDidLoad() {
|
|
27
|
+
this.snkCustomSlotGuideLoaded.emit(this.slotName);
|
|
28
|
+
}
|
|
29
|
+
render() {
|
|
30
|
+
return (h(Host, { slot: this.slotName, id: this.slotName, class: "custom-slot-guide-container" }, h("slot", null)));
|
|
31
|
+
}
|
|
32
|
+
get _element() { return getElement(this); }
|
|
33
|
+
};
|
|
34
|
+
SnkCustomSlotGuide.style = snkCustomSlotGuideCss;
|
|
35
|
+
|
|
36
|
+
export { SnkCustomSlotGuide as snk_custom_slot_guide };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { r as registerInstance, h,
|
|
1
|
+
import { r as registerInstance, h, f as Host, g as getElement } from './index-04f73a26.js';
|
|
2
2
|
import { ApplicationContext, ObjectUtils, UserInterface, DataType, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
4
4
|
import { I as IExportType } from './IFetchDataExporterParams-d73bed3d.js';
|
|
5
5
|
import { D as DataExporterOption, a as DataExporterType, b as DataExporterFormat } from './index-b40568ff.js';
|
|
6
6
|
import { R as REPORT_LAUNCHER_RESOURCE_ID } from './constants-7b422de0.js';
|
|
7
|
-
import { D as DataFetcher } from './DataFetcher-
|
|
8
|
-
import { S as SnkDataUnit } from './snk-data-unit-
|
|
9
|
-
import './ISave-
|
|
7
|
+
import { D as DataFetcher } from './DataFetcher-0b9da57d.js';
|
|
8
|
+
import { S as SnkDataUnit } from './snk-data-unit-130021b3.js';
|
|
9
|
+
import './ISave-f1c9269b.js';
|
|
10
10
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
11
11
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
12
|
-
import './dataunit-fetcher-
|
|
12
|
+
import './dataunit-fetcher-4c312b43.js';
|
|
13
13
|
import './filter-item-type.enum-d45e026f.js';
|
|
14
|
-
import './form-config-fetcher-
|
|
14
|
+
import './form-config-fetcher-7cda6254.js';
|
|
15
15
|
import './PrintUtils-3e4ff0f5.js';
|
|
16
16
|
import '@sankhyalabs/core/dist/dataunit/metadata/DataType';
|
|
17
17
|
import './GetSelectedRecordsIDsInfo-9fa41508.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as registerInstance,
|
|
1
|
+
import { r as registerInstance, e as createEvent, h, g as getElement, f as Host } from './index-04f73a26.js';
|
|
2
2
|
import { ApplicationContext, Action, ObjectUtils, DataUnitAction, StringUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
4
|
-
import { O as OperationMap, S as SnkMessageBuilder } from './DataFetcher-
|
|
5
|
-
import { g as getRecordValue, a as DatasetStrategy } from './dataunit-fetcher-
|
|
4
|
+
import { O as OperationMap, S as SnkMessageBuilder } from './DataFetcher-0b9da57d.js';
|
|
5
|
+
import { g as getRecordValue, a as DatasetStrategy } from './dataunit-fetcher-4c312b43.js';
|
|
6
6
|
import { convertType } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
|
|
7
7
|
import { g as getSelectedRecordsIDsInfo } from './GetSelectedRecordsIDsInfo-9fa41508.js';
|
|
8
8
|
|
|
@@ -153,6 +153,7 @@ const SnkDataUnit = class {
|
|
|
153
153
|
this._metadataByRow = new Map();
|
|
154
154
|
this._rowMetadataCache = new Map();
|
|
155
155
|
this._formFieldsConfig = [];
|
|
156
|
+
this._internalDataStateChange = false;
|
|
156
157
|
this.REGEX_DATAUNIT_NAME = /dd:\/\/(.+?)\//;
|
|
157
158
|
this._dataUnitObserver = async (action) => {
|
|
158
159
|
const duState = await this.buildDataState(action.type);
|
|
@@ -407,11 +408,17 @@ const SnkDataUnit = class {
|
|
|
407
408
|
if (this.isAllowed("UPDATE") || this.dataUnit.isNewRecord(recordId)) {
|
|
408
409
|
return action;
|
|
409
410
|
}
|
|
411
|
+
if (this._internalDataStateChange) {
|
|
412
|
+
this._internalDataStateChange = false;
|
|
413
|
+
return;
|
|
414
|
+
}
|
|
410
415
|
if (this._openedAlert) {
|
|
416
|
+
this._internalDataStateChange = true;
|
|
411
417
|
await this.dataUnit.cancelEdition();
|
|
412
418
|
return;
|
|
413
419
|
}
|
|
414
420
|
this._openedAlert = true;
|
|
421
|
+
this._internalDataStateChange = true;
|
|
415
422
|
await this.dataUnit.cancelEdition();
|
|
416
423
|
await ApplicationUtils.alert(this.getMessage("snkDataUnit.forbidden"), this.getMessage("snkDataUnit.forbiddenUpdate"));
|
|
417
424
|
this._openedAlert = false;
|
|
@@ -614,6 +621,8 @@ const SnkDataUnit = class {
|
|
|
614
621
|
return records;
|
|
615
622
|
const parentSelectedRecord = parentDataUnit.getSelectedRecord();
|
|
616
623
|
const selfInfo = parentDataUnit === null || parentDataUnit === void 0 ? void 0 : parentDataUnit.getChildInfo(this.getCleanDataUnitName());
|
|
624
|
+
if (!selfInfo)
|
|
625
|
+
return records;
|
|
617
626
|
const { links } = selfInfo;
|
|
618
627
|
if (!links || links.length === 0)
|
|
619
628
|
return records;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { S as snk_data_unit } from './snk-data-unit-
|
|
2
|
-
import './index-
|
|
1
|
+
export { S as snk_data_unit } from './snk-data-unit-130021b3.js';
|
|
2
|
+
import './index-04f73a26.js';
|
|
3
3
|
import '@sankhyalabs/core';
|
|
4
4
|
import '@sankhyalabs/ezui/dist/collection/utils';
|
|
5
|
-
import './DataFetcher-
|
|
5
|
+
import './DataFetcher-0b9da57d.js';
|
|
6
6
|
import './PrintUtils-3e4ff0f5.js';
|
|
7
7
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
8
|
-
import './dataunit-fetcher-
|
|
8
|
+
import './dataunit-fetcher-4c312b43.js';
|
|
9
9
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
10
10
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
|
11
11
|
import '@sankhyalabs/core/dist/utils/SortingUtils';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance,
|
|
1
|
+
import { r as registerInstance, e as createEvent, h, f as Host } from './index-04f73a26.js';
|
|
2
2
|
import { A as ActionDefaultFilter } from './default-filters-50105e43.js';
|
|
3
3
|
|
|
4
4
|
const snkDefaultFilterCss = ".sc-snk-default-filter-h{display:flex;justify-content:flex-end}.default_container.sc-snk-default-filter{border:none;background:none;display:flex;align-items:center;gap:var(--space--3xs, 4px);font-family:var(--font-pattern);color:var(--title--primary, #2b3a54);font-size:var(--text--medium, 14px);padding:0;outline:none}.default_container.sc-snk-default-filter ez-icon.sc-snk-default-filter{cursor:pointer}.default_container.sc-snk-default-filter ez-icon.sc-snk-default-filter:hover{color:var(--color--primary-600)}.new_filter.sc-snk-default-filter{cursor:pointer;margin:0 var(--space--3xs, 4px)}.new_filter.sc-snk-default-filter:hover{color:var(--color--primary-600)}";
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { r as registerInstance,
|
|
1
|
+
import { r as registerInstance, e as createEvent, i as forceUpdate, h, f as Host, g as getElement } from './index-04f73a26.js';
|
|
2
2
|
import { Action, StringUtils, KeyboardManager } from '@sankhyalabs/core';
|
|
3
|
-
import { S as SnkFormConfigManager } from './SnkFormConfigManager-
|
|
3
|
+
import { S as SnkFormConfigManager } from './SnkFormConfigManager-a87566c8.js';
|
|
4
4
|
import { FormMetadata, buildFormMetadata } from '@sankhyalabs/ezui/dist/collection/utils/form';
|
|
5
|
-
import { S as SnkMessageBuilder } from './DataFetcher-
|
|
6
|
-
import './ISave-
|
|
5
|
+
import { S as SnkMessageBuilder } from './DataFetcher-0b9da57d.js';
|
|
6
|
+
import './ISave-f1c9269b.js';
|
|
7
7
|
import { P as PresentationMode } from './index-b40568ff.js';
|
|
8
8
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
9
9
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
10
|
-
import './dataunit-fetcher-
|
|
10
|
+
import './dataunit-fetcher-4c312b43.js';
|
|
11
11
|
import './filter-item-type.enum-d45e026f.js';
|
|
12
|
-
import './form-config-fetcher-
|
|
12
|
+
import './form-config-fetcher-7cda6254.js';
|
|
13
13
|
import { V as VIEW_MODE } from './constants-7b422de0.js';
|
|
14
|
-
import { T as TaskbarElement } from './taskbar-elements-
|
|
15
|
-
import { S as SnkGuidesViewer } from './snk-guides-viewer-
|
|
14
|
+
import { T as TaskbarElement } from './taskbar-elements-d1e63fb2.js';
|
|
15
|
+
import { S as SnkGuidesViewer } from './snk-guides-viewer-3fd18298.js';
|
|
16
16
|
import { buildFieldSearch, SHORTCUT_SEARCH_FIELD } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
17
|
-
import './ConfigStorage-
|
|
17
|
+
import './ConfigStorage-39ac8fef.js';
|
|
18
18
|
import './PrintUtils-3e4ff0f5.js';
|
|
19
19
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
|
20
20
|
import '@sankhyalabs/core/dist/utils/SortingUtils';
|
|
21
21
|
import './ResourceIDUtils-a114189a.js';
|
|
22
|
-
import './index-
|
|
22
|
+
import './index-ea250be6.js';
|
|
23
23
|
import '@sankhyalabs/core/dist/dataunit/DataUnit';
|
|
24
24
|
import './taskbar-processor-3436124c.js';
|
|
25
25
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance,
|
|
1
|
+
import { r as registerInstance, e as createEvent, h, f as Host } from './index-04f73a26.js';
|
|
2
2
|
import { ObjectUtils, ApplicationContext } from '@sankhyalabs/core';
|
|
3
3
|
|
|
4
4
|
const snkEntityListCss = ".sc-snk-entity-list-h{--snk-entity-list--label--font-size:var(--text--medium, 14px);--snk-entity-list--label--font-family:var(--font-pattern, Arial);--snk-entity-list--label--color:var(--title--primary, #000);--snk-entity-list--label--disabled--color:var(--text--disable, #AFB6C0)}.label.sc-snk-entity-list{flex-shrink:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--snk-entity-list--label--color);font-size:var(--snk-entity-list--label--font-size);font-family:var(--snk-entity-list--label--font-family);cursor:default;padding-left:var(--space--small);padding-bottom:var(--space--extra-small)}.snk-entity-list--overflow.sc-snk-entity-list{overflow:auto}.snk-entity-list--overflow.sc-snk-entity-list::-webkit-scrollbar{width:var(--space--small);min-width:var(--space--small);max-width:var(--space--small)}";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, r as registerInstance, g as getElement } from './index-
|
|
1
|
+
import { h, r as registerInstance, g as getElement } from './index-04f73a26.js';
|
|
2
2
|
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { ModalAction } from '@sankhyalabs/ezui/dist/collection/components/ez-modal-container';
|
|
4
4
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { r as registerInstance,
|
|
1
|
+
import { r as registerInstance, e as createEvent, h, i as forceUpdate, f as Host, g as getElement } from './index-04f73a26.js';
|
|
2
2
|
import { a as FilterGroupCondition, F as FilterOperand } from './index-8acbae97.js';
|
|
3
3
|
import { ApplicationUtils, CheckMode } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
4
4
|
import { ApplicationContext, StringUtils, ElementIDUtils, UserInterface } from '@sankhyalabs/core';
|
|
5
5
|
import { S as SelectedItemType } from './index-620ac460.js';
|
|
6
6
|
import { fieldBuilder } from '@sankhyalabs/ezui/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder';
|
|
7
|
-
import { s as store } from './index-
|
|
7
|
+
import { s as store } from './index-ea250be6.js';
|
|
8
8
|
import { convertType } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
|
|
9
9
|
|
|
10
10
|
const snkExpressionGroupCss = ".sc-snk-expression-group-h{display:block;--snk-expression-group--container-condition--width:184px;--snk-expression-group--container-condition--height:38px;--snk-expression-group--container-condition--border-radius:var(--border--radius-medium, 12px);--snk-expression-group--container-option--width:85px;--snk-expression-group__container-condition--background-and:#66B6A0;--snk-expression-group__container-condition--background-or:#EBC65E;--snk-expression-group__container-expression--padding-left:26px;--snk-expression-group__background-color-dashed:var(--background--body, #fafcff);--ez-text-input__margin-bottom:0px}.snk-expression-group__container-condition.sc-snk-expression-group{width:var(--snk-expression-group--container-condition--width);height:var(--snk-expression-group--container-condition--height);border-radius:var(--snk-expression-group--container-condition--border-radius);z-index:var(--more-visible--2x, 3);padding:var(--space--nano, 2px)}.snk-expression-group__container-option.sc-snk-expression-group{width:var(--snk-expression-group--container-option--width)}.snk-expression-group__container-condition[data-condition=\"AND\"].sc-snk-expression-group{background-color:var(--snk-expression-group__container-condition--background-and)}.snk-expression-group__container-condition[data-condition=\"OR\"].sc-snk-expression-group{background-color:var(--snk-expression-group__container-condition--background-or)}.snk-expression-group__container-expression.sc-snk-expression-group{padding-left:var(--snk-expression-group__container-expression--padding-left)}.dashes.sc-snk-expression-group{z-index:var(--visible, 1);background:var(--snk-expression-group__background-color-dashed);border-left:2px dashed var(--text-secondary, #A2ABB9);position:absolute;width:15px;height:58px;margin-left:-15px;margin-top:-36.5px}.horizontal-dashes.sc-snk-expression-group{z-index:var(--more-visible, 2);border-bottom:2px dashed var(--text-secondary, #A2ABB9);position:absolute;width:15px;height:54px;margin-left:-15px;margin-top:-33.5px}.hidden.sc-snk-expression-group{display:none}";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance,
|
|
2
|
-
import { P as PersonalizedFilterUtils } from './PersonalizedFilterUtils-
|
|
1
|
+
import { r as registerInstance, e as createEvent, h, f as Host } from './index-04f73a26.js';
|
|
2
|
+
import { P as PersonalizedFilterUtils } from './PersonalizedFilterUtils-d2439a9a.js';
|
|
3
3
|
import '@sankhyalabs/core';
|
|
4
4
|
import './filter-item-type.enum-d45e026f.js';
|
|
5
5
|
import './index-8acbae97.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as registerInstance,
|
|
1
|
+
import { r as registerInstance, e as createEvent, h, f as Host, g as getElement, i as forceUpdate } from './index-04f73a26.js';
|
|
2
2
|
import { DataType, StringUtils, ObjectUtils, ElementIDUtils, ErrorException, ApplicationContext, LockManager, LockManagerOperation, DateUtils, MaskFormatter, KeyboardManager, FloatingManager, ArrayUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { EzScrollDirection } from '@sankhyalabs/ezui/dist/collection/components/ez-scroller/EzScrollDirection';
|
|
4
|
-
import { C as ConfigStorage } from './ConfigStorage-
|
|
5
|
-
import { P as PersonalizedFilterUtils } from './PersonalizedFilterUtils-
|
|
4
|
+
import { C as ConfigStorage } from './ConfigStorage-39ac8fef.js';
|
|
5
|
+
import { P as PersonalizedFilterUtils } from './PersonalizedFilterUtils-d2439a9a.js';
|
|
6
6
|
import { toString } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
|
|
7
7
|
import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
|
|
8
8
|
import { F as FilterOperand, D as DefaultFilter } from './index-8acbae97.js';
|
|
@@ -12,8 +12,8 @@ import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
|
12
12
|
import { A as ActionDefaultFilter } from './default-filters-50105e43.js';
|
|
13
13
|
import { F as FilterType } from './filter-type.enum-f6a8fe23.js';
|
|
14
14
|
import { g as getInvalidFilters } from './filter-validate-faf51fa9.js';
|
|
15
|
-
import './form-config-fetcher-
|
|
16
|
-
import './DataFetcher-
|
|
15
|
+
import './form-config-fetcher-7cda6254.js';
|
|
16
|
+
import './DataFetcher-0b9da57d.js';
|
|
17
17
|
import './PrintUtils-3e4ff0f5.js';
|
|
18
18
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
19
19
|
|
|
@@ -256,10 +256,19 @@ const SnkFilterBar = class {
|
|
|
256
256
|
this.isFilterModalOpen = false;
|
|
257
257
|
}
|
|
258
258
|
hasValidValue(item) {
|
|
259
|
-
|
|
259
|
+
var _a, _b;
|
|
260
|
+
if (item.value === undefined || item.value === null) {
|
|
260
261
|
return false;
|
|
261
|
-
|
|
262
|
+
}
|
|
263
|
+
if (item.type === FilterItemType.PERIOD) {
|
|
264
|
+
return (!!((_a = item.value) === null || _a === void 0 ? void 0 : _a.start) || !!((_b = item.value) === null || _b === void 0 ? void 0 : _b.end));
|
|
265
|
+
}
|
|
266
|
+
if (item.groupedItems) {
|
|
267
|
+
return true;
|
|
268
|
+
}
|
|
269
|
+
if (!Array.isArray(item.value)) {
|
|
262
270
|
return true;
|
|
271
|
+
}
|
|
263
272
|
return item.value.some(filterItem => filterItem.check === true);
|
|
264
273
|
}
|
|
265
274
|
observeFilterConfig(newValue, oldValue) {
|
|
@@ -461,7 +470,7 @@ const SnkFilterBar = class {
|
|
|
461
470
|
if (item.type === FilterItemType.DEFAULT_FILTER) {
|
|
462
471
|
return true;
|
|
463
472
|
}
|
|
464
|
-
return this.filterActiveFilter(item) && (item
|
|
473
|
+
return this.filterActiveFilter(item) && this.hasValidValue(item);
|
|
465
474
|
}
|
|
466
475
|
async registryFilterProvider() {
|
|
467
476
|
this.dataUnit.addFilterProvider(this);
|
|
@@ -528,27 +537,35 @@ const SnkFilterBar = class {
|
|
|
528
537
|
}
|
|
529
538
|
normalizeItem(item) {
|
|
530
539
|
const normalized = Object.assign({}, item);
|
|
540
|
+
const isPersonalizedFilter = item.type === FilterItemType.PERSONALIZED;
|
|
541
|
+
const hasNormalizedGroupedItems = (normalized.value === undefined && normalized.groupedItems);
|
|
542
|
+
if (isPersonalizedFilter && hasNormalizedGroupedItems) {
|
|
543
|
+
normalized.value = normalized.groupedItems.filter(groupItem => !!groupItem.visible).length;
|
|
544
|
+
}
|
|
531
545
|
const optionals = ["props", "value", "hardFixed", "fixed"];
|
|
532
546
|
optionals.forEach(prop => {
|
|
547
|
+
if (prop === "value" && isPersonalizedFilter) {
|
|
548
|
+
return;
|
|
549
|
+
}
|
|
533
550
|
if (normalized[prop] == undefined) {
|
|
534
551
|
delete normalized[prop];
|
|
535
552
|
}
|
|
536
553
|
});
|
|
537
|
-
if (
|
|
538
|
-
delete
|
|
554
|
+
if (normalized.value === "" && !isPersonalizedFilter) {
|
|
555
|
+
delete normalized.value;
|
|
539
556
|
}
|
|
540
557
|
return normalized;
|
|
541
558
|
}
|
|
542
559
|
updateFilter(newItem) {
|
|
560
|
+
const normalizedNewItem = this.normalizeItem(newItem);
|
|
543
561
|
let config = this.filterConfig.map(item => {
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
return newItem;
|
|
562
|
+
if (item.id !== normalizedNewItem.id) {
|
|
563
|
+
return item;
|
|
564
|
+
}
|
|
565
|
+
if (ObjectUtils.objectToString(item) == ObjectUtils.objectToString(normalizedNewItem)) {
|
|
566
|
+
this.calculateUpdateSequence(normalizedNewItem);
|
|
550
567
|
}
|
|
551
|
-
return
|
|
568
|
+
return normalizedNewItem;
|
|
552
569
|
}).sort((a, b) => this._filtersComparator(a, b));
|
|
553
570
|
if (this.filterCustomConfigInterceptor) {
|
|
554
571
|
config = this.filterCustomConfigInterceptor(config);
|
|
@@ -714,7 +731,7 @@ const SnkFilterBar = class {
|
|
|
714
731
|
return itemA.originOrder - itemB.originOrder;
|
|
715
732
|
});
|
|
716
733
|
if (this.mode !== "regular") {
|
|
717
|
-
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, this.getMessage("snkFilterBar.filters")), onClick: this.showFilterModal.bind(this) })), h("snk-filter-modal", { opened: this.isFilterModalOpen, filterConfig: this.filterConfig, configName: this.configName, disablePersonalizedFilter: this.disablePersonalizedFilter, getMessage: (key, props) => this.getMessage(key, props), applyFilters: (filters) => this.applyFiltersFromModal(filters), closeModal: () => this.closeFilterModal(), addPersonalizedFilter: (isDefault) => this.addPersonalizedFilter(isDefault), editPersonalizedFilter: (id, isDefault) => this.editPersonalizedFilter(id, isDefault), deletePersonalizedFilter: (filter, configName, isDefault) => this.deletePersonalizedFilter(filter, FilterItemType.PERSONALIZED, configName, isDefault), filterCustomConfigInterceptor: this.filterCustomConfigInterceptor })));
|
|
734
|
+
return (h(Host, { "data-mode": this.mode }, this.getPersonalizedFilterVariableItems(), this.mode === 'button' && (h("ez-button", { class: "ez-margin-left--medium ez-margin-top--extra-small", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, this.getMessage("snkFilterBar.filters")), onClick: this.showFilterModal.bind(this) })), h("snk-filter-modal", { opened: this.isFilterModalOpen, filterConfig: this.filterConfig, configName: this.configName, disablePersonalizedFilter: this.disablePersonalizedFilter, getMessage: (key, props) => this.getMessage(key, props), applyFilters: (filters) => this.applyFiltersFromModal(filters), closeModal: () => this.closeFilterModal(), addPersonalizedFilter: (isDefault) => this.addPersonalizedFilter(isDefault), editPersonalizedFilter: (id, isDefault) => this.editPersonalizedFilter(id, isDefault), deletePersonalizedFilter: (filter, configName, isDefault) => this.deletePersonalizedFilter(filter, FilterItemType.PERSONALIZED, configName, isDefault), filterCustomConfigInterceptor: this.filterCustomConfigInterceptor })));
|
|
718
735
|
}
|
|
719
736
|
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 ez-margin-top--extra-small", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, this.getMessage("snkFilterBar.filters")), onClick: this.showFilterModal.bind(this) }, h("ez-icon", { slot: "leftIcon", iconName: "plus", class: "ez-padding-right--small" })), h("snk-filter-modal", { opened: this.isFilterModalOpen, filterConfig: this.filterConfig, configName: this.configName, disablePersonalizedFilter: this.disablePersonalizedFilter, getMessage: (key, props) => this.getMessage(key, props), applyFilters: (filters) => this.applyFiltersFromModal(filters), closeModal: () => this.closeFilterModal(), addPersonalizedFilter: (isDefault) => this.addPersonalizedFilter(isDefault), editPersonalizedFilter: (id, isDefault) => this.editPersonalizedFilter(id, isDefault), deletePersonalizedFilter: (filter, configName, isDefault) => this.deletePersonalizedFilter(filter, FilterItemType.PERSONALIZED, configName, isDefault), filterCustomConfigInterceptor: this.filterCustomConfigInterceptor })));
|
|
720
737
|
}
|
|
@@ -725,7 +742,7 @@ const SnkFilterBar = class {
|
|
|
725
742
|
};
|
|
726
743
|
SnkFilterBar.style = snkFilterBarCss;
|
|
727
744
|
|
|
728
|
-
const snkFilterItemCss = "ez-popover-core.sc-snk-filter-item{--ez-popover__box--z-index:var(--elevation--20, 20);--ez-popover__box--overlay-z-index:var(--elevation--16, 16)}";
|
|
745
|
+
const snkFilterItemCss = "ez-popover-core.sc-snk-filter-item{--ez-popover__box--z-index:var(--elevation--20, 20);--ez-popover__box--overlay-z-index:var(--elevation--16, 16)}ez-chip.sc-snk-filter-item{--ez-label-chip__label__container--margin:var(--space--2, 2px)}";
|
|
729
746
|
|
|
730
747
|
const SnkFilterItem = class {
|
|
731
748
|
constructor(hostRef) {
|
|
@@ -744,8 +761,10 @@ const SnkFilterItem = class {
|
|
|
744
761
|
/**
|
|
745
762
|
* Emitido quando o estado do filtro é alterado.
|
|
746
763
|
*/
|
|
747
|
-
filterChangeListener() {
|
|
764
|
+
filterChangeListener(event) {
|
|
748
765
|
this.hideDetail();
|
|
766
|
+
// Re-emite o evento para o pai (snk-filter-bar)
|
|
767
|
+
this.filterChange.emit(event.detail);
|
|
749
768
|
}
|
|
750
769
|
/**
|
|
751
770
|
* Exibe os detalhes de um item da lista.
|
|
@@ -946,6 +965,10 @@ const SnkFilterItem = class {
|
|
|
946
965
|
return ((_a = list === null || list === void 0 ? void 0 : list.filter((val) => val === null || val === void 0 ? void 0 : val.check)) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
947
966
|
}
|
|
948
967
|
hasActiveValue(config) {
|
|
968
|
+
var _a, _b;
|
|
969
|
+
if (config.type === FilterItemType.PERIOD) {
|
|
970
|
+
return (!!((_a = config.value) === null || _a === void 0 ? void 0 : _a.start) || !!((_b = config.value) === null || _b === void 0 ? void 0 : _b.end));
|
|
971
|
+
}
|
|
949
972
|
return (config.type !== FilterItemType.MULTI_LIST && config.value !== undefined) || this.hasActiveElements(config.value);
|
|
950
973
|
}
|
|
951
974
|
getEnabledChip() {
|
|
@@ -1171,11 +1194,12 @@ const SnkFilterList = class {
|
|
|
1171
1194
|
get _element() { return getElement(this); }
|
|
1172
1195
|
};
|
|
1173
1196
|
|
|
1174
|
-
const snkFilterModalCss = "ez-modal{--ez-modal-content-padding:24px 12px}.snk-filter-modal__container{min-width:344px;overflow:hidden}.snk-filter-modal__content{display:flex;flex-direction:column;gap:var(--space--medium, 12px);padding-right:var(--space--3xs, 4px)}.snk-filter-modal__collapsible-box{border:var(--border--small, 1px solid) var(--color--strokes, #DCE0E8);border-radius:var(--border--radius-medium);padding:var(--space--medium, 12px) var(--space--small, 6px)}.snk-filter-modal__rendered-items{max-height:760px}.snk-filter-modal__rendered-items::-webkit-scrollbar{width:var(--space--small);min-width:var(--space--small);max-width:var(--space--small)}";
|
|
1197
|
+
const snkFilterModalCss = "ez-modal{--ez-modal-content-padding:24px 12px;--ez-modal-content-min-width:370px}.snk-filter-modal__container{min-width:344px;overflow:hidden}.snk-filter-modal__content{display:flex;flex-direction:column;gap:var(--space--medium, 12px);padding-right:var(--space--3xs, 4px)}.snk-filter-modal__collapsible-box{border:var(--border--small, 1px solid) var(--color--strokes, #DCE0E8);border-radius:var(--border--radius-medium);padding:var(--space--medium, 12px) var(--space--small, 6px)}.snk-filter-modal__rendered-items{max-height:760px}.snk-filter-modal__rendered-items::-webkit-scrollbar{width:var(--space--small);min-width:var(--space--small);max-width:var(--space--small)}";
|
|
1175
1198
|
|
|
1176
1199
|
const SnkFilterModal = class {
|
|
1177
1200
|
constructor(hostRef) {
|
|
1178
1201
|
registerInstance(this, hostRef);
|
|
1202
|
+
this._isUserSup = false;
|
|
1179
1203
|
this.filters = [];
|
|
1180
1204
|
this.filtersWithError = [];
|
|
1181
1205
|
this.getMessage = undefined;
|
|
@@ -1231,6 +1255,7 @@ const SnkFilterModal = class {
|
|
|
1231
1255
|
this.handleClearCustomFilters(customFilters);
|
|
1232
1256
|
this.handleClearOthersFilters(otherFilters);
|
|
1233
1257
|
multiListFilters.forEach(multiListFilter => this.handleClearSigleFilter(multiListFilter));
|
|
1258
|
+
forceUpdate(this);
|
|
1234
1259
|
}
|
|
1235
1260
|
handleClearOthersFilters(otherFilters) {
|
|
1236
1261
|
this.filters = this.filters.map(filter => otherFilters.includes(filter) ? (Object.assign(Object.assign({}, filter), { value: undefined })) : filter);
|
|
@@ -1402,7 +1427,7 @@ const SnkFilterModal = class {
|
|
|
1402
1427
|
getIformedFiltersCount(listItems) {
|
|
1403
1428
|
let countInformedItens = 0;
|
|
1404
1429
|
listItems.forEach(localItem => {
|
|
1405
|
-
var _a, _b, _c, _d, _e, _f;
|
|
1430
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
1406
1431
|
const item = this.filterConfig.find(filter => filter.id === localItem.id);
|
|
1407
1432
|
if (FilterItemType.MULTI_LIST === item.type) {
|
|
1408
1433
|
countInformedItens += (_e = (_d = (_c = ((_b = (_a = item.value) === null || _a === void 0 ? void 0 : _a.elements) !== null && _b !== void 0 ? _b : item.value)) === null || _c === void 0 ? void 0 : _c.filter(value => value === null || value === void 0 ? void 0 : value.check)) === null || _d === void 0 ? void 0 : _d.length) !== null && _e !== void 0 ? _e : 0;
|
|
@@ -1414,6 +1439,12 @@ const SnkFilterModal = class {
|
|
|
1414
1439
|
.map(([key, _]) => key).length;
|
|
1415
1440
|
return;
|
|
1416
1441
|
}
|
|
1442
|
+
if (FilterItemType.PERIOD === item.type) {
|
|
1443
|
+
if (!!((_g = item.value) === null || _g === void 0 ? void 0 : _g.start) || !!((_h = item.value) === null || _h === void 0 ? void 0 : _h.end)) {
|
|
1444
|
+
countInformedItens++;
|
|
1445
|
+
}
|
|
1446
|
+
return;
|
|
1447
|
+
}
|
|
1417
1448
|
if (item.groupedItems != undefined) {
|
|
1418
1449
|
countInformedItens = item.groupedItems.filter(item => item.visible).length;
|
|
1419
1450
|
return;
|
|
@@ -1462,8 +1493,9 @@ const SnkFilterModal = class {
|
|
|
1462
1493
|
const defaultFilter = filters.find((item) => item.id === DefaultFilter.id);
|
|
1463
1494
|
return defaultFilter;
|
|
1464
1495
|
}
|
|
1465
|
-
componentWillLoad() {
|
|
1496
|
+
async componentWillLoad() {
|
|
1466
1497
|
this._application = ApplicationContext.getContextValue('__SNK__APPLICATION__');
|
|
1498
|
+
this._isUserSup = await this._application.isUserSup();
|
|
1467
1499
|
this.filters = ObjectUtils.copy(this.filterConfig);
|
|
1468
1500
|
}
|
|
1469
1501
|
componentWillRender() {
|
|
@@ -1475,11 +1507,12 @@ const SnkFilterModal = class {
|
|
|
1475
1507
|
this.validateFilters();
|
|
1476
1508
|
}
|
|
1477
1509
|
render() {
|
|
1478
|
-
this._defaultFilter = this.getDefaultFilter(this.filters);
|
|
1510
|
+
this._defaultFilter = this._isUserSup ? this.getDefaultFilter(this.filters) : undefined;
|
|
1479
1511
|
const customFilters = this.getCustomFilter(this.filters);
|
|
1480
1512
|
const quickFilters = this.filters.filter(filter => filter.filterType === FilterType.QUICK_FILTER);
|
|
1481
1513
|
const otherFilters = this.filters.filter(filter => filter.filterType === FilterType.OTHER_FILTERS);
|
|
1482
|
-
return (h("ez-modal", { opened: this.opened, modalSize: "col--sd-3", align: "right", heightMode: "full", closeEsc: true }, h("ez-modal-container", { class: "snk-filter-modal__container", modalTitle: this._modalTitle, cancelButtonLabel: this._cancelButtonLabel, okButtonLabel: this._okButtonLabel, onEzModalAction: this.modalActionListener.bind(this) }, h("div", { class: "snk-filter-modal__content ez-col--sd-12" },
|
|
1514
|
+
return (h("ez-modal", { opened: this.opened, modalSize: "col--sd-3", align: "right", heightMode: "full", closeEsc: true }, h("ez-modal-container", { class: "snk-filter-modal__container", modalTitle: this._modalTitle, cancelButtonLabel: this._cancelButtonLabel, okButtonLabel: this._okButtonLabel, onEzModalAction: this.modalActionListener.bind(this) }, h("div", { class: "snk-filter-modal__content ez-col--sd-12" }, this._isUserSup &&
|
|
1515
|
+
h("snk-default-filter", { getMessage: this.getCustomMessage.bind(this), hasDefaultFilter: !!this._defaultFilter, onActionSelected: this.handleActionSelectedDefaultFilter.bind(this) }), !this.disablePersonalizedFilter && this.renderCollapsibleFilterBox(this.getCustomMessage('customFilters'), customFilters, false, false), this.renderCollapsibleFilterBox(this.getCustomMessage('quickFilters'), quickFilters, false), otherFilters.map(filter => this.renderCollapsibleFilterBox(filter.label, [filter], true))))));
|
|
1483
1516
|
}
|
|
1484
1517
|
get _element() { return getElement(this); }
|
|
1485
1518
|
static get watchers() { return {
|