@sankhyalabs/sankhyablocks 10.1.0-dev.5 → 10.1.0-dev.51
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/LICENSE +4 -1
- package/dist/cjs/{ConfigStorage-72f34bd4.js → ConfigStorage-a1fab5ca.js} +19 -2
- package/dist/cjs/ContinuousInsertUtils-1ae0c6ac.js +41 -0
- package/dist/cjs/{DataFetcher-991b0349.js → DataFetcher-384d2ce8.js} +2 -2751
- package/dist/cjs/{FormConfigHelper-e253a418.js → FormConfigHelper-28fe4668.js} +3 -1
- package/dist/cjs/{ISave-ebf6b4ed.js → ISave-ecbe9336.js} +1 -1
- package/dist/cjs/ImageUtils-d6139911.js +144 -0
- package/dist/cjs/{PersonalizedFilterUtils-7259cf65.js → PersonalizedFilterUtils-eccb267a.js} +13 -0
- package/dist/cjs/{SnkFormConfigManager-cdbb29d4.js → SnkFormConfigManager-44386305.js} +5 -5
- package/dist/cjs/SnkMessageBuilder-a9300ebe.js +2833 -0
- package/dist/cjs/{SnkMultiSelectionListDataSource-011bec79.js → SnkMultiSelectionListDataSource-293bc3d2.js} +61 -47
- package/dist/cjs/{auth-fetcher-c3cac878.js → auth-fetcher-6b134ec4.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-b9822794.js} +66 -6
- 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 +6 -6
- package/dist/cjs/fields-selector.cjs.entry.js +3 -3
- package/dist/cjs/{form-config-fetcher-c7af90d8.js → form-config-fetcher-45d1964c.js} +19 -1
- package/dist/cjs/guides-configurator.cjs.entry.js +3 -3
- package/dist/cjs/{index-1cf293c1.js → index-1894343a.js} +1529 -177
- 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 +166 -116
- 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 +63 -25
- package/dist/cjs/snk-client-confirm.cjs.entry.js +1 -1
- package/dist/cjs/snk-configurator.cjs.entry.js +3 -1
- package/dist/cjs/snk-crud.cjs.entry.js +350 -109
- 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 +9 -7
- package/dist/cjs/{snk-data-unit-7d587ad5.js → snk-data-unit-4b6dc396.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 +27 -20
- package/dist/cjs/snk-entity-list.cjs.entry.js +1 -1
- package/dist/cjs/snk-entity-search.cjs.entry.js +211 -0
- package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +2 -2
- package/dist/cjs/snk-expression-group_2.cjs.entry.js +2 -2
- package/dist/cjs/{snk-filter-advanced-mode_2.cjs.entry.js → snk-filter-advanced-mode_3.cjs.entry.js} +41 -3
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +147 -94
- 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 +70 -8
- package/dist/cjs/snk-form_2.cjs.entry.js +22 -11
- package/dist/cjs/snk-grid.cjs.entry.js +76 -34
- package/dist/cjs/{snk-guides-viewer-366d5c32.js → snk-guides-viewer-b4ca3437.js} +78 -214
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +11 -18
- package/dist/cjs/snk-image-input.cjs.entry.js +160 -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 +8 -7
- 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-crud.cjs.entry.js +30 -35
- package/dist/cjs/snk-taskbar.cjs.entry.js +183 -126
- package/dist/cjs/{sortable.esm-9a110bb7.js → sortable.esm-b87669ab.js} +76 -90
- package/dist/cjs/taskbar-elements-80eddec8.js +152 -0
- package/dist/cjs/teste-pesquisa.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +9 -0
- package/dist/collection/components/snk-actions-button/actions/executor/launch-screen.executor.js +6 -3
- package/dist/collection/components/snk-actions-button/snk-actions-button.js +27 -3
- 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.css +29 -7
- package/dist/collection/components/snk-attach/snk-attach.js +94 -19
- package/dist/collection/components/snk-configurator/snk-configurator.js +2 -0
- package/dist/collection/components/snk-crud/snk-crud.css +50 -0
- package/dist/collection/components/snk-crud/snk-crud.js +165 -98
- 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 +15 -7
- package/dist/collection/components/snk-crud/subcomponents/snk-entity-search.css +17 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-entity-search.js +330 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +90 -8
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.css +22 -8
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +90 -205
- package/dist/collection/components/snk-crud/utils/taskbarUtils.js +144 -0
- 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-exporter/exporter-email-sender/snk-exporter-email-sender.js +1 -1
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +20 -1
- 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 +5 -1
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +28 -2
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.css +7 -1
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +22 -8
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +1 -6
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +166 -78
- 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 -4
- 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 +24 -3
- package/dist/collection/components/snk-grid/snk-grid.js +183 -22
- package/dist/collection/components/snk-grid-config/snk-grid-config.js +153 -51
- package/dist/collection/components/snk-image-input/snk-image-input.css +3 -0
- package/dist/collection/components/snk-image-input/snk-image-input.js +338 -0
- package/dist/collection/components/snk-image-input/utils/ImageUtils.js +135 -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/snk-personalized-filter.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 +35 -23
- package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.css +8 -0
- package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js +38 -2
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +54 -37
- package/dist/collection/components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button.js +27 -1
- package/dist/collection/components/snk-taskbar/processor/simple-taskbar-processor.js +55 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.css +44 -1
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +248 -132
- package/dist/collection/components/snk-taskbar/subcomponents/snk-taskbar-skeleton.css +12 -0
- package/dist/collection/components/snk-taskbar/subcomponents/snk-taskbar-skeleton.js +19 -0
- package/dist/collection/lib/configs/ConfigStorage.js +5 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.js +40 -3
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.js +24 -2
- package/dist/collection/lib/http/data-fetcher/fetchers/grid-config-fetcher.js +12 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/resource-fetcher.js +18 -0
- 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 +9 -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 +9 -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 +9 -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/ConfigStorage.js +17 -0
- package/dist/components/ContinuousInsertUtils.js +1 -1
- 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 +2831 -0
- package/dist/components/dataunit-fetcher.js +65 -5
- package/dist/components/field-config2.js +4 -2
- package/dist/components/fields-layout2.js +4 -4
- package/dist/components/form-config-fetcher.js +18 -0
- package/dist/components/guides-configurator2.js +2 -2
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +4 -0
- package/dist/components/index2.js +90 -21
- package/dist/components/snk-actions-button2.js +12 -6
- package/dist/components/snk-application2.js +22 -2
- package/dist/components/snk-attach2.js +70 -28
- package/dist/components/snk-configurator2.js +2 -0
- package/dist/components/snk-crud.js +433 -176
- 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-exporter2.js +3 -1
- package/dist/components/snk-data-unit2.js +10 -1
- package/dist/components/snk-detail-view2.js +221 -318
- package/dist/components/snk-entity-search.d.ts +11 -0
- package/dist/components/snk-entity-search.js +6 -0
- package/dist/components/snk-entity-search2.js +231 -0
- package/dist/components/snk-exporter-email-sender2.js +1 -1
- package/dist/components/snk-filter-bar2.js +116 -80
- package/dist/components/snk-filter-detail2.js +1 -1
- package/dist/components/snk-filter-item2.js +9 -3
- package/dist/components/snk-filter-modal2.js +22 -9
- 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 +79 -10
- package/dist/components/snk-grid-config2.js +109 -50
- package/dist/components/snk-grid2.js +116 -63
- 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 +316 -0
- package/dist/components/snk-layout-form-config2.js +1 -1
- package/dist/components/snk-personalized-filter2.js +1 -1
- package/dist/components/snk-pesquisa2.js +0 -1
- package/dist/components/snk-simple-crud2.js +47 -46
- package/dist/components/snk-taskbar-skeleton.d.ts +11 -0
- package/dist/components/snk-taskbar-skeleton.js +6 -0
- package/dist/components/snk-taskbar-skeleton2.js +29 -0
- package/dist/components/snk-taskbar2.js +256 -176
- package/dist/components/snk-view-representation2.js +1 -1
- package/dist/components/sortable.esm.js +76 -90
- package/dist/components/taskbar-actions-button2.js +21 -2
- package/dist/components/taskbar-split-button2.js +10 -1
- package/dist/esm/{ConfigStorage-22324b6b.js → ConfigStorage-76872695.js} +19 -2
- package/dist/esm/ContinuousInsertUtils-bce77dc1.js +39 -0
- package/dist/esm/{DataFetcher-450828a0.js → DataFetcher-e60f8d53.js} +3 -2731
- package/dist/esm/{FormConfigHelper-e89ca25c.js → FormConfigHelper-d09669f3.js} +3 -1
- package/dist/esm/{ISave-61153166.js → ISave-4929c071.js} +1 -1
- package/dist/esm/ImageUtils-efbea0e4.js +138 -0
- package/dist/esm/{PersonalizedFilterUtils-2db38ff2.js → PersonalizedFilterUtils-d2439a9a.js} +13 -0
- package/dist/esm/{SnkFormConfigManager-b5a92e12.js → SnkFormConfigManager-83f6b22f.js} +5 -5
- package/dist/esm/SnkMessageBuilder-1eb7a1af.js +2831 -0
- package/dist/esm/{SnkMultiSelectionListDataSource-d7ce2e54.js → SnkMultiSelectionListDataSource-f6cabd15.js} +55 -41
- package/dist/esm/{auth-fetcher-eef9d01e.js → auth-fetcher-1a31c1e4.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-c176e002.js} +65 -5
- 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 +6 -6
- package/dist/esm/fields-selector.entry.js +3 -3
- package/dist/esm/{form-config-fetcher-8d0a5e1c.js → form-config-fetcher-b44b2727.js} +19 -1
- package/dist/esm/guides-configurator.entry.js +3 -3
- package/dist/esm/{index-479e1293.js → index-04f73a26.js} +1521 -177
- 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 +167 -117
- 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 +62 -24
- package/dist/esm/snk-client-confirm.entry.js +1 -1
- package/dist/esm/snk-configurator.entry.js +3 -1
- package/dist/esm/snk-crud.entry.js +342 -101
- 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 +9 -7
- package/dist/esm/{snk-data-unit-99616a07.js → snk-data-unit-d8cfa950.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 +25 -18
- package/dist/esm/snk-entity-list.entry.js +1 -1
- package/dist/esm/snk-entity-search.entry.js +207 -0
- package/dist/esm/snk-exporter-email-sender.entry.js +2 -2
- package/dist/esm/snk-expression-group_2.entry.js +2 -2
- package/dist/esm/{snk-filter-advanced-mode_2.entry.js → snk-filter-advanced-mode_3.entry.js} +41 -4
- package/dist/esm/snk-filter-bar_4.entry.js +148 -95
- 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 +71 -9
- package/dist/esm/snk-form_2.entry.js +22 -11
- package/dist/esm/snk-grid.entry.js +73 -31
- package/dist/esm/{snk-guides-viewer-240de636.js → snk-guides-viewer-cc37535b.js} +79 -215
- package/dist/esm/snk-guides-viewer.entry.js +11 -18
- package/dist/esm/snk-image-input.entry.js +156 -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 +8 -7
- package/dist/esm/snk-pesquisa.entry.js +6 -6
- package/dist/esm/snk-print-selector.entry.js +1 -1
- package/dist/esm/snk-simple-crud.entry.js +28 -33
- package/dist/esm/snk-taskbar.entry.js +184 -127
- package/dist/esm/{sortable.esm-842f85a3.js → sortable.esm-bc277c12.js} +76 -90
- package/dist/esm/taskbar-elements-63651ca7.js +149 -0
- 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-0afc64df.entry.js +1 -0
- package/dist/sankhyablocks/p-10f27dc6.entry.js +1 -0
- package/dist/sankhyablocks/p-134702f6.entry.js +1 -0
- package/dist/sankhyablocks/{p-162bddae.entry.js → p-175c9576.entry.js} +1 -1
- package/dist/sankhyablocks/p-20f03230.entry.js +1 -0
- package/dist/sankhyablocks/p-26f1919e.entry.js +1 -0
- package/dist/sankhyablocks/p-2af8aca3.js +1 -0
- 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-75af335e.entry.js → p-2ebda226.entry.js} +1 -1
- package/dist/sankhyablocks/p-3072136e.js +1 -0
- package/dist/sankhyablocks/p-33492640.entry.js +1 -0
- package/dist/sankhyablocks/{p-002d4d2b.js → p-3704bf1b.js} +1 -1
- package/dist/sankhyablocks/p-3870748a.js +28 -0
- package/dist/sankhyablocks/p-3a35917e.entry.js +1 -0
- package/dist/sankhyablocks/{p-7d6f1285.js → p-3c990841.js} +2 -2
- package/dist/sankhyablocks/{p-49ddc27a.entry.js → p-438a225f.entry.js} +1 -1
- package/dist/sankhyablocks/p-4d04bc75.entry.js +1 -0
- package/dist/sankhyablocks/{p-840fb68c.js → p-4f7adf97.js} +2 -2
- package/dist/sankhyablocks/p-554c0e54.js +1 -0
- package/dist/sankhyablocks/{p-27482793.entry.js → p-5aae5c74.entry.js} +1 -1
- package/dist/sankhyablocks/p-68c1a093.js +1 -0
- package/dist/sankhyablocks/p-6ae7543b.entry.js +1 -0
- package/dist/sankhyablocks/p-6e278003.js +60 -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-771b137e.js +1 -0
- package/dist/sankhyablocks/p-77f608bc.entry.js +1 -0
- package/dist/sankhyablocks/p-82bcb4cf.entry.js +1 -0
- package/dist/sankhyablocks/p-855ccf64.entry.js +1 -0
- 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-8fe740b7.entry.js +11 -0
- package/dist/sankhyablocks/{p-96d45943.entry.js → p-90ae6c2e.entry.js} +1 -1
- package/dist/sankhyablocks/p-95af0bb1.entry.js +1 -0
- package/dist/sankhyablocks/p-95b36bd3.entry.js +1 -0
- package/dist/sankhyablocks/{p-0b9a42ad.entry.js → p-9742ea0e.entry.js} +1 -1
- package/dist/sankhyablocks/{p-2fdac5e6.entry.js → p-9e109f5e.entry.js} +1 -1
- package/dist/sankhyablocks/p-9e77e136.js +1 -0
- package/dist/sankhyablocks/p-9e7dc97d.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-a905712a.entry.js +1 -0
- package/dist/sankhyablocks/{p-92cfc028.js → p-ab5e12fa.js} +1 -1
- package/dist/sankhyablocks/{p-180716b2.entry.js → p-ae326d06.entry.js} +1 -1
- package/dist/sankhyablocks/p-af673291.js +1 -0
- package/dist/sankhyablocks/p-aff2d081.entry.js +1 -0
- package/dist/sankhyablocks/p-b0a357b4.entry.js +1 -0
- package/dist/sankhyablocks/p-b555ce38.entry.js +1 -0
- package/dist/sankhyablocks/p-bab4cde4.entry.js +1 -0
- package/dist/sankhyablocks/p-c3ec6642.js +19 -0
- package/dist/sankhyablocks/p-ca3728c0.entry.js +1 -0
- package/dist/sankhyablocks/p-cbb8e351.js +7 -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-ce8ccd72.entry.js +1 -0
- package/dist/sankhyablocks/{p-4c763b10.entry.js → p-d657f71f.entry.js} +1 -1
- package/dist/sankhyablocks/p-d9ec8c4b.entry.js +1 -0
- package/dist/sankhyablocks/p-da455c82.js +12 -0
- package/dist/sankhyablocks/p-e5a3711f.js +1 -0
- package/dist/sankhyablocks/{p-9a63f3f7.entry.js → p-e737fd5a.entry.js} +1 -1
- package/dist/sankhyablocks/p-e8df1dea.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-f1bbf065.entry.js +1 -0
- package/dist/sankhyablocks/p-f5ad0720.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-fec88660.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-actions-button/snk-actions-button.d.ts +4 -0
- package/dist/types/components/snk-application/snk-application.d.ts +1 -1
- package/dist/types/components/snk-attach/snk-attach.d.ts +22 -4
- package/dist/types/components/snk-crud/snk-crud.d.ts +33 -11
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +2 -2
- package/dist/types/components/snk-crud/subcomponents/snk-entity-search.d.ts +62 -0
- package/dist/types/components/snk-crud/subcomponents/snk-form-view.d.ts +12 -0
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +13 -25
- package/dist/types/components/snk-crud/utils/taskbarUtils.d.ts +13 -0
- package/dist/types/components/snk-custom-slot-guide/snk-custom-slot-guide.d.ts +16 -0
- package/dist/types/components/snk-data-exporter/snk-data-exporter.d.ts +4 -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 +5 -1
- package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +2 -1
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +33 -16
- 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 +30 -1
- package/dist/types/components/snk-grid-config/snk-grid-config.d.ts +11 -0
- package/dist/types/components/snk-image-input/snk-image-input.d.ts +57 -0
- package/dist/types/components/snk-image-input/utils/ImageUtils.d.ts +15 -0
- package/dist/types/components/snk-personalized-filter/interfaces/IParameter.d.ts +1 -0
- package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +0 -1
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +4 -1
- package/dist/types/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.d.ts +6 -0
- package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +29 -2
- package/dist/types/components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button.d.ts +5 -0
- package/dist/types/components/snk-taskbar/processor/simple-taskbar-processor.d.ts +31 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +32 -21
- package/dist/types/components/snk-taskbar/subcomponents/snk-taskbar-skeleton.d.ts +3 -0
- package/dist/types/components.d.ts +347 -5
- package/dist/types/lib/configs/ConfigStorage.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.d.ts +2 -1
- package/dist/types/lib/http/data-fetcher/fetchers/grid-config-fetcher.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/resource-fetcher.d.ts +1 -0
- 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 +7 -8
- package/react/components.d.ts +4 -0
- package/react/components.js +4 -0
- package/react/components.js.map +1 -1
- package/dist/cjs/snk-simple-bar.cjs.entry.js +0 -45
- package/dist/cjs/taskbar-elements-fb5d1e08.js +0 -132
- package/dist/cjs/taskbar-processor-2fba34a8.js +0 -53
- package/dist/esm/snk-simple-bar.entry.js +0 -41
- package/dist/esm/taskbar-elements-faaf5d8f.js +0 -129
- package/dist/esm/taskbar-processor-3436124c.js +0 -51
- package/dist/sankhyablocks/p-093f58fa.entry.js +0 -1
- package/dist/sankhyablocks/p-0948dc0a.entry.js +0 -11
- package/dist/sankhyablocks/p-1a0caadb.js +0 -1
- package/dist/sankhyablocks/p-1a9c5684.entry.js +0 -1
- package/dist/sankhyablocks/p-1d589380.entry.js +0 -1
- package/dist/sankhyablocks/p-21107f0d.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-51833248.js +0 -7
- 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-62aef37a.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-91a9abb6.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-c35fc941.js +0 -26
- package/dist/sankhyablocks/p-c4fcf1fb.entry.js +0 -1
- package/dist/sankhyablocks/p-c98c79c3.entry.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,37 +1,26 @@
|
|
|
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
|
-
const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
|
|
6
5
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
7
6
|
const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
|
|
8
|
-
require('./DataFetcher-991b0349.js');
|
|
9
|
-
require('./ISave-ebf6b4ed.js');
|
|
10
|
-
const index$1 = require('./index-e3e39724.js');
|
|
11
|
-
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
12
|
-
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
13
|
-
require('./dataunit-fetcher-8bf469e7.js');
|
|
14
|
-
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
15
|
-
require('./form-config-fetcher-c7af90d8.js');
|
|
16
7
|
const constants = require('./constants-6d82e405.js');
|
|
17
|
-
const SnkFormConfigManager = require('./SnkFormConfigManager-
|
|
18
|
-
const taskbarElements = require('./taskbar-elements-
|
|
19
|
-
const taskbarProcessor = require('./taskbar-processor-2fba34a8.js');
|
|
8
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-44386305.js');
|
|
9
|
+
const taskbarElements = require('./taskbar-elements-80eddec8.js');
|
|
20
10
|
|
|
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:
|
|
11
|
+
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:132px;--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;--snk-workspace--header-height:40px;display:block;outline:none}ez-guide-navigator.sc-snk-guides-viewer{--ez-guide-navigator--border-radius:var(--space--12, 12px)}snk-form-view.sc-snk-guides-viewer{width:100%}stack-item.snk-guides-viewer.sc-snk-guides-viewer{display:grid}stack-item.sc-snk-guides-viewer.sc-snk-guides-viewer{display:grid;min-height:100%}.snk-guides-viewer.sc-snk-guides-viewer{position:relative;padding:0 var(--snk-guides-viewer--space-small);padding-bottom:var(--snk-guides-viewer--space-small)}.snk-guides-viewer__detail-container.sc-snk-guides-viewer{display:flex;row-gap:24px;flex-direction:column;max-height:calc(100vh - var(--snk-guides-viewer__header--min-height));overflow-y:auto}.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-small)}.snk-guides-viewer__guide-navigator.sc-snk-guides-viewer{position:sticky;top:var(--snk-guides-viewer--space-small);height:100%}.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}";
|
|
22
12
|
|
|
23
13
|
const FORM_NAME_PREFIX = "__FORM:";
|
|
24
14
|
const SnkGuidesViewer = class {
|
|
25
15
|
constructor(hostRef) {
|
|
26
16
|
index.registerInstance(this, hostRef);
|
|
17
|
+
this.snkShowGuide = index.createEvent(this, "snkShowGuide", 7);
|
|
27
18
|
this.snkMasterFormConfigChange = index.createEvent(this, "snkMasterFormConfigChange", 7);
|
|
28
19
|
this.formConfigVisibilityChanged = index.createEvent(this, "formConfigVisibilityChanged", 7);
|
|
29
20
|
this.exit = index.createEvent(this, "exit", 7);
|
|
30
21
|
this.actionClick = index.createEvent(this, "actionClick", 7);
|
|
31
22
|
this.formItemsReady = index.createEvent(this, "formItemsReady", 7);
|
|
32
23
|
this._guideBuilders = new Map();
|
|
33
|
-
this.CUSTOM_GUIDE_ID_PREFIX = "CUSTOM_GUIDE_";
|
|
34
|
-
this.CUSTOM_GUIDE_DATA_CUSTOM_ID = "CUSTOM_GUIDE";
|
|
35
24
|
this.dataUnit = undefined;
|
|
36
25
|
this.dataState = undefined;
|
|
37
26
|
this.configName = undefined;
|
|
@@ -65,8 +54,12 @@ const SnkGuidesViewer = class {
|
|
|
65
54
|
observeDataUnit() {
|
|
66
55
|
this.loadGuides(true);
|
|
67
56
|
}
|
|
68
|
-
observeFormConfigManager(value) {
|
|
69
|
-
|
|
57
|
+
async observeFormConfigManager(value) {
|
|
58
|
+
const showFormConfig = !!value;
|
|
59
|
+
await this._viewStack.show(showFormConfig ?
|
|
60
|
+
GUIDES_VIEWER_VIEW_MODE.CONFIG :
|
|
61
|
+
GUIDES_VIEWER_VIEW_MODE.GUIDES);
|
|
62
|
+
this.formConfigVisibilityChanged.emit(showFormConfig);
|
|
70
63
|
}
|
|
71
64
|
observeDataState(newValue, oldValue) {
|
|
72
65
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -116,7 +109,8 @@ const SnkGuidesViewer = class {
|
|
|
116
109
|
* Atribui o foco para o componente.
|
|
117
110
|
*/
|
|
118
111
|
async setFocus() {
|
|
119
|
-
|
|
112
|
+
var _a;
|
|
113
|
+
(_a = this._container) === null || _a === void 0 ? void 0 : _a.focus({ preventScroll: true });
|
|
120
114
|
}
|
|
121
115
|
/**
|
|
122
116
|
* Recarrega os guias baseada nos metadados atuais.
|
|
@@ -177,6 +171,13 @@ const SnkGuidesViewer = class {
|
|
|
177
171
|
item.tooltip = this.getMessage("snkCrud.detail.tooltip.needSingleSelection");
|
|
178
172
|
item.disabled = true;
|
|
179
173
|
}
|
|
174
|
+
if (sheet.isCustom && sheet.ctxProps) {
|
|
175
|
+
Object.entries(sheet.ctxProps).forEach(([key, value]) => {
|
|
176
|
+
if (value !== undefined) {
|
|
177
|
+
item[key] = value;
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
}
|
|
180
181
|
guides.push(item);
|
|
181
182
|
});
|
|
182
183
|
this._guides = guides;
|
|
@@ -212,63 +213,6 @@ const SnkGuidesViewer = class {
|
|
|
212
213
|
});
|
|
213
214
|
}
|
|
214
215
|
}
|
|
215
|
-
getTaskBarId() {
|
|
216
|
-
var _a;
|
|
217
|
-
if ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) {
|
|
218
|
-
return TASKBAR_ID.FINISH_EDITION;
|
|
219
|
-
}
|
|
220
|
-
if (this.dataUnit.isMultipleEdition) {
|
|
221
|
-
return TASKBAR_ID.MUTIPLE_EDITION;
|
|
222
|
-
}
|
|
223
|
-
return TASKBAR_ID.REGULAR;
|
|
224
|
-
}
|
|
225
|
-
loadTaskbarProcessor() {
|
|
226
|
-
const taskbarIDs = {};
|
|
227
|
-
taskbarIDs[TASKBAR_ID.REGULAR] = this.buildBtnsRegularMode();
|
|
228
|
-
taskbarIDs[TASKBAR_ID.FINISH_EDITION] = [taskbarElements.TaskbarElement.CANCEL, taskbarElements.TaskbarElement.SAVE, this.handleAddGridMode()];
|
|
229
|
-
taskbarIDs[TASKBAR_ID.MUTIPLE_EDITION] = [taskbarElements.TaskbarElement.CANCEL];
|
|
230
|
-
this._taskbarProcessor = new taskbarProcessor.TaskbarProcessor(taskbarIDs);
|
|
231
|
-
this._taskbarProcessor.process(this.getTaskBarId(), this.taskbarManager, this.dataState, this.buildDisabledButtons(), this.buildInvisibleButtons());
|
|
232
|
-
}
|
|
233
|
-
buildBtnsRegularMode() {
|
|
234
|
-
var _a, _b;
|
|
235
|
-
const btnsRegularMode = [
|
|
236
|
-
taskbarElements.TaskbarElement.ATTACH, taskbarElements.TaskbarElement.CLONE, taskbarElements.TaskbarElement.REMOVE, taskbarElements.TaskbarElement.MORE_OPTIONS,
|
|
237
|
-
taskbarElements.TaskbarElement.ACTIONS_BUTTON, taskbarElements.TaskbarElement.DIVIDER, taskbarElements.TaskbarElement.GRID_MODE, taskbarElements.TaskbarElement.CONFIGURATOR,
|
|
238
|
-
];
|
|
239
|
-
if (((_b = (_a = this.dataState) === null || _a === void 0 ? void 0 : _a.selectionInfo) === null || _b === void 0 ? void 0 : _b.length) <= 1) {
|
|
240
|
-
btnsRegularMode.unshift(taskbarElements.TaskbarElement.PREVIOUS, taskbarElements.TaskbarElement.NEXT, taskbarElements.TaskbarElement.DIVIDER);
|
|
241
|
-
}
|
|
242
|
-
if (this.presentationMode == index$1.PresentationMode.SECONDARY) {
|
|
243
|
-
btnsRegularMode.unshift(taskbarElements.TaskbarElement.INSERT);
|
|
244
|
-
}
|
|
245
|
-
else {
|
|
246
|
-
btnsRegularMode.push(taskbarElements.TaskbarElement.INSERT);
|
|
247
|
-
}
|
|
248
|
-
return btnsRegularMode;
|
|
249
|
-
}
|
|
250
|
-
buildDisabledButtons() {
|
|
251
|
-
var _a, _b, _c, _d, _e, _f;
|
|
252
|
-
const disabledButtons = [];
|
|
253
|
-
if (!((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.hasPrevious))
|
|
254
|
-
disabledButtons.push(taskbarElements.TaskbarElement.PREVIOUS);
|
|
255
|
-
if (!((_b = this.dataState) === null || _b === void 0 ? void 0 : _b.hasNext))
|
|
256
|
-
disabledButtons.push(taskbarElements.TaskbarElement.NEXT);
|
|
257
|
-
if (((_d = (_c = this.dataState) === null || _c === void 0 ? void 0 : _c.selectionInfo) === null || _d === void 0 ? void 0 : _d.length) > 1)
|
|
258
|
-
disabledButtons.push(taskbarElements.TaskbarElement.CLONE);
|
|
259
|
-
if ((_f = (_e = this.dataState) === null || _e === void 0 ? void 0 : _e.selectionInfo) === null || _f === void 0 ? void 0 : _f.isAllRecords())
|
|
260
|
-
disabledButtons.push(taskbarElements.TaskbarElement.REMOVE);
|
|
261
|
-
return disabledButtons;
|
|
262
|
-
}
|
|
263
|
-
handleAddGridMode() {
|
|
264
|
-
return this.enableGridInsert ? taskbarElements.TaskbarElement.GRID_MODE : "";
|
|
265
|
-
}
|
|
266
|
-
buildInvisibleButtons() {
|
|
267
|
-
const invisibleButtons = [];
|
|
268
|
-
if (this.dataState && this.dataState.selectionInfo.mode === DataUnit.SelectionMode.ALL_RECORDS)
|
|
269
|
-
invisibleButtons.push(taskbarElements.TaskbarElement.ACTIONS_BUTTON);
|
|
270
|
-
return invisibleButtons;
|
|
271
|
-
}
|
|
272
216
|
static updateContentCard(formName, cardConfig, propertyChanged, configManager) {
|
|
273
217
|
return configManager.saveCardState(formName, cardConfig, propertyChanged);
|
|
274
218
|
}
|
|
@@ -291,7 +235,7 @@ const SnkGuidesViewer = class {
|
|
|
291
235
|
if (sheet == undefined) {
|
|
292
236
|
return;
|
|
293
237
|
}
|
|
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 });
|
|
238
|
+
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
239
|
})));
|
|
296
240
|
}
|
|
297
241
|
wrapDetail(levels, content) {
|
|
@@ -313,11 +257,13 @@ const SnkGuidesViewer = class {
|
|
|
313
257
|
}
|
|
314
258
|
getContent() {
|
|
315
259
|
if (!this.selectedGuide) {
|
|
260
|
+
this.snkShowGuide.emit(undefined);
|
|
316
261
|
return;
|
|
317
262
|
}
|
|
318
263
|
const guideId = this.selectedGuide.id;
|
|
264
|
+
this.snkShowGuide.emit(guideId);
|
|
319
265
|
if (this.isCustomGuide(guideId)) {
|
|
320
|
-
return index.h("
|
|
266
|
+
return index.h("slot", { name: guideId });
|
|
321
267
|
}
|
|
322
268
|
const levels = guideId.split("::");
|
|
323
269
|
const currentLevel = levels.pop();
|
|
@@ -328,16 +274,13 @@ const SnkGuidesViewer = class {
|
|
|
328
274
|
}
|
|
329
275
|
return this.buildFormViewGuideContent(guideId);
|
|
330
276
|
}
|
|
331
|
-
buildCustomGuideContainerId(guideId) {
|
|
332
|
-
return `${this.CUSTOM_GUIDE_ID_PREFIX}${guideId}`;
|
|
333
|
-
}
|
|
334
277
|
buildFormViewGuideContent(cardId) {
|
|
335
278
|
var _a, _b, _c, _d;
|
|
336
279
|
const sheet = this._masterFormMetadata.getSheet(cardId);
|
|
337
280
|
if (!sheet)
|
|
338
281
|
return;
|
|
339
282
|
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
|
|
283
|
+
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 }));
|
|
341
284
|
}
|
|
342
285
|
isDetailGuide(childEntityName, levels) {
|
|
343
286
|
return childEntityName || levels.length > 0;
|
|
@@ -360,26 +303,6 @@ const SnkGuidesViewer = class {
|
|
|
360
303
|
var _a;
|
|
361
304
|
return (_a = this.customGuidesConfig) === null || _a === void 0 ? void 0 : _a.map(g => g.id).includes(guideId);
|
|
362
305
|
}
|
|
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
|
-
onBreadcrumbClickHandler(item) {
|
|
378
|
-
if ((item === null || item === void 0 ? void 0 : item.id) == undefined) {
|
|
379
|
-
return;
|
|
380
|
-
}
|
|
381
|
-
this._guideNavigator.selectGuide(item.id);
|
|
382
|
-
}
|
|
383
306
|
updateSelectedGuideHandler(currentItem) {
|
|
384
307
|
this._guideHasChanged = this.selectedGuide != currentItem;
|
|
385
308
|
this.selectedGuide = currentItem;
|
|
@@ -388,15 +311,13 @@ const SnkGuidesViewer = class {
|
|
|
388
311
|
});
|
|
389
312
|
this.resetGuideBadge(currentItem);
|
|
390
313
|
}
|
|
391
|
-
changeGuideHandler(guideName) {
|
|
392
|
-
var _a;
|
|
393
|
-
(_a = this._guideNavigator) === null || _a === void 0 ? void 0 : _a.selectGuide(guideName);
|
|
394
|
-
}
|
|
395
314
|
clearFieldToFocusHandler() {
|
|
396
315
|
this._fieldToGetFocus = undefined;
|
|
397
316
|
}
|
|
398
317
|
resetGuideBadge(selectedGuide) {
|
|
399
318
|
var _a;
|
|
319
|
+
if (!selectedGuide)
|
|
320
|
+
return;
|
|
400
321
|
this._guides = [...(_a = this._guides) === null || _a === void 0 ? void 0 : _a.map(guide => {
|
|
401
322
|
if (this.canClearGuideBadge(guide, selectedGuide.id)) {
|
|
402
323
|
return Object.assign(Object.assign({}, guide), { badge: null });
|
|
@@ -455,85 +376,13 @@ const SnkGuidesViewer = class {
|
|
|
455
376
|
this.addFormLegacyConfigName();
|
|
456
377
|
this._configManager.loadConfig();
|
|
457
378
|
}
|
|
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
379
|
componentDidRender() {
|
|
477
|
-
var _a;
|
|
478
|
-
if (this.isCustomGuide((_a = this.selectedGuide) === null || _a === void 0 ? void 0 : _a.id)) {
|
|
479
|
-
this.attachCustomGuideInView();
|
|
480
|
-
}
|
|
481
380
|
if (!this._guideHasChanged) {
|
|
482
381
|
return;
|
|
483
382
|
}
|
|
484
|
-
|
|
485
|
-
this._currentDetail.showUp();
|
|
486
|
-
}
|
|
487
|
-
else {
|
|
488
|
-
if (this._mainForm) {
|
|
489
|
-
this._mainForm.showUp();
|
|
490
|
-
}
|
|
491
|
-
}
|
|
383
|
+
window.scrollTo(0, 0);
|
|
492
384
|
this._guideHasChanged = false;
|
|
493
385
|
}
|
|
494
|
-
getFieldsSearch(item) {
|
|
495
|
-
if (this._fieldSearch == undefined || this._hasToCreateFieldSearch) {
|
|
496
|
-
this._hasToCreateFieldSearch = false;
|
|
497
|
-
this._fieldSearch = utils.buildFieldSearch(item, ({ argument }) => this.fieldsOptionLoader(argument), (option) => this.onSelectField(option));
|
|
498
|
-
}
|
|
499
|
-
return this._fieldSearch;
|
|
500
|
-
}
|
|
501
|
-
fieldsOptionLoader(argument) {
|
|
502
|
-
return Promise.resolve(this._configManager.getFieldsList(argument)
|
|
503
|
-
.map(field => ({ value: field.name, label: field.label })));
|
|
504
|
-
}
|
|
505
|
-
onSelectField(option) {
|
|
506
|
-
if (option == undefined) {
|
|
507
|
-
return;
|
|
508
|
-
}
|
|
509
|
-
this._fieldToGetFocus = option.value;
|
|
510
|
-
const fieldGuideName = this.getGuideName(option.value);
|
|
511
|
-
if (fieldGuideName !== this.selectedGuide.id) {
|
|
512
|
-
this.changeGuideHandler(fieldGuideName);
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
getActionsList() {
|
|
516
|
-
var _a;
|
|
517
|
-
const hardList = [];
|
|
518
|
-
if (this.taskbarManager != undefined && this.taskbarManager.getMoreOptions != undefined) {
|
|
519
|
-
return hardList.concat((_a = this.taskbarManager.getMoreOptions(this.getTaskBarId(), this.configName, this.dataState, this.actionsList)) !== null && _a !== void 0 ? _a : []);
|
|
520
|
-
}
|
|
521
|
-
return hardList.concat(this.actionsList);
|
|
522
|
-
}
|
|
523
|
-
getSettingsListForm() {
|
|
524
|
-
const hardList = [{
|
|
525
|
-
value: core.StringUtils.generateUUID(),
|
|
526
|
-
label: this.getMessage("snkCrud.findColumn"),
|
|
527
|
-
disableCloseOnSelect: true,
|
|
528
|
-
eagerInitialize: true,
|
|
529
|
-
itemBuilder: (_, item) => this.getFieldsSearch(item)
|
|
530
|
-
}];
|
|
531
|
-
return hardList;
|
|
532
|
-
}
|
|
533
|
-
buildTaskBar() {
|
|
534
|
-
var _a;
|
|
535
|
-
return index.h("div", { class: `snk-guides-viewer__header-taskbar ${this.presentationMode != index$1.PresentationMode.SECONDARY ? 'ez-align--right' : 'ez-padding-bottom--medium'}` }, index.h("snk-taskbar", { key: "guideViewerTaskbar", "data-element-id": "guideViewer", configName: this.configName, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, actionsList: this.getActionsList(), actionsSettingsList: this.getSettingsListForm(), messagesBuilder: this.messagesBuilder, presentationMode: this.presentationMode, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? taskbarElements.TaskbarElement.SAVE : taskbarElements.TaskbarElement.INSERT, "data-taskbar-owner": "master", dataUnit: this.dataUnit, resourceID: this.resourceID, customSlotId: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS", additionalSlotId: "GUIDES_VIEWER_DYNAMIC_SEARCH", alignRigth: true }, index.h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "GUIDES_VIEWER_DYNAMIC_SEARCH" })));
|
|
536
|
-
}
|
|
537
386
|
async dataUnitActionHandler(action) {
|
|
538
387
|
var _a;
|
|
539
388
|
switch (action.type) {
|
|
@@ -588,30 +437,42 @@ const SnkGuidesViewer = class {
|
|
|
588
437
|
}
|
|
589
438
|
return "";
|
|
590
439
|
}
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
return (_b = (_a = this.getCustomTitle) === null || _a === void 0 ? void 0 : _a.call(this)) !== null && _b !== void 0 ? _b : this.getMessage("snkCrud.title");
|
|
594
|
-
}
|
|
595
|
-
getTitleTooltip() {
|
|
596
|
-
if (!this.dataUnit.isMultipleEdition)
|
|
597
|
-
return;
|
|
598
|
-
return this.buildRecordIdsArray();
|
|
440
|
+
getCustomGuidesConfig() {
|
|
441
|
+
return this._currentDetail ? [] : this.customGuidesConfig;
|
|
599
442
|
}
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
443
|
+
getFieldsSearch() {
|
|
444
|
+
if (this._fieldSearch == undefined || this._hasToCreateFieldSearch) {
|
|
445
|
+
this._hasToCreateFieldSearch = false;
|
|
446
|
+
const item = {
|
|
447
|
+
label: this.getMessage("snkSimpleCrud.findFields"),
|
|
448
|
+
value: "findFields",
|
|
449
|
+
};
|
|
450
|
+
this._fieldSearch = utils.buildFieldSearch(item, ({ argument }) => this.fieldsOptionLoader(argument), (option) => this.onSelectField(option));
|
|
605
451
|
}
|
|
606
|
-
|
|
607
|
-
return `[${labels.join(", ")}]`;
|
|
452
|
+
return this._fieldSearch;
|
|
608
453
|
}
|
|
609
|
-
|
|
610
|
-
return
|
|
454
|
+
fieldsOptionLoader(argument) {
|
|
455
|
+
return Promise.resolve(this._configManager.getFieldsList(argument)
|
|
456
|
+
.map(field => ({ value: field.name, label: field.label })));
|
|
457
|
+
}
|
|
458
|
+
changeGuideHandler(guideName) {
|
|
459
|
+
var _a;
|
|
460
|
+
(_a = this._guideNavigator) === null || _a === void 0 ? void 0 : _a.selectGuide(guideName);
|
|
461
|
+
}
|
|
462
|
+
onSelectField(option) {
|
|
463
|
+
if (option == undefined) {
|
|
464
|
+
return;
|
|
465
|
+
}
|
|
466
|
+
this._fieldToGetFocus = option.value;
|
|
467
|
+
const fieldGuideName = this.getGuideName(option.value);
|
|
468
|
+
if (fieldGuideName !== this.selectedGuide.id) {
|
|
469
|
+
this.changeGuideHandler(fieldGuideName);
|
|
470
|
+
}
|
|
611
471
|
}
|
|
612
472
|
componentDidLoad() {
|
|
613
473
|
this.dataUnit.subscribe(this.dataUnitActionHandler.bind(this));
|
|
614
474
|
this.initKeyboardManager();
|
|
475
|
+
this.getFieldsSearch();
|
|
615
476
|
}
|
|
616
477
|
disconnectedCallback() {
|
|
617
478
|
var _a;
|
|
@@ -625,31 +486,35 @@ const SnkGuidesViewer = class {
|
|
|
625
486
|
await this._mainForm.showSearchField();
|
|
626
487
|
}, { description: this.getMessage("snkSimpleCrud.findFields"), element: this._element });
|
|
627
488
|
}
|
|
628
|
-
|
|
629
|
-
var _a, _b;
|
|
489
|
+
renderFormConfig() {
|
|
630
490
|
if (this._formEditorConfigManager != undefined) {
|
|
631
491
|
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
492
|
}
|
|
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 &&
|
|
639
|
-
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 ?
|
|
493
|
+
}
|
|
494
|
+
renderGuidesNavigator(showGuides) {
|
|
495
|
+
var _a;
|
|
496
|
+
return (index.h("section", { class: "snk-guides-viewer", ref: ref => this._container = ref, tabIndex: -1 }, index.h("div", { class: "snk-guides-viewer__container" }, showGuides ?
|
|
640
497
|
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
498
|
:
|
|
642
499
|
index.h("div", null), index.h("div", { class: "snk-guides-viewer__detail-container" }, SnkGuidesViewer.buildFixedForms({
|
|
643
500
|
formConfig: this.masterFormConfig,
|
|
644
501
|
formMetadata: this._masterFormMetadata,
|
|
645
|
-
selectedForm: (
|
|
502
|
+
selectedForm: (_a = this.selectedGuide) === null || _a === void 0 ? void 0 : _a.id,
|
|
646
503
|
dataUnit: this.dataUnit,
|
|
647
504
|
recordsValidator: this.recordsValidator,
|
|
648
505
|
fieldToFocus: this._fieldToGetFocus,
|
|
649
506
|
onRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this),
|
|
650
507
|
propsCustomEditor: this._customEditors,
|
|
651
|
-
fieldsProps: this._fieldsProps
|
|
652
|
-
|
|
508
|
+
fieldsProps: this._fieldsProps,
|
|
509
|
+
entityPath: this.entityPath
|
|
510
|
+
}), 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 })));
|
|
511
|
+
}
|
|
512
|
+
render() {
|
|
513
|
+
if (!this.dataUnit || !this._configManager.isLoaded) {
|
|
514
|
+
return;
|
|
515
|
+
}
|
|
516
|
+
const showGuides = this._guides && (this._guides.length > 1);
|
|
517
|
+
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
518
|
}
|
|
654
519
|
get _element() { return index.getElement(this); }
|
|
655
520
|
static get watchers() { return {
|
|
@@ -659,12 +524,11 @@ const SnkGuidesViewer = class {
|
|
|
659
524
|
"masterFormConfig": ["observeMasterFormConfig"]
|
|
660
525
|
}; }
|
|
661
526
|
};
|
|
662
|
-
var
|
|
663
|
-
(function (
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
})(TASKBAR_ID || (TASKBAR_ID = {}));
|
|
527
|
+
var GUIDES_VIEWER_VIEW_MODE;
|
|
528
|
+
(function (GUIDES_VIEWER_VIEW_MODE) {
|
|
529
|
+
GUIDES_VIEWER_VIEW_MODE[GUIDES_VIEWER_VIEW_MODE["GUIDES"] = 0] = "GUIDES";
|
|
530
|
+
GUIDES_VIEWER_VIEW_MODE[GUIDES_VIEWER_VIEW_MODE["CONFIG"] = 1] = "CONFIG";
|
|
531
|
+
})(GUIDES_VIEWER_VIEW_MODE || (GUIDES_VIEWER_VIEW_MODE = {}));
|
|
668
532
|
SnkGuidesViewer.style = snkGuidesViewerCss;
|
|
669
533
|
|
|
670
534
|
exports.SnkGuidesViewer = SnkGuidesViewer;
|
|
@@ -2,30 +2,23 @@
|
|
|
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-b4ca3437.js');
|
|
6
|
+
require('./index-1894343a.js');
|
|
7
7
|
require('@sankhyalabs/core');
|
|
8
|
-
require('@sankhyalabs/core/dist/dataunit/DataUnit');
|
|
9
8
|
require('@sankhyalabs/ezui/dist/collection/utils');
|
|
10
9
|
require('@sankhyalabs/ezui/dist/collection/utils/form');
|
|
11
|
-
require('./
|
|
10
|
+
require('./constants-6d82e405.js');
|
|
11
|
+
require('./SnkFormConfigManager-44386305.js');
|
|
12
|
+
require('./ConfigStorage-a1fab5ca.js');
|
|
13
|
+
require('./form-config-fetcher-45d1964c.js');
|
|
14
|
+
require('./DataFetcher-384d2ce8.js');
|
|
12
15
|
require('./PrintUtils-bcaeb82f.js');
|
|
16
|
+
require('./SnkMessageBuilder-a9300ebe.js');
|
|
13
17
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
14
|
-
require('./ISave-ebf6b4ed.js');
|
|
15
|
-
require('./index-e3e39724.js');
|
|
16
|
-
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
17
|
-
require('./dataunit-fetcher-8bf469e7.js');
|
|
18
|
-
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
19
|
-
require('@sankhyalabs/core/dist/utils/SortingUtils');
|
|
20
|
-
require('./ResourceIDUtils-5ff86aa7.js');
|
|
21
18
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
22
|
-
require('./
|
|
23
|
-
require('./
|
|
24
|
-
require('./
|
|
25
|
-
require('./ConfigStorage-72f34bd4.js');
|
|
26
|
-
require('./taskbar-elements-fb5d1e08.js');
|
|
27
|
-
require('./index-13d05f03.js');
|
|
28
|
-
require('./taskbar-processor-2fba34a8.js');
|
|
19
|
+
require('./taskbar-elements-80eddec8.js');
|
|
20
|
+
require('./index-e3e39724.js');
|
|
21
|
+
require('./index-f0fe7e6e.js');
|
|
29
22
|
|
|
30
23
|
|
|
31
24
|
|
|
@@ -0,0 +1,160 @@
|
|
|
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-a9300ebe.js');
|
|
8
|
+
const ImageUtils = require('./ImageUtils-d6139911.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
|
+
if (action.type === core.Action.EDITION_CANCELED) {
|
|
33
|
+
await this.loadImage();
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
this.dataUnit = undefined;
|
|
38
|
+
this.fieldName = undefined;
|
|
39
|
+
this.entityName = undefined;
|
|
40
|
+
this.enabled = true;
|
|
41
|
+
this.acceptType = undefined;
|
|
42
|
+
this.maxSize = undefined;
|
|
43
|
+
this.label = undefined;
|
|
44
|
+
this.imageValue = undefined;
|
|
45
|
+
this.loading = true;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Força o reload da imagem
|
|
49
|
+
*/
|
|
50
|
+
async reloadImage(pks) {
|
|
51
|
+
await this.loadImage(pks);
|
|
52
|
+
}
|
|
53
|
+
getMessage(key, params) {
|
|
54
|
+
if (!this.messagesBuilder) {
|
|
55
|
+
this.messagesBuilder = new SnkMessageBuilder.SnkMessageBuilder();
|
|
56
|
+
}
|
|
57
|
+
return this.messagesBuilder.getMessage(key, params);
|
|
58
|
+
}
|
|
59
|
+
async clearImage() {
|
|
60
|
+
var _a;
|
|
61
|
+
(_a = this._loadAbortController) === null || _a === void 0 ? void 0 : _a.abort();
|
|
62
|
+
this.imageValue = undefined;
|
|
63
|
+
}
|
|
64
|
+
async handleImageChange(event) {
|
|
65
|
+
const base64 = event.detail;
|
|
66
|
+
if (!base64) {
|
|
67
|
+
await this.clearImage();
|
|
68
|
+
await this.updatedataUnitField(true);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
const blob = await ImageUtils.base64ToBlob(base64);
|
|
72
|
+
if (this.maxSize && blob.size > this.maxSize * 1024) {
|
|
73
|
+
const errorMsg = this.getMessage('snkImageInput.errorImageSize') + this.maxSize + '(KB)';
|
|
74
|
+
this.imageError.emit(errorMsg);
|
|
75
|
+
if (this.application) {
|
|
76
|
+
await this.application.error(this.getMessage('snkImageInput.errorTitle'), errorMsg);
|
|
77
|
+
}
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
this.imageValue = base64;
|
|
81
|
+
await ImageUtils.sessionFileUpload(blob, this.entityName, this.fieldName);
|
|
82
|
+
await this.updatedataUnitField();
|
|
83
|
+
}
|
|
84
|
+
async updatedataUnitField(deleted = false) {
|
|
85
|
+
if (!this.dataUnit || !this.dataUnit.getSelectedRecord()) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
if (deleted) {
|
|
89
|
+
await this.dataUnit.setFieldValue(this.fieldName, 'deletado');
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
await this.dataUnit.setFieldValue(this.fieldName, `$file.session.key{${ImageUtils.buildFileKey(this.entityName, this.fieldName)}}`);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
async handleImageError(event) {
|
|
96
|
+
this.imageError.emit(event.detail);
|
|
97
|
+
if (this.application) {
|
|
98
|
+
await this.application.error(this.getMessage('snkImageInput.errorTitle'), event.detail);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
getPksFromDataUnit() {
|
|
102
|
+
if (!this.dataUnit) {
|
|
103
|
+
return undefined;
|
|
104
|
+
}
|
|
105
|
+
const selectedRecord = this.dataUnit.getSelectedRecord();
|
|
106
|
+
if (!selectedRecord) {
|
|
107
|
+
return undefined;
|
|
108
|
+
}
|
|
109
|
+
const fieldValue = selectedRecord[this.fieldName];
|
|
110
|
+
if (!fieldValue) {
|
|
111
|
+
return undefined;
|
|
112
|
+
}
|
|
113
|
+
try {
|
|
114
|
+
const pk = JSON.parse(fieldValue);
|
|
115
|
+
return pk;
|
|
116
|
+
}
|
|
117
|
+
catch (error) {
|
|
118
|
+
console.error('Error parsing PK from data unit field:', error);
|
|
119
|
+
return undefined;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
async loadImage(pks) {
|
|
123
|
+
var _a, _b;
|
|
124
|
+
(_a = this._loadAbortController) === null || _a === void 0 ? void 0 : _a.abort();
|
|
125
|
+
const controller = new AbortController();
|
|
126
|
+
this._loadAbortController = controller;
|
|
127
|
+
this.loading = true;
|
|
128
|
+
if (this.dataUnit && this.entityName) {
|
|
129
|
+
pks = (_b = pks !== null && pks !== void 0 ? pks : this.getPksFromDataUnit()) !== null && _b !== void 0 ? _b : ImageUtils.getPKs(this.dataUnit);
|
|
130
|
+
const image = await ImageUtils.downloadImage(pks, this.fieldName, this.entityName, controller.signal);
|
|
131
|
+
if (controller.signal.aborted)
|
|
132
|
+
return;
|
|
133
|
+
this.imageValue = image;
|
|
134
|
+
}
|
|
135
|
+
this.loading = false;
|
|
136
|
+
}
|
|
137
|
+
async componentWillLoad() {
|
|
138
|
+
this.application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
139
|
+
if (!this.messagesBuilder) {
|
|
140
|
+
this.messagesBuilder = new SnkMessageBuilder.SnkMessageBuilder();
|
|
141
|
+
}
|
|
142
|
+
if (this.dataUnit) {
|
|
143
|
+
this.dataUnit.subscribe(this.dataUnitObserver);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
disconnectedCallback() {
|
|
147
|
+
if (this.dataUnit) {
|
|
148
|
+
this.dataUnit.unsubscribe(this.dataUnitObserver);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
async componentDidLoad() {
|
|
152
|
+
await this.loadImage();
|
|
153
|
+
}
|
|
154
|
+
render() {
|
|
155
|
+
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 })));
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
SnkImageInput.style = snkImageInputCss;
|
|
159
|
+
|
|
160
|
+
exports.snk_image_input = SnkImageInput;
|