@sankhyalabs/sankhyablocks 10.1.0-dev.3 → 10.1.0-dev.30
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 +59 -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 +7 -1
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.css +1 -0
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +15 -4
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +30 -13
- package/dist/collection/components/snk-form-config/FormConfigHelper.js +42 -0
- package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +6 -6
- package/dist/collection/components/snk-form-config/field-item/field-config/field-config.css +1 -0
- package/dist/collection/components/snk-form-config/fields-layout/fields-layout.css +16 -0
- package/dist/collection/components/snk-form-config/fields-layout/fields-layout.js +6 -3
- package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.css +3 -3
- package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.js +5 -3
- package/dist/collection/components/snk-form-config/snk-form-config.js +53 -6
- package/dist/collection/components/snk-grid/snk-grid.css +12 -0
- package/dist/collection/components/snk-grid/snk-grid.js +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 +30 -13
- package/dist/components/snk-filter-detail2.js +1 -1
- package/dist/components/snk-filter-item2.js +8 -2
- package/dist/components/snk-filter-modal2.js +16 -6
- package/dist/components/snk-filter-number.js +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 +59 -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-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-e0e3914e.entry.js +1 -0
- 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-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
|
@@ -9,8 +9,10 @@ import FilterItemType from '../filter-item/filter-item-type.enum';
|
|
|
9
9
|
import { ActionDefaultFilter } from '../types/default-filters';
|
|
10
10
|
import FilterType from '../types/filter-type.enum';
|
|
11
11
|
import { getInvalidFilters } from '../utils/filter-validate';
|
|
12
|
+
import { forceUpdate } from '@stencil/core';
|
|
12
13
|
export class SnkFilterModal {
|
|
13
14
|
constructor() {
|
|
15
|
+
this._isUserSup = false;
|
|
14
16
|
this.filters = [];
|
|
15
17
|
this.filtersWithError = [];
|
|
16
18
|
this.getMessage = undefined;
|
|
@@ -66,6 +68,7 @@ export class SnkFilterModal {
|
|
|
66
68
|
this.handleClearCustomFilters(customFilters);
|
|
67
69
|
this.handleClearOthersFilters(otherFilters);
|
|
68
70
|
multiListFilters.forEach(multiListFilter => this.handleClearSigleFilter(multiListFilter));
|
|
71
|
+
forceUpdate(this);
|
|
69
72
|
}
|
|
70
73
|
handleClearOthersFilters(otherFilters) {
|
|
71
74
|
this.filters = this.filters.map(filter => otherFilters.includes(filter) ? (Object.assign(Object.assign({}, filter), { value: undefined })) : filter);
|
|
@@ -239,7 +242,7 @@ export class SnkFilterModal {
|
|
|
239
242
|
getIformedFiltersCount(listItems) {
|
|
240
243
|
let countInformedItens = 0;
|
|
241
244
|
listItems.forEach(localItem => {
|
|
242
|
-
var _a, _b, _c, _d, _e, _f;
|
|
245
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
243
246
|
const item = this.filterConfig.find(filter => filter.id === localItem.id);
|
|
244
247
|
if (FilterItemType.MULTI_LIST === item.type) {
|
|
245
248
|
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;
|
|
@@ -251,6 +254,12 @@ export class SnkFilterModal {
|
|
|
251
254
|
.map(([key, _]) => key).length;
|
|
252
255
|
return;
|
|
253
256
|
}
|
|
257
|
+
if (FilterItemType.PERIOD === item.type) {
|
|
258
|
+
if (!!((_g = item.value) === null || _g === void 0 ? void 0 : _g.start) || !!((_h = item.value) === null || _h === void 0 ? void 0 : _h.end)) {
|
|
259
|
+
countInformedItens++;
|
|
260
|
+
}
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
254
263
|
if (item.groupedItems != undefined) {
|
|
255
264
|
countInformedItens = item.groupedItems.filter(item => item.visible).length;
|
|
256
265
|
return;
|
|
@@ -301,8 +310,9 @@ export class SnkFilterModal {
|
|
|
301
310
|
const defaultFilter = filters.find((item) => item.id === DefaultFilter.id);
|
|
302
311
|
return defaultFilter;
|
|
303
312
|
}
|
|
304
|
-
componentWillLoad() {
|
|
313
|
+
async componentWillLoad() {
|
|
305
314
|
this._application = ApplicationContext.getContextValue('__SNK__APPLICATION__');
|
|
315
|
+
this._isUserSup = await this._application.isUserSup();
|
|
306
316
|
this.filters = ObjectUtils.copy(this.filterConfig);
|
|
307
317
|
}
|
|
308
318
|
componentWillRender() {
|
|
@@ -314,11 +324,12 @@ export class SnkFilterModal {
|
|
|
314
324
|
this.validateFilters();
|
|
315
325
|
}
|
|
316
326
|
render() {
|
|
317
|
-
this._defaultFilter = this.getDefaultFilter(this.filters);
|
|
327
|
+
this._defaultFilter = this._isUserSup ? this.getDefaultFilter(this.filters) : undefined;
|
|
318
328
|
const customFilters = this.getCustomFilter(this.filters);
|
|
319
329
|
const quickFilters = this.filters.filter(filter => filter.filterType === FilterType.QUICK_FILTER);
|
|
320
330
|
const otherFilters = this.filters.filter(filter => filter.filterType === FilterType.OTHER_FILTERS);
|
|
321
|
-
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" },
|
|
331
|
+
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 &&
|
|
332
|
+
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))))));
|
|
322
333
|
}
|
|
323
334
|
static get is() { return "snk-filter-modal"; }
|
|
324
335
|
static get originalStyleUrls() {
|
|
@@ -50,10 +50,19 @@ export class SnkFilterBar {
|
|
|
50
50
|
this.isFilterModalOpen = false;
|
|
51
51
|
}
|
|
52
52
|
hasValidValue(item) {
|
|
53
|
-
|
|
53
|
+
var _a, _b;
|
|
54
|
+
if (item.value === undefined || item.value === null) {
|
|
54
55
|
return false;
|
|
55
|
-
|
|
56
|
+
}
|
|
57
|
+
if (item.type === FilterItemType.PERIOD) {
|
|
58
|
+
return (!!((_a = item.value) === null || _a === void 0 ? void 0 : _a.start) || !!((_b = item.value) === null || _b === void 0 ? void 0 : _b.end));
|
|
59
|
+
}
|
|
60
|
+
if (item.groupedItems) {
|
|
56
61
|
return true;
|
|
62
|
+
}
|
|
63
|
+
if (!Array.isArray(item.value)) {
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
57
66
|
return item.value.some(filterItem => filterItem.check === true);
|
|
58
67
|
}
|
|
59
68
|
observeFilterConfig(newValue, oldValue) {
|
|
@@ -255,7 +264,7 @@ export class SnkFilterBar {
|
|
|
255
264
|
if (item.type === FilterItemType.DEFAULT_FILTER) {
|
|
256
265
|
return true;
|
|
257
266
|
}
|
|
258
|
-
return this.filterActiveFilter(item) && (item
|
|
267
|
+
return this.filterActiveFilter(item) && this.hasValidValue(item);
|
|
259
268
|
}
|
|
260
269
|
async registryFilterProvider() {
|
|
261
270
|
this.dataUnit.addFilterProvider(this);
|
|
@@ -322,27 +331,35 @@ export class SnkFilterBar {
|
|
|
322
331
|
}
|
|
323
332
|
normalizeItem(item) {
|
|
324
333
|
const normalized = Object.assign({}, item);
|
|
334
|
+
const isPersonalizedFilter = item.type === FilterItemType.PERSONALIZED;
|
|
335
|
+
const hasNormalizedGroupedItems = (normalized.value === undefined && normalized.groupedItems);
|
|
336
|
+
if (isPersonalizedFilter && hasNormalizedGroupedItems) {
|
|
337
|
+
normalized.value = normalized.groupedItems.filter(groupItem => !!groupItem.visible).length;
|
|
338
|
+
}
|
|
325
339
|
const optionals = ["props", "value", "hardFixed", "fixed"];
|
|
326
340
|
optionals.forEach(prop => {
|
|
341
|
+
if (prop === "value" && isPersonalizedFilter) {
|
|
342
|
+
return;
|
|
343
|
+
}
|
|
327
344
|
if (normalized[prop] == undefined) {
|
|
328
345
|
delete normalized[prop];
|
|
329
346
|
}
|
|
330
347
|
});
|
|
331
|
-
if (
|
|
332
|
-
delete
|
|
348
|
+
if (normalized.value === "" && !isPersonalizedFilter) {
|
|
349
|
+
delete normalized.value;
|
|
333
350
|
}
|
|
334
351
|
return normalized;
|
|
335
352
|
}
|
|
336
353
|
updateFilter(newItem) {
|
|
354
|
+
const normalizedNewItem = this.normalizeItem(newItem);
|
|
337
355
|
let config = this.filterConfig.map(item => {
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
return newItem;
|
|
356
|
+
if (item.id !== normalizedNewItem.id) {
|
|
357
|
+
return item;
|
|
358
|
+
}
|
|
359
|
+
if (ObjectUtils.objectToString(item) == ObjectUtils.objectToString(normalizedNewItem)) {
|
|
360
|
+
this.calculateUpdateSequence(normalizedNewItem);
|
|
344
361
|
}
|
|
345
|
-
return
|
|
362
|
+
return normalizedNewItem;
|
|
346
363
|
}).sort((a, b) => this._filtersComparator(a, b));
|
|
347
364
|
if (this.filterCustomConfigInterceptor) {
|
|
348
365
|
config = this.filterCustomConfigInterceptor(config);
|
|
@@ -508,7 +525,7 @@ export class SnkFilterBar {
|
|
|
508
525
|
return itemA.originOrder - itemB.originOrder;
|
|
509
526
|
});
|
|
510
527
|
if (this.mode !== "regular") {
|
|
511
|
-
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 })));
|
|
528
|
+
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 })));
|
|
512
529
|
}
|
|
513
530
|
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 })));
|
|
514
531
|
}
|
|
@@ -108,6 +108,48 @@ export function buildGuides(config, mainArea) {
|
|
|
108
108
|
tabs = initializeTabsNames(tabs);
|
|
109
109
|
return handleMainTab(tabs, mainArea);
|
|
110
110
|
}
|
|
111
|
+
export function buildChildrenGuides(dataUnit, initialOrderIndex = 0, guidesList) {
|
|
112
|
+
var _a;
|
|
113
|
+
if (!dataUnit || !dataUnit.metadata) {
|
|
114
|
+
return [];
|
|
115
|
+
}
|
|
116
|
+
const children = ((_a = dataUnit.metadata) === null || _a === void 0 ? void 0 : _a.children) || [];
|
|
117
|
+
const childrenWithNoGuide = [];
|
|
118
|
+
for (const child of children) {
|
|
119
|
+
const guideOnConfig = guidesList.find(guide => child.label === guide.label);
|
|
120
|
+
if (guideOnConfig) {
|
|
121
|
+
guideOnConfig.isCustom = true;
|
|
122
|
+
continue;
|
|
123
|
+
}
|
|
124
|
+
childrenWithNoGuide.push({
|
|
125
|
+
label: child.label,
|
|
126
|
+
name: child.name,
|
|
127
|
+
visible: true,
|
|
128
|
+
isCustom: true,
|
|
129
|
+
order: initialOrderIndex++
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
return childrenWithNoGuide;
|
|
133
|
+
}
|
|
134
|
+
export function buildCustomGuides(customGuidesList, guidesList) {
|
|
135
|
+
let initialOrderIndex = guidesList.length;
|
|
136
|
+
const customGuidesToAdd = getCustomGuidesNotIncludedInList(customGuidesList, guidesList);
|
|
137
|
+
return customGuidesToAdd.map(guide => {
|
|
138
|
+
return {
|
|
139
|
+
name: guide.id,
|
|
140
|
+
label: guide.label,
|
|
141
|
+
visible: true,
|
|
142
|
+
isCustom: true,
|
|
143
|
+
order: initialOrderIndex++
|
|
144
|
+
};
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
function isCustomGuideIncludedInList(guidesList, guide) {
|
|
148
|
+
return guidesList.some(fromList => fromList.name === guide.id || fromList.label === guide.label);
|
|
149
|
+
}
|
|
150
|
+
function getCustomGuidesNotIncludedInList(customGuidesList, guidesList) {
|
|
151
|
+
return customGuidesList.filter(guide => !isCustomGuideIncludedInList(guidesList, guide));
|
|
152
|
+
}
|
|
111
153
|
function handleFieldsTabNames(allFields) {
|
|
112
154
|
// Campos que não fazem parte de nenhuma aba ou da aba "Geral", devem ser movidos para a aba __main.
|
|
113
155
|
return allFields.map(field => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ConfigStorage } from '../../lib/configs/ConfigStorage';
|
|
2
1
|
import { ObjectUtils, StringUtils } from '@sankhyalabs/core';
|
|
2
|
+
import { ConfigStorage } from '../../lib/configs/ConfigStorage';
|
|
3
3
|
import { FormConfigFetcher } from '../../lib/http/data-fetcher/fetchers/form-config-fetcher';
|
|
4
4
|
import { TAB_NAMES } from '../../lib/utils/constants';
|
|
5
5
|
export class SnkFormConfigManager {
|
|
@@ -82,7 +82,7 @@ export class SnkFormConfigManager {
|
|
|
82
82
|
return false;
|
|
83
83
|
}
|
|
84
84
|
getFieldsList(descriptionFilter, forceEmptyConfig = false) {
|
|
85
|
-
var _a;
|
|
85
|
+
var _a, _b;
|
|
86
86
|
const fields = (_a = this._config) === null || _a === void 0 ? void 0 : _a.fields;
|
|
87
87
|
const hasConfig = this.hasConfig();
|
|
88
88
|
if (hasConfig && !forceEmptyConfig) {
|
|
@@ -98,7 +98,7 @@ export class SnkFormConfigManager {
|
|
|
98
98
|
})
|
|
99
99
|
.filter(field => this.isFieldVisible(field, descriptionFilter));
|
|
100
100
|
}
|
|
101
|
-
if (!this._dataUnit) {
|
|
101
|
+
if (!this._dataUnit || !((_b = this._dataUnit.metadata) === null || _b === void 0 ? void 0 : _b.fields)) {
|
|
102
102
|
return [];
|
|
103
103
|
}
|
|
104
104
|
const filteredFields = this._dataUnit.metadata.fields
|
|
@@ -178,7 +178,7 @@ export class SnkFormConfigManager {
|
|
|
178
178
|
return Array.isArray(object) ? object : [object];
|
|
179
179
|
}
|
|
180
180
|
buildFormMetadataUITabs(config, forceEmptyConfig = false) {
|
|
181
|
-
var _a;
|
|
181
|
+
var _a, _b, _c;
|
|
182
182
|
const hasConfig = this.hasConfig(config);
|
|
183
183
|
if (!forceEmptyConfig && (!this._dataUnit || hasConfig)) {
|
|
184
184
|
return config;
|
|
@@ -187,10 +187,10 @@ export class SnkFormConfigManager {
|
|
|
187
187
|
config.tabs = this.parseObjectList(config.tabs);
|
|
188
188
|
config.emptyConfig = false;
|
|
189
189
|
config.defaultConfiguration = true;
|
|
190
|
-
const fields = this._dataUnit.metadata.fields;
|
|
190
|
+
const fields = (_b = (_a = this._dataUnit.metadata) === null || _a === void 0 ? void 0 : _a.fields) !== null && _b !== void 0 ? _b : [];
|
|
191
191
|
for (const currentField of fields) {
|
|
192
192
|
const field = config.fields.find(field => field.name === currentField.name);
|
|
193
|
-
const uiTabName = (
|
|
193
|
+
const uiTabName = (_c = currentField.properties) === null || _c === void 0 ? void 0 : _c.UITabName;
|
|
194
194
|
if (!uiTabName || uiTabName === TAB_NAMES.main) {
|
|
195
195
|
continue;
|
|
196
196
|
}
|
|
@@ -119,6 +119,22 @@
|
|
|
119
119
|
font-weight: 500;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
+
.message-container {
|
|
123
|
+
margin: auto;
|
|
124
|
+
display: flex;
|
|
125
|
+
flex-direction: column;
|
|
126
|
+
justify-content: center;
|
|
127
|
+
align-items: center;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.message-config-detail {
|
|
131
|
+
display: block;
|
|
132
|
+
margin: auto;
|
|
133
|
+
font-size: var(--font-size--medium, 16px);
|
|
134
|
+
color: #AFB6C0;
|
|
135
|
+
font-weight: var(--font-weight--medium, 500);
|
|
136
|
+
}
|
|
137
|
+
|
|
122
138
|
.ghost {
|
|
123
139
|
opacity: .5;
|
|
124
140
|
background: #c8fbe2;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { forceUpdate, h, Host, } from '@stencil/core';
|
|
2
1
|
import { ObjectUtils, StringUtils } from '@sankhyalabs/core';
|
|
2
|
+
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
3
|
+
import { forceUpdate, h, Host, } from '@stencil/core';
|
|
3
4
|
import Sortable from 'sortablejs';
|
|
4
|
-
import { getFieldsStructure, ID_AVAILABLE_FIELDS, SORTABLE_PATH, } from '../FormConfigHelper';
|
|
5
5
|
import { GROUP_NAMES, TAB_NAMES } from '../../../lib/utils/constants';
|
|
6
|
-
import {
|
|
6
|
+
import { getFieldsStructure, ID_AVAILABLE_FIELDS, SORTABLE_PATH, } from '../FormConfigHelper';
|
|
7
7
|
export class FieldLayoutComponent {
|
|
8
8
|
constructor() {
|
|
9
9
|
this.ID_GROUPS = 'container-groups';
|
|
@@ -320,6 +320,9 @@ export class FieldLayoutComponent {
|
|
|
320
320
|
if (!this.selectedGuide) {
|
|
321
321
|
return (h(Host, { class: 'ez-flex-item--auto ez-size-height--full ez-box ez-padding--medium content-container' }, h("span", { class: 'no-guide-selected' }, this.getMessage('snkFormConfig.form.noGuideSelected'))));
|
|
322
322
|
}
|
|
323
|
+
if (this.selectedGuide.isCustom || this.selectedGuide.isDetail) {
|
|
324
|
+
return (h(Host, { class: 'ez-flex-item--auto ez-size-height--full ez-box ez-padding--medium content-container' }, h("div", { class: 'message-container' }, h("h1", { class: 'no-guide-selected' }, this.getMessage('snkFormConfig.form.canNotEditCustomGuide')), h("span", { class: 'message-config-detail' }, this.getMessage('snkFormConfig.form.canNotEditDetailGuide')))));
|
|
325
|
+
}
|
|
323
326
|
return (h(Host, { class: 'ez-flex-item--auto ez-size-height--full ez-box ez-padding--medium content-container' }, this.renderGuideName(), h("div", { class: 'layout-container' }, h("ez-scroller", { direction: 'vertical', activeShadow: true }, h("div", { class: 'no-group-container' }, h("div", { id: GROUP_NAMES.noGroup, class: 'group-content', "data-group-name": GROUP_NAMES.noGroup }, this.renderFixedFields())), h("hr", null), h("div", { id: this.ID_GROUPS, class: 'groups-container' }, this.renderDraggableGroups()))), h("div", { class: 'add-group-container', onClick: this.handleAddGroup.bind(this) }, h("ez-icon", { slot: "leftIcon", iconName: "plus" }), h("span", null, this.getMessage('snkFormConfig.form.createNewGroup')))));
|
|
324
327
|
}
|
|
325
328
|
static get is() { return "fields-layout"; }
|
package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.css
CHANGED
|
@@ -91,13 +91,13 @@
|
|
|
91
91
|
.guide-item .actions {
|
|
92
92
|
display: flex;
|
|
93
93
|
gap: 8px;
|
|
94
|
-
transition: 0.2s ease-in-out;
|
|
95
|
-
|
|
94
|
+
transition: opacity 0.2s ease-in-out;
|
|
95
|
+
display: none;
|
|
96
96
|
opacity: 0;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
.guide-item:hover .actions {
|
|
100
|
-
|
|
100
|
+
display: flex;
|
|
101
101
|
opacity: 1;
|
|
102
102
|
}
|
|
103
103
|
|
package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { h } from '@stencil/core';
|
|
2
|
-
import Sortable from 'sortablejs';
|
|
3
1
|
import { ArrayUtils, ObjectUtils } from '@sankhyalabs/core';
|
|
4
2
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
3
|
+
import { h } from '@stencil/core';
|
|
4
|
+
import Sortable from 'sortablejs';
|
|
5
5
|
import { TAB_NAMES } from '../../../lib/utils/constants';
|
|
6
6
|
export class GuidesConfigurator {
|
|
7
7
|
constructor() {
|
|
@@ -92,7 +92,9 @@ export class GuidesConfigurator {
|
|
|
92
92
|
var _a;
|
|
93
93
|
return (h("div", { key: guide.name, "data-guide-name": guide.name, title: guide.label, class: `guide-item ${((_a = this.selectedGuide) === null || _a === void 0 ? void 0 : _a.label) === guide.label ? 'selected' : ''} ${this.filterTerm.length ? 'disable-sort' : ''}`, onClick: e => this.handleSelectGuide(guide, e) }, h("span", null, h("ez-icon", { iconName: "drag-indicator", class: 'ez-margin-right--small' })), h("span", { class: 'item-label' }, guide.label), h("div", { class: 'actions' }, h("ez-button", { mode: "icon", class: "ez-button--tertiary", onClick: e => this.toggleGuideVisibility(guide, e), size: "medium", iconName: guide.visible ? 'eye-off' : 'eye', title: guide.visible ?
|
|
94
94
|
this.getMessage('snkFormConfig.guidesConfigurator.actions.hide') :
|
|
95
|
-
this.getMessage('snkFormConfig.guidesConfigurator.actions.show') }), h("ez-button", { mode: "icon", class: "ez-button--tertiary", onClick: e => this.handleDeleteGuide(guide, e), size: "medium", iconName: 'delete', title:
|
|
95
|
+
this.getMessage('snkFormConfig.guidesConfigurator.actions.show') }), h("ez-button", { mode: "icon", class: "ez-button--tertiary", onClick: e => this.handleDeleteGuide(guide, e), size: "medium", isDisabled: guide.isCustom || guide.isDetail, iconName: 'delete', title: guide.isCustom || guide.isDetail ?
|
|
96
|
+
this.getMessage('snkFormConfig.guidesConfigurator.canNotDeleteCustomGuide') :
|
|
97
|
+
this.getMessage('snkFormConfig.guidesConfigurator.actions.delete') }))));
|
|
96
98
|
});
|
|
97
99
|
}
|
|
98
100
|
getContainerElement(id) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { h, Host } from '@stencil/core';
|
|
2
1
|
import { ApplicationContext, ObjectUtils } from '@sankhyalabs/core';
|
|
3
2
|
import { buildFormConfigFromDataUnit } from '@sankhyalabs/ezui/dist/collection/utils/form';
|
|
4
|
-
import {
|
|
5
|
-
import { GROUP_NAMES, TAB_NAMES } from '../../lib/utils/constants';
|
|
3
|
+
import { h, Host } from '@stencil/core';
|
|
6
4
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
7
5
|
import { UserConfigType } from '../../lib/http/data-fetcher/fetchers/form-config-fetcher';
|
|
6
|
+
import { GROUP_NAMES, TAB_NAMES } from '../../lib/utils/constants';
|
|
7
|
+
import { buildChildrenGuides, buildCustomGuides, buildGuides, buildGuidesMap, buildNewGuideName, getFieldsToSave, updateTabInFieldsFromGroupList, } from './FormConfigHelper';
|
|
8
8
|
export class SnkFormConfig {
|
|
9
9
|
constructor() {
|
|
10
10
|
this.guidesMap = new Map();
|
|
@@ -22,6 +22,7 @@ export class SnkFormConfig {
|
|
|
22
22
|
this.configManager = undefined;
|
|
23
23
|
this.ignoreReadOnlyFormFields = undefined;
|
|
24
24
|
this.messagesBuilder = undefined;
|
|
25
|
+
this.customGuidesConfig = [];
|
|
25
26
|
}
|
|
26
27
|
handleFieldConfigChanged() {
|
|
27
28
|
this.hasChanges = true;
|
|
@@ -41,6 +42,10 @@ export class SnkFormConfig {
|
|
|
41
42
|
this.showNoGuideSelectedDialog();
|
|
42
43
|
return;
|
|
43
44
|
}
|
|
45
|
+
if (this.selectedGuide.isCustom || this.selectedGuide.isDetail) {
|
|
46
|
+
this.showCanNotAddFieldToGuideDialog();
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
44
49
|
this.availableFields = [...this.availableFields.filter(f => f.name !== fieldItem.name)];
|
|
45
50
|
await ((_a = this.refFieldsLayout) === null || _a === void 0 ? void 0 : _a.addFieldToLayout(fieldItem));
|
|
46
51
|
}
|
|
@@ -66,6 +71,11 @@ export class SnkFormConfig {
|
|
|
66
71
|
const message = this.getMessage('snkFormConfig.noGuideSelected.message');
|
|
67
72
|
ApplicationUtils.alert(title, message);
|
|
68
73
|
}
|
|
74
|
+
showCanNotAddFieldToGuideDialog() {
|
|
75
|
+
const title = this.getMessage('snkFormConfig.canNotAddFieldToGuide.title');
|
|
76
|
+
const message = this.getMessage('snkFormConfig.canNotAddFieldToGuide.message');
|
|
77
|
+
ApplicationUtils.alert(title, message);
|
|
78
|
+
}
|
|
69
79
|
/**
|
|
70
80
|
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
|
71
81
|
* através de um pequeno modulo na estrutura da aplicação:
|
|
@@ -83,8 +93,8 @@ export class SnkFormConfig {
|
|
|
83
93
|
this.configOptions = userConfig;
|
|
84
94
|
const isDefault = this._formConfig != undefined ? this._formConfig.defaultConfiguration : true;
|
|
85
95
|
const origin = (isDefault ? UserConfigType.DEFAULT : UserConfigType.USER);
|
|
86
|
-
this.configSelected = userConfig.find((config) => config.origin === origin);
|
|
87
|
-
this.originalConfigSelected = userConfig.find((config) => config.origin === origin);
|
|
96
|
+
this.configSelected = userConfig === null || userConfig === void 0 ? void 0 : userConfig.find((config) => config.origin === origin);
|
|
97
|
+
this.originalConfigSelected = userConfig === null || userConfig === void 0 ? void 0 : userConfig.find((config) => config.origin === origin);
|
|
88
98
|
}
|
|
89
99
|
catch (error) {
|
|
90
100
|
console.error(this.getMessage('snkFormConfig.errors.failFetchUserConfig'));
|
|
@@ -137,9 +147,22 @@ export class SnkFormConfig {
|
|
|
137
147
|
return fieldVisible === true && hasCfg === false;
|
|
138
148
|
});
|
|
139
149
|
}
|
|
150
|
+
getInitialOrder(guidesList) {
|
|
151
|
+
var _a, _b;
|
|
152
|
+
if (Array.isArray((_a = this._formConfig) === null || _a === void 0 ? void 0 : _a.tabs)) {
|
|
153
|
+
return (_b = this._formConfig.tabs) === null || _b === void 0 ? void 0 : _b.length;
|
|
154
|
+
}
|
|
155
|
+
if (guidesList.length > 0) {
|
|
156
|
+
return Math.max(...guidesList.map(g => g.order));
|
|
157
|
+
}
|
|
158
|
+
return 0;
|
|
159
|
+
}
|
|
140
160
|
loadGuides() {
|
|
141
161
|
var _a;
|
|
142
|
-
this.guidesList = [
|
|
162
|
+
this.guidesList = [];
|
|
163
|
+
this.guidesList.push(...buildGuides(this._formConfig, this.getMessage('snkFormConfig.form.mainArea')));
|
|
164
|
+
this.guidesList.push(...buildChildrenGuides(this.dataUnit, this.getInitialOrder(this.guidesList), this.guidesList));
|
|
165
|
+
this.guidesList.push(...buildCustomGuides(this.customGuidesConfig, this.guidesList));
|
|
143
166
|
this.guidesMap = buildGuidesMap((_a = this._formConfig) === null || _a === void 0 ? void 0 : _a.fields, this.guidesList, this.dataUnit, this.getMessage('snkFormConfig.form.tabGeneral'));
|
|
144
167
|
}
|
|
145
168
|
getConfig() {
|
|
@@ -368,6 +391,30 @@ export class SnkFormConfig {
|
|
|
368
391
|
"tags": [],
|
|
369
392
|
"text": "Respons\u00E1vel por flexibilizar e padronizar o uso de mensagens nos blocos de constru\u00E7\u00E3o."
|
|
370
393
|
}
|
|
394
|
+
},
|
|
395
|
+
"customGuidesConfig": {
|
|
396
|
+
"type": "unknown",
|
|
397
|
+
"mutable": false,
|
|
398
|
+
"complexType": {
|
|
399
|
+
"original": "Array<CustomGuideItem>",
|
|
400
|
+
"resolved": "CustomGuideItem[]",
|
|
401
|
+
"references": {
|
|
402
|
+
"Array": {
|
|
403
|
+
"location": "global"
|
|
404
|
+
},
|
|
405
|
+
"CustomGuideItem": {
|
|
406
|
+
"location": "import",
|
|
407
|
+
"path": "../snk-crud/subcomponents/snk-guides-viewer"
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
},
|
|
411
|
+
"required": false,
|
|
412
|
+
"optional": true,
|
|
413
|
+
"docs": {
|
|
414
|
+
"tags": [],
|
|
415
|
+
"text": "Informa\u00E7\u00F5es das guias personalizadas."
|
|
416
|
+
},
|
|
417
|
+
"defaultValue": "[]"
|
|
371
418
|
}
|
|
372
419
|
};
|
|
373
420
|
}
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
width: 100%;
|
|
10
10
|
padding: var(--snk-grid-padding);
|
|
11
11
|
outline: none;
|
|
12
|
+
|
|
13
|
+
--snk-grid-header--min-height: var(--space--52);
|
|
12
14
|
}
|
|
13
15
|
|
|
14
16
|
.snk-grid__header {
|
|
@@ -16,6 +18,8 @@
|
|
|
16
18
|
display: flex;
|
|
17
19
|
flex-wrap: nowrap;
|
|
18
20
|
justify-content: flex-end;
|
|
21
|
+
align-items: flex-start;
|
|
22
|
+
min-height: var(--snk-grid-header--min-height);
|
|
19
23
|
}
|
|
20
24
|
|
|
21
25
|
.snk-grid__filter-bar {
|
|
@@ -25,6 +29,14 @@
|
|
|
25
29
|
.snk-grid__header-divider {
|
|
26
30
|
/*public*/
|
|
27
31
|
margin-bottom: var(--space--medium);
|
|
32
|
+
margin-right: var(--space--0);
|
|
33
|
+
align-self: stretch;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.snk-grid__header snk-taskbar {
|
|
37
|
+
display: flex;
|
|
38
|
+
align-items: flex-start;
|
|
39
|
+
min-height: var(--snk-grid-header--min-height);
|
|
28
40
|
}
|
|
29
41
|
|
|
30
42
|
.snk-grid__table {
|
|
@@ -55,7 +55,8 @@ export class SnkGrid {
|
|
|
55
55
|
this._popUpGridConfig = false;
|
|
56
56
|
this._showSnkFilterBar = true;
|
|
57
57
|
this._enableContinuousInsert = false;
|
|
58
|
-
this.
|
|
58
|
+
this._filterMode = 'regular';
|
|
59
|
+
this.columnFilterDataSource = undefined;
|
|
59
60
|
this.enableLockManagerLoadingComp = false;
|
|
60
61
|
this.enableLockManagerTaskbarClick = false;
|
|
61
62
|
this.configName = undefined;
|
|
@@ -382,14 +383,20 @@ export class SnkGrid {
|
|
|
382
383
|
}
|
|
383
384
|
return action;
|
|
384
385
|
}
|
|
386
|
+
initializeColumnFilterDataSource() {
|
|
387
|
+
var _a, _b, _c;
|
|
388
|
+
const isInMemoryDataUnit = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.name.includes("InMemoryDataUnit");
|
|
389
|
+
if (!this.columnFilterDataSource && !isInMemoryDataUnit) {
|
|
390
|
+
this.columnFilterDataSource = new SnkMultiSelectionListDataSource();
|
|
391
|
+
}
|
|
392
|
+
(_b = this.columnFilterDataSource) === null || _b === void 0 ? void 0 : _b.setApplication(this._application);
|
|
393
|
+
(_c = this.columnFilterDataSource) === null || _c === void 0 ? void 0 : _c.setDataUnit(this._dataUnit);
|
|
394
|
+
}
|
|
385
395
|
finishLoading() {
|
|
386
396
|
this._dataUnit.addInterceptor(this.dataUnitInterceptor);
|
|
387
397
|
CrudUtils.assertDefaultSorting(this._gridConfig, this._dataUnit);
|
|
388
398
|
this.addElementID();
|
|
389
|
-
|
|
390
|
-
this.columnFilterDataSource.setApplication(this._application);
|
|
391
|
-
this.columnFilterDataSource.setDataUnit(this._dataUnit);
|
|
392
|
-
}
|
|
399
|
+
this.initializeColumnFilterDataSource();
|
|
393
400
|
}
|
|
394
401
|
setCustomRenders() {
|
|
395
402
|
if (!this._grid) {
|
|
@@ -472,7 +479,7 @@ export class SnkGrid {
|
|
|
472
479
|
return disabledButtons;
|
|
473
480
|
}
|
|
474
481
|
getInvisibleButtons() {
|
|
475
|
-
var _a, _b;
|
|
482
|
+
var _a, _b, _c;
|
|
476
483
|
let invisibleButtons = [];
|
|
477
484
|
if (!this._dataUnit || this._dataUnit.records.length === 0)
|
|
478
485
|
invisibleButtons.push(TaskbarElement.DATA_EXPORTER);
|
|
@@ -480,6 +487,8 @@ export class SnkGrid {
|
|
|
480
487
|
invisibleButtons.push(TaskbarElement.ACTIONS_BUTTON);
|
|
481
488
|
if (((_b = this._dataState) === null || _b === void 0 ? void 0 : _b.selectionInfo.length) === 1)
|
|
482
489
|
invisibleButtons.push(TaskbarElement.UPDATE_MULTIPLE);
|
|
490
|
+
if (!((_c = this._dataState) === null || _c === void 0 ? void 0 : _c.selectionInfo.length))
|
|
491
|
+
invisibleButtons.push(TaskbarElement.FORM_MODE);
|
|
483
492
|
return invisibleButtons;
|
|
484
493
|
}
|
|
485
494
|
componentWillRender() {
|
|
@@ -573,7 +582,8 @@ export class SnkGrid {
|
|
|
573
582
|
return;
|
|
574
583
|
}
|
|
575
584
|
if (filterConfig.length === 1 && filterConfig[0].id === 'PERSONALIZED_FILTER_GROUP') {
|
|
576
|
-
this._showSnkFilterBar =
|
|
585
|
+
this._showSnkFilterBar = true;
|
|
586
|
+
this._filterMode = filterConfig[0].groupedItems.length > 0 ? 'regular' : 'button';
|
|
577
587
|
return;
|
|
578
588
|
}
|
|
579
589
|
this._showSnkFilterBar = true;
|
|
@@ -590,8 +600,8 @@ export class SnkGrid {
|
|
|
590
600
|
if (!this._dataUnit) {
|
|
591
601
|
return undefined;
|
|
592
602
|
}
|
|
593
|
-
return (h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large ez-box--no-outline", tabindex: "0" }, h("div", { class: "snk-grid__header
|
|
594
|
-
h(Fragment, null, h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail), disablePersonalizedFilter: this.disablePersonalizedFilter, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, filterCustomConfig: this.filterCustomConfig, filterCustomConfigInterceptor: this.filterCustomConfigInterceptor }), h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), h("snk-taskbar", { class: "ez-padding-left--medium ez-padding-top--extra-small", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId, overflowStrategy: 'none', actionsSettingsList: this.getActionsSettingsList() }, h("slot", { name: this.topTaskbarCustomSlotId }))), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === PresentationMode.SECONDARY ? 'snk-grid-container__without-shadow ' : '') + 'snk-grid__table', "data-element-id": "embedded", dataUnit: this._dataUnit, key: 'grid-' + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => {
|
|
603
|
+
return (h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large ez-box--no-outline", tabindex: "0" }, h("div", { class: "snk-grid__header" }, this._showSnkFilterBar &&
|
|
604
|
+
h(Fragment, null, h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail), disablePersonalizedFilter: this.disablePersonalizedFilter, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, filterCustomConfig: this.filterCustomConfig, filterCustomConfigInterceptor: this.filterCustomConfigInterceptor, mode: this._filterMode }), h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), h("snk-taskbar", { class: "ez-padding-left--medium ez-padding-top--extra-small", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId, overflowStrategy: 'none', actionsSettingsList: this.getActionsSettingsList() }, h("slot", { name: this.topTaskbarCustomSlotId }))), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === PresentationMode.SECONDARY ? 'snk-grid-container__without-shadow ' : '') + 'snk-grid__table', "data-element-id": "embedded", dataUnit: this._dataUnit, key: 'grid-' + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => {
|
|
595
605
|
this.gridConfigChangeHandler(evt);
|
|
596
606
|
}, onEzColumnFilterChanged: async () => await this.dataExporterProviderStore(), onEzDoubleClick: (evt) => this.gridDoubleClick.emit(evt.detail), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, outlineMode: this.outlineMode, useSearchColumn: this.useSearchColumn, suppressHorizontalScroll: this.suppressHorizontalScroll, paginationCounterMode: this.paginationCounterMode, suppressCheckboxColumn: this.suppressCheckboxColumn, suppressFilterColumn: this.suppressFilterColumn, compact: this.compact }, h("snk-taskbar", { id: 'teste', dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this.getGridHeaderButtons(), presentationMode: this.presentationMode, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.getActionsList(), primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId, additionalSlotId: this.gridHeaderDynamicSearchSlotId, actionsSettingsList: this.getActionsSettingsList() }, h("slot", { name: this.gridHeaderCustomSlotId }), h("slot", { name: this.gridHeaderDynamicSearchSlotId }))), h("div", { class: "ez-col ez-col--sd-12 snk-grid-container__footer" }, h("slot", { name: "SnkGridFooter" })), h("ez-popup", { size: "medium", heightMode: "auto", useHeader: false, opened: this._popUpGridConfig, onEzClosePopup: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
|
|
597
607
|
}
|
|
@@ -627,8 +637,7 @@ export class SnkGrid {
|
|
|
627
637
|
"docs": {
|
|
628
638
|
"tags": [],
|
|
629
639
|
"text": "Define o data source para o filtro de colunas."
|
|
630
|
-
}
|
|
631
|
-
"defaultValue": "new SnkMultiSelectionListDataSource()"
|
|
640
|
+
}
|
|
632
641
|
},
|
|
633
642
|
"enableLockManagerLoadingComp": {
|
|
634
643
|
"type": "boolean",
|
|
@@ -1350,7 +1359,8 @@ export class SnkGrid {
|
|
|
1350
1359
|
"_gridConfig": {},
|
|
1351
1360
|
"_popUpGridConfig": {},
|
|
1352
1361
|
"_showSnkFilterBar": {},
|
|
1353
|
-
"_enableContinuousInsert": {}
|
|
1362
|
+
"_enableContinuousInsert": {},
|
|
1363
|
+
"_filterMode": {}
|
|
1354
1364
|
};
|
|
1355
1365
|
}
|
|
1356
1366
|
static get events() {
|
|
@@ -347,21 +347,29 @@ export class SnkGridConfig {
|
|
|
347
347
|
this._dataChanged = true;
|
|
348
348
|
const config = await ConfigStorage.getDefaultGridConfig(this.resourceID);
|
|
349
349
|
const defaultVisibleCols = (_a = config === null || config === void 0 ? void 0 : config.columns.map(col => col.name)) !== null && _a !== void 0 ? _a : [];
|
|
350
|
+
const isEmptyConfig = defaultVisibleCols.length === 0;
|
|
350
351
|
const visibleGroup = this.buildVisibleGroup();
|
|
351
352
|
const hiddenGroup = this.buildHiddenGroup();
|
|
352
353
|
const visibleItemsMap = new Map();
|
|
353
354
|
this.columns.forEach(column => {
|
|
354
355
|
const item = this.buildListItemFromColumn(column);
|
|
355
|
-
if (defaultVisibleCols.includes(column.name)) {
|
|
356
|
+
if (isEmptyConfig || defaultVisibleCols.includes(column.name)) {
|
|
356
357
|
visibleItemsMap.set(column.name, item);
|
|
357
358
|
}
|
|
358
359
|
else {
|
|
359
360
|
hiddenGroup.items.push(item);
|
|
360
361
|
}
|
|
361
362
|
});
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
.
|
|
363
|
+
if (isEmptyConfig) {
|
|
364
|
+
const itemsToAdd = [];
|
|
365
|
+
visibleItemsMap.forEach((item) => itemsToAdd.push(item));
|
|
366
|
+
visibleGroup.items = itemsToAdd;
|
|
367
|
+
}
|
|
368
|
+
else {
|
|
369
|
+
visibleGroup.items = defaultVisibleCols
|
|
370
|
+
.map(name => visibleItemsMap.get(name))
|
|
371
|
+
.filter(item => item);
|
|
372
|
+
}
|
|
365
373
|
this._columListItems = [visibleGroup, hiddenGroup];
|
|
366
374
|
this._visibleList = visibleGroup.items;
|
|
367
375
|
this._hiddenList = hiddenGroup.items;
|