@sankhyalabs/sankhyablocks 10.1.0-dev.5 → 10.1.0-dev.50
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 +19 -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 +67 -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 +5 -5
- 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 +174 -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 +213 -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 +107 -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 +17 -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 +64 -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-7ad91135.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-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-c0d6a821.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-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 +1 -1
- 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 +29 -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
|
@@ -2,103 +2,280 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index$1 = require('./index-1894343a.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
|
-
require('./DataFetcher-
|
|
8
|
-
require('./ISave-
|
|
9
|
-
const index
|
|
7
|
+
require('./DataFetcher-384d2ce8.js');
|
|
8
|
+
require('./ISave-ecbe9336.js');
|
|
9
|
+
const index = require('./index-e3e39724.js');
|
|
10
10
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
11
11
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
12
|
-
require('./dataunit-fetcher-
|
|
12
|
+
require('./dataunit-fetcher-b9822794.js');
|
|
13
13
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
14
|
-
require('./form-config-fetcher-
|
|
14
|
+
require('./form-config-fetcher-45d1964c.js');
|
|
15
15
|
const constants = require('./constants-6d82e405.js');
|
|
16
|
-
const authFetcher = require('./auth-fetcher-
|
|
16
|
+
const authFetcher = require('./auth-fetcher-6b134ec4.js');
|
|
17
17
|
const ServicesNumberingConfig = require('./ServicesNumberingConfig-69038a0f.js');
|
|
18
|
-
const taskbarElements = require('./taskbar-elements-
|
|
18
|
+
const taskbarElements = require('./taskbar-elements-80eddec8.js');
|
|
19
|
+
const filterValidate = require('./filter-validate-cb4ed41a.js');
|
|
20
|
+
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
21
|
+
const ContinuousInsertUtils = require('./ContinuousInsertUtils-1ae0c6ac.js');
|
|
19
22
|
require('./PrintUtils-bcaeb82f.js');
|
|
23
|
+
require('./SnkMessageBuilder-a9300ebe.js');
|
|
20
24
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
21
25
|
require('@sankhyalabs/core/dist/utils/SortingUtils');
|
|
22
26
|
require('./ResourceIDUtils-5ff86aa7.js');
|
|
23
|
-
require('./index-
|
|
27
|
+
require('./index-f0fe7e6e.js');
|
|
24
28
|
|
|
25
|
-
|
|
29
|
+
class SimpleTaskbarProcessor {
|
|
30
|
+
/**
|
|
31
|
+
* Cria uma nova instância do processador de taskbar.
|
|
32
|
+
* @param defaultButtons - Array com os botões padrão a serem exibidos
|
|
33
|
+
*/
|
|
34
|
+
constructor(defaultButtons) {
|
|
35
|
+
this._defaultButtons = [];
|
|
36
|
+
this._defaultButtons = [...defaultButtons];
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Processa a taskbar aplicando regras de visibilidade e habilitação.
|
|
40
|
+
* @param taskbarID - Identificador único da taskbar
|
|
41
|
+
* @param taskbarManager - Gerenciador de taskbar com regras customizadas
|
|
42
|
+
* @param dataState - Estado atual dos dados
|
|
43
|
+
* @param disabledButtons - Array de botões desabilitados
|
|
44
|
+
* @param invisibleButtons - Array de botões invisíveis
|
|
45
|
+
*/
|
|
46
|
+
process(taskbarID, taskbarManager, dataState, disabledButtons = [], invisibleButtons = []) {
|
|
47
|
+
var _a;
|
|
48
|
+
this.taskbarID = taskbarID;
|
|
49
|
+
this.customButtons = new Map();
|
|
50
|
+
this.buttonsArray = [];
|
|
51
|
+
this.disabledButtons = [...disabledButtons];
|
|
52
|
+
(_a = this.getButtonsArray(taskbarManager, dataState)) === null || _a === void 0 ? void 0 : _a.forEach((btnDef) => {
|
|
53
|
+
let buttonName;
|
|
54
|
+
if (typeof btnDef === "string") {
|
|
55
|
+
buttonName = btnDef;
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
this.customButtons.set(btnDef.name, btnDef);
|
|
59
|
+
buttonName = btnDef.name;
|
|
60
|
+
}
|
|
61
|
+
if (!invisibleButtons.includes(buttonName)) {
|
|
62
|
+
if (!this.isEnabled(taskbarManager, buttonName, dataState, disabledButtons)) {
|
|
63
|
+
this.disabledButtons.push(buttonName);
|
|
64
|
+
}
|
|
65
|
+
this.buttonsArray.push(buttonName);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
this.buttons = this.buttonsArray.join(",");
|
|
69
|
+
}
|
|
70
|
+
getButtonsArray(taskbarManager, dataState) {
|
|
71
|
+
if (taskbarManager) {
|
|
72
|
+
return taskbarManager.getButtons(this.taskbarID, dataState, [...this._defaultButtons]);
|
|
73
|
+
}
|
|
74
|
+
return this._defaultButtons;
|
|
75
|
+
}
|
|
76
|
+
isEnabled(taskbarManager, buttonName, dataState, disabled) {
|
|
77
|
+
const originalValue = !disabled.includes(buttonName);
|
|
78
|
+
if (taskbarManager && taskbarManager.isEnabled) {
|
|
79
|
+
return taskbarManager.isEnabled(this.taskbarID, dataState, buttonName, originalValue);
|
|
80
|
+
}
|
|
81
|
+
return originalValue;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
26
84
|
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
85
|
+
const DEFAULT_TASKBAR_BUTTONS = [
|
|
86
|
+
taskbarElements.TaskbarElement.FORM_MODE,
|
|
87
|
+
taskbarElements.TaskbarElement.PREVIOUS,
|
|
88
|
+
taskbarElements.TaskbarElement.NEXT,
|
|
89
|
+
taskbarElements.TaskbarElement.REFRESH,
|
|
90
|
+
taskbarElements.TaskbarElement.SPACER,
|
|
91
|
+
taskbarElements.TaskbarElement.ACTIONS_BUTTON,
|
|
92
|
+
taskbarElements.TaskbarElement.DATA_EXPORTER,
|
|
93
|
+
taskbarElements.TaskbarElement.ATTACH,
|
|
94
|
+
taskbarElements.TaskbarElement.CLONE,
|
|
95
|
+
taskbarElements.TaskbarElement.UPDATE,
|
|
96
|
+
taskbarElements.TaskbarElement.REMOVE,
|
|
97
|
+
taskbarElements.TaskbarElement.INSERT,
|
|
98
|
+
taskbarElements.TaskbarElement.CONFIGURATOR,
|
|
99
|
+
taskbarElements.TaskbarElement.MORE_OPTIONS,
|
|
100
|
+
];
|
|
101
|
+
var CustomTaskbarButton;
|
|
102
|
+
(function (CustomTaskbarButton) {
|
|
103
|
+
CustomTaskbarButton["FILTER"] = "FILTER";
|
|
104
|
+
CustomTaskbarButton["ENTITY_SEARCH"] = "ENTITY_SEARCH";
|
|
105
|
+
})(CustomTaskbarButton || (CustomTaskbarButton = {}));
|
|
106
|
+
/**
|
|
107
|
+
* Insere os botões customizados à esquerda do elemento SPACER na lista de botões.
|
|
108
|
+
* Caso o SPACER não seja encontrado, os botões são inseridos no início da lista.
|
|
109
|
+
*/
|
|
110
|
+
function insertCustomButtonsBeforeSpacer(buttons, customButtons) {
|
|
111
|
+
const spacerIndex = buttons.findIndex(btn => btn === taskbarElements.TaskbarElement.SPACER || (typeof btn === 'string' && btn === 'SPACER'));
|
|
112
|
+
if (spacerIndex > -1) {
|
|
113
|
+
return [
|
|
114
|
+
...buttons.slice(0, spacerIndex),
|
|
115
|
+
...customButtons,
|
|
116
|
+
...buttons.slice(spacerIndex),
|
|
117
|
+
];
|
|
118
|
+
}
|
|
119
|
+
return [...customButtons, ...buttons];
|
|
120
|
+
}
|
|
121
|
+
function buildNativeTaskbarManager(currentViewMode, mergeTaskbarManager, messagesBuilder) {
|
|
122
|
+
var _a, _b;
|
|
123
|
+
const CUSTOM_BUTTONS = [
|
|
124
|
+
{
|
|
125
|
+
name: CustomTaskbarButton.FILTER,
|
|
126
|
+
hint: (_a = messagesBuilder === null || messagesBuilder === void 0 ? void 0 : messagesBuilder.getMessage("snkCrud.customButtons.filter")) !== null && _a !== void 0 ? _a : "Abre o painel de filtros",
|
|
127
|
+
iconName: "filter",
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: CustomTaskbarButton.ENTITY_SEARCH,
|
|
131
|
+
hint: (_b = messagesBuilder === null || messagesBuilder === void 0 ? void 0 : messagesBuilder.getMessage("snkCrud.customButtons.entitySearch")) !== null && _b !== void 0 ? _b : "Busca na entidade",
|
|
132
|
+
iconName: "search",
|
|
133
|
+
},
|
|
134
|
+
];
|
|
135
|
+
const EDITION_MODE_BUTTONS = [
|
|
136
|
+
taskbarElements.TaskbarElement.CANCEL,
|
|
137
|
+
taskbarElements.TaskbarElement.SAVE,
|
|
138
|
+
];
|
|
139
|
+
return {
|
|
140
|
+
getButtons: (taskbarID, dataState, defaultButtons) => {
|
|
141
|
+
var _a, _b;
|
|
142
|
+
if (!taskbarID) {
|
|
143
|
+
console.warn('taskbarID não fornecido');
|
|
44
144
|
return [];
|
|
45
145
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
146
|
+
const isInEditionMode = (dataState === null || dataState === void 0 ? void 0 : dataState.insertionMode) || (dataState === null || dataState === void 0 ? void 0 : dataState.isDirty);
|
|
147
|
+
if (isInEditionMode) {
|
|
148
|
+
return EDITION_MODE_BUTTONS;
|
|
149
|
+
}
|
|
150
|
+
if (currentViewMode === constants.VIEW_MODE.FORM) {
|
|
151
|
+
const indexFormMode = defaultButtons.indexOf(taskbarElements.TaskbarElement.FORM_MODE);
|
|
152
|
+
if (indexFormMode > -1) {
|
|
153
|
+
defaultButtons = [
|
|
154
|
+
...defaultButtons.slice(0, indexFormMode),
|
|
155
|
+
taskbarElements.TaskbarElement.GRID_MODE,
|
|
156
|
+
...defaultButtons.slice(indexFormMode + 1)
|
|
157
|
+
];
|
|
51
158
|
}
|
|
52
|
-
return await this._application.executePreparedSearch(mode, value, this.buildSearchOptions(entityName));
|
|
53
159
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
160
|
+
if (((_b = (_a = dataState === null || dataState === void 0 ? void 0 : dataState.selectionInfo) === null || _a === void 0 ? void 0 : _a.records) === null || _b === void 0 ? void 0 : _b.length) > 1) {
|
|
161
|
+
const indexUpdate = defaultButtons.indexOf(taskbarElements.TaskbarElement.UPDATE);
|
|
162
|
+
if (indexUpdate > -1) {
|
|
163
|
+
defaultButtons = [
|
|
164
|
+
...defaultButtons.slice(0, indexUpdate),
|
|
165
|
+
taskbarElements.TaskbarElement.UPDATE_MULTIPLE,
|
|
166
|
+
...defaultButtons.slice(indexUpdate + 1)
|
|
167
|
+
];
|
|
168
|
+
}
|
|
57
169
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
return;
|
|
170
|
+
const defaultsWithCustomButtons = insertCustomButtonsBeforeSpacer(defaultButtons, CUSTOM_BUTTONS);
|
|
171
|
+
if (mergeTaskbarManager === null || mergeTaskbarManager === void 0 ? void 0 : mergeTaskbarManager.getButtons) {
|
|
172
|
+
return mergeTaskbarManager.getButtons(taskbarID, dataState, defaultsWithCustomButtons);
|
|
62
173
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
174
|
+
return defaultsWithCustomButtons;
|
|
175
|
+
},
|
|
176
|
+
isEnabled: (_, dataState, buttonName, originalValue) => {
|
|
177
|
+
var _a;
|
|
178
|
+
if (!dataState) {
|
|
179
|
+
return originalValue;
|
|
66
180
|
}
|
|
67
|
-
|
|
68
|
-
|
|
181
|
+
const hasSelectedRecord = dataState.selectedRecord !== undefined;
|
|
182
|
+
const buttonsRequiringSelection = [
|
|
183
|
+
taskbarElements.TaskbarElement.UPDATE,
|
|
184
|
+
taskbarElements.TaskbarElement.REMOVE,
|
|
185
|
+
taskbarElements.TaskbarElement.ATTACH,
|
|
186
|
+
taskbarElements.TaskbarElement.CLONE,
|
|
187
|
+
];
|
|
188
|
+
if (!hasSelectedRecord && buttonsRequiringSelection.includes(buttonName)) {
|
|
189
|
+
return false;
|
|
69
190
|
}
|
|
70
|
-
|
|
191
|
+
return (_a = mergeTaskbarManager === null || mergeTaskbarManager === void 0 ? void 0 : mergeTaskbarManager.isEnabled(_, dataState, buttonName, originalValue)) !== null && _a !== void 0 ? _a : originalValue;
|
|
192
|
+
},
|
|
193
|
+
getMoreOptions(taskbarId, configName, dataState, currentActions) {
|
|
194
|
+
var _a;
|
|
195
|
+
return (_a = mergeTaskbarManager === null || mergeTaskbarManager === void 0 ? void 0 : mergeTaskbarManager.getMoreOptions) === null || _a === void 0 ? void 0 : _a.call(mergeTaskbarManager, taskbarId, configName, dataState, currentActions);
|
|
196
|
+
},
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
function getHeaderTaskbarId(dataState, presentationMode) {
|
|
200
|
+
var _a;
|
|
201
|
+
const hasSelectedRecord = dataState && !!((_a = dataState.selectionInfo) === null || _a === void 0 ? void 0 : _a.length);
|
|
202
|
+
const taskbarIdPrefixLookup = {
|
|
203
|
+
primary: "snkGridHeaderTaskbar",
|
|
204
|
+
secondary: "snkGridHeaderTaskbar",
|
|
205
|
+
singleTaskbar: "snkGridHeaderTaskbar.singleTaskbar",
|
|
206
|
+
};
|
|
207
|
+
const taskbarIdPrefix = taskbarIdPrefixLookup[presentationMode];
|
|
208
|
+
let headerTaskbarId = hasSelectedRecord ? `${taskbarIdPrefix}.selected` : `${taskbarIdPrefix}.unselected`;
|
|
209
|
+
if ((dataState === null || dataState === void 0 ? void 0 : dataState.isDirty) && presentationMode === index.PresentationMode.SINGLE_TASKBAR) {
|
|
210
|
+
headerTaskbarId = "snkGridHeaderTaskbar.singleTaskbar.finish_edition";
|
|
211
|
+
}
|
|
212
|
+
return headerTaskbarId;
|
|
213
|
+
}
|
|
214
|
+
function getTopTaskBarId(dataState, presentationMode) {
|
|
215
|
+
const suffixLookup = {
|
|
216
|
+
primary: '',
|
|
217
|
+
secondary: '.secondary',
|
|
218
|
+
singleTaskbar: '.singleTaskbar',
|
|
219
|
+
};
|
|
220
|
+
const sufix = suffixLookup[presentationMode];
|
|
221
|
+
if (dataState === null || dataState === void 0 ? void 0 : dataState.isDirty) {
|
|
222
|
+
return `snkGridTopTaskbar.finish_edition${sufix}`;
|
|
223
|
+
}
|
|
224
|
+
return `snkGridTopTaskbar.regular${sufix}`;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
const snkCrudCss = ".sc-snk-crud-h{display:flex;flex-direction:column;height:100%;width:100%;overflow-y:auto;scrollbar-gutter:stable both-edges}snk-grid.sc-snk-crud{--snk-grid-padding:0 var(--space--6, 6px) var(--space--6, 6px) var(--space--6, 6px)}stack-item.sc-snk-crud.sc-snk-crud{display:grid;min-height:100%}.snk-crud__header.sc-snk-crud{margin-bottom:var(--space--10, 10px)}.snk-crud__grid-stack-item.sc-snk-crud{display:flex;flex-direction:column;height:100%;width:100%;padding:0 var(--space--2, 2px)}.snk-crud__header-top.sc-snk-crud{display:flex;justify-content:space-between;align-items:center;padding:var(--space--8, 8px);padding-top:var(--space--12, 12px)}.snk-crud__header-bottom.sc-snk-crud{display:flex;justify-content:space-between;align-items:center;padding:0 var(--space--8, 8px) 0 var(--space--6, 6px)}.snk-crud__header-bottom.sc-snk-crud>snk-taskbar.sc-snk-crud{padding-bottom:var(--space--8, 8px);margin-left:var(--space--12, 12px)}.snk-crud--hidden.sc-snk-crud{display:none !important}ez-record-navigation.sc-snk-crud,ez-grid-pagination.sc-snk-crud{margin-bottom:var(--space--8, 8px)}";
|
|
228
|
+
|
|
229
|
+
const SnkCrud = class {
|
|
230
|
+
constructor(hostRef) {
|
|
231
|
+
index$1.registerInstance(this, hostRef);
|
|
232
|
+
this.snkShowGuide = index$1.createEvent(this, "snkShowGuide", 7);
|
|
233
|
+
this.actionClick = index$1.createEvent(this, "actionClick", 7);
|
|
234
|
+
this.configuratorSave = index$1.createEvent(this, "configuratorSave", 7);
|
|
235
|
+
this.configuratorCancel = index$1.createEvent(this, "configuratorCancel", 7);
|
|
236
|
+
this.formItemsReady = index$1.createEvent(this, "formItemsReady", 7);
|
|
237
|
+
this.viewModeChanged = index$1.createEvent(this, "viewModeChanged", 7);
|
|
238
|
+
this.numberingConfigChanged = index$1.createEvent(this, "numberingConfigChanged", 7);
|
|
239
|
+
this._viewHistory = [];
|
|
240
|
+
this._customEditors = new Map();
|
|
241
|
+
this._customRenders = new Map();
|
|
242
|
+
this._taskbarProcessor = new SimpleTaskbarProcessor(DEFAULT_TASKBAR_BUTTONS);
|
|
243
|
+
this._taskbarCustomProcessor = new SimpleTaskbarProcessor([]);
|
|
71
244
|
this.dataUnitInterceptor = {
|
|
72
|
-
interceptAction: (action) => {
|
|
73
|
-
|
|
74
|
-
|
|
245
|
+
interceptAction: async (action) => {
|
|
246
|
+
switch (action.type) {
|
|
247
|
+
case core.Action.DATA_SAVED:
|
|
248
|
+
return this.interceptDataSaved(action);
|
|
249
|
+
case core.Action.LOADING_DATA:
|
|
250
|
+
return await this.interceptLoadData(action);
|
|
251
|
+
default:
|
|
252
|
+
return action;
|
|
75
253
|
}
|
|
76
|
-
return action;
|
|
77
254
|
},
|
|
78
255
|
};
|
|
79
256
|
this._dataUnit = undefined;
|
|
80
257
|
this._dataState = undefined;
|
|
81
|
-
this._suppressEntitySearch = false;
|
|
82
258
|
this.attachmentRegisterKey = undefined;
|
|
83
259
|
this._currentViewMode = constants.VIEW_MODE.GRID;
|
|
84
260
|
this._canEdit = undefined;
|
|
85
261
|
this._resourceID = undefined;
|
|
86
262
|
this.customContainerId = `SNK-CRUD-CUSTOM-CONTAINER-${core.StringUtils.generateUUID()}`;
|
|
87
263
|
this.numberingConfig = undefined;
|
|
88
|
-
this.
|
|
89
|
-
this.
|
|
264
|
+
this._filterMode = 'regular';
|
|
265
|
+
this._enableContinuousInsert = false;
|
|
266
|
+
this._headerVisible = true;
|
|
90
267
|
this.enableLockManagerLoadingComp = false;
|
|
91
268
|
this.enableLockManagerTaskbarClick = false;
|
|
92
269
|
this.configName = undefined;
|
|
93
270
|
this.filterBarTitle = undefined;
|
|
94
271
|
this.selectionToastConfig = undefined;
|
|
95
|
-
this.showActionButtons =
|
|
272
|
+
this.showActionButtons = true;
|
|
96
273
|
this.actionsList = undefined;
|
|
97
274
|
this.taskbarManager = undefined;
|
|
98
275
|
this.recordsValidator = undefined;
|
|
99
276
|
this.statusResolver = undefined;
|
|
100
277
|
this.multipleSelection = true;
|
|
101
|
-
this.presentationMode = index
|
|
278
|
+
this.presentationMode = index.PresentationMode.PRIMARY;
|
|
102
279
|
this.messagesBuilder = undefined;
|
|
103
280
|
this.useEnterLikeTab = false;
|
|
104
281
|
this.gridLegacyConfigName = undefined;
|
|
@@ -111,7 +288,7 @@ const SnkCrud = class {
|
|
|
111
288
|
this.domainMessagesBuilder = undefined;
|
|
112
289
|
this.ignoreReadOnlyFormFields = undefined;
|
|
113
290
|
this.setCustomFormTitle = undefined;
|
|
114
|
-
this.strategyExporter = index
|
|
291
|
+
this.strategyExporter = index.ExporterStrategy.SERVER_SIDE;
|
|
115
292
|
this.layoutFormConfig = true;
|
|
116
293
|
this.multipleEditionEnabled = true;
|
|
117
294
|
this.paginationCounterMode = 'auto';
|
|
@@ -119,6 +296,9 @@ const SnkCrud = class {
|
|
|
119
296
|
this.showEntitySearch = true;
|
|
120
297
|
this.disableNumberingConfig = false;
|
|
121
298
|
}
|
|
299
|
+
handleActionClick(evt) {
|
|
300
|
+
this.executeAction(evt.detail);
|
|
301
|
+
}
|
|
122
302
|
/**
|
|
123
303
|
* Usado para alternar a visão entre GRID e FORM externamente.
|
|
124
304
|
*/
|
|
@@ -216,6 +396,7 @@ const SnkCrud = class {
|
|
|
216
396
|
this.setViewMode(constants.VIEW_MODE.FORM);
|
|
217
397
|
}
|
|
218
398
|
async executeAction(act) {
|
|
399
|
+
var _a;
|
|
219
400
|
switch (act) {
|
|
220
401
|
case taskbarElements.TaskbarElement.GRID_MODE:
|
|
221
402
|
return this.setViewMode(constants.VIEW_MODE.GRID);
|
|
@@ -228,13 +409,13 @@ const SnkCrud = class {
|
|
|
228
409
|
case taskbarElements.TaskbarElement.CONFIGURATOR:
|
|
229
410
|
return this._snkConfigurator.open();
|
|
230
411
|
case taskbarElements.TaskbarElement.ATTACH:
|
|
231
|
-
return this.
|
|
412
|
+
return this._snkAttach.open();
|
|
413
|
+
case CustomTaskbarButton.FILTER:
|
|
414
|
+
return (_a = this._snkFilterBar) === null || _a === void 0 ? void 0 : _a.showFilterModal();
|
|
415
|
+
case CustomTaskbarButton.ENTITY_SEARCH:
|
|
416
|
+
return this.openSearchPopover();
|
|
232
417
|
}
|
|
233
418
|
}
|
|
234
|
-
backView() {
|
|
235
|
-
const lastView = this._viewHistory.at(-2) || constants.VIEW_MODE.GRID;
|
|
236
|
-
this.setViewMode(lastView);
|
|
237
|
-
}
|
|
238
419
|
setViewMode(viewMode) {
|
|
239
420
|
this._viewStack.show(viewMode);
|
|
240
421
|
this._currentViewMode = viewMode;
|
|
@@ -296,6 +477,16 @@ const SnkCrud = class {
|
|
|
296
477
|
this._customEditors.delete(fieldName);
|
|
297
478
|
}
|
|
298
479
|
}
|
|
480
|
+
initializeTaskbarProcessor() {
|
|
481
|
+
const nativeTaskbarManager = buildNativeTaskbarManager(this._currentViewMode, this.taskbarManager, this.messagesBuilder);
|
|
482
|
+
const topTaskbarId = getTopTaskBarId(this._dataState, this.presentationMode);
|
|
483
|
+
this._taskbarProcessor.process(topTaskbarId, nativeTaskbarManager, this._dataState, undefined, []);
|
|
484
|
+
const headerTaskbarId = getHeaderTaskbarId(this._dataState, this.presentationMode);
|
|
485
|
+
this._taskbarCustomProcessor.process(headerTaskbarId, this.taskbarManager, this._dataState, undefined, []);
|
|
486
|
+
}
|
|
487
|
+
componentWillRender() {
|
|
488
|
+
this.initializeTaskbarProcessor();
|
|
489
|
+
}
|
|
299
490
|
componentDidRender() {
|
|
300
491
|
this.setCustomRenders();
|
|
301
492
|
this.setCustomEditors();
|
|
@@ -331,6 +522,7 @@ const SnkCrud = class {
|
|
|
331
522
|
if (!this.configName) {
|
|
332
523
|
this.configName = this._application.configName;
|
|
333
524
|
}
|
|
525
|
+
this.initContinuousInsertUtils();
|
|
334
526
|
}
|
|
335
527
|
componentDidLoad() {
|
|
336
528
|
this.initKeyboardManager();
|
|
@@ -412,49 +604,6 @@ const SnkCrud = class {
|
|
|
412
604
|
var _a;
|
|
413
605
|
(_a = this._keyboardManager) === null || _a === void 0 ? void 0 : _a.unbindAllShortcutKeys();
|
|
414
606
|
}
|
|
415
|
-
async handlePredictiveSearch(argument, entityName) {
|
|
416
|
-
var _a, _b;
|
|
417
|
-
const response = await this._application.executePreparedSearchWithFullResponse(argument, this.buildSearchOptions(entityName, 5));
|
|
418
|
-
this._showMoreOnSearch = (_a = response === null || response === void 0 ? void 0 : response.hasMore) !== null && _a !== void 0 ? _a : false;
|
|
419
|
-
this._entityPKField = response === null || response === void 0 ? void 0 : response.pkField;
|
|
420
|
-
return (_b = response === null || response === void 0 ? void 0 : response.data) !== null && _b !== void 0 ? _b : [];
|
|
421
|
-
}
|
|
422
|
-
async refreshDataUnitByPk(pks) {
|
|
423
|
-
try {
|
|
424
|
-
const pkField = pks[0].name;
|
|
425
|
-
const pkValue = pks[0].value;
|
|
426
|
-
// Criar filtro para a busca específica
|
|
427
|
-
const quickFilter = {
|
|
428
|
-
term: '',
|
|
429
|
-
filter: {
|
|
430
|
-
name: '',
|
|
431
|
-
params: [],
|
|
432
|
-
expression: `(${pkField} = ${pkValue})`
|
|
433
|
-
}
|
|
434
|
-
};
|
|
435
|
-
// Carregar dados com o filtro aplicado diretamente
|
|
436
|
-
await this._dataUnit.loadData(quickFilter);
|
|
437
|
-
// Navegar para o formulário se houver apenas um registro
|
|
438
|
-
if (this._dataUnit.records.length === 1) {
|
|
439
|
-
this._dataUnit.selectFirst();
|
|
440
|
-
this.gridToForm(true);
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
catch (error) {
|
|
444
|
-
console.error('Erro ao atualizar dataset:', error);
|
|
445
|
-
}
|
|
446
|
-
}
|
|
447
|
-
buildSearchOptions(entityName, limit) {
|
|
448
|
-
return {
|
|
449
|
-
entity: entityName,
|
|
450
|
-
entityDescription: entityName,
|
|
451
|
-
executeOnOpen: true,
|
|
452
|
-
searchOptions: {
|
|
453
|
-
localEntityName: entityName,
|
|
454
|
-
limit,
|
|
455
|
-
}
|
|
456
|
-
};
|
|
457
|
-
}
|
|
458
607
|
async toggleView() {
|
|
459
608
|
const currentView = await this._viewStack.getSelectedIndex();
|
|
460
609
|
this.setViewMode(constants.VIEW_MODE.GRID === currentView ? constants.VIEW_MODE.FORM : constants.VIEW_MODE.GRID);
|
|
@@ -498,6 +647,17 @@ const SnkCrud = class {
|
|
|
498
647
|
this.updateNumberingConfigAfterInsert(action);
|
|
499
648
|
return action;
|
|
500
649
|
}
|
|
650
|
+
async interceptLoadData(action) {
|
|
651
|
+
var _a;
|
|
652
|
+
const hasInvalidFilters = !filterValidate.validateFilters((_a = this._snkFilterBar) === null || _a === void 0 ? void 0 : _a.filterConfig);
|
|
653
|
+
if (hasInvalidFilters) {
|
|
654
|
+
const errorTitle = this.messagesBuilder.getMessage("snkGrid.requiredFiltersNotFilled.title", {});
|
|
655
|
+
const errorMessage = this.messagesBuilder.getMessage("snkGrid.requiredFiltersNotFilled.message", {});
|
|
656
|
+
await this._application.error(errorTitle, errorMessage);
|
|
657
|
+
return;
|
|
658
|
+
}
|
|
659
|
+
return action;
|
|
660
|
+
}
|
|
501
661
|
onDataUnitReady() {
|
|
502
662
|
var _a;
|
|
503
663
|
(_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.addInterceptor(this.dataUnitInterceptor);
|
|
@@ -517,6 +677,12 @@ const SnkCrud = class {
|
|
|
517
677
|
}
|
|
518
678
|
this.onDataUnitReady();
|
|
519
679
|
}
|
|
680
|
+
initContinuousInsertUtils() {
|
|
681
|
+
this._continuousInsertUtils = new ContinuousInsertUtils.ContinuousInsertUtils(this._application, this._resourceID, this.configName);
|
|
682
|
+
if (this.enableGridInsert) {
|
|
683
|
+
this._continuousInsertUtils.getConfig().then(value => this._enableContinuousInsert = value);
|
|
684
|
+
}
|
|
685
|
+
}
|
|
520
686
|
async loadNumberingConfig() {
|
|
521
687
|
if (this.numberingConfig || !this._snkDataUnit || !this._snkDataUnit.entityName || this.disableNumberingConfig) {
|
|
522
688
|
return;
|
|
@@ -561,20 +727,95 @@ const SnkCrud = class {
|
|
|
561
727
|
}
|
|
562
728
|
this.configuratorCancel.emit();
|
|
563
729
|
}
|
|
564
|
-
|
|
730
|
+
renderCustomGuideSlots() {
|
|
731
|
+
if (!this.customGuidesConfig)
|
|
732
|
+
return;
|
|
733
|
+
return this.customGuidesConfig.map(g => index$1.h("slot", { name: g.id }));
|
|
734
|
+
}
|
|
735
|
+
getColumnSearch(item) {
|
|
736
|
+
if (this._columnSearch != undefined) {
|
|
737
|
+
return this._columnSearch;
|
|
738
|
+
}
|
|
739
|
+
this._columnSearch = utils.buildFieldSearch(item, ({ argument }) => new Promise(accept => {
|
|
740
|
+
this._snkGrid.filterColumns(argument).then((columns) => {
|
|
741
|
+
accept(columns
|
|
742
|
+
.filter(column => !column.hidden)
|
|
743
|
+
.map(column => ({ label: column.label, value: column.name })));
|
|
744
|
+
});
|
|
745
|
+
}), (option) => {
|
|
746
|
+
if (option != undefined) {
|
|
747
|
+
this._snkGrid.locateColumn(option.value);
|
|
748
|
+
}
|
|
749
|
+
});
|
|
750
|
+
return this._columnSearch;
|
|
751
|
+
}
|
|
752
|
+
buildTaskbarCustomActionsList() {
|
|
753
|
+
return [this.buildSearchColumnTaskbarAction()];
|
|
754
|
+
}
|
|
755
|
+
buildSearchColumnTaskbarAction() {
|
|
756
|
+
return {
|
|
757
|
+
value: core.StringUtils.generateUUID(),
|
|
758
|
+
label: this.messagesBuilder.getMessage('snkGrid.findColumn', {}),
|
|
759
|
+
disableCloseOnSelect: true,
|
|
760
|
+
eagerInitialize: true,
|
|
761
|
+
itemBuilder: (_, item) => this.getColumnSearch(item),
|
|
762
|
+
};
|
|
763
|
+
}
|
|
764
|
+
isGridInsertActive() {
|
|
765
|
+
return this.enableGridInsert && this._dataUnit.hasNewRecord();
|
|
766
|
+
}
|
|
767
|
+
getActionsList() {
|
|
768
|
+
const hardList = [];
|
|
769
|
+
if (this.enableGridInsert) {
|
|
770
|
+
hardList.push(this._continuousInsertUtils.actionContinuousInsert(this._enableContinuousInsert, () => {
|
|
771
|
+
this._enableContinuousInsert = !this._enableContinuousInsert;
|
|
772
|
+
this._continuousInsertUtils.handleSaveConfig(this._enableContinuousInsert);
|
|
773
|
+
}));
|
|
774
|
+
}
|
|
775
|
+
if (this.isGridInsertActive())
|
|
776
|
+
return hardList;
|
|
777
|
+
if (this.taskbarManager != undefined && this.taskbarManager.getMoreOptions != undefined) {
|
|
778
|
+
const taskbarID = getTopTaskBarId(this._dataState, this.presentationMode);
|
|
779
|
+
return hardList.concat(this.taskbarManager.getMoreOptions(taskbarID, this.configName, this._dataState, this.actionsList));
|
|
780
|
+
}
|
|
781
|
+
return hardList.concat(this.actionsList);
|
|
782
|
+
}
|
|
783
|
+
async openSearchPopover() {
|
|
784
|
+
if (!this._popoverSearchEntity) {
|
|
785
|
+
return;
|
|
786
|
+
}
|
|
787
|
+
const buttonElement = this._element.querySelector(`[data-taskbar-element="${CustomTaskbarButton.ENTITY_SEARCH}"]`);
|
|
788
|
+
await this._popoverSearchEntity.showUnder(buttonElement);
|
|
789
|
+
}
|
|
790
|
+
handleLoadedSearch(evt) {
|
|
791
|
+
if (evt.detail.length === 1) {
|
|
792
|
+
this._dataUnit.selectFirst();
|
|
793
|
+
this.gridToForm(true);
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
renderDynamicSearch() {
|
|
565
797
|
var _a;
|
|
566
|
-
if (
|
|
798
|
+
if (!this.showEntitySearch)
|
|
567
799
|
return;
|
|
568
|
-
return (index.h("
|
|
800
|
+
return (index$1.h("snk-entity-search", { ref: (ref) => this._popoverSearchEntity = ref, dataUnit: this._dataUnit, entityName: (_a = this._snkDataUnit) === null || _a === void 0 ? void 0 : _a.entityName, messagesBuilder: this.messagesBuilder, onLoaded: (evt) => this.handleLoadedSearch(evt) }));
|
|
801
|
+
}
|
|
802
|
+
handleFilterConfigUpdated(filterConfig) {
|
|
803
|
+
if (!filterConfig.length) {
|
|
804
|
+
return;
|
|
805
|
+
}
|
|
806
|
+
if (filterConfig.length === 1 && filterConfig[0].id === 'PERSONALIZED_FILTER_GROUP') {
|
|
807
|
+
this._filterMode = filterConfig[0].groupedItems.length > 0 ? 'regular' : 'button';
|
|
808
|
+
return;
|
|
809
|
+
}
|
|
569
810
|
}
|
|
570
811
|
render() {
|
|
571
812
|
if (this._resourceID == undefined) {
|
|
572
813
|
return;
|
|
573
814
|
}
|
|
574
815
|
this._snkDataUnit.ignoreSaveMessage = (this._currentViewMode === constants.VIEW_MODE.GRID && !this.enableGridInsert);
|
|
575
|
-
return (index.h(index.Host, null, index.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, index.h("stack-item", { class: '
|
|
816
|
+
return (index$1.h(index$1.Host, null, index$1.h("header", { class: { 'snk-crud--hidden': !this._headerVisible, 'snk-crud__header': true } }, index$1.h("div", { class: "snk-crud__header-top" }, index$1.h("snk-taskbar", { "data-element-id": "grid_top", key: "snkGridTopTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, resourceID: this._resourceID, primaryButton: "INSERT", overflowStrategy: "hiddenItems", alignRigth: true, actionsList: this.getActionsList(), customActionsList: this.buildTaskbarCustomActionsList(), sizeButtons: 'medium' })), index$1.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, mode: this._filterMode, hideFilterButton: true, sizeChips: 'default' })), index$1.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, index$1.h("stack-item", { class: 'snk-crud__grid-stack-item' }, index$1.h("snk-grid", { ref: (ref) => this._snkGrid = ref, class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full', filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, strategyExporter: this.strategyExporter, multipleEditionEnabled: this.multipleEditionEnabled, paginationCounterMode: this.paginationCounterMode, hideHeader: true, hideGridTaskbar: true }, index$1.h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), index$1.h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), index$1.h("slot", { name: "SnkGridHeader" }), index$1.h("slot", { name: "SnkGridFooter" }), index$1.h("slot", { name: "SnkGridTaskBar" }))), index$1.h("stack-item", null, index$1.h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, customGuidesConfig: this.customGuidesConfig, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(constants.VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId, formLegacyConfigName: this.formLegacyConfigName, enableGridInsert: this.enableGridInsert, getCustomTitle: this.setCustomFormTitle, ignoreReadOnlyFormFields: this.ignoreReadOnlyFormFields, onFormConfigVisibilityChanged: evt => this._headerVisible = !evt.detail }, index$1.h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), this.renderCustomGuideSlots(), index$1.h("slot", { name: "SnkFormTaskBar" })))), index$1.h("snk-attach", { ref: (ref) => this._snkAttach = ref, registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName }), index$1.h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, entityName: this._snkDataUnit.entityName, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId, layoutFormConfig: this.layoutFormConfig }), this.renderDynamicSearch(), index$1.h("div", { id: `${this.customContainerId}` }, index$1.h("slot", { name: "SnkConfigContainerSlot" }), index$1.h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), index$1.h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), index$1.h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
|
|
576
817
|
}
|
|
577
|
-
get _element() { return index.getElement(this); }
|
|
818
|
+
get _element() { return index$1.getElement(this); }
|
|
578
819
|
static get watchers() { return {
|
|
579
820
|
"_currentViewMode": ["currentViewModeWatcher"]
|
|
580
821
|
}; }
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-1894343a.js');
|
|
6
|
+
|
|
7
|
+
const snkCustomSlotGuideCss = ".sc-snk-custom-slot-guide-h{display:none}";
|
|
8
|
+
|
|
9
|
+
const SnkCustomSlotGuide = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
this.snkCustomSlotGuideLoaded = index.createEvent(this, "snkCustomSlotGuideLoaded", 7);
|
|
13
|
+
this.slotName = 'CUSTOM_SLOT_GUIDE';
|
|
14
|
+
}
|
|
15
|
+
onGuideChange(evt) {
|
|
16
|
+
const guideName = evt.detail;
|
|
17
|
+
if (guideName === this.slotName) {
|
|
18
|
+
this._element.style.setProperty('display', 'block');
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
this._element.style.setProperty('display', 'none');
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
onFormConfigVisibilityChange(evt) {
|
|
25
|
+
const isFormConfigVisible = evt.detail;
|
|
26
|
+
if (isFormConfigVisible) {
|
|
27
|
+
this._element.style.setProperty('display', 'none');
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
componentDidLoad() {
|
|
31
|
+
this.snkCustomSlotGuideLoaded.emit(this.slotName);
|
|
32
|
+
}
|
|
33
|
+
render() {
|
|
34
|
+
return (index.h(index.Host, { slot: this.slotName, id: this.slotName, class: "custom-slot-guide-container" }, index.h("slot", null)));
|
|
35
|
+
}
|
|
36
|
+
get _element() { return index.getElement(this); }
|
|
37
|
+
};
|
|
38
|
+
SnkCustomSlotGuide.style = snkCustomSlotGuideCss;
|
|
39
|
+
|
|
40
|
+
exports.snk_custom_slot_guide = SnkCustomSlotGuide;
|