@sankhyalabs/sankhyablocks 10.1.0-dev.2 → 10.1.0-dev.21
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 +100 -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 +14 -21
- 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 +105 -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 +23 -12
- 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 +94 -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 +6 -12
- 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 +100 -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 +14 -21
- 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-2a33d4cf.entry.js +1 -0
- 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-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-7345782c.entry.js → p-f921270b.entry.js} +1 -1
- package/dist/sankhyablocks/p-fa087ab2.entry.js +11 -0
- 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 +4 -1
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +12 -4
- package/dist/types/components.d.ts +113 -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
|
@@ -62,7 +62,9 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
62
62
|
constructor() {
|
|
63
63
|
super();
|
|
64
64
|
this.__registerHost();
|
|
65
|
+
this.snkShowGuide = createEvent(this, "snkShowGuide", 7);
|
|
65
66
|
this.snkMasterFormConfigChange = createEvent(this, "snkMasterFormConfigChange", 7);
|
|
67
|
+
this.formConfigVisibilityChanged = createEvent(this, "formConfigVisibilityChanged", 7);
|
|
66
68
|
this.exit = createEvent(this, "exit", 7);
|
|
67
69
|
this.actionClick = createEvent(this, "actionClick", 7);
|
|
68
70
|
this.formItemsReady = createEvent(this, "formItemsReady", 7);
|
|
@@ -85,6 +87,7 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
85
87
|
this.enableGridInsert = false;
|
|
86
88
|
this.ignoreReadOnlyFormFields = undefined;
|
|
87
89
|
this.getCustomTitle = undefined;
|
|
90
|
+
this.customGuidesConfig = [];
|
|
88
91
|
this._hasToCreateFieldSearch = true;
|
|
89
92
|
this._breadcrumbItems = [];
|
|
90
93
|
this._guides = undefined;
|
|
@@ -99,6 +102,13 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
99
102
|
observeDataUnit() {
|
|
100
103
|
this.loadGuides(true);
|
|
101
104
|
}
|
|
105
|
+
async observeFormConfigManager(value) {
|
|
106
|
+
const showFormConfig = !!value;
|
|
107
|
+
await this._viewStack.show(showFormConfig ?
|
|
108
|
+
GUIDES_VIEWER_VIEW_MODE.CONFIG :
|
|
109
|
+
GUIDES_VIEWER_VIEW_MODE.GUIDES);
|
|
110
|
+
this.formConfigVisibilityChanged.emit(showFormConfig);
|
|
111
|
+
}
|
|
102
112
|
observeDataState(newValue, oldValue) {
|
|
103
113
|
var _a, _b, _c, _d, _e, _f;
|
|
104
114
|
const newRecordsIds = (_b = (_a = newValue === null || newValue === void 0 ? void 0 : newValue.selectionInfo) === null || _a === void 0 ? void 0 : _a.recordIds) !== null && _b !== void 0 ? _b : (_c = newValue === null || newValue === void 0 ? void 0 : newValue.selectedRecord) === null || _c === void 0 ? void 0 : _c['__record__id__'];
|
|
@@ -147,7 +157,8 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
147
157
|
* Atribui o foco para o componente.
|
|
148
158
|
*/
|
|
149
159
|
async setFocus() {
|
|
150
|
-
|
|
160
|
+
var _a;
|
|
161
|
+
(_a = this._container) === null || _a === void 0 ? void 0 : _a.focus();
|
|
151
162
|
}
|
|
152
163
|
/**
|
|
153
164
|
* Recarrega os guias baseada nos metadados atuais.
|
|
@@ -197,7 +208,7 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
197
208
|
if (!this._configManager.isLoaded) {
|
|
198
209
|
return;
|
|
199
210
|
}
|
|
200
|
-
this._masterFormMetadata = buildFormMetadata(this.masterFormConfig, this.dataUnit, true);
|
|
211
|
+
this._masterFormMetadata = buildFormMetadata(this.masterFormConfig, this.dataUnit, true, this.customGuidesConfig);
|
|
201
212
|
const allSheets = this._masterFormMetadata.getAllSheets();
|
|
202
213
|
const currentRecord = this.dataUnit.getSelectedRecord();
|
|
203
214
|
const disableDetails = this.hasToDisableDetails(currentRecord);
|
|
@@ -208,6 +219,13 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
208
219
|
item.tooltip = this.getMessage("snkCrud.detail.tooltip.needSingleSelection");
|
|
209
220
|
item.disabled = true;
|
|
210
221
|
}
|
|
222
|
+
if (sheet.isCustom && sheet.ctxProps) {
|
|
223
|
+
Object.entries(sheet.ctxProps).forEach(([key, value]) => {
|
|
224
|
+
if (value !== undefined) {
|
|
225
|
+
item[key] = value;
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
}
|
|
211
229
|
guides.push(item);
|
|
212
230
|
});
|
|
213
231
|
this._guides = guides;
|
|
@@ -343,38 +361,52 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
343
361
|
return `${this.entityPath}/${entityName}`;
|
|
344
362
|
}
|
|
345
363
|
getContent() {
|
|
346
|
-
var _a, _b, _c, _d, _e;
|
|
347
364
|
if (!this.selectedGuide) {
|
|
365
|
+
this.snkShowGuide.emit(undefined);
|
|
348
366
|
return;
|
|
349
367
|
}
|
|
350
368
|
const guideId = this.selectedGuide.id;
|
|
351
|
-
|
|
369
|
+
this.snkShowGuide.emit(guideId);
|
|
370
|
+
if (this.isCustomGuide(guideId)) {
|
|
371
|
+
return h("slot", { name: guideId });
|
|
372
|
+
}
|
|
352
373
|
const levels = guideId.split("::");
|
|
353
374
|
const currentLevel = levels.pop();
|
|
354
375
|
const childEntityName = FormMetadata.getDetailName(currentLevel);
|
|
355
376
|
let detailId = guideId;
|
|
356
|
-
if (childEntityName
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
377
|
+
if (this.isDetailGuide(childEntityName, levels)) {
|
|
378
|
+
return this.buildDetailGuideContent(guideId, detailId, levels, childEntityName);
|
|
379
|
+
}
|
|
380
|
+
return this.buildFormViewGuideContent(guideId);
|
|
381
|
+
}
|
|
382
|
+
buildFormViewGuideContent(cardId) {
|
|
383
|
+
var _a, _b, _c, _d;
|
|
384
|
+
const sheet = this._masterFormMetadata.getSheet(cardId);
|
|
385
|
+
if (!sheet)
|
|
386
|
+
return;
|
|
387
|
+
const cardConfig = (_b = (_a = this.masterFormConfig) === null || _a === void 0 ? void 0 : _a.cardsState) === null || _b === void 0 ? void 0 : _b.get(cardId);
|
|
388
|
+
return (h("snk-form-view", { ref: ref => this._mainForm = ref, fixed: cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed, summaryFields: (_d = (_c = this.masterFormConfig) === null || _c === void 0 ? void 0 : _c.summary) === null || _d === void 0 ? void 0 : _d.get(cardId), name: cardId, label: sheet.label, fields: sheet.fields, dataUnit: this.dataUnit, formMetadata: this._masterFormMetadata, recordsValidator: this.recordsValidator, fieldToFocus: this._fieldToGetFocus, key: cardId, onSnkRequestClearFieldToFocus: _ => this.clearFieldToFocusHandler(), customEditors: this._customEditors, fieldsProps: this._fieldsProps, fieldSearch: this._fieldSearch }, this.presentationMode == PresentationMode.SECONDARY && this.buildTaskBar()));
|
|
389
|
+
}
|
|
390
|
+
isDetailGuide(childEntityName, levels) {
|
|
391
|
+
return childEntityName || levels.length > 0;
|
|
392
|
+
}
|
|
393
|
+
buildDetailGuideContent(guideId, detailId, levels, childEntityName) {
|
|
394
|
+
var _a;
|
|
395
|
+
let formName;
|
|
396
|
+
let detailBranch;
|
|
397
|
+
if (guideId.includes(FORM_NAME_PREFIX)) {
|
|
398
|
+
[detailId, formName] = guideId.split(FORM_NAME_PREFIX);
|
|
399
|
+
const pathSize = ((_a = this._breadcrumbItems) === null || _a === void 0 ? void 0 : _a.length) || 0;
|
|
400
|
+
detailBranch = pathSize > 1 ? this._breadcrumbItems[pathSize - 2] : this.selectedGuide;
|
|
368
401
|
}
|
|
369
402
|
else {
|
|
370
|
-
|
|
371
|
-
const sheet = this._masterFormMetadata.getSheet(cardId);
|
|
372
|
-
if (sheet) {
|
|
373
|
-
const cardConfig = (_c = (_b = this.masterFormConfig) === null || _b === void 0 ? void 0 : _b.cardsState) === null || _c === void 0 ? void 0 : _c.get(cardId);
|
|
374
|
-
content = h("snk-form-view", { ref: ref => this._mainForm = ref, fixed: cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed, summaryFields: (_e = (_d = this.masterFormConfig) === null || _d === void 0 ? void 0 : _d.summary) === null || _e === void 0 ? void 0 : _e.get(cardId), name: cardId, label: sheet.label, fields: sheet.fields, dataUnit: this.dataUnit, formMetadata: this._masterFormMetadata, recordsValidator: this.recordsValidator, fieldToFocus: this._fieldToGetFocus, key: guideId, onSnkRequestClearFieldToFocus: _ => this.clearFieldToFocusHandler(), customEditors: this._customEditors, fieldsProps: this._fieldsProps, fieldSearch: this._fieldSearch }, this.presentationMode == PresentationMode.SECONDARY && this.buildTaskBar());
|
|
375
|
-
}
|
|
403
|
+
detailBranch = this.selectedGuide;
|
|
376
404
|
}
|
|
377
|
-
return
|
|
405
|
+
return this.wrapDetail(levels, h("snk-detail-view", { ref: (ref) => this._currentDetail = ref, dataUnitName: this.getDataUnitName(levels, childEntityName), onSnkDetailGuidesChange: (evt) => this.updateGuide(evt.detail), entityName: childEntityName, selectedForm: formName, branchGuide: detailBranch, guideItemPath: this._breadcrumbItems, key: `detail${detailId}`, canEdit: this.canEdit, onSnkSwitchGuide: evt => this._guideNavigator.selectGuide(evt.detail), resourceID: this.resourceID, taskbarCustomContainerId: this.detailTaskbarCustomContainerId, customEditors: this._customEditors, customRenders: this._customRenders, presentationMode: this.presentationMode }));
|
|
406
|
+
}
|
|
407
|
+
isCustomGuide(guideId) {
|
|
408
|
+
var _a;
|
|
409
|
+
return (_a = this.customGuidesConfig) === null || _a === void 0 ? void 0 : _a.map(g => g.id).includes(guideId);
|
|
378
410
|
}
|
|
379
411
|
onBreadcrumbClickHandler(item) {
|
|
380
412
|
if ((item === null || item === void 0 ? void 0 : item.id) == undefined) {
|
|
@@ -512,7 +544,7 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
512
544
|
}
|
|
513
545
|
buildTaskBar() {
|
|
514
546
|
var _a;
|
|
515
|
-
return h("div", { class: `snk-guides-viewer__header-taskbar ${this.presentationMode != PresentationMode.SECONDARY ? 'ez-align--right' : 'ez-padding-bottom--medium'}` }, h("snk-taskbar", { key: "guideViewerTaskbar", "data-element-id": "guideViewer", configName: this.configName, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, actionsList: this.getActionsList(), actionsSettingsList: this.getSettingsListForm(), messagesBuilder: this.messagesBuilder, presentationMode: this.presentationMode, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? TaskbarElement.SAVE : TaskbarElement.INSERT, "data-taskbar-owner": "master", dataUnit: this.dataUnit, resourceID: this.resourceID, customSlotId: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS", alignRigth: true }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" })));
|
|
547
|
+
return h("div", { class: `snk-guides-viewer__header-taskbar ${this.presentationMode != PresentationMode.SECONDARY ? 'ez-align--right' : 'ez-padding-bottom--medium'}` }, h("snk-taskbar", { key: "guideViewerTaskbar", "data-element-id": "guideViewer", configName: this.configName, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, actionsList: this.getActionsList(), actionsSettingsList: this.getSettingsListForm(), messagesBuilder: this.messagesBuilder, presentationMode: this.presentationMode, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? TaskbarElement.SAVE : TaskbarElement.INSERT, "data-taskbar-owner": "master", dataUnit: this.dataUnit, resourceID: this.resourceID, customSlotId: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS", additionalSlotId: "GUIDES_VIEWER_DYNAMIC_SEARCH", alignRigth: true }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GUIDES_VIEWER_DYNAMIC_SEARCH" })));
|
|
516
548
|
}
|
|
517
549
|
async dataUnitActionHandler(action) {
|
|
518
550
|
var _a;
|
|
@@ -586,6 +618,9 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
586
618
|
const labels = selectedRecords.map(record => this.messagesBuilder.getMessage("snkCrud.title", record));
|
|
587
619
|
return `[${labels.join(", ")}]`;
|
|
588
620
|
}
|
|
621
|
+
getCustomGuidesConfig() {
|
|
622
|
+
return this._currentDetail ? [] : this.customGuidesConfig;
|
|
623
|
+
}
|
|
589
624
|
componentDidLoad() {
|
|
590
625
|
this.dataUnit.subscribe(this.dataUnitActionHandler.bind(this));
|
|
591
626
|
this.initKeyboardManager();
|
|
@@ -602,17 +637,14 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
602
637
|
await this._mainForm.showSearchField();
|
|
603
638
|
}, { description: this.getMessage("snkSimpleCrud.findFields"), element: this._element });
|
|
604
639
|
}
|
|
605
|
-
|
|
606
|
-
var _a, _b;
|
|
640
|
+
renderFormConfig() {
|
|
607
641
|
if (this._formEditorConfigManager != undefined) {
|
|
608
|
-
return (h("snk-form-config", { ref: ref => this._container = ref, tabindex: -1, dataUnit: this._formEditorDataUnit, messagesBuilder: this.messagesBuilder, configManager: this._formEditorConfigManager, onConfigClose: () => this._formEditorConfigManager = null }));
|
|
642
|
+
return (h("snk-form-config", { ref: ref => this._container = ref, tabindex: -1, dataUnit: this._formEditorDataUnit, messagesBuilder: this.messagesBuilder, configManager: this._formEditorConfigManager, onConfigClose: () => this._formEditorConfigManager = null, customGuidesConfig: this.getCustomGuidesConfig() }));
|
|
609
643
|
}
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
this.
|
|
614
|
-
const showGuides = this._guides && (this._guides.length > 1);
|
|
615
|
-
return (h("section", { class: "snk-guides-viewer", ref: ref => this._container = ref, tabindex: -1 }, h("div", { class: "ez-row snk-guides-viewer__header" }, h("div", { class: "snk-guides-viewer__header-breadcrumb ez-flex--align-items-center ez-flex-item--align-center ez-padding-left--large", key: "header" }, h("ez-button", { onClick: () => this.exitViewer(), title: this.getMessage("snkCrud.goBackTitle"), mode: "icon", iconName: "arrow_back", class: "ez-padding-right--medium", size: "small" }), h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto" }, h("h1", { class: "ez-title ez-title--primary ez-title--xlarge", title: this.getTitleTooltip() }, this.getTitle()), ((_a = this._breadcrumbItems) === null || _a === void 0 ? void 0 : _a.length) > 1 &&
|
|
644
|
+
}
|
|
645
|
+
renderGuidesNavigator(showGuides) {
|
|
646
|
+
var _a, _b;
|
|
647
|
+
return (h("section", { class: "snk-guides-viewer", ref: ref => this._container = ref, tabIndex: -1 }, h("div", { class: "ez-row snk-guides-viewer__header" }, h("div", { class: "snk-guides-viewer__header-breadcrumb ez-flex--align-items-center ez-flex-item--align-center ez-padding-left--large", key: "header" }, h("ez-button", { onClick: () => this.exitViewer(), title: this.getMessage("snkCrud.goBackTitle"), mode: "icon", iconName: "arrow_back", class: "ez-padding-right--medium", size: "small" }), h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto" }, h("h1", { class: "ez-title ez-title--primary ez-title--xlarge", title: this.getTitleTooltip() }, this.getTitle()), ((_a = this._breadcrumbItems) === null || _a === void 0 ? void 0 : _a.length) > 1 &&
|
|
616
648
|
h("div", { class: "ez-margin-top--extra-small" }, h("ez-breadcrumb", Object.assign({ items: this._breadcrumbItems, onSelectedItem: (evt) => this.onBreadcrumbClickHandler(evt === null || evt === void 0 ? void 0 : evt.detail) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("breadcrumb")}` }))))), this.presentationMode != PresentationMode.SECONDARY && this.buildTaskBar()), h("div", { class: "snk-guides-viewer__container" }, showGuides ?
|
|
617
649
|
h("ez-guide-navigator", { ref: (ref) => this._guideNavigator = ref, class: "snk-guides-viewer__guide-navigator", items: this._guides, selectedId: this.selectedGuide ? this.selectedGuide.id : undefined, onEzSelectionChange: evt => this.updateSelectedGuideHandler(evt.detail) })
|
|
618
650
|
:
|
|
@@ -628,9 +660,18 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
628
660
|
fieldsProps: this._fieldsProps
|
|
629
661
|
}), this.getContent())), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this.getConfigViewMode(), onConfigSelected: (evt) => this.changeConfigViewMode(evt.detail), messagesBuilder: this.messagesBuilder, onOpenConfig: (evt) => this.openConfig(evt.detail), resourceID: this.resourceID })));
|
|
630
662
|
}
|
|
663
|
+
render() {
|
|
664
|
+
if (!this.dataUnit || !this._configManager.isLoaded) {
|
|
665
|
+
return;
|
|
666
|
+
}
|
|
667
|
+
this.loadTaskbarProcessor();
|
|
668
|
+
const showGuides = this._guides && (this._guides.length > 1);
|
|
669
|
+
return (h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "guides-viewer-stack" }, h("stack-item", null, this.renderGuidesNavigator(showGuides)), h("stack-item", null, this.renderFormConfig())));
|
|
670
|
+
}
|
|
631
671
|
get _element() { return this; }
|
|
632
672
|
static get watchers() { return {
|
|
633
673
|
"dataUnit": ["observeDataUnit"],
|
|
674
|
+
"_formEditorConfigManager": ["observeFormConfigManager"],
|
|
634
675
|
"dataState": ["observeDataState"],
|
|
635
676
|
"masterFormConfig": ["observeMasterFormConfig"]
|
|
636
677
|
}; }
|
|
@@ -643,7 +684,7 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
643
684
|
"actionsList": [16],
|
|
644
685
|
"recordsValidator": [16],
|
|
645
686
|
"masterFormConfig": [1040],
|
|
646
|
-
"selectedGuide": [
|
|
687
|
+
"selectedGuide": [1040],
|
|
647
688
|
"taskbarManager": [16],
|
|
648
689
|
"messagesBuilder": [1040],
|
|
649
690
|
"canEdit": [4, "can-edit"],
|
|
@@ -654,6 +695,7 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
654
695
|
"enableGridInsert": [4, "enable-grid-insert"],
|
|
655
696
|
"ignoreReadOnlyFormFields": [4, "ignore-read-only-form-fields"],
|
|
656
697
|
"getCustomTitle": [16],
|
|
698
|
+
"customGuidesConfig": [16],
|
|
657
699
|
"_hasToCreateFieldSearch": [32],
|
|
658
700
|
"_breadcrumbItems": [32],
|
|
659
701
|
"_guides": [32],
|
|
@@ -677,6 +719,11 @@ var TASKBAR_ID;
|
|
|
677
719
|
TASKBAR_ID["MUTIPLE_EDITION"] = "snkGuideViewer.multiple_edition";
|
|
678
720
|
TASKBAR_ID["REGULAR"] = "snkGuideViewer.regular";
|
|
679
721
|
})(TASKBAR_ID || (TASKBAR_ID = {}));
|
|
722
|
+
var GUIDES_VIEWER_VIEW_MODE;
|
|
723
|
+
(function (GUIDES_VIEWER_VIEW_MODE) {
|
|
724
|
+
GUIDES_VIEWER_VIEW_MODE[GUIDES_VIEWER_VIEW_MODE["GUIDES"] = 0] = "GUIDES";
|
|
725
|
+
GUIDES_VIEWER_VIEW_MODE[GUIDES_VIEWER_VIEW_MODE["CONFIG"] = 1] = "CONFIG";
|
|
726
|
+
})(GUIDES_VIEWER_VIEW_MODE || (GUIDES_VIEWER_VIEW_MODE = {}));
|
|
680
727
|
function defineCustomElement$1() {
|
|
681
728
|
if (typeof customElements === "undefined") {
|
|
682
729
|
return;
|
|
@@ -260,10 +260,19 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
260
260
|
this.isFilterModalOpen = false;
|
|
261
261
|
}
|
|
262
262
|
hasValidValue(item) {
|
|
263
|
-
|
|
263
|
+
var _a, _b;
|
|
264
|
+
if (item.value === undefined || item.value === null) {
|
|
264
265
|
return false;
|
|
265
|
-
|
|
266
|
+
}
|
|
267
|
+
if (item.type === FilterItemType.PERIOD) {
|
|
268
|
+
return (!!((_a = item.value) === null || _a === void 0 ? void 0 : _a.start) || !!((_b = item.value) === null || _b === void 0 ? void 0 : _b.end));
|
|
269
|
+
}
|
|
270
|
+
if (item.groupedItems) {
|
|
266
271
|
return true;
|
|
272
|
+
}
|
|
273
|
+
if (!Array.isArray(item.value)) {
|
|
274
|
+
return true;
|
|
275
|
+
}
|
|
267
276
|
return item.value.some(filterItem => filterItem.check === true);
|
|
268
277
|
}
|
|
269
278
|
observeFilterConfig(newValue, oldValue) {
|
|
@@ -465,7 +474,7 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
465
474
|
if (item.type === FilterItemType.DEFAULT_FILTER) {
|
|
466
475
|
return true;
|
|
467
476
|
}
|
|
468
|
-
return this.filterActiveFilter(item) && (item
|
|
477
|
+
return this.filterActiveFilter(item) && this.hasValidValue(item);
|
|
469
478
|
}
|
|
470
479
|
async registryFilterProvider() {
|
|
471
480
|
this.dataUnit.addFilterProvider(this);
|
|
@@ -532,27 +541,35 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
532
541
|
}
|
|
533
542
|
normalizeItem(item) {
|
|
534
543
|
const normalized = Object.assign({}, item);
|
|
544
|
+
const isPersonalizedFilter = item.type === FilterItemType.PERSONALIZED;
|
|
545
|
+
const hasNormalizedGroupedItems = (normalized.value === undefined && normalized.groupedItems);
|
|
546
|
+
if (isPersonalizedFilter && hasNormalizedGroupedItems) {
|
|
547
|
+
normalized.value = normalized.groupedItems.filter(groupItem => !!groupItem.visible).length;
|
|
548
|
+
}
|
|
535
549
|
const optionals = ["props", "value", "hardFixed", "fixed"];
|
|
536
550
|
optionals.forEach(prop => {
|
|
551
|
+
if (prop === "value" && isPersonalizedFilter) {
|
|
552
|
+
return;
|
|
553
|
+
}
|
|
537
554
|
if (normalized[prop] == undefined) {
|
|
538
555
|
delete normalized[prop];
|
|
539
556
|
}
|
|
540
557
|
});
|
|
541
|
-
if (
|
|
542
|
-
delete
|
|
558
|
+
if (normalized.value === "" && !isPersonalizedFilter) {
|
|
559
|
+
delete normalized.value;
|
|
543
560
|
}
|
|
544
561
|
return normalized;
|
|
545
562
|
}
|
|
546
563
|
updateFilter(newItem) {
|
|
564
|
+
const normalizedNewItem = this.normalizeItem(newItem);
|
|
547
565
|
let config = this.filterConfig.map(item => {
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
return newItem;
|
|
566
|
+
if (item.id !== normalizedNewItem.id) {
|
|
567
|
+
return item;
|
|
568
|
+
}
|
|
569
|
+
if (ObjectUtils.objectToString(item) == ObjectUtils.objectToString(normalizedNewItem)) {
|
|
570
|
+
this.calculateUpdateSequence(normalizedNewItem);
|
|
554
571
|
}
|
|
555
|
-
return
|
|
572
|
+
return normalizedNewItem;
|
|
556
573
|
}).sort((a, b) => this._filtersComparator(a, b));
|
|
557
574
|
if (this.filterCustomConfigInterceptor) {
|
|
558
575
|
config = this.filterCustomConfigInterceptor(config);
|
|
@@ -718,7 +735,7 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
718
735
|
return itemA.originOrder - itemB.originOrder;
|
|
719
736
|
});
|
|
720
737
|
if (this.mode !== "regular") {
|
|
721
|
-
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 })));
|
|
738
|
+
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 })));
|
|
722
739
|
}
|
|
723
740
|
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 })));
|
|
724
741
|
}
|
|
@@ -4,7 +4,7 @@ import { F as FilterNumberVariation } from './filterNumberVariation.js';
|
|
|
4
4
|
import { F as FilterItemType } from './filter-item-type.enum.js';
|
|
5
5
|
import { d as defineCustomElement$1 } from './snk-filter-detail2.js';
|
|
6
6
|
|
|
7
|
-
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)}";
|
|
7
|
+
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)}";
|
|
8
8
|
|
|
9
9
|
const SnkFilterItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
10
10
|
constructor() {
|
|
@@ -24,8 +24,10 @@ const SnkFilterItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
24
24
|
/**
|
|
25
25
|
* Emitido quando o estado do filtro é alterado.
|
|
26
26
|
*/
|
|
27
|
-
filterChangeListener() {
|
|
27
|
+
filterChangeListener(event) {
|
|
28
28
|
this.hideDetail();
|
|
29
|
+
// Re-emite o evento para o pai (snk-filter-bar)
|
|
30
|
+
this.filterChange.emit(event.detail);
|
|
29
31
|
}
|
|
30
32
|
/**
|
|
31
33
|
* Exibe os detalhes de um item da lista.
|
|
@@ -226,6 +228,10 @@ const SnkFilterItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
226
228
|
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;
|
|
227
229
|
}
|
|
228
230
|
hasActiveValue(config) {
|
|
231
|
+
var _a, _b;
|
|
232
|
+
if (config.type === FilterItemType.PERIOD) {
|
|
233
|
+
return (!!((_a = config.value) === null || _a === void 0 ? void 0 : _a.start) || !!((_b = config.value) === null || _b === void 0 ? void 0 : _b.end));
|
|
234
|
+
}
|
|
229
235
|
return (config.type !== FilterItemType.MULTI_LIST && config.value !== undefined) || this.hasActiveElements(config.value);
|
|
230
236
|
}
|
|
231
237
|
getEnabledChip() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
1
|
+
import { proxyCustomElement, HTMLElement, forceUpdate, h } from '@stencil/core/internal/client';
|
|
2
2
|
import { ObjectUtils, ApplicationContext } from '@sankhyalabs/core';
|
|
3
3
|
import { ModalAction } from '@sankhyalabs/ezui/dist/collection/components/ez-modal-container';
|
|
4
4
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
@@ -33,12 +33,13 @@ function validateFilters(filters) {
|
|
|
33
33
|
return notValidFilters.length === 0;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
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)}";
|
|
36
|
+
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)}";
|
|
37
37
|
|
|
38
38
|
const SnkFilterModal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
39
39
|
constructor() {
|
|
40
40
|
super();
|
|
41
41
|
this.__registerHost();
|
|
42
|
+
this._isUserSup = false;
|
|
42
43
|
this.filters = [];
|
|
43
44
|
this.filtersWithError = [];
|
|
44
45
|
this.getMessage = undefined;
|
|
@@ -94,6 +95,7 @@ const SnkFilterModal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
94
95
|
this.handleClearCustomFilters(customFilters);
|
|
95
96
|
this.handleClearOthersFilters(otherFilters);
|
|
96
97
|
multiListFilters.forEach(multiListFilter => this.handleClearSigleFilter(multiListFilter));
|
|
98
|
+
forceUpdate(this);
|
|
97
99
|
}
|
|
98
100
|
handleClearOthersFilters(otherFilters) {
|
|
99
101
|
this.filters = this.filters.map(filter => otherFilters.includes(filter) ? (Object.assign(Object.assign({}, filter), { value: undefined })) : filter);
|
|
@@ -265,7 +267,7 @@ const SnkFilterModal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
265
267
|
getIformedFiltersCount(listItems) {
|
|
266
268
|
let countInformedItens = 0;
|
|
267
269
|
listItems.forEach(localItem => {
|
|
268
|
-
var _a, _b, _c, _d, _e, _f;
|
|
270
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
269
271
|
const item = this.filterConfig.find(filter => filter.id === localItem.id);
|
|
270
272
|
if (FilterItemType.MULTI_LIST === item.type) {
|
|
271
273
|
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;
|
|
@@ -277,6 +279,12 @@ const SnkFilterModal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
277
279
|
.map(([key, _]) => key).length;
|
|
278
280
|
return;
|
|
279
281
|
}
|
|
282
|
+
if (FilterItemType.PERIOD === item.type) {
|
|
283
|
+
if (!!((_g = item.value) === null || _g === void 0 ? void 0 : _g.start) || !!((_h = item.value) === null || _h === void 0 ? void 0 : _h.end)) {
|
|
284
|
+
countInformedItens++;
|
|
285
|
+
}
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
280
288
|
if (item.groupedItems != undefined) {
|
|
281
289
|
countInformedItens = item.groupedItems.filter(item => item.visible).length;
|
|
282
290
|
return;
|
|
@@ -325,8 +333,9 @@ const SnkFilterModal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
325
333
|
const defaultFilter = filters.find((item) => item.id === DefaultFilter.id);
|
|
326
334
|
return defaultFilter;
|
|
327
335
|
}
|
|
328
|
-
componentWillLoad() {
|
|
336
|
+
async componentWillLoad() {
|
|
329
337
|
this._application = ApplicationContext.getContextValue('__SNK__APPLICATION__');
|
|
338
|
+
this._isUserSup = await this._application.isUserSup();
|
|
330
339
|
this.filters = ObjectUtils.copy(this.filterConfig);
|
|
331
340
|
}
|
|
332
341
|
componentWillRender() {
|
|
@@ -338,11 +347,12 @@ const SnkFilterModal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
338
347
|
this.validateFilters();
|
|
339
348
|
}
|
|
340
349
|
render() {
|
|
341
|
-
this._defaultFilter = this.getDefaultFilter(this.filters);
|
|
350
|
+
this._defaultFilter = this._isUserSup ? this.getDefaultFilter(this.filters) : undefined;
|
|
342
351
|
const customFilters = this.getCustomFilter(this.filters);
|
|
343
352
|
const quickFilters = this.filters.filter(filter => filter.filterType === FilterType.QUICK_FILTER);
|
|
344
353
|
const otherFilters = this.filters.filter(filter => filter.filterType === FilterType.OTHER_FILTERS);
|
|
345
|
-
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" },
|
|
354
|
+
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 &&
|
|
355
|
+
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))))));
|
|
346
356
|
}
|
|
347
357
|
get _element() { return this; }
|
|
348
358
|
static get watchers() { return {
|
|
@@ -105,13 +105,13 @@ const SnkFilterPeriod = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
105
105
|
if (this.getVariation() === FilterNumberVariation.INTERVAL) {
|
|
106
106
|
return (h("ez-tooltip", { active: this.config.enabled === false, message: this.config.disabledMessage, type: 'warning' }, h("div", { class: "ez-col ez-col--nowrap" }, h("ez-number-input", { id: `${this.config.id}_start`, class: this.presentationMode === EPresentationMode.MODAL ? 'ez-padding-right--medium' : '', label: this._startIntervalLabel, ref: ref => this._startInterval = ref, value: this.getIntervalValue("start"), enabled: this.config.enabled, precision: (_a = this.config.props) === null || _a === void 0 ? void 0 : _a.precision, errorMessage: this.errorMessage }), this.buildLabel(), h("ez-number-input", { id: `${this.config.id}_end`, label: this._endIntervalLabel, ref: ref => this._endInterval = ref, value: this.getIntervalValue("end"), enabled: this.config.enabled, precision: (_b = this.config.props) === null || _b === void 0 ? void 0 : _b.precision, errorMessage: this.errorMessage }))));
|
|
107
107
|
}
|
|
108
|
-
return (h("ez-tooltip", { active: this.config.enabled === false, message: this.config.disabledMessage, type: 'warning' }, h("ez-number-input", { id: this.config.id, ref: ref => this._numberElement = ref, value: this.config.value, precision: (_c = this.config.props) === null || _c === void 0 ? void 0 : _c.precision, enabled: this.config.enabled, errorMessage: this.errorMessage })));
|
|
108
|
+
return (h("ez-tooltip", { active: this.config.enabled === false, message: this.config.disabledMessage, type: 'warning' }, h("ez-number-input", { id: this.config.id, label: this.config.label, ref: ref => this._numberElement = ref, value: this.config.value, precision: (_c = this.config.props) === null || _c === void 0 ? void 0 : _c.precision, enabled: this.config.enabled, errorMessage: this.errorMessage })));
|
|
109
109
|
}
|
|
110
110
|
get _element() { return this; }
|
|
111
111
|
}, [0, "snk-filter-number", {
|
|
112
112
|
"config": [16],
|
|
113
113
|
"getMessage": [16],
|
|
114
|
-
"value": [
|
|
114
|
+
"value": [1026],
|
|
115
115
|
"presentationMode": [2, "presentation-mode"],
|
|
116
116
|
"errorMessage": [1537, "error-message"],
|
|
117
117
|
"show": [64],
|
|
@@ -11,16 +11,17 @@ const SnkFilterPeriod$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
11
11
|
this._startDateLabel = 'Inicial';
|
|
12
12
|
this._endDateLabel = 'Final';
|
|
13
13
|
this._toLabel = 'até';
|
|
14
|
+
this._defaultEmptyValue = {
|
|
15
|
+
start: null,
|
|
16
|
+
end: null
|
|
17
|
+
};
|
|
14
18
|
this.internalChange = {
|
|
15
19
|
start: false,
|
|
16
20
|
end: false
|
|
17
21
|
};
|
|
18
22
|
this.config = undefined;
|
|
19
23
|
this.getMessage = undefined;
|
|
20
|
-
this.value =
|
|
21
|
-
start: null,
|
|
22
|
-
end: null
|
|
23
|
-
};
|
|
24
|
+
this.value = this._defaultEmptyValue;
|
|
24
25
|
this.presentationMode = EPresentationMode.CHIP;
|
|
25
26
|
this.errorMessage = undefined;
|
|
26
27
|
}
|
|
@@ -33,6 +34,10 @@ const SnkFilterPeriod$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
33
34
|
this.internalChange.start = false;
|
|
34
35
|
return;
|
|
35
36
|
}
|
|
37
|
+
if ((!newValue && oldValue) || (!(newValue === null || newValue === void 0 ? void 0 : newValue.start) && !(newValue === null || newValue === void 0 ? void 0 : newValue.end))) {
|
|
38
|
+
this.clearValue();
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
36
41
|
if (newValue && (newValue.start !== (oldValue === null || oldValue === void 0 ? void 0 : oldValue.start) || newValue.end !== (oldValue === null || oldValue === void 0 ? void 0 : oldValue.end))) {
|
|
37
42
|
this.valueStart = this.parseDate(newValue.start);
|
|
38
43
|
this.valueEnd = this.parseDate(newValue.end);
|
|
@@ -54,7 +59,7 @@ const SnkFilterPeriod$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
54
59
|
* Limpa o valor do componente restaurando o valor original da configuração.
|
|
55
60
|
*/
|
|
56
61
|
async clearValue() {
|
|
57
|
-
this.value = this.config.value;
|
|
62
|
+
this.value = this.config.value || this._defaultEmptyValue;
|
|
58
63
|
this.valueStart = this.getDate("start");
|
|
59
64
|
this.valueEnd = this.getDate("end");
|
|
60
65
|
}
|
|
@@ -43,7 +43,7 @@ const SnkFilterText$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
43
43
|
if (!this.config) {
|
|
44
44
|
return undefined;
|
|
45
45
|
}
|
|
46
|
-
return (h("ez-tooltip", { active: this.config.enabled === false, message: this.config.disabledMessage, type: 'warning' }, h("ez-text-input", { id: this.config.id, ref: ref => this._textInputElement = ref, value: this.config.value, mask: (_a = this.config) === null || _a === void 0 ? void 0 : _a.mask, enabled: this.config.enabled, cleanValueMask: true, errorMessage: this.errorMessage })));
|
|
46
|
+
return (h("ez-tooltip", { active: this.config.enabled === false, message: this.config.disabledMessage, type: 'warning' }, h("ez-text-input", { id: this.config.id, label: this.config.label, ref: ref => this._textInputElement = ref, value: this.config.value, mask: (_a = this.config) === null || _a === void 0 ? void 0 : _a.mask, enabled: this.config.enabled, cleanValueMask: true, errorMessage: this.errorMessage })));
|
|
47
47
|
}
|
|
48
48
|
get _element() { return this; }
|
|
49
49
|
}, [0, "snk-filter-text", {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { ObjectUtils, ApplicationContext } from '@sankhyalabs/core';
|
|
3
3
|
import { buildFormConfigFromDataUnit } from '@sankhyalabs/ezui/dist/collection/utils/form';
|
|
4
|
-
import { b as buildGuides, c as buildGuidesMap, e as getFieldsToSave, u as updateTabInFieldsFromGroupList, f as buildNewGuideName, d as defineCustomElement$5 } from './field-config2.js';
|
|
5
|
-
import { T as TAB_NAMES, G as GROUP_NAMES } from './constants.js';
|
|
6
4
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
7
5
|
import { U as UserConfigType } from './form-config-fetcher.js';
|
|
6
|
+
import { T as TAB_NAMES, G as GROUP_NAMES } from './constants.js';
|
|
7
|
+
import { b as buildGuides, c as buildChildrenGuides, e as buildCustomGuides, f as buildGuidesMap, h as getFieldsToSave, u as updateTabInFieldsFromGroupList, i as buildNewGuideName, d as defineCustomElement$5 } from './field-config2.js';
|
|
8
8
|
import { d as defineCustomElement$7 } from './config-header2.js';
|
|
9
9
|
import { d as defineCustomElement$6 } from './configs-button2.js';
|
|
10
10
|
import { d as defineCustomElement$4 } from './field-item2.js';
|
|
@@ -35,6 +35,7 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
35
35
|
this.configManager = undefined;
|
|
36
36
|
this.ignoreReadOnlyFormFields = undefined;
|
|
37
37
|
this.messagesBuilder = undefined;
|
|
38
|
+
this.customGuidesConfig = [];
|
|
38
39
|
}
|
|
39
40
|
handleFieldConfigChanged() {
|
|
40
41
|
this.hasChanges = true;
|
|
@@ -54,6 +55,10 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
54
55
|
this.showNoGuideSelectedDialog();
|
|
55
56
|
return;
|
|
56
57
|
}
|
|
58
|
+
if (this.selectedGuide.isCustom || this.selectedGuide.isDetail) {
|
|
59
|
+
this.showCanNotAddFieldToGuideDialog();
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
57
62
|
this.availableFields = [...this.availableFields.filter(f => f.name !== fieldItem.name)];
|
|
58
63
|
await ((_a = this.refFieldsLayout) === null || _a === void 0 ? void 0 : _a.addFieldToLayout(fieldItem));
|
|
59
64
|
}
|
|
@@ -79,6 +84,11 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
79
84
|
const message = this.getMessage('snkFormConfig.noGuideSelected.message');
|
|
80
85
|
ApplicationUtils.alert(title, message);
|
|
81
86
|
}
|
|
87
|
+
showCanNotAddFieldToGuideDialog() {
|
|
88
|
+
const title = this.getMessage('snkFormConfig.canNotAddFieldToGuide.title');
|
|
89
|
+
const message = this.getMessage('snkFormConfig.canNotAddFieldToGuide.message');
|
|
90
|
+
ApplicationUtils.alert(title, message);
|
|
91
|
+
}
|
|
82
92
|
/**
|
|
83
93
|
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
|
84
94
|
* através de um pequeno modulo na estrutura da aplicação:
|
|
@@ -96,8 +106,8 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
96
106
|
this.configOptions = userConfig;
|
|
97
107
|
const isDefault = this._formConfig != undefined ? this._formConfig.defaultConfiguration : true;
|
|
98
108
|
const origin = (isDefault ? UserConfigType.DEFAULT : UserConfigType.USER);
|
|
99
|
-
this.configSelected = userConfig.find((config) => config.origin === origin);
|
|
100
|
-
this.originalConfigSelected = userConfig.find((config) => config.origin === origin);
|
|
109
|
+
this.configSelected = userConfig === null || userConfig === void 0 ? void 0 : userConfig.find((config) => config.origin === origin);
|
|
110
|
+
this.originalConfigSelected = userConfig === null || userConfig === void 0 ? void 0 : userConfig.find((config) => config.origin === origin);
|
|
101
111
|
}
|
|
102
112
|
catch (error) {
|
|
103
113
|
console.error(this.getMessage('snkFormConfig.errors.failFetchUserConfig'));
|
|
@@ -150,9 +160,22 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
150
160
|
return fieldVisible === true && hasCfg === false;
|
|
151
161
|
});
|
|
152
162
|
}
|
|
163
|
+
getInitialOrder(guidesList) {
|
|
164
|
+
var _a, _b;
|
|
165
|
+
if (Array.isArray((_a = this._formConfig) === null || _a === void 0 ? void 0 : _a.tabs)) {
|
|
166
|
+
return (_b = this._formConfig.tabs) === null || _b === void 0 ? void 0 : _b.length;
|
|
167
|
+
}
|
|
168
|
+
if (guidesList.length > 0) {
|
|
169
|
+
return Math.max(...guidesList.map(g => g.order));
|
|
170
|
+
}
|
|
171
|
+
return 0;
|
|
172
|
+
}
|
|
153
173
|
loadGuides() {
|
|
154
174
|
var _a;
|
|
155
|
-
this.guidesList = [
|
|
175
|
+
this.guidesList = [];
|
|
176
|
+
this.guidesList.push(...buildGuides(this._formConfig, this.getMessage('snkFormConfig.form.mainArea')));
|
|
177
|
+
this.guidesList.push(...buildChildrenGuides(this.dataUnit, this.getInitialOrder(this.guidesList), this.guidesList));
|
|
178
|
+
this.guidesList.push(...buildCustomGuides(this.customGuidesConfig, this.guidesList));
|
|
156
179
|
this.guidesMap = buildGuidesMap((_a = this._formConfig) === null || _a === void 0 ? void 0 : _a.fields, this.guidesList, this.dataUnit, this.getMessage('snkFormConfig.form.tabGeneral'));
|
|
157
180
|
}
|
|
158
181
|
getConfig() {
|
|
@@ -301,6 +324,7 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
301
324
|
"configManager": [16],
|
|
302
325
|
"ignoreReadOnlyFormFields": [4, "ignore-read-only-form-fields"],
|
|
303
326
|
"messagesBuilder": [1040],
|
|
327
|
+
"customGuidesConfig": [16],
|
|
304
328
|
"availableFields": [32],
|
|
305
329
|
"guidesList": [32],
|
|
306
330
|
"groupsList": [32],
|