@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
|
@@ -2,18 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-1894343a.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
|
-
const SnkFormConfigManager = require('./SnkFormConfigManager-
|
|
7
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-c88cf1e9.js');
|
|
8
8
|
const ResourceIDUtils = require('./ResourceIDUtils-5ff86aa7.js');
|
|
9
9
|
const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
|
|
10
10
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
11
|
-
const formConfigFetcher = require('./form-config-fetcher-
|
|
11
|
+
const formConfigFetcher = require('./form-config-fetcher-72cf0e3d.js');
|
|
12
12
|
const constants = require('./constants-6d82e405.js');
|
|
13
|
-
const FormConfigHelper = require('./FormConfigHelper-
|
|
14
|
-
require('./ConfigStorage-
|
|
15
|
-
require('./DataFetcher-
|
|
13
|
+
const FormConfigHelper = require('./FormConfigHelper-28fe4668.js');
|
|
14
|
+
require('./ConfigStorage-d9d24844.js');
|
|
15
|
+
require('./DataFetcher-3a8ea521.js');
|
|
16
16
|
require('./PrintUtils-bcaeb82f.js');
|
|
17
|
+
require('./SnkMessageBuilder-d9558dba.js');
|
|
17
18
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
18
19
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
19
20
|
|
|
@@ -263,8 +264,8 @@ const SnkFormConfig = class {
|
|
|
263
264
|
this.configOptions = userConfig;
|
|
264
265
|
const isDefault = this._formConfig != undefined ? this._formConfig.defaultConfiguration : true;
|
|
265
266
|
const origin = (isDefault ? formConfigFetcher.UserConfigType.DEFAULT : formConfigFetcher.UserConfigType.USER);
|
|
266
|
-
this.configSelected = userConfig.find((config) => config.origin === origin);
|
|
267
|
-
this.originalConfigSelected = userConfig.find((config) => config.origin === origin);
|
|
267
|
+
this.configSelected = userConfig === null || userConfig === void 0 ? void 0 : userConfig.find((config) => config.origin === origin);
|
|
268
|
+
this.originalConfigSelected = userConfig === null || userConfig === void 0 ? void 0 : userConfig.find((config) => config.origin === origin);
|
|
268
269
|
}
|
|
269
270
|
catch (error) {
|
|
270
271
|
console.error(this.getMessage('snkFormConfig.errors.failFetchUserConfig'));
|
|
@@ -317,13 +318,23 @@ const SnkFormConfig = class {
|
|
|
317
318
|
return fieldVisible === true && hasCfg === false;
|
|
318
319
|
});
|
|
319
320
|
}
|
|
321
|
+
getInitialOrder(guidesList) {
|
|
322
|
+
var _a, _b;
|
|
323
|
+
if (Array.isArray((_a = this._formConfig) === null || _a === void 0 ? void 0 : _a.tabs)) {
|
|
324
|
+
return (_b = this._formConfig.tabs) === null || _b === void 0 ? void 0 : _b.length;
|
|
325
|
+
}
|
|
326
|
+
if (guidesList.length > 0) {
|
|
327
|
+
return Math.max(...guidesList.map(g => g.order));
|
|
328
|
+
}
|
|
329
|
+
return 0;
|
|
330
|
+
}
|
|
320
331
|
loadGuides() {
|
|
321
|
-
var _a
|
|
332
|
+
var _a;
|
|
322
333
|
this.guidesList = [];
|
|
323
334
|
this.guidesList.push(...FormConfigHelper.buildGuides(this._formConfig, this.getMessage('snkFormConfig.form.mainArea')));
|
|
324
|
-
this.guidesList.push(...FormConfigHelper.buildChildrenGuides(this.dataUnit, (
|
|
335
|
+
this.guidesList.push(...FormConfigHelper.buildChildrenGuides(this.dataUnit, this.getInitialOrder(this.guidesList), this.guidesList));
|
|
325
336
|
this.guidesList.push(...FormConfigHelper.buildCustomGuides(this.customGuidesConfig, this.guidesList));
|
|
326
|
-
this.guidesMap = FormConfigHelper.buildGuidesMap((
|
|
337
|
+
this.guidesMap = FormConfigHelper.buildGuidesMap((_a = this._formConfig) === null || _a === void 0 ? void 0 : _a.fields, this.guidesList, this.dataUnit, this.getMessage('snkFormConfig.form.tabGeneral'));
|
|
327
338
|
}
|
|
328
339
|
getConfig() {
|
|
329
340
|
let config = this.configManager.getConfig(this.dataUnit, false);
|
|
@@ -2,27 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-1894343a.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
|
|
8
8
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
9
|
-
require('./DataFetcher-
|
|
10
|
-
require('./ISave-
|
|
11
|
-
const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-
|
|
9
|
+
require('./DataFetcher-3a8ea521.js');
|
|
10
|
+
require('./ISave-a66bb65e.js');
|
|
11
|
+
const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-a891430e.js');
|
|
12
12
|
const index$1 = require('./index-e3e39724.js');
|
|
13
13
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
14
14
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
15
|
-
require('./dataunit-fetcher-
|
|
15
|
+
require('./dataunit-fetcher-4320f7ec.js');
|
|
16
16
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
17
|
-
require('./form-config-fetcher-
|
|
17
|
+
require('./form-config-fetcher-72cf0e3d.js');
|
|
18
18
|
require('./constants-6d82e405.js');
|
|
19
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
20
|
-
const index$2 = require('./index-
|
|
19
|
+
const ConfigStorage = require('./ConfigStorage-d9d24844.js');
|
|
20
|
+
const index$2 = require('./index-f0fe7e6e.js');
|
|
21
21
|
const GetSelectedRecordsIDsInfo = require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
|
|
22
22
|
const filterValidate = require('./filter-validate-cb4ed41a.js');
|
|
23
|
-
const taskbarElements = require('./taskbar-elements-
|
|
23
|
+
const taskbarElements = require('./taskbar-elements-a94d4318.js');
|
|
24
24
|
const taskbarProcessor = require('./taskbar-processor-2fba34a8.js');
|
|
25
25
|
require('./PrintUtils-bcaeb82f.js');
|
|
26
|
+
require('./SnkMessageBuilder-d9558dba.js');
|
|
26
27
|
require('./IFetchDataExporterParams-e78ec415.js');
|
|
27
28
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource');
|
|
28
29
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
@@ -83,7 +84,7 @@ class ServerSideExporterProvider extends SnkMultiSelectionListDataSource.Commons
|
|
|
83
84
|
}
|
|
84
85
|
}
|
|
85
86
|
|
|
86
|
-
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;align-items:flex-start;min-height:
|
|
87
|
+
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)}";
|
|
87
88
|
|
|
88
89
|
const SnkGrid = class {
|
|
89
90
|
constructor(hostRef) {
|
|
@@ -131,7 +132,7 @@ const SnkGrid = class {
|
|
|
131
132
|
this._showSnkFilterBar = true;
|
|
132
133
|
this._enableContinuousInsert = false;
|
|
133
134
|
this._filterMode = 'regular';
|
|
134
|
-
this.columnFilterDataSource =
|
|
135
|
+
this.columnFilterDataSource = undefined;
|
|
135
136
|
this.enableLockManagerLoadingComp = false;
|
|
136
137
|
this.enableLockManagerTaskbarClick = false;
|
|
137
138
|
this.configName = undefined;
|
|
@@ -458,14 +459,20 @@ const SnkGrid = class {
|
|
|
458
459
|
}
|
|
459
460
|
return action;
|
|
460
461
|
}
|
|
462
|
+
initializeColumnFilterDataSource() {
|
|
463
|
+
var _a, _b, _c;
|
|
464
|
+
const isInMemoryDataUnit = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.name.includes("InMemoryDataUnit");
|
|
465
|
+
if (!this.columnFilterDataSource && !isInMemoryDataUnit) {
|
|
466
|
+
this.columnFilterDataSource = new SnkMultiSelectionListDataSource.SnkMultiSelectionListDataSource();
|
|
467
|
+
}
|
|
468
|
+
(_b = this.columnFilterDataSource) === null || _b === void 0 ? void 0 : _b.setApplication(this._application);
|
|
469
|
+
(_c = this.columnFilterDataSource) === null || _c === void 0 ? void 0 : _c.setDataUnit(this._dataUnit);
|
|
470
|
+
}
|
|
461
471
|
finishLoading() {
|
|
462
472
|
this._dataUnit.addInterceptor(this.dataUnitInterceptor);
|
|
463
473
|
SnkMultiSelectionListDataSource.CrudUtils.assertDefaultSorting(this._gridConfig, this._dataUnit);
|
|
464
474
|
this.addElementID();
|
|
465
|
-
|
|
466
|
-
this.columnFilterDataSource.setApplication(this._application);
|
|
467
|
-
this.columnFilterDataSource.setDataUnit(this._dataUnit);
|
|
468
|
-
}
|
|
475
|
+
this.initializeColumnFilterDataSource();
|
|
469
476
|
}
|
|
470
477
|
setCustomRenders() {
|
|
471
478
|
if (!this._grid) {
|
|
@@ -548,7 +555,7 @@ const SnkGrid = class {
|
|
|
548
555
|
return disabledButtons;
|
|
549
556
|
}
|
|
550
557
|
getInvisibleButtons() {
|
|
551
|
-
var _a, _b;
|
|
558
|
+
var _a, _b, _c;
|
|
552
559
|
let invisibleButtons = [];
|
|
553
560
|
if (!this._dataUnit || this._dataUnit.records.length === 0)
|
|
554
561
|
invisibleButtons.push(taskbarElements.TaskbarElement.DATA_EXPORTER);
|
|
@@ -556,6 +563,8 @@ const SnkGrid = class {
|
|
|
556
563
|
invisibleButtons.push(taskbarElements.TaskbarElement.ACTIONS_BUTTON);
|
|
557
564
|
if (((_b = this._dataState) === null || _b === void 0 ? void 0 : _b.selectionInfo.length) === 1)
|
|
558
565
|
invisibleButtons.push(taskbarElements.TaskbarElement.UPDATE_MULTIPLE);
|
|
566
|
+
if (!((_c = this._dataState) === null || _c === void 0 ? void 0 : _c.selectionInfo.length))
|
|
567
|
+
invisibleButtons.push(taskbarElements.TaskbarElement.FORM_MODE);
|
|
559
568
|
return invisibleButtons;
|
|
560
569
|
}
|
|
561
570
|
componentWillRender() {
|
|
@@ -667,7 +676,7 @@ const SnkGrid = class {
|
|
|
667
676
|
if (!this._dataUnit) {
|
|
668
677
|
return undefined;
|
|
669
678
|
}
|
|
670
|
-
return (index.h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large ez-box--no-outline", tabindex: "0" }, index.h("div", { class: "snk-grid__header
|
|
679
|
+
return (index.h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large ez-box--no-outline", tabindex: "0" }, index.h("div", { class: "snk-grid__header" }, this._showSnkFilterBar &&
|
|
671
680
|
index.h(index.Fragment, null, index.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 }), index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), index.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() }, index.h("slot", { name: this.topTaskbarCustomSlotId }))), index.h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === index$1.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) => {
|
|
672
681
|
this.gridConfigChangeHandler(evt);
|
|
673
682
|
}, 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 }, index.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() }, index.h("slot", { name: this.gridHeaderCustomSlotId }), index.h("slot", { name: this.gridHeaderDynamicSearchSlotId }))), index.h("div", { class: "ez-col ez-col--sd-12 snk-grid-container__footer" }, index.h("slot", { name: "SnkGridFooter" })), index.h("ez-popup", { size: "medium", heightMode: "auto", useHeader: false, opened: this._popUpGridConfig, onEzClosePopup: () => this.closeGridConfig() }, index.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-1894343a.js');
|
|
4
4
|
const core = require('@sankhyalabs/core');
|
|
5
5
|
const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
|
|
6
6
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
7
7
|
const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
|
|
8
|
-
require('./DataFetcher-
|
|
9
|
-
require('./ISave-
|
|
8
|
+
require('./DataFetcher-3a8ea521.js');
|
|
9
|
+
require('./ISave-a66bb65e.js');
|
|
10
10
|
const index$1 = require('./index-e3e39724.js');
|
|
11
11
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
12
12
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
13
|
-
require('./dataunit-fetcher-
|
|
13
|
+
require('./dataunit-fetcher-4320f7ec.js');
|
|
14
14
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
15
|
-
require('./form-config-fetcher-
|
|
15
|
+
require('./form-config-fetcher-72cf0e3d.js');
|
|
16
16
|
const constants = require('./constants-6d82e405.js');
|
|
17
|
-
const SnkFormConfigManager = require('./SnkFormConfigManager-
|
|
18
|
-
const taskbarElements = require('./taskbar-elements-
|
|
17
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-c88cf1e9.js');
|
|
18
|
+
const taskbarElements = require('./taskbar-elements-a94d4318.js');
|
|
19
19
|
const taskbarProcessor = require('./taskbar-processor-2fba34a8.js');
|
|
20
20
|
|
|
21
21
|
const snkGuidesViewerCss = ".sc-snk-guides-viewer-h{--snk-guides-viewer--space-large:var(--space--large, 24px);--snk-guides-viewer--space-small:var(--space--2xs, 8px);--snk-guides-viewer__header--min-height:68px;--snk-guides-viewer__header--z-index:var(--more-visible, 2);--snk-guides-viewer__header--background-color:var(--background--body, #fafcff);--snk-guides-viewer__guide-navigator--width:340px;display:block}snk-form-view.sc-snk-guides-viewer{width:100%}.snk-guides-viewer.sc-snk-guides-viewer{position:relative;padding-left:0px;padding-top:0px;padding-right:var(--snk-guides-viewer--space-large);padding-bottom:var(--snk-guides-viewer--space-large)}.snk-guides-viewer__detail-container.sc-snk-guides-viewer{display:flex;row-gap:24px;flex-direction:column}.snk-guides-viewer__header.sc-snk-guides-viewer{position:sticky;align-items:center;top:0;z-index:var(--snk-guides-viewer__header--z-index);background-color:var(--snk-guides-viewer__header--background-color);min-height:var(--snk-guides-viewer__header--min-height);width:calc(100% + (var(--snk-guides-viewer--space-large) * 2));padding-left:var(--snk-guides-viewer--space-large);padding-right:var(--snk-guides-viewer--space-large);padding-top:var(--snk-guides-viewer--space-large);padding-bottom:var(--snk-guides-viewer--space-small);margin-left:calc(var(--snk-guides-viewer--space-large) * -1);margin-right:calc(var(--snk-guides-viewer--space-large) * -1);margin-bottom:var(--snk-guides-viewer--space-small)}.snk-guides-viewer__header-breadcrumb.sc-snk-guides-viewer{width:25%;display:flex}.snk-guides-viewer__header-taskbar.sc-snk-guides-viewer{width:75%}.snk-guides-viewer__container.sc-snk-guides-viewer{display:grid;grid-template-columns:minmax(0, auto) minmax(0, 100%);height:100%;column-gap:var(--snk-guides-viewer--space-large)}.snk-guides-viewer__guide-navigator.sc-snk-guides-viewer{position:sticky;top:calc(var(--snk-guides-viewer__header--min-height) + var(--snk-guides-viewer--space-small));height:calc(100vh - var(--snk-guides-viewer__header--min-height) - var(--snk-guides-viewer--space-large) - var(--snk-guides-viewer--space-small))}.snk-guides-viewer__guide-navigator[open].sc-snk-guides-viewer{width:var(--snk-guides-viewer__guide-navigator--width);max-width:var(--snk-guides-viewer__guide-navigator--width);min-width:var(--snk-guides-viewer__guide-navigator--width)}.snk-guides-viewer__detail-content.sc-snk-guides-viewer{min-height:100%;align-items:flex-start;align-content:flex-start}";
|
|
@@ -24,14 +24,13 @@ const FORM_NAME_PREFIX = "__FORM:";
|
|
|
24
24
|
const SnkGuidesViewer = class {
|
|
25
25
|
constructor(hostRef) {
|
|
26
26
|
index.registerInstance(this, hostRef);
|
|
27
|
+
this.snkShowGuide = index.createEvent(this, "snkShowGuide", 7);
|
|
27
28
|
this.snkMasterFormConfigChange = index.createEvent(this, "snkMasterFormConfigChange", 7);
|
|
28
29
|
this.formConfigVisibilityChanged = index.createEvent(this, "formConfigVisibilityChanged", 7);
|
|
29
30
|
this.exit = index.createEvent(this, "exit", 7);
|
|
30
31
|
this.actionClick = index.createEvent(this, "actionClick", 7);
|
|
31
32
|
this.formItemsReady = index.createEvent(this, "formItemsReady", 7);
|
|
32
33
|
this._guideBuilders = new Map();
|
|
33
|
-
this.CUSTOM_GUIDE_ID_PREFIX = "CUSTOM_GUIDE_";
|
|
34
|
-
this.CUSTOM_GUIDE_DATA_CUSTOM_ID = "CUSTOM_GUIDE";
|
|
35
34
|
this.dataUnit = undefined;
|
|
36
35
|
this.dataState = undefined;
|
|
37
36
|
this.configName = undefined;
|
|
@@ -65,8 +64,12 @@ const SnkGuidesViewer = class {
|
|
|
65
64
|
observeDataUnit() {
|
|
66
65
|
this.loadGuides(true);
|
|
67
66
|
}
|
|
68
|
-
observeFormConfigManager(value) {
|
|
69
|
-
|
|
67
|
+
async observeFormConfigManager(value) {
|
|
68
|
+
const showFormConfig = !!value;
|
|
69
|
+
await this._viewStack.show(showFormConfig ?
|
|
70
|
+
GUIDES_VIEWER_VIEW_MODE.CONFIG :
|
|
71
|
+
GUIDES_VIEWER_VIEW_MODE.GUIDES);
|
|
72
|
+
this.formConfigVisibilityChanged.emit(showFormConfig);
|
|
70
73
|
}
|
|
71
74
|
observeDataState(newValue, oldValue) {
|
|
72
75
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -116,7 +119,8 @@ const SnkGuidesViewer = class {
|
|
|
116
119
|
* Atribui o foco para o componente.
|
|
117
120
|
*/
|
|
118
121
|
async setFocus() {
|
|
119
|
-
|
|
122
|
+
var _a;
|
|
123
|
+
(_a = this._container) === null || _a === void 0 ? void 0 : _a.focus();
|
|
120
124
|
}
|
|
121
125
|
/**
|
|
122
126
|
* Recarrega os guias baseada nos metadados atuais.
|
|
@@ -177,6 +181,13 @@ const SnkGuidesViewer = class {
|
|
|
177
181
|
item.tooltip = this.getMessage("snkCrud.detail.tooltip.needSingleSelection");
|
|
178
182
|
item.disabled = true;
|
|
179
183
|
}
|
|
184
|
+
if (sheet.isCustom && sheet.ctxProps) {
|
|
185
|
+
Object.entries(sheet.ctxProps).forEach(([key, value]) => {
|
|
186
|
+
if (value !== undefined) {
|
|
187
|
+
item[key] = value;
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
}
|
|
180
191
|
guides.push(item);
|
|
181
192
|
});
|
|
182
193
|
this._guides = guides;
|
|
@@ -291,7 +302,7 @@ const SnkGuidesViewer = class {
|
|
|
291
302
|
if (sheet == undefined) {
|
|
292
303
|
return;
|
|
293
304
|
}
|
|
294
|
-
return index.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 });
|
|
305
|
+
return index.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 });
|
|
295
306
|
})));
|
|
296
307
|
}
|
|
297
308
|
wrapDetail(levels, content) {
|
|
@@ -313,11 +324,13 @@ const SnkGuidesViewer = class {
|
|
|
313
324
|
}
|
|
314
325
|
getContent() {
|
|
315
326
|
if (!this.selectedGuide) {
|
|
327
|
+
this.snkShowGuide.emit(undefined);
|
|
316
328
|
return;
|
|
317
329
|
}
|
|
318
330
|
const guideId = this.selectedGuide.id;
|
|
331
|
+
this.snkShowGuide.emit(guideId);
|
|
319
332
|
if (this.isCustomGuide(guideId)) {
|
|
320
|
-
return index.h("
|
|
333
|
+
return index.h("slot", { name: guideId });
|
|
321
334
|
}
|
|
322
335
|
const levels = guideId.split("::");
|
|
323
336
|
const currentLevel = levels.pop();
|
|
@@ -328,16 +341,13 @@ const SnkGuidesViewer = class {
|
|
|
328
341
|
}
|
|
329
342
|
return this.buildFormViewGuideContent(guideId);
|
|
330
343
|
}
|
|
331
|
-
buildCustomGuideContainerId(guideId) {
|
|
332
|
-
return `${this.CUSTOM_GUIDE_ID_PREFIX}${guideId}`;
|
|
333
|
-
}
|
|
334
344
|
buildFormViewGuideContent(cardId) {
|
|
335
345
|
var _a, _b, _c, _d;
|
|
336
346
|
const sheet = this._masterFormMetadata.getSheet(cardId);
|
|
337
347
|
if (!sheet)
|
|
338
348
|
return;
|
|
339
349
|
const cardConfig = (_b = (_a = this.masterFormConfig) === null || _a === void 0 ? void 0 : _a.cardsState) === null || _b === void 0 ? void 0 : _b.get(cardId);
|
|
340
|
-
return (index.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 == index$1.PresentationMode.SECONDARY && this.buildTaskBar()));
|
|
350
|
+
return (index.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 == index$1.PresentationMode.SECONDARY && this.buildTaskBar()));
|
|
341
351
|
}
|
|
342
352
|
isDetailGuide(childEntityName, levels) {
|
|
343
353
|
return childEntityName || levels.length > 0;
|
|
@@ -360,20 +370,6 @@ const SnkGuidesViewer = class {
|
|
|
360
370
|
var _a;
|
|
361
371
|
return (_a = this.customGuidesConfig) === null || _a === void 0 ? void 0 : _a.map(g => g.id).includes(guideId);
|
|
362
372
|
}
|
|
363
|
-
attachCustomGuideInView() {
|
|
364
|
-
//As guias customizadas ficam em slots reservados na DOM e
|
|
365
|
-
// precisam ser acessadas via querySelector e colocadas no container correto na view.
|
|
366
|
-
var _a;
|
|
367
|
-
const guideId = (_a = this.selectedGuide) === null || _a === void 0 ? void 0 : _a.id;
|
|
368
|
-
if (!this.isCustomGuide(guideId))
|
|
369
|
-
return;
|
|
370
|
-
const customGuideSlot = document.querySelector(`#${guideId}`);
|
|
371
|
-
const customGuideElement = customGuideSlot === null || customGuideSlot === void 0 ? void 0 : customGuideSlot.firstElementChild;
|
|
372
|
-
const customGuideViewContainer = document.querySelector(`#${this.buildCustomGuideContainerId(guideId)}`);
|
|
373
|
-
if (!customGuideElement || !customGuideViewContainer)
|
|
374
|
-
return;
|
|
375
|
-
customGuideViewContainer.appendChild(customGuideElement);
|
|
376
|
-
}
|
|
377
373
|
onBreadcrumbClickHandler(item) {
|
|
378
374
|
if ((item === null || item === void 0 ? void 0 : item.id) == undefined) {
|
|
379
375
|
return;
|
|
@@ -455,29 +451,7 @@ const SnkGuidesViewer = class {
|
|
|
455
451
|
this.addFormLegacyConfigName();
|
|
456
452
|
this._configManager.loadConfig();
|
|
457
453
|
}
|
|
458
|
-
componentWillRender() {
|
|
459
|
-
this.detachCustomGuideFromView();
|
|
460
|
-
}
|
|
461
|
-
detachCustomGuideFromView() {
|
|
462
|
-
// Antes de cada renderização, o componente remove a guia customizada da view
|
|
463
|
-
// e a coloca de volta no slot reservado na DOM para que não seja perdida sua referência.
|
|
464
|
-
if (!this.customGuidesConfig || this.customGuidesConfig.length === 0)
|
|
465
|
-
return;
|
|
466
|
-
const viewCustomGuideContainer = this._element.querySelector(`[data-custom-id="${this.CUSTOM_GUIDE_DATA_CUSTOM_ID}"]`);
|
|
467
|
-
const reservedSlotId = viewCustomGuideContainer === null || viewCustomGuideContainer === void 0 ? void 0 : viewCustomGuideContainer.getAttribute('data-reserved-slot-id');
|
|
468
|
-
if (!(viewCustomGuideContainer === null || viewCustomGuideContainer === void 0 ? void 0 : viewCustomGuideContainer.hasChildNodes()) || !reservedSlotId)
|
|
469
|
-
return;
|
|
470
|
-
const customGuideReservedSlot = document.querySelector(`#${reservedSlotId}`);
|
|
471
|
-
const customGuideElement = viewCustomGuideContainer === null || viewCustomGuideContainer === void 0 ? void 0 : viewCustomGuideContainer.firstElementChild;
|
|
472
|
-
if (!customGuideReservedSlot || !customGuideElement)
|
|
473
|
-
return;
|
|
474
|
-
customGuideReservedSlot.appendChild(customGuideElement);
|
|
475
|
-
}
|
|
476
454
|
componentDidRender() {
|
|
477
|
-
var _a;
|
|
478
|
-
if (this.isCustomGuide((_a = this.selectedGuide) === null || _a === void 0 ? void 0 : _a.id)) {
|
|
479
|
-
this.attachCustomGuideInView();
|
|
480
|
-
}
|
|
481
455
|
if (!this._guideHasChanged) {
|
|
482
456
|
return;
|
|
483
457
|
}
|
|
@@ -625,17 +599,14 @@ const SnkGuidesViewer = class {
|
|
|
625
599
|
await this._mainForm.showSearchField();
|
|
626
600
|
}, { description: this.getMessage("snkSimpleCrud.findFields"), element: this._element });
|
|
627
601
|
}
|
|
628
|
-
|
|
629
|
-
var _a, _b;
|
|
602
|
+
renderFormConfig() {
|
|
630
603
|
if (this._formEditorConfigManager != undefined) {
|
|
631
604
|
return (index.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() }));
|
|
632
605
|
}
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
this.
|
|
637
|
-
const showGuides = this._guides && (this._guides.length > 1);
|
|
638
|
-
return (index.h("section", { class: "snk-guides-viewer", ref: ref => this._container = ref, tabindex: -1 }, index.h("div", { class: "ez-row snk-guides-viewer__header" }, index.h("div", { class: "snk-guides-viewer__header-breadcrumb ez-flex--align-items-center ez-flex-item--align-center ez-padding-left--large", key: "header" }, index.h("ez-button", { onClick: () => this.exitViewer(), title: this.getMessage("snkCrud.goBackTitle"), mode: "icon", iconName: "arrow_back", class: "ez-padding-right--medium", size: "small" }), index.h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto" }, index.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 &&
|
|
606
|
+
}
|
|
607
|
+
renderGuidesNavigator(showGuides) {
|
|
608
|
+
var _a, _b;
|
|
609
|
+
return (index.h("section", { class: "snk-guides-viewer", ref: ref => this._container = ref, tabIndex: -1 }, index.h("div", { class: "ez-row snk-guides-viewer__header" }, index.h("div", { class: "snk-guides-viewer__header-breadcrumb ez-flex--align-items-center ez-flex-item--align-center ez-padding-left--large", key: "header" }, index.h("ez-button", { onClick: () => this.exitViewer(), title: this.getMessage("snkCrud.goBackTitle"), mode: "icon", iconName: "arrow_back", class: "ez-padding-right--medium", size: "small" }), index.h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto" }, index.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 &&
|
|
639
610
|
index.h("div", { class: "ez-margin-top--extra-small" }, index.h("ez-breadcrumb", Object.assign({ items: this._breadcrumbItems, onSelectedItem: (evt) => this.onBreadcrumbClickHandler(evt === null || evt === void 0 ? void 0 : evt.detail) }, { [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${core.ElementIDUtils.getInternalIDInfo("breadcrumb")}` }))))), this.presentationMode != index$1.PresentationMode.SECONDARY && this.buildTaskBar()), index.h("div", { class: "snk-guides-viewer__container" }, showGuides ?
|
|
640
611
|
index.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) })
|
|
641
612
|
:
|
|
@@ -648,8 +619,17 @@ const SnkGuidesViewer = class {
|
|
|
648
619
|
fieldToFocus: this._fieldToGetFocus,
|
|
649
620
|
onRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this),
|
|
650
621
|
propsCustomEditor: this._customEditors,
|
|
651
|
-
fieldsProps: this._fieldsProps
|
|
652
|
-
|
|
622
|
+
fieldsProps: this._fieldsProps,
|
|
623
|
+
entityPath: this.entityPath
|
|
624
|
+
}), this.getContent())), index.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 })));
|
|
625
|
+
}
|
|
626
|
+
render() {
|
|
627
|
+
if (!this.dataUnit || !this._configManager.isLoaded) {
|
|
628
|
+
return;
|
|
629
|
+
}
|
|
630
|
+
this.loadTaskbarProcessor();
|
|
631
|
+
const showGuides = this._guides && (this._guides.length > 1);
|
|
632
|
+
return (index.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "guides-viewer-stack" }, index.h("stack-item", null, this.renderGuidesNavigator(showGuides)), index.h("stack-item", null, this.renderFormConfig())));
|
|
653
633
|
}
|
|
654
634
|
get _element() { return index.getElement(this); }
|
|
655
635
|
static get watchers() { return {
|
|
@@ -665,6 +645,11 @@ var TASKBAR_ID;
|
|
|
665
645
|
TASKBAR_ID["MUTIPLE_EDITION"] = "snkGuideViewer.multiple_edition";
|
|
666
646
|
TASKBAR_ID["REGULAR"] = "snkGuideViewer.regular";
|
|
667
647
|
})(TASKBAR_ID || (TASKBAR_ID = {}));
|
|
648
|
+
var GUIDES_VIEWER_VIEW_MODE;
|
|
649
|
+
(function (GUIDES_VIEWER_VIEW_MODE) {
|
|
650
|
+
GUIDES_VIEWER_VIEW_MODE[GUIDES_VIEWER_VIEW_MODE["GUIDES"] = 0] = "GUIDES";
|
|
651
|
+
GUIDES_VIEWER_VIEW_MODE[GUIDES_VIEWER_VIEW_MODE["CONFIG"] = 1] = "CONFIG";
|
|
652
|
+
})(GUIDES_VIEWER_VIEW_MODE || (GUIDES_VIEWER_VIEW_MODE = {}));
|
|
668
653
|
SnkGuidesViewer.style = snkGuidesViewerCss;
|
|
669
654
|
|
|
670
655
|
exports.SnkGuidesViewer = SnkGuidesViewer;
|
|
@@ -2,29 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const snkGuidesViewer = require('./snk-guides-viewer-
|
|
6
|
-
require('./index-
|
|
5
|
+
const snkGuidesViewer = require('./snk-guides-viewer-4da78c21.js');
|
|
6
|
+
require('./index-1894343a.js');
|
|
7
7
|
require('@sankhyalabs/core');
|
|
8
8
|
require('@sankhyalabs/core/dist/dataunit/DataUnit');
|
|
9
9
|
require('@sankhyalabs/ezui/dist/collection/utils');
|
|
10
10
|
require('@sankhyalabs/ezui/dist/collection/utils/form');
|
|
11
|
-
require('./DataFetcher-
|
|
11
|
+
require('./DataFetcher-3a8ea521.js');
|
|
12
12
|
require('./PrintUtils-bcaeb82f.js');
|
|
13
|
+
require('./SnkMessageBuilder-d9558dba.js');
|
|
13
14
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
14
|
-
require('./ISave-
|
|
15
|
+
require('./ISave-a66bb65e.js');
|
|
15
16
|
require('./index-e3e39724.js');
|
|
16
17
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
17
|
-
require('./dataunit-fetcher-
|
|
18
|
+
require('./dataunit-fetcher-4320f7ec.js');
|
|
18
19
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
19
20
|
require('@sankhyalabs/core/dist/utils/SortingUtils');
|
|
20
21
|
require('./ResourceIDUtils-5ff86aa7.js');
|
|
21
22
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
22
|
-
require('./form-config-fetcher-
|
|
23
|
+
require('./form-config-fetcher-72cf0e3d.js');
|
|
23
24
|
require('./constants-6d82e405.js');
|
|
24
|
-
require('./SnkFormConfigManager-
|
|
25
|
-
require('./ConfigStorage-
|
|
26
|
-
require('./taskbar-elements-
|
|
27
|
-
require('./index-
|
|
25
|
+
require('./SnkFormConfigManager-c88cf1e9.js');
|
|
26
|
+
require('./ConfigStorage-d9d24844.js');
|
|
27
|
+
require('./taskbar-elements-a94d4318.js');
|
|
28
|
+
require('./index-f0fe7e6e.js');
|
|
28
29
|
require('./taskbar-processor-2fba34a8.js');
|
|
29
30
|
|
|
30
31
|
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-1894343a.js');
|
|
6
|
+
const core = require('@sankhyalabs/core');
|
|
7
|
+
const SnkMessageBuilder = require('./SnkMessageBuilder-d9558dba.js');
|
|
8
|
+
const ImageUtils = require('./ImageUtils-5e3f406b.js');
|
|
9
|
+
|
|
10
|
+
const snkImageInputCss = ":host{display:block}";
|
|
11
|
+
|
|
12
|
+
const SnkImageInput = class {
|
|
13
|
+
constructor(hostRef) {
|
|
14
|
+
index.registerInstance(this, hostRef);
|
|
15
|
+
this.imageError = index.createEvent(this, "imageError", 7);
|
|
16
|
+
this.dataUnitObserver = async (action) => {
|
|
17
|
+
var _a;
|
|
18
|
+
const actionsMoveSelection = [core.Action.NEXT_SELECTED, core.Action.PREVIOUS_SELECTED];
|
|
19
|
+
if (actionsMoveSelection.includes(action.type)) {
|
|
20
|
+
await this.loadImage();
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const selection = ((_a = action.payload) === null || _a === void 0 ? void 0 : _a.selection) || [];
|
|
24
|
+
if (action.type === core.Action.SELECTION_CHANGED && selection.length > 0) {
|
|
25
|
+
await this.loadImage();
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
if (action.type === core.Action.RECORDS_ADDED) {
|
|
29
|
+
await this.clearImage();
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
this.dataUnit = undefined;
|
|
34
|
+
this.fieldName = undefined;
|
|
35
|
+
this.entityName = undefined;
|
|
36
|
+
this.enabled = true;
|
|
37
|
+
this.acceptType = undefined;
|
|
38
|
+
this.maxSize = undefined;
|
|
39
|
+
this.label = undefined;
|
|
40
|
+
this.imageValue = undefined;
|
|
41
|
+
this.loading = true;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Força o reload da imagem
|
|
45
|
+
*/
|
|
46
|
+
async reloadImage(pks) {
|
|
47
|
+
await this.loadImage(pks);
|
|
48
|
+
}
|
|
49
|
+
getMessage(key, params) {
|
|
50
|
+
if (!this.messagesBuilder) {
|
|
51
|
+
this.messagesBuilder = new SnkMessageBuilder.SnkMessageBuilder();
|
|
52
|
+
}
|
|
53
|
+
return this.messagesBuilder.getMessage(key, params);
|
|
54
|
+
}
|
|
55
|
+
async clearImage() {
|
|
56
|
+
this.imageValue = undefined;
|
|
57
|
+
}
|
|
58
|
+
async handleImageChange(event) {
|
|
59
|
+
const base64 = event.detail;
|
|
60
|
+
if (!base64) {
|
|
61
|
+
await this.clearImage();
|
|
62
|
+
await this.updatedataUnitField(true);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
const blob = await ImageUtils.base64ToBlob(base64);
|
|
66
|
+
if (this.maxSize && blob.size > this.maxSize * 1024) {
|
|
67
|
+
const errorMsg = this.getMessage('snkImageInput.errorImageSize') + this.maxSize + '(KB)';
|
|
68
|
+
this.imageError.emit(errorMsg);
|
|
69
|
+
if (this.application) {
|
|
70
|
+
await this.application.error(this.getMessage('snkImageInput.errorTitle'), errorMsg);
|
|
71
|
+
}
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
this.imageValue = base64;
|
|
75
|
+
await ImageUtils.sessionFileUpload(blob, this.entityName, this.fieldName);
|
|
76
|
+
await this.updatedataUnitField();
|
|
77
|
+
}
|
|
78
|
+
async updatedataUnitField(deleted = false) {
|
|
79
|
+
if (!this.dataUnit || !this.dataUnit.getSelectedRecord()) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
if (deleted) {
|
|
83
|
+
await this.dataUnit.setFieldValue(this.fieldName, 'deletado');
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
await this.dataUnit.setFieldValue(this.fieldName, `$file.session.key{${ImageUtils.buildFileKey(this.entityName, this.fieldName)}}`);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
async handleImageError(event) {
|
|
90
|
+
this.imageError.emit(event.detail);
|
|
91
|
+
if (this.application) {
|
|
92
|
+
await this.application.error(this.getMessage('snkImageInput.errorTitle'), event.detail);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
getPksFromDataUnit() {
|
|
96
|
+
if (!this.dataUnit) {
|
|
97
|
+
return undefined;
|
|
98
|
+
}
|
|
99
|
+
const selectedRecord = this.dataUnit.getSelectedRecord();
|
|
100
|
+
if (!selectedRecord) {
|
|
101
|
+
return undefined;
|
|
102
|
+
}
|
|
103
|
+
const fieldValue = selectedRecord[this.fieldName];
|
|
104
|
+
if (!fieldValue) {
|
|
105
|
+
return undefined;
|
|
106
|
+
}
|
|
107
|
+
try {
|
|
108
|
+
const pk = JSON.parse(fieldValue);
|
|
109
|
+
return pk;
|
|
110
|
+
}
|
|
111
|
+
catch (error) {
|
|
112
|
+
console.error('Error parsing PK from data unit field:', error);
|
|
113
|
+
return undefined;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
async loadImage(pks) {
|
|
117
|
+
var _a;
|
|
118
|
+
this.loading = true;
|
|
119
|
+
if (this.dataUnit && this.entityName) {
|
|
120
|
+
pks = (_a = pks !== null && pks !== void 0 ? pks : this.getPksFromDataUnit()) !== null && _a !== void 0 ? _a : ImageUtils.getPKs(this.dataUnit);
|
|
121
|
+
this.imageValue = await ImageUtils.downloadImage(pks, this.fieldName, this.entityName);
|
|
122
|
+
}
|
|
123
|
+
this.loading = false;
|
|
124
|
+
}
|
|
125
|
+
async componentWillLoad() {
|
|
126
|
+
this.application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
127
|
+
if (!this.messagesBuilder) {
|
|
128
|
+
this.messagesBuilder = new SnkMessageBuilder.SnkMessageBuilder();
|
|
129
|
+
}
|
|
130
|
+
if (this.dataUnit) {
|
|
131
|
+
this.dataUnit.subscribe(this.dataUnitObserver);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
disconnectedCallback() {
|
|
135
|
+
if (this.dataUnit) {
|
|
136
|
+
this.dataUnit.unsubscribe(this.dataUnitObserver);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
async componentDidLoad() {
|
|
140
|
+
await this.loadImage();
|
|
141
|
+
}
|
|
142
|
+
render() {
|
|
143
|
+
return (index.h(index.Host, null, index.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 })));
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
SnkImageInput.style = snkImageInputCss;
|
|
147
|
+
|
|
148
|
+
exports.snk_image_input = SnkImageInput;
|