@sankhyalabs/sankhyablocks 10.1.0-dev.3 → 10.1.0-dev.31
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-d9d24844.js} +2 -2
- package/dist/cjs/{DataFetcher-ed9d97ea.js → DataFetcher-3a8ea521.js} +2 -2733
- package/dist/cjs/{FormConfigHelper-ebb77625.js → FormConfigHelper-28fe4668.js} +44 -0
- package/dist/cjs/{ISave-81eb2fbc.js → ISave-a66bb65e.js} +1 -1
- package/dist/cjs/ImageUtils-5e3f406b.js +142 -0
- package/dist/cjs/{PersonalizedFilterUtils-7259cf65.js → PersonalizedFilterUtils-eccb267a.js} +13 -0
- package/dist/cjs/{SnkFormConfigManager-6838389c.js → SnkFormConfigManager-c88cf1e9.js} +7 -7
- package/dist/cjs/SnkMessageBuilder-d9558dba.js +2809 -0
- package/dist/cjs/{SnkMultiSelectionListDataSource-1e804147.js → SnkMultiSelectionListDataSource-a891430e.js} +5 -5
- package/dist/cjs/{auth-fetcher-cc28d847.js → auth-fetcher-faa61f64.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-4320f7ec.js} +3 -2
- 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-f0897eb5.js → form-config-fetcher-72cf0e3d.js} +1 -1
- package/dist/cjs/guides-configurator.cjs.entry.js +6 -4
- package/dist/cjs/{index-1cf293c1.js → index-1894343a.js} +1525 -173
- 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 → snk-actions-button_8.cjs.entry.js} +20 -61
- 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 +10 -9
- 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 +18 -10
- 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 +7 -6
- package/dist/cjs/{snk-data-unit-68992932.js → snk-data-unit-b54fdf9a.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 +18 -14
- 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 +67 -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 +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 +73 -8
- package/dist/cjs/snk-form_2.cjs.entry.js +34 -10
- package/dist/cjs/snk-grid.cjs.entry.js +30 -19
- package/dist/cjs/{snk-guides-viewer-8b841753.js → snk-guides-viewer-58185ae3.js} +91 -42
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +11 -10
- 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 +7 -6
- 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-bar.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-crud.cjs.entry.js +15 -21
- package/dist/cjs/snk-taskbar.cjs.entry.js +59 -47
- package/dist/cjs/{taskbar-elements-fb5d1e08.js → taskbar-elements-a94d4318.js} +6 -5
- package/dist/cjs/teste-pesquisa.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +8 -1
- 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.js +1 -1
- package/dist/collection/components/snk-crud/snk-crud.js +48 -3
- 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 +4 -1
- package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +93 -8
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +138 -36
- 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 +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 +4 -0
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +5 -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 +46 -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 +22 -12
- package/dist/collection/components/snk-grid-config/snk-grid-config.js +12 -4
- 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/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 +23 -12
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +4 -3
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +58 -44
- 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 +1 -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 +1 -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 +1 -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/DataFetcher.js +3 -2713
- package/dist/components/PersonalizedFilterUtils.js +13 -0
- package/dist/components/SnkFormConfigManager.js +6 -6
- package/dist/components/SnkMessageBuilder.js +2807 -0
- package/dist/components/dataunit-fetcher.js +2 -1
- 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 +2 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index2.js +90 -21
- package/dist/components/snk-application2.js +22 -2
- package/dist/components/snk-attach2.js +3 -2
- package/dist/components/snk-crud.js +79 -65
- 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 +10 -1
- package/dist/components/snk-detail-view2.js +186 -121
- package/dist/components/snk-filter-bar2.js +41 -14
- package/dist/components/snk-filter-detail2.js +1 -1
- package/dist/components/snk-filter-item2.js +6 -2
- package/dist/components/snk-filter-modal2.js +16 -6
- 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 +82 -10
- package/dist/components/snk-grid-config2.js +12 -4
- package/dist/components/snk-grid2.js +22 -11
- 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-pesquisa2.js +0 -1
- package/dist/components/snk-simple-crud2.js +6 -12
- package/dist/components/snk-taskbar2.js +61 -48
- package/dist/components/snk-view-representation2.js +1 -1
- package/dist/esm/{ConfigStorage-13d80e36.js → ConfigStorage-d15d2014.js} +2 -2
- package/dist/esm/{DataFetcher-f4ccd9f3.js → DataFetcher-1dd7e8c0.js} +3 -2713
- package/dist/esm/{FormConfigHelper-4e42f0b6.js → FormConfigHelper-d09669f3.js} +43 -1
- package/dist/esm/{ISave-288fa9df.js → ISave-498c4831.js} +1 -1
- package/dist/esm/ImageUtils-8fc8d905.js +136 -0
- package/dist/esm/{PersonalizedFilterUtils-2db38ff2.js → PersonalizedFilterUtils-d2439a9a.js} +13 -0
- package/dist/esm/{SnkFormConfigManager-3ee2937b.js → SnkFormConfigManager-86befa68.js} +7 -7
- package/dist/esm/SnkMessageBuilder-c0bc4424.js +2807 -0
- package/dist/esm/{SnkMultiSelectionListDataSource-5d3a93f2.js → SnkMultiSelectionListDataSource-14633bf6.js} +5 -5
- package/dist/esm/{auth-fetcher-59ab0c67.js → auth-fetcher-69cbda8d.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-3d5c4ae4.js} +2 -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-6a00fe9e.js → form-config-fetcher-fcc7b62f.js} +1 -1
- package/dist/esm/guides-configurator.entry.js +6 -4
- package/dist/esm/{index-479e1293.js → index-04f73a26.js} +1517 -173
- 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 → snk-actions-button_8.entry.js} +21 -61
- 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 +9 -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 +18 -10
- 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 +7 -6
- package/dist/esm/{snk-data-unit-0edeb967.js → snk-data-unit-363c3551.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 +16 -12
- 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 +67 -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 +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 +74 -9
- package/dist/esm/snk-form_2.entry.js +34 -10
- package/dist/esm/snk-grid.entry.js +30 -19
- package/dist/esm/{snk-guides-viewer-9cd4d20f.js → snk-guides-viewer-6a72a3f4.js} +91 -42
- package/dist/esm/snk-guides-viewer.entry.js +11 -10
- 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 +7 -6
- package/dist/esm/snk-pesquisa.entry.js +6 -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 +15 -21
- package/dist/esm/snk-taskbar.entry.js +60 -48
- package/dist/esm/{taskbar-elements-faaf5d8f.js → taskbar-elements-97541bdd.js} +6 -5
- 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-10cad767.entry.js +1 -0
- package/dist/sankhyablocks/{p-162bddae.entry.js → p-175c9576.entry.js} +1 -1
- package/dist/sankhyablocks/p-18cc9111.entry.js +1 -0
- package/dist/sankhyablocks/p-1df34264.entry.js +11 -0
- package/dist/sankhyablocks/p-27d6590e.js +1 -0
- package/dist/sankhyablocks/{p-c4fcf1fb.entry.js → p-27e0cd68.entry.js} +1 -1
- package/dist/sankhyablocks/p-2a356340.entry.js +1 -0
- package/dist/sankhyablocks/{p-9a63f3f7.entry.js → p-2b882835.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-f15478a1.js → p-2ccbbeec.js} +1 -1
- package/dist/sankhyablocks/{p-75af335e.entry.js → p-2ebda226.entry.js} +1 -1
- package/dist/sankhyablocks/p-2ee83af1.entry.js +1 -0
- package/dist/sankhyablocks/p-30641d55.entry.js +1 -0
- package/dist/sankhyablocks/{p-53599b26.js → p-32ad76cc.js} +1 -1
- package/dist/sankhyablocks/p-3a35917e.entry.js +1 -0
- package/dist/sankhyablocks/{p-49ddc27a.entry.js → p-438a225f.entry.js} +1 -1
- package/dist/sankhyablocks/p-45f53520.entry.js +1 -0
- package/dist/sankhyablocks/p-48762fe9.js +1 -0
- package/dist/sankhyablocks/p-48c580b9.entry.js +1 -0
- package/dist/sankhyablocks/p-4abf2838.entry.js +1 -0
- package/dist/sankhyablocks/p-4ff3b494.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-685bc841.js +60 -0
- package/dist/sankhyablocks/p-68c1a093.js +1 -0
- package/dist/sankhyablocks/{p-7b3ca294.entry.js → p-7150eacf.entry.js} +1 -1
- package/dist/sankhyablocks/p-72d62f22.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-7c4f4851.js +1 -0
- package/dist/sankhyablocks/p-7cede5db.entry.js +1 -0
- package/dist/sankhyablocks/p-7e9f8fa4.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-78ff8734.js → p-9114e869.js} +1 -1
- package/dist/sankhyablocks/{p-21107f0d.entry.js → p-9c1ff75e.entry.js} +1 -1
- package/dist/sankhyablocks/p-9ce1539b.entry.js +1 -0
- package/dist/sankhyablocks/{p-2fdac5e6.entry.js → p-9e109f5e.entry.js} +1 -1
- package/dist/sankhyablocks/p-a210e55b.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-9317942f.js → p-a9839628.js} +1 -1
- package/dist/sankhyablocks/{p-180716b2.entry.js → p-ae326d06.entry.js} +1 -1
- package/dist/sankhyablocks/p-b25777fa.entry.js +1 -0
- package/dist/sankhyablocks/p-b555ce38.entry.js +1 -0
- package/dist/sankhyablocks/p-bdf0077f.js +1 -0
- package/dist/sankhyablocks/p-c3ec6642.js +19 -0
- package/dist/sankhyablocks/p-c6a97fda.entry.js +1 -0
- package/dist/sankhyablocks/{p-91a9abb6.entry.js → p-c8043a53.entry.js} +1 -1
- package/dist/sankhyablocks/p-c860552e.entry.js +1 -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-4c763b10.entry.js → p-d657f71f.entry.js} +1 -1
- package/dist/sankhyablocks/p-d70de708.entry.js +1 -0
- package/dist/sankhyablocks/p-da455c82.js +12 -0
- package/dist/sankhyablocks/{p-1c2971e4.js → p-e0a6818c.js} +1 -1
- package/dist/sankhyablocks/p-e30acdca.entry.js +1 -0
- package/dist/sankhyablocks/p-ebce5394.entry.js +1 -0
- package/dist/sankhyablocks/p-ee56dda6.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-f4ac3b50.entry.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/p-fc5e95f4.entry.js +1 -0
- package/dist/sankhyablocks/p-fce86770.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/snk-application.d.ts +1 -1
- package/dist/types/components/snk-crud/snk-crud.d.ts +10 -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 +24 -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-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 +1 -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 +5 -0
- 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 +2 -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/snk-taskbar.d.ts +6 -3
- package/dist/types/components.d.ts +164 -1
- 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 +1 -1
- package/react/components.d.ts +2 -0
- package/react/components.js +2 -0
- package/react/components.js.map +1 -1
- 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-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-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-8a88690f.entry.js +0 -1
- package/dist/sankhyablocks/p-8f73da95.js +0 -1
- 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-e9021f79.entry.js +0 -1
- package/dist/sankhyablocks/p-f8f29e1a.entry.js +0 -1
|
@@ -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) {
|
|
271
|
+
return true;
|
|
272
|
+
}
|
|
273
|
+
if (!Array.isArray(item.value)) {
|
|
266
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
|
-
if (ObjectUtils.objectToString(item) != ObjectUtils.objectToString(newItem)) {
|
|
551
|
-
this.calculateUpdateSequence(newItem);
|
|
552
|
-
}
|
|
553
|
-
return newItem;
|
|
566
|
+
if (item.id !== normalizedNewItem.id) {
|
|
567
|
+
return item;
|
|
554
568
|
}
|
|
555
|
-
|
|
569
|
+
if (ObjectUtils.objectToString(item) == ObjectUtils.objectToString(normalizedNewItem)) {
|
|
570
|
+
this.calculateUpdateSequence(normalizedNewItem);
|
|
571
|
+
}
|
|
572
|
+
return normalizedNewItem;
|
|
556
573
|
}).sort((a, b) => this._filtersComparator(a, b));
|
|
557
574
|
if (this.filterCustomConfigInterceptor) {
|
|
558
575
|
config = this.filterCustomConfigInterceptor(config);
|
|
@@ -623,6 +640,12 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
623
640
|
filterChangeListener(evt) {
|
|
624
641
|
this.updateFilter(evt.detail);
|
|
625
642
|
}
|
|
643
|
+
/**
|
|
644
|
+
* Escuta quando há um filtro do tipo pesquisa retorna um valor vazio.
|
|
645
|
+
*/
|
|
646
|
+
async emptySearchListener(_evt) {
|
|
647
|
+
await this.showPersonalizedFilterItem();
|
|
648
|
+
}
|
|
626
649
|
/**
|
|
627
650
|
* @description Abre o modal de filtros.
|
|
628
651
|
* @async
|
|
@@ -633,6 +656,10 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
633
656
|
}
|
|
634
657
|
this.isFilterModalOpen = true;
|
|
635
658
|
}
|
|
659
|
+
async showPersonalizedFilterItem() {
|
|
660
|
+
const popUp = this._element.querySelector('#filter-PERSONALIZED_FILTER_GROUP');
|
|
661
|
+
await (popUp === null || popUp === void 0 ? void 0 : popUp.showUp(true));
|
|
662
|
+
}
|
|
636
663
|
addPersonalizedFilter(isDefault = false) {
|
|
637
664
|
this.isFilterModalOpen = false;
|
|
638
665
|
this._isDefaultFilter = isDefault;
|
|
@@ -718,7 +745,7 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
718
745
|
return itemA.originOrder - itemB.originOrder;
|
|
719
746
|
});
|
|
720
747
|
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 })));
|
|
748
|
+
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
749
|
}
|
|
723
750
|
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
751
|
}
|
|
@@ -755,7 +782,7 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
755
782
|
"removeFilterItem": [64],
|
|
756
783
|
"getFilters": [64],
|
|
757
784
|
"showFilterModal": [64]
|
|
758
|
-
}, [[0, "filterChange", "filterChangeListener"]]]);
|
|
785
|
+
}, [[0, "filterChange", "filterChangeListener"], [8, "ezEmptySearch", "emptySearchListener"]]]);
|
|
759
786
|
function defineCustomElement() {
|
|
760
787
|
if (typeof customElements === "undefined") {
|
|
761
788
|
return;
|
|
@@ -162,7 +162,7 @@ const SnkFilterDetail = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
162
162
|
}
|
|
163
163
|
onKeyDonwListener(event) {
|
|
164
164
|
if (event.key === "Enter") {
|
|
165
|
-
this.
|
|
165
|
+
this.apply();
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
buildRightSlot(item) {
|
|
@@ -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,7 +24,7 @@ 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
29
|
}
|
|
30
30
|
/**
|
|
@@ -226,6 +226,10 @@ const SnkFilterItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
226
226
|
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
227
|
}
|
|
228
228
|
hasActiveValue(config) {
|
|
229
|
+
var _a, _b;
|
|
230
|
+
if (config.type === FilterItemType.PERIOD) {
|
|
231
|
+
return (!!((_a = config.value) === null || _a === void 0 ? void 0 : _a.start) || !!((_b = config.value) === null || _b === void 0 ? void 0 : _b.end));
|
|
232
|
+
}
|
|
229
233
|
return (config.type !== FilterItemType.MULTI_LIST && config.value !== undefined) || this.hasActiveElements(config.value);
|
|
230
234
|
}
|
|
231
235
|
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 {
|
|
@@ -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,41 @@ 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();
|
|
182
|
+
}
|
|
183
|
+
async componentWillLoad() {
|
|
184
|
+
await this.initLayoutFormConfig();
|
|
141
185
|
}
|
|
142
186
|
componentDidLoad() {
|
|
143
187
|
this.observePropsCustomEditor(this.customEditors);
|
|
144
188
|
this.observeFieldsProps(this.fieldsProps);
|
|
145
|
-
this.initLayoutFormConfig();
|
|
146
189
|
}
|
|
147
190
|
async initLayoutFormConfig() {
|
|
148
|
-
|
|
149
|
-
|
|
191
|
+
var _a;
|
|
192
|
+
if (!this._application) {
|
|
193
|
+
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
194
|
+
}
|
|
195
|
+
const layoutFormConfig = await ((_a = this._application) === null || _a === void 0 ? void 0 : _a.getLayoutFormConfig());
|
|
150
196
|
if (layoutFormConfig) {
|
|
151
197
|
this.setSingleColumn(layoutFormConfig);
|
|
152
198
|
this.registerNotifyListeners(layoutFormConfig);
|
|
153
199
|
}
|
|
154
200
|
}
|
|
155
201
|
setSingleColumn(layoutFormConfig) {
|
|
156
|
-
this._singleColumn = (layoutFormConfig === null || layoutFormConfig === void 0 ? void 0 : layoutFormConfig.config) === FormLayout.CASCADE;
|
|
202
|
+
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;
|
|
203
|
+
this._currentFormLayout = layoutFormConfig === null || layoutFormConfig === void 0 ? void 0 : layoutFormConfig.config;
|
|
157
204
|
}
|
|
158
205
|
registerNotifyListeners(layoutFormConfig) {
|
|
159
206
|
if (!layoutFormConfig)
|
|
160
207
|
return;
|
|
161
208
|
layoutFormConfig.onConfigChange((config) => {
|
|
162
|
-
this._singleColumn = (config === FormLayout.CASCADE);
|
|
209
|
+
this._singleColumn = (config === FormLayout.CASCADE || config === FormLayout.CLASSIC_CASCADE);
|
|
210
|
+
this._currentFormLayout = config;
|
|
163
211
|
});
|
|
164
212
|
}
|
|
165
213
|
componentDidRender() {
|
|
@@ -196,6 +244,22 @@ const SnkFormView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
196
244
|
});
|
|
197
245
|
}
|
|
198
246
|
}
|
|
247
|
+
buildSourceRecordPK(action) {
|
|
248
|
+
var _a, _b;
|
|
249
|
+
const currentRecord = ((_a = action.payload) === null || _a === void 0 ? void 0 : _a[0]) || {};
|
|
250
|
+
const sourceBase64 = currentRecord["__record__source__id__"];
|
|
251
|
+
const sourceRecord = JSON.parse(atob(sourceBase64 || ''));
|
|
252
|
+
delete sourceRecord["__DATA_UNIT_NAME__"];
|
|
253
|
+
const pkFields = Object.keys(getPKs(this.dataUnit));
|
|
254
|
+
const filteredSourceRecord = {};
|
|
255
|
+
for (const pkField of pkFields) {
|
|
256
|
+
filteredSourceRecord[pkField] = (_b = sourceRecord[pkField]) === null || _b === void 0 ? void 0 : _b.value;
|
|
257
|
+
}
|
|
258
|
+
return filteredSourceRecord;
|
|
259
|
+
}
|
|
260
|
+
getImageField() {
|
|
261
|
+
return this.dataUnit.metadata.fields.filter(field => field.userInterface === UserInterface.IMAGE);
|
|
262
|
+
}
|
|
199
263
|
render() {
|
|
200
264
|
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
265
|
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 +267,12 @@ const SnkFormView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
203
267
|
?
|
|
204
268
|
h("snk-form-summary", { summary: this.getCardSummary() })
|
|
205
269
|
:
|
|
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)));
|
|
270
|
+
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
271
|
}
|
|
208
272
|
static get watchers() { return {
|
|
209
273
|
"customEditors": ["observePropsCustomEditor"],
|
|
210
|
-
"fieldsProps": ["observeFieldsProps"]
|
|
274
|
+
"fieldsProps": ["observeFieldsProps"],
|
|
275
|
+
"dataUnit": ["observeDataUnit"]
|
|
211
276
|
}; }
|
|
212
277
|
static get style() { return snkFormViewCss; }
|
|
213
278
|
}, [6, "snk-form-view", {
|
|
@@ -227,7 +292,9 @@ const SnkFormView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
227
292
|
"fieldToFocus": [1, "field-to-focus"],
|
|
228
293
|
"customEditors": [16],
|
|
229
294
|
"fieldsProps": [16],
|
|
295
|
+
"entityPath": [1, "entity-path"],
|
|
230
296
|
"_singleColumn": [32],
|
|
297
|
+
"_currentFormLayout": [32],
|
|
231
298
|
"showUp": [64],
|
|
232
299
|
"addCustomEditor": [64],
|
|
233
300
|
"setFieldProp": [64],
|
|
@@ -237,7 +304,7 @@ function defineCustomElement() {
|
|
|
237
304
|
if (typeof customElements === "undefined") {
|
|
238
305
|
return;
|
|
239
306
|
}
|
|
240
|
-
const components = ["snk-form-view", "snk-form-summary"];
|
|
307
|
+
const components = ["snk-form-view", "snk-form-summary", "snk-image-input"];
|
|
241
308
|
components.forEach(tagName => { switch (tagName) {
|
|
242
309
|
case "snk-form-view":
|
|
243
310
|
if (!customElements.get(tagName)) {
|
|
@@ -245,6 +312,11 @@ function defineCustomElement() {
|
|
|
245
312
|
}
|
|
246
313
|
break;
|
|
247
314
|
case "snk-form-summary":
|
|
315
|
+
if (!customElements.get(tagName)) {
|
|
316
|
+
defineCustomElement$2();
|
|
317
|
+
}
|
|
318
|
+
break;
|
|
319
|
+
case "snk-image-input":
|
|
248
320
|
if (!customElements.get(tagName)) {
|
|
249
321
|
defineCustomElement$1();
|
|
250
322
|
}
|