@sankhyalabs/sankhyablocks 9.1.0-dev.2 → 9.1.0-dev.20
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/{ClientSideExporterProvider-0ce2bcd9.js → ClientSideExporterProvider-994f6e26.js} +10 -6
- package/dist/cjs/{ConfigStorage-48ba265b.js → ConfigStorage-1931defc.js} +12 -2
- package/dist/cjs/{DataFetcher-1afdb18e.js → DataFetcher-ad9fb3bb.js} +2917 -210
- package/dist/cjs/{FormConfigHelper-c664dbae.js → FormConfigHelper-ebb77625.js} +4 -5
- package/dist/cjs/{ISave-c76e2c51.js → ISave-18ffb73e.js} +1 -1
- package/dist/cjs/{SnkFormConfigManager-aa4631bd.js → SnkFormConfigManager-65e5288e.js} +3 -3
- package/dist/cjs/{auth-fetcher-1687ac0a.js → auth-fetcher-afbe69ab.js} +1 -1
- package/dist/cjs/config-header.cjs.entry.js +2 -2
- package/dist/cjs/{dataunit-fetcher-a723f0dc.js → dataunit-fetcher-c7253b02.js} +25 -21
- package/dist/cjs/field-config_2.cjs.entry.js +10 -7
- package/dist/cjs/fields-layout.cjs.entry.js +20 -13
- package/dist/cjs/fields-selector.cjs.entry.js +12 -7
- package/dist/cjs/{form-config-fetcher-40d3f752.js → form-config-fetcher-f6e66d64.js} +1 -1
- package/dist/cjs/guides-configurator.cjs.entry.js +14 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/pesquisa-grid_2.cjs.entry.js +12 -8
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-actions-button_8.cjs.entry.js +134 -225
- package/dist/cjs/snk-application.cjs.entry.js +282 -78
- package/dist/cjs/snk-attach.cjs.entry.js +46 -23
- package/dist/cjs/snk-configurator.cjs.entry.js +1 -1
- package/dist/cjs/snk-crud.cjs.entry.js +18 -13
- package/dist/cjs/snk-data-exporter.cjs.entry.js +5 -6
- package/dist/cjs/{snk-data-unit-3684c96e.js → snk-data-unit-448fce74.js} +14 -20
- package/dist/cjs/snk-data-unit.cjs.entry.js +3 -4
- package/dist/cjs/snk-detail-view.cjs.entry.js +21 -15
- package/dist/cjs/snk-entity-list.cjs.entry.js +20 -14
- package/dist/cjs/snk-expression-group_2.cjs.entry.js +21 -20
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +52 -120
- package/dist/cjs/snk-filter-detail.cjs.entry.js +3 -1
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
- package/dist/cjs/snk-filter-number.cjs.entry.js +3 -1
- package/dist/cjs/snk-filter-period.cjs.entry.js +3 -1
- package/dist/cjs/snk-form_2.cjs.entry.js +9 -9
- package/dist/cjs/snk-grid.cjs.entry.js +8 -8
- package/dist/cjs/{snk-guides-viewer-edc0a00a.js → snk-guides-viewer-c23ed218.js} +9 -9
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -7
- package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +6 -4
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +4 -4
- package/dist/cjs/snk-pesquisa.cjs.entry.js +26 -19
- package/dist/cjs/snk-simple-crud.cjs.entry.js +25 -23
- package/dist/collection/components/snk-actions-button/clientEvent/index.js +3 -2
- package/dist/collection/components/snk-application/errorhandler/snk-error-handler.js +12 -6
- package/dist/collection/components/snk-application/snk-application.js +1305 -328
- package/dist/collection/components/snk-attach/snk-attach.js +46 -12
- package/dist/collection/components/snk-attach/structure/builder/attach-crud-config.builder.js +7 -4
- package/dist/collection/components/snk-attach/structure/builder/taskbar-builder.js +7 -3
- package/dist/collection/components/snk-configurator/snk-configurator.js +1 -1
- package/dist/collection/components/snk-crud/snk-crud.js +31 -8
- package/dist/collection/components/snk-crud/subcomponents/GuideBuilder.js +11 -3
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +4 -4
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +5 -5
- package/dist/collection/components/snk-data-unit/MultipleUpdateHelper.js +4 -1
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +0 -8
- package/dist/collection/components/snk-entity-list/snk-entity-list.js +40 -15
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +3 -1
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js +3 -1
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-personalized-filter-editor/snk-personalized-filter-editor.js +6 -4
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +3 -1
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.css +4 -0
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +49 -121
- 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 +1 -1
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +1 -0
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +5 -5
- package/dist/collection/components/snk-form-config/FormConfigHelper.js +4 -5
- package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +1 -1
- package/dist/collection/components/snk-form-config/config-header/config-header.js +2 -2
- package/dist/collection/components/snk-form-config/field-item/field-config/field-config.js +2 -2
- package/dist/collection/components/snk-form-config/field-item/field-item.css +3 -23
- package/dist/collection/components/snk-form-config/field-item/field-item.js +6 -3
- package/dist/collection/components/snk-form-config/fields-layout/fields-layout.css +6 -14
- package/dist/collection/components/snk-form-config/fields-layout/fields-layout.js +20 -11
- package/dist/collection/components/snk-form-config/fields-selector/fields-selector.css +4 -0
- package/dist/collection/components/snk-form-config/fields-selector/fields-selector.js +30 -5
- package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.css +2 -2
- package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.js +15 -2
- package/dist/collection/components/snk-form-config/snk-form-config.js +3 -3
- package/dist/collection/components/snk-grid/snk-grid.js +16 -2
- package/dist/collection/components/snk-grid-config/snk-grid-config.css +7 -41
- package/dist/collection/components/snk-grid-config/snk-grid-config.js +116 -213
- package/dist/collection/components/snk-grid-config/snk-select-box/snk-select-box.css +1 -0
- package/dist/collection/components/snk-grid-config/snk-select-box/snk-select-box.js +20 -1
- package/dist/collection/components/snk-layout-form-config/snk-layout-form-config.js +30 -1
- package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +1 -1
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.js +3 -3
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/filter-operands/filter-operands.js +12 -12
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.js +6 -5
- package/dist/collection/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.js +28 -4
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +23 -16
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +20 -18
- package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.css +1 -0
- package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.js +26 -1
- package/dist/collection/lib/configs/ConfigStorage.js +3 -0
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +25 -13
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/helpers/DataUnitDataLoaderHelper.js +22 -20
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +3 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/grid-config-fetcher.js +9 -1
- package/dist/collection/lib/message/SnkMessageBuilder.js +34 -56
- package/dist/collection/lib/message/messageResourceEnUSUtils.js +76 -0
- package/dist/collection/lib/message/messageResourceEsESUtils.js +76 -0
- package/dist/collection/lib/message/messageResourcePtBRUtils.js +76 -0
- package/dist/collection/lib/message/resources/en-us/continuousInsertUtils.msg.js +6 -0
- package/dist/collection/lib/message/resources/en-us/crud-utils.msg.js +3 -0
- package/dist/collection/lib/message/resources/en-us/dataFetcher.msg.js +12 -0
- package/dist/collection/lib/message/resources/en-us/dataUnitDataLoaderHelper.msg.js +18 -0
- package/dist/collection/lib/message/resources/en-us/file-viewer.msg.js +9 -0
- package/dist/collection/lib/message/resources/en-us/snk-actions-button.msg.js +29 -0
- package/dist/collection/lib/message/resources/en-us/snk-application.msg.js +27 -0
- package/dist/collection/lib/message/resources/en-us/snk-attach.msg.js +42 -0
- package/dist/collection/lib/message/resources/en-us/snk-configurator.msg.js +13 -0
- package/dist/collection/lib/message/resources/en-us/snk-crud.msg.js +35 -0
- package/dist/collection/lib/message/resources/en-us/snk-data-exporter.msg.js +35 -0
- package/dist/collection/lib/message/resources/en-us/snk-data-unit.msg.js +40 -0
- package/dist/collection/lib/message/resources/en-us/snk-entity-list.msg.js +3 -0
- package/dist/collection/lib/message/resources/en-us/snk-error-handler.msg.js +17 -0
- package/dist/collection/lib/message/resources/en-us/snk-exporter.msg.js +20 -0
- package/dist/collection/lib/message/resources/en-us/snk-filter-bar.msg.js +71 -0
- package/dist/collection/lib/message/resources/en-us/snk-filter-field-search.msg.js +7 -0
- package/dist/collection/lib/message/resources/en-us/snk-filter-list.msg.js +3 -0
- package/dist/collection/lib/message/resources/en-us/snk-filter-param-config.msg.js +18 -0
- package/dist/collection/lib/message/resources/en-us/snk-form.msg.js +118 -0
- package/dist/collection/lib/message/resources/en-us/snk-grid.msg.js +41 -0
- package/dist/collection/lib/message/resources/en-us/snk-layout-form-config.msg.js +10 -0
- package/dist/collection/lib/message/resources/en-us/snk-personalized-filter.msg.js +105 -0
- package/dist/collection/lib/message/resources/en-us/snk-pesquisa.msg.js +25 -0
- package/dist/collection/lib/message/resources/en-us/snk-print-selector.msg.js +23 -0
- package/dist/collection/lib/message/resources/en-us/snk-simple-bar.msg.js +3 -0
- package/dist/collection/lib/message/resources/en-us/snk-simple-crud.msg.js +14 -0
- package/dist/collection/lib/message/resources/en-us/snk-simple-form-config.msg.js +16 -0
- package/dist/collection/lib/message/resources/en-us/snk-taskbar.msg.js +18 -0
- package/dist/collection/lib/message/resources/es-es/continuousInsertUtils.msg.js +6 -0
- package/dist/collection/lib/message/resources/es-es/crud-utils.msg.js +3 -0
- package/dist/collection/lib/message/resources/es-es/dataFetcher.msg.js +12 -0
- package/dist/collection/lib/message/resources/es-es/dataUnitDataLoaderHelper.msg.js +18 -0
- package/dist/collection/lib/message/resources/es-es/file-viewer.msg.js +9 -0
- package/dist/collection/lib/message/resources/es-es/snk-actions-button.msg.js +29 -0
- package/dist/collection/lib/message/resources/es-es/snk-application.msg.js +27 -0
- package/dist/collection/lib/message/resources/es-es/snk-attach.msg.js +42 -0
- package/dist/collection/lib/message/resources/es-es/snk-configurator.msg.js +13 -0
- package/dist/collection/lib/message/resources/es-es/snk-crud.msg.js +35 -0
- package/dist/collection/lib/message/resources/es-es/snk-data-exporter.msg.js +35 -0
- package/dist/collection/lib/message/resources/es-es/snk-data-unit.msg.js +40 -0
- package/dist/collection/lib/message/resources/es-es/snk-entity-list.msg.js +3 -0
- package/dist/collection/lib/message/resources/es-es/snk-error-handler.msg.js +17 -0
- package/dist/collection/lib/message/resources/es-es/snk-exporter.msg.js +20 -0
- package/dist/collection/lib/message/resources/es-es/snk-filter-bar.msg.js +71 -0
- package/dist/collection/lib/message/resources/es-es/snk-filter-field-search.msg.js +7 -0
- package/dist/collection/lib/message/resources/es-es/snk-filter-list.msg.js +3 -0
- package/dist/collection/lib/message/resources/es-es/snk-filter-param-config.msg.js +18 -0
- package/dist/collection/lib/message/resources/es-es/snk-form.msg.js +118 -0
- package/dist/collection/lib/message/resources/es-es/snk-grid.msg.js +41 -0
- package/dist/collection/lib/message/resources/es-es/snk-layout-form-config.msg.js +10 -0
- package/dist/collection/lib/message/resources/es-es/snk-personalized-filter.msg.js +105 -0
- package/dist/collection/lib/message/resources/es-es/snk-pesquisa.msg.js +25 -0
- package/dist/collection/lib/message/resources/es-es/snk-print-selector.msg.js +23 -0
- package/dist/collection/lib/message/resources/es-es/snk-simple-bar.msg.js +3 -0
- package/dist/collection/lib/message/resources/es-es/snk-simple-crud.msg.js +14 -0
- package/dist/collection/lib/message/resources/es-es/snk-simple-form-config.msg.js +16 -0
- package/dist/collection/lib/message/resources/es-es/snk-taskbar.msg.js +18 -0
- package/dist/collection/lib/message/resources/pt-br/continuousInsertUtils.msg.js +6 -0
- package/dist/collection/lib/message/resources/{crud-utils.msg.js → pt-br/crud-utils.msg.js} +1 -2
- package/dist/collection/lib/message/resources/pt-br/dataFetcher.msg.js +12 -0
- package/dist/collection/lib/message/resources/pt-br/dataUnitDataLoaderHelper.msg.js +18 -0
- package/dist/collection/lib/message/resources/{file-viewer.msg.js → pt-br/file-viewer.msg.js} +1 -2
- package/dist/collection/lib/message/resources/{snk-actions-button.msg.js → pt-br/snk-actions-button.msg.js} +3 -1
- package/dist/collection/lib/message/resources/pt-br/snk-application.msg.js +27 -0
- package/dist/collection/lib/message/resources/{snk-attach.msg.js → pt-br/snk-attach.msg.js} +3 -1
- package/dist/collection/lib/message/resources/{snk-configurator.msg.js → pt-br/snk-configurator.msg.js} +6 -1
- package/dist/collection/lib/message/resources/pt-br/snk-crud.msg.js +35 -0
- package/dist/collection/lib/message/resources/{snk-data-unit.msg.js → pt-br/snk-data-unit.msg.js} +5 -2
- package/dist/collection/lib/message/resources/pt-br/snk-error-handler.msg.js +17 -0
- package/dist/collection/lib/message/resources/{snk-exporter.msg.js → pt-br/snk-exporter.msg.js} +1 -2
- package/dist/collection/lib/message/resources/pt-br/snk-filter-bar.msg.js +71 -0
- package/dist/collection/lib/message/resources/pt-br/snk-filter-list.msg.js +3 -0
- package/dist/collection/lib/message/resources/{snk-form.msg.js → pt-br/snk-form.msg.js} +45 -3
- package/dist/collection/lib/message/resources/pt-br/snk-grid.msg.js +41 -0
- package/dist/collection/lib/message/resources/pt-br/snk-layout-form-config.msg.js +10 -0
- package/dist/collection/lib/message/resources/{snk-personalized-filter.msg.js → pt-br/snk-personalized-filter.msg.js} +17 -0
- package/dist/collection/lib/message/resources/pt-br/snk-pesquisa.msg.js +24 -0
- package/dist/collection/lib/message/resources/{snk-simple-crud.msg.js → pt-br/snk-simple-crud.msg.js} +6 -1
- package/dist/collection/lib/message/resources/pt-br/snk-simple-form-config.msg.js +16 -0
- package/dist/collection/lib/message/resources/{snk-taskbar.msg.js → pt-br/snk-taskbar.msg.js} +1 -2
- package/dist/collection/lib/utils/ContinuousInsertUtils.js +6 -2
- package/dist/components/ConfigStorage.js +11 -1
- package/dist/components/ContinuousInsertUtils.js +6 -2
- package/dist/components/DataFetcher.js +2701 -15
- package/dist/components/SnkFormConfigManager.js +1 -1
- package/dist/components/config-header2.js +2 -2
- package/dist/components/dataunit-fetcher.js +25 -21
- package/dist/components/field-config2.js +6 -7
- package/dist/components/field-item2.js +7 -4
- package/dist/components/fields-layout2.js +19 -12
- package/dist/components/fields-selector2.js +12 -6
- package/dist/components/guides-configurator2.js +14 -3
- package/dist/components/pesquisa-tree2.js +9 -4
- package/dist/components/snk-actions-button2.js +3 -2
- package/dist/components/snk-application2.js +277 -72
- package/dist/components/snk-attach2.js +43 -19
- package/dist/components/snk-configurator2.js +1 -1
- package/dist/components/snk-crud.js +13 -8
- package/dist/components/snk-data-unit2.js +5 -11
- package/dist/components/snk-detail-view2.js +19 -13
- package/dist/components/snk-entity-list.js +21 -15
- package/dist/components/snk-expression-group2.js +3 -3
- package/dist/components/snk-expression-item2.js +18 -17
- package/dist/components/snk-filter-bar2.js +6 -6
- package/dist/components/snk-filter-detail2.js +3 -1
- package/dist/components/snk-filter-item2.js +43 -111
- package/dist/components/snk-filter-list.js +1 -1
- package/dist/components/snk-filter-modal.js +1 -1
- package/dist/components/snk-filter-number.js +3 -1
- package/dist/components/snk-filter-period.js +3 -1
- package/dist/components/snk-form-config2.js +3 -3
- package/dist/components/snk-grid-config2.js +113 -214
- package/dist/components/snk-grid2.js +2 -2
- package/dist/components/snk-layout-form-config2.js +7 -1
- package/dist/components/snk-personalized-filter-editor.js +6 -4
- package/dist/components/snk-personalized-filter2.js +1 -1
- package/dist/components/snk-pesquisa2.js +23 -16
- package/dist/components/snk-select-box2.js +5 -3
- package/dist/components/snk-simple-crud2.js +19 -17
- package/dist/components/snk-simple-form-config2.js +8 -2
- package/dist/esm/{ClientSideExporterProvider-3ed744fd.js → ClientSideExporterProvider-7c2781f4.js} +10 -6
- package/dist/esm/{ConfigStorage-79b9e180.js → ConfigStorage-b5a1dba3.js} +12 -2
- package/dist/esm/{DataFetcher-88e56266.js → DataFetcher-6f6de657.js} +2701 -15
- package/dist/esm/{FormConfigHelper-49fe72ca.js → FormConfigHelper-4e42f0b6.js} +4 -5
- package/dist/esm/{ISave-5efafc97.js → ISave-7ecdca20.js} +1 -1
- package/dist/esm/{SnkFormConfigManager-b4b93298.js → SnkFormConfigManager-34fc1dc7.js} +3 -3
- package/dist/esm/{auth-fetcher-3510520e.js → auth-fetcher-7332a9a9.js} +1 -1
- package/dist/esm/config-header.entry.js +2 -2
- package/dist/esm/{dataunit-fetcher-0e025732.js → dataunit-fetcher-f21cbad0.js} +25 -21
- package/dist/esm/field-config_2.entry.js +10 -7
- package/dist/esm/fields-layout.entry.js +20 -13
- package/dist/esm/fields-selector.entry.js +12 -7
- package/dist/esm/{form-config-fetcher-fa208a6c.js → form-config-fetcher-6ab4e805.js} +1 -1
- package/dist/esm/guides-configurator.entry.js +14 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/pesquisa-grid_2.entry.js +12 -8
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-actions-button_8.entry.js +134 -225
- package/dist/esm/snk-application.entry.js +281 -77
- package/dist/esm/snk-attach.entry.js +46 -23
- package/dist/esm/snk-configurator.entry.js +1 -1
- package/dist/esm/snk-crud.entry.js +18 -13
- package/dist/esm/snk-data-exporter.entry.js +5 -6
- package/dist/esm/{snk-data-unit-027bca56.js → snk-data-unit-b7e6e7a6.js} +6 -12
- package/dist/esm/snk-data-unit.entry.js +3 -4
- package/dist/esm/snk-detail-view.entry.js +21 -15
- package/dist/esm/snk-entity-list.entry.js +20 -14
- package/dist/esm/snk-expression-group_2.entry.js +21 -20
- package/dist/esm/snk-filter-bar_4.entry.js +53 -121
- package/dist/esm/snk-filter-detail.entry.js +3 -1
- package/dist/esm/snk-filter-modal-item.entry.js +3 -3
- package/dist/esm/snk-filter-number.entry.js +3 -1
- package/dist/esm/snk-filter-period.entry.js +3 -1
- package/dist/esm/snk-form_2.entry.js +9 -9
- package/dist/esm/snk-grid.entry.js +8 -8
- package/dist/esm/{snk-guides-viewer-32f3d3ab.js → snk-guides-viewer-fbfece85.js} +10 -10
- package/dist/esm/snk-guides-viewer.entry.js +7 -7
- package/dist/esm/snk-personalized-filter-editor.entry.js +6 -4
- package/dist/esm/snk-personalized-filter.entry.js +4 -4
- package/dist/esm/snk-pesquisa.entry.js +27 -20
- package/dist/esm/snk-simple-crud.entry.js +26 -24
- package/dist/sankhyablocks/p-012208e0.entry.js +1 -0
- package/dist/sankhyablocks/p-07b14811.entry.js +1 -0
- package/dist/sankhyablocks/p-0dac8fef.js +1 -0
- package/dist/sankhyablocks/p-0e495575.js +1 -0
- package/dist/sankhyablocks/p-11346b8d.entry.js +1 -0
- package/dist/sankhyablocks/{p-a6513fcb.js → p-1210500e.js} +1 -1
- package/dist/sankhyablocks/p-158adf33.entry.js +1 -0
- package/dist/sankhyablocks/p-162bddae.entry.js +1 -0
- package/dist/sankhyablocks/{p-763b04fa.js → p-16fc4acd.js} +1 -1
- package/dist/sankhyablocks/p-25209340.entry.js +1 -0
- package/dist/sankhyablocks/p-295b83ae.entry.js +1 -0
- package/dist/sankhyablocks/p-3dba3468.js +56 -0
- package/dist/sankhyablocks/p-4872dc3a.entry.js +1 -0
- package/dist/sankhyablocks/{p-c926cf6b.entry.js → p-4e63ffed.entry.js} +1 -1
- package/dist/sankhyablocks/p-5bab470d.entry.js +1 -0
- package/dist/sankhyablocks/p-5c7af8a9.entry.js +1 -0
- package/dist/sankhyablocks/p-5e282b33.entry.js +1 -0
- package/dist/sankhyablocks/p-6703336d.entry.js +1 -0
- package/dist/sankhyablocks/p-6a015ba2.js +1 -0
- package/dist/sankhyablocks/p-735a1175.entry.js +1 -0
- package/dist/sankhyablocks/p-75af335e.entry.js +1 -0
- package/dist/sankhyablocks/p-7b3ca294.entry.js +1 -0
- package/dist/sankhyablocks/p-81769310.entry.js +11 -0
- package/dist/sankhyablocks/p-8d1508aa.entry.js +1 -0
- package/dist/sankhyablocks/p-8f73da95.js +1 -0
- package/dist/sankhyablocks/p-a5108625.entry.js +1 -0
- package/dist/sankhyablocks/p-a86eee47.entry.js +1 -0
- package/dist/sankhyablocks/p-ad2ae575.entry.js +1 -0
- package/dist/sankhyablocks/p-b35574b5.js +60 -0
- package/dist/sankhyablocks/p-b49281be.entry.js +1 -0
- package/dist/sankhyablocks/{p-6dd38d7b.js → p-ba4979b4.js} +1 -1
- package/dist/sankhyablocks/{p-601b252b.js → p-c6331595.js} +1 -1
- package/dist/sankhyablocks/{p-73285a8a.js → p-c9e6d720.js} +1 -1
- package/dist/sankhyablocks/p-d377aa7a.entry.js +1 -0
- package/dist/sankhyablocks/p-eacff4b7.entry.js +1 -0
- package/dist/sankhyablocks/p-eb0616d3.entry.js +1 -0
- package/dist/sankhyablocks/p-f39b0ebe.entry.js +1 -0
- package/dist/sankhyablocks/p-f8f29e1a.entry.js +1 -0
- package/dist/sankhyablocks/p-fa18530e.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/errorhandler/snk-error-handler.d.ts +1 -0
- package/dist/types/components/snk-application/snk-application.d.ts +251 -63
- package/dist/types/components/snk-attach/interfaces/ICrudConfig.d.ts +1 -1
- package/dist/types/components/snk-attach/snk-attach.d.ts +5 -0
- package/dist/types/components/snk-attach/structure/builder/attach-crud-config.builder.d.ts +1 -1
- package/dist/types/components/snk-crud/snk-crud.d.ts +2 -0
- package/dist/types/components/snk-crud/subcomponents/GuideBuilder.d.ts +4 -1
- package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +0 -6
- package/dist/types/components/snk-entity-list/snk-entity-list.d.ts +8 -4
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-number.d.ts +1 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-period.d.ts +1 -0
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +1 -0
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +10 -20
- package/dist/types/components/snk-form-config/FormConfigHelper.d.ts +1 -1
- package/dist/types/components/snk-form-config/fields-layout/fields-layout.d.ts +3 -1
- package/dist/types/components/snk-form-config/fields-selector/fields-selector.d.ts +3 -0
- package/dist/types/components/snk-form-config/guides-configurator/guides-configurator.d.ts +2 -0
- package/dist/types/components/snk-grid/snk-grid.d.ts +4 -0
- package/dist/types/components/snk-grid-config/snk-grid-config.d.ts +14 -20
- package/dist/types/components/snk-grid-config/snk-select-box/snk-select-box.d.ts +4 -0
- package/dist/types/components/snk-layout-form-config/snk-layout-form-config.d.ts +3 -0
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.d.ts +1 -0
- package/dist/types/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.d.ts +6 -0
- package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +3 -0
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +2 -1
- package/dist/types/components/snk-simple-form-config/snk-simple-form-config.d.ts +6 -0
- package/dist/types/components.d.ts +288 -45
- package/dist/types/lib/configs/ConfigStorage.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +3 -0
- package/dist/types/lib/http/data-fetcher/fetchers/grid-config-fetcher.d.ts +3 -2
- package/dist/types/lib/message/SnkMessageBuilder.d.ts +11 -1
- package/dist/types/lib/message/resources/en-us/continuousInsertUtils.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/en-us/crud-utils.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/en-us/dataFetcher.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/en-us/dataUnitDataLoaderHelper.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/en-us/file-viewer.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/en-us/snk-application.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/{snk-attach.msg.d.ts → en-us/snk-attach.msg.d.ts} +0 -1
- package/dist/types/lib/message/resources/{snk-crud.msg.d.ts → en-us/snk-crud.msg.d.ts} +0 -1
- package/dist/types/lib/message/resources/en-us/snk-data-unit.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/en-us/snk-error-handler.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/en-us/snk-exporter.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/en-us/snk-filter-bar.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/en-us/snk-filter-list.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/en-us/snk-layout-form-config.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/en-us/snk-pesquisa.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/{snk-simple-crud.msg.d.ts → en-us/snk-simple-crud.msg.d.ts} +0 -1
- package/dist/types/lib/message/resources/en-us/snk-simple-form-config.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/en-us/snk-taskbar.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/es-es/continuousInsertUtils.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/es-es/crud-utils.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/es-es/dataFetcher.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/es-es/dataUnitDataLoaderHelper.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/es-es/file-viewer.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/es-es/snk-actions-button.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/es-es/snk-application.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/{snk-application.msg.d.ts → es-es/snk-attach.msg.d.ts} +0 -1
- package/dist/types/lib/message/resources/es-es/snk-configurator.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/es-es/snk-crud.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/es-es/snk-data-exporter.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/es-es/snk-data-unit.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/es-es/snk-entity-list.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/es-es/snk-error-handler.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/es-es/snk-exporter.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/es-es/snk-filter-bar.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/es-es/snk-filter-field-search.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/es-es/snk-filter-list.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/es-es/snk-filter-param-config.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/es-es/snk-form.msg.d.ts +4 -0
- package/dist/types/lib/message/resources/es-es/snk-grid.msg.d.ts +2 -0
- package/dist/types/lib/message/resources/es-es/snk-layout-form-config.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/es-es/snk-personalized-filter.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/es-es/snk-pesquisa.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/es-es/snk-print-selector.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/es-es/snk-simple-bar.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/es-es/snk-simple-crud.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/es-es/snk-simple-form-config.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/es-es/snk-taskbar.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/pt-br/continuousInsertUtils.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/pt-br/crud-utils.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/pt-br/dataFetcher.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/pt-br/dataUnitDataLoaderHelper.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/pt-br/file-viewer.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/pt-br/snk-actions-button.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/pt-br/snk-application.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/pt-br/snk-attach.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/pt-br/snk-configurator.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/pt-br/snk-crud.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/pt-br/snk-data-exporter.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/pt-br/snk-data-unit.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/pt-br/snk-entity-list.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/pt-br/snk-error-handler.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/pt-br/snk-exporter.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/pt-br/snk-filter-bar.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/pt-br/snk-filter-field-search.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/pt-br/snk-filter-list.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/pt-br/snk-filter-param-config.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/pt-br/snk-form.msg.d.ts +4 -0
- package/dist/types/lib/message/resources/pt-br/snk-grid.msg.d.ts +2 -0
- package/dist/types/lib/message/resources/pt-br/snk-layout-form-config.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/pt-br/snk-personalized-filter.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/pt-br/snk-pesquisa.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/pt-br/snk-print-selector.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/pt-br/snk-simple-bar.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/pt-br/snk-simple-crud.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/pt-br/snk-simple-form-config.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/pt-br/snk-taskbar.msg.d.ts +1 -0
- package/dist/types/lib/utils/ContinuousInsertUtils.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/SnkMessageBuilder-e3b7850b.js +0 -723
- package/dist/collection/lib/message/resources/snk-application.msg.js +0 -9
- package/dist/collection/lib/message/resources/snk-crud.msg.js +0 -11
- package/dist/collection/lib/message/resources/snk-filter-bar.msg.js +0 -65
- package/dist/collection/lib/message/resources/snk-grid.msg.js +0 -32
- package/dist/components/SnkMessageBuilder.js +0 -701
- package/dist/esm/SnkMessageBuilder-9c269caf.js +0 -701
- package/dist/sankhyablocks/p-09e60995.entry.js +0 -11
- package/dist/sankhyablocks/p-0cb295c1.entry.js +0 -1
- package/dist/sankhyablocks/p-1456d7cb.entry.js +0 -1
- package/dist/sankhyablocks/p-2bde486e.js +0 -1
- package/dist/sankhyablocks/p-349d1968.entry.js +0 -1
- package/dist/sankhyablocks/p-35e73c5d.js +0 -1
- package/dist/sankhyablocks/p-3a48bff3.entry.js +0 -1
- package/dist/sankhyablocks/p-3f24c9b2.js +0 -1
- package/dist/sankhyablocks/p-49d968e2.entry.js +0 -1
- package/dist/sankhyablocks/p-4d2ff2fb.entry.js +0 -1
- package/dist/sankhyablocks/p-6416975c.js +0 -56
- package/dist/sankhyablocks/p-65c5d430.entry.js +0 -1
- package/dist/sankhyablocks/p-67d6d0c8.entry.js +0 -1
- package/dist/sankhyablocks/p-71a05822.entry.js +0 -1
- package/dist/sankhyablocks/p-7993b2e3.js +0 -60
- package/dist/sankhyablocks/p-83c100f2.entry.js +0 -1
- package/dist/sankhyablocks/p-86bd4478.entry.js +0 -1
- package/dist/sankhyablocks/p-90805683.entry.js +0 -1
- package/dist/sankhyablocks/p-9751c42f.entry.js +0 -1
- package/dist/sankhyablocks/p-9ad3557c.entry.js +0 -1
- package/dist/sankhyablocks/p-a06bf7b9.entry.js +0 -1
- package/dist/sankhyablocks/p-a5bb2f93.entry.js +0 -1
- package/dist/sankhyablocks/p-afffa6cb.entry.js +0 -1
- package/dist/sankhyablocks/p-b8b4c6b2.entry.js +0 -1
- package/dist/sankhyablocks/p-bd665460.entry.js +0 -1
- package/dist/sankhyablocks/p-c3324d79.entry.js +0 -1
- package/dist/sankhyablocks/p-cfd0a4c6.entry.js +0 -1
- package/dist/sankhyablocks/p-d67526b6.entry.js +0 -1
- package/dist/sankhyablocks/p-d9491f6f.entry.js +0 -1
- package/dist/sankhyablocks/p-e3521eae.entry.js +0 -1
- package/dist/sankhyablocks/p-e7cccc45.entry.js +0 -1
- package/dist/sankhyablocks/p-e824d565.entry.js +0 -1
- package/dist/sankhyablocks/p-fbba7e3d.js +0 -1
- package/dist/sankhyablocks/p-fc0b609e.js +0 -1
- package/dist/types/lib/message/resources/crud-utils.msg.d.ts +0 -2
- package/dist/types/lib/message/resources/file-viewer.msg.d.ts +0 -2
- package/dist/types/lib/message/resources/snk-data-unit.msg.d.ts +0 -2
- package/dist/types/lib/message/resources/snk-exporter.msg.d.ts +0 -2
- package/dist/types/lib/message/resources/snk-filter-bar.msg.d.ts +0 -2
- package/dist/types/lib/message/resources/snk-taskbar.msg.d.ts +0 -2
- /package/dist/collection/components/snk-simple-crud/{regular-buttons.js → snk-simple-crud.constants.js} +0 -0
- /package/dist/collection/lib/message/resources/{snk-data-exporter.msg.js → pt-br/snk-data-exporter.msg.js} +0 -0
- /package/dist/collection/lib/message/resources/{snk-entity-list.msg.js → pt-br/snk-entity-list.msg.js} +0 -0
- /package/dist/collection/lib/message/resources/{snk-filter-field-search.msg.js → pt-br/snk-filter-field-search.msg.js} +0 -0
- /package/dist/collection/lib/message/resources/{snk-filter-param-config.msg.js → pt-br/snk-filter-param-config.msg.js} +0 -0
- /package/dist/collection/lib/message/resources/{snk-print-selector.msg.js → pt-br/snk-print-selector.msg.js} +0 -0
- /package/dist/collection/lib/message/resources/{snk-simple-bar.msg.js → pt-br/snk-simple-bar.msg.js} +0 -0
- /package/dist/types/components/snk-simple-crud/{regular-buttons.d.ts → snk-simple-crud.constants.d.ts} +0 -0
- /package/dist/types/lib/message/resources/{snk-actions-button.msg.d.ts → en-us/snk-actions-button.msg.d.ts} +0 -0
- /package/dist/types/lib/message/resources/{snk-configurator.msg.d.ts → en-us/snk-configurator.msg.d.ts} +0 -0
- /package/dist/types/lib/message/resources/{snk-data-exporter.msg.d.ts → en-us/snk-data-exporter.msg.d.ts} +0 -0
- /package/dist/types/lib/message/resources/{snk-entity-list.msg.d.ts → en-us/snk-entity-list.msg.d.ts} +0 -0
- /package/dist/types/lib/message/resources/{snk-filter-field-search.msg.d.ts → en-us/snk-filter-field-search.msg.d.ts} +0 -0
- /package/dist/types/lib/message/resources/{snk-filter-param-config.msg.d.ts → en-us/snk-filter-param-config.msg.d.ts} +0 -0
- /package/dist/types/lib/message/resources/{snk-form.msg.d.ts → en-us/snk-form.msg.d.ts} +0 -0
- /package/dist/types/lib/message/resources/{snk-grid.msg.d.ts → en-us/snk-grid.msg.d.ts} +0 -0
- /package/dist/types/lib/message/resources/{snk-personalized-filter.msg.d.ts → en-us/snk-personalized-filter.msg.d.ts} +0 -0
- /package/dist/types/lib/message/resources/{snk-print-selector.msg.d.ts → en-us/snk-print-selector.msg.d.ts} +0 -0
- /package/dist/types/lib/message/resources/{snk-simple-bar.msg.d.ts → en-us/snk-simple-bar.msg.d.ts} +0 -0
@@ -5,16 +5,15 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
const index = require('./index-1cf293c1.js');
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
7
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
8
|
-
const ConfigStorage = require('./ConfigStorage-
|
9
|
-
const DataFetcher = require('./DataFetcher-
|
10
|
-
const authFetcher = require('./auth-fetcher-
|
11
|
-
const dataunitFetcher = require('./dataunit-fetcher-
|
12
|
-
const ISave = require('./ISave-
|
13
|
-
const SnkMessageBuilder = require('./SnkMessageBuilder-e3b7850b.js');
|
8
|
+
const ConfigStorage = require('./ConfigStorage-1931defc.js');
|
9
|
+
const DataFetcher = require('./DataFetcher-ad9fb3bb.js');
|
10
|
+
const authFetcher = require('./auth-fetcher-afbe69ab.js');
|
11
|
+
const dataunitFetcher = require('./dataunit-fetcher-c7253b02.js');
|
12
|
+
const ISave = require('./ISave-18ffb73e.js');
|
14
13
|
const constants = require('./constants-6d82e405.js');
|
15
14
|
require('./index-e3e39724.js');
|
16
15
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
17
|
-
const formConfigFetcher = require('./form-config-fetcher-
|
16
|
+
const formConfigFetcher = require('./form-config-fetcher-f6e66d64.js');
|
18
17
|
require('./PrintUtils-bcaeb82f.js');
|
19
18
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
20
19
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
@@ -239,6 +238,9 @@ class SnkErrorHandler {
|
|
239
238
|
window.addEventListener("error", evt => this.errorHandler(evt));
|
240
239
|
window.addEventListener("unhandledrejection", evt => this.rejectionHandler(evt));
|
241
240
|
}
|
241
|
+
getMessage(key, params) {
|
242
|
+
return this._app.messagesBuilder.getMessage(key, params);
|
243
|
+
}
|
242
244
|
rejectionHandler(evt) {
|
243
245
|
const reason = evt.reason;
|
244
246
|
//Promisse rejeitada com WaitingChangeException, não precisam
|
@@ -250,7 +252,7 @@ class SnkErrorHandler {
|
|
250
252
|
else {
|
251
253
|
this._app.isDebugMode().then((isDebug) => {
|
252
254
|
if (isDebug) {
|
253
|
-
this._app.error("
|
255
|
+
this._app.error(this.getMessage("snkErrorHandler.title.promiseRejected"), this.getMessage("snkErrorHandler.message.undeterminedPromiseRejection"));
|
254
256
|
}
|
255
257
|
});
|
256
258
|
}
|
@@ -260,15 +262,17 @@ class SnkErrorHandler {
|
|
260
262
|
this.processException(evt.error);
|
261
263
|
}
|
262
264
|
buildErrorCodeHTML(errorCode) {
|
263
|
-
const
|
264
|
-
|
265
|
+
const cannotOpenHelpMessage = this.getMessage("snkErrorHandler.message.cannotOpenHelp");
|
266
|
+
const errorCodeLabel = this.getMessage("snkErrorHandler.errorCode.label");
|
267
|
+
const onclick = `try{window.workspace.openHelp('_tbcode:${errorCode}')} catch(e){alert('${cannotOpenHelpMessage}');}`;
|
268
|
+
return `<br><a href="#" onclick="${onclick}">${errorCodeLabel}${errorCode}</a>`;
|
265
269
|
}
|
266
270
|
processException(exception) {
|
267
271
|
if (exception.errorCode) {
|
268
272
|
exception.message += this.buildErrorCodeHTML(exception.errorCode);
|
269
273
|
}
|
270
274
|
if (exception instanceof core.SilentException) {
|
271
|
-
console.warn("
|
275
|
+
console.warn(this.getMessage("snkErrorHandler.message.silentExceptionIgnored"), exception);
|
272
276
|
}
|
273
277
|
else if (exception instanceof core.WaitingChangeException) {
|
274
278
|
this._app.alert(exception.title, exception.message);
|
@@ -286,8 +290,9 @@ class SnkErrorHandler {
|
|
286
290
|
this._app.error(exception.name, exception.message);
|
287
291
|
}
|
288
292
|
else {
|
289
|
-
const title = (exception === null || exception === void 0 ? void 0 : exception.title) || "
|
290
|
-
const message = (typeof exception === "string") ? exception :
|
293
|
+
const title = (exception === null || exception === void 0 ? void 0 : exception.title) || this.getMessage("snkErrorHandler.title.errorDetected", undefined);
|
294
|
+
const message = (typeof exception === "string") ? exception :
|
295
|
+
exception.message || `${this.getMessage("snkErrorHandler.error.internal")} "${core.ObjectUtils.objectToString(exception)}"`;
|
291
296
|
this._app.error(title, message);
|
292
297
|
}
|
293
298
|
}
|
@@ -528,6 +533,7 @@ const SnkApplication = class {
|
|
528
533
|
this.applicationLoaded = index.createEvent(this, "applicationLoaded", 7);
|
529
534
|
this.applicationLoading = index.createEvent(this, "applicationLoading", 7);
|
530
535
|
this.NEW_VERSION_POPUP_LOCKER = "NEW_VERSION_POPUP_LOCKER";
|
536
|
+
this.FEATURE_FLAG_CACHE_DURATION = 3600000; // 1 hora em milissegundos
|
531
537
|
this._authPromises = [];
|
532
538
|
this._keyboardManager = new core.KeyboardManager();
|
533
539
|
this._waitingAppReady = new Array();
|
@@ -535,6 +541,7 @@ const SnkApplication = class {
|
|
535
541
|
this._duPromises = new Map();
|
536
542
|
this._requestListener = RequestListenerFactory.create({ strategy: 'request_time' });
|
537
543
|
this._maxTimerAppLoading = 10000;
|
544
|
+
this._featureFlagsCache = new Map();
|
538
545
|
this._isBrowserTypeElectron = false;
|
539
546
|
this._pendingActions = new Map;
|
540
547
|
this._loadPkParameter = null;
|
@@ -609,22 +616,24 @@ const SnkApplication = class {
|
|
609
616
|
}
|
610
617
|
/**
|
611
618
|
* Obtém o controlador de teclado.
|
612
|
-
*
|
613
|
-
* @
|
619
|
+
* @returns {Promise<KeyboardManager>} O gerenciador de teclado.
|
620
|
+
* @async
|
614
621
|
*/
|
615
622
|
async getKeyboardManager() {
|
616
623
|
return Promise.resolve(this._keyboardManager);
|
617
624
|
}
|
618
625
|
/**
|
619
|
-
* Obtém o notificador de Layout de
|
620
|
-
*
|
621
|
-
* @
|
626
|
+
* Obtém o notificador de Layout de formulário.
|
627
|
+
* @returns {Promise<LayoutFormConfig>} O configurador de Layout do Formulário.
|
628
|
+
* @async
|
622
629
|
*/
|
623
630
|
async getLayoutFormConfig() {
|
624
631
|
return Promise.resolve(this._LayoutFormConfigSingleton);
|
625
632
|
}
|
626
633
|
/**
|
627
634
|
* Obtém `true` caso o usuário logado seja o SUP.
|
635
|
+
* @returns {Promise<boolean>} `true` se o usuário for SUP, `false` caso contrário.
|
636
|
+
* @async
|
628
637
|
*/
|
629
638
|
async isUserSup() {
|
630
639
|
return new Promise((resolve, reject) => {
|
@@ -637,9 +646,10 @@ const SnkApplication = class {
|
|
637
646
|
}
|
638
647
|
/**
|
639
648
|
* Adiciona uma ação pendente que deve ser executada por um determinado locker.
|
640
|
-
*
|
641
|
-
* @param
|
642
|
-
* @
|
649
|
+
* @param {string} actionsLocker - Nome do locker da ação que será adicionada.
|
650
|
+
* @param {Function} action - Ação que será executada.
|
651
|
+
* @returns {Promise<void>}
|
652
|
+
* @async
|
643
653
|
*/
|
644
654
|
async addPendingAction(actionsLocker, action) {
|
645
655
|
var _a;
|
@@ -647,15 +657,22 @@ const SnkApplication = class {
|
|
647
657
|
this._pendingActions.set(actionsLocker, [...actionsFromContext, action]);
|
648
658
|
}
|
649
659
|
/**
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
660
|
+
* Realiza a chamada ao Service Broker conforme o nome do serviço.
|
661
|
+
* @param {string} serviceName - Nome do serviço.
|
662
|
+
* @param {string | Object} payload - Dados que serão processados na ação.
|
663
|
+
* @param {Options} [options] - Parâmetros de URL.
|
664
|
+
* @returns {Promise<any>} A resposta do Service Broker.
|
665
|
+
* @async
|
666
|
+
*/
|
656
667
|
async callServiceBroker(serviceName, payload, options) {
|
657
668
|
return DataFetcher.DataFetcher.get().callServiceBroker(serviceName, payload, options);
|
658
669
|
}
|
670
|
+
/**
|
671
|
+
* Inicializa o onboarding para uma chave específica.
|
672
|
+
* @param {string} onboardingKey - A chave do onboarding a ser iniciado.
|
673
|
+
* @returns {Promise<void>}
|
674
|
+
* @async
|
675
|
+
*/
|
659
676
|
async initOnboarding(onboardingKey) {
|
660
677
|
if (this.hasToShowNewVersionPopup()) {
|
661
678
|
await this.addPendingAction(this.NEW_VERSION_POPUP_LOCKER, () => this.doInitOnboarding(onboardingKey));
|
@@ -667,7 +684,11 @@ const SnkApplication = class {
|
|
667
684
|
core.OnboardingUtils.getInstance().init(onboardingKey, window.envContext);
|
668
685
|
}
|
669
686
|
/**
|
670
|
-
* Obtém `true` caso o usuário logado
|
687
|
+
* Obtém `true` caso o usuário logado tenha permissão para determinada ação.
|
688
|
+
* @param {AutorizationType} access - O tipo de acesso a ser verificado.
|
689
|
+
* @param {string} [resourceID] - O ID do recurso para verificar a permissão. Se não fornecido, verifica a permissão da aplicação.
|
690
|
+
* @returns {Promise<boolean>} `true` se o usuário tiver acesso, `false` caso contrário.
|
691
|
+
* @async
|
671
692
|
*/
|
672
693
|
async hasAccess(access, resourceID) {
|
673
694
|
return new Promise((resolve, reject) => {
|
@@ -679,7 +700,10 @@ const SnkApplication = class {
|
|
679
700
|
});
|
680
701
|
}
|
681
702
|
/**
|
682
|
-
* Obtém todos os acessos do usuário logado.
|
703
|
+
* Obtém todos os acessos do usuário logado para um recurso específico ou para a aplicação.
|
704
|
+
* @param {string} [resourceID] - O ID do recurso. Se não fornecido, obtém os acessos da aplicação.
|
705
|
+
* @returns {Promise<any>} Um objeto contendo todos os tipos de acesso e se o usuário os possui.
|
706
|
+
* @async
|
683
707
|
*/
|
684
708
|
async getAllAccess(resourceID) {
|
685
709
|
return new Promise((resolve, reject) => {
|
@@ -704,36 +728,57 @@ const SnkApplication = class {
|
|
704
728
|
}
|
705
729
|
/**
|
706
730
|
* Obtém o valor de um parâmetro do tipo string.
|
731
|
+
* @param {string} name - O nome do parâmetro.
|
732
|
+
* @returns {Promise<string>} O valor do parâmetro como string.
|
733
|
+
* @async
|
707
734
|
*/
|
708
735
|
async getStringParam(name) {
|
709
736
|
return this.parameters.asString(name);
|
710
737
|
}
|
711
738
|
/**
|
712
739
|
* Obtém o valor de um parâmetro do tipo Inteiro.
|
740
|
+
* @param {string} name - O nome do parâmetro.
|
741
|
+
* @returns {Promise<number>} O valor do parâmetro como número inteiro.
|
742
|
+
* @async
|
713
743
|
*/
|
714
744
|
async getIntParam(name) {
|
715
745
|
return this.parameters.asInteger(name);
|
716
746
|
}
|
717
747
|
/**
|
718
748
|
* Obtém o valor de um parâmetro do tipo Decimal.
|
749
|
+
* @param {string} name - O nome do parâmetro.
|
750
|
+
* @returns {Promise<number>} O valor do parâmetro como número decimal.
|
751
|
+
* @async
|
719
752
|
*/
|
720
753
|
async getFloatParam(name) {
|
721
754
|
return this.parameters.asFloat(name);
|
722
755
|
}
|
723
756
|
/**
|
724
757
|
* Obtém o valor de um parâmetro do tipo booleano.
|
758
|
+
* @param {string} name - O nome do parâmetro.
|
759
|
+
* @returns {Promise<boolean>} O valor do parâmetro como booleano.
|
760
|
+
* @async
|
725
761
|
*/
|
726
762
|
async getBooleanParam(name) {
|
727
763
|
return this.parameters.asBoolean(name);
|
728
764
|
}
|
729
765
|
/**
|
730
766
|
* Obtém o valor de um parâmetro do tipo data.
|
767
|
+
* @param {string} name - O nome do parâmetro.
|
768
|
+
* @returns {Promise<Date>} O valor do parâmetro como objeto Date.
|
769
|
+
* @async
|
731
770
|
*/
|
732
771
|
async getDateParam(name) {
|
733
772
|
return this.parameters.asDate(name);
|
734
773
|
}
|
735
774
|
/**
|
736
775
|
* Exibe o conteúdo passado em um Popup.
|
776
|
+
* @param {HTMLElement} content - O elemento HTML a ser exibido no popup.
|
777
|
+
* @param {"auto" | "full"} [size="full"] - O tamanho do popup.
|
778
|
+
* @param {boolean} [useHeader=true] - Define se o cabeçalho do popup deve ser usado.
|
779
|
+
* @param {Function} [onCloseCallback] - Função a ser chamada quando o popup for fechado.
|
780
|
+
* @returns {Promise<void>}
|
781
|
+
* @async
|
737
782
|
*/
|
738
783
|
async showPopUp(content, size = "full", useHeader = true, onCloseCallback) {
|
739
784
|
this.clearContent(this._popUp);
|
@@ -750,6 +795,9 @@ const SnkApplication = class {
|
|
750
795
|
}
|
751
796
|
/**
|
752
797
|
* Exibe o conteúdo passado em um Modal.
|
798
|
+
* @param {HTMLElement} content - O elemento HTML a ser exibido no modal.
|
799
|
+
* @returns {Promise<void>}
|
800
|
+
* @async
|
753
801
|
*/
|
754
802
|
async showModal(content) {
|
755
803
|
this.clearContent(this._rightModal);
|
@@ -757,15 +805,18 @@ const SnkApplication = class {
|
|
757
805
|
this._rightModal.opened = true;
|
758
806
|
}
|
759
807
|
/**
|
760
|
-
* Apresenta uma lista de alertas
|
761
|
-
*
|
762
|
-
* de
|
808
|
+
* Apresenta uma lista de alertas.
|
809
|
+
* Geralmente é utilizado para apresentar resultados de processamentos em lote.
|
810
|
+
* @param {Array<AlertItem>} alerts - A lista de alertas a serem exibidos.
|
811
|
+
* @returns {Promise<void>}
|
763
812
|
*/
|
764
813
|
showAlerts(alerts) {
|
765
814
|
return utils.ApplicationUtils.showAlerts({ alerts });
|
766
815
|
}
|
767
816
|
/**
|
768
817
|
* Fecha o Modal e limpa o conteúdo.
|
818
|
+
* @returns {Promise<void>}
|
819
|
+
* @async
|
769
820
|
*/
|
770
821
|
async closeModal() {
|
771
822
|
this.clearContent(this._rightModal);
|
@@ -773,6 +824,8 @@ const SnkApplication = class {
|
|
773
824
|
}
|
774
825
|
/**
|
775
826
|
* Fecha o Popup e limpa o conteúdo.
|
827
|
+
* @returns {Promise<void>}
|
828
|
+
* @async
|
776
829
|
*/
|
777
830
|
async closePopUp() {
|
778
831
|
this.clearContent(this._popUp);
|
@@ -781,7 +834,10 @@ const SnkApplication = class {
|
|
781
834
|
this._popUp.heightMode = "full";
|
782
835
|
}
|
783
836
|
/**
|
784
|
-
* Verifica se a licença do cliente tem determinado opcional (produto)
|
837
|
+
* Verifica se a licença do cliente tem determinado opcional (produto).
|
838
|
+
* @param {string} opcional - O nome do opcional ou uma string de opcionais separados por vírgula.
|
839
|
+
* @returns {Promise<boolean>} `true` se o cliente tiver o opcional, `false` caso contrário.
|
840
|
+
* @async
|
785
841
|
*/
|
786
842
|
async temOpcional(opcional) {
|
787
843
|
const opts = opcional.split(",");
|
@@ -807,7 +863,10 @@ const SnkApplication = class {
|
|
807
863
|
});
|
808
864
|
}
|
809
865
|
/**
|
810
|
-
* Obtém a configuração de um recurso por service broker
|
866
|
+
* Obtém a configuração de um recurso por service broker.
|
867
|
+
* @param {string} key - A chave da configuração.
|
868
|
+
* @returns {Promise<any>} Os dados da configuração.
|
869
|
+
* @async
|
811
870
|
*/
|
812
871
|
async getConfig(key) {
|
813
872
|
let payload = {
|
@@ -826,8 +885,35 @@ const SnkApplication = class {
|
|
826
885
|
.catch(error => reject(error));
|
827
886
|
});
|
828
887
|
}
|
888
|
+
/**
|
889
|
+
* Retorna se uma feature flag global está ativa ou não.
|
890
|
+
*/
|
891
|
+
async isFeatureActive(featureName) {
|
892
|
+
const now = Date.now();
|
893
|
+
let payload = {
|
894
|
+
"serviceName": "SystemUtilsSP.featureIsActive",
|
895
|
+
"requestBody": {
|
896
|
+
"featureName": featureName
|
897
|
+
}
|
898
|
+
};
|
899
|
+
if (this._featureFlagsCache.get(featureName) && now < this._featureFlagsCache.get(featureName).expires) {
|
900
|
+
return Promise.resolve(this._featureFlagsCache.get(featureName).isActive);
|
901
|
+
}
|
902
|
+
//Caso ocorra um erro nessa chamada, o reject do error é feito automaticamente
|
903
|
+
const result = await DataFetcher.DataFetcher.get().callServiceBroker("SystemUtilsSP.featureIsActive", JSON.stringify(payload));
|
904
|
+
const isActive = result.isActive;
|
905
|
+
this._featureFlagsCache.set(featureName, {
|
906
|
+
isActive: isActive,
|
907
|
+
expires: now + this.FEATURE_FLAG_CACHE_DURATION,
|
908
|
+
});
|
909
|
+
return isActive;
|
910
|
+
}
|
829
911
|
/**
|
830
912
|
* Salva a configuração de determinado recurso.
|
913
|
+
* @param {string} key - A chave da configuração.
|
914
|
+
* @param {Object} data - Os dados da configuração a serem salvos.
|
915
|
+
* @returns {Promise<any>} O resultado da operação de salvamento.
|
916
|
+
* @async
|
831
917
|
*/
|
832
918
|
async saveConfig(key, data) {
|
833
919
|
let payload = {
|
@@ -849,21 +935,30 @@ const SnkApplication = class {
|
|
849
935
|
}
|
850
936
|
/**
|
851
937
|
* Acessa informações de contexto "empurrados" na abertura da tela.
|
938
|
+
* @param {string} attribName - O nome do atributo.
|
939
|
+
* @returns {Promise<string>} O valor do atributo.
|
940
|
+
* @async
|
852
941
|
*/
|
853
942
|
async getAttributeFromHTMLWrapper(attribName) {
|
854
943
|
return Promise.resolve(window[attribName]);
|
855
944
|
}
|
856
945
|
/**
|
857
946
|
* Abre determinada tela, repassando pkObject.
|
947
|
+
* @param {string} resourceId - O ID do recurso da tela a ser aberta.
|
948
|
+
* @param {Object} pkObject - O objeto de chave primária a ser passado para a tela.
|
949
|
+
* @returns {Promise<void>}
|
950
|
+
* @async
|
858
951
|
*/
|
859
952
|
async openApp(resourceId, pkObject) {
|
860
953
|
Workspace.openAppActivity(resourceId, pkObject);
|
861
954
|
}
|
862
955
|
/**
|
863
956
|
* Realiza a chamada do WebConnection para realizar a exportação de arquivo.
|
864
|
-
* @param keyPort - Chave da porta que será requisitada.
|
865
|
-
* @param methodName - Nome do tipo de exportação de arquivo que será realizado.
|
866
|
-
* @param params - Parâmetros necessários para realizar a exportação do arquivo.
|
957
|
+
* @param {string} keyPort - Chave da porta que será requisitada.
|
958
|
+
* @param {string} methodName - Nome do tipo de exportação de arquivo que será realizado.
|
959
|
+
* @param {IAppletCallerParams} params - Parâmetros necessários para realizar a exportação do arquivo.
|
960
|
+
* @returns {Promise<void>}
|
961
|
+
* @async
|
867
962
|
*/
|
868
963
|
async webConnection(keyPort, methodName, params) {
|
869
964
|
this.getStringParam(keyPort).then((port) => {
|
@@ -884,6 +979,13 @@ const SnkApplication = class {
|
|
884
979
|
/**
|
885
980
|
* Cria o DataUnit a partir do nome da entidade. É possível armazená-lo no cache
|
886
981
|
* passando o dataUnitName, assim, se mais de uma chamada for feita, o mesmo DataUnit será usado.
|
982
|
+
* @param {string} entityName - O nome da entidade.
|
983
|
+
* @param {string} [dataUnitName] - O nome para identificar o DataUnit no cache.
|
984
|
+
* @param {DataUnit} [parentDataUnit] - O DataUnit pai, se houver.
|
985
|
+
* @param {string} [configName] - O nome da configuração a ser usada.
|
986
|
+
* @param {string} [resourceID] - O ID do recurso. Se não fornecido, usa o da aplicação.
|
987
|
+
* @returns {Promise<DataUnit>} O DataUnit criado ou obtido do cache.
|
988
|
+
* @async
|
887
989
|
*/
|
888
990
|
async createDataunit(entityName, dataUnitName, parentDataUnit, configName, resourceID) {
|
889
991
|
if (resourceID == undefined) {
|
@@ -915,9 +1017,11 @@ const SnkApplication = class {
|
|
915
1017
|
}
|
916
1018
|
/**
|
917
1019
|
* Atualiza o cache de dataunits da aplicação.
|
918
|
-
* @param oldName - Nome do dataunit que está em cache.
|
919
|
-
* @param dataUnitName - Nome do dataunit que será armazenado em cache.
|
920
|
-
* @param dataUnit -
|
1020
|
+
* @param {string} oldName - Nome do dataunit que está em cache (será removido).
|
1021
|
+
* @param {string} dataUnitName - Nome do dataunit que será armazenado em cache.
|
1022
|
+
* @param {DataUnit} dataUnit - Instância do Dataunit para ser armazenado em cache.
|
1023
|
+
* @returns {Promise<void>}
|
1024
|
+
* @async
|
921
1025
|
*/
|
922
1026
|
async updateDataunitCache(oldName, dataUnitName, dataUnit) {
|
923
1027
|
if (oldName) {
|
@@ -926,7 +1030,14 @@ const SnkApplication = class {
|
|
926
1030
|
this._duCache.set(dataUnitName, dataUnit);
|
927
1031
|
}
|
928
1032
|
/**
|
929
|
-
*
|
1033
|
+
* Obtém um DataUnit do cache ou cria um caso ainda não tenha sido criado.
|
1034
|
+
* @param {string} entityName - O nome da entidade.
|
1035
|
+
* @param {string} dataUnitName - O nome para identificar o DataUnit no cache.
|
1036
|
+
* @param {DataUnit} [parentDataUnit] - O DataUnit pai, se houver.
|
1037
|
+
* @param {string} [configName] - O nome da configuração a ser usada.
|
1038
|
+
* @param {string} [resourceID] - O ID do recurso. Se não fornecido, usa o da aplicação.
|
1039
|
+
* @returns {Promise<DataUnit>} O DataUnit obtido do cache ou recém-criado.
|
1040
|
+
* @async
|
930
1041
|
*/
|
931
1042
|
async getDataUnit(entityName, dataUnitName, parentDataUnit, configName, resourceID) {
|
932
1043
|
return new Promise((resolve, reject) => {
|
@@ -943,9 +1054,10 @@ const SnkApplication = class {
|
|
943
1054
|
}
|
944
1055
|
/**
|
945
1056
|
* Registra um client event para o DataFetcher da aplicação.
|
946
|
-
*
|
947
|
-
* @param
|
948
|
-
* @
|
1057
|
+
* @param {String} eventID - Nome do evento para a aplicação se registrar.
|
1058
|
+
* @param {(clientEvent: IClientEventResponse, dataFetcherReacaller: IDataFetcherRecaller) => void} handler - Função de callback que será chamada quando o client event ocorrer.
|
1059
|
+
* @returns {Promise<void>}
|
1060
|
+
* @async
|
949
1061
|
*/
|
950
1062
|
async addClientEvent(eventID, handler) {
|
951
1063
|
return new Promise((resolve) => {
|
@@ -954,9 +1066,10 @@ const SnkApplication = class {
|
|
954
1066
|
});
|
955
1067
|
}
|
956
1068
|
/**
|
957
|
-
* Remove um client event
|
958
|
-
*
|
959
|
-
* @
|
1069
|
+
* Remove um client event do DataFetcher da aplicação.
|
1070
|
+
* @param {String} eventID - Nome do evento a ser removido.
|
1071
|
+
* @returns {Promise<void>}
|
1072
|
+
* @async
|
960
1073
|
*/
|
961
1074
|
async removeClientEvent(eventID) {
|
962
1075
|
return new Promise((resolve) => {
|
@@ -965,9 +1078,10 @@ const SnkApplication = class {
|
|
965
1078
|
});
|
966
1079
|
}
|
967
1080
|
/**
|
968
|
-
*
|
969
|
-
*
|
970
|
-
* @
|
1081
|
+
* Verifica se um client event está registrado no DataFetcher da aplicação.
|
1082
|
+
* @param {String} eventID - Nome do evento a ser verificado.
|
1083
|
+
* @returns {Promise<boolean>} `true` se o evento estiver registrado, `false` caso contrário.
|
1084
|
+
* @async
|
971
1085
|
*/
|
972
1086
|
async hasClientEvent(eventID) {
|
973
1087
|
return new Promise((resolve) => {
|
@@ -985,61 +1099,106 @@ const SnkApplication = class {
|
|
985
1099
|
}
|
986
1100
|
/**
|
987
1101
|
* Obtém o resourceID da tela em questão.
|
1102
|
+
* @returns {Promise<string>} O ID do recurso da aplicação.
|
1103
|
+
* @async
|
988
1104
|
*/
|
989
1105
|
async getResourceID() {
|
990
1106
|
return Promise.resolve(this.applicationResourceID);
|
991
1107
|
}
|
992
1108
|
/**
|
993
|
-
* Obtém o UserId
|
1109
|
+
* Obtém o UserId do usuário logado.
|
1110
|
+
* @returns {Promise<string>} O ID do usuário.
|
1111
|
+
* @async
|
994
1112
|
*/
|
995
1113
|
async getUserID() {
|
996
1114
|
return Promise.resolve(window["UID"]);
|
997
1115
|
}
|
998
1116
|
/**
|
999
1117
|
* Exibe o diálogo de alerta de acordo com os parâmetros passados.
|
1118
|
+
* @param {string} title - O título do alerta.
|
1119
|
+
* @param {string} message - A mensagem do alerta.
|
1120
|
+
* @param {string} [icon] - O nome do ícone a ser exibido.
|
1121
|
+
* @param {MessageOptions} [options] - Opções adicionais para a mensagem.
|
1122
|
+
* @returns {Promise<boolean>}
|
1123
|
+
* @async
|
1000
1124
|
*/
|
1001
1125
|
async alert(title, message, icon, options) {
|
1002
1126
|
return utils.ApplicationUtils.alert(title, message, icon, options);
|
1003
1127
|
}
|
1004
1128
|
/**
|
1005
1129
|
* Exibe o diálogo de erro de acordo com os parâmetros passados.
|
1130
|
+
* @param {string} title - O título do erro.
|
1131
|
+
* @param {string} message - A mensagem do erro.
|
1132
|
+
* @param {string} [icon] - O nome do ícone a ser exibido.
|
1133
|
+
* @param {MessageOptions} [options] - Opções adicionais para a mensagem.
|
1134
|
+
* @returns {Promise<boolean>}
|
1135
|
+
* @async
|
1006
1136
|
*/
|
1007
1137
|
async error(title, message, icon, options) {
|
1008
1138
|
return utils.ApplicationUtils.error(title, message, icon, options);
|
1009
1139
|
}
|
1010
1140
|
/**
|
1011
1141
|
* Exibe o diálogo de sucesso de acordo com os parâmetros passados.
|
1142
|
+
* @param {string} title - O título da mensagem de sucesso.
|
1143
|
+
* @param {string} message - A mensagem de sucesso.
|
1144
|
+
* @param {string} [icon] - O nome do ícone a ser exibido.
|
1145
|
+
* @param {MessageOptions} [options] - Opções adicionais para a mensagem.
|
1146
|
+
* @returns {Promise<boolean>}
|
1147
|
+
* @async
|
1012
1148
|
*/
|
1013
1149
|
async success(title, message, icon, options) {
|
1014
1150
|
return utils.ApplicationUtils.success(title, message, icon, options);
|
1015
1151
|
}
|
1016
1152
|
/**
|
1017
|
-
* Exibe um diálogo de mensagem comum
|
1153
|
+
* Exibe um diálogo de mensagem comum.
|
1154
|
+
* @param {string} title - O título da mensagem.
|
1155
|
+
* @param {string} message - A mensagem.
|
1156
|
+
* @param {string} [icon] - O nome do ícone a ser exibido.
|
1157
|
+
* @param {MessageOptions} [options] - Opções adicionais para a mensagem.
|
1158
|
+
* @returns {Promise<boolean>}
|
1159
|
+
* @async
|
1018
1160
|
*/
|
1019
1161
|
async message(title, message, icon, options) {
|
1020
1162
|
return utils.ApplicationUtils.message(title, message, icon, options);
|
1021
1163
|
}
|
1022
1164
|
/**
|
1023
|
-
* Exibe um diálogo de confirmação
|
1165
|
+
* Exibe um diálogo de confirmação.
|
1166
|
+
* @param {string} title - O título da confirmação.
|
1167
|
+
* @param {string} message - A mensagem da confirmação.
|
1168
|
+
* @param {string} [icon] - O nome do ícone a ser exibido.
|
1169
|
+
* @param {DialogType} [dialogType] - O tipo de diálogo.
|
1170
|
+
* @param {MessageOptions} [options] - Opções adicionais para a mensagem.
|
1171
|
+
* @returns {Promise<boolean>} `true` se confirmado, `false` caso contrário.
|
1172
|
+
* @async
|
1024
1173
|
*/
|
1025
1174
|
async confirm(title, message, icon, dialogType, options) {
|
1026
1175
|
return utils.ApplicationUtils.confirm(title, message, icon, dialogType, options);
|
1027
1176
|
}
|
1028
1177
|
/**
|
1029
1178
|
* Exibe uma informação efêmera (de segundo plano).
|
1179
|
+
* @param {string} message - A mensagem a ser exibida.
|
1180
|
+
* @param {MessageOptions} [options] - Opções adicionais para a mensagem.
|
1181
|
+
* @returns {Promise<void>}
|
1182
|
+
* @async
|
1030
1183
|
*/
|
1031
1184
|
async info(message, options) {
|
1032
1185
|
return utils.ApplicationUtils.info(message, options);
|
1033
1186
|
}
|
1034
1187
|
/**
|
1035
1188
|
* Obtém os totalizadores da grade.
|
1189
|
+
* @param {string} name - O nome da configuração de totalizadores.
|
1190
|
+
* @param {string} resourceID - O ID do recurso.
|
1191
|
+
* @param {Array<Filter>} filters - A lista de filtros a serem aplicados.
|
1192
|
+
* @returns {Promise<Map<string, number>>} Um mapa com os nomes dos totalizadores e seus valores.
|
1193
|
+
* @async
|
1036
1194
|
*/
|
1037
1195
|
async loadTotals(name, resourceID, filters) {
|
1038
1196
|
return this.totalsFetcher.fetchTotals(name, resourceID, filters);
|
1039
1197
|
}
|
1040
1198
|
/**
|
1041
|
-
* Obtém a informação se o último carregamento do dataunit foi feito através de um loadByPk
|
1042
|
-
* @returns boolean
|
1199
|
+
* Obtém a informação se o último carregamento do dataunit foi feito através de um loadByPk.
|
1200
|
+
* @returns {Promise<boolean>} `true` se foi carregado por PK, `false` caso contrário.
|
1201
|
+
* @async
|
1043
1202
|
*/
|
1044
1203
|
async isLoadedByPk() {
|
1045
1204
|
return Promise.resolve(this._isLoadedByPk);
|
@@ -1047,6 +1206,10 @@ const SnkApplication = class {
|
|
1047
1206
|
/**
|
1048
1207
|
* Remove registro do cache do PreLoader do dataunit.
|
1049
1208
|
* Deve ser usado quando existe um dataunit usando loader do application, mas o removeLoader está sendo sobrescrito.
|
1209
|
+
* @param {DataUnit} dataUnit - O DataUnit do qual o registro será removido.
|
1210
|
+
* @param {Array<string>} recordsIDs - Os IDs dos registros a serem removidos.
|
1211
|
+
* @returns {Promise<void>}
|
1212
|
+
* @async
|
1050
1213
|
*/
|
1051
1214
|
async preloadMangerRemoveRecord(dataUnit, recordsIDs) {
|
1052
1215
|
const records = recordsIDs.map(id => {
|
@@ -1106,8 +1269,14 @@ const SnkApplication = class {
|
|
1106
1269
|
return this._authFetcher;
|
1107
1270
|
}
|
1108
1271
|
/**
|
1109
|
-
* Obtém as opções em componentes de pesquisa
|
1272
|
+
* Obtém as opções em componentes de pesquisa.
|
1110
1273
|
* Ex.: snk-config-options
|
1274
|
+
* @param {ISearchArgument} searchArgument - Argumentos da pesquisa.
|
1275
|
+
* @param {string} fieldName - Nome do campo no DataUnit.
|
1276
|
+
* @param {DataUnit} dataUnit - Instância do DataUnit.
|
1277
|
+
* @param {ISearchCtxOptions} [ctxOptions] - Opções de contexto adicionais.
|
1278
|
+
* @returns {Promise<Array<IOption> | IOption>} Uma lista de opções ou uma única opção.
|
1279
|
+
* @async
|
1111
1280
|
*/
|
1112
1281
|
async executeSearch(searchArgument, fieldName, dataUnit, ctxOptions) {
|
1113
1282
|
const descriptor = dataUnit === null || dataUnit === void 0 ? void 0 : dataUnit.getField(fieldName);
|
@@ -1135,8 +1304,8 @@ const SnkApplication = class {
|
|
1135
1304
|
const dataType = (masterDescriptor === null || masterDescriptor === void 0 ? void 0 : masterDescriptor.dataType) || core.DataType.TEXT;
|
1136
1305
|
const value = dataUnit.getFieldValue(fieldName);
|
1137
1306
|
if (value == undefined) {
|
1138
|
-
this.alert("
|
1139
|
-
throw new Error(
|
1307
|
+
this.alert(this.getMessage("snkApplication.search.error.title"), this.getMessage("snkApplication.search.error.requiredField", { fieldLabel: masterDescriptor.label }));
|
1308
|
+
throw new Error(this.getMessage("snkApplication.search.error.requiredField", { fieldLabel: masterDescriptor.label }));
|
1140
1309
|
}
|
1141
1310
|
return { name: fieldName, value, dataType };
|
1142
1311
|
})
|
@@ -1205,8 +1374,11 @@ const SnkApplication = class {
|
|
1205
1374
|
return await this.executePreparedSearch(mode, argument, Object.assign(Object.assign({}, options), { useSearchPlus: true }));
|
1206
1375
|
}
|
1207
1376
|
/**
|
1208
|
-
*
|
1209
|
-
*
|
1377
|
+
* @param {string} mode - O modo da pesquisa ("ADVANCED" ou outro).
|
1378
|
+
* @param {string} argument - O argumento da pesquisa.
|
1379
|
+
* @param {any} options - Opções preparadas para a pesquisa. Veja a documentação para exemplo de uso.
|
1380
|
+
* @returns {Promise<Array<IOption> | IOption>} Uma lista de opções ou uma única opção.
|
1381
|
+
* @async
|
1210
1382
|
*/
|
1211
1383
|
async executePreparedSearch(mode, argument, options) {
|
1212
1384
|
const mdByName = {};
|
@@ -1266,14 +1438,21 @@ const SnkApplication = class {
|
|
1266
1438
|
});
|
1267
1439
|
}
|
1268
1440
|
/**
|
1269
|
-
* Obtém o nome
|
1441
|
+
* Obtém o nome (label) da aplicação.
|
1442
|
+
* @returns {Promise<string>} O nome da aplicação.
|
1443
|
+
* @async
|
1270
1444
|
*/
|
1271
1445
|
async getAppLabel() {
|
1272
1446
|
return Workspace.getAppLabel(this.applicationResourceID);
|
1273
1447
|
}
|
1274
1448
|
/**
|
1275
|
-
* Adiciona um listener no fetcher de Pesquisa
|
1276
|
-
|
1449
|
+
* Adiciona um listener no fetcher de Pesquisa.
|
1450
|
+
* @param {string} entityName - O nome da entidade.
|
1451
|
+
* @param {DataUnit} dataUnit - A instância do DataUnit.
|
1452
|
+
* @param {ISearchListener} listener - O listener a ser adicionado.
|
1453
|
+
* @returns {Promise<IRemoveSearchListener>} Uma função para remover o listener.
|
1454
|
+
* @async
|
1455
|
+
*/
|
1277
1456
|
addSearchListener(entityName, dataUnit, listener) {
|
1278
1457
|
return new Promise(resolve => {
|
1279
1458
|
const removeListener = this.pesquisaFetcher.addSearchListener(entityName, dataUnit.dataUnitId, listener);
|
@@ -1281,8 +1460,10 @@ const SnkApplication = class {
|
|
1281
1460
|
});
|
1282
1461
|
}
|
1283
1462
|
/**
|
1284
|
-
Realiza o import de um JavaScript que está
|
1285
|
-
@param relativePath
|
1463
|
+
Realiza o import de um JavaScript que está disponível dentro da pasta /public da aplicação.
|
1464
|
+
@param {string | Array<string>} relativePath - Define o caminho relativo para o arquivo JavaScript a ser importado, ou uma lista de caminhos.
|
1465
|
+
@returns {Promise<void>}
|
1466
|
+
@async
|
1286
1467
|
*/
|
1287
1468
|
importScript(relativePath) {
|
1288
1469
|
return new Promise((resolve) => {
|
@@ -1303,6 +1484,8 @@ const SnkApplication = class {
|
|
1303
1484
|
}
|
1304
1485
|
/**
|
1305
1486
|
* Retorna o path relativo da aplicação.
|
1487
|
+
* @returns {Promise<string>} O caminho relativo da aplicação.
|
1488
|
+
* @async
|
1306
1489
|
*/
|
1307
1490
|
async getApplicationPath() {
|
1308
1491
|
return new Promise((resolve) => {
|
@@ -1323,20 +1506,27 @@ const SnkApplication = class {
|
|
1323
1506
|
* Com base em um campo realiza um "select distinct" respeitando os
|
1324
1507
|
* filtros atuais do dataUnit e um critério de filtro para a própria
|
1325
1508
|
* coluna.
|
1509
|
+
* @param {DataUnit} dataUnit - A instância do DataUnit.
|
1510
|
+
* @param {string} fieldName - O nome do campo para o select distinct.
|
1511
|
+
* @param {string} argument - O argumento de filtro para a coluna.
|
1512
|
+
* @returns {Promise<Array<any>>} Uma lista de valores distintos.
|
1513
|
+
* @async
|
1326
1514
|
*/
|
1327
1515
|
executeSelectDistinct(dataUnit, fieldName, argument) {
|
1328
1516
|
return this.dataUnitFetcher.loadSelectDistinct(dataUnit, fieldName, argument);
|
1329
1517
|
}
|
1330
1518
|
/**
|
1331
|
-
* Retorna a
|
1332
|
-
* @returns DataFetcher
|
1519
|
+
* Retorna a instância do DataFetcher utilizado pelo application.
|
1520
|
+
* @returns {Promise<DataFetcher>} O DataFetcher da aplicação.
|
1521
|
+
* @async
|
1333
1522
|
*/
|
1334
1523
|
getDataFetcher() {
|
1335
1524
|
return Promise.resolve(DataFetcher.DataFetcher.get());
|
1336
1525
|
}
|
1337
1526
|
/**
|
1338
|
-
* Retorna uma promise que
|
1339
|
-
* @returns SnkApplication carregado.
|
1527
|
+
* Retorna uma promise que será resolvida quando o snk-application estiver carregado e registrado no ApplicationContext.
|
1528
|
+
* @returns {Promise<SnkApplication>} O componente SnkApplication carregado.
|
1529
|
+
* @async
|
1340
1530
|
*/
|
1341
1531
|
async whenApplicationReady() {
|
1342
1532
|
const isLoadding = core.ApplicationContext.getContextValue("__SNK__APPLICATION__LOADING__");
|
@@ -1349,9 +1539,10 @@ const SnkApplication = class {
|
|
1349
1539
|
}
|
1350
1540
|
/**
|
1351
1541
|
* Atribui valor para parâmetros de contexto no componente de pesquisa.
|
1352
|
-
*
|
1353
|
-
* @param
|
1354
|
-
* @
|
1542
|
+
* @param {string} name - Nome do parâmetro.
|
1543
|
+
* @param {string} value - String conversível de acordo com o tipo do parâmetro.
|
1544
|
+
* @returns {Promise<void>}
|
1545
|
+
* @async
|
1355
1546
|
*/
|
1356
1547
|
async setSearchFilterContext(name, value) {
|
1357
1548
|
core.ApplicationContext.setContextValue(`__SNK__APPLICATION__FILTER__CONTEXT(${name})__`, value);
|
@@ -1407,7 +1598,7 @@ const SnkApplication = class {
|
|
1407
1598
|
const snkDataUnit = this.getFirstDataUnitFromDOM();
|
1408
1599
|
const dataUnit = snkDataUnit.dataUnit;
|
1409
1600
|
if (!dataUnit) {
|
1410
|
-
console.warn("
|
1601
|
+
console.warn(this.getMessage("snkApplication.dataUnit.initDataUnitError"));
|
1411
1602
|
snkDataUnit.addEventListener("dataUnitReady", (event) => {
|
1412
1603
|
this.loadDataWithPKFilter(pkObject, event.detail);
|
1413
1604
|
this._currentPkParameter = pkHash;
|
@@ -1532,7 +1723,7 @@ const SnkApplication = class {
|
|
1532
1723
|
componentWillLoad() {
|
1533
1724
|
core.ApplicationContext.setContextValue("__SNK__APPLICATION__LOADING__", true);
|
1534
1725
|
this._errorHandler = new SnkErrorHandler(this);
|
1535
|
-
this.messagesBuilder = new
|
1726
|
+
this.messagesBuilder = new DataFetcher.SnkMessageBuilder();
|
1536
1727
|
core.ApplicationContext.setContextValue("__EZUI__UPLOAD__ADD__URL__", `${DataFetcher.UrlUtils.getUrlBase()}/mge/upload/file`);
|
1537
1728
|
core.ApplicationContext.setContextValue("__EZUI__SEARCH__OPTION__LOADER__", (searchArgument, fieldName, dataUnit, ctxOptions) => {
|
1538
1729
|
return this.executeSearch(searchArgument, fieldName, dataUnit, ctxOptions);
|
@@ -1606,6 +1797,12 @@ const SnkApplication = class {
|
|
1606
1797
|
async changeTemplateSkeleton(templateSkeletonType) {
|
1607
1798
|
this._templateSkeleton = templateSkeletonType ? templateSkeletonType : this._templateSkeleton;
|
1608
1799
|
}
|
1800
|
+
/**
|
1801
|
+
* Marca a aplicação para recarregar, opcionalmente especificando um tipo de esqueleto de carregamento.
|
1802
|
+
* @param {TEMPLATES_SKELETON} [templateSkeletonType] - O tipo de esqueleto de carregamento a ser exibido.
|
1803
|
+
* @returns {Promise<void>}
|
1804
|
+
* @async
|
1805
|
+
*/
|
1609
1806
|
async markToReload(templateSkeletonType) {
|
1610
1807
|
if (!this.enableLockManagerLoadingApp)
|
1611
1808
|
return;
|
@@ -1614,6 +1811,13 @@ const SnkApplication = class {
|
|
1614
1811
|
await core.LockManager.resetLocks(this._element, core.LockManagerOperation.APP_LOADING);
|
1615
1812
|
this.resolveApplicationReady();
|
1616
1813
|
}
|
1814
|
+
/**
|
1815
|
+
* Adiciona um bloqueio de carregamento à aplicação.
|
1816
|
+
* @param {boolean} [forceReady=false] - Se `true`, força a aplicação para o estado "não pronto" antes de adicionar o bloqueio.
|
1817
|
+
* @param {TEMPLATES_SKELETON} [templateSkeletonType] - O tipo de esqueleto de carregamento a ser exibido.
|
1818
|
+
* @returns {Promise<string>} O ID do bloqueio adicionado.
|
1819
|
+
* @async
|
1820
|
+
*/
|
1617
1821
|
async addLoadingLock(forceReady = false, templateSkeletonType) {
|
1618
1822
|
if (!this.enableLockManagerLoadingApp)
|
1619
1823
|
return;
|
@@ -1661,9 +1865,9 @@ const SnkApplication = class {
|
|
1661
1865
|
}
|
1662
1866
|
initKeyboardManager() {
|
1663
1867
|
this._keyboardManager
|
1664
|
-
.bind("ctrl + g", Workspace.searchApp.bind(this), { description: "
|
1665
|
-
.bind("ctrl + d", Workspace.showDesktop.bind(this), { description: "
|
1666
|
-
.bind("F1", Workspace.openHelp.bind(this), { description: "
|
1868
|
+
.bind("ctrl + g", Workspace.searchApp.bind(this), { description: this.getMessage("snkApplication.keyboard.shortcuts.searchApp") })
|
1869
|
+
.bind("ctrl + d", Workspace.showDesktop.bind(this), { description: this.getMessage("snkApplication.keyboard.shortcuts.showDesktop") })
|
1870
|
+
.bind("F1", Workspace.openHelp.bind(this), { description: this.getMessage("snkApplication.keyboard.shortcuts.openHelp") });
|
1667
1871
|
}
|
1668
1872
|
removeShortcuts() {
|
1669
1873
|
this._keyboardManager.unbindAllShortcutKeys();
|
@@ -1709,7 +1913,7 @@ const SnkApplication = class {
|
|
1709
1913
|
return (index.h("div", { class: "loading-hidden", style: this.getLoadingVisibilityStyle() }, index.h("div", { class: "ez-margin--medium ez-margin-top--medium ez-padding--medium" }, index.h("ez-skeleton", { count: 1, variant: "text", width: "70%", height: "25px", animation: "progress" })), index.h("div", { class: "ez-flex ez-margin--medium ez-margin-top--medium", style: { maxHeight: "calc(-105px + 100vh)", overflow: "hidden" } }, index.h("div", { class: "ez-flex ez-flex--column ez-margin-right--large", style: { width: "25%", overflow: "hidden" } }, Array(this.getCountSkeleton(30, 6)).fill(null).map((_, index$1) => index.h("ez-skeleton", { key: index$1, count: 1, variant: "text", width: this.getSkeletonRandomWidth(), height: "30px", animation: "progress", marginBottom: "10px" }))), index.h("div", { class: "ez-flex ez-flex--column", style: { width: "75%" } }, index.h("div", { class: "ez-padding--medium", style: { width: "100%" } }, index.h("ez-skeleton", { count: 1, variant: "text", width: "30%", height: "25px", animation: "progress" })), index.h("div", { class: "ez-padding--medium", style: { height: "45%" } }, index.h("div", { class: "ez-flex", style: { width: "100%", height: "100%" } }, [1, 2, 3, 4].map((_, columnIndex) => (index.h("div", { key: columnIndex, class: "ez-padding-right--large", style: { width: "25%", overflow: "hidden" } }, Array(this.getCountSkeleton(50, 20)).fill(null).map((_, index$1) => index.h("ez-skeleton", { key: index$1, count: 1, variant: "text", width: "100%", height: "50px", animation: "progress", marginBottom: "10px" }))))))), index.h("div", { class: "ez-padding--medium", style: { width: "100%" } }, index.h("ez-skeleton", { count: 1, variant: "text", width: "30%", height: "25px", animation: "progress" })), index.h("div", { class: "ez-padding--medium", style: { height: "45%" } }, index.h("div", { class: "ez-flex", style: { width: "100%", height: "100%" } }, [1, 2, 3, 4].map((_, columnIndex) => (index.h("div", { key: columnIndex, class: "ez-padding-right--large", style: { width: "25%", overflow: "hidden" } }, Array(this.getCountSkeleton(50, 20)).fill(null).map((_, index$1) => index.h("ez-skeleton", { key: index$1, count: 1, variant: "text", width: "100%", height: "50px", animation: "progress", marginBottom: "10px" })))))))))));
|
1710
1914
|
}
|
1711
1915
|
getSpinnerLoadingDefault() {
|
1712
|
-
return (index.h("div", { class: "loading-hidden", style: this.getLoadingVisibilityStyle() }, index.h("div", { class: "ez-flex ez-size-height--full ez-size-width--full ez-flex--justify-center ez-flex--align-items-center spinner" }, index.h("ez-icon", { iconName: "sync", size: "x-large", class: "spin" }), index.h("span", { class: "ez-title ez-title--secondary ez-title--extra-large" }, "
|
1916
|
+
return (index.h("div", { class: "loading-hidden", style: this.getLoadingVisibilityStyle() }, index.h("div", { class: "ez-flex ez-size-height--full ez-size-width--full ez-flex--justify-center ez-flex--align-items-center spinner" }, index.h("ez-icon", { iconName: "sync", size: "x-large", class: "spin" }), index.h("span", { class: "ez-title ez-title--secondary ez-title--extra-large" }, this.getMessage("snkApplication.loading.text")))));
|
1713
1917
|
}
|
1714
1918
|
render() {
|
1715
1919
|
return (index.h(index.Host, { style: {
|