@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-KB-121322.0 → 0.0.0-bugfix-dev-KB-132407.0
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-72f34bd4.js → ConfigStorage-d9d24844.js} +2 -2
- package/dist/cjs/{DataFetcher-991b0349.js → DataFetcher-3a8ea521.js} +2 -2751
- package/dist/cjs/{FormConfigHelper-e253a418.js → FormConfigHelper-28fe4668.js} +3 -1
- package/dist/cjs/{ISave-ebf6b4ed.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-cdbb29d4.js → SnkFormConfigManager-c88cf1e9.js} +5 -5
- package/dist/cjs/SnkMessageBuilder-d9558dba.js +2809 -0
- package/dist/cjs/{SnkMultiSelectionListDataSource-011bec79.js → SnkMultiSelectionListDataSource-a891430e.js} +5 -5
- package/dist/cjs/{auth-fetcher-c3cac878.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-8bf469e7.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 +5 -5
- package/dist/cjs/fields-selector.cjs.entry.js +2 -2
- package/dist/cjs/{form-config-fetcher-c7af90d8.js → form-config-fetcher-72cf0e3d.js} +1 -1
- package/dist/cjs/guides-configurator.cjs.entry.js +3 -3
- 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} +8 -57
- 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 -12
- 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-7d587ad5.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 +22 -11
- package/dist/cjs/snk-grid.cjs.entry.js +26 -17
- package/dist/cjs/{snk-guides-viewer-366d5c32.js → snk-guides-viewer-4da78c21.js} +49 -64
- 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 +3 -3
- 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 +7 -0
- 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 +24 -6
- 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 +57 -58
- 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 +3 -1
- package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +3 -3
- 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 +4 -4
- 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 +2 -2
- package/dist/collection/components/snk-form-config/snk-form-config.js +15 -5
- package/dist/collection/components/snk-grid/snk-grid.css +5 -5
- package/dist/collection/components/snk-grid/snk-grid.js +16 -9
- 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/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 +1 -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 +1 -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 +1 -0
- 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 -2731
- package/dist/components/PersonalizedFilterUtils.js +13 -0
- package/dist/components/SnkFormConfigManager.js +3 -3
- package/dist/components/SnkMessageBuilder.js +2807 -0
- package/dist/components/dataunit-fetcher.js +2 -1
- package/dist/components/field-config2.js +4 -2
- package/dist/components/fields-layout2.js +4 -4
- package/dist/components/guides-configurator2.js +2 -2
- 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 +78 -68
- 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 +143 -143
- 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 +15 -5
- package/dist/components/snk-form-view2.js +82 -10
- package/dist/components/snk-grid2.js +17 -9
- 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 +4 -3
- package/dist/components/snk-view-representation2.js +1 -1
- package/dist/esm/{ConfigStorage-22324b6b.js → ConfigStorage-d15d2014.js} +2 -2
- package/dist/esm/{DataFetcher-450828a0.js → DataFetcher-1dd7e8c0.js} +3 -2731
- package/dist/esm/{FormConfigHelper-e89ca25c.js → FormConfigHelper-d09669f3.js} +3 -1
- package/dist/esm/{ISave-61153166.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-b5a92e12.js → SnkFormConfigManager-86befa68.js} +5 -5
- package/dist/esm/SnkMessageBuilder-c0bc4424.js +2807 -0
- package/dist/esm/{SnkMultiSelectionListDataSource-d7ce2e54.js → SnkMultiSelectionListDataSource-14633bf6.js} +5 -5
- package/dist/esm/{auth-fetcher-eef9d01e.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-da9596f6.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 +5 -5
- package/dist/esm/fields-selector.entry.js +2 -2
- package/dist/esm/{form-config-fetcher-8d0a5e1c.js → form-config-fetcher-fcc7b62f.js} +1 -1
- package/dist/esm/guides-configurator.entry.js +3 -3
- 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} +9 -57
- 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 -12
- 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-99616a07.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 +22 -11
- package/dist/esm/snk-grid.entry.js +26 -17
- package/dist/esm/{snk-guides-viewer-240de636.js → snk-guides-viewer-27d9e78c.js} +49 -64
- 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 +3 -3
- 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-62aef37a.js → p-2ccbbeec.js} +1 -1
- package/dist/sankhyablocks/{p-75af335e.entry.js → p-2ebda226.entry.js} +1 -1
- package/dist/sankhyablocks/p-30641d55.entry.js +1 -0
- package/dist/sankhyablocks/{p-840fb68c.js → p-32ad76cc.js} +1 -1
- package/dist/sankhyablocks/p-3a35917e.entry.js +1 -0
- package/dist/sankhyablocks/p-3b07c117.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-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-5e256568.entry.js +1 -0
- 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-0b9a42ad.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-7d8bf156.entry.js +1 -0
- package/dist/sankhyablocks/{p-92cfc028.js → p-7e9f8fa4.js} +1 -1
- package/dist/sankhyablocks/{p-118c221e.js → p-8b4d6719.js} +1 -1
- 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-7d6f1285.js → p-9114e869.js} +1 -1
- package/dist/sankhyablocks/p-95444e96.js +1 -0
- 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-c35fc941.js → p-a9839628.js} +1 -1
- package/dist/sankhyablocks/{p-180716b2.entry.js → p-ae326d06.entry.js} +1 -1
- package/dist/sankhyablocks/{p-c98c79c3.entry.js → p-b25777fa.entry.js} +1 -1
- 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-da455c82.js +12 -0
- package/dist/sankhyablocks/{p-002d4d2b.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 +5 -1
- 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 +9 -7
- 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 +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 +2 -1
- package/dist/types/components/snk-grid/snk-grid.d.ts +1 -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.d.ts +134 -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-0948dc0a.entry.js +0 -11
- package/dist/sankhyablocks/p-16f05a66.entry.js +0 -1
- package/dist/sankhyablocks/p-1d589380.entry.js +0 -1
- package/dist/sankhyablocks/p-28f50632.js +0 -1
- package/dist/sankhyablocks/p-39be771c.js +0 -1
- package/dist/sankhyablocks/p-3ed04f0d.entry.js +0 -1
- package/dist/sankhyablocks/p-4963dd2a.entry.js +0 -1
- package/dist/sankhyablocks/p-55798617.js +0 -1
- package/dist/sankhyablocks/p-55f6fef2.entry.js +0 -1
- package/dist/sankhyablocks/p-56f16390.entry.js +0 -1
- package/dist/sankhyablocks/p-58683e28.js +0 -60
- package/dist/sankhyablocks/p-5ea893c5.entry.js +0 -1
- package/dist/sankhyablocks/p-60dd1d27.entry.js +0 -1
- package/dist/sankhyablocks/p-62e9b9b8.entry.js +0 -1
- package/dist/sankhyablocks/p-669bb869.entry.js +0 -1
- package/dist/sankhyablocks/p-6ee2ca7a.entry.js +0 -1
- package/dist/sankhyablocks/p-7cac3870.entry.js +0 -1
- package/dist/sankhyablocks/p-86e54841.entry.js +0 -1
- package/dist/sankhyablocks/p-88b337fe.entry.js +0 -1
- package/dist/sankhyablocks/p-91005a00.entry.js +0 -1
- package/dist/sankhyablocks/p-988afe78.js +0 -1
- package/dist/sankhyablocks/p-ada013c0.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-cadf4846.entry.js +0 -1
- package/dist/sankhyablocks/p-d8d8169b.js +0 -2
- package/dist/sankhyablocks/p-e91c3c57.entry.js +0 -1
- package/dist/sankhyablocks/p-ea729922.entry.js +0 -1
- package/dist/sankhyablocks/p-ec5fbad8.js +0 -1
- package/dist/sankhyablocks/p-f5e942b7.entry.js +0 -1
|
@@ -1,12 +1,41 @@
|
|
|
1
|
-
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s)
|
|
4
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { Action, ApplicationContext, ElementIDUtils, UserInterface } from "@sankhyalabs/core";
|
|
2
14
|
import { Host, h } from "@stencil/core";
|
|
3
15
|
import { DataBinder } from "@sankhyalabs/ezui/dist/collection/utils/form";
|
|
4
16
|
import { focusOnFieldSerch, SEARCH_FIELD_FULL_WIDTH, FormLayout } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
17
|
+
import { getPKs } from "../../snk-image-input/utils/ImageUtils";
|
|
5
18
|
export class SnkFormView {
|
|
6
19
|
constructor() {
|
|
7
20
|
this._customEditors = new Map();
|
|
8
21
|
this._fieldProps = new Map();
|
|
22
|
+
this.dataUnitObserver = async (action) => {
|
|
23
|
+
if (action.type === Action.RECORDS_COPIED) {
|
|
24
|
+
const sourcePK = this.buildSourceRecordPK(action);
|
|
25
|
+
this.getImageField().forEach(async (field) => {
|
|
26
|
+
this.dataUnit.setFieldValue(field.name, JSON.stringify(sourcePK));
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
this.customUiBuilders = new Map([
|
|
31
|
+
[UserInterface.IMAGE, (_a) => {
|
|
32
|
+
var { name } = _a, props = __rest(_a, ["name"]);
|
|
33
|
+
return h("snk-image-input", Object.assign({ dataUnit: this.dataUnit, maxSize: Infinity, fieldName: name, entityName: this.entityPath }, props));
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
]);
|
|
9
37
|
this._singleColumn = false;
|
|
38
|
+
this._currentFormLayout = undefined;
|
|
10
39
|
this.levelPath = undefined;
|
|
11
40
|
this.fieldSearch = undefined;
|
|
12
41
|
this.label = undefined;
|
|
@@ -23,6 +52,7 @@ export class SnkFormView {
|
|
|
23
52
|
this.fieldToFocus = undefined;
|
|
24
53
|
this.customEditors = undefined;
|
|
25
54
|
this.fieldsProps = undefined;
|
|
55
|
+
this.entityPath = undefined;
|
|
26
56
|
}
|
|
27
57
|
async showUp() {
|
|
28
58
|
if (this._formView) {
|
|
@@ -72,6 +102,11 @@ export class SnkFormView {
|
|
|
72
102
|
}
|
|
73
103
|
}
|
|
74
104
|
}
|
|
105
|
+
async observeDataUnit(newValue, oldValue) {
|
|
106
|
+
if (newValue !== oldValue && newValue) {
|
|
107
|
+
newValue.subscribe(this.dataUnitObserver);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
75
110
|
changeFix() {
|
|
76
111
|
this.fixed = !this.fixed;
|
|
77
112
|
this.emitEvent("fixed");
|
|
@@ -129,28 +164,41 @@ export class SnkFormView {
|
|
|
129
164
|
if (this._dataBinder != undefined) {
|
|
130
165
|
this._dataBinder.onDisconnectedCallback();
|
|
131
166
|
}
|
|
167
|
+
if (this.dataUnit) {
|
|
168
|
+
this.dataUnit.unsubscribe(this.dataUnitObserver);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
async componentWillLoad() {
|
|
172
|
+
await this.initLayoutFormConfig();
|
|
173
|
+
}
|
|
174
|
+
async componentWillLoad() {
|
|
175
|
+
await this.initLayoutFormConfig();
|
|
132
176
|
}
|
|
133
177
|
componentDidLoad() {
|
|
134
178
|
this.observePropsCustomEditor(this.customEditors);
|
|
135
179
|
this.observeFieldsProps(this.fieldsProps);
|
|
136
|
-
this.initLayoutFormConfig();
|
|
137
180
|
}
|
|
138
181
|
async initLayoutFormConfig() {
|
|
139
|
-
|
|
140
|
-
|
|
182
|
+
var _a;
|
|
183
|
+
if (!this._application) {
|
|
184
|
+
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
185
|
+
}
|
|
186
|
+
const layoutFormConfig = await ((_a = this._application) === null || _a === void 0 ? void 0 : _a.getLayoutFormConfig());
|
|
141
187
|
if (layoutFormConfig) {
|
|
142
188
|
this.setSingleColumn(layoutFormConfig);
|
|
143
189
|
this.registerNotifyListeners(layoutFormConfig);
|
|
144
190
|
}
|
|
145
191
|
}
|
|
146
192
|
setSingleColumn(layoutFormConfig) {
|
|
147
|
-
this._singleColumn = (layoutFormConfig === null || layoutFormConfig === void 0 ? void 0 : layoutFormConfig.config) === FormLayout.CASCADE;
|
|
193
|
+
this._singleColumn = (layoutFormConfig === null || layoutFormConfig === void 0 ? void 0 : layoutFormConfig.config) === FormLayout.CASCADE || (layoutFormConfig === null || layoutFormConfig === void 0 ? void 0 : layoutFormConfig.config) === FormLayout.CLASSIC_CASCADE;
|
|
194
|
+
this._currentFormLayout = layoutFormConfig === null || layoutFormConfig === void 0 ? void 0 : layoutFormConfig.config;
|
|
148
195
|
}
|
|
149
196
|
registerNotifyListeners(layoutFormConfig) {
|
|
150
197
|
if (!layoutFormConfig)
|
|
151
198
|
return;
|
|
152
199
|
layoutFormConfig.onConfigChange((config) => {
|
|
153
|
-
this._singleColumn = (config === FormLayout.CASCADE);
|
|
200
|
+
this._singleColumn = (config === FormLayout.CASCADE || config === FormLayout.CLASSIC_CASCADE);
|
|
201
|
+
this._currentFormLayout = config;
|
|
154
202
|
});
|
|
155
203
|
}
|
|
156
204
|
componentDidRender() {
|
|
@@ -187,6 +235,22 @@ export class SnkFormView {
|
|
|
187
235
|
});
|
|
188
236
|
}
|
|
189
237
|
}
|
|
238
|
+
buildSourceRecordPK(action) {
|
|
239
|
+
var _a, _b;
|
|
240
|
+
const currentRecord = ((_a = action.payload) === null || _a === void 0 ? void 0 : _a[0]) || {};
|
|
241
|
+
const sourceBase64 = currentRecord["__record__source__id__"];
|
|
242
|
+
const sourceRecord = JSON.parse(atob(sourceBase64 || ''));
|
|
243
|
+
delete sourceRecord["__DATA_UNIT_NAME__"];
|
|
244
|
+
const pkFields = Object.keys(getPKs(this.dataUnit));
|
|
245
|
+
const filteredSourceRecord = {};
|
|
246
|
+
for (const pkField of pkFields) {
|
|
247
|
+
filteredSourceRecord[pkField] = (_b = sourceRecord[pkField]) === null || _b === void 0 ? void 0 : _b.value;
|
|
248
|
+
}
|
|
249
|
+
return filteredSourceRecord;
|
|
250
|
+
}
|
|
251
|
+
getImageField() {
|
|
252
|
+
return this.dataUnit.metadata.fields.filter(field => field.userInterface === UserInterface.IMAGE);
|
|
253
|
+
}
|
|
190
254
|
render() {
|
|
191
255
|
return (h(Host, { class: "ez-box__container" }, h("div", { class: "summary-header ez-flex ez-size-width--full", ref: ref => this._headerContainer = ref }, h("div", { class: "ez-flex ez-text ez-title--primary ez-text--bold ez-flex--justify-start ez-flex--align-items-center ez-col--sd-9" }, this.levelPath ? h("span", { class: "level-path" }, this.levelPath + " /") : undefined, this.label), h("div", { class: "ez-flex ez-flex--justify-end ez-col--sd-3" }, this.canFix &&
|
|
192
256
|
h("ez-button", { class: "ez-padding-left--medium", mode: "icon", size: "small", iconName: this.fixed ? "un-pin" : "push-pin", "data-element-id": ElementIDUtils.getInternalIDInfo("toggleFixed_ezFormCard"), onClick: () => this.changeFix(), title: this.fixed ? "Desafixar" : "Fixar" }), this.canExpand &&
|
|
@@ -194,7 +258,7 @@ export class SnkFormView {
|
|
|
194
258
|
?
|
|
195
259
|
h("snk-form-summary", { summary: this.getCardSummary() })
|
|
196
260
|
:
|
|
197
|
-
h("ez-form-view", { ref: ref => this._formView = ref, fields: this.fields, onEzContentReady: evt => this.bindFields(evt.detail), onFormItemsReady: (event) => this.handleFormItemsReady(event), singleColumn: this._singleColumn }), this.fieldSearch && h("ez-popover", { ref: elem => (this._ezPopoverFieldColumn = elem), overlayType: "none" }, this.fieldSearch)));
|
|
261
|
+
h("ez-form-view", { ref: ref => this._formView = ref, fields: this.fields, onEzContentReady: evt => this.bindFields(evt.detail), onFormItemsReady: (event) => this.handleFormItemsReady(event), singleColumn: this._singleColumn, customUiBuilders: this.customUiBuilders, formLayout: this._currentFormLayout }), this.fieldSearch && h("ez-popover", { ref: elem => (this._ezPopoverFieldColumn = elem), overlayType: "none" }, this.fieldSearch)));
|
|
198
262
|
}
|
|
199
263
|
static get is() { return "snk-form-view"; }
|
|
200
264
|
static get encapsulation() { return "scoped"; }
|
|
@@ -510,12 +574,30 @@ export class SnkFormView {
|
|
|
510
574
|
"tags": [],
|
|
511
575
|
"text": "Lista de propriedades que ser\u00E3o alteradas/adicionadas por coluna."
|
|
512
576
|
}
|
|
577
|
+
},
|
|
578
|
+
"entityPath": {
|
|
579
|
+
"type": "string",
|
|
580
|
+
"mutable": false,
|
|
581
|
+
"complexType": {
|
|
582
|
+
"original": "string",
|
|
583
|
+
"resolved": "string",
|
|
584
|
+
"references": {}
|
|
585
|
+
},
|
|
586
|
+
"required": false,
|
|
587
|
+
"optional": false,
|
|
588
|
+
"docs": {
|
|
589
|
+
"tags": [],
|
|
590
|
+
"text": "Determina todo o caminho de entidades."
|
|
591
|
+
},
|
|
592
|
+
"attribute": "entity-path",
|
|
593
|
+
"reflect": false
|
|
513
594
|
}
|
|
514
595
|
};
|
|
515
596
|
}
|
|
516
597
|
static get states() {
|
|
517
598
|
return {
|
|
518
|
-
"_singleColumn": {}
|
|
599
|
+
"_singleColumn": {},
|
|
600
|
+
"_currentFormLayout": {}
|
|
519
601
|
};
|
|
520
602
|
}
|
|
521
603
|
static get events() {
|
|
@@ -675,6 +757,9 @@ export class SnkFormView {
|
|
|
675
757
|
}, {
|
|
676
758
|
"propName": "fieldsProps",
|
|
677
759
|
"methodName": "observeFieldsProps"
|
|
760
|
+
}, {
|
|
761
|
+
"propName": "dataUnit",
|
|
762
|
+
"methodName": "observeDataUnit"
|
|
678
763
|
}];
|
|
679
764
|
}
|
|
680
765
|
}
|
|
@@ -12,8 +12,6 @@ const FORM_NAME_PREFIX = "__FORM:";
|
|
|
12
12
|
export class SnkGuidesViewer {
|
|
13
13
|
constructor() {
|
|
14
14
|
this._guideBuilders = new Map();
|
|
15
|
-
this.CUSTOM_GUIDE_ID_PREFIX = "CUSTOM_GUIDE_";
|
|
16
|
-
this.CUSTOM_GUIDE_DATA_CUSTOM_ID = "CUSTOM_GUIDE";
|
|
17
15
|
this.dataUnit = undefined;
|
|
18
16
|
this.dataState = undefined;
|
|
19
17
|
this.configName = undefined;
|
|
@@ -47,8 +45,12 @@ export class SnkGuidesViewer {
|
|
|
47
45
|
observeDataUnit() {
|
|
48
46
|
this.loadGuides(true);
|
|
49
47
|
}
|
|
50
|
-
observeFormConfigManager(value) {
|
|
51
|
-
|
|
48
|
+
async observeFormConfigManager(value) {
|
|
49
|
+
const showFormConfig = !!value;
|
|
50
|
+
await this._viewStack.show(showFormConfig ?
|
|
51
|
+
GUIDES_VIEWER_VIEW_MODE.CONFIG :
|
|
52
|
+
GUIDES_VIEWER_VIEW_MODE.GUIDES);
|
|
53
|
+
this.formConfigVisibilityChanged.emit(showFormConfig);
|
|
52
54
|
}
|
|
53
55
|
observeDataState(newValue, oldValue) {
|
|
54
56
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -98,7 +100,8 @@ export class SnkGuidesViewer {
|
|
|
98
100
|
* Atribui o foco para o componente.
|
|
99
101
|
*/
|
|
100
102
|
async setFocus() {
|
|
101
|
-
|
|
103
|
+
var _a;
|
|
104
|
+
(_a = this._container) === null || _a === void 0 ? void 0 : _a.focus();
|
|
102
105
|
}
|
|
103
106
|
/**
|
|
104
107
|
* Recarrega os guias baseada nos metadados atuais.
|
|
@@ -159,6 +162,13 @@ export class SnkGuidesViewer {
|
|
|
159
162
|
item.tooltip = this.getMessage("snkCrud.detail.tooltip.needSingleSelection");
|
|
160
163
|
item.disabled = true;
|
|
161
164
|
}
|
|
165
|
+
if (sheet.isCustom && sheet.ctxProps) {
|
|
166
|
+
Object.entries(sheet.ctxProps).forEach(([key, value]) => {
|
|
167
|
+
if (value !== undefined) {
|
|
168
|
+
item[key] = value;
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
}
|
|
162
172
|
guides.push(item);
|
|
163
173
|
});
|
|
164
174
|
this._guides = guides;
|
|
@@ -273,7 +283,7 @@ export class SnkGuidesViewer {
|
|
|
273
283
|
if (sheet == undefined) {
|
|
274
284
|
return;
|
|
275
285
|
}
|
|
276
|
-
return h("snk-form-view", { levelPath: params.levelPath, label: sheet.label, name: formName, fields: sheet.fields, formMetadata: params.formMetadata, dataUnit: params.dataUnit, recordsValidator: params.recordsValidator, contracted: (cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.presentation) === "CONTRACTED", fixed: cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed, summaryFields: (_b = (_a = params.formConfig) === null || _a === void 0 ? void 0 : _a.summary) === null || _b === void 0 ? void 0 : _b.get(formName), fieldToFocus: params.fieldToFocus, key: formName, onSnkRequestClearFieldToFocus: _ => { var _a; return (_a = params.onRequestClearFieldToFocus) === null || _a === void 0 ? void 0 : _a.call(params); }, customEditors: params.propsCustomEditor, fieldsProps: params.fieldsProps });
|
|
286
|
+
return h("snk-form-view", { levelPath: params.levelPath, label: sheet.label, name: formName, fields: sheet.fields, formMetadata: params.formMetadata, dataUnit: params.dataUnit, recordsValidator: params.recordsValidator, contracted: (cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.presentation) === "CONTRACTED", fixed: cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed, summaryFields: (_b = (_a = params.formConfig) === null || _a === void 0 ? void 0 : _a.summary) === null || _b === void 0 ? void 0 : _b.get(formName), fieldToFocus: params.fieldToFocus, key: formName, onSnkRequestClearFieldToFocus: _ => { var _a; return (_a = params.onRequestClearFieldToFocus) === null || _a === void 0 ? void 0 : _a.call(params); }, customEditors: params.propsCustomEditor, fieldsProps: params.fieldsProps, entityPath: params.entityPath });
|
|
277
287
|
})));
|
|
278
288
|
}
|
|
279
289
|
wrapDetail(levels, content) {
|
|
@@ -295,11 +305,13 @@ export class SnkGuidesViewer {
|
|
|
295
305
|
}
|
|
296
306
|
getContent() {
|
|
297
307
|
if (!this.selectedGuide) {
|
|
308
|
+
this.snkShowGuide.emit(undefined);
|
|
298
309
|
return;
|
|
299
310
|
}
|
|
300
311
|
const guideId = this.selectedGuide.id;
|
|
312
|
+
this.snkShowGuide.emit(guideId);
|
|
301
313
|
if (this.isCustomGuide(guideId)) {
|
|
302
|
-
return h("
|
|
314
|
+
return h("slot", { name: guideId });
|
|
303
315
|
}
|
|
304
316
|
const levels = guideId.split("::");
|
|
305
317
|
const currentLevel = levels.pop();
|
|
@@ -310,16 +322,13 @@ export class SnkGuidesViewer {
|
|
|
310
322
|
}
|
|
311
323
|
return this.buildFormViewGuideContent(guideId);
|
|
312
324
|
}
|
|
313
|
-
buildCustomGuideContainerId(guideId) {
|
|
314
|
-
return `${this.CUSTOM_GUIDE_ID_PREFIX}${guideId}`;
|
|
315
|
-
}
|
|
316
325
|
buildFormViewGuideContent(cardId) {
|
|
317
326
|
var _a, _b, _c, _d;
|
|
318
327
|
const sheet = this._masterFormMetadata.getSheet(cardId);
|
|
319
328
|
if (!sheet)
|
|
320
329
|
return;
|
|
321
330
|
const cardConfig = (_b = (_a = this.masterFormConfig) === null || _a === void 0 ? void 0 : _a.cardsState) === null || _b === void 0 ? void 0 : _b.get(cardId);
|
|
322
|
-
return (h("snk-form-view", { ref: ref => this._mainForm = ref, fixed: cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed, summaryFields: (_d = (_c = this.masterFormConfig) === null || _c === void 0 ? void 0 : _c.summary) === null || _d === void 0 ? void 0 : _d.get(cardId), name: cardId, label: sheet.label, fields: sheet.fields, dataUnit: this.dataUnit, formMetadata: this._masterFormMetadata, recordsValidator: this.recordsValidator, fieldToFocus: this._fieldToGetFocus, key: cardId, onSnkRequestClearFieldToFocus: _ => this.clearFieldToFocusHandler(), customEditors: this._customEditors, fieldsProps: this._fieldsProps, fieldSearch: this._fieldSearch }, this.presentationMode == PresentationMode.SECONDARY && this.buildTaskBar()));
|
|
331
|
+
return (h("snk-form-view", { ref: ref => this._mainForm = ref, fixed: cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed, summaryFields: (_d = (_c = this.masterFormConfig) === null || _c === void 0 ? void 0 : _c.summary) === null || _d === void 0 ? void 0 : _d.get(cardId), name: cardId, label: sheet.label, fields: sheet.fields, dataUnit: this.dataUnit, formMetadata: this._masterFormMetadata, recordsValidator: this.recordsValidator, fieldToFocus: this._fieldToGetFocus, key: cardId, onSnkRequestClearFieldToFocus: _ => this.clearFieldToFocusHandler(), customEditors: this._customEditors, fieldsProps: this._fieldsProps, fieldSearch: this._fieldSearch, entityPath: this.entityPath }, this.presentationMode == PresentationMode.SECONDARY && this.buildTaskBar()));
|
|
323
332
|
}
|
|
324
333
|
isDetailGuide(childEntityName, levels) {
|
|
325
334
|
return childEntityName || levels.length > 0;
|
|
@@ -342,20 +351,6 @@ export class SnkGuidesViewer {
|
|
|
342
351
|
var _a;
|
|
343
352
|
return (_a = this.customGuidesConfig) === null || _a === void 0 ? void 0 : _a.map(g => g.id).includes(guideId);
|
|
344
353
|
}
|
|
345
|
-
attachCustomGuideInView() {
|
|
346
|
-
//As guias customizadas ficam em slots reservados na DOM e
|
|
347
|
-
// precisam ser acessadas via querySelector e colocadas no container correto na view.
|
|
348
|
-
var _a;
|
|
349
|
-
const guideId = (_a = this.selectedGuide) === null || _a === void 0 ? void 0 : _a.id;
|
|
350
|
-
if (!this.isCustomGuide(guideId))
|
|
351
|
-
return;
|
|
352
|
-
const customGuideSlot = document.querySelector(`#${guideId}`);
|
|
353
|
-
const customGuideElement = customGuideSlot === null || customGuideSlot === void 0 ? void 0 : customGuideSlot.firstElementChild;
|
|
354
|
-
const customGuideViewContainer = document.querySelector(`#${this.buildCustomGuideContainerId(guideId)}`);
|
|
355
|
-
if (!customGuideElement || !customGuideViewContainer)
|
|
356
|
-
return;
|
|
357
|
-
customGuideViewContainer.appendChild(customGuideElement);
|
|
358
|
-
}
|
|
359
354
|
onBreadcrumbClickHandler(item) {
|
|
360
355
|
if ((item === null || item === void 0 ? void 0 : item.id) == undefined) {
|
|
361
356
|
return;
|
|
@@ -437,29 +432,7 @@ export class SnkGuidesViewer {
|
|
|
437
432
|
this.addFormLegacyConfigName();
|
|
438
433
|
this._configManager.loadConfig();
|
|
439
434
|
}
|
|
440
|
-
componentWillRender() {
|
|
441
|
-
this.detachCustomGuideFromView();
|
|
442
|
-
}
|
|
443
|
-
detachCustomGuideFromView() {
|
|
444
|
-
// Antes de cada renderização, o componente remove a guia customizada da view
|
|
445
|
-
// e a coloca de volta no slot reservado na DOM para que não seja perdida sua referência.
|
|
446
|
-
if (!this.customGuidesConfig || this.customGuidesConfig.length === 0)
|
|
447
|
-
return;
|
|
448
|
-
const viewCustomGuideContainer = this._element.querySelector(`[data-custom-id="${this.CUSTOM_GUIDE_DATA_CUSTOM_ID}"]`);
|
|
449
|
-
const reservedSlotId = viewCustomGuideContainer === null || viewCustomGuideContainer === void 0 ? void 0 : viewCustomGuideContainer.getAttribute('data-reserved-slot-id');
|
|
450
|
-
if (!(viewCustomGuideContainer === null || viewCustomGuideContainer === void 0 ? void 0 : viewCustomGuideContainer.hasChildNodes()) || !reservedSlotId)
|
|
451
|
-
return;
|
|
452
|
-
const customGuideReservedSlot = document.querySelector(`#${reservedSlotId}`);
|
|
453
|
-
const customGuideElement = viewCustomGuideContainer === null || viewCustomGuideContainer === void 0 ? void 0 : viewCustomGuideContainer.firstElementChild;
|
|
454
|
-
if (!customGuideReservedSlot || !customGuideElement)
|
|
455
|
-
return;
|
|
456
|
-
customGuideReservedSlot.appendChild(customGuideElement);
|
|
457
|
-
}
|
|
458
435
|
componentDidRender() {
|
|
459
|
-
var _a;
|
|
460
|
-
if (this.isCustomGuide((_a = this.selectedGuide) === null || _a === void 0 ? void 0 : _a.id)) {
|
|
461
|
-
this.attachCustomGuideInView();
|
|
462
|
-
}
|
|
463
436
|
if (!this._guideHasChanged) {
|
|
464
437
|
return;
|
|
465
438
|
}
|
|
@@ -607,17 +580,14 @@ export class SnkGuidesViewer {
|
|
|
607
580
|
await this._mainForm.showSearchField();
|
|
608
581
|
}, { description: this.getMessage("snkSimpleCrud.findFields"), element: this._element });
|
|
609
582
|
}
|
|
610
|
-
|
|
611
|
-
var _a, _b;
|
|
583
|
+
renderFormConfig() {
|
|
612
584
|
if (this._formEditorConfigManager != undefined) {
|
|
613
585
|
return (h("snk-form-config", { ref: ref => this._container = ref, tabindex: -1, dataUnit: this._formEditorDataUnit, messagesBuilder: this.messagesBuilder, configManager: this._formEditorConfigManager, onConfigClose: () => this._formEditorConfigManager = null, customGuidesConfig: this.getCustomGuidesConfig() }));
|
|
614
586
|
}
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
this.
|
|
619
|
-
const showGuides = this._guides && (this._guides.length > 1);
|
|
620
|
-
return (h("section", { class: "snk-guides-viewer", ref: ref => this._container = ref, tabindex: -1 }, h("div", { class: "ez-row snk-guides-viewer__header" }, h("div", { class: "snk-guides-viewer__header-breadcrumb ez-flex--align-items-center ez-flex-item--align-center ez-padding-left--large", key: "header" }, h("ez-button", { onClick: () => this.exitViewer(), title: this.getMessage("snkCrud.goBackTitle"), mode: "icon", iconName: "arrow_back", class: "ez-padding-right--medium", size: "small" }), h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto" }, h("h1", { class: "ez-title ez-title--primary ez-title--xlarge", title: this.getTitleTooltip() }, this.getTitle()), ((_a = this._breadcrumbItems) === null || _a === void 0 ? void 0 : _a.length) > 1 &&
|
|
587
|
+
}
|
|
588
|
+
renderGuidesNavigator(showGuides) {
|
|
589
|
+
var _a, _b;
|
|
590
|
+
return (h("section", { class: "snk-guides-viewer", ref: ref => this._container = ref, tabIndex: -1 }, h("div", { class: "ez-row snk-guides-viewer__header" }, h("div", { class: "snk-guides-viewer__header-breadcrumb ez-flex--align-items-center ez-flex-item--align-center ez-padding-left--large", key: "header" }, h("ez-button", { onClick: () => this.exitViewer(), title: this.getMessage("snkCrud.goBackTitle"), mode: "icon", iconName: "arrow_back", class: "ez-padding-right--medium", size: "small" }), h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto" }, h("h1", { class: "ez-title ez-title--primary ez-title--xlarge", title: this.getTitleTooltip() }, this.getTitle()), ((_a = this._breadcrumbItems) === null || _a === void 0 ? void 0 : _a.length) > 1 &&
|
|
621
591
|
h("div", { class: "ez-margin-top--extra-small" }, h("ez-breadcrumb", Object.assign({ items: this._breadcrumbItems, onSelectedItem: (evt) => this.onBreadcrumbClickHandler(evt === null || evt === void 0 ? void 0 : evt.detail) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("breadcrumb")}` }))))), this.presentationMode != PresentationMode.SECONDARY && this.buildTaskBar()), h("div", { class: "snk-guides-viewer__container" }, showGuides ?
|
|
622
592
|
h("ez-guide-navigator", { ref: (ref) => this._guideNavigator = ref, class: "snk-guides-viewer__guide-navigator", items: this._guides, selectedId: this.selectedGuide ? this.selectedGuide.id : undefined, onEzSelectionChange: evt => this.updateSelectedGuideHandler(evt.detail) })
|
|
623
593
|
:
|
|
@@ -630,8 +600,17 @@ export class SnkGuidesViewer {
|
|
|
630
600
|
fieldToFocus: this._fieldToGetFocus,
|
|
631
601
|
onRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this),
|
|
632
602
|
propsCustomEditor: this._customEditors,
|
|
633
|
-
fieldsProps: this._fieldsProps
|
|
634
|
-
|
|
603
|
+
fieldsProps: this._fieldsProps,
|
|
604
|
+
entityPath: this.entityPath
|
|
605
|
+
}), this.getContent())), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this.getConfigViewMode(), onConfigSelected: (evt) => this.changeConfigViewMode(evt.detail), messagesBuilder: this.messagesBuilder, onOpenConfig: (evt) => this.openConfig(evt.detail), resourceID: this.resourceID, layoutFormConfig: false, disableNumberingConfig: true })));
|
|
606
|
+
}
|
|
607
|
+
render() {
|
|
608
|
+
if (!this.dataUnit || !this._configManager.isLoaded) {
|
|
609
|
+
return;
|
|
610
|
+
}
|
|
611
|
+
this.loadTaskbarProcessor();
|
|
612
|
+
const showGuides = this._guides && (this._guides.length > 1);
|
|
613
|
+
return (h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "guides-viewer-stack" }, h("stack-item", null, this.renderGuidesNavigator(showGuides)), h("stack-item", null, this.renderFormConfig())));
|
|
635
614
|
}
|
|
636
615
|
static get is() { return "snk-guides-viewer"; }
|
|
637
616
|
static get encapsulation() { return "scoped"; }
|
|
@@ -786,7 +765,7 @@ export class SnkGuidesViewer {
|
|
|
786
765
|
},
|
|
787
766
|
"selectedGuide": {
|
|
788
767
|
"type": "unknown",
|
|
789
|
-
"mutable":
|
|
768
|
+
"mutable": true,
|
|
790
769
|
"complexType": {
|
|
791
770
|
"original": "IGuideItem",
|
|
792
771
|
"resolved": "IGuideItem",
|
|
@@ -1026,6 +1005,21 @@ export class SnkGuidesViewer {
|
|
|
1026
1005
|
}
|
|
1027
1006
|
static get events() {
|
|
1028
1007
|
return [{
|
|
1008
|
+
"method": "snkShowGuide",
|
|
1009
|
+
"name": "snkShowGuide",
|
|
1010
|
+
"bubbles": true,
|
|
1011
|
+
"cancelable": true,
|
|
1012
|
+
"composed": true,
|
|
1013
|
+
"docs": {
|
|
1014
|
+
"tags": [],
|
|
1015
|
+
"text": "Emitido quando a uma gua \u00E9 exibida no formul\u00E1rio."
|
|
1016
|
+
},
|
|
1017
|
+
"complexType": {
|
|
1018
|
+
"original": "string",
|
|
1019
|
+
"resolved": "string",
|
|
1020
|
+
"references": {}
|
|
1021
|
+
}
|
|
1022
|
+
}, {
|
|
1029
1023
|
"method": "snkMasterFormConfigChange",
|
|
1030
1024
|
"name": "snkMasterFormConfigChange",
|
|
1031
1025
|
"bubbles": true,
|
|
@@ -1290,3 +1284,8 @@ var TASKBAR_ID;
|
|
|
1290
1284
|
TASKBAR_ID["MUTIPLE_EDITION"] = "snkGuideViewer.multiple_edition";
|
|
1291
1285
|
TASKBAR_ID["REGULAR"] = "snkGuideViewer.regular";
|
|
1292
1286
|
})(TASKBAR_ID || (TASKBAR_ID = {}));
|
|
1287
|
+
var GUIDES_VIEWER_VIEW_MODE;
|
|
1288
|
+
(function (GUIDES_VIEWER_VIEW_MODE) {
|
|
1289
|
+
GUIDES_VIEWER_VIEW_MODE[GUIDES_VIEWER_VIEW_MODE["GUIDES"] = 0] = "GUIDES";
|
|
1290
|
+
GUIDES_VIEWER_VIEW_MODE[GUIDES_VIEWER_VIEW_MODE["CONFIG"] = 1] = "CONFIG";
|
|
1291
|
+
})(GUIDES_VIEWER_VIEW_MODE || (GUIDES_VIEWER_VIEW_MODE = {}));
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { h, Host } from '@stencil/core';
|
|
2
|
+
export class SnkCustomSlotGuide {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.slotName = 'CUSTOM_SLOT_GUIDE';
|
|
5
|
+
}
|
|
6
|
+
onGuideChange(evt) {
|
|
7
|
+
const guideName = evt.detail;
|
|
8
|
+
if (guideName === this.slotName) {
|
|
9
|
+
this._element.style.setProperty('display', 'block');
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
this._element.style.setProperty('display', 'none');
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
onFormConfigVisibilityChange(evt) {
|
|
16
|
+
const isFormConfigVisible = evt.detail;
|
|
17
|
+
if (isFormConfigVisible) {
|
|
18
|
+
this._element.style.setProperty('display', 'none');
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
componentDidLoad() {
|
|
22
|
+
this.snkCustomSlotGuideLoaded.emit(this.slotName);
|
|
23
|
+
}
|
|
24
|
+
render() {
|
|
25
|
+
return (h(Host, { slot: this.slotName, id: this.slotName, class: "custom-slot-guide-container" }, h("slot", null)));
|
|
26
|
+
}
|
|
27
|
+
static get is() { return "snk-custom-slot-guide"; }
|
|
28
|
+
static get encapsulation() { return "scoped"; }
|
|
29
|
+
static get originalStyleUrls() {
|
|
30
|
+
return {
|
|
31
|
+
"$": ["snk-custom-slot-guide.css"]
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
static get styleUrls() {
|
|
35
|
+
return {
|
|
36
|
+
"$": ["snk-custom-slot-guide.css"]
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
static get properties() {
|
|
40
|
+
return {
|
|
41
|
+
"slotName": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"mutable": false,
|
|
44
|
+
"complexType": {
|
|
45
|
+
"original": "string",
|
|
46
|
+
"resolved": "string",
|
|
47
|
+
"references": {}
|
|
48
|
+
},
|
|
49
|
+
"required": false,
|
|
50
|
+
"optional": false,
|
|
51
|
+
"docs": {
|
|
52
|
+
"tags": [],
|
|
53
|
+
"text": "Nome do slot onde os elementos customizados dever\u00E3o aparecer."
|
|
54
|
+
},
|
|
55
|
+
"attribute": "slot-name",
|
|
56
|
+
"reflect": false,
|
|
57
|
+
"defaultValue": "'CUSTOM_SLOT_GUIDE'"
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
static get events() {
|
|
62
|
+
return [{
|
|
63
|
+
"method": "snkCustomSlotGuideLoaded",
|
|
64
|
+
"name": "snkCustomSlotGuideLoaded",
|
|
65
|
+
"bubbles": true,
|
|
66
|
+
"cancelable": true,
|
|
67
|
+
"composed": true,
|
|
68
|
+
"docs": {
|
|
69
|
+
"tags": [],
|
|
70
|
+
"text": "Emitido quando elemento \u00E9 carregado na tela."
|
|
71
|
+
},
|
|
72
|
+
"complexType": {
|
|
73
|
+
"original": "string",
|
|
74
|
+
"resolved": "string",
|
|
75
|
+
"references": {}
|
|
76
|
+
}
|
|
77
|
+
}];
|
|
78
|
+
}
|
|
79
|
+
static get elementRef() { return "_element"; }
|
|
80
|
+
static get listeners() {
|
|
81
|
+
return [{
|
|
82
|
+
"name": "snkShowGuide",
|
|
83
|
+
"method": "onGuideChange",
|
|
84
|
+
"target": "window",
|
|
85
|
+
"capture": false,
|
|
86
|
+
"passive": false
|
|
87
|
+
}, {
|
|
88
|
+
"name": "formConfigVisibilityChanged",
|
|
89
|
+
"method": "onFormConfigVisibilityChange",
|
|
90
|
+
"target": "window",
|
|
91
|
+
"capture": false,
|
|
92
|
+
"passive": false
|
|
93
|
+
}];
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -16,6 +16,7 @@ export class SnkDataUnit {
|
|
|
16
16
|
this._metadataByRow = new Map();
|
|
17
17
|
this._rowMetadataCache = new Map();
|
|
18
18
|
this._formFieldsConfig = [];
|
|
19
|
+
this._internalDataStateChange = false;
|
|
19
20
|
this.REGEX_DATAUNIT_NAME = /dd:\/\/(.+?)\//;
|
|
20
21
|
this._dataUnitObserver = async (action) => {
|
|
21
22
|
const duState = await this.buildDataState(action.type);
|
|
@@ -272,11 +273,17 @@ export class SnkDataUnit {
|
|
|
272
273
|
if (this.isAllowed("UPDATE") || this.dataUnit.isNewRecord(recordId)) {
|
|
273
274
|
return action;
|
|
274
275
|
}
|
|
276
|
+
if (this._internalDataStateChange) {
|
|
277
|
+
this._internalDataStateChange = false;
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
275
280
|
if (this._openedAlert) {
|
|
281
|
+
this._internalDataStateChange = true;
|
|
276
282
|
await this.dataUnit.cancelEdition();
|
|
277
283
|
return;
|
|
278
284
|
}
|
|
279
285
|
this._openedAlert = true;
|
|
286
|
+
this._internalDataStateChange = true;
|
|
280
287
|
await this.dataUnit.cancelEdition();
|
|
281
288
|
await ApplicationUtils.alert(this.getMessage("snkDataUnit.forbidden"), this.getMessage("snkDataUnit.forbiddenUpdate"));
|
|
282
289
|
this._openedAlert = false;
|
|
@@ -479,6 +486,8 @@ export class SnkDataUnit {
|
|
|
479
486
|
return records;
|
|
480
487
|
const parentSelectedRecord = parentDataUnit.getSelectedRecord();
|
|
481
488
|
const selfInfo = parentDataUnit === null || parentDataUnit === void 0 ? void 0 : parentDataUnit.getChildInfo(this.getCleanDataUnitName());
|
|
489
|
+
if (!selfInfo)
|
|
490
|
+
return records;
|
|
482
491
|
const { links } = selfInfo;
|
|
483
492
|
if (!links || links.length === 0)
|
|
484
493
|
return records;
|
|
@@ -17,16 +17,20 @@ export class SnkFilterPeriod {
|
|
|
17
17
|
/**
|
|
18
18
|
* Emitido quando acontece a alteração de valor do componente snk-filter-number
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
ezInputListener(evt) {
|
|
21
21
|
this.errorMessage = undefined;
|
|
22
|
+
const value = evt.detail;
|
|
22
23
|
if (this.getVariation() === FilterNumberVariation.INTERVAL) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
if (evt.target === this._startInterval && !isNaN(value)) {
|
|
25
|
+
this.value = Object.assign(this.value, { start: value });
|
|
26
|
+
}
|
|
27
|
+
if (evt.target === this._endInterval && !isNaN(value)) {
|
|
28
|
+
this.value = Object.assign(this.value, { end: value });
|
|
29
|
+
}
|
|
26
30
|
this.valueChanged.emit(this.value);
|
|
27
31
|
return;
|
|
28
32
|
}
|
|
29
|
-
this.value =
|
|
33
|
+
this.value = value;
|
|
30
34
|
this.valueChanged.emit(this.value);
|
|
31
35
|
}
|
|
32
36
|
/**
|
|
@@ -101,7 +105,7 @@ export class SnkFilterPeriod {
|
|
|
101
105
|
if (this.getVariation() === FilterNumberVariation.INTERVAL) {
|
|
102
106
|
return (h("ez-tooltip", { active: this.config.enabled === false, message: this.config.disabledMessage, type: 'warning' }, h("div", { class: "ez-col ez-col--nowrap" }, h("ez-number-input", { id: `${this.config.id}_start`, class: this.presentationMode === EPresentationMode.MODAL ? 'ez-padding-right--medium' : '', label: this._startIntervalLabel, ref: ref => this._startInterval = ref, value: this.getIntervalValue("start"), enabled: this.config.enabled, precision: (_a = this.config.props) === null || _a === void 0 ? void 0 : _a.precision, errorMessage: this.errorMessage }), this.buildLabel(), h("ez-number-input", { id: `${this.config.id}_end`, label: this._endIntervalLabel, ref: ref => this._endInterval = ref, value: this.getIntervalValue("end"), enabled: this.config.enabled, precision: (_b = this.config.props) === null || _b === void 0 ? void 0 : _b.precision, errorMessage: this.errorMessage }))));
|
|
103
107
|
}
|
|
104
|
-
return (h("ez-tooltip", { active: this.config.enabled === false, message: this.config.disabledMessage, type: 'warning' }, h("ez-number-input", { id: this.config.id, ref: ref => this._numberElement = ref, value: this.config.value, precision: (_c = this.config.props) === null || _c === void 0 ? void 0 : _c.precision, enabled: this.config.enabled, errorMessage: this.errorMessage })));
|
|
108
|
+
return (h("ez-tooltip", { active: this.config.enabled === false, message: this.config.disabledMessage, type: 'warning' }, h("ez-number-input", { id: this.config.id, label: this.config.label, ref: ref => this._numberElement = ref, value: this.config.value, precision: (_c = this.config.props) === null || _c === void 0 ? void 0 : _c.precision, enabled: this.config.enabled, errorMessage: this.errorMessage })));
|
|
105
109
|
}
|
|
106
110
|
static get is() { return "snk-filter-number"; }
|
|
107
111
|
static get properties() {
|
|
@@ -143,7 +147,7 @@ export class SnkFilterPeriod {
|
|
|
143
147
|
},
|
|
144
148
|
"value": {
|
|
145
149
|
"type": "number",
|
|
146
|
-
"mutable":
|
|
150
|
+
"mutable": true,
|
|
147
151
|
"complexType": {
|
|
148
152
|
"original": "FilterNumberValueType",
|
|
149
153
|
"resolved": "number | { start: number; end: number; }",
|
|
@@ -281,8 +285,8 @@ export class SnkFilterPeriod {
|
|
|
281
285
|
static get elementRef() { return "_element"; }
|
|
282
286
|
static get listeners() {
|
|
283
287
|
return [{
|
|
284
|
-
"name": "
|
|
285
|
-
"method": "
|
|
288
|
+
"name": "ezInput",
|
|
289
|
+
"method": "ezInputListener",
|
|
286
290
|
"target": undefined,
|
|
287
291
|
"capture": false,
|
|
288
292
|
"passive": false
|
|
@@ -7,16 +7,17 @@ export class SnkFilterPeriod {
|
|
|
7
7
|
this._startDateLabel = 'Inicial';
|
|
8
8
|
this._endDateLabel = 'Final';
|
|
9
9
|
this._toLabel = 'até';
|
|
10
|
+
this._defaultEmptyValue = {
|
|
11
|
+
start: null,
|
|
12
|
+
end: null
|
|
13
|
+
};
|
|
10
14
|
this.internalChange = {
|
|
11
15
|
start: false,
|
|
12
16
|
end: false
|
|
13
17
|
};
|
|
14
18
|
this.config = undefined;
|
|
15
19
|
this.getMessage = undefined;
|
|
16
|
-
this.value =
|
|
17
|
-
start: null,
|
|
18
|
-
end: null
|
|
19
|
-
};
|
|
20
|
+
this.value = this._defaultEmptyValue;
|
|
20
21
|
this.presentationMode = EPresentationMode.CHIP;
|
|
21
22
|
this.errorMessage = undefined;
|
|
22
23
|
}
|
|
@@ -29,6 +30,10 @@ export class SnkFilterPeriod {
|
|
|
29
30
|
this.internalChange.start = false;
|
|
30
31
|
return;
|
|
31
32
|
}
|
|
33
|
+
if ((!newValue && oldValue) || (!(newValue === null || newValue === void 0 ? void 0 : newValue.start) && !(newValue === null || newValue === void 0 ? void 0 : newValue.end))) {
|
|
34
|
+
this.clearValue();
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
32
37
|
if (newValue && (newValue.start !== (oldValue === null || oldValue === void 0 ? void 0 : oldValue.start) || newValue.end !== (oldValue === null || oldValue === void 0 ? void 0 : oldValue.end))) {
|
|
33
38
|
this.valueStart = this.parseDate(newValue.start);
|
|
34
39
|
this.valueEnd = this.parseDate(newValue.end);
|
|
@@ -50,9 +55,11 @@ export class SnkFilterPeriod {
|
|
|
50
55
|
* Limpa o valor do componente restaurando o valor original da configuração.
|
|
51
56
|
*/
|
|
52
57
|
async clearValue() {
|
|
53
|
-
this.value = this.config.value;
|
|
58
|
+
this.value = this.config.value || this._defaultEmptyValue;
|
|
54
59
|
this.valueStart = this.getDate("start");
|
|
55
60
|
this.valueEnd = this.getDate("end");
|
|
61
|
+
this._startDate.value = this.valueStart;
|
|
62
|
+
this._endDate.value = this.valueEnd;
|
|
56
63
|
}
|
|
57
64
|
componentDidLoad() {
|
|
58
65
|
if (this._element) {
|
|
@@ -102,7 +109,7 @@ export class SnkFilterPeriod {
|
|
|
102
109
|
if (!this.config || this.config.type !== FilterItemType.PERIOD) {
|
|
103
110
|
return undefined;
|
|
104
111
|
}
|
|
105
|
-
return (h("ez-tooltip", { active: this.config.enabled === false, message: this.config.disabledMessage, type: 'warning' }, h("div", { class: "ez-col ez-col--nowrap" }, h("ez-date-input", { id: `${this.config.id}_start`, class: this.presentationMode === EPresentationMode.MODAL ? 'ez-padding-right--medium' : '', label: this._startDateLabel, ref: ref => this._startDate = ref, enabled: this.config.enabled, value: this.valueStart, errorMessage: this.errorMessage,
|
|
112
|
+
return (h("ez-tooltip", { active: this.config.enabled === false, message: this.config.disabledMessage, type: 'warning' }, h("div", { class: "ez-col ez-col--nowrap" }, h("ez-date-input", { id: `${this.config.id}_start`, class: this.presentationMode === EPresentationMode.MODAL ? 'ez-padding-right--medium' : '', label: this._startDateLabel, ref: ref => this._startDate = ref, enabled: this.config.enabled, value: this.valueStart, errorMessage: this.errorMessage, onEzInput: (event) => this.ezChangeListener(event, 'start') }), this.buildLabel(), h("ez-date-input", { id: `${this.config.id}_end`, label: this._endDateLabel, ref: ref => this._endDate = ref, enabled: this.config.enabled, value: this.valueEnd, errorMessage: this.errorMessage, onEzInput: (event) => this.ezChangeListener(event, 'end') }))));
|
|
106
113
|
}
|
|
107
114
|
static get is() { return "snk-filter-period"; }
|
|
108
115
|
static get properties() {
|
|
@@ -160,7 +167,7 @@ export class SnkFilterPeriod {
|
|
|
160
167
|
"tags": [],
|
|
161
168
|
"text": "Define o valor do componente snk-filter-period"
|
|
162
169
|
},
|
|
163
|
-
"defaultValue": "
|
|
170
|
+
"defaultValue": "this._defaultEmptyValue"
|
|
164
171
|
},
|
|
165
172
|
"presentationMode": {
|
|
166
173
|
"type": "number",
|