@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
|
@@ -355,21 +355,29 @@ const SnkGridConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
355
355
|
this._dataChanged = true;
|
|
356
356
|
const config = await ConfigStorage.getDefaultGridConfig(this.resourceID);
|
|
357
357
|
const defaultVisibleCols = (_a = config === null || config === void 0 ? void 0 : config.columns.map(col => col.name)) !== null && _a !== void 0 ? _a : [];
|
|
358
|
+
const isEmptyConfig = defaultVisibleCols.length === 0;
|
|
358
359
|
const visibleGroup = this.buildVisibleGroup();
|
|
359
360
|
const hiddenGroup = this.buildHiddenGroup();
|
|
360
361
|
const visibleItemsMap = new Map();
|
|
361
362
|
this.columns.forEach(column => {
|
|
362
363
|
const item = this.buildListItemFromColumn(column);
|
|
363
|
-
if (defaultVisibleCols.includes(column.name)) {
|
|
364
|
+
if (isEmptyConfig || defaultVisibleCols.includes(column.name)) {
|
|
364
365
|
visibleItemsMap.set(column.name, item);
|
|
365
366
|
}
|
|
366
367
|
else {
|
|
367
368
|
hiddenGroup.items.push(item);
|
|
368
369
|
}
|
|
369
370
|
});
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
.
|
|
371
|
+
if (isEmptyConfig) {
|
|
372
|
+
const itemsToAdd = [];
|
|
373
|
+
visibleItemsMap.forEach((item) => itemsToAdd.push(item));
|
|
374
|
+
visibleGroup.items = itemsToAdd;
|
|
375
|
+
}
|
|
376
|
+
else {
|
|
377
|
+
visibleGroup.items = defaultVisibleCols
|
|
378
|
+
.map(name => visibleItemsMap.get(name))
|
|
379
|
+
.filter(item => item);
|
|
380
|
+
}
|
|
373
381
|
this._columListItems = [visibleGroup, hiddenGroup];
|
|
374
382
|
this._visibleList = visibleGroup.items;
|
|
375
383
|
this._hiddenList = hiddenGroup.items;
|
|
@@ -4,7 +4,7 @@ import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
|
|
|
4
4
|
import { buildFieldSearch } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
5
5
|
import './DataFetcher.js';
|
|
6
6
|
import { P as PresentationMode, E as ExporterStrategy } from './ISave.js';
|
|
7
|
-
import { C as CommonsExporter, T as TaskbarProcessor,
|
|
7
|
+
import { C as CommonsExporter, T as TaskbarProcessor, a as CrudUtils, S as SnkMultiSelectionListDataSource, R as RmPrecisionCustomValueFormatter, b as ContinuousInsertUtils, c as ClientSideExporterProvider } from './ContinuousInsertUtils.js';
|
|
8
8
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
9
9
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
10
10
|
import './dataunit-fetcher.js';
|
|
@@ -91,7 +91,7 @@ class ServerSideExporterProvider extends CommonsExporter {
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
const snkGridCss = ".sc-snk-grid-h{--snk-grid-min-height:300px;--snk-grid-padding:var(--space--small)}.snk-grid__container.sc-snk-grid{display:flex;height:100%;width:100%;padding:var(--snk-grid-padding);outline:none}.snk-grid__header.sc-snk-grid{width:100%;display:flex;flex-wrap:nowrap;justify-content:flex-end}.snk-grid__filter-bar.sc-snk-grid{width:100%}.snk-grid__header-divider.sc-snk-grid{margin-bottom:var(--space--medium)}.snk-grid__table.sc-snk-grid{min-height:var(--snk-grid-min-height)}.snk-grid-container__without-shadow.sc-snk-grid{--ezgrid__container--shadow:unset}.snk-grid-container__footer.sc-snk-grid{background-color:var(--background--xlight, #FFF);border-radius:0 0 var(--border--radius-medium) var(--border--radius-medium);box-shadow:var(--shadow--small)}";
|
|
94
|
+
const snkGridCss = ".sc-snk-grid-h{--snk-grid-min-height:300px;--snk-grid-padding:var(--space--small)}.snk-grid__container.sc-snk-grid{display:flex;height:100%;width:100%;padding:var(--snk-grid-padding);outline:none;--snk-grid-header--min-height:var(--space--52)}.snk-grid__header.sc-snk-grid{width:100%;display:flex;flex-wrap:nowrap;justify-content:flex-end;align-items:flex-start;min-height:var(--snk-grid-header--min-height)}.snk-grid__filter-bar.sc-snk-grid{width:100%}.snk-grid__header-divider.sc-snk-grid{margin-bottom:var(--space--medium);margin-right:var(--space--0);align-self:stretch}.snk-grid__header.sc-snk-grid snk-taskbar.sc-snk-grid{display:flex;align-items:flex-start;min-height:var(--snk-grid-header--min-height)}.snk-grid__table.sc-snk-grid{min-height:var(--snk-grid-min-height)}.snk-grid-container__without-shadow.sc-snk-grid{--ezgrid__container--shadow:unset}.snk-grid-container__footer.sc-snk-grid{background-color:var(--background--xlight, #FFF);border-radius:0 0 var(--border--radius-medium) var(--border--radius-medium);box-shadow:var(--shadow--small)}";
|
|
95
95
|
|
|
96
96
|
const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
97
97
|
constructor() {
|
|
@@ -139,7 +139,8 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
139
139
|
this._popUpGridConfig = false;
|
|
140
140
|
this._showSnkFilterBar = true;
|
|
141
141
|
this._enableContinuousInsert = false;
|
|
142
|
-
this.
|
|
142
|
+
this._filterMode = 'regular';
|
|
143
|
+
this.columnFilterDataSource = undefined;
|
|
143
144
|
this.enableLockManagerLoadingComp = false;
|
|
144
145
|
this.enableLockManagerTaskbarClick = false;
|
|
145
146
|
this.configName = undefined;
|
|
@@ -466,14 +467,20 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
466
467
|
}
|
|
467
468
|
return action;
|
|
468
469
|
}
|
|
470
|
+
initializeColumnFilterDataSource() {
|
|
471
|
+
var _a, _b, _c;
|
|
472
|
+
const isInMemoryDataUnit = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.name.includes("InMemoryDataUnit");
|
|
473
|
+
if (!this.columnFilterDataSource && !isInMemoryDataUnit) {
|
|
474
|
+
this.columnFilterDataSource = new SnkMultiSelectionListDataSource();
|
|
475
|
+
}
|
|
476
|
+
(_b = this.columnFilterDataSource) === null || _b === void 0 ? void 0 : _b.setApplication(this._application);
|
|
477
|
+
(_c = this.columnFilterDataSource) === null || _c === void 0 ? void 0 : _c.setDataUnit(this._dataUnit);
|
|
478
|
+
}
|
|
469
479
|
finishLoading() {
|
|
470
480
|
this._dataUnit.addInterceptor(this.dataUnitInterceptor);
|
|
471
481
|
CrudUtils.assertDefaultSorting(this._gridConfig, this._dataUnit);
|
|
472
482
|
this.addElementID();
|
|
473
|
-
|
|
474
|
-
this.columnFilterDataSource.setApplication(this._application);
|
|
475
|
-
this.columnFilterDataSource.setDataUnit(this._dataUnit);
|
|
476
|
-
}
|
|
483
|
+
this.initializeColumnFilterDataSource();
|
|
477
484
|
}
|
|
478
485
|
setCustomRenders() {
|
|
479
486
|
if (!this._grid) {
|
|
@@ -556,7 +563,7 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
556
563
|
return disabledButtons;
|
|
557
564
|
}
|
|
558
565
|
getInvisibleButtons() {
|
|
559
|
-
var _a, _b;
|
|
566
|
+
var _a, _b, _c;
|
|
560
567
|
let invisibleButtons = [];
|
|
561
568
|
if (!this._dataUnit || this._dataUnit.records.length === 0)
|
|
562
569
|
invisibleButtons.push(TaskbarElement.DATA_EXPORTER);
|
|
@@ -564,6 +571,8 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
564
571
|
invisibleButtons.push(TaskbarElement.ACTIONS_BUTTON);
|
|
565
572
|
if (((_b = this._dataState) === null || _b === void 0 ? void 0 : _b.selectionInfo.length) === 1)
|
|
566
573
|
invisibleButtons.push(TaskbarElement.UPDATE_MULTIPLE);
|
|
574
|
+
if (!((_c = this._dataState) === null || _c === void 0 ? void 0 : _c.selectionInfo.length))
|
|
575
|
+
invisibleButtons.push(TaskbarElement.FORM_MODE);
|
|
567
576
|
return invisibleButtons;
|
|
568
577
|
}
|
|
569
578
|
componentWillRender() {
|
|
@@ -657,7 +666,8 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
657
666
|
return;
|
|
658
667
|
}
|
|
659
668
|
if (filterConfig.length === 1 && filterConfig[0].id === 'PERSONALIZED_FILTER_GROUP') {
|
|
660
|
-
this._showSnkFilterBar =
|
|
669
|
+
this._showSnkFilterBar = true;
|
|
670
|
+
this._filterMode = filterConfig[0].groupedItems.length > 0 ? 'regular' : 'button';
|
|
661
671
|
return;
|
|
662
672
|
}
|
|
663
673
|
this._showSnkFilterBar = true;
|
|
@@ -674,8 +684,8 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
674
684
|
if (!this._dataUnit) {
|
|
675
685
|
return undefined;
|
|
676
686
|
}
|
|
677
|
-
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
|
|
678
|
-
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) => {
|
|
687
|
+
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 &&
|
|
688
|
+
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) => {
|
|
679
689
|
this.gridConfigChangeHandler(evt);
|
|
680
690
|
}, 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 }))));
|
|
681
691
|
}
|
|
@@ -729,6 +739,7 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
729
739
|
"_popUpGridConfig": [32],
|
|
730
740
|
"_showSnkFilterBar": [32],
|
|
731
741
|
"_enableContinuousInsert": [32],
|
|
742
|
+
"_filterMode": [32],
|
|
732
743
|
"refreshColumnFilterDataSource": [64],
|
|
733
744
|
"reloadConfig": [64],
|
|
734
745
|
"showConfig": [64],
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface SnkImageInput extends Components.SnkImageInput, HTMLElement {}
|
|
4
|
+
export const SnkImageInput: {
|
|
5
|
+
prototype: SnkImageInput;
|
|
6
|
+
new (): SnkImageInput;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { ApplicationContext, Action } from '@sankhyalabs/core';
|
|
3
|
+
import { S as SnkMessageBuilder } from './SnkMessageBuilder.js';
|
|
4
|
+
|
|
5
|
+
async function base64ToBlob(base64) {
|
|
6
|
+
const response = await fetch(base64);
|
|
7
|
+
return await response.blob();
|
|
8
|
+
}
|
|
9
|
+
function buildFileKey(entityName, fieldName) {
|
|
10
|
+
if (entityName) {
|
|
11
|
+
return `${entityName}_${fieldName}`;
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
return fieldName;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function hasSpecialCharacters(value) {
|
|
18
|
+
const specialChars = /[ !@#$%^&*()+\-=\[\]{};':"\\|,.<>\/?]/;
|
|
19
|
+
return specialChars.test(value);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Gera a URL base para upload de sessão
|
|
23
|
+
*/
|
|
24
|
+
function getSessionUploadBaseUrl(fileKey, context = 'mge') {
|
|
25
|
+
let url = `/${context}/sessionUpload.${context}?sessionkey=${fileKey}`;
|
|
26
|
+
// Verifica se precisa processar caracteres especiais
|
|
27
|
+
if (canProcessSpecialKeys(context) && hasSpecialCharacters(fileKey)) {
|
|
28
|
+
url += `&encodedKey=${btoa(encodeURI(fileKey))}`;
|
|
29
|
+
}
|
|
30
|
+
return url;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Verifica se pode processar chaves especiais
|
|
34
|
+
* Baseado no método canProcessSpecialKeys do sessionfileupload.service.js
|
|
35
|
+
*/
|
|
36
|
+
async function canProcessSpecialKeys(context) {
|
|
37
|
+
var _a;
|
|
38
|
+
const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
39
|
+
if (!application)
|
|
40
|
+
return false;
|
|
41
|
+
const resourceId = await ((_a = application.getResourceID) === null || _a === void 0 ? void 0 : _a.call(application)) || '';
|
|
42
|
+
const adPrefix = "br.com.sankhya.menu.adicional";
|
|
43
|
+
return context === 'mge' && resourceId.startsWith(adPrefix);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Constrói a URL de upload
|
|
47
|
+
* Baseado no método buildUploadURL do sessionfileupload.service.js
|
|
48
|
+
*/
|
|
49
|
+
function buildUploadURL(fileKey) {
|
|
50
|
+
let url = getSessionUploadBaseUrl(fileKey);
|
|
51
|
+
url += "&fitem=S&salvar=S&useCache=N";
|
|
52
|
+
return url;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Faz upload de arquivo para a sessão usando XMLHttpRequest
|
|
56
|
+
* Baseado no método uploadSessionFile do sessionfileupload.service.js
|
|
57
|
+
*/
|
|
58
|
+
async function sessionFileUpload(blob, entityName, fieldName, onProgress) {
|
|
59
|
+
const fileKey = buildFileKey(entityName, fieldName);
|
|
60
|
+
const uploadUrl = buildUploadURL(fileKey);
|
|
61
|
+
return new Promise((resolve, reject) => {
|
|
62
|
+
const formData = new FormData();
|
|
63
|
+
formData.append('arquivo', blob);
|
|
64
|
+
const http = new XMLHttpRequest();
|
|
65
|
+
http.addEventListener("load", () => {
|
|
66
|
+
if (http.status >= 200 && http.status < 300) {
|
|
67
|
+
resolve(`/mge/UPLOADING_${fileKey}.dbimage`);
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
reject(new Error(`Upload failed: ${http.statusText}`));
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
http.addEventListener("error", () => {
|
|
74
|
+
reject(new Error('Upload error'));
|
|
75
|
+
});
|
|
76
|
+
if (onProgress) {
|
|
77
|
+
http.upload.addEventListener("progress", onProgress);
|
|
78
|
+
}
|
|
79
|
+
http.open("POST", uploadUrl);
|
|
80
|
+
http.send(formData);
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
function getUrlBase() {
|
|
84
|
+
return window.location.origin;
|
|
85
|
+
}
|
|
86
|
+
function getBaseUrl(pk, entityName, fieldName) {
|
|
87
|
+
if (!pk)
|
|
88
|
+
return undefined;
|
|
89
|
+
const baseUrl = getUrlBase();
|
|
90
|
+
let url = `${baseUrl}/mge/${entityName}@${fieldName}`;
|
|
91
|
+
for (const pkField in pk) {
|
|
92
|
+
url += `@${pkField}=${pk[pkField]}`;
|
|
93
|
+
}
|
|
94
|
+
url += '.dbimage';
|
|
95
|
+
return url;
|
|
96
|
+
}
|
|
97
|
+
function getPKs(dataUnit) {
|
|
98
|
+
if (!dataUnit) {
|
|
99
|
+
return undefined;
|
|
100
|
+
}
|
|
101
|
+
const pk = {};
|
|
102
|
+
const fields = dataUnit.metadata.fields;
|
|
103
|
+
const selectedRecord = dataUnit.getSelectedRecord();
|
|
104
|
+
fields.forEach((field) => {
|
|
105
|
+
if (field.properties['isPrimaryKey']) {
|
|
106
|
+
pk[field.name] = selectedRecord[field.name];
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
return pk;
|
|
110
|
+
}
|
|
111
|
+
async function imageBlobToBase64(blob) {
|
|
112
|
+
return new Promise((resolve, reject) => {
|
|
113
|
+
const reader = new FileReader();
|
|
114
|
+
reader.onloadend = () => {
|
|
115
|
+
resolve(reader.result);
|
|
116
|
+
};
|
|
117
|
+
reader.onerror = reject;
|
|
118
|
+
reader.readAsDataURL(blob);
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
async function downloadImage(pks, fieldName, entityName) {
|
|
122
|
+
const uploadUrl = getBaseUrl(pks, entityName, fieldName);
|
|
123
|
+
if (!uploadUrl) {
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
try {
|
|
127
|
+
const response = await fetch(uploadUrl);
|
|
128
|
+
if (response.ok) {
|
|
129
|
+
const blob = await response.blob();
|
|
130
|
+
return await imageBlobToBase64(blob);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
catch (error) {
|
|
134
|
+
console.error('Error downloading image:', error);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
const snkImageInputCss = ":host{display:block}";
|
|
139
|
+
|
|
140
|
+
const SnkImageInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
141
|
+
constructor() {
|
|
142
|
+
super();
|
|
143
|
+
this.__registerHost();
|
|
144
|
+
this.__attachShadow();
|
|
145
|
+
this.imageError = createEvent(this, "imageError", 7);
|
|
146
|
+
this.dataUnitObserver = async (action) => {
|
|
147
|
+
var _a;
|
|
148
|
+
const actionsMoveSelection = [Action.NEXT_SELECTED, Action.PREVIOUS_SELECTED];
|
|
149
|
+
if (actionsMoveSelection.includes(action.type)) {
|
|
150
|
+
await this.loadImage();
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
const selection = ((_a = action.payload) === null || _a === void 0 ? void 0 : _a.selection) || [];
|
|
154
|
+
if (action.type === Action.SELECTION_CHANGED && selection.length > 0) {
|
|
155
|
+
await this.loadImage();
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
if (action.type === Action.RECORDS_ADDED) {
|
|
159
|
+
await this.clearImage();
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
this.dataUnit = undefined;
|
|
164
|
+
this.fieldName = undefined;
|
|
165
|
+
this.entityName = undefined;
|
|
166
|
+
this.enabled = true;
|
|
167
|
+
this.acceptType = undefined;
|
|
168
|
+
this.maxSize = undefined;
|
|
169
|
+
this.label = undefined;
|
|
170
|
+
this.imageValue = undefined;
|
|
171
|
+
this.loading = true;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Força o reload da imagem
|
|
175
|
+
*/
|
|
176
|
+
async reloadImage(pks) {
|
|
177
|
+
await this.loadImage(pks);
|
|
178
|
+
}
|
|
179
|
+
getMessage(key, params) {
|
|
180
|
+
if (!this.messagesBuilder) {
|
|
181
|
+
this.messagesBuilder = new SnkMessageBuilder();
|
|
182
|
+
}
|
|
183
|
+
return this.messagesBuilder.getMessage(key, params);
|
|
184
|
+
}
|
|
185
|
+
async clearImage() {
|
|
186
|
+
this.imageValue = undefined;
|
|
187
|
+
}
|
|
188
|
+
async handleImageChange(event) {
|
|
189
|
+
const base64 = event.detail;
|
|
190
|
+
if (!base64) {
|
|
191
|
+
await this.clearImage();
|
|
192
|
+
await this.updatedataUnitField(true);
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
const blob = await base64ToBlob(base64);
|
|
196
|
+
if (this.maxSize && blob.size > this.maxSize * 1024) {
|
|
197
|
+
const errorMsg = this.getMessage('snkImageInput.errorImageSize') + this.maxSize + '(KB)';
|
|
198
|
+
this.imageError.emit(errorMsg);
|
|
199
|
+
if (this.application) {
|
|
200
|
+
await this.application.error(this.getMessage('snkImageInput.errorTitle'), errorMsg);
|
|
201
|
+
}
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
this.imageValue = base64;
|
|
205
|
+
await sessionFileUpload(blob, this.entityName, this.fieldName);
|
|
206
|
+
await this.updatedataUnitField();
|
|
207
|
+
}
|
|
208
|
+
async updatedataUnitField(deleted = false) {
|
|
209
|
+
if (!this.dataUnit || !this.dataUnit.getSelectedRecord()) {
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
if (deleted) {
|
|
213
|
+
await this.dataUnit.setFieldValue(this.fieldName, 'deletado');
|
|
214
|
+
}
|
|
215
|
+
else {
|
|
216
|
+
await this.dataUnit.setFieldValue(this.fieldName, `$file.session.key{${buildFileKey(this.entityName, this.fieldName)}}`);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
async handleImageError(event) {
|
|
220
|
+
this.imageError.emit(event.detail);
|
|
221
|
+
if (this.application) {
|
|
222
|
+
await this.application.error(this.getMessage('snkImageInput.errorTitle'), event.detail);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
getPksFromDataUnit() {
|
|
226
|
+
if (!this.dataUnit) {
|
|
227
|
+
return undefined;
|
|
228
|
+
}
|
|
229
|
+
const selectedRecord = this.dataUnit.getSelectedRecord();
|
|
230
|
+
if (!selectedRecord) {
|
|
231
|
+
return undefined;
|
|
232
|
+
}
|
|
233
|
+
const fieldValue = selectedRecord[this.fieldName];
|
|
234
|
+
if (!fieldValue) {
|
|
235
|
+
return undefined;
|
|
236
|
+
}
|
|
237
|
+
try {
|
|
238
|
+
const pk = JSON.parse(fieldValue);
|
|
239
|
+
return pk;
|
|
240
|
+
}
|
|
241
|
+
catch (error) {
|
|
242
|
+
console.error('Error parsing PK from data unit field:', error);
|
|
243
|
+
return undefined;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
async loadImage(pks) {
|
|
247
|
+
var _a;
|
|
248
|
+
this.loading = true;
|
|
249
|
+
if (this.dataUnit && this.entityName) {
|
|
250
|
+
pks = (_a = pks !== null && pks !== void 0 ? pks : this.getPksFromDataUnit()) !== null && _a !== void 0 ? _a : getPKs(this.dataUnit);
|
|
251
|
+
this.imageValue = await downloadImage(pks, this.fieldName, this.entityName);
|
|
252
|
+
}
|
|
253
|
+
this.loading = false;
|
|
254
|
+
}
|
|
255
|
+
async componentWillLoad() {
|
|
256
|
+
this.application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
257
|
+
if (!this.messagesBuilder) {
|
|
258
|
+
this.messagesBuilder = new SnkMessageBuilder();
|
|
259
|
+
}
|
|
260
|
+
if (this.dataUnit) {
|
|
261
|
+
this.dataUnit.subscribe(this.dataUnitObserver);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
disconnectedCallback() {
|
|
265
|
+
if (this.dataUnit) {
|
|
266
|
+
this.dataUnit.unsubscribe(this.dataUnitObserver);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
async componentDidLoad() {
|
|
270
|
+
await this.loadImage();
|
|
271
|
+
}
|
|
272
|
+
render() {
|
|
273
|
+
return (h(Host, null, h("ez-image-input", { enabled: this.enabled, label: this.label, name: this.fieldName, value: this.imageValue, maxFileSize: this.maxSize ? this.maxSize * 1024 : undefined, accept: this.acceptType || 'image/png,image/jpeg,image/gif', onEzChange: (e) => this.handleImageChange(e), onEzError: (e) => this.handleImageError(e), loading: this.loading })));
|
|
274
|
+
}
|
|
275
|
+
static get style() { return snkImageInputCss; }
|
|
276
|
+
}, [1, "snk-image-input", {
|
|
277
|
+
"dataUnit": [16],
|
|
278
|
+
"fieldName": [1, "field-name"],
|
|
279
|
+
"entityName": [1, "entity-name"],
|
|
280
|
+
"enabled": [4],
|
|
281
|
+
"acceptType": [1, "accept-type"],
|
|
282
|
+
"maxSize": [2, "max-size"],
|
|
283
|
+
"label": [1],
|
|
284
|
+
"imageValue": [32],
|
|
285
|
+
"loading": [32],
|
|
286
|
+
"reloadImage": [64]
|
|
287
|
+
}]);
|
|
288
|
+
function defineCustomElement() {
|
|
289
|
+
if (typeof customElements === "undefined") {
|
|
290
|
+
return;
|
|
291
|
+
}
|
|
292
|
+
const components = ["snk-image-input"];
|
|
293
|
+
components.forEach(tagName => { switch (tagName) {
|
|
294
|
+
case "snk-image-input":
|
|
295
|
+
if (!customElements.get(tagName)) {
|
|
296
|
+
customElements.define(tagName, SnkImageInput);
|
|
297
|
+
}
|
|
298
|
+
break;
|
|
299
|
+
} });
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
export { SnkImageInput as S, defineCustomElement as d, getPKs as g };
|
|
@@ -56,7 +56,7 @@ const SnkLayoutFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLE
|
|
|
56
56
|
return (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage(key, params);
|
|
57
57
|
}
|
|
58
58
|
render() {
|
|
59
|
-
return (h("div", { class: "ez-flex ez-flex--column" }, h("div", { class: "ez-margin-bottom--small" }, h("ez-check", { label: this.getMessage('snkLayoutFormConfig.cascadeLayout.label'), class: "ez-margin-bottom--small", onEzChange: () => this.toggleLayout(FormLayout.CASCADE), value: this.layoutType === FormLayout.CASCADE }), h("snk-view-representation", { mode: FormLayout.CASCADE }), h("label", { class: "ez-label ez-margin--small ez-flex ez-text--medium" }, this.getMessage('snkLayoutFormConfig.cascadeLayout.description'))), h("div",
|
|
59
|
+
return (h("div", { class: "ez-flex ez-flex--column" }, h("div", { class: "ez-margin-bottom--small" }, h("ez-check", { label: this.getMessage('snkLayoutFormConfig.cascadeLayout.label'), class: "ez-margin-bottom--small", onEzChange: () => this.toggleLayout(FormLayout.CASCADE), value: this.layoutType === FormLayout.CASCADE }), h("snk-view-representation", { mode: FormLayout.CASCADE }), h("label", { class: "ez-label ez-margin--small ez-flex ez-text--medium" }, this.getMessage('snkLayoutFormConfig.cascadeLayout.description'))), h("div", { class: "ez-margin-bottom--small" }, h("ez-check", { label: this.getMessage('snkLayoutFormConfig.classicCascadeLayout.label'), class: "ez-margin-bottom--small", onEzChange: () => this.toggleLayout(FormLayout.CLASSIC_CASCADE), value: this.layoutType === FormLayout.CLASSIC_CASCADE }), h("snk-view-representation", { mode: FormLayout.CLASSIC_CASCADE }), h("label", { class: "ez-label ez-margin--small ez-flex ez-text--medium" }, this.getMessage('snkLayoutFormConfig.classicCascadeLayout.description'))), h("div", { class: "ez-margin-bottom--small" }, h("ez-check", { label: this.getMessage('snkLayoutFormConfig.sideBySideLayout.label'), class: "ez-margin-bottom--small", onEzChange: () => this.toggleLayout(FormLayout.SIDE_BY_SIDE), value: this.layoutType === FormLayout.SIDE_BY_SIDE }), h("snk-view-representation", { mode: FormLayout.SIDE_BY_SIDE }), h("label", { class: "ez-label ez-margin--small ez-flex ez-text--medium" }, this.getMessage('snkLayoutFormConfig.sideBySideLayout.description'))), h("div", null, h("ez-check", { label: this.getMessage('snkLayoutFormConfig.classicSideBySideLayout.label'), class: "ez-margin-bottom--small", onEzChange: () => this.toggleLayout(FormLayout.CLASSIC_SIDE_BY_SIDE), value: this.layoutType === FormLayout.CLASSIC_SIDE_BY_SIDE }), h("snk-view-representation", { mode: FormLayout.CLASSIC_SIDE_BY_SIDE }), h("label", { class: "ez-label ez-margin--small ez-flex ez-text--medium" }, this.getMessage('snkLayoutFormConfig.classicSideBySideLayout.description')))));
|
|
60
60
|
}
|
|
61
61
|
static get style() { return snkLayoutFormConfigCss; }
|
|
62
62
|
}, [2, "snk-layout-form-config", {
|
|
@@ -50,7 +50,6 @@ const SnkPesquisa = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
50
50
|
* Útil para cenários onde a pesquisa precisa ser disparada sem interação do usuário.
|
|
51
51
|
*
|
|
52
52
|
* @param text Texto utilizado como argumento de pesquisa.
|
|
53
|
-
* @returns Promise<void>
|
|
54
53
|
* @example
|
|
55
54
|
* await pesquisaRef.executeSearch("Texto para pesquisa");
|
|
56
55
|
*/
|
|
@@ -83,6 +83,7 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
83
83
|
this.domainMessagesBuilder = undefined;
|
|
84
84
|
this.multipleEditionEnabled = true;
|
|
85
85
|
this.layoutFormConfig = true;
|
|
86
|
+
this.disableGridEdition = false;
|
|
86
87
|
this.autoLoad = undefined;
|
|
87
88
|
this.outlineMode = false;
|
|
88
89
|
}
|
|
@@ -183,11 +184,10 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
183
184
|
}
|
|
184
185
|
getButtons(selected, extraButtons, removeRefresh) {
|
|
185
186
|
let btnList = selected ? REGULAR_SELECTED_BTNS : REGULAR_DEFAULT_BTNS;
|
|
186
|
-
if (removeRefresh) {
|
|
187
|
+
if (removeRefresh || this.mode === SIMPLE_CRUD_MODE.IN_MEMORY) {
|
|
187
188
|
btnList = btnList.filter(item => item !== TaskbarElement.REFRESH);
|
|
188
189
|
}
|
|
189
|
-
return this.addConfigButton(
|
|
190
|
-
.concat(extraButtons));
|
|
190
|
+
return this.addConfigButton(btnList.concat(extraButtons));
|
|
191
191
|
}
|
|
192
192
|
addConfigButton(buttons) {
|
|
193
193
|
if (this.configName === undefined || (this.configName && this.gridLegacyConfigName)) {
|
|
@@ -198,13 +198,6 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
198
198
|
get application() {
|
|
199
199
|
return ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
200
200
|
}
|
|
201
|
-
resolveInMemoryBtns(taskbarButtons) {
|
|
202
|
-
const newTaskBarConfig = [...taskbarButtons];
|
|
203
|
-
if (this.mode === SIMPLE_CRUD_MODE.IN_MEMORY) {
|
|
204
|
-
newTaskBarConfig.splice(1, 1);
|
|
205
|
-
}
|
|
206
|
-
return newTaskBarConfig;
|
|
207
|
-
}
|
|
208
201
|
/**
|
|
209
202
|
* @description Usado para alternar a visão entre GRID e FORM externamente.
|
|
210
203
|
* @param {VIEW_MODE} view - A visão para a qual navegar.
|
|
@@ -845,7 +838,7 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
845
838
|
}
|
|
846
839
|
return (h("snk-data-unit", { ref: ref => this._snkDataUnit = ref, class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), pageSize: this.getPageSize(), onInsertionMode: this.handleDataUnitOnInsertionMode.bind(this), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail, onDataUnitFieldsHidded: this.updateFormConfig.bind(this), domainMessagesBuilder: this.domainMessagesBuilder }, h("header", null, h("slot", { name: "snkSimpleCrudHeader" })), h("section", { class: `ez-box ez-box--no-outline ${this.outlineMode ? 'ez-box--outline' : 'ez-box--shadow'} simple-crud__container-section`, ref: (ref) => this._container = ref, tabindex: "0" }, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null, h("ez-grid", { class: "ez-margin-bottom--large ez-box--no-outline", ref: ref => this._grid = ref, dataUnit: this.dataUnit, config: this.gridConfig, "no-header": true, multipleSelection: this.multipleSelection, onEzDoubleClick: () => this.goToView(VIEW_MODE.FORM), onConfigChange: evt => this.gridConfigChangeHandler(evt), columnfilterDataSource: this.dataUnit.name && this.dataUnit.name.includes(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
|
|
847
840
|
? undefined
|
|
848
|
-
: this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this.enableContinuousInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, outlineMode: this.outlineMode, tabindex: "0", paginationCounterMode: this.paginationCounterMode }, this.renderTaskbarContent(VIEW_MODE.GRID), h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, this.renderTaskbarContent(VIEW_MODE.FORM), h("ez-form", { ref: (ref) => this._form = ref, class: `ez-margin-top--large ez-box--no-outline`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this), elementFocusSearchField: this._container, tabindex: "0" }), h("snk-simple-form-config", { ref: (ref) => this._snkSimpleFormConfig = ref, dataUnit: this.dataUnit, onSnkConfigSaved: this.handleFormConfigSaved.bind(this), configName: (_a = this.formLegacyConfigName) !== null && _a !== void 0 ? _a : this.configName, messagesBuilder: this.messagesBuilder })), this.messagesBuilder && h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this.resolveResourceID(), customContainerId: this._customContainerId, layoutFormConfig: this.layoutFormConfig })), h("div", { id: `${this._customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }))), h("ez-popup", { size: "medium", heightMode: "auto", useHeader: false, opened: this._showPopUpGridConfig, 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.resolveResourceID() }))));
|
|
841
|
+
: this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this.enableContinuousInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, outlineMode: this.outlineMode, tabindex: "0", paginationCounterMode: this.paginationCounterMode, canEdit: !this.disableGridEdition }, this.renderTaskbarContent(VIEW_MODE.GRID), h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, this.renderTaskbarContent(VIEW_MODE.FORM), h("ez-form", { ref: (ref) => this._form = ref, class: `ez-margin-top--large ez-box--no-outline`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this), elementFocusSearchField: this._container, tabindex: "0" }), h("slot", { name: "snkSimpleCrudFormFooter" }), h("snk-simple-form-config", { ref: (ref) => this._snkSimpleFormConfig = ref, dataUnit: this.dataUnit, onSnkConfigSaved: this.handleFormConfigSaved.bind(this), configName: (_a = this.formLegacyConfigName) !== null && _a !== void 0 ? _a : this.configName, messagesBuilder: this.messagesBuilder })), this.messagesBuilder && h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this.resolveResourceID(), customContainerId: this._customContainerId, layoutFormConfig: this.layoutFormConfig })), h("div", { id: `${this._customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }))), h("ez-popup", { size: "medium", heightMode: "auto", useHeader: false, opened: this._showPopUpGridConfig, 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.resolveResourceID() }))));
|
|
849
842
|
}
|
|
850
843
|
get _element() { return this; }
|
|
851
844
|
static get watchers() { return {
|
|
@@ -860,7 +853,7 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
860
853
|
}, [6, "snk-simple-crud", {
|
|
861
854
|
"enableLockManagerLoadingComp": [4, "enable-lock-manager-loading-comp"],
|
|
862
855
|
"enableLockManagerTaskbarClick": [4, "enable-lock-manager-taskbar-click"],
|
|
863
|
-
"dataState": [
|
|
856
|
+
"dataState": [1040],
|
|
864
857
|
"dataUnit": [16],
|
|
865
858
|
"entityName": [1, "entity-name"],
|
|
866
859
|
"mode": [2],
|
|
@@ -886,6 +879,7 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
886
879
|
"domainMessagesBuilder": [1, "domain-messages-builder"],
|
|
887
880
|
"multipleEditionEnabled": [4, "multiple-edition-enabled"],
|
|
888
881
|
"layoutFormConfig": [4, "layout-form-config"],
|
|
882
|
+
"disableGridEdition": [4, "disable-grid-edition"],
|
|
889
883
|
"autoLoad": [4, "auto-load"],
|
|
890
884
|
"outlineMode": [4, "outline-mode"],
|
|
891
885
|
"_container": [32],
|