@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,81 +1,94 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-a7d3d3f1.js';
|
|
2
|
-
import { WaitingChangeException, WarningException, ErrorException,
|
|
3
|
-
import { d as dist, D as DataFetcher, U as UrlUtils } from './DataFetcher-8daff9ad.js';
|
|
2
|
+
import { DateUtils, StringUtils, ObjectUtils, WaitingChangeException, WarningException, ErrorException, KeyboardManager, OnboardingUtils, DependencyType, ArrayUtils, SearchUtils, ElementIDUtils, ApplicationContext, DataType, ErrorTracking } from '@sankhyalabs/core';
|
|
4
3
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import './
|
|
11
|
-
import '
|
|
4
|
+
import { C as ConfigStorage } from './ConfigStorage-1244b8b0.js';
|
|
5
|
+
import { d as dist, D as DataFetcher, U as UrlUtils } from './DataFetcher-aa159c5a.js';
|
|
6
|
+
import { A as AutorizationType, a as AuthFetcher } from './auth-fetcher-c05dc474.js';
|
|
7
|
+
import { D as DataUnitFetcher } from './dataunit-fetcher-e218c6d2.js';
|
|
8
|
+
import { P as PesquisaFetcher } from './pesquisa-fetcher-dd3ca0a5.js';
|
|
9
|
+
import { S as SnkMessageBuilder } from './SnkMessageBuilder-ca843d1b.js';
|
|
10
|
+
import './form-config-fetcher-36219cd3.js';
|
|
11
|
+
import './filter-item-type.enum-d45e026f.js';
|
|
12
12
|
import './PrintUtils-3e4ff0f5.js';
|
|
13
|
-
import '
|
|
14
|
-
import './filter-item-type.enum-5028ed3f.js';
|
|
13
|
+
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
15
14
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
15
|
+
import './PreloadManager-c1c2f2b4.js';
|
|
16
|
+
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
|
17
|
+
import './ResourceIDUtils-a114189a.js';
|
|
16
18
|
|
|
17
|
-
class
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
window
|
|
21
|
-
window.addEventListener("unhandledrejection", evt => this.rejectionHandler(evt));
|
|
19
|
+
class AppletCaller {
|
|
20
|
+
static webConnectionCaller(port, methodName, params) {
|
|
21
|
+
var _a;
|
|
22
|
+
(_a = window["AppletCaller"]) === null || _a === void 0 ? void 0 : _a.webConnectionCaller(port, methodName, params);
|
|
22
23
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
else {
|
|
32
|
-
this._app.isDebugMode().then((isDebug) => {
|
|
33
|
-
if (isDebug) {
|
|
34
|
-
this._app.error("Promise rejeitada", "Erro interno: Uma promise foi rejeitada sem razão determinada.");
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const _0x5b7870=_0x2202;(function(_0x42e134,_0x5d9727){const _0x185c97=_0x2202,_0x5854c7=_0x42e134();while(!![]){try{const _0x129d35=parseInt(_0x185c97(0x18f))/0x1*(-parseInt(_0x185c97(0x183))/0x2)+-parseInt(_0x185c97(0x191))/0x3+parseInt(_0x185c97(0x17d))/0x4*(-parseInt(_0x185c97(0x185))/0x5)+parseInt(_0x185c97(0x184))/0x6*(-parseInt(_0x185c97(0x182))/0x7)+parseInt(_0x185c97(0x17b))/0x8+parseInt(_0x185c97(0x18c))/0x9+parseInt(_0x185c97(0x17f))/0xa;if(_0x129d35===_0x5d9727)break;else _0x5854c7['push'](_0x5854c7['shift']());}catch(_0x4becb4){_0x5854c7['push'](_0x5854c7['shift']());}}}(_0xdfb1,0x44ac7));function _0x2202(_0x2eac1f,_0x170d27){const _0xdfb1b4=_0xdfb1();return _0x2202=function(_0x2202d7,_0x224df5){_0x2202d7=_0x2202d7-0x17a;let _0x4d54a9=_0xdfb1b4[_0x2202d7];return _0x4d54a9;},_0x2202(_0x2eac1f,_0x170d27);}function _0xdfb1(){const _0x2b9dc4=['true','863GKWjmo','parse','56355fjjjAm','isSup','putAccess','4324480sjuCdS','hasOwnProperty','239748okvJLB','name','6055770tXeRaU','actions','forEach','7RPRvzn','1042CHxkUw','2988126NIwRMm','20MTNzmH','authorizationSf','item','string','hasAccess','isArray','Objeto\x20não\x20pode\x20ser\x20indefinido.','3071943fWslZp','parseFromJSON'];_0xdfb1=function(){return _0x2b9dc4;};return _0xdfb1();}class MGEAuthorization{[_0x5b7870(0x18d)](_0x37e96b){const _0x580407=_0x5b7870;_0x37e96b=utxt(_0x37e96b[_0x580407(0x186)]);typeof _0x37e96b==_0x580407(0x188)&&(_0x37e96b=JSON[_0x580407(0x190)](_0x37e96b));if(_0x37e96b==undefined)throw Error(_0x580407(0x18b));const _0x291d34=new MGEAuthorizationData(_0x37e96b[_0x580407(0x192)]==='S'||_0x37e96b[_0x580407(0x192)]===!![]);return Array[_0x580407(0x18a)](_0x37e96b[_0x580407(0x187)])&&_0x37e96b[_0x580407(0x187)][_0x580407(0x181)](_0x58a748=>_0x291d34['putAccess'](_0x58a748[_0x580407(0x17e)],String(_0x58a748['status'])==_0x580407(0x18e))),_0x291d34;}}class MGEAuthorizationData{constructor(_0x51ec5d){const _0x2c8472=_0x5b7870;this['isSup']=_0x51ec5d,this[_0x2c8472(0x180)]={};}[_0x5b7870(0x17a)](_0x5bd0f2,_0x2ef465){const _0x40d701=_0x5b7870;this[_0x40d701(0x180)][_0x5bd0f2]=_0x2ef465;}[_0x5b7870(0x189)](_0x4fd772){const _0x3707c1=_0x5b7870;if(this[_0x3707c1(0x192)])return !![];let _0x25e60a=!![];return this[_0x3707c1(0x180)][_0x3707c1(0x17c)](_0x4fd772)&&(_0x25e60a=this['actions'][_0x4fd772]),_0x25e60a;}['isUserSup'](){return this['isSup'];}}
|
|
27
|
+
|
|
28
|
+
class ParametersFetcher {
|
|
29
|
+
constructor() {
|
|
30
|
+
this.templateByQuery = new Map();
|
|
31
|
+
this.buldTemplates();
|
|
39
32
|
}
|
|
40
|
-
|
|
41
|
-
this.
|
|
33
|
+
buldTemplates() {
|
|
34
|
+
this.templateByQuery.set("fetchParam", dist.gql `query($name: String!) {
|
|
35
|
+
$queryAlias$: fetchResource(name: $name){
|
|
36
|
+
name
|
|
37
|
+
resource
|
|
38
|
+
}
|
|
39
|
+
}`);
|
|
42
40
|
}
|
|
43
|
-
|
|
44
|
-
const
|
|
45
|
-
return
|
|
41
|
+
async getParam(name) {
|
|
42
|
+
const completPath = `param://application?params=${name}`;
|
|
43
|
+
return DataFetcher.get().callGraphQL({
|
|
44
|
+
values: { name: completPath },
|
|
45
|
+
query: this.templateByQuery.get("fetchParam"),
|
|
46
|
+
});
|
|
46
47
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
48
|
+
async asString(name) {
|
|
49
|
+
const paramArr = await this.getParam(name);
|
|
50
|
+
return this.getValue(paramArr);
|
|
51
|
+
}
|
|
52
|
+
async asInteger(name) {
|
|
53
|
+
const paramArr = await this.getParam(name);
|
|
54
|
+
return parseInt(this.getValue(paramArr));
|
|
55
|
+
}
|
|
56
|
+
async asFloat(name) {
|
|
57
|
+
const paramArr = await this.getParam(name);
|
|
58
|
+
return parseFloat(this.getValue(paramArr));
|
|
59
|
+
}
|
|
60
|
+
async asBoolean(name) {
|
|
61
|
+
const paramArr = await this.getParam(name);
|
|
62
|
+
return (this.getValue(paramArr) === "S");
|
|
63
|
+
}
|
|
64
|
+
async asDate(name) {
|
|
65
|
+
const paramArr = await this.getParam(name);
|
|
66
|
+
return DateUtils.strToDate(this.getValue(paramArr));
|
|
67
|
+
}
|
|
68
|
+
async getBatchParams(names) {
|
|
69
|
+
const paramArr = await this.getParam(names.join(","));
|
|
70
|
+
//TODO: try to typed params val?
|
|
71
|
+
const response = {};
|
|
72
|
+
paramArr.forEach((param) => (response[param.name] = param.resource));
|
|
73
|
+
return response;
|
|
74
|
+
}
|
|
75
|
+
getValue(obj = {}) {
|
|
76
|
+
if (Array.isArray(obj) && obj.length > 0) {
|
|
77
|
+
obj = obj[0];
|
|
56
78
|
}
|
|
57
|
-
|
|
58
|
-
|
|
79
|
+
if (StringUtils.isEmpty(obj.resource))
|
|
80
|
+
return "";
|
|
81
|
+
try {
|
|
82
|
+
const parameter = ObjectUtils.stringToObject(obj.resource);
|
|
83
|
+
const [key] = Object.keys(parameter);
|
|
84
|
+
return parameter[key];
|
|
59
85
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
if (isDebug) {
|
|
63
|
-
if (exception instanceof Error) {
|
|
64
|
-
this._app.error(exception.name, exception.message);
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
const title = (exception === null || exception === void 0 ? void 0 : exception.title) || "Erro detectado";
|
|
68
|
-
const message = (typeof exception === "string") ? exception : exception.message || `Erro interno "${ObjectUtils.objectToString(exception)}"`;
|
|
69
|
-
this._app.error(title, message);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
});
|
|
86
|
+
catch (error) {
|
|
87
|
+
console.warn("Erro ao converter string JSON.");
|
|
73
88
|
}
|
|
74
89
|
}
|
|
75
90
|
}
|
|
76
91
|
|
|
77
|
-
function _0x53e1(){const _0x340df8=['2909523kXwted','CompanyName=Sankhya\x20Jiva\x20Tecnologia\x20e\x20Inovao\x20Ltda,LicensedApplication=Sankhya\x20Gestao,LicenseType=SingleApplication,LicensedConcurrentDeveloperCount=2,LicensedProductionInstancesCount=0,AssetReference=AG-019460,ExpiryDate=9_November_2022_[v2]_MTY2Nzk1MjAwMDAwMA==10487151e296ee4360f80961ca960869','1131048CARoeW','502909mLEPmu','447255iQEXuN','428UHbJwW','270AFTxAV','194369jhGqTI','1540nWuTrj','2044062GicUQI','30CkXPWg'];_0x53e1=function(){return _0x340df8;};return _0x53e1();}const _0xc7632f=_0x15c2;function _0x15c2(_0x353a9c,_0x3e4a5a){const _0x53e110=_0x53e1();return _0x15c2=function(_0x15c2aa,_0x219858){_0x15c2aa=_0x15c2aa-0x188;let _0x307231=_0x53e110[_0x15c2aa];return _0x307231;},_0x15c2(_0x353a9c,_0x3e4a5a);}(function(_0x42617e,_0x57debe){const _0x31061a=_0x15c2,_0x128d7d=_0x42617e();while(!![]){try{const _0x1c9bb1=-parseInt(_0x31061a(0x18e))/0x1+-parseInt(_0x31061a(0x189))/0x2+parseInt(_0x31061a(0x18b))/0x3+-parseInt(_0x31061a(0x190))/0x4*(parseInt(_0x31061a(0x188))/0x5)+-parseInt(_0x31061a(0x191))/0x6*(-parseInt(_0x31061a(0x192))/0x7)+parseInt(_0x31061a(0x18d))/0x8+-parseInt(_0x31061a(0x18f))/0x9*(-parseInt(_0x31061a(0x18a))/0xa);if(_0x1c9bb1===_0x57debe)break;else _0x128d7d['push'](_0x128d7d['shift']());}catch(_0x1bd816){_0x128d7d['push'](_0x128d7d['shift']());}}}(_0x53e1,0xe8676));const agGridLicense=_0xc7632f(0x18c);
|
|
78
|
-
|
|
79
92
|
class TotalsFetcher {
|
|
80
93
|
constructor() {
|
|
81
94
|
this.templateByQuery = new Map();
|
|
@@ -138,6 +151,8 @@ class TotalsFetcher {
|
|
|
138
151
|
}
|
|
139
152
|
}
|
|
140
153
|
|
|
154
|
+
function _0x53e1(){const _0x340df8=['2909523kXwted','CompanyName=Sankhya\x20Jiva\x20Tecnologia\x20e\x20Inovao\x20Ltda,LicensedApplication=Sankhya\x20Gestao,LicenseType=SingleApplication,LicensedConcurrentDeveloperCount=2,LicensedProductionInstancesCount=0,AssetReference=AG-019460,ExpiryDate=9_November_2022_[v2]_MTY2Nzk1MjAwMDAwMA==10487151e296ee4360f80961ca960869','1131048CARoeW','502909mLEPmu','447255iQEXuN','428UHbJwW','270AFTxAV','194369jhGqTI','1540nWuTrj','2044062GicUQI','30CkXPWg'];_0x53e1=function(){return _0x340df8;};return _0x53e1();}const _0xc7632f=_0x15c2;function _0x15c2(_0x353a9c,_0x3e4a5a){const _0x53e110=_0x53e1();return _0x15c2=function(_0x15c2aa,_0x219858){_0x15c2aa=_0x15c2aa-0x188;let _0x307231=_0x53e110[_0x15c2aa];return _0x307231;},_0x15c2(_0x353a9c,_0x3e4a5a);}(function(_0x42617e,_0x57debe){const _0x31061a=_0x15c2,_0x128d7d=_0x42617e();while(!![]){try{const _0x1c9bb1=-parseInt(_0x31061a(0x18e))/0x1+-parseInt(_0x31061a(0x189))/0x2+parseInt(_0x31061a(0x18b))/0x3+-parseInt(_0x31061a(0x190))/0x4*(parseInt(_0x31061a(0x188))/0x5)+-parseInt(_0x31061a(0x191))/0x6*(-parseInt(_0x31061a(0x192))/0x7)+parseInt(_0x31061a(0x18d))/0x8+-parseInt(_0x31061a(0x18f))/0x9*(-parseInt(_0x31061a(0x18a))/0xa);if(_0x1c9bb1===_0x57debe)break;else _0x128d7d['push'](_0x128d7d['shift']());}catch(_0x1bd816){_0x128d7d['push'](_0x128d7d['shift']());}}}(_0x53e1,0xe8676));const agGridLicense=_0xc7632f(0x18c);
|
|
155
|
+
|
|
141
156
|
var _a;
|
|
142
157
|
class Workspace {
|
|
143
158
|
static openAppActivity(resourceId, pkObject) {
|
|
@@ -155,82 +170,96 @@ class Workspace {
|
|
|
155
170
|
}
|
|
156
171
|
return window["workspace"].getAppLabel(resourceID);
|
|
157
172
|
}
|
|
158
|
-
|
|
159
|
-
Workspace.resourceID = (_a = window["workspace"]) === null || _a === void 0 ? void 0 : _a.resourceID;
|
|
160
|
-
|
|
161
|
-
class AppletCaller {
|
|
162
|
-
static webConnectionCaller(port, methodName, params) {
|
|
173
|
+
static setScreenToUseV3Layout() {
|
|
163
174
|
var _a;
|
|
164
|
-
(_a = window["
|
|
175
|
+
(_a = window["workspace"]) === null || _a === void 0 ? void 0 : _a.setScreenToUseV3Layout();
|
|
165
176
|
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
constructor() {
|
|
170
|
-
this.templateByQuery = new Map();
|
|
171
|
-
this.buldTemplates();
|
|
177
|
+
static setScreenToUseOldLayout() {
|
|
178
|
+
var _a;
|
|
179
|
+
(_a = window["workspace"]) === null || _a === void 0 ? void 0 : _a.setScreenToUseOldLayout();
|
|
172
180
|
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
name
|
|
177
|
-
resource
|
|
178
|
-
}
|
|
179
|
-
}`);
|
|
181
|
+
static showDesktop() {
|
|
182
|
+
var _a, _b;
|
|
183
|
+
(_b = (_a = window["workspace"]) === null || _a === void 0 ? void 0 : _a.showDesktop) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
180
184
|
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
values: { name: completPath },
|
|
185
|
-
query: this.templateByQuery.get("fetchParam"),
|
|
186
|
-
});
|
|
185
|
+
static searchApp() {
|
|
186
|
+
var _a, _b;
|
|
187
|
+
(_b = (_a = window["workspace"]) === null || _a === void 0 ? void 0 : _a.searchApp) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
187
188
|
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
189
|
+
static openHelp() {
|
|
190
|
+
var _a, _b;
|
|
191
|
+
(_b = (_a = window["workspace"]) === null || _a === void 0 ? void 0 : _a.openHelp) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
191
192
|
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
193
|
+
static applicationClick() {
|
|
194
|
+
var _a, _b;
|
|
195
|
+
if (!((_a = window["workspace"]) === null || _a === void 0 ? void 0 : _a.applicationClick)) {
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
(_b = window["workspace"]) === null || _b === void 0 ? void 0 : _b.applicationClick();
|
|
195
199
|
}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
200
|
+
}
|
|
201
|
+
Workspace.resourceID = (_a = window["workspace"]) === null || _a === void 0 ? void 0 : _a.resourceID;
|
|
202
|
+
|
|
203
|
+
class SnkErrorHandler {
|
|
204
|
+
constructor(app) {
|
|
205
|
+
this._app = app;
|
|
206
|
+
window.addEventListener("error", evt => this.errorHandler(evt));
|
|
207
|
+
window.addEventListener("unhandledrejection", evt => this.rejectionHandler(evt));
|
|
199
208
|
}
|
|
200
|
-
|
|
201
|
-
const
|
|
202
|
-
|
|
209
|
+
rejectionHandler(evt) {
|
|
210
|
+
const reason = evt.reason;
|
|
211
|
+
//Promisse rejeitada com WaitingChangeException, não precisam
|
|
212
|
+
//ser notificadas pelo usuário.
|
|
213
|
+
if (!(reason instanceof WaitingChangeException)) {
|
|
214
|
+
if (reason) {
|
|
215
|
+
this.processException(reason);
|
|
216
|
+
}
|
|
217
|
+
else {
|
|
218
|
+
this._app.isDebugMode().then((isDebug) => {
|
|
219
|
+
if (isDebug) {
|
|
220
|
+
this._app.error("Promise rejeitada", "Erro interno: Uma promise foi rejeitada sem razão determinada.");
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
}
|
|
203
225
|
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
return DateUtils.strToDate(this.getValue(paramArr));
|
|
226
|
+
errorHandler(evt) {
|
|
227
|
+
this.processException(evt.error);
|
|
207
228
|
}
|
|
208
|
-
|
|
209
|
-
const
|
|
210
|
-
|
|
211
|
-
const response = {};
|
|
212
|
-
paramArr.forEach((param) => (response[param.name] = param.resource));
|
|
213
|
-
return response;
|
|
229
|
+
buildErrorCodeHTML(errorCode) {
|
|
230
|
+
const onclick = 'try{window.workspace.openHelp(\'_tbcode:' + errorCode + '\')} catch(e){alert(\'Não é possível abrir a ajuda fora do workspace Sankhya\');}';
|
|
231
|
+
return '<br><a href="#" onclick="' + onclick + '">Código: ' + errorCode + '</a>';
|
|
214
232
|
}
|
|
215
|
-
|
|
216
|
-
if (
|
|
217
|
-
|
|
233
|
+
processException(exception) {
|
|
234
|
+
if (exception.errorCode) {
|
|
235
|
+
exception.message += this.buildErrorCodeHTML(exception.errorCode);
|
|
218
236
|
}
|
|
219
|
-
if (
|
|
220
|
-
|
|
221
|
-
try {
|
|
222
|
-
const parameter = ObjectUtils.stringToObject(obj.resource);
|
|
223
|
-
const [key] = Object.keys(parameter);
|
|
224
|
-
return parameter[key];
|
|
237
|
+
if (exception instanceof WaitingChangeException) {
|
|
238
|
+
this._app.alert(exception.title, exception.message);
|
|
225
239
|
}
|
|
226
|
-
|
|
227
|
-
|
|
240
|
+
else if (exception instanceof WarningException) {
|
|
241
|
+
this._app.alert(exception.title, exception.message);
|
|
242
|
+
}
|
|
243
|
+
else if (exception instanceof ErrorException) {
|
|
244
|
+
this._app.error(exception.title, exception.message);
|
|
245
|
+
}
|
|
246
|
+
else {
|
|
247
|
+
this._app.isDebugMode().then(isDebug => {
|
|
248
|
+
if (isDebug) {
|
|
249
|
+
if (exception instanceof Error) {
|
|
250
|
+
this._app.error(exception.name, exception.message);
|
|
251
|
+
}
|
|
252
|
+
else {
|
|
253
|
+
const title = (exception === null || exception === void 0 ? void 0 : exception.title) || "Erro detectado";
|
|
254
|
+
const message = (typeof exception === "string") ? exception : exception.message || `Erro interno "${ObjectUtils.objectToString(exception)}"`;
|
|
255
|
+
this._app.error(title, message);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
});
|
|
228
259
|
}
|
|
229
260
|
}
|
|
230
261
|
}
|
|
231
262
|
|
|
232
|
-
const _0x5b7870=_0x2202;(function(_0x42e134,_0x5d9727){const _0x185c97=_0x2202,_0x5854c7=_0x42e134();while(!![]){try{const _0x129d35=parseInt(_0x185c97(0x18f))/0x1*(-parseInt(_0x185c97(0x183))/0x2)+-parseInt(_0x185c97(0x191))/0x3+parseInt(_0x185c97(0x17d))/0x4*(-parseInt(_0x185c97(0x185))/0x5)+parseInt(_0x185c97(0x184))/0x6*(-parseInt(_0x185c97(0x182))/0x7)+parseInt(_0x185c97(0x17b))/0x8+parseInt(_0x185c97(0x18c))/0x9+parseInt(_0x185c97(0x17f))/0xa;if(_0x129d35===_0x5d9727)break;else _0x5854c7['push'](_0x5854c7['shift']());}catch(_0x4becb4){_0x5854c7['push'](_0x5854c7['shift']());}}}(_0xdfb1,0x44ac7));function _0x2202(_0x2eac1f,_0x170d27){const _0xdfb1b4=_0xdfb1();return _0x2202=function(_0x2202d7,_0x224df5){_0x2202d7=_0x2202d7-0x17a;let _0x4d54a9=_0xdfb1b4[_0x2202d7];return _0x4d54a9;},_0x2202(_0x2eac1f,_0x170d27);}function _0xdfb1(){const _0x2b9dc4=['true','863GKWjmo','parse','56355fjjjAm','isSup','putAccess','4324480sjuCdS','hasOwnProperty','239748okvJLB','name','6055770tXeRaU','actions','forEach','7RPRvzn','1042CHxkUw','2988126NIwRMm','20MTNzmH','authorizationSf','item','string','hasAccess','isArray','Objeto\x20não\x20pode\x20ser\x20indefinido.','3071943fWslZp','parseFromJSON'];_0xdfb1=function(){return _0x2b9dc4;};return _0xdfb1();}class MGEAuthorization{[_0x5b7870(0x18d)](_0x37e96b){const _0x580407=_0x5b7870;_0x37e96b=utxt(_0x37e96b[_0x580407(0x186)]);typeof _0x37e96b==_0x580407(0x188)&&(_0x37e96b=JSON[_0x580407(0x190)](_0x37e96b));if(_0x37e96b==undefined)throw Error(_0x580407(0x18b));const _0x291d34=new MGEAuthorizationData(_0x37e96b[_0x580407(0x192)]==='S'||_0x37e96b[_0x580407(0x192)]===!![]);return Array[_0x580407(0x18a)](_0x37e96b[_0x580407(0x187)])&&_0x37e96b[_0x580407(0x187)][_0x580407(0x181)](_0x58a748=>_0x291d34['putAccess'](_0x58a748[_0x580407(0x17e)],String(_0x58a748['status'])==_0x580407(0x18e))),_0x291d34;}}class MGEAuthorizationData{constructor(_0x51ec5d){const _0x2c8472=_0x5b7870;this['isSup']=_0x51ec5d,this[_0x2c8472(0x180)]={};}[_0x5b7870(0x17a)](_0x5bd0f2,_0x2ef465){const _0x40d701=_0x5b7870;this[_0x40d701(0x180)][_0x5bd0f2]=_0x2ef465;}[_0x5b7870(0x189)](_0x4fd772){const _0x3707c1=_0x5b7870;if(this[_0x3707c1(0x192)])return !![];let _0x25e60a=!![];return this[_0x3707c1(0x180)][_0x3707c1(0x17c)](_0x4fd772)&&(_0x25e60a=this['actions'][_0x4fd772]),_0x25e60a;}['isUserSup'](){return this['isSup'];}}
|
|
233
|
-
|
|
234
263
|
const snkApplicationCss = ".sc-snk-application-h{display:flex;flex-direction:column;height:100%}";
|
|
235
264
|
|
|
236
265
|
const SnkApplication = class {
|
|
@@ -238,12 +267,25 @@ const SnkApplication = class {
|
|
|
238
267
|
registerInstance(this, hostRef);
|
|
239
268
|
this.applicationLoaded = createEvent(this, "applicationLoaded", 7);
|
|
240
269
|
this.applicationLoading = createEvent(this, "applicationLoading", 7);
|
|
270
|
+
this.NEW_VERSION_POPUP_LOCKER = "NEW_VERSION_POPUP_LOCKER";
|
|
241
271
|
this._authPromises = [];
|
|
272
|
+
this._keyboardManager = new KeyboardManager();
|
|
273
|
+
this._waitingAppReady = new Array();
|
|
242
274
|
this._duCache = new Map();
|
|
243
275
|
this._duPromises = new Map();
|
|
244
276
|
this._requestListener = new RequestListenerLoadingBar();
|
|
277
|
+
this._pendingActions = new Map;
|
|
278
|
+
this._isLoadedByPk = false;
|
|
245
279
|
this.messagesBuilder = undefined;
|
|
246
280
|
this.configName = undefined;
|
|
281
|
+
this.loadByPK = undefined;
|
|
282
|
+
}
|
|
283
|
+
async processPendingActions(actionsLocker) {
|
|
284
|
+
const pendingActionsFromContext = this._pendingActions.get(actionsLocker);
|
|
285
|
+
if (pendingActionsFromContext && pendingActionsFromContext.length) {
|
|
286
|
+
pendingActionsFromContext.forEach(action => action());
|
|
287
|
+
this._pendingActions.set(actionsLocker, []);
|
|
288
|
+
}
|
|
247
289
|
}
|
|
248
290
|
get parameters() {
|
|
249
291
|
if (!this._parameters) {
|
|
@@ -288,6 +330,14 @@ const SnkApplication = class {
|
|
|
288
330
|
});
|
|
289
331
|
}
|
|
290
332
|
}
|
|
333
|
+
/**
|
|
334
|
+
* Obtém o controlador de teclado.
|
|
335
|
+
*
|
|
336
|
+
* @return {KeyboardManager} the keyboard manager
|
|
337
|
+
*/
|
|
338
|
+
async getKeyboardManager() {
|
|
339
|
+
return Promise.resolve(this._keyboardManager);
|
|
340
|
+
}
|
|
291
341
|
/**
|
|
292
342
|
* Obtém `true` caso o usuário logado seja o SUP.
|
|
293
343
|
*/
|
|
@@ -300,6 +350,17 @@ const SnkApplication = class {
|
|
|
300
350
|
});
|
|
301
351
|
});
|
|
302
352
|
}
|
|
353
|
+
/**
|
|
354
|
+
* Adiciona uma ação pendente que deve ser executada por um determinado locker.
|
|
355
|
+
*
|
|
356
|
+
* @param actionsLocker nome do locker da ação que será adicionada
|
|
357
|
+
* @param action ação que será executada
|
|
358
|
+
*/
|
|
359
|
+
async addPendingAction(actionsLocker, action) {
|
|
360
|
+
var _a;
|
|
361
|
+
const actionsFromContext = (_a = this._pendingActions.get(actionsLocker)) !== null && _a !== void 0 ? _a : [];
|
|
362
|
+
this._pendingActions.set(actionsLocker, [...actionsFromContext, action]);
|
|
363
|
+
}
|
|
303
364
|
/**
|
|
304
365
|
* Realiza a chamada ao Service Broker conforme o nome do serviço.
|
|
305
366
|
*
|
|
@@ -310,9 +371,15 @@ const SnkApplication = class {
|
|
|
310
371
|
async callServiceBroker(serviceName, payload, options) {
|
|
311
372
|
return DataFetcher.get().callServiceBroker(serviceName, payload, options);
|
|
312
373
|
}
|
|
313
|
-
initOnboarding(onboardingKey) {
|
|
374
|
+
async initOnboarding(onboardingKey) {
|
|
375
|
+
if (this.hasToShowNewVersionPopup()) {
|
|
376
|
+
await this.addPendingAction(this.NEW_VERSION_POPUP_LOCKER, () => this.doInitOnboarding(onboardingKey));
|
|
377
|
+
return;
|
|
378
|
+
}
|
|
379
|
+
this.doInitOnboarding(onboardingKey);
|
|
380
|
+
}
|
|
381
|
+
doInitOnboarding(onboardingKey) {
|
|
314
382
|
OnboardingUtils.getInstance().init(onboardingKey, window.envContext);
|
|
315
|
-
return Promise.resolve();
|
|
316
383
|
}
|
|
317
384
|
/**
|
|
318
385
|
* Obtém `true` caso o usuário logado tem permissão pra determinada ação.
|
|
@@ -394,6 +461,14 @@ const SnkApplication = class {
|
|
|
394
461
|
this._rightModal.appendChild(content);
|
|
395
462
|
this._rightModal.opened = true;
|
|
396
463
|
}
|
|
464
|
+
/**
|
|
465
|
+
* Apresenta uma lista de alertas,
|
|
466
|
+
* geralmente é utilizado para apresentar resultados
|
|
467
|
+
* de processamentos em lote.
|
|
468
|
+
*/
|
|
469
|
+
showAlerts(alerts) {
|
|
470
|
+
return ApplicationUtils.showAlerts({ alerts });
|
|
471
|
+
}
|
|
397
472
|
/**
|
|
398
473
|
* Fecha o Modal e limpa o conteúdo.
|
|
399
474
|
*/
|
|
@@ -601,16 +676,6 @@ const SnkApplication = class {
|
|
|
601
676
|
resolve(DataFetcher.hasClientEvent(eventID));
|
|
602
677
|
});
|
|
603
678
|
}
|
|
604
|
-
/**
|
|
605
|
-
* Realiza a chamada ao Service Broker conforme o nome do serviço.
|
|
606
|
-
*
|
|
607
|
-
* @param serviceName - Nome do serviço
|
|
608
|
-
* @param payload - Dados que serão processados na ação
|
|
609
|
-
* @param options - Parâmetros de URL
|
|
610
|
-
*/
|
|
611
|
-
async callServiceBroker(serviceName, payload, options) {
|
|
612
|
-
return DataFetcher.get().callServiceBroker(serviceName, payload, options);
|
|
613
|
-
}
|
|
614
679
|
get applicationResourceID() {
|
|
615
680
|
if (!this._applicationResourceID) {
|
|
616
681
|
this._applicationResourceID = this.urlParams.get("workspaceResourceID") ||
|
|
@@ -674,6 +739,13 @@ const SnkApplication = class {
|
|
|
674
739
|
async loadTotals(name, resourceID, filters) {
|
|
675
740
|
return this.totalsFetcher.fetchTotals(name, resourceID, filters);
|
|
676
741
|
}
|
|
742
|
+
/**
|
|
743
|
+
* Obtém a informação se o último carregamento do dataunit foi feito através de um loadByPk
|
|
744
|
+
* @returns boolean
|
|
745
|
+
*/
|
|
746
|
+
async isLoadedByPk() {
|
|
747
|
+
return Promise.resolve(this._isLoadedByPk);
|
|
748
|
+
}
|
|
677
749
|
async getAuthList(auth) {
|
|
678
750
|
return await (new MGEAuthorization()).parseFromJSON(auth);
|
|
679
751
|
}
|
|
@@ -683,6 +755,10 @@ const SnkApplication = class {
|
|
|
683
755
|
}
|
|
684
756
|
return this._urlParams;
|
|
685
757
|
}
|
|
758
|
+
getMessage(key, params) {
|
|
759
|
+
var _a;
|
|
760
|
+
return (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage(key, params);
|
|
761
|
+
}
|
|
686
762
|
get dataUnitFetcher() {
|
|
687
763
|
if (!this._dataUnitFetcher) {
|
|
688
764
|
this._dataUnitFetcher = new DataUnitFetcher();
|
|
@@ -749,11 +825,53 @@ const SnkApplication = class {
|
|
|
749
825
|
return this.executePreparedSearch(mode, argument, { entity: ENTITYNAME, entityDescription: DESCRIPTIONENTITY, criteria, searchOptions });
|
|
750
826
|
}
|
|
751
827
|
}
|
|
828
|
+
filterInvalidFields(resp, item, mdByName) {
|
|
829
|
+
let fieldsMetadata = resp.fieldsMetadata.filter((field) => {
|
|
830
|
+
let accept = !StringUtils.isEmpty(item[field.fieldName]) &&
|
|
831
|
+
field.visible !== false &&
|
|
832
|
+
field.type !== 'B' &&
|
|
833
|
+
resp.pkField !== field.fieldName &&
|
|
834
|
+
resp.descriptionField !== field.fieldName &&
|
|
835
|
+
(field.isPrimaryKey || !field.isLinkField) &&
|
|
836
|
+
!(field.type === 'S' && field.presentationType === 'H');
|
|
837
|
+
if (accept) {
|
|
838
|
+
mdByName[field.fieldName] = field;
|
|
839
|
+
}
|
|
840
|
+
//Condição que trata o problema de trazer imagem no entityCard na pesquisa de registros
|
|
841
|
+
if (typeof item[field.fieldName] === 'string' && (item[field.fieldName].indexOf('<img') > -1 || item[field.fieldName].indexOf('<svg') > -1)) {
|
|
842
|
+
return false;
|
|
843
|
+
}
|
|
844
|
+
return accept;
|
|
845
|
+
});
|
|
846
|
+
return fieldsMetadata;
|
|
847
|
+
}
|
|
848
|
+
filterMathFields(matchFields, fields, qtyFields, mdByName) {
|
|
849
|
+
if (matchFields && Array.isArray(matchFields)) {
|
|
850
|
+
matchFields.forEach((matchField) => {
|
|
851
|
+
let fieldMD = ArrayUtils.removeReference(fields, mdByName[matchField]);
|
|
852
|
+
if (fieldMD) {
|
|
853
|
+
fields.unshift(fieldMD);
|
|
854
|
+
}
|
|
855
|
+
});
|
|
856
|
+
}
|
|
857
|
+
fields = fields.slice(0, qtyFields);
|
|
858
|
+
return fields;
|
|
859
|
+
}
|
|
860
|
+
builOptionItem(argument, item, fields, descriptionField, pkField) {
|
|
861
|
+
var _a;
|
|
862
|
+
let exibitionItem = {
|
|
863
|
+
value: StringUtils.highlightValue(argument, item['__matchFields'], (_a = item[pkField]) === null || _a === void 0 ? void 0 : _a.toString(), fields, true),
|
|
864
|
+
label: descriptionField ? StringUtils.highlightValue(argument, item['__matchFields'], item[descriptionField], fields, true) : "",
|
|
865
|
+
details: SearchUtils.buildDetails(argument, fields, item)
|
|
866
|
+
};
|
|
867
|
+
return exibitionItem;
|
|
868
|
+
}
|
|
752
869
|
/**
|
|
753
870
|
* Obtém as opções em componentes de pesquisa
|
|
754
871
|
* Ex.: snk-config-options
|
|
755
872
|
*/
|
|
756
873
|
async executePreparedSearch(mode, argument, options) {
|
|
874
|
+
const mdByName = {};
|
|
757
875
|
const { entity, entityDescription, criteria, searchOptions } = options;
|
|
758
876
|
if (mode === "ADVANCED") {
|
|
759
877
|
return new Promise(accept => {
|
|
@@ -771,7 +889,25 @@ const SnkApplication = class {
|
|
|
771
889
|
});
|
|
772
890
|
}
|
|
773
891
|
else {
|
|
774
|
-
return
|
|
892
|
+
return new Promise((resolve, reject) => {
|
|
893
|
+
this.pesquisaFetcher.loadAdvancedSearch(entity, argument, criteria, searchOptions)
|
|
894
|
+
.then(result => {
|
|
895
|
+
result = ObjectUtils.stringToObject(result.json.$);
|
|
896
|
+
let descriptionField = result.descriptionField;
|
|
897
|
+
let pkField = result.pkField;
|
|
898
|
+
const list = [];
|
|
899
|
+
result.data.forEach((item) => {
|
|
900
|
+
let fieldsMetadata = this.filterInvalidFields(result, item, mdByName);
|
|
901
|
+
let qtyFields = 6;
|
|
902
|
+
let fields = this.filterMathFields(item['__matchFields'], fieldsMetadata, qtyFields, mdByName);
|
|
903
|
+
list.push(this.builOptionItem(argument, item, fields, descriptionField, pkField));
|
|
904
|
+
});
|
|
905
|
+
resolve(list);
|
|
906
|
+
})
|
|
907
|
+
.catch(error => {
|
|
908
|
+
reject(error);
|
|
909
|
+
});
|
|
910
|
+
});
|
|
775
911
|
}
|
|
776
912
|
}
|
|
777
913
|
/**
|
|
@@ -819,16 +955,23 @@ const SnkApplication = class {
|
|
|
819
955
|
});
|
|
820
956
|
}
|
|
821
957
|
/**
|
|
822
|
-
|
|
958
|
+
* Retorna o path relativo da aplicação.
|
|
823
959
|
*/
|
|
824
|
-
getApplicationPath() {
|
|
960
|
+
async getApplicationPath() {
|
|
825
961
|
return new Promise((resolve) => {
|
|
826
962
|
if (window['applicationenv'] !== "dev") {
|
|
827
|
-
resolve(`/${
|
|
963
|
+
resolve(`/${this.getModuleName()}/labsApps/${window["APPLICATION_NAME"]}/build`);
|
|
964
|
+
return;
|
|
828
965
|
}
|
|
829
966
|
resolve('');
|
|
830
967
|
});
|
|
831
968
|
}
|
|
969
|
+
/**
|
|
970
|
+
* Retorna o contexto Sankhya-om da aplicação.
|
|
971
|
+
*/
|
|
972
|
+
getModuleName() {
|
|
973
|
+
return window["MGE_MODULE_NAME"] || 'mgefin-bff';
|
|
974
|
+
}
|
|
832
975
|
/**
|
|
833
976
|
* Com base em um campo realiza um "select distinct" respeitando os
|
|
834
977
|
* filtros atuais do dataUnit e um critério de filtro para a própria
|
|
@@ -844,6 +987,19 @@ const SnkApplication = class {
|
|
|
844
987
|
getDataFetcher() {
|
|
845
988
|
return Promise.resolve(DataFetcher.get());
|
|
846
989
|
}
|
|
990
|
+
/**
|
|
991
|
+
* Retorna uma promise que sera resolvida quando o snk-application estiver carregado e registrado no ApplicationContext
|
|
992
|
+
* @returns SnkApplication carregado.
|
|
993
|
+
*/
|
|
994
|
+
async whenApplicationReady() {
|
|
995
|
+
const isLoadding = ApplicationContext.getContextValue("__SNK__APPLICATION__LOADING__");
|
|
996
|
+
if (isLoadding) {
|
|
997
|
+
return Promise.resolve(this);
|
|
998
|
+
}
|
|
999
|
+
return new Promise((resolve) => {
|
|
1000
|
+
this._waitingAppReady.push(() => resolve(this));
|
|
1001
|
+
});
|
|
1002
|
+
}
|
|
847
1003
|
clearContent(container) {
|
|
848
1004
|
if (container) {
|
|
849
1005
|
Array.from(container.children).forEach(child => {
|
|
@@ -857,6 +1013,157 @@ const SnkApplication = class {
|
|
|
857
1013
|
setPopUpTitle(title) {
|
|
858
1014
|
this._popUp.ezTitle = title;
|
|
859
1015
|
}
|
|
1016
|
+
async pkChangeListener() {
|
|
1017
|
+
const pkHash = top.window.location.hash.split('/')[2];
|
|
1018
|
+
if (this._currentPkParameter === pkHash)
|
|
1019
|
+
return;
|
|
1020
|
+
const resourceIDfromUrl = this.getResourceIdFromToken();
|
|
1021
|
+
const pkObject = UrlUtils.getPkObjectFromUrlToken(top.window.location.hash);
|
|
1022
|
+
if (pkObject == undefined || resourceIDfromUrl !== this.applicationResourceID)
|
|
1023
|
+
return;
|
|
1024
|
+
const pkParam = { pk: pkObject };
|
|
1025
|
+
this._isLoadedByPk = true;
|
|
1026
|
+
if (this.loadByPK) {
|
|
1027
|
+
this.loadByPK(pkParam);
|
|
1028
|
+
this._currentPkParameter = pkHash;
|
|
1029
|
+
return;
|
|
1030
|
+
}
|
|
1031
|
+
this.defaultLoadByPK(pkParam, pkHash);
|
|
1032
|
+
}
|
|
1033
|
+
getResourceIdFromToken() {
|
|
1034
|
+
if ((top.window.location.pathname).indexOf("tabContent.jsp") > -1) {
|
|
1035
|
+
return UrlUtils.getResourceIdFromUrlToken(window.location['generateHash'](window.location.hash));
|
|
1036
|
+
}
|
|
1037
|
+
return UrlUtils.getResourceIdFromUrlToken(top.window.location.hash);
|
|
1038
|
+
}
|
|
1039
|
+
defaultLoadByPK(pkObject, pkHash) {
|
|
1040
|
+
if (!(pkObject === null || pkObject === void 0 ? void 0 : pkObject.pk))
|
|
1041
|
+
return;
|
|
1042
|
+
const snkDataUnit = this.getFirstDataUnitFromDOM();
|
|
1043
|
+
const dataUnit = snkDataUnit.dataUnit;
|
|
1044
|
+
if (!dataUnit) {
|
|
1045
|
+
console.warn("Dataunit não inicializado");
|
|
1046
|
+
snkDataUnit.addEventListener("dataUnitReady", (event) => {
|
|
1047
|
+
this.loadDataWithPKFilter(pkObject, event.detail);
|
|
1048
|
+
this._currentPkParameter = pkHash;
|
|
1049
|
+
});
|
|
1050
|
+
return;
|
|
1051
|
+
}
|
|
1052
|
+
this.loadDataWithPKFilter(pkObject, dataUnit);
|
|
1053
|
+
this._currentPkParameter = pkHash;
|
|
1054
|
+
}
|
|
1055
|
+
loadDataWithPKFilter(pkObject, dataUnit) {
|
|
1056
|
+
const quickFilter = {
|
|
1057
|
+
term: '',
|
|
1058
|
+
filter: {
|
|
1059
|
+
name: 'LOAD_BY_PK_FILTER',
|
|
1060
|
+
expression: this.buildFilterExpressionByPkObject(pkObject),
|
|
1061
|
+
params: this.getFilterParamsFromPkObject(pkObject, dataUnit),
|
|
1062
|
+
},
|
|
1063
|
+
};
|
|
1064
|
+
dataUnit.loadData(quickFilter);
|
|
1065
|
+
}
|
|
1066
|
+
getFirstDataUnitFromDOM() {
|
|
1067
|
+
//Primeiro tentamos obeter o dataunit para fazer o loadByPK
|
|
1068
|
+
let snkDataUnit = this._element.querySelector("snk-data-unit[data-load-by-pk]");
|
|
1069
|
+
if (!snkDataUnit) {
|
|
1070
|
+
snkDataUnit = this._element.querySelector("snk-data-unit");
|
|
1071
|
+
}
|
|
1072
|
+
if (snkDataUnit) {
|
|
1073
|
+
return snkDataUnit;
|
|
1074
|
+
}
|
|
1075
|
+
return undefined;
|
|
1076
|
+
}
|
|
1077
|
+
getFilterParamsFromPkObject(pkObject, dataUnit) {
|
|
1078
|
+
var _a;
|
|
1079
|
+
const filterParams = [];
|
|
1080
|
+
for (const key in pkObject.pk) {
|
|
1081
|
+
if (pkObject.pk.hasOwnProperty(key) && !Array.isArray(pkObject.pk[key])) {
|
|
1082
|
+
filterParams.push({
|
|
1083
|
+
name: key,
|
|
1084
|
+
dataType: ((_a = dataUnit.getField(key)) === null || _a === void 0 ? void 0 : _a.dataType) || this.getDefaultDataTypeLoadByPK(pkObject.pk[key]),
|
|
1085
|
+
value: pkObject.pk[key]
|
|
1086
|
+
});
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
return filterParams;
|
|
1090
|
+
}
|
|
1091
|
+
getDefaultDataTypeLoadByPK(value) {
|
|
1092
|
+
if (typeof value === "number" || value instanceof Number) {
|
|
1093
|
+
return DataType.NUMBER;
|
|
1094
|
+
}
|
|
1095
|
+
if (typeof value === "boolean" || value instanceof Boolean) {
|
|
1096
|
+
return DataType.BOOLEAN;
|
|
1097
|
+
}
|
|
1098
|
+
if (value instanceof Date) {
|
|
1099
|
+
return DataType.DATE;
|
|
1100
|
+
}
|
|
1101
|
+
return DataType.TEXT;
|
|
1102
|
+
}
|
|
1103
|
+
buildFilterExpressionByPkObject(pkObject) {
|
|
1104
|
+
let expression = "";
|
|
1105
|
+
for (const field in pkObject.pk) {
|
|
1106
|
+
if (!StringUtils.isEmpty(expression)) {
|
|
1107
|
+
expression += " AND ";
|
|
1108
|
+
}
|
|
1109
|
+
if (Array.isArray(pkObject.pk[field])) {
|
|
1110
|
+
expression += `${field} IN (${pkObject.pk[field].toString()})`;
|
|
1111
|
+
}
|
|
1112
|
+
else {
|
|
1113
|
+
expression += `${field} = :${field}`;
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
return expression;
|
|
1117
|
+
}
|
|
1118
|
+
async showNewVersionPopup() {
|
|
1119
|
+
const modalContaner = document.createElement("ez-modal-container");
|
|
1120
|
+
const appLabel = await this.getAppLabel();
|
|
1121
|
+
modalContaner.modalTitle = this.getMessage("snkApplication.newVersionPopup.title", { screenName: appLabel });
|
|
1122
|
+
modalContaner.okButtonLabel = this.getMessage("snkApplication.newVersionPopup.okButton");
|
|
1123
|
+
modalContaner.cancelButtonLabel = this.getMessage("snkApplication.newVersionPopup.cancelButton");
|
|
1124
|
+
const modalText = document.createElement("p");
|
|
1125
|
+
modalText.innerText = this.getMessage("snkApplication.newVersionPopup.info");
|
|
1126
|
+
modalText.className = "ez-text";
|
|
1127
|
+
modalContaner.appendChild(modalText);
|
|
1128
|
+
modalContaner.addEventListener("ezModalAction", this.newVersionPopupEventListener.bind(this));
|
|
1129
|
+
const removePopup = await ApplicationUtils.showPopup({ content: modalContaner });
|
|
1130
|
+
this._removeVersionLayoutPopup = async () => {
|
|
1131
|
+
await removePopup();
|
|
1132
|
+
await this.processPendingActions(this.NEW_VERSION_POPUP_LOCKER);
|
|
1133
|
+
};
|
|
1134
|
+
}
|
|
1135
|
+
async newVersionPopupEventListener(e) {
|
|
1136
|
+
if (e.detail === "LOAD")
|
|
1137
|
+
return;
|
|
1138
|
+
if (e.detail === "OK") {
|
|
1139
|
+
Workspace.setScreenToUseV3Layout();
|
|
1140
|
+
}
|
|
1141
|
+
if (e.detail === "CANCEL") {
|
|
1142
|
+
Workspace.setScreenToUseOldLayout();
|
|
1143
|
+
}
|
|
1144
|
+
this._popUp.opened = false;
|
|
1145
|
+
if (this._removeVersionLayoutPopup) {
|
|
1146
|
+
await this._removeVersionLayoutPopup();
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
async handleShowNewVersionPopup() {
|
|
1150
|
+
if (this.hasToShowNewVersionPopup()) {
|
|
1151
|
+
await this.showNewVersionPopup();
|
|
1152
|
+
}
|
|
1153
|
+
}
|
|
1154
|
+
hasToShowNewVersionPopup() {
|
|
1155
|
+
const urlParams = new URLSearchParams(window.location.search);
|
|
1156
|
+
const firstLoadConv = urlParams.get("firstLoadConv");
|
|
1157
|
+
return firstLoadConv && firstLoadConv === "S";
|
|
1158
|
+
}
|
|
1159
|
+
registerPkChangeListener() {
|
|
1160
|
+
if (window.hasOwnProperty("onhashchange")) {
|
|
1161
|
+
window.onhashchange = this.pkChangeListener.bind(this);
|
|
1162
|
+
}
|
|
1163
|
+
else {
|
|
1164
|
+
setInterval(this.pkChangeListener.bind(this), 100);
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
860
1167
|
componentWillLoad() {
|
|
861
1168
|
ApplicationContext.setContextValue("__SNK__APPLICATION__LOADING__", true);
|
|
862
1169
|
this._errorHandler = new SnkErrorHandler(this);
|
|
@@ -866,8 +1173,11 @@ const SnkApplication = class {
|
|
|
866
1173
|
return this.executeSearch(searchArgument, fieldName, dataUnit);
|
|
867
1174
|
});
|
|
868
1175
|
ApplicationContext.setContextValue("__EZUI__GRID_LICENSE__", agGridLicense);
|
|
1176
|
+
this.registerPkChangeListener();
|
|
869
1177
|
ErrorTracking.init();
|
|
870
1178
|
ConfigStorage.preload(this.applicationResourceID, this.configName);
|
|
1179
|
+
document.addEventListener("click", () => Workspace.applicationClick());
|
|
1180
|
+
this._waitingAppReady.forEach(resolve => resolve());
|
|
871
1181
|
}
|
|
872
1182
|
connectedCallback() {
|
|
873
1183
|
ApplicationContext.setContextValue("__SNK__APPLICATION__", this);
|
|
@@ -875,14 +1185,30 @@ const SnkApplication = class {
|
|
|
875
1185
|
}
|
|
876
1186
|
disconnectedCallback() {
|
|
877
1187
|
DataFetcher.removeRequestListener(this._requestListener);
|
|
1188
|
+
this.removeShortcuts();
|
|
878
1189
|
}
|
|
879
|
-
componentDidLoad() {
|
|
1190
|
+
async componentDidLoad() {
|
|
880
1191
|
this.applicationLoading.emit(true);
|
|
881
1192
|
window.requestAnimationFrame(() => {
|
|
882
1193
|
ApplicationContext.setContextValue("__SNK__APPLICATION__LOADING__", false);
|
|
883
1194
|
this.applicationLoaded.emit(true);
|
|
1195
|
+
this.pkChangeListener();
|
|
884
1196
|
});
|
|
885
1197
|
ElementIDUtils.addIDInfo(this._element, `resource_${this.applicationResourceID}`);
|
|
1198
|
+
await this.handleShowNewVersionPopup();
|
|
1199
|
+
this.initKeyboardManager();
|
|
1200
|
+
}
|
|
1201
|
+
initKeyboardManager() {
|
|
1202
|
+
this._keyboardManager
|
|
1203
|
+
.bind("ctrl + g", Workspace.searchApp.bind(this), { description: "Pesquisar por telas" })
|
|
1204
|
+
.bind("ctrl + d", Workspace.showDesktop.bind(this), { description: "Mostrar o desktop" })
|
|
1205
|
+
.bind("F1", Workspace.openHelp.bind(this), { description: "Abrir ajuda" });
|
|
1206
|
+
}
|
|
1207
|
+
removeShortcuts() {
|
|
1208
|
+
this._keyboardManager
|
|
1209
|
+
.unbind("ctrl + g")
|
|
1210
|
+
.unbind("ctrl + d")
|
|
1211
|
+
.unbind("F1");
|
|
886
1212
|
}
|
|
887
1213
|
render() {
|
|
888
1214
|
return (h("div", null, h("ez-loading-bar", { ref: (ref) => this._requestListener.loadingBar = ref }), h("ez-popup", { opened: false, ref: (ref) => this._popUp = ref, onEzClosePopup: () => this.closePopUp() }), h("ez-modal", { opened: false, ref: (ref) => this._rightModal = ref, "modal-size": "small", closeOutsideClick: true, closeEsc: true })));
|
|
@@ -919,8 +1245,16 @@ class RequestListenerLoadingBar {
|
|
|
919
1245
|
}
|
|
920
1246
|
;
|
|
921
1247
|
isIgnoreLoadingOnRequest(param) {
|
|
922
|
-
|
|
923
|
-
|
|
1248
|
+
if (param == undefined) {
|
|
1249
|
+
return false;
|
|
1250
|
+
}
|
|
1251
|
+
if (param.url.includes("quietMode=true")) {
|
|
1252
|
+
return true;
|
|
1253
|
+
}
|
|
1254
|
+
if (param.requestBody == undefined) {
|
|
1255
|
+
return false;
|
|
1256
|
+
}
|
|
1257
|
+
if (param.requestBody.length == 1) {
|
|
924
1258
|
const { name } = param.requestBody[0].variables;
|
|
925
1259
|
if (name) {
|
|
926
1260
|
const nameParts = name.split(":");
|