@sankhyalabs/sankhyablocks 10.1.0-dev.4 → 10.1.0-dev.41
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-b29e31be.js → ConfigStorage-a1fab5ca.js} +19 -2
- package/dist/cjs/ContinuousInsertUtils-1ae0c6ac.js +41 -0
- package/dist/cjs/{DataFetcher-ed9d97ea.js → DataFetcher-384d2ce8.js} +2 -2733
- package/dist/cjs/{FormConfigHelper-ebb77625.js → FormConfigHelper-28fe4668.js} +44 -0
- package/dist/cjs/{ISave-81eb2fbc.js → ISave-ecbe9336.js} +1 -1
- package/dist/cjs/ImageUtils-c46f2d11.js +142 -0
- package/dist/cjs/{PersonalizedFilterUtils-7259cf65.js → PersonalizedFilterUtils-eccb267a.js} +13 -0
- package/dist/cjs/{SnkFormConfigManager-6838389c.js → SnkFormConfigManager-44386305.js} +7 -7
- package/dist/cjs/SnkMessageBuilder-a9300ebe.js +2833 -0
- package/dist/cjs/{SnkMultiSelectionListDataSource-1e804147.js → SnkMultiSelectionListDataSource-b951ed91.js} +61 -47
- package/dist/cjs/{auth-fetcher-cc28d847.js → auth-fetcher-6b134ec4.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-ab1cc071.js → dataunit-fetcher-93f53260.js} +26 -3
- 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 +8 -5
- package/dist/cjs/fields-selector.cjs.entry.js +3 -3
- package/dist/cjs/{form-config-fetcher-f0897eb5.js → form-config-fetcher-45d1964c.js} +19 -1
- package/dist/cjs/guides-configurator.cjs.entry.js +6 -4
- package/dist/cjs/{index-1cf293c1.js → index-1894343a.js} +1529 -177
- 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 +6 -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 +160 -113
- package/dist/cjs/snk-actions-form.cjs.entry.js +1 -1
- package/dist/cjs/snk-application.cjs.entry.js +29 -9
- package/dist/cjs/snk-attach.cjs.entry.js +53 -26
- 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 +351 -108
- 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 +9 -7
- package/dist/cjs/{snk-data-unit-68992932.js → snk-data-unit-6abc5efc.js} +21 -12
- package/dist/cjs/snk-data-unit.cjs.entry.js +5 -4
- package/dist/cjs/snk-default-filter.cjs.entry.js +1 -1
- package/dist/cjs/snk-detail-view.cjs.entry.js +19 -20
- package/dist/cjs/snk-entity-list.cjs.entry.js +1 -1
- package/dist/cjs/snk-entity-search.cjs.entry.js +211 -0
- package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +2 -2
- package/dist/cjs/snk-expression-group_2.cjs.entry.js +2 -2
- package/dist/cjs/{snk-filter-advanced-mode_2.cjs.entry.js → snk-filter-advanced-mode_3.cjs.entry.js} +41 -3
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +147 -94
- 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 +3 -3
- package/dist/cjs/snk-filter-field-search_2.cjs.entry.js +2 -2
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +5 -4
- package/dist/cjs/snk-filter-multi-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-number.cjs.entry.js +11 -7
- package/dist/cjs/snk-filter-period.cjs.entry.js +14 -7
- 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 +70 -8
- package/dist/cjs/snk-form_2.cjs.entry.js +34 -10
- package/dist/cjs/snk-grid.cjs.entry.js +63 -30
- package/dist/cjs/{snk-guides-viewer-8b841753.js → snk-guides-viewer-b4ca3437.js} +114 -188
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +11 -18
- package/dist/cjs/snk-image-input.cjs.entry.js +148 -0
- package/dist/cjs/snk-layout-form-config.cjs.entry.js +72 -0
- package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +1 -1
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +8 -7
- package/dist/cjs/snk-pesquisa.cjs.entry.js +6 -6
- package/dist/cjs/snk-print-selector.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-crud.cjs.entry.js +30 -35
- package/dist/cjs/snk-taskbar.cjs.entry.js +237 -168
- package/dist/cjs/{sortable.esm-9a110bb7.js → sortable.esm-b87669ab.js} +76 -90
- package/dist/cjs/taskbar-elements-80eddec8.js +152 -0
- package/dist/cjs/teste-pesquisa.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +10 -1
- package/dist/collection/components/snk-actions-button/snk-actions-button.js +27 -3
- package/dist/collection/components/snk-application/errorhandler/snk-error-handler.js +1 -0
- package/dist/collection/components/snk-application/snk-application.js +20 -2
- package/dist/collection/components/snk-attach/snk-attach.css +29 -7
- package/dist/collection/components/snk-attach/snk-attach.js +82 -19
- package/dist/collection/components/snk-crud/snk-crud.css +46 -0
- package/dist/collection/components/snk-crud/snk-crud.js +190 -96
- package/dist/collection/components/snk-crud/subcomponents/GuideBuilder.js +1 -1
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +5 -5
- package/dist/collection/components/snk-crud/subcomponents/snk-entity-search.css +17 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-entity-search.js +330 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +90 -8
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.css +22 -8
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +165 -179
- package/dist/collection/components/snk-crud/utils/taskbarUtils.js +144 -0
- 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-exporter/exporter-email-sender/snk-exporter-email-sender.js +1 -1
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +20 -1
- 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 +13 -9
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js +14 -7
- 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-detail.js +1 -1
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.css +5 -1
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +28 -2
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.css +7 -1
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +22 -8
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +1 -6
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +166 -78
- 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 -4
- 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 +24 -3
- package/dist/collection/components/snk-grid/snk-grid.js +170 -18
- package/dist/collection/components/snk-grid-config/snk-grid-config.js +153 -51
- package/dist/collection/components/snk-image-input/snk-image-input.css +3 -0
- package/dist/collection/components/snk-image-input/snk-image-input.js +326 -0
- package/dist/collection/components/snk-image-input/utils/ImageUtils.js +133 -0
- package/dist/collection/components/snk-layout-form-config/snk-layout-form-config.js +1 -1
- package/dist/collection/components/snk-layout-form-config/snk-view-representation/snk-view-representation.js +1 -1
- package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +1 -1
- 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.js +0 -4
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +35 -23
- package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.css +8 -0
- package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js +38 -2
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +54 -37
- package/dist/collection/components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button.js +27 -1
- package/dist/collection/components/snk-taskbar/processor/simple-taskbar-processor.js +55 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.css +44 -1
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +304 -174
- package/dist/collection/components/snk-taskbar/subcomponents/snk-taskbar-skeleton.css +12 -0
- package/dist/collection/components/snk-taskbar/subcomponents/snk-taskbar-skeleton.js +19 -0
- package/dist/collection/lib/configs/ConfigStorage.js +5 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.js +24 -2
- package/dist/collection/lib/http/data-fetcher/fetchers/grid-config-fetcher.js +12 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/resource-fetcher.js +18 -0
- package/dist/collection/lib/message/SnkMessageBuilder.js +11 -2
- package/dist/collection/lib/message/messageResourceEnUSUtils.js +2 -0
- package/dist/collection/lib/message/messageResourceEsESUtils.js +2 -0
- package/dist/collection/lib/message/messageResourcePtBRUtils.js +2 -0
- package/dist/collection/lib/message/resources/en-us/snk-crud.msg.js +9 -1
- package/dist/collection/lib/message/resources/en-us/snk-form.msg.js +7 -0
- package/dist/collection/lib/message/resources/en-us/snk-image-input.msg.js +11 -0
- package/dist/collection/lib/message/resources/en-us/snk-layout-form-config.msg.js +10 -2
- package/dist/collection/lib/message/resources/es-es/snk-crud.msg.js +9 -1
- package/dist/collection/lib/message/resources/es-es/snk-form.msg.js +7 -0
- package/dist/collection/lib/message/resources/es-es/snk-image-input.msg.js +11 -0
- package/dist/collection/lib/message/resources/es-es/snk-layout-form-config.msg.js +8 -0
- package/dist/collection/lib/message/resources/pt-br/snk-configurator.msg.js +1 -1
- package/dist/collection/lib/message/resources/pt-br/snk-crud.msg.js +9 -1
- package/dist/collection/lib/message/resources/pt-br/snk-form.msg.js +8 -1
- package/dist/collection/lib/message/resources/pt-br/snk-image-input.msg.js +11 -0
- package/dist/collection/lib/message/resources/pt-br/snk-layout-form-config.msg.js +10 -2
- package/dist/components/ConfigStorage.js +17 -0
- package/dist/components/ContinuousInsertUtils.js +1 -1
- package/dist/components/DataFetcher.js +3 -2713
- package/dist/components/PersonalizedFilterUtils.js +13 -0
- package/dist/components/SnkFormConfigManager.js +6 -6
- package/dist/components/SnkMessageBuilder.js +2831 -0
- package/dist/components/dataunit-fetcher.js +25 -2
- package/dist/components/field-config2.js +44 -2
- package/dist/components/fields-layout2.js +6 -3
- package/dist/components/form-config-fetcher.js +18 -0
- package/dist/components/guides-configurator2.js +5 -3
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +4 -0
- package/dist/components/index2.js +90 -21
- package/dist/components/snk-actions-button2.js +6 -3
- package/dist/components/snk-application2.js +22 -2
- package/dist/components/snk-attach2.js +59 -29
- package/dist/components/snk-crud.js +435 -174
- 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-exporter2.js +3 -1
- package/dist/components/snk-data-unit2.js +10 -1
- package/dist/components/snk-detail-view2.js +250 -292
- package/dist/components/snk-entity-search.d.ts +11 -0
- package/dist/components/snk-entity-search.js +6 -0
- package/dist/components/snk-entity-search2.js +231 -0
- package/dist/components/snk-exporter-email-sender2.js +1 -1
- package/dist/components/snk-filter-bar2.js +116 -80
- package/dist/components/snk-filter-detail2.js +1 -1
- package/dist/components/snk-filter-item2.js +9 -3
- package/dist/components/snk-filter-modal2.js +22 -9
- package/dist/components/snk-filter-number.js +12 -8
- package/dist/components/snk-filter-period.js +13 -6
- package/dist/components/snk-filter-text.js +1 -1
- package/dist/components/snk-form-config2.js +29 -5
- package/dist/components/snk-form-view2.js +79 -10
- package/dist/components/snk-grid-config2.js +109 -50
- package/dist/components/snk-grid2.js +103 -59
- package/dist/components/snk-image-input.d.ts +11 -0
- package/dist/components/snk-image-input.js +6 -0
- package/dist/components/snk-image-input2.js +302 -0
- package/dist/components/snk-layout-form-config2.js +1 -1
- package/dist/components/snk-personalized-filter2.js +1 -1
- package/dist/components/snk-pesquisa2.js +0 -1
- package/dist/components/snk-simple-crud2.js +47 -46
- package/dist/components/snk-taskbar-skeleton.d.ts +11 -0
- package/dist/components/snk-taskbar-skeleton.js +6 -0
- package/dist/components/snk-taskbar-skeleton2.js +29 -0
- package/dist/components/snk-taskbar2.js +310 -218
- package/dist/components/snk-view-representation2.js +1 -1
- package/dist/components/sortable.esm.js +76 -90
- package/dist/components/taskbar-actions-button2.js +21 -2
- package/dist/components/taskbar-split-button2.js +10 -1
- package/dist/esm/{ConfigStorage-13d80e36.js → ConfigStorage-76872695.js} +19 -2
- package/dist/esm/ContinuousInsertUtils-bce77dc1.js +39 -0
- package/dist/esm/{DataFetcher-f4ccd9f3.js → DataFetcher-e60f8d53.js} +3 -2713
- package/dist/esm/{FormConfigHelper-4e42f0b6.js → FormConfigHelper-d09669f3.js} +43 -1
- package/dist/esm/{ISave-288fa9df.js → ISave-4929c071.js} +1 -1
- package/dist/esm/ImageUtils-7f3a4149.js +136 -0
- package/dist/esm/{PersonalizedFilterUtils-2db38ff2.js → PersonalizedFilterUtils-d2439a9a.js} +13 -0
- package/dist/esm/{SnkFormConfigManager-3ee2937b.js → SnkFormConfigManager-83f6b22f.js} +7 -7
- package/dist/esm/SnkMessageBuilder-1eb7a1af.js +2831 -0
- package/dist/esm/{SnkMultiSelectionListDataSource-5d3a93f2.js → SnkMultiSelectionListDataSource-7fe25a58.js} +55 -41
- package/dist/esm/{auth-fetcher-59ab0c67.js → auth-fetcher-1a31c1e4.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-c4f9f222.js → dataunit-fetcher-050b6d31.js} +25 -2
- 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 +8 -5
- package/dist/esm/fields-selector.entry.js +3 -3
- package/dist/esm/{form-config-fetcher-6a00fe9e.js → form-config-fetcher-b44b2727.js} +19 -1
- package/dist/esm/guides-configurator.entry.js +6 -4
- package/dist/esm/{index-479e1293.js → index-04f73a26.js} +1521 -177
- 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 +6 -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 +161 -114
- package/dist/esm/snk-actions-form.entry.js +1 -1
- package/dist/esm/snk-application.entry.js +28 -8
- package/dist/esm/snk-attach.entry.js +52 -25
- 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 +343 -100
- 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 +9 -7
- package/dist/esm/{snk-data-unit-0edeb967.js → snk-data-unit-ca2c9858.js} +12 -3
- package/dist/esm/snk-data-unit.entry.js +5 -4
- package/dist/esm/snk-default-filter.entry.js +1 -1
- package/dist/esm/snk-detail-view.entry.js +17 -18
- package/dist/esm/snk-entity-list.entry.js +1 -1
- package/dist/esm/snk-entity-search.entry.js +207 -0
- package/dist/esm/snk-exporter-email-sender.entry.js +2 -2
- package/dist/esm/snk-expression-group_2.entry.js +2 -2
- package/dist/esm/{snk-filter-advanced-mode_2.entry.js → snk-filter-advanced-mode_3.entry.js} +41 -4
- package/dist/esm/snk-filter-bar_4.entry.js +148 -95
- 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 +3 -3
- package/dist/esm/snk-filter-field-search_2.entry.js +2 -2
- package/dist/esm/snk-filter-modal-item.entry.js +5 -4
- package/dist/esm/snk-filter-multi-select.entry.js +1 -1
- package/dist/esm/snk-filter-number.entry.js +11 -7
- package/dist/esm/snk-filter-period.entry.js +14 -7
- 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 +71 -9
- package/dist/esm/snk-form_2.entry.js +34 -10
- package/dist/esm/snk-grid.entry.js +60 -27
- package/dist/esm/{snk-guides-viewer-9cd4d20f.js → snk-guides-viewer-cc37535b.js} +115 -189
- package/dist/esm/snk-guides-viewer.entry.js +11 -18
- package/dist/esm/snk-image-input.entry.js +144 -0
- package/dist/esm/snk-layout-form-config.entry.js +68 -0
- package/dist/esm/snk-personalized-filter-editor.entry.js +1 -1
- package/dist/esm/snk-personalized-filter.entry.js +8 -7
- package/dist/esm/snk-pesquisa.entry.js +6 -6
- package/dist/esm/snk-print-selector.entry.js +1 -1
- package/dist/esm/snk-simple-crud.entry.js +28 -33
- package/dist/esm/snk-taskbar.entry.js +238 -169
- package/dist/esm/{sortable.esm-842f85a3.js → sortable.esm-bc277c12.js} +76 -90
- package/dist/esm/taskbar-elements-63651ca7.js +149 -0
- package/dist/esm/teste-pesquisa.entry.js +1 -1
- package/dist/sankhyablocks/p-09ba6bd4.js +1 -0
- package/dist/sankhyablocks/{p-7f7fe6c4.entry.js → p-0a160fb5.entry.js} +1 -1
- package/dist/sankhyablocks/p-10f27dc6.entry.js +1 -0
- package/dist/sankhyablocks/{p-162bddae.entry.js → p-175c9576.entry.js} +1 -1
- package/dist/sankhyablocks/p-20af4b6a.entry.js +1 -0
- package/dist/sankhyablocks/p-251aee41.entry.js +11 -0
- package/dist/sankhyablocks/{p-c4fcf1fb.entry.js → p-27e0cd68.entry.js} +1 -1
- package/dist/sankhyablocks/p-2af815bb.entry.js +1 -0
- package/dist/sankhyablocks/p-2af8aca3.js +1 -0
- package/dist/sankhyablocks/p-2b3c284c.entry.js +1 -0
- 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-3072136e.js +1 -0
- package/dist/sankhyablocks/p-33492640.entry.js +1 -0
- package/dist/sankhyablocks/p-35317d9a.entry.js +1 -0
- package/dist/sankhyablocks/{p-1c2971e4.js → p-3704bf1b.js} +1 -1
- package/dist/sankhyablocks/p-3870748a.js +28 -0
- package/dist/sankhyablocks/p-3a35917e.entry.js +1 -0
- package/dist/sankhyablocks/{p-78ff8734.js → p-3c990841.js} +2 -2
- package/dist/sankhyablocks/p-420b39b5.js +1 -0
- package/dist/sankhyablocks/{p-49ddc27a.entry.js → p-438a225f.entry.js} +1 -1
- package/dist/sankhyablocks/p-46f75667.entry.js +1 -0
- package/dist/sankhyablocks/{p-53599b26.js → p-4f7adf97.js} +2 -2
- package/dist/sankhyablocks/p-554c0e54.js +1 -0
- package/dist/sankhyablocks/{p-27482793.entry.js → p-5aae5c74.entry.js} +1 -1
- package/dist/sankhyablocks/p-68c1a093.js +1 -0
- package/dist/sankhyablocks/p-6ae7543b.entry.js +1 -0
- package/dist/sankhyablocks/{p-825098c1.entry.js → p-752c57f4.entry.js} +1 -1
- package/dist/sankhyablocks/{p-e258de96.entry.js → p-76729994.entry.js} +1 -1
- package/dist/sankhyablocks/p-771b137e.js +1 -0
- package/dist/sankhyablocks/p-77f608bc.entry.js +1 -0
- package/dist/sankhyablocks/p-7c8bf699.entry.js +1 -0
- package/dist/sankhyablocks/p-855ccf64.entry.js +1 -0
- package/dist/sankhyablocks/p-8a8900a9.entry.js +1 -0
- 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-95af0bb1.entry.js +1 -0
- package/dist/sankhyablocks/{p-7b3ca294.entry.js → p-9742ea0e.entry.js} +1 -1
- package/dist/sankhyablocks/p-98241c21.entry.js +1 -0
- package/dist/sankhyablocks/{p-2fdac5e6.entry.js → p-9e109f5e.entry.js} +1 -1
- package/dist/sankhyablocks/p-9e7dc97d.entry.js +1 -0
- package/dist/sankhyablocks/p-a2a9f520.entry.js +1 -0
- package/dist/sankhyablocks/p-a46ac091.js +1 -0
- package/dist/sankhyablocks/p-a73b6b00.js +1 -0
- package/dist/sankhyablocks/p-ab12f544.entry.js +1 -0
- package/dist/sankhyablocks/p-ab5e12fa.js +1 -0
- package/dist/sankhyablocks/p-ac384a1e.entry.js +1 -0
- package/dist/sankhyablocks/{p-180716b2.entry.js → p-ae326d06.entry.js} +1 -1
- package/dist/sankhyablocks/p-aff2d081.entry.js +1 -0
- package/dist/sankhyablocks/p-b3b51693.entry.js +1 -0
- package/dist/sankhyablocks/p-b555ce38.entry.js +1 -0
- package/dist/sankhyablocks/p-bab4cde4.entry.js +1 -0
- package/dist/sankhyablocks/p-c3ec6642.js +19 -0
- package/dist/sankhyablocks/p-cbb8e351.js +7 -0
- package/dist/sankhyablocks/{p-c3dbf441.entry.js → p-cc64239c.entry.js} +1 -1
- package/dist/sankhyablocks/{p-471b34f4.entry.js → p-cd00a3d1.entry.js} +1 -1
- package/dist/sankhyablocks/p-ce3b284c.entry.js +1 -0
- package/dist/sankhyablocks/p-ce8ccd72.entry.js +1 -0
- package/dist/sankhyablocks/{p-4c763b10.entry.js → p-d657f71f.entry.js} +1 -1
- package/dist/sankhyablocks/p-d972a9c1.js +60 -0
- package/dist/sankhyablocks/p-da455c82.js +12 -0
- package/dist/sankhyablocks/p-e5a3711f.js +1 -0
- package/dist/sankhyablocks/{p-9a63f3f7.entry.js → p-e737fd5a.entry.js} +1 -1
- package/dist/sankhyablocks/p-ee56dda6.entry.js +1 -0
- package/dist/sankhyablocks/p-ef9343c3.entry.js +1 -0
- package/dist/sankhyablocks/p-efd18bc2.entry.js +1 -0
- package/dist/sankhyablocks/{p-667cab42.entry.js → p-f152ef98.entry.js} +1 -1
- package/dist/sankhyablocks/p-f185d5ad.js +1 -0
- package/dist/sankhyablocks/{p-7e250432.entry.js → p-f7170e10.entry.js} +1 -1
- 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-actions-button/snk-actions-button.d.ts +4 -0
- package/dist/types/components/snk-application/snk-application.d.ts +1 -1
- package/dist/types/components/snk-attach/snk-attach.d.ts +20 -4
- package/dist/types/components/snk-crud/snk-crud.d.ts +37 -9
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +1 -1
- package/dist/types/components/snk-crud/subcomponents/snk-entity-search.d.ts +62 -0
- package/dist/types/components/snk-crud/subcomponents/snk-form-view.d.ts +12 -0
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +28 -18
- package/dist/types/components/snk-crud/utils/taskbarUtils.d.ts +13 -0
- package/dist/types/components/snk-custom-slot-guide/snk-custom-slot-guide.d.ts +16 -0
- package/dist/types/components/snk-data-exporter/snk-data-exporter.d.ts +4 -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-number.d.ts +1 -1
- 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 +5 -1
- package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +2 -1
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +33 -16
- 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 +29 -1
- package/dist/types/components/snk-grid-config/snk-grid-config.d.ts +11 -0
- package/dist/types/components/snk-image-input/snk-image-input.d.ts +56 -0
- package/dist/types/components/snk-image-input/utils/ImageUtils.d.ts +15 -0
- package/dist/types/components/snk-personalized-filter/interfaces/IParameter.d.ts +1 -0
- package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +0 -1
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +4 -1
- package/dist/types/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.d.ts +6 -0
- package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +29 -2
- package/dist/types/components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button.d.ts +5 -0
- package/dist/types/components/snk-taskbar/processor/simple-taskbar-processor.d.ts +31 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +37 -23
- package/dist/types/components/snk-taskbar/subcomponents/snk-taskbar-skeleton.d.ts +3 -0
- package/dist/types/components.d.ts +377 -5
- package/dist/types/lib/configs/ConfigStorage.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.d.ts +2 -1
- package/dist/types/lib/http/data-fetcher/fetchers/grid-config-fetcher.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/resource-fetcher.d.ts +1 -0
- package/dist/types/lib/message/resources/en-us/snk-image-input.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/es-es/snk-image-input.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/pt-br/snk-image-input.msg.d.ts +1 -0
- package/package.json +6 -7
- package/react/components.d.ts +4 -0
- package/react/components.js +4 -0
- package/react/components.js.map +1 -1
- package/dist/cjs/snk-simple-bar.cjs.entry.js +0 -45
- package/dist/cjs/taskbar-elements-fb5d1e08.js +0 -132
- package/dist/cjs/taskbar-processor-2fba34a8.js +0 -53
- package/dist/esm/snk-simple-bar.entry.js +0 -41
- package/dist/esm/taskbar-elements-faaf5d8f.js +0 -129
- package/dist/esm/taskbar-processor-3436124c.js +0 -51
- package/dist/sankhyablocks/p-093f58fa.entry.js +0 -1
- package/dist/sankhyablocks/p-0e279e7a.js +0 -1
- package/dist/sankhyablocks/p-11346b8d.entry.js +0 -1
- package/dist/sankhyablocks/p-1858c023.entry.js +0 -1
- package/dist/sankhyablocks/p-1a0caadb.js +0 -1
- package/dist/sankhyablocks/p-21107f0d.entry.js +0 -1
- package/dist/sankhyablocks/p-26e0f63c.entry.js +0 -1
- package/dist/sankhyablocks/p-34df7eca.entry.js +0 -1
- package/dist/sankhyablocks/p-34f447ba.entry.js +0 -1
- package/dist/sankhyablocks/p-38e56b68.entry.js +0 -1
- package/dist/sankhyablocks/p-3abeeefa.entry.js +0 -1
- package/dist/sankhyablocks/p-3d021bef.entry.js +0 -1
- package/dist/sankhyablocks/p-3ed04f0d.entry.js +0 -1
- package/dist/sankhyablocks/p-44939a0e.entry.js +0 -1
- package/dist/sankhyablocks/p-51833248.js +0 -7
- package/dist/sankhyablocks/p-5304753a.js +0 -60
- package/dist/sankhyablocks/p-557368df.entry.js +0 -1
- package/dist/sankhyablocks/p-55798617.js +0 -1
- package/dist/sankhyablocks/p-583151c5.entry.js +0 -1
- package/dist/sankhyablocks/p-60dd1d27.entry.js +0 -1
- package/dist/sankhyablocks/p-6180de07.entry.js +0 -1
- package/dist/sankhyablocks/p-80014119.entry.js +0 -1
- package/dist/sankhyablocks/p-8f73da95.js +0 -1
- package/dist/sankhyablocks/p-91a9abb6.entry.js +0 -1
- package/dist/sankhyablocks/p-9317942f.js +0 -26
- package/dist/sankhyablocks/p-988afe78.js +0 -1
- package/dist/sankhyablocks/p-a2ed1ebd.entry.js +0 -1
- package/dist/sankhyablocks/p-a5108625.entry.js +0 -1
- package/dist/sankhyablocks/p-a644a956.js +0 -1
- package/dist/sankhyablocks/p-ae108ffd.entry.js +0 -11
- package/dist/sankhyablocks/p-b4322b87.entry.js +0 -1
- package/dist/sankhyablocks/p-b7e891cc.entry.js +0 -1
- package/dist/sankhyablocks/p-b987e15d.js +0 -1
- package/dist/sankhyablocks/p-bb2f5f38.js +0 -1
- package/dist/sankhyablocks/p-d8d8169b.js +0 -2
- package/dist/sankhyablocks/p-d9c54991.js +0 -1
- package/dist/sankhyablocks/p-dc851b6e.entry.js +0 -1
- package/dist/sankhyablocks/p-e9021f79.entry.js +0 -1
- package/dist/sankhyablocks/p-f15478a1.js +0 -1
- package/dist/sankhyablocks/p-f8f29e1a.entry.js +0 -1
|
@@ -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--4, 4px)}";
|
|
8
8
|
|
|
9
9
|
const SnkFilterItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
10
10
|
constructor() {
|
|
@@ -17,6 +17,7 @@ const SnkFilterItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
17
17
|
this.config = undefined;
|
|
18
18
|
this.getMessage = undefined;
|
|
19
19
|
this.showChips = true;
|
|
20
|
+
this.sizeChips = 'default';
|
|
20
21
|
}
|
|
21
22
|
observeDetailIsVisible(value) {
|
|
22
23
|
this.visibleChanged.emit(value);
|
|
@@ -24,7 +25,7 @@ const SnkFilterItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
24
25
|
/**
|
|
25
26
|
* Emitido quando o estado do filtro é alterado.
|
|
26
27
|
*/
|
|
27
|
-
filterChangeListener() {
|
|
28
|
+
filterChangeListener(_event) {
|
|
28
29
|
this.hideDetail();
|
|
29
30
|
}
|
|
30
31
|
/**
|
|
@@ -226,6 +227,10 @@ const SnkFilterItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
226
227
|
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
228
|
}
|
|
228
229
|
hasActiveValue(config) {
|
|
230
|
+
var _a, _b;
|
|
231
|
+
if (config.type === FilterItemType.PERIOD) {
|
|
232
|
+
return (!!((_a = config.value) === null || _a === void 0 ? void 0 : _a.start) || !!((_b = config.value) === null || _b === void 0 ? void 0 : _b.end));
|
|
233
|
+
}
|
|
229
234
|
return (config.type !== FilterItemType.MULTI_LIST && config.value !== undefined) || this.hasActiveElements(config.value);
|
|
230
235
|
}
|
|
231
236
|
getEnabledChip() {
|
|
@@ -298,7 +303,7 @@ const SnkFilterItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
298
303
|
render() {
|
|
299
304
|
const leftIcon = this.getLeftIconName();
|
|
300
305
|
const { type, message } = this.getTooltipMessage();
|
|
301
|
-
return (h(Host, null, this.showChips && (h("ez-tooltip", { id: this.config.id, message: message, type: type, active: !this.detailIsVisible, strategy: "fixed" }, h("ez-chip", { id: this.config.id, ref: ref => this._chipElement = ref, label: this.getLabel(), value: this.getEnabledChip(), onClick: (event) => this.togglePopover(event), disableAutoUpdateValue: true, type: this.getTypeChip(type), enabled: this.config.enabled }, leftIcon && (h("ez-icon", { ref: ref => this._leftIconElement = ref, iconName: leftIcon, slot: "leftIcon" })), h("ez-icon", { ref: ref => this._rightIconElement = ref, iconName: this.getRightIconName(), slot: "rightIcon", id: "removeFilter", onClick: (event) => this.clearFilter(event) })))), h("ez-popover-core", { ref: elem => this._popover = elem, onEzVisibilityChange: (event) => this.handleVisibilityPopover(event) }, h("snk-filter-detail", { ref: ref => this._filterDetail = ref, key: this.config.id, config: this.config, getMessage: this.getMessage, class: "sc-snk-filter-bar snk-filter__popover ez-padding--small ez-elevation--16", "data-element-id": this._idSnkFilterDetail, showHardFixed: this.showChips && !this.config.required, removalBlocked: this.config.required }))));
|
|
306
|
+
return (h(Host, null, this.showChips && (h("ez-tooltip", { id: this.config.id, message: message, type: type, active: !this.detailIsVisible, strategy: "fixed" }, h("ez-chip", { id: this.config.id, size: this.sizeChips, ref: ref => this._chipElement = ref, label: this.getLabel(), value: this.getEnabledChip(), onClick: (event) => this.togglePopover(event), disableAutoUpdateValue: true, type: this.getTypeChip(type), enabled: this.config.enabled }, leftIcon && (h("ez-icon", { ref: ref => this._leftIconElement = ref, iconName: leftIcon, slot: "leftIcon" })), h("ez-icon", { ref: ref => this._rightIconElement = ref, iconName: this.getRightIconName(), slot: "rightIcon", id: "removeFilter", onClick: (event) => this.clearFilter(event) })))), h("ez-popover-core", { ref: elem => this._popover = elem, onEzVisibilityChange: (event) => this.handleVisibilityPopover(event) }, h("snk-filter-detail", { ref: ref => this._filterDetail = ref, key: this.config.id, config: this.config, getMessage: this.getMessage, class: "sc-snk-filter-bar snk-filter__popover ez-padding--small ez-elevation--16", "data-element-id": this._idSnkFilterDetail, showHardFixed: this.showChips && !this.config.required, removalBlocked: this.config.required }))));
|
|
302
307
|
}
|
|
303
308
|
get _filterItemElement() { return this; }
|
|
304
309
|
static get watchers() { return {
|
|
@@ -309,6 +314,7 @@ const SnkFilterItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
309
314
|
"config": [1040],
|
|
310
315
|
"getMessage": [16],
|
|
311
316
|
"showChips": [4, "show-chips"],
|
|
317
|
+
"sizeChips": [1, "size-chips"],
|
|
312
318
|
"detailIsVisible": [32],
|
|
313
319
|
"showUp": [64],
|
|
314
320
|
"hideDetail": [64]
|
|
@@ -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\n);min-width:var(--space--small);max-width:var(--space--small)}.ez-padding-right--medium:nth-child(even){padding-right:0}";
|
|
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);
|
|
@@ -227,7 +229,7 @@ const SnkFilterModal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
227
229
|
return false;
|
|
228
230
|
}
|
|
229
231
|
renderFilterItem(filterItem, fullRow) {
|
|
230
|
-
return (h("snk-filter-modal-item", { key: `modal-item-${filterItem.id}`, class: fullRow ? 'ez-col ez-col--sd-12' : 'ez-
|
|
232
|
+
return (h("snk-filter-modal-item", { key: `modal-item-${filterItem.id}`, class: fullRow ? 'ez-col ez-col--sd-12' : 'ez-size-width--full ez-padding-right--medium', filterItem: filterItem, configName: this.configName, onFilterChange: (event) => this.handleFilterChange(event), onEditPersonalizedFilter: evt => this.editPersonalizedFilter(evt.detail), onAddPersonalizedFilter: () => this.addPersonalizedFilter() }));
|
|
231
233
|
}
|
|
232
234
|
isDefaultFilterNumberVariation(filter) {
|
|
233
235
|
var _a;
|
|
@@ -260,12 +262,15 @@ const SnkFilterModal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
260
262
|
}
|
|
261
263
|
renderFilterLine(filters) {
|
|
262
264
|
const fullLine = filters.length === 1;
|
|
265
|
+
if (!fullLine) {
|
|
266
|
+
return (h("div", { class: "ez-col ez-col--sd-12 hydrated", "data-element-id": "snkFilterModalItem" }, h("div", { class: "ez-flex ez-flex--column grow" }, h("div", { class: "ez-col ez-col--nowrap" }, filters.map(filter => this.renderFilterItem(filter, fullLine))))));
|
|
267
|
+
}
|
|
263
268
|
return filters.map((filter) => this.renderFilterItem(filter, fullLine));
|
|
264
269
|
}
|
|
265
270
|
getIformedFiltersCount(listItems) {
|
|
266
271
|
let countInformedItens = 0;
|
|
267
272
|
listItems.forEach(localItem => {
|
|
268
|
-
var _a, _b, _c, _d, _e, _f;
|
|
273
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
269
274
|
const item = this.filterConfig.find(filter => filter.id === localItem.id);
|
|
270
275
|
if (FilterItemType.MULTI_LIST === item.type) {
|
|
271
276
|
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 +282,12 @@ const SnkFilterModal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
277
282
|
.map(([key, _]) => key).length;
|
|
278
283
|
return;
|
|
279
284
|
}
|
|
285
|
+
if (FilterItemType.PERIOD === item.type) {
|
|
286
|
+
if (!!((_g = item.value) === null || _g === void 0 ? void 0 : _g.start) || !!((_h = item.value) === null || _h === void 0 ? void 0 : _h.end)) {
|
|
287
|
+
countInformedItens++;
|
|
288
|
+
}
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
280
291
|
if (item.groupedItems != undefined) {
|
|
281
292
|
countInformedItens = item.groupedItems.filter(item => item.visible).length;
|
|
282
293
|
return;
|
|
@@ -287,13 +298,13 @@ const SnkFilterModal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
287
298
|
});
|
|
288
299
|
return countInformedItens;
|
|
289
300
|
}
|
|
290
|
-
renderCollapsibleFilterBox(label, listItems, isSingleItem, shouldRenderFooter = true) {
|
|
301
|
+
renderCollapsibleFilterBox({ label, listItems, isSingleItem, shouldRenderFooter = true, initializeOpen = false }) {
|
|
291
302
|
if (!listItems.length)
|
|
292
303
|
return null;
|
|
293
304
|
const appliedFilters = this.getIformedFiltersCount(listItems);
|
|
294
305
|
const lines = this.mountFiltersLines(listItems);
|
|
295
306
|
const countFiltersWithError = this.filtersWithError.filter(item => listItems.some(filter => filter.id === item)).length;
|
|
296
|
-
return (h("ez-collapsible-box", { class: "snk-filter-modal__collapsible-box", headerSize: "medium", value:
|
|
307
|
+
return (h("ez-collapsible-box", { class: "snk-filter-modal__collapsible-box", headerSize: "medium", value: !initializeOpen, label: label }, h("div", { class: "ez-flex ez-flex--justify-end grow", slot: "rightSlot" }, !!appliedFilters && (h("ez-badge", { class: "ez-badge--primary-subtle", label: appliedFilters === null || appliedFilters === void 0 ? void 0 : appliedFilters.toString() })), !!countFiltersWithError && (h("ez-badge", { class: "ez-badge--error-subtle", label: countFiltersWithError === null || countFiltersWithError === void 0 ? void 0 : countFiltersWithError.toString() }))), h("div", { class: "ez-row snk-filter-modal__rendered-items" }, lines.map(this.renderFilterLine.bind(this))), shouldRenderFooter && (h("div", { class: "ez-flex ez-flex--justify-end grow" }, h("ez-button", { class: "ez-button--tertiary", size: "medium", label: this.getCustomMessage("clearModal"), onClick: () => isSingleItem ? this.handleClearSigleFilter(listItems[0]) : this.handleClearFilterList(listItems) })))));
|
|
297
308
|
}
|
|
298
309
|
handleDeleteFilter() {
|
|
299
310
|
this._application.confirm(this.getMessage('snkPersonalizedFilter.deleteConfirm.title'), this.getMessage('snkPersonalizedFilter.info.deleteDefaultFilterConfirm'), "alert-circle-inverted", "critical").then((actionConfirmed) => {
|
|
@@ -325,8 +336,9 @@ const SnkFilterModal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
325
336
|
const defaultFilter = filters.find((item) => item.id === DefaultFilter.id);
|
|
326
337
|
return defaultFilter;
|
|
327
338
|
}
|
|
328
|
-
componentWillLoad() {
|
|
339
|
+
async componentWillLoad() {
|
|
329
340
|
this._application = ApplicationContext.getContextValue('__SNK__APPLICATION__');
|
|
341
|
+
this._isUserSup = await this._application.isUserSup();
|
|
330
342
|
this.filters = ObjectUtils.copy(this.filterConfig);
|
|
331
343
|
}
|
|
332
344
|
componentWillRender() {
|
|
@@ -338,11 +350,12 @@ const SnkFilterModal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
338
350
|
this.validateFilters();
|
|
339
351
|
}
|
|
340
352
|
render() {
|
|
341
|
-
this._defaultFilter = this.getDefaultFilter(this.filters);
|
|
353
|
+
this._defaultFilter = this._isUserSup ? this.getDefaultFilter(this.filters) : undefined;
|
|
342
354
|
const customFilters = this.getCustomFilter(this.filters);
|
|
343
355
|
const quickFilters = this.filters.filter(filter => filter.filterType === FilterType.QUICK_FILTER);
|
|
344
356
|
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" },
|
|
357
|
+
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 &&
|
|
358
|
+
h("snk-default-filter", { getMessage: this.getCustomMessage.bind(this), hasDefaultFilter: !!this._defaultFilter, onActionSelected: this.handleActionSelectedDefaultFilter.bind(this) }), !this.disablePersonalizedFilter && this.renderCollapsibleFilterBox({ label: this.getCustomMessage('customFilters'), listItems: customFilters, isSingleItem: false, shouldRenderFooter: false }), this.renderCollapsibleFilterBox({ label: this.getCustomMessage('quickFilters'), listItems: quickFilters, isSingleItem: false, shouldRenderFooter: true, initializeOpen: true }), otherFilters.map(filter => this.renderCollapsibleFilterBox({ label: filter.label, listItems: [filter], isSingleItem: true, shouldRenderFooter: true }))))));
|
|
346
359
|
}
|
|
347
360
|
get _element() { return this; }
|
|
348
361
|
static get watchers() { return {
|
|
@@ -21,16 +21,20 @@ const SnkFilterPeriod = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
21
21
|
/**
|
|
22
22
|
* Emitido quando acontece a alteração de valor do componente snk-filter-number
|
|
23
23
|
*/
|
|
24
|
-
|
|
24
|
+
ezInputListener(evt) {
|
|
25
25
|
this.errorMessage = undefined;
|
|
26
|
+
const value = evt.detail;
|
|
26
27
|
if (this.getVariation() === FilterNumberVariation.INTERVAL) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
if (evt.target === this._startInterval && !isNaN(value)) {
|
|
29
|
+
this.value = Object.assign(this.value, { start: value });
|
|
30
|
+
}
|
|
31
|
+
if (evt.target === this._endInterval && !isNaN(value)) {
|
|
32
|
+
this.value = Object.assign(this.value, { end: value });
|
|
33
|
+
}
|
|
30
34
|
this.valueChanged.emit(this.value);
|
|
31
35
|
return;
|
|
32
36
|
}
|
|
33
|
-
this.value =
|
|
37
|
+
this.value = value;
|
|
34
38
|
this.valueChanged.emit(this.value);
|
|
35
39
|
}
|
|
36
40
|
/**
|
|
@@ -105,19 +109,19 @@ const SnkFilterPeriod = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
105
109
|
if (this.getVariation() === FilterNumberVariation.INTERVAL) {
|
|
106
110
|
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
111
|
}
|
|
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 })));
|
|
112
|
+
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
113
|
}
|
|
110
114
|
get _element() { return this; }
|
|
111
115
|
}, [0, "snk-filter-number", {
|
|
112
116
|
"config": [16],
|
|
113
117
|
"getMessage": [16],
|
|
114
|
-
"value": [
|
|
118
|
+
"value": [1026],
|
|
115
119
|
"presentationMode": [2, "presentation-mode"],
|
|
116
120
|
"errorMessage": [1537, "error-message"],
|
|
117
121
|
"show": [64],
|
|
118
122
|
"setFocus": [64],
|
|
119
123
|
"clearValue": [64]
|
|
120
|
-
}, [[0, "
|
|
124
|
+
}, [[0, "ezInput", "ezInputListener"]]]);
|
|
121
125
|
function defineCustomElement$1() {
|
|
122
126
|
if (typeof customElements === "undefined") {
|
|
123
127
|
return;
|
|
@@ -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,9 +59,11 @@ 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");
|
|
65
|
+
this._startDate.value = this.valueStart;
|
|
66
|
+
this._endDate.value = this.valueEnd;
|
|
60
67
|
}
|
|
61
68
|
componentDidLoad() {
|
|
62
69
|
if (this._element) {
|
|
@@ -106,7 +113,7 @@ const SnkFilterPeriod$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
106
113
|
if (!this.config || this.config.type !== FilterItemType.PERIOD) {
|
|
107
114
|
return undefined;
|
|
108
115
|
}
|
|
109
|
-
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-date-input", { id: `${this.config.id}_start`, class: this.presentationMode === EPresentationMode.MODAL ? 'ez-padding-right--medium' : '', label: this._startDateLabel, ref: ref => this._startDate = ref, enabled: this.config.enabled, value: this.valueStart, errorMessage: this.errorMessage,
|
|
116
|
+
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-date-input", { id: `${this.config.id}_start`, class: this.presentationMode === EPresentationMode.MODAL ? 'ez-padding-right--medium' : '', label: this._startDateLabel, ref: ref => this._startDate = ref, enabled: this.config.enabled, value: this.valueStart, errorMessage: this.errorMessage, onEzInput: (event) => this.ezChangeListener(event, 'start') }), this.buildLabel(), h("ez-date-input", { id: `${this.config.id}_end`, label: this._endDateLabel, ref: ref => this._endDate = ref, enabled: this.config.enabled, value: this.valueEnd, errorMessage: this.errorMessage, onEzInput: (event) => this.ezChangeListener(event, 'end') }))));
|
|
110
117
|
}
|
|
111
118
|
get _element() { return this; }
|
|
112
119
|
static get watchers() { return {
|
|
@@ -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],
|
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { ApplicationContext, ElementIDUtils } from '@sankhyalabs/core';
|
|
2
|
+
import { Action, UserInterface, ApplicationContext, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { DataBinder } from '@sankhyalabs/ezui/dist/collection/utils/form';
|
|
4
4
|
import { focusOnFieldSerch, SEARCH_FIELD_FULL_WIDTH, FormLayout } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
5
|
-
import { d as defineCustomElement$1 } from './snk-
|
|
5
|
+
import { g as getPKs, d as defineCustomElement$1 } from './snk-image-input2.js';
|
|
6
|
+
import { d as defineCustomElement$2 } from './snk-form-summary2.js';
|
|
6
7
|
|
|
7
8
|
const snkFormViewCss = ".sc-snk-form-view-h{display:flex;width:100%;--ez-form-card-summary-field-content-weight:700}.level-path.sc-snk-form-view{color:var(--color--title-primary, #2B3A54);font-weight:var(--text-weight--medium, 400);padding-right:3px}.summary-wrapper.sc-snk-form-view{display:flex;overflow:hidden}.summary-header.sc-snk-form-view{border-bottom:1px solid var(--color--strokes);margin-bottom:var(--space--medium);padding-bottom:var(--space--medium)}.summary-container.sc-snk-form-view{display:flex;flex-direction:column}.summary-container.sc-snk-form-view{padding-right:calc(var(--space--extra-large) / 1.5)}.summary-field.sc-snk-form-view{min-width:30px;max-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.summary-field__title.sc-snk-form-view{color:var(--text--primary, #626e82);font-size:var(--title--small);white-space:nowrap;font-weight:var(--text-weight--medium)}.summary-field__content.sc-snk-form-view{color:var(--title--primary, #2b3a54);font-size:var(--text--large);font-weight:var(--ez-form-card-summary-field-content-weight)}";
|
|
8
9
|
|
|
10
|
+
var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
11
|
+
var t = {};
|
|
12
|
+
for (var p in s)
|
|
13
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
14
|
+
t[p] = s[p];
|
|
15
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
16
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
17
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
18
|
+
t[p[i]] = s[p[i]];
|
|
19
|
+
}
|
|
20
|
+
return t;
|
|
21
|
+
};
|
|
9
22
|
const SnkFormView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
10
23
|
constructor() {
|
|
11
24
|
super();
|
|
@@ -15,7 +28,23 @@ const SnkFormView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
15
28
|
this.formItemsReady = createEvent(this, "formItemsReady", 7);
|
|
16
29
|
this._customEditors = new Map();
|
|
17
30
|
this._fieldProps = new Map();
|
|
31
|
+
this.dataUnitObserver = async (action) => {
|
|
32
|
+
if (action.type === Action.RECORDS_COPIED) {
|
|
33
|
+
const sourcePK = this.buildSourceRecordPK(action);
|
|
34
|
+
this.getImageField().forEach(async (field) => {
|
|
35
|
+
this.dataUnit.setFieldValue(field.name, JSON.stringify(sourcePK));
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
this.customUiBuilders = new Map([
|
|
40
|
+
[UserInterface.IMAGE, (_a) => {
|
|
41
|
+
var { name } = _a, props = __rest(_a, ["name"]);
|
|
42
|
+
return h("snk-image-input", Object.assign({ dataUnit: this.dataUnit, maxSize: Infinity, fieldName: name, entityName: this.entityPath }, props));
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
]);
|
|
18
46
|
this._singleColumn = false;
|
|
47
|
+
this._currentFormLayout = undefined;
|
|
19
48
|
this.levelPath = undefined;
|
|
20
49
|
this.fieldSearch = undefined;
|
|
21
50
|
this.label = undefined;
|
|
@@ -32,6 +61,7 @@ const SnkFormView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
32
61
|
this.fieldToFocus = undefined;
|
|
33
62
|
this.customEditors = undefined;
|
|
34
63
|
this.fieldsProps = undefined;
|
|
64
|
+
this.entityPath = undefined;
|
|
35
65
|
}
|
|
36
66
|
async showUp() {
|
|
37
67
|
if (this._formView) {
|
|
@@ -81,6 +111,11 @@ const SnkFormView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
81
111
|
}
|
|
82
112
|
}
|
|
83
113
|
}
|
|
114
|
+
async observeDataUnit(newValue, oldValue) {
|
|
115
|
+
if (newValue !== oldValue && newValue) {
|
|
116
|
+
newValue.subscribe(this.dataUnitObserver);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
84
119
|
changeFix() {
|
|
85
120
|
this.fixed = !this.fixed;
|
|
86
121
|
this.emitEvent("fixed");
|
|
@@ -138,28 +173,38 @@ const SnkFormView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
138
173
|
if (this._dataBinder != undefined) {
|
|
139
174
|
this._dataBinder.onDisconnectedCallback();
|
|
140
175
|
}
|
|
176
|
+
if (this.dataUnit) {
|
|
177
|
+
this.dataUnit.unsubscribe(this.dataUnitObserver);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
async componentWillLoad() {
|
|
181
|
+
await this.initLayoutFormConfig();
|
|
141
182
|
}
|
|
142
183
|
componentDidLoad() {
|
|
143
184
|
this.observePropsCustomEditor(this.customEditors);
|
|
144
185
|
this.observeFieldsProps(this.fieldsProps);
|
|
145
|
-
this.initLayoutFormConfig();
|
|
146
186
|
}
|
|
147
187
|
async initLayoutFormConfig() {
|
|
148
|
-
|
|
149
|
-
|
|
188
|
+
var _a;
|
|
189
|
+
if (!this._application) {
|
|
190
|
+
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
191
|
+
}
|
|
192
|
+
const layoutFormConfig = await ((_a = this._application) === null || _a === void 0 ? void 0 : _a.getLayoutFormConfig());
|
|
150
193
|
if (layoutFormConfig) {
|
|
151
194
|
this.setSingleColumn(layoutFormConfig);
|
|
152
195
|
this.registerNotifyListeners(layoutFormConfig);
|
|
153
196
|
}
|
|
154
197
|
}
|
|
155
198
|
setSingleColumn(layoutFormConfig) {
|
|
156
|
-
this._singleColumn = (layoutFormConfig === null || layoutFormConfig === void 0 ? void 0 : layoutFormConfig.config) === FormLayout.CASCADE;
|
|
199
|
+
this._singleColumn = (layoutFormConfig === null || layoutFormConfig === void 0 ? void 0 : layoutFormConfig.config) === FormLayout.CASCADE || (layoutFormConfig === null || layoutFormConfig === void 0 ? void 0 : layoutFormConfig.config) === FormLayout.CLASSIC_CASCADE;
|
|
200
|
+
this._currentFormLayout = layoutFormConfig === null || layoutFormConfig === void 0 ? void 0 : layoutFormConfig.config;
|
|
157
201
|
}
|
|
158
202
|
registerNotifyListeners(layoutFormConfig) {
|
|
159
203
|
if (!layoutFormConfig)
|
|
160
204
|
return;
|
|
161
205
|
layoutFormConfig.onConfigChange((config) => {
|
|
162
|
-
this._singleColumn = (config === FormLayout.CASCADE);
|
|
206
|
+
this._singleColumn = (config === FormLayout.CASCADE || config === FormLayout.CLASSIC_CASCADE);
|
|
207
|
+
this._currentFormLayout = config;
|
|
163
208
|
});
|
|
164
209
|
}
|
|
165
210
|
componentDidRender() {
|
|
@@ -196,6 +241,22 @@ const SnkFormView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
196
241
|
});
|
|
197
242
|
}
|
|
198
243
|
}
|
|
244
|
+
buildSourceRecordPK(action) {
|
|
245
|
+
var _a, _b;
|
|
246
|
+
const currentRecord = ((_a = action.payload) === null || _a === void 0 ? void 0 : _a[0]) || {};
|
|
247
|
+
const sourceBase64 = currentRecord["__record__source__id__"];
|
|
248
|
+
const sourceRecord = JSON.parse(atob(sourceBase64 || ''));
|
|
249
|
+
delete sourceRecord["__DATA_UNIT_NAME__"];
|
|
250
|
+
const pkFields = Object.keys(getPKs(this.dataUnit));
|
|
251
|
+
const filteredSourceRecord = {};
|
|
252
|
+
for (const pkField of pkFields) {
|
|
253
|
+
filteredSourceRecord[pkField] = (_b = sourceRecord[pkField]) === null || _b === void 0 ? void 0 : _b.value;
|
|
254
|
+
}
|
|
255
|
+
return filteredSourceRecord;
|
|
256
|
+
}
|
|
257
|
+
getImageField() {
|
|
258
|
+
return this.dataUnit.metadata.fields.filter(field => field.userInterface === UserInterface.IMAGE);
|
|
259
|
+
}
|
|
199
260
|
render() {
|
|
200
261
|
return (h(Host, { class: "ez-box__container" }, h("div", { class: "summary-header ez-flex ez-size-width--full", ref: ref => this._headerContainer = ref }, h("div", { class: "ez-flex ez-text ez-title--primary ez-text--bold ez-flex--justify-start ez-flex--align-items-center ez-col--sd-9" }, this.levelPath ? h("span", { class: "level-path" }, this.levelPath + " /") : undefined, this.label), h("div", { class: "ez-flex ez-flex--justify-end ez-col--sd-3" }, this.canFix &&
|
|
201
262
|
h("ez-button", { class: "ez-padding-left--medium", mode: "icon", size: "small", iconName: this.fixed ? "un-pin" : "push-pin", "data-element-id": ElementIDUtils.getInternalIDInfo("toggleFixed_ezFormCard"), onClick: () => this.changeFix(), title: this.fixed ? "Desafixar" : "Fixar" }), this.canExpand &&
|
|
@@ -203,11 +264,12 @@ const SnkFormView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
203
264
|
?
|
|
204
265
|
h("snk-form-summary", { summary: this.getCardSummary() })
|
|
205
266
|
:
|
|
206
|
-
h("ez-form-view", { ref: ref => this._formView = ref, fields: this.fields, onEzContentReady: evt => this.bindFields(evt.detail), onFormItemsReady: (event) => this.handleFormItemsReady(event), singleColumn: this._singleColumn }), this.fieldSearch && h("ez-popover", { ref: elem => (this._ezPopoverFieldColumn = elem), overlayType: "none" }, this.fieldSearch)));
|
|
267
|
+
h("ez-form-view", { ref: ref => this._formView = ref, fields: this.fields, onEzContentReady: evt => this.bindFields(evt.detail), onFormItemsReady: (event) => this.handleFormItemsReady(event), singleColumn: this._singleColumn, customUiBuilders: this.customUiBuilders, formLayout: this._currentFormLayout }), this.fieldSearch && h("ez-popover", { ref: elem => (this._ezPopoverFieldColumn = elem), overlayType: "none" }, this.fieldSearch)));
|
|
207
268
|
}
|
|
208
269
|
static get watchers() { return {
|
|
209
270
|
"customEditors": ["observePropsCustomEditor"],
|
|
210
|
-
"fieldsProps": ["observeFieldsProps"]
|
|
271
|
+
"fieldsProps": ["observeFieldsProps"],
|
|
272
|
+
"dataUnit": ["observeDataUnit"]
|
|
211
273
|
}; }
|
|
212
274
|
static get style() { return snkFormViewCss; }
|
|
213
275
|
}, [6, "snk-form-view", {
|
|
@@ -227,7 +289,9 @@ const SnkFormView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
227
289
|
"fieldToFocus": [1, "field-to-focus"],
|
|
228
290
|
"customEditors": [16],
|
|
229
291
|
"fieldsProps": [16],
|
|
292
|
+
"entityPath": [1, "entity-path"],
|
|
230
293
|
"_singleColumn": [32],
|
|
294
|
+
"_currentFormLayout": [32],
|
|
231
295
|
"showUp": [64],
|
|
232
296
|
"addCustomEditor": [64],
|
|
233
297
|
"setFieldProp": [64],
|
|
@@ -237,7 +301,7 @@ function defineCustomElement() {
|
|
|
237
301
|
if (typeof customElements === "undefined") {
|
|
238
302
|
return;
|
|
239
303
|
}
|
|
240
|
-
const components = ["snk-form-view", "snk-form-summary"];
|
|
304
|
+
const components = ["snk-form-view", "snk-form-summary", "snk-image-input"];
|
|
241
305
|
components.forEach(tagName => { switch (tagName) {
|
|
242
306
|
case "snk-form-view":
|
|
243
307
|
if (!customElements.get(tagName)) {
|
|
@@ -245,6 +309,11 @@ function defineCustomElement() {
|
|
|
245
309
|
}
|
|
246
310
|
break;
|
|
247
311
|
case "snk-form-summary":
|
|
312
|
+
if (!customElements.get(tagName)) {
|
|
313
|
+
defineCustomElement$2();
|
|
314
|
+
}
|
|
315
|
+
break;
|
|
316
|
+
case "snk-image-input":
|
|
248
317
|
if (!customElements.get(tagName)) {
|
|
249
318
|
defineCustomElement$1();
|
|
250
319
|
}
|