@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-KB-11997.0 → 0.0.0-bugfix-dev-KB-99999.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{ConfigStorage-0e4275f5.js → ConfigStorage-8009ecb2.js} +20 -4
- package/dist/cjs/{DataFetcher-bd3d53a8.js → DataFetcher-ba94ed5b.js} +142 -102
- package/dist/cjs/{PersonalizedFilterUtils-1aeb625d.js → PersonalizedFilterUtils-0184ffbb.js} +11 -4
- package/dist/cjs/PreloadManager-84466da6.js +224 -0
- package/dist/cjs/{SnkFormConfigManager-5b485cd4.js → SnkFormConfigManager-7d850fbc.js} +23 -6
- package/dist/cjs/{SnkMessageBuilder-d0abb63d.js → SnkMessageBuilder-7293d0ad.js} +29 -8
- package/dist/cjs/{SnkMultiSelectionListDataSource-804ff4c7.js → SnkMultiSelectionListDataSource-ba5838c2.js} +15 -0
- package/dist/cjs/Sortable-fb1c4cbb.js +2853 -0
- package/dist/cjs/{auth-fetcher-1583fe43.js → auth-fetcher-c8467c07.js} +1 -1
- package/dist/cjs/{constants-d187e03e.js → constants-35ddd366.js} +4 -0
- package/dist/cjs/dataunit-fetcher-de65b9fc.js +725 -0
- package/dist/cjs/{taskbar-processor-bce3f499.js → field-search-f56aa7d6.js} +35 -0
- package/dist/cjs/{filter-item-type.enum-aa823a00.js → filter-item-type.enum-a7ffdaa6.js} +1 -0
- package/dist/cjs/filterNumberVariation-d65332da.js +7 -0
- package/dist/cjs/{form-config-fetcher-f6cb55e6.js → form-config-fetcher-df043d3d.js} +1 -1
- package/dist/cjs/{index-0e663819.js → index-0922807b.js} +1 -0
- package/dist/cjs/index-f9e81701.js +10 -6
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{pesquisa-fetcher-3356b3df.js → pesquisa-fetcher-ef050a47.js} +1 -1
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/{snk-actions-button.cjs.entry.js → snk-actions-button_2.cjs.entry.js} +214 -91
- package/dist/cjs/snk-application.cjs.entry.js +474 -140
- package/dist/cjs/snk-attach.cjs.entry.js +27 -11
- package/dist/cjs/snk-config-options.cjs.entry.js +1 -1
- package/dist/cjs/snk-configurator.cjs.entry.js +17 -2
- package/dist/cjs/snk-crud.cjs.entry.js +127 -17
- package/dist/cjs/snk-custom-slot-elements.cjs.entry.js +20 -0
- package/dist/cjs/snk-data-exporter.cjs.entry.js +12 -11
- package/dist/cjs/{snk-data-unit-7cc1846d.js → snk-data-unit-1bc69073.js} +15 -5
- package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
- package/dist/cjs/snk-detail-view.cjs.entry.js +34 -14
- package/dist/cjs/snk-field-config.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-advanced-mode_2.cjs.entry.js +2 -2
- package/dist/cjs/snk-filter-bar.cjs.entry.js +163 -17
- package/dist/cjs/snk-filter-binary-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-checkbox-list.cjs.entry.js +52 -0
- package/dist/cjs/snk-filter-detail.cjs.entry.js +9 -2
- package/dist/cjs/snk-filter-field-search_2.cjs.entry.js +2 -2
- package/dist/cjs/snk-filter-item.cjs.entry.js +39 -15
- package/dist/cjs/snk-filter-list.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +9 -9
- package/dist/cjs/snk-filter-modal.cjs.entry.js +38 -7
- package/dist/cjs/snk-filter-multi-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-number.cjs.entry.js +42 -3
- package/dist/cjs/snk-filter-period.cjs.entry.js +3 -3
- package/dist/cjs/snk-filter-search.cjs.entry.js +1 -1
- package/dist/cjs/snk-form-config.cjs.entry.js +16 -15
- package/dist/cjs/snk-form-view.cjs.entry.js +14 -0
- package/dist/cjs/snk-form.cjs.entry.js +6 -7
- package/dist/cjs/snk-grid-config.cjs.entry.js +6 -7
- package/dist/cjs/snk-grid.cjs.entry.js +131 -40
- package/dist/cjs/{snk-guides-viewer-5e22097d.js → snk-guides-viewer-7f9b6d94.js} +161 -22
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +16 -13
- package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +1 -1
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +24 -13
- package/dist/cjs/snk-select-box.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-crud.cjs.entry.js +127 -103
- package/dist/cjs/snk-tab-config.cjs.entry.js +12 -11
- package/dist/cjs/snk-taskbar.cjs.entry.js +3 -3
- package/dist/cjs/{taskbar-elements-39949c7a.js → taskbar-elements-01b85b99.js} +4 -4
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/snk-actions-button/actions/executor/java.executor.js +2 -2
- package/dist/collection/components/snk-actions-button/actions/executor/javascript.executor.js +2 -2
- package/dist/collection/components/snk-actions-button/actions/executor/procedure.executor.js +2 -2
- package/dist/collection/components/snk-actions-button/clientEvent/index.js +81 -76
- package/dist/collection/components/snk-actions-button/snk-actions-button.css +4 -11
- package/dist/collection/components/snk-actions-button/snk-actions-button.js +2 -2
- package/dist/collection/components/snk-application/snk-application.js +485 -84
- package/dist/collection/components/snk-attach/snk-attach.css +6 -0
- package/dist/collection/components/snk-attach/snk-attach.js +15 -3
- package/dist/collection/components/snk-attach/structure/data-unit-builder.js +4 -1
- package/dist/collection/components/snk-configurator/snk-configurator.js +33 -1
- package/dist/collection/components/snk-crud/snk-crud.js +136 -10
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +21 -1
- package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +45 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +178 -22
- package/dist/collection/components/snk-custom-slot-elements/snk-custom-slot-elements.css +3 -0
- package/dist/collection/components/{snk-taskbar/snk-taskbar-custom-elements.js → snk-custom-slot-elements/snk-custom-slot-elements.js} +10 -10
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.css +1 -9
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +1 -1
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +15 -12
- package/dist/collection/components/snk-filter-bar/filter-item/dataunitfilter/data-unit-filter-builder.js +69 -2
- package/dist/collection/components/snk-filter-bar/filter-item/editors/enum/filterNumberVariation.js +5 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-checkbox-list.js +95 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +93 -8
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js +2 -2
- package/dist/collection/components/snk-filter-bar/filter-item/filter-item-type.enum.js +1 -0
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +7 -0
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +38 -14
- package/dist/collection/components/snk-filter-bar/filter-list/snk-filter-list.js +1 -1
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +87 -6
- package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js +4 -3
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +5 -6
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +218 -7
- package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js +3 -1
- package/dist/collection/components/snk-form/SnkFormConfigManager.js +22 -5
- package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.js +10 -8
- package/dist/collection/components/snk-form/subcomponents/snk-tab-config/snk-tab-config.js +10 -8
- package/dist/collection/components/snk-grid/filtercolumn/SnkMultiSelectionListDataSource.js +11 -0
- package/dist/collection/components/snk-grid/snk-grid.css +7 -2
- package/dist/collection/components/snk-grid/snk-grid.js +166 -39
- package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +32 -6
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/utils/PersonalizedFilterUtils.js +13 -4
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.css +8 -2
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +115 -6
- package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.css +6 -0
- package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js +310 -0
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +3 -3
- package/dist/collection/components/snk-taskbar/snk-taskbar.css +0 -4
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +1 -1
- package/dist/collection/components/snk-taskbar/subcomponents/field-search.js +31 -0
- package/dist/collection/lib/@types/index.js +1 -0
- package/dist/collection/lib/dataUnit/InMemoryLoader.js +74 -15
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +61 -43
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.js +118 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.js +80 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.js +139 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/{dataunit-fetcher.js → data-unit/dataunit-fetcher.js} +49 -100
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/ILoadDataResult.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/ILoadDataStrategy.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/ILoadingInfo.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRecordField.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IResponseRecord.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DataUnitStrategy.js +68 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +162 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/index.js +3 -2
- package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/personalized-reports-fetcher.js +3 -2
- package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js +14 -1
- package/dist/collection/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.js +3 -0
- package/dist/collection/lib/index.js +1 -1
- package/dist/collection/lib/message/SnkMessageBuilder.js +9 -3
- package/dist/collection/lib/message/resources/snk-application.msg.js +9 -0
- package/dist/collection/lib/message/resources/snk-crud.msg.js +1 -0
- package/dist/collection/lib/message/resources/snk-filter-bar.msg.js +5 -4
- package/dist/collection/lib/message/resources/snk-grid.msg.js +3 -1
- package/dist/collection/lib/message/resources/snk-simple-crud.msg.js +4 -0
- package/dist/collection/lib/utils/constants.js +3 -0
- package/dist/collection/lib/utils/urlutils.js +10 -4
- package/dist/collection/lib/workspace/workspace.js +27 -0
- package/dist/components/ConfigStorage.js +17 -1
- package/dist/components/DataFetcher.js +101 -61
- package/dist/components/PersonalizedFilterUtils.js +10 -3
- package/dist/components/SnkFormConfigManager.js +22 -5
- package/dist/components/SnkMessageBuilder.js +29 -8
- package/dist/components/constants.js +4 -1
- package/dist/components/dataunit-fetcher.js +846 -100
- package/dist/components/{SnkMultiSelectionListDataSource.js → field-search.js} +44 -1
- package/dist/components/filter-item-type.enum.js +1 -0
- package/dist/components/filterNumberVariation.js +7 -0
- package/dist/components/index.d.ts +3 -1
- package/dist/components/index.js +3 -1
- package/dist/components/index2.js +1 -0
- package/dist/components/snk-actions-button2.js +91 -86
- package/dist/components/snk-application2.js +392 -55
- package/dist/components/snk-attach2.js +39 -19
- package/dist/components/snk-configurator2.js +18 -2
- package/dist/components/snk-crud.js +184 -70
- package/dist/components/snk-custom-slot-elements.d.ts +11 -0
- package/dist/components/snk-custom-slot-elements.js +35 -0
- package/dist/components/snk-data-exporter2.js +7 -5
- package/dist/components/snk-data-unit2.js +15 -5
- package/dist/components/snk-detail-view2.js +264 -96
- package/dist/components/snk-filter-bar2.js +164 -13
- package/dist/components/snk-filter-checkbox-list.d.ts +11 -0
- package/dist/components/snk-filter-checkbox-list.js +68 -0
- package/dist/components/snk-filter-detail2.js +7 -0
- package/dist/components/snk-filter-item2.js +38 -14
- package/dist/components/snk-filter-list.js +1 -1
- package/dist/components/snk-filter-modal-item2.js +4 -3
- package/dist/components/snk-filter-modal.js +40 -7
- package/dist/components/snk-filter-number.js +43 -2
- package/dist/components/snk-filter-period.js +2 -2
- package/dist/components/snk-form-config2.js +13 -11
- package/dist/components/snk-form-view2.js +15 -0
- package/dist/components/snk-grid2.js +166 -68
- package/dist/components/snk-personalized-filter2.js +18 -6
- package/dist/components/snk-simple-crud2.js +132 -104
- package/dist/components/snk-tab-config2.js +2203 -6233
- package/dist/components/snk-taskbar2.js +16 -10
- package/dist/components/taskbar-actions-button.d.ts +11 -0
- package/dist/components/taskbar-actions-button.js +6 -0
- package/dist/components/taskbar-actions-button2.js +140 -0
- package/dist/esm/{ConfigStorage-f359573c.js → ConfigStorage-1244b8b0.js} +20 -4
- package/dist/esm/{DataFetcher-8daff9ad.js → DataFetcher-aa159c5a.js} +101 -61
- package/dist/esm/{PersonalizedFilterUtils-75fb0106.js → PersonalizedFilterUtils-e2b38ef7.js} +11 -4
- package/dist/esm/PreloadManager-c1c2f2b4.js +222 -0
- package/dist/esm/{SnkFormConfigManager-35876bad.js → SnkFormConfigManager-9be0e7d4.js} +24 -7
- package/dist/esm/{SnkMessageBuilder-68c1c25a.js → SnkMessageBuilder-ca843d1b.js} +29 -8
- package/dist/esm/{SnkMultiSelectionListDataSource-892f37f9.js → SnkMultiSelectionListDataSource-44494b0e.js} +11 -0
- package/dist/esm/Sortable-83960219.js +2851 -0
- package/dist/esm/{auth-fetcher-299fed55.js → auth-fetcher-c05dc474.js} +1 -1
- package/dist/esm/{constants-3644f1b6.js → constants-8457af36.js} +4 -1
- package/dist/esm/dataunit-fetcher-e218c6d2.js +722 -0
- package/dist/esm/{taskbar-processor-94402e6e.js → field-search-efbe307f.js} +34 -1
- package/dist/esm/{filter-item-type.enum-5028ed3f.js → filter-item-type.enum-d45e026f.js} +1 -0
- package/dist/esm/filterNumberVariation-8cee02ea.js +7 -0
- package/dist/esm/{form-config-fetcher-8ef7be16.js → form-config-fetcher-36219cd3.js} +1 -1
- package/dist/esm/{index-1564817d.js → index-0ece87a6.js} +1 -0
- package/dist/esm/index-a7d3d3f1.js +10 -6
- package/dist/esm/loader.js +1 -1
- package/dist/{components/pesquisa-fetcher.js → esm/pesquisa-fetcher-dd3ca0a5.js} +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/{snk-actions-button.entry.js → snk-actions-button_2.entry.js} +215 -93
- package/dist/esm/snk-application.entry.js +475 -141
- package/dist/esm/snk-attach.entry.js +27 -11
- package/dist/esm/snk-config-options.entry.js +1 -1
- package/dist/esm/snk-configurator.entry.js +18 -3
- package/dist/esm/snk-crud.entry.js +128 -18
- package/dist/esm/snk-custom-slot-elements.entry.js +16 -0
- package/dist/esm/snk-data-exporter.entry.js +13 -12
- package/dist/esm/{snk-data-unit-1715d2f1.js → snk-data-unit-6208ebf0.js} +16 -6
- package/dist/esm/snk-data-unit.entry.js +2 -2
- package/dist/esm/snk-detail-view.entry.js +34 -14
- package/dist/esm/snk-field-config.entry.js +1 -1
- package/dist/esm/snk-filter-advanced-mode_2.entry.js +2 -2
- package/dist/esm/snk-filter-bar.entry.js +165 -19
- package/dist/esm/snk-filter-binary-select.entry.js +1 -1
- package/dist/esm/snk-filter-checkbox-list.entry.js +48 -0
- package/dist/esm/snk-filter-detail.entry.js +9 -2
- package/dist/esm/snk-filter-field-search_2.entry.js +2 -2
- package/dist/esm/snk-filter-item.entry.js +39 -15
- package/dist/esm/snk-filter-list.entry.js +1 -1
- package/dist/esm/snk-filter-modal-item.entry.js +9 -9
- package/dist/esm/snk-filter-modal.entry.js +38 -7
- package/dist/esm/snk-filter-multi-select.entry.js +1 -1
- package/dist/esm/snk-filter-number.entry.js +42 -3
- package/dist/esm/snk-filter-period.entry.js +3 -3
- package/dist/esm/snk-filter-search.entry.js +1 -1
- package/dist/esm/snk-form-config.entry.js +16 -15
- package/dist/esm/snk-form-view.entry.js +14 -0
- package/dist/esm/snk-form.entry.js +6 -7
- package/dist/esm/snk-grid-config.entry.js +6 -7
- package/dist/esm/snk-grid.entry.js +132 -41
- package/dist/esm/{snk-guides-viewer-b0e32a7d.js → snk-guides-viewer-9d5e073f.js} +161 -22
- package/dist/esm/snk-guides-viewer.entry.js +16 -13
- package/dist/esm/snk-personalized-filter-editor.entry.js +1 -1
- package/dist/esm/snk-personalized-filter.entry.js +24 -13
- package/dist/esm/snk-select-box.entry.js +1 -1
- package/dist/esm/snk-simple-crud.entry.js +126 -102
- package/dist/esm/snk-tab-config.entry.js +12 -11
- package/dist/esm/snk-taskbar.entry.js +3 -3
- package/dist/esm/{taskbar-elements-0a6b8b95.js → taskbar-elements-d4d0b424.js} +4 -4
- package/dist/sankhyablocks/p-01ba23cd.entry.js +1 -0
- package/dist/sankhyablocks/p-03dcc5ff.entry.js +1 -0
- package/dist/sankhyablocks/{p-5c1aacc7.js → p-057fad05.js} +1 -1
- package/dist/sankhyablocks/p-0874adb5.entry.js +1 -0
- package/dist/sankhyablocks/p-094c30cb.js +1 -0
- package/dist/sankhyablocks/p-0d084a0f.entry.js +1 -0
- package/dist/sankhyablocks/{p-c870b530.js → p-0d7863ed.js} +1 -1
- package/dist/sankhyablocks/p-11081798.entry.js +1 -0
- package/dist/sankhyablocks/p-143425c0.entry.js +1 -0
- package/dist/sankhyablocks/{p-cb37982f.entry.js → p-20726710.entry.js} +1 -1
- package/dist/sankhyablocks/p-32f0935f.js +1 -0
- package/dist/sankhyablocks/p-3520c088.entry.js +1 -0
- package/dist/sankhyablocks/p-374d03f6.js +1 -0
- package/dist/sankhyablocks/p-38289a55.js +1 -0
- package/dist/sankhyablocks/{p-25c5428f.entry.js → p-3ab6df3d.entry.js} +1 -1
- package/dist/sankhyablocks/p-3b60db06.entry.js +1 -0
- package/dist/sankhyablocks/{p-eb636e15.entry.js → p-41f8bfa3.entry.js} +1 -1
- package/dist/sankhyablocks/p-4775a293.entry.js +1 -0
- package/dist/sankhyablocks/p-4b0938f6.entry.js +1 -0
- package/dist/sankhyablocks/p-585294ee.js +56 -0
- package/dist/sankhyablocks/p-5f74c859.entry.js +1 -0
- package/dist/sankhyablocks/p-69754d94.entry.js +1 -0
- package/dist/sankhyablocks/p-6977a26c.entry.js +1 -0
- package/dist/sankhyablocks/{p-648a7c72.entry.js → p-69efa80d.entry.js} +1 -1
- package/dist/sankhyablocks/p-70589af8.entry.js +1 -0
- package/dist/sankhyablocks/p-776ee8e3.js +1 -0
- package/dist/sankhyablocks/{p-959e0835.entry.js → p-7e2ded86.entry.js} +1 -1
- package/dist/sankhyablocks/p-7f9d6b5d.entry.js +11 -0
- package/dist/sankhyablocks/{p-0885ed3c.entry.js → p-8002dcd0.entry.js} +1 -1
- package/dist/sankhyablocks/p-809f367d.entry.js +1 -0
- package/dist/sankhyablocks/p-8437508f.js +1 -0
- package/dist/sankhyablocks/p-8eb67fa4.entry.js +1 -0
- package/dist/sankhyablocks/{p-f30526a7.entry.js → p-95df461f.entry.js} +1 -1
- package/dist/sankhyablocks/p-9695f78b.js +1 -0
- package/dist/sankhyablocks/{p-838f8234.entry.js → p-98674137.entry.js} +1 -1
- package/dist/sankhyablocks/p-a87229cd.entry.js +1 -0
- package/dist/sankhyablocks/p-a9e5b094.entry.js +1 -0
- package/dist/sankhyablocks/p-aaa3ee68.entry.js +1 -0
- package/dist/sankhyablocks/p-b0ef4383.js +1 -0
- package/dist/sankhyablocks/p-ba627e85.js +60 -0
- package/dist/sankhyablocks/p-c22c1d8e.js +1 -0
- package/dist/sankhyablocks/p-c2495304.js +1 -0
- package/dist/sankhyablocks/{p-26ad62b9.entry.js → p-c758265f.entry.js} +1 -1
- package/dist/sankhyablocks/{p-fe49067d.entry.js → p-c8622597.entry.js} +1 -1
- package/dist/sankhyablocks/p-cb7419e0.entry.js +1 -0
- package/dist/sankhyablocks/p-d1007720.entry.js +1 -0
- package/dist/sankhyablocks/{p-a1e1b305.entry.js → p-d3f53df2.entry.js} +1 -1
- package/dist/sankhyablocks/p-d6317851.entry.js +1 -0
- package/dist/sankhyablocks/{p-b13cb8b5.js → p-d9bb09b3.js} +2 -2
- package/dist/sankhyablocks/p-e3132789.entry.js +1 -0
- package/dist/sankhyablocks/p-e6380c60.js +1 -0
- package/dist/sankhyablocks/p-f514913b.entry.js +1 -0
- package/dist/sankhyablocks/p-fa80e546.js +1 -0
- package/dist/sankhyablocks/p-fa816fb2.js +1 -0
- package/dist/sankhyablocks/p-fd8814b9.entry.js +1 -0
- package/dist/sankhyablocks/{p-584d7212.js → p-ff1990ad.js} +1 -1
- package/dist/sankhyablocks/p-ff6064e7.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-actions-button/clientEvent/index.d.ts +1 -1
- package/dist/types/components/snk-actions-button/subcomponents/snk-actions-form.d.ts +1 -1
- package/dist/types/components/snk-application/snk-application.d.ts +90 -15
- package/dist/types/components/snk-attach/snk-attach.d.ts +1 -0
- package/dist/types/components/snk-configurator/snk-configurator.d.ts +6 -0
- package/dist/types/components/snk-crud/snk-crud.d.ts +13 -0
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +3 -0
- package/dist/types/components/snk-crud/subcomponents/snk-form-view.d.ts +10 -1
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +49 -12
- package/dist/types/components/snk-custom-slot-elements/snk-custom-slot-elements.d.ts +7 -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/enum/filterNumberVariation.d.ts +4 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-checkbox-list.d.ts +27 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-number.d.ts +24 -2
- package/dist/types/components/snk-filter-bar/filter-item/filter-item-type.enum.d.ts +2 -1
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +2 -0
- package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +15 -1
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +30 -0
- package/dist/types/components/snk-filter-bar/utils/SnkFilterModalFactory.d.ts +5 -1
- package/dist/types/components/snk-form/SnkFormConfigManager.d.ts +6 -1
- package/dist/types/components/snk-grid/filtercolumn/SnkMultiSelectionListDataSource.d.ts +2 -0
- package/dist/types/components/snk-grid/snk-grid.d.ts +20 -6
- package/dist/types/components/snk-personalized-filter/snk-personalized-filter.d.ts +4 -1
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-param-config/utils/PersonalizedFilterUtils.d.ts +1 -1
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +24 -2
- package/dist/types/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.d.ts +59 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +18 -2
- package/dist/types/components/snk-taskbar/subcomponents/field-search.d.ts +4 -0
- package/dist/types/components.d.ts +256 -32
- package/dist/types/lib/@types/index.d.ts +2 -1
- package/dist/types/lib/dataUnit/InMemoryLoader.d.ts +5 -1
- package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +8 -4
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.d.ts +13 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.d.ts +19 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.d.ts +22 -0
- package/dist/types/lib/http/data-fetcher/fetchers/{dataunit-fetcher.d.ts → data-unit/dataunit-fetcher.d.ts} +5 -3
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/ILoadDataResult.d.ts +6 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/ILoadDataStrategy.d.ts +7 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/ILoadingInfo.d.ts +10 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRecordField.d.ts +4 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/IResponseRecord.d.ts +6 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DataUnitStrategy.d.ts +9 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.d.ts +16 -0
- package/dist/types/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.d.ts +1 -1
- package/dist/types/lib/index.d.ts +1 -1
- package/dist/types/lib/message/resources/snk-application.msg.d.ts +2 -0
- package/dist/types/lib/message/resources/snk-simple-crud.msg.d.ts +2 -0
- package/dist/types/lib/utils/constants.d.ts +3 -4
- package/dist/types/lib/workspace/workspace.d.ts +6 -0
- package/package.json +4 -4
- package/react/components.d.ts +3 -1
- package/react/components.js +3 -1
- package/react/components.js.map +1 -1
- package/dist/cjs/_commonjsHelpers-537d719a.js +0 -20
- package/dist/cjs/dataunit-fetcher-910be4ce.js +0 -356
- package/dist/cjs/draggable.bundle-82a25c06.js +0 -6886
- package/dist/cjs/snk-taskbar-custom-elements.cjs.entry.js +0 -20
- package/dist/collection/components/snk-data-unit/snk-data-unit.css +0 -6
- package/dist/components/_commonjsHelpers.js +0 -17
- package/dist/components/snk-taskbar-custom-elements.d.ts +0 -11
- package/dist/components/snk-taskbar-custom-elements.js +0 -35
- package/dist/esm/_commonjsHelpers-9943807e.js +0 -17
- package/dist/esm/dataunit-fetcher-bd8f9572.js +0 -354
- package/dist/esm/draggable.bundle-41d56f06.js +0 -6884
- package/dist/esm/pesquisa-fetcher-27819123.js +0 -165
- package/dist/esm/snk-taskbar-custom-elements.entry.js +0 -16
- package/dist/sankhyablocks/p-0df2ead8.entry.js +0 -11
- package/dist/sankhyablocks/p-112455b1.js +0 -1
- package/dist/sankhyablocks/p-324ce41e.entry.js +0 -1
- package/dist/sankhyablocks/p-34604220.entry.js +0 -1
- package/dist/sankhyablocks/p-4a78e118.js +0 -1
- package/dist/sankhyablocks/p-5534e08c.js +0 -1
- package/dist/sankhyablocks/p-5d04ae42.entry.js +0 -1
- package/dist/sankhyablocks/p-6a38bda5.entry.js +0 -1
- package/dist/sankhyablocks/p-7bcd2f89.js +0 -56
- package/dist/sankhyablocks/p-7bd5aea7.js +0 -1
- package/dist/sankhyablocks/p-8014cc25.entry.js +0 -1
- package/dist/sankhyablocks/p-928efcaa.entry.js +0 -1
- package/dist/sankhyablocks/p-989937ee.entry.js +0 -1
- package/dist/sankhyablocks/p-9a270401.entry.js +0 -1
- package/dist/sankhyablocks/p-a7ee0e6f.entry.js +0 -1
- package/dist/sankhyablocks/p-ac0556a3.js +0 -1
- package/dist/sankhyablocks/p-ae6aff81.js +0 -1
- package/dist/sankhyablocks/p-b244640b.js +0 -1
- package/dist/sankhyablocks/p-b6d6b172.js +0 -1
- package/dist/sankhyablocks/p-bba91710.entry.js +0 -1
- package/dist/sankhyablocks/p-bd628455.entry.js +0 -1
- package/dist/sankhyablocks/p-c2beb95c.js +0 -1
- package/dist/sankhyablocks/p-c555075c.entry.js +0 -1
- package/dist/sankhyablocks/p-c9841939.js +0 -1
- package/dist/sankhyablocks/p-d3ec3586.entry.js +0 -1
- package/dist/sankhyablocks/p-d708b4ab.entry.js +0 -1
- package/dist/sankhyablocks/p-d84bc5c1.js +0 -1
- package/dist/sankhyablocks/p-de76b8a8.js +0 -76
- package/dist/sankhyablocks/p-e19014a9.entry.js +0 -1
- package/dist/sankhyablocks/p-e1cb1f0b.js +0 -1
- package/dist/sankhyablocks/p-e3a82e1c.entry.js +0 -1
- package/dist/sankhyablocks/p-e9b53a9a.entry.js +0 -1
- package/dist/sankhyablocks/p-ebf8c5df.entry.js +0 -1
- package/dist/sankhyablocks/p-ed5f1204.entry.js +0 -1
- package/dist/sankhyablocks/p-f9395c20.entry.js +0 -1
- package/dist/sankhyablocks/p-f94b999e.entry.js +0 -1
- package/dist/sankhyablocks/p-fa9d3f73.js +0 -1
- package/dist/sankhyablocks/p-fb1ecd0b.entry.js +0 -1
- package/dist/sankhyablocks/p-fcd09423.entry.js +0 -1
- package/dist/sankhyablocks/p-fd15aaac.entry.js +0 -1
- package/dist/types/components/snk-taskbar/snk-taskbar-custom-elements.d.ts +0 -7
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-a7d3d3f1.js';
|
|
2
|
-
import { ElementIDUtils, ApplicationContext, DataType } from '@sankhyalabs/core';
|
|
3
|
-
import { UserInterface } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
4
|
-
import { T as TaskbarElement } from './taskbar-elements-
|
|
5
|
-
import { C as ConfigStorage } from './ConfigStorage-
|
|
6
|
-
import { P as PresentationMode } from './index-
|
|
7
|
-
import { T as TaskbarProcessor } from './
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, F as Fragment, g as getElement } from './index-a7d3d3f1.js';
|
|
2
|
+
import { ElementIDUtils, ApplicationContext, StringUtils, DataType } from '@sankhyalabs/core';
|
|
3
|
+
import { SortMode, UserInterface } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
4
|
+
import { T as TaskbarElement } from './taskbar-elements-d4d0b424.js';
|
|
5
|
+
import { C as ConfigStorage } from './ConfigStorage-1244b8b0.js';
|
|
6
|
+
import { P as PresentationMode } from './index-0ece87a6.js';
|
|
7
|
+
import { T as TaskbarProcessor, o as openFieldSearch, b as buildFieldSearch } from './field-search-efbe307f.js';
|
|
8
8
|
import { s as store } from './index-bdf75557.js';
|
|
9
|
-
import { S as SnkMultiSelectionListDataSource } from './SnkMultiSelectionListDataSource-
|
|
9
|
+
import { S as SnkMultiSelectionListDataSource } from './SnkMultiSelectionListDataSource-44494b0e.js';
|
|
10
10
|
import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
|
|
11
|
-
import './form-config-fetcher-
|
|
12
|
-
import './DataFetcher-
|
|
13
|
-
import './_commonjsHelpers-9943807e.js';
|
|
11
|
+
import './form-config-fetcher-36219cd3.js';
|
|
12
|
+
import './DataFetcher-aa159c5a.js';
|
|
14
13
|
import './PrintUtils-3e4ff0f5.js';
|
|
15
|
-
import './filter-item-type.enum-
|
|
14
|
+
import './filter-item-type.enum-d45e026f.js';
|
|
15
|
+
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource';
|
|
16
|
+
import './PreloadManager-c1c2f2b4.js';
|
|
17
|
+
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
|
16
18
|
|
|
17
|
-
const snkGridCss = ".snk-grid__container.sc-snk-grid{display:flex;height:100%;width:100%}.snk-grid__header.sc-snk-grid{display:flex;flex-wrap:nowrap;
|
|
19
|
+
const snkGridCss = ".sc-snk-grid-h{--snk-grid-min-height:300px}.snk-grid__container.sc-snk-grid{display:flex;height:100%;width:100%}.snk-grid__header.sc-snk-grid{width:100%;display:flex;flex-wrap:nowrap;justify-content:flex-end}.snk-grid__filter-bar.sc-snk-grid{width:100%}.snk-grid__header-divider.sc-snk-grid{margin-bottom:var(--space--medium)}.snk-grid__table.sc-snk-grid{min-height:var(--snk-grid-min-height)}.snk-grid-container__without-shadow.sc-snk-grid{--ezgrid__container--shadow:unset}";
|
|
18
20
|
|
|
19
21
|
const SnkGrid = class {
|
|
20
22
|
constructor(hostRef) {
|
|
@@ -24,19 +26,27 @@ const SnkGrid = class {
|
|
|
24
26
|
this._topTaskbarProcessor = new TaskbarProcessor({
|
|
25
27
|
"snkGridTopTaskbar.regular": ["FORM_MODE", "CONFIGURATOR", "INSERT"],
|
|
26
28
|
"snkGridTopTaskbar.regular.secondary": ["FORM_MODE", "CONFIGURATOR", "INSERT"],
|
|
29
|
+
"snkGridTopTaskbar.regular.singleTaskbar": [],
|
|
27
30
|
"snkGridTopTaskbar.finish_edition": ["CANCEL", "SAVE"],
|
|
28
|
-
"snkGridTopTaskbar.finish_edition.secondary": []
|
|
31
|
+
"snkGridTopTaskbar.finish_edition.secondary": [],
|
|
32
|
+
"snkGridTopTaskbar.finish_edition.singleTaskbar": [],
|
|
29
33
|
});
|
|
30
34
|
this._headerTaskbarProcessor = new TaskbarProcessor({
|
|
31
|
-
"snkGridHeaderTaskbar.unselected": ["REFRESH", "DATA_EXPORTER", "ACTIONS_BUTTON"],
|
|
35
|
+
"snkGridHeaderTaskbar.unselected": ["REFRESH", "DATA_EXPORTER", "ACTIONS_BUTTON", "MORE_OPTIONS"],
|
|
32
36
|
"snkGridHeaderTaskbar.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "ATTACH", "REFRESH", "DATA_EXPORTER", "ACTIONS_BUTTON"],
|
|
33
|
-
"snkGridHeaderTaskbar.detail.unselected": ["REFRESH"],
|
|
34
|
-
"snkGridHeaderTaskbar.detail.selected": ["UPDATE", "ATTACH", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "REFRESH"]
|
|
37
|
+
"snkGridHeaderTaskbar.detail.unselected": ["REFRESH", "MORE_OPTIONS"],
|
|
38
|
+
"snkGridHeaderTaskbar.detail.selected": ["UPDATE", "ATTACH", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "REFRESH"],
|
|
39
|
+
"snkGridHeaderTaskbar.singleTaskbar.unselected": ["INSERT", "FORM_MODE", "CONFIGURATOR", "REFRESH", "DATA_EXPORTER", "ACTIONS_BUTTON", "MORE_OPTIONS"],
|
|
40
|
+
"snkGridHeaderTaskbar.singleTaskbar.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "ATTACH", "FORM_MODE", "CONFIGURATOR", "REFRESH", "DATA_EXPORTER", "ACTIONS_BUTTON"],
|
|
41
|
+
"snkGridHeaderTaskbar.singleTaskbar.detail.unselected": ["INSERT", "FORM_MODE", "CONFIGURATOR", "REFRESH", "MORE_OPTIONS"],
|
|
42
|
+
"snkGridHeaderTaskbar.singleTaskbar.detail.selected": ["UPDATE", "ATTACH", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "FORM_MODE", "CONFIGURATOR", "REFRESH"],
|
|
43
|
+
"snkGridHeaderTaskbar.singleTaskbar.finish_edition": ["CANCEL", "SAVE"]
|
|
35
44
|
});
|
|
36
45
|
this._dataUnit = undefined;
|
|
37
46
|
this._dataState = undefined;
|
|
38
47
|
this._gridConfig = undefined;
|
|
39
48
|
this._popUpGridConfig = false;
|
|
49
|
+
this._showSnkFilterBar = true;
|
|
40
50
|
this.columnFilterDataSource = new SnkMultiSelectionListDataSource();
|
|
41
51
|
this.configName = undefined;
|
|
42
52
|
this.resourceID = undefined;
|
|
@@ -86,6 +96,18 @@ const SnkGrid = class {
|
|
|
86
96
|
var _a;
|
|
87
97
|
(_a = this._snkFilterBar) === null || _a === void 0 ? void 0 : _a.reload();
|
|
88
98
|
}
|
|
99
|
+
/**
|
|
100
|
+
* Retorna o elemento da filter-bar da grade.
|
|
101
|
+
*/
|
|
102
|
+
async getFilterBar() {
|
|
103
|
+
return this._snkFilterBar;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Abre o localizador de colunas
|
|
107
|
+
*/
|
|
108
|
+
async findColumn() {
|
|
109
|
+
await openFieldSearch(this._moreOptions, this._columnSearch);
|
|
110
|
+
}
|
|
89
111
|
openGridConfig() {
|
|
90
112
|
this._grid.getColumnsState()
|
|
91
113
|
.then((gridColumns) => {
|
|
@@ -99,6 +121,19 @@ const SnkGrid = class {
|
|
|
99
121
|
}
|
|
100
122
|
setGridConfig(config) {
|
|
101
123
|
this._gridConfig = config;
|
|
124
|
+
this.assertDefaultSorting();
|
|
125
|
+
}
|
|
126
|
+
assertDefaultSorting() {
|
|
127
|
+
if (this._gridConfig && this._dataUnit) {
|
|
128
|
+
this._dataUnit.defaultSorting = this._gridConfig
|
|
129
|
+
.columns
|
|
130
|
+
.filter(col => col.ascending != undefined)
|
|
131
|
+
.sort((colA, colB) => colA.orderIndex - colB.orderIndex)
|
|
132
|
+
.map(({ name: field, ascending }) => {
|
|
133
|
+
const { dataType } = this._dataUnit.getField(field);
|
|
134
|
+
return { field, dataType, mode: ascending ? SortMode.ASC : SortMode.DESC };
|
|
135
|
+
});
|
|
136
|
+
}
|
|
102
137
|
}
|
|
103
138
|
loadConfig() {
|
|
104
139
|
ConfigStorage.loadGridConfig(this.configName, this.resourceID)
|
|
@@ -224,11 +259,12 @@ const SnkGrid = class {
|
|
|
224
259
|
ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
225
260
|
}
|
|
226
261
|
finshLoading() {
|
|
227
|
-
|
|
228
|
-
this._dataUnitLoadLockerResolver = this._dataUnit.addLoadingLocker();
|
|
262
|
+
this.assertDefaultSorting();
|
|
229
263
|
this.addElementID();
|
|
230
|
-
(
|
|
231
|
-
|
|
264
|
+
if (this.columnFilterDataSource != undefined) {
|
|
265
|
+
this.columnFilterDataSource.setApplication(this._application);
|
|
266
|
+
this.columnFilterDataSource.setDataUnit(this._dataUnit);
|
|
267
|
+
}
|
|
232
268
|
}
|
|
233
269
|
componentWillLoad() {
|
|
234
270
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
@@ -281,46 +317,101 @@ const SnkGrid = class {
|
|
|
281
317
|
if (!this._dataUnit || this._dataUnit.records.length === 0)
|
|
282
318
|
invisibleButtons.push("DATA_EXPORTER");
|
|
283
319
|
if (this._dataState && this._dataState.selectionInfo.mode === SelectionMode.ALL_RECORDS)
|
|
284
|
-
invisibleButtons.push("ACTIONS_BUTTON"
|
|
320
|
+
invisibleButtons.push("ACTIONS_BUTTON");
|
|
285
321
|
return invisibleButtons;
|
|
286
322
|
}
|
|
287
323
|
componentWillRender() {
|
|
288
|
-
var _a;
|
|
289
324
|
const invisibleButtons = this.getInvisibleButtons();
|
|
325
|
+
this._headerTaskbarProcessor.process(this.getHeaderTaskbarId(), this.taskbarManager, this._dataState, this.getHeaderDisabledButtons(), invisibleButtons);
|
|
326
|
+
this._topTaskbarProcessor.process(this.getTopTaskBarId(), this.taskbarManager, this._dataState, undefined, invisibleButtons);
|
|
327
|
+
this.dataExporterProviderStore();
|
|
328
|
+
}
|
|
329
|
+
getHeaderTaskbarId() {
|
|
330
|
+
var _a, _b;
|
|
290
331
|
const hasSelectedRecord = this._dataState && !!((_a = this._dataState.selectionInfo) === null || _a === void 0 ? void 0 : _a.length);
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
332
|
+
const taskbarIdPrefixLookup = {
|
|
333
|
+
primary: this.isDetail ? "snkGridHeaderTaskbar.detail" : "snkGridHeaderTaskbar",
|
|
334
|
+
secondary: this.isDetail ? "snkGridHeaderTaskbar.detail" : "snkGridHeaderTaskbar",
|
|
335
|
+
singleTaskbar: this.isDetail ? "snkGridHeaderTaskbar.singleTaskbar.detail" : "snkGridHeaderTaskbar.singleTaskbar"
|
|
336
|
+
};
|
|
337
|
+
const taskbarIdPrefix = taskbarIdPrefixLookup[this.presentationMode];
|
|
338
|
+
let headerTaskbarId = hasSelectedRecord ? `${taskbarIdPrefix}.selected` : `${taskbarIdPrefix}.unselected`;
|
|
339
|
+
if (((_b = this._dataState) === null || _b === void 0 ? void 0 : _b.isDirty) && this.presentationMode === PresentationMode.SINGLE_TASKBAR) {
|
|
340
|
+
headerTaskbarId = "snkGridHeaderTaskbar.singleTaskbar.finish_edition";
|
|
297
341
|
}
|
|
298
|
-
|
|
299
|
-
this._topTaskbarProcessor.process(this.getTopTaskBarId(this.presentationMode === PresentationMode.SECONDARY ? ".secondary" : ""), this.taskbarManager, this._dataState, undefined, invisibleButtons);
|
|
300
|
-
this.dataExporterProviderStore();
|
|
342
|
+
return headerTaskbarId;
|
|
301
343
|
}
|
|
302
|
-
getTopTaskBarId(
|
|
344
|
+
getTopTaskBarId() {
|
|
303
345
|
var _a;
|
|
346
|
+
const suffixLookup = {
|
|
347
|
+
primary: "",
|
|
348
|
+
secondary: ".secondary",
|
|
349
|
+
singleTaskbar: ".singleTaskbar"
|
|
350
|
+
};
|
|
351
|
+
const sufix = suffixLookup[this.presentationMode];
|
|
304
352
|
if ((_a = this._dataState) === null || _a === void 0 ? void 0 : _a.isDirty) {
|
|
305
353
|
return `snkGridTopTaskbar.finish_edition${sufix}`;
|
|
306
354
|
}
|
|
307
355
|
return `snkGridTopTaskbar.regular${sufix}`;
|
|
308
356
|
}
|
|
309
357
|
getPrimaryButton() {
|
|
310
|
-
|
|
358
|
+
const primaryButtonLookup = {
|
|
359
|
+
primary: "INSERT",
|
|
360
|
+
secondary: "",
|
|
361
|
+
singleTaskbar: "INSERT"
|
|
362
|
+
};
|
|
363
|
+
return primaryButtonLookup[this.presentationMode];
|
|
311
364
|
}
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
365
|
+
getColumnSearch(actionButton, item) {
|
|
366
|
+
if (this._columnSearch != undefined) {
|
|
367
|
+
return this._columnSearch;
|
|
368
|
+
}
|
|
369
|
+
this._moreOptions = actionButton;
|
|
370
|
+
this._columnSearch = buildFieldSearch(item, ({ argument }) => new Promise(accept => {
|
|
371
|
+
this._grid.filterColumns(argument).then((columns) => {
|
|
372
|
+
accept(columns
|
|
373
|
+
.filter(column => !column.hidden)
|
|
374
|
+
.map(column => ({ label: column.label, value: column.name })));
|
|
375
|
+
});
|
|
376
|
+
}), (option) => {
|
|
377
|
+
if (option != undefined) {
|
|
378
|
+
this._grid.locateColumn(option.value);
|
|
379
|
+
actionButton.hideActions();
|
|
380
|
+
}
|
|
381
|
+
});
|
|
382
|
+
return this._columnSearch;
|
|
383
|
+
}
|
|
384
|
+
getActionsList() {
|
|
385
|
+
const hardList = [{
|
|
386
|
+
value: StringUtils.generateUUID(),
|
|
387
|
+
label: this.messagesBuilder.getMessage("snkGrid.findColumn", {}),
|
|
388
|
+
disableCloseOnSelect: true,
|
|
389
|
+
eagerInitialize: true,
|
|
390
|
+
itemBuilder: (actionButton, item) => this.getColumnSearch(actionButton, item)
|
|
391
|
+
}];
|
|
392
|
+
if (this.taskbarManager != undefined && this.taskbarManager.getMoreOptions != undefined) {
|
|
393
|
+
const taskbarID = this.getTopTaskBarId();
|
|
394
|
+
return hardList.concat(this.taskbarManager.getMoreOptions(taskbarID, this.configName, this._dataState, this.actionsList));
|
|
395
|
+
}
|
|
396
|
+
return hardList.concat(this.actionsList);
|
|
397
|
+
}
|
|
398
|
+
handleFilterConfigUpdated(filterConfig) {
|
|
399
|
+
if (!filterConfig.length) {
|
|
400
|
+
this._showSnkFilterBar = false;
|
|
401
|
+
return;
|
|
402
|
+
}
|
|
403
|
+
if (filterConfig.length === 1 && filterConfig[0].id === 'PERSONALIZED_FILTER_GROUP') {
|
|
404
|
+
this._showSnkFilterBar = filterConfig[0].groupedItems.length > 0;
|
|
405
|
+
return;
|
|
406
|
+
}
|
|
407
|
+
this._showSnkFilterBar = true;
|
|
316
408
|
}
|
|
317
409
|
render() {
|
|
318
|
-
var _a, _b;
|
|
319
410
|
if (!this._dataUnit) {
|
|
320
411
|
return undefined;
|
|
321
412
|
}
|
|
322
|
-
return (h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, h("div", { class: "snk-grid__header ez-margin-bottom--medium" },
|
|
323
|
-
h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" }), h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId }, h("slot", { name: this.topTaskbarCustomSlotId }))), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: () => this.gridDoubleClick.emit(), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection,
|
|
413
|
+
return (h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, h("div", { class: "snk-grid__header ez-margin-bottom--medium" }, this._showSnkFilterBar &&
|
|
414
|
+
h(Fragment, null, h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, 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) }), h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId }, h("slot", { name: this.topTaskbarCustomSlotId }))), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: (evt) => this.gridDoubleClick.emit(evt.detail), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit }, h("snk-taskbar", { dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this._headerTaskbarProcessor.buttons, presentationMode: this.presentationMode, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.getActionsList(), primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId }, h("slot", { name: this.gridHeaderCustomSlotId }))), h("div", { class: "ez-col ez-col--sd-12" }, h("slot", { name: "SnkGridFooter" })), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), application: this._application, selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
|
|
324
415
|
}
|
|
325
416
|
get _element() { return getElement(this); }
|
|
326
417
|
};
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, F as Fragment } from './index-a7d3d3f1.js';
|
|
2
|
-
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
3
|
-
import { S as SnkFormConfigManager } from './SnkFormConfigManager-
|
|
2
|
+
import { Action, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
|
+
import { S as SnkFormConfigManager } from './SnkFormConfigManager-9be0e7d4.js';
|
|
4
4
|
import { buildFormMetadata, FormMetadata } from '@sankhyalabs/ezui/dist/collection/utils/form';
|
|
5
|
-
import { T as TaskbarProcessor } from './
|
|
6
|
-
import { T as TaskbarElement } from './taskbar-elements-
|
|
7
|
-
import {
|
|
8
|
-
import './DataFetcher-
|
|
9
|
-
import './pesquisa-fetcher-
|
|
10
|
-
import { P as PresentationMode } from './index-
|
|
5
|
+
import { o as openFieldSearch, T as TaskbarProcessor, b as buildFieldSearch } from './field-search-efbe307f.js';
|
|
6
|
+
import { T as TaskbarElement } from './taskbar-elements-d4d0b424.js';
|
|
7
|
+
import { d as VIEW_MODE } from './constants-8457af36.js';
|
|
8
|
+
import './DataFetcher-aa159c5a.js';
|
|
9
|
+
import './pesquisa-fetcher-dd3ca0a5.js';
|
|
10
|
+
import { P as PresentationMode } from './index-0ece87a6.js';
|
|
11
11
|
import './ISave-4412b20c.js';
|
|
12
12
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
13
13
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
14
|
-
import './
|
|
15
|
-
import './
|
|
14
|
+
import './dataunit-fetcher-e218c6d2.js';
|
|
15
|
+
import './PreloadManager-c1c2f2b4.js';
|
|
16
|
+
import './filter-item-type.enum-d45e026f.js';
|
|
17
|
+
import './form-config-fetcher-36219cd3.js';
|
|
16
18
|
import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
|
|
17
19
|
|
|
18
20
|
const snkGuidesViewerCss = ".sc-snk-guides-viewer-h{--snk-guides-viewer--space-large:var(--space--large, 24px);--snk-guides-viewer--space-medium:var(--space--medium, 12px);--snk-guides-viewer__header--min-height:94px;--snk-guides-viewer__header--z-index:var(--more-visible, 2);--snk-guides-viewer__header--background-color:var(--background--body, #fafcff);--snk-guides-viewer__guide-navigator--width:340px;display:block}snk-form-view.sc-snk-guides-viewer{width:100%}.snk-guides-viewer.sc-snk-guides-viewer{position:relative;padding-left:0px;padding-top:0px;padding-right:var(--snk-guides-viewer--space-large);padding-bottom:var(--snk-guides-viewer--space-large)}.snk-guides-viewer__detail-container.sc-snk-guides-viewer{display:flex;row-gap:24px;flex-direction:column}.snk-guides-viewer__header.sc-snk-guides-viewer{position:sticky;align-items:center;top:0;z-index:var(--snk-guides-viewer__header--z-index);background-color:var(--snk-guides-viewer__header--background-color);min-height:var(--snk-guides-viewer__header--min-height);width:calc(100% + (var(--snk-guides-viewer--space-large) * 2));padding-left:var(--snk-guides-viewer--space-large);padding-right:var(--snk-guides-viewer--space-large);padding-top:var(--snk-guides-viewer--space-large);padding-bottom:var(--snk-guides-viewer--space-medium);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-medium)}.snk-guides-viewer__container.sc-snk-guides-viewer{display:grid;grid-template-columns:minmax(0, auto) minmax(0, 100%);height:100%;column-gap:var(--snk-guides-viewer--space-large)}.snk-guides-viewer__guide-navigator.sc-snk-guides-viewer{position:sticky;top:calc(var(--snk-guides-viewer__header--min-height) + var(--snk-guides-viewer--space-medium));height:calc(100vh - var(--snk-guides-viewer__header--min-height) - var(--snk-guides-viewer--space-large) - var(--snk-guides-viewer--space-medium))}.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}";
|
|
@@ -39,10 +41,12 @@ const SnkGuidesViewer = class {
|
|
|
39
41
|
this.presentationMode = undefined;
|
|
40
42
|
this.resourceID = undefined;
|
|
41
43
|
this.detailTaskbarCustomContainerId = undefined;
|
|
44
|
+
this._hasToCreateFieldSearch = true;
|
|
42
45
|
this._breadcrumbItems = [];
|
|
43
46
|
this._guides = undefined;
|
|
44
47
|
this._formEditorConfigManager = undefined;
|
|
45
48
|
this._formEditorDataUnit = undefined;
|
|
49
|
+
this._fieldToGetFocus = undefined;
|
|
46
50
|
}
|
|
47
51
|
observeDataUnit() {
|
|
48
52
|
this.loadGuides(true);
|
|
@@ -67,6 +71,12 @@ const SnkGuidesViewer = class {
|
|
|
67
71
|
this._formEditorConfigManager = masterConfig ? this._configManager : this._currentDetail.formConfigManager;
|
|
68
72
|
this._formEditorDataUnit = masterConfig ? this.dataUnit : this._currentDetail.dataUnit;
|
|
69
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* Abre o localizador de campos
|
|
76
|
+
*/
|
|
77
|
+
async findField() {
|
|
78
|
+
await openFieldSearch(this._moreOptions, this._fieldSearch);
|
|
79
|
+
}
|
|
70
80
|
exitViewer() {
|
|
71
81
|
if (this.dataUnit.isDirty()) {
|
|
72
82
|
this.dataUnit.cancelEdition({ after: () => this.exit.emit() });
|
|
@@ -137,11 +147,21 @@ const SnkGuidesViewer = class {
|
|
|
137
147
|
this._breadcrumbItems = breadcrumbs;
|
|
138
148
|
});
|
|
139
149
|
});
|
|
150
|
+
this._guides = this._guides.map(guide => {
|
|
151
|
+
if (guide.id === guideItem.id) {
|
|
152
|
+
return Object.assign(Object.assign({}, guide), guideItem);
|
|
153
|
+
}
|
|
154
|
+
return guide;
|
|
155
|
+
});
|
|
140
156
|
}
|
|
141
157
|
}
|
|
158
|
+
getTaskBarId() {
|
|
159
|
+
var _a;
|
|
160
|
+
return ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "snkGuideViewer.finish_edition" : "snkGuideViewer.regular";
|
|
161
|
+
}
|
|
142
162
|
loadTaskbarProcessor() {
|
|
143
|
-
var _a
|
|
144
|
-
const taskbarId =
|
|
163
|
+
var _a;
|
|
164
|
+
const taskbarId = this.getTaskBarId();
|
|
145
165
|
const disabledButtons = [];
|
|
146
166
|
if (!this.dataState || !this.dataState.hasPrevious) {
|
|
147
167
|
disabledButtons.push("PREVIOUS");
|
|
@@ -149,7 +169,7 @@ const SnkGuidesViewer = class {
|
|
|
149
169
|
if (!this.dataState || !this.dataState.hasNext) {
|
|
150
170
|
disabledButtons.push("NEXT");
|
|
151
171
|
}
|
|
152
|
-
if ((
|
|
172
|
+
if ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.selectionInfo) {
|
|
153
173
|
if (this.dataState.selectionInfo.length > 1) {
|
|
154
174
|
disabledButtons.push("CLONE");
|
|
155
175
|
}
|
|
@@ -180,25 +200,26 @@ const SnkGuidesViewer = class {
|
|
|
180
200
|
static updateContentCard(formName, cardConfig, propertyChanged, configManager) {
|
|
181
201
|
return configManager.saveCardState(formName, cardConfig, propertyChanged);
|
|
182
202
|
}
|
|
183
|
-
static buildFixedForms(
|
|
184
|
-
|
|
203
|
+
static buildFixedForms(params) {
|
|
204
|
+
var _a;
|
|
205
|
+
const cardsState = (_a = params.formConfig) === null || _a === void 0 ? void 0 : _a.cardsState;
|
|
185
206
|
if (cardsState == undefined) {
|
|
186
207
|
return;
|
|
187
208
|
}
|
|
188
209
|
return (h(Fragment, null, Array.from(cardsState.entries())
|
|
189
|
-
.filter(([formName, cardConfig]) => (cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed) && formName != selectedForm)
|
|
210
|
+
.filter(([formName, cardConfig]) => (cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed) && formName != params.selectedForm)
|
|
190
211
|
.sort(([, cardConfigA], [, cardConfigB]) => {
|
|
191
212
|
const indexA = (cardConfigA === null || cardConfigA === void 0 ? void 0 : cardConfigA.fixSequence) || 0;
|
|
192
213
|
const indexB = (cardConfigB === null || cardConfigB === void 0 ? void 0 : cardConfigB.fixSequence) || 0;
|
|
193
214
|
return indexA - indexB;
|
|
194
215
|
})
|
|
195
216
|
.map(([formName, cardConfig]) => {
|
|
196
|
-
var _a;
|
|
197
|
-
const sheet = formMetadata.getSheet(formName);
|
|
217
|
+
var _a, _b;
|
|
218
|
+
const sheet = params.formMetadata.getSheet(formName);
|
|
198
219
|
if (sheet == undefined) {
|
|
199
220
|
return;
|
|
200
221
|
}
|
|
201
|
-
return h("snk-form-view", { levelPath: levelPath, label: sheet.label, name: formName, fields: sheet.fields, formMetadata: formMetadata, dataUnit: dataUnit, recordsValidator: recordsValidator, contracted: (cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.presentation) === "CONTRACTED", fixed: cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed, summaryFields: (_a = formConfig === null ||
|
|
222
|
+
return h("snk-form-view", { levelPath: params.levelPath, label: sheet.label, name: formName, fields: sheet.fields, formMetadata: params.formMetadata, dataUnit: params.dataUnit, recordsValidator: params.recordsValidator, contracted: (cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.presentation) === "CONTRACTED", fixed: cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed, summaryFields: (_b = (_a = params.formConfig) === null || _a === void 0 ? void 0 : _a.summary) === null || _b === void 0 ? void 0 : _b.get(formName), fieldToFocus: params.fieldToFocus, key: formName, onSnkRequestClearFieldToFocus: _ => { var _a; return (_a = params.onRequestClearFieldToFocus) === null || _a === void 0 ? void 0 : _a.call(params); } });
|
|
202
223
|
})));
|
|
203
224
|
}
|
|
204
225
|
wrapDetail(levels, content) {
|
|
@@ -247,7 +268,7 @@ const SnkGuidesViewer = class {
|
|
|
247
268
|
const sheet = this._masterFormMetadata.getSheet(cardId);
|
|
248
269
|
if (sheet) {
|
|
249
270
|
const cardConfig = (_c = (_b = this.masterFormConfig) === null || _b === void 0 ? void 0 : _b.cardsState) === null || _c === void 0 ? void 0 : _c.get(cardId);
|
|
250
|
-
content = h("snk-form-view", { ref: ref => this._mainForm = ref, fixed: cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed, summaryFields: (_e = (_d = this.masterFormConfig) === null || _d === void 0 ? void 0 : _d.summary) === null || _e === void 0 ? void 0 : _e.get(cardId), name: cardId, label: sheet.label, fields: sheet.fields, dataUnit: this.dataUnit, formMetadata: this._masterFormMetadata, recordsValidator: this.recordsValidator, key: guideId }, this.presentationMode == PresentationMode.SECONDARY && this.buildTaskBar());
|
|
271
|
+
content = h("snk-form-view", { ref: ref => this._mainForm = ref, fixed: cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed, summaryFields: (_e = (_d = this.masterFormConfig) === null || _d === void 0 ? void 0 : _d.summary) === null || _e === void 0 ? void 0 : _e.get(cardId), name: cardId, label: sheet.label, fields: sheet.fields, dataUnit: this.dataUnit, formMetadata: this._masterFormMetadata, recordsValidator: this.recordsValidator, fieldToFocus: this._fieldToGetFocus, key: guideId, onSnkRequestClearFieldToFocus: _ => this.clearFieldToFocusHandler() }, this.presentationMode == PresentationMode.SECONDARY && this.buildTaskBar());
|
|
251
272
|
}
|
|
252
273
|
}
|
|
253
274
|
return content;
|
|
@@ -264,6 +285,35 @@ const SnkGuidesViewer = class {
|
|
|
264
285
|
this._guideNavigator.getCurrentPath().then(breadcrumbs => {
|
|
265
286
|
this._breadcrumbItems = breadcrumbs;
|
|
266
287
|
});
|
|
288
|
+
this.resetGuideBadge(currentItem);
|
|
289
|
+
}
|
|
290
|
+
changeGuideHandler(guideName) {
|
|
291
|
+
var _a;
|
|
292
|
+
(_a = this._guideNavigator) === null || _a === void 0 ? void 0 : _a.selectGuide(guideName);
|
|
293
|
+
}
|
|
294
|
+
clearFieldToFocusHandler() {
|
|
295
|
+
this._fieldToGetFocus = undefined;
|
|
296
|
+
}
|
|
297
|
+
resetGuideBadge(selectedGuide) {
|
|
298
|
+
var _a;
|
|
299
|
+
this._guides = [...(_a = this._guides) === null || _a === void 0 ? void 0 : _a.map(guide => {
|
|
300
|
+
if (this.canClearGuideBadge(guide, selectedGuide.id)) {
|
|
301
|
+
return Object.assign(Object.assign({}, guide), { badge: null });
|
|
302
|
+
}
|
|
303
|
+
return guide;
|
|
304
|
+
})];
|
|
305
|
+
}
|
|
306
|
+
canClearGuideBadge(guide, idToCheck) {
|
|
307
|
+
return (guide.id === idToCheck) || this.isIncludedInChildrenList(guide, idToCheck);
|
|
308
|
+
}
|
|
309
|
+
isIncludedInChildrenList(guide, guideId) {
|
|
310
|
+
return this.hasChildren(guide) && this.getChildrenIdList(guide).includes(guideId);
|
|
311
|
+
}
|
|
312
|
+
hasChildren(guide) {
|
|
313
|
+
return guide.children && Array.isArray(guide.children);
|
|
314
|
+
}
|
|
315
|
+
getChildrenIdList(guide) {
|
|
316
|
+
return (guide.children).map(guideChild => guideChild.id);
|
|
267
317
|
}
|
|
268
318
|
getConfigViewMode() {
|
|
269
319
|
return VIEW_MODE.GRID;
|
|
@@ -309,9 +359,90 @@ const SnkGuidesViewer = class {
|
|
|
309
359
|
}
|
|
310
360
|
this._guideHasChanged = false;
|
|
311
361
|
}
|
|
362
|
+
getFieldsSearch(actionButton, item) {
|
|
363
|
+
if (this._fieldSearch == undefined || this._hasToCreateFieldSearch) {
|
|
364
|
+
this._hasToCreateFieldSearch = false;
|
|
365
|
+
this._moreOptions = actionButton;
|
|
366
|
+
actionButton.addEventListener("taskbarActionsButtonDisconnected", () => this._hasToCreateFieldSearch = true);
|
|
367
|
+
this._fieldSearch = buildFieldSearch(item, ({ argument }) => this.fieldsOptionLoader(argument), (option) => this.onSelectField(option, actionButton));
|
|
368
|
+
}
|
|
369
|
+
return this._fieldSearch;
|
|
370
|
+
}
|
|
371
|
+
fieldsOptionLoader(argument) {
|
|
372
|
+
return Promise.resolve(this._configManager.getFieldsList(this.dataUnit, argument)
|
|
373
|
+
.map(field => ({ value: field.name, label: field.label })));
|
|
374
|
+
}
|
|
375
|
+
onSelectField(option, actionButton) {
|
|
376
|
+
if (option == undefined) {
|
|
377
|
+
return;
|
|
378
|
+
}
|
|
379
|
+
this._fieldToGetFocus = option.value;
|
|
380
|
+
const fieldGuideName = this.getGuideName(option.value);
|
|
381
|
+
if (fieldGuideName !== this.selectedGuide.id) {
|
|
382
|
+
this.changeGuideHandler(fieldGuideName);
|
|
383
|
+
}
|
|
384
|
+
actionButton.hideActions();
|
|
385
|
+
}
|
|
386
|
+
getActionsList() {
|
|
387
|
+
const hardList = [{
|
|
388
|
+
value: "",
|
|
389
|
+
label: this.getMessage("snkCrud.findColumn"),
|
|
390
|
+
disableCloseOnSelect: true,
|
|
391
|
+
eagerInitialize: true,
|
|
392
|
+
itemBuilder: (actionButton, item) => this.getFieldsSearch(actionButton, item)
|
|
393
|
+
}];
|
|
394
|
+
if (this.taskbarManager != undefined && this.taskbarManager.getMoreOptions != undefined) {
|
|
395
|
+
return hardList.concat(this.taskbarManager.getMoreOptions(this.getTaskBarId(), this.configName, this.dataState, this.actionsList));
|
|
396
|
+
}
|
|
397
|
+
return hardList.concat(this.actionsList);
|
|
398
|
+
}
|
|
312
399
|
buildTaskBar() {
|
|
313
400
|
var _a;
|
|
314
|
-
return h("div", { class: `ez-col ez-flex-item--align-center ez-col--sd-6 ez-col--tb-6 ${this.presentationMode != PresentationMode.SECONDARY ? 'ez-align--right' : 'ez-padding-bottom--medium'}` }, 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.
|
|
401
|
+
return h("div", { class: `ez-col ez-flex-item--align-center ez-col--sd-6 ez-col--tb-6 ${this.presentationMode != PresentationMode.SECONDARY ? 'ez-align--right' : 'ez-padding-bottom--medium'}` }, 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(), messagesBuilder: this.messagesBuilder, presentationMode: this.presentationMode, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-taskbar-owner": "master", dataUnit: this.dataUnit, resourceID: this.resourceID, customSlotId: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" })));
|
|
402
|
+
}
|
|
403
|
+
async dataUnitActionHandler(action) {
|
|
404
|
+
var _a;
|
|
405
|
+
if (action.type === Action.FIELD_INVALIDATED) {
|
|
406
|
+
const guideName = this.getGuideName((_a = action.payload) === null || _a === void 0 ? void 0 : _a.fieldName);
|
|
407
|
+
await this.addErrorBadgeToGuide(guideName);
|
|
408
|
+
await this.openGuideNavigator(guideName);
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
async addErrorBadgeToGuide(guideName) {
|
|
412
|
+
var _a;
|
|
413
|
+
this._guides = [...(_a = this._guides) === null || _a === void 0 ? void 0 : _a.map(guide => {
|
|
414
|
+
return Object.assign(Object.assign({}, guide), { badge: this.getBadge(guide, guideName) });
|
|
415
|
+
})];
|
|
416
|
+
}
|
|
417
|
+
async openGuideNavigator(guideName) {
|
|
418
|
+
if (this.selectedGuide.id !== guideName) {
|
|
419
|
+
await this._guideNavigator.openGuideNavidator();
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
getBadge(guide, tabName) {
|
|
423
|
+
var _a;
|
|
424
|
+
if (this.selectedGuide.id === tabName) {
|
|
425
|
+
return null;
|
|
426
|
+
}
|
|
427
|
+
if (tabName === guide.id) {
|
|
428
|
+
return "error";
|
|
429
|
+
}
|
|
430
|
+
return (_a = guide.badge) !== null && _a !== void 0 ? _a : null;
|
|
431
|
+
}
|
|
432
|
+
getGuideName(fieldName) {
|
|
433
|
+
var _a;
|
|
434
|
+
for (const sheet of this._masterFormMetadata.getAllSheets()) {
|
|
435
|
+
const formFields = (_a = sheet[1]) === null || _a === void 0 ? void 0 : _a.fields;
|
|
436
|
+
for (const field of formFields) {
|
|
437
|
+
if (field.name === fieldName) {
|
|
438
|
+
return sheet[0];
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
return "";
|
|
443
|
+
}
|
|
444
|
+
componentDidLoad() {
|
|
445
|
+
this.dataUnit.subscribe(this.dataUnitActionHandler.bind(this));
|
|
315
446
|
}
|
|
316
447
|
render() {
|
|
317
448
|
var _a, _b;
|
|
@@ -330,7 +461,15 @@ const SnkGuidesViewer = class {
|
|
|
330
461
|
h("div", { class: "ez-margin-top--extra-small" }, h("ez-breadcrumb", Object.assign({ items: this._breadcrumbItems, onSelectedItem: (evt) => this.onBreadcrumbClickHandler(evt === null || evt === void 0 ? void 0 : evt.detail) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("breadcrumb")}` }))))), this.presentationMode != PresentationMode.SECONDARY && this.buildTaskBar()), h("div", { class: "snk-guides-viewer__container" }, showGuides ?
|
|
331
462
|
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) })
|
|
332
463
|
:
|
|
333
|
-
h("div", null), h("div", { class: "snk-guides-viewer__detail-container" }, SnkGuidesViewer.buildFixedForms(
|
|
464
|
+
h("div", null), h("div", { class: "snk-guides-viewer__detail-container" }, SnkGuidesViewer.buildFixedForms({
|
|
465
|
+
formConfig: this.masterFormConfig,
|
|
466
|
+
formMetadata: this._masterFormMetadata,
|
|
467
|
+
selectedForm: (_b = this.selectedGuide) === null || _b === void 0 ? void 0 : _b.id,
|
|
468
|
+
dataUnit: this.dataUnit,
|
|
469
|
+
recordsValidator: this.recordsValidator,
|
|
470
|
+
fieldToFocus: this._fieldToGetFocus,
|
|
471
|
+
onRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this)
|
|
472
|
+
}), this.getContent())), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this.getConfigViewMode(), onConfigSelected: (evt) => this.changeConfigViewMode(evt.detail), messagesBuilder: this.messagesBuilder, onOpenConfig: (evt) => this.openConfig(evt.detail), resourceID: this.resourceID })));
|
|
334
473
|
}
|
|
335
474
|
static get watchers() { return {
|
|
336
475
|
"dataUnit": ["observeDataUnit"],
|
|
@@ -1,21 +1,24 @@
|
|
|
1
|
-
export { S as snk_guides_viewer } from './snk-guides-viewer-
|
|
1
|
+
export { S as snk_guides_viewer } from './snk-guides-viewer-9d5e073f.js';
|
|
2
2
|
import './index-a7d3d3f1.js';
|
|
3
3
|
import '@sankhyalabs/core';
|
|
4
|
-
import './SnkFormConfigManager-
|
|
5
|
-
import './ConfigStorage-
|
|
6
|
-
import './form-config-fetcher-
|
|
7
|
-
import './DataFetcher-
|
|
8
|
-
import './_commonjsHelpers-9943807e.js';
|
|
9
|
-
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
4
|
+
import './SnkFormConfigManager-9be0e7d4.js';
|
|
5
|
+
import './ConfigStorage-1244b8b0.js';
|
|
6
|
+
import './form-config-fetcher-36219cd3.js';
|
|
7
|
+
import './DataFetcher-aa159c5a.js';
|
|
10
8
|
import './PrintUtils-3e4ff0f5.js';
|
|
11
|
-
import '
|
|
9
|
+
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
10
|
+
import './filter-item-type.enum-d45e026f.js';
|
|
12
11
|
import '@sankhyalabs/ezui/dist/collection/utils/form';
|
|
13
|
-
import './
|
|
14
|
-
import './taskbar-elements-
|
|
15
|
-
import './index-
|
|
12
|
+
import './field-search-efbe307f.js';
|
|
13
|
+
import './taskbar-elements-d4d0b424.js';
|
|
14
|
+
import './index-0ece87a6.js';
|
|
16
15
|
import './index-bdf75557.js';
|
|
17
|
-
import './constants-
|
|
18
|
-
import './pesquisa-fetcher-
|
|
16
|
+
import './constants-8457af36.js';
|
|
17
|
+
import './pesquisa-fetcher-dd3ca0a5.js';
|
|
19
18
|
import './ISave-4412b20c.js';
|
|
20
19
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
20
|
+
import './dataunit-fetcher-e218c6d2.js';
|
|
21
|
+
import './PreloadManager-c1c2f2b4.js';
|
|
22
|
+
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
|
23
|
+
import './ResourceIDUtils-a114189a.js';
|
|
21
24
|
import '@sankhyalabs/core/dist/dataunit/DataUnit';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host, g as getElement } from './index-a7d3d3f1.js';
|
|
2
2
|
import { ElementIDUtils, UserInterface, ApplicationContext } from '@sankhyalabs/core';
|
|
3
|
-
import { F as FilterItemType } from './filter-item-type.enum-
|
|
3
|
+
import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
|
|
4
4
|
import { E as EPresentationMode } from './presentationMode-783bbf9d.js';
|
|
5
5
|
import { EzScrollDirection } from '@sankhyalabs/ezui/dist/collection/components/ez-scroller/EzScrollDirection';
|
|
6
6
|
import { CheckMode } from '@sankhyalabs/ezui/dist/collection/utils';
|