@sankhyalabs/sankhyablocks 9.1.0-ms.4 → 9.1.0-ms.6
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-b7943abc.js → ClientSideExporterProvider-6a4108c9.js} +4 -4
- package/dist/cjs/{ConfigStorage-48ba265b.js → ConfigStorage-bb8c0edf.js} +12 -2
- package/dist/cjs/{DataFetcher-1afdb18e.js → DataFetcher-e23a263b.js} +6 -1
- package/dist/cjs/{ISave-c76e2c51.js → ISave-e0be2362.js} +1 -1
- package/dist/cjs/{SnkFormConfigManager-aa4631bd.js → SnkFormConfigManager-a23df43c.js} +2 -2
- package/dist/cjs/SnkMessageBuilder-acd9ec62.js +1937 -0
- package/dist/cjs/{auth-fetcher-1687ac0a.js → auth-fetcher-8670a38f.js} +1 -1
- package/dist/cjs/{dataunit-fetcher-c2aef198.js → dataunit-fetcher-c34a8217.js} +1 -1
- package/dist/cjs/{form-config-fetcher-40d3f752.js → form-config-fetcher-d8b78403.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/pesquisa-grid_2.cjs.entry.js +4 -4
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-actions-button_8.cjs.entry.js +80 -41
- package/dist/cjs/snk-application.cjs.entry.js +7 -7
- package/dist/cjs/snk-attach.cjs.entry.js +33 -16
- package/dist/cjs/snk-crud.cjs.entry.js +6 -5
- package/dist/cjs/snk-data-exporter.cjs.entry.js +6 -6
- package/dist/cjs/{snk-data-unit-87c56d62.js → snk-data-unit-47c6d16b.js} +2 -2
- package/dist/cjs/snk-data-unit.cjs.entry.js +4 -4
- package/dist/cjs/snk-detail-view.cjs.entry.js +8 -8
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +3 -3
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
- package/dist/cjs/snk-form_2.cjs.entry.js +5 -5
- package/dist/cjs/snk-grid.cjs.entry.js +6 -6
- package/dist/cjs/{snk-guides-viewer-fedf7ba8.js → snk-guides-viewer-1689e877.js} +5 -5
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -7
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
- package/dist/cjs/snk-pesquisa.cjs.entry.js +4 -4
- package/dist/cjs/snk-simple-crud.cjs.entry.js +14 -14
- package/dist/collection/components/snk-attach/snk-attach.js +45 -11
- package/dist/collection/components/snk-crud/snk-crud.js +19 -0
- package/dist/collection/components/snk-grid-config/snk-grid-config.js +74 -36
- package/dist/collection/components/snk-grid-config/snk-select-box/snk-select-box.js +20 -1
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +8 -8
- package/dist/collection/lib/configs/ConfigStorage.js +3 -0
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +6 -1
- package/dist/collection/lib/http/data-fetcher/fetchers/grid-config-fetcher.js +9 -1
- package/dist/collection/lib/message/SnkMessageBuilder.js +25 -52
- package/dist/collection/lib/message/messageResourceEnUSUtils.js +91 -0
- package/dist/collection/lib/message/messageResourceEsESUtils.js +91 -0
- package/dist/collection/lib/message/messageResourcePtBRUtils.js +91 -0
- package/dist/collection/lib/message/resources/en-us/crud-utils.msg.js +3 -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 +27 -0
- package/dist/collection/lib/message/resources/en-us/snk-application.msg.js +8 -0
- package/dist/collection/lib/message/resources/en-us/snk-attach.msg.js +39 -0
- package/dist/collection/lib/message/resources/en-us/snk-configurator.msg.js +8 -0
- package/dist/collection/lib/message/resources/en-us/snk-crud.msg.js +10 -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 +36 -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-exporter.msg.js +20 -0
- package/dist/collection/lib/message/resources/en-us/snk-filter-bar.msg.js +64 -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-param-config.msg.js +18 -0
- package/dist/collection/lib/message/resources/en-us/snk-form.msg.js +76 -0
- package/dist/collection/lib/message/resources/en-us/snk-grid.msg.js +41 -0
- package/dist/collection/lib/message/resources/en-us/snk-personalized-filter.msg.js +88 -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 +8 -0
- package/dist/collection/lib/message/resources/en-us/snk-taskbar.msg.js +18 -0
- package/dist/collection/lib/message/resources/es-es/crud-utils.msg.js +3 -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 +27 -0
- package/dist/collection/lib/message/resources/es-es/snk-application.msg.js +8 -0
- package/dist/collection/lib/message/resources/es-es/snk-attach.msg.js +39 -0
- package/dist/collection/lib/message/resources/es-es/snk-configurator.msg.js +8 -0
- package/dist/collection/lib/message/resources/es-es/snk-crud.msg.js +10 -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 +36 -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-exporter.msg.js +20 -0
- package/dist/collection/lib/message/resources/es-es/snk-filter-bar.msg.js +64 -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-param-config.msg.js +18 -0
- package/dist/collection/lib/message/resources/es-es/snk-form.msg.js +76 -0
- package/dist/collection/lib/message/resources/es-es/snk-grid.msg.js +41 -0
- package/dist/collection/lib/message/resources/es-es/snk-personalized-filter.msg.js +88 -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 +8 -0
- package/dist/collection/lib/message/resources/es-es/snk-taskbar.msg.js +18 -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/{file-viewer.msg.js → pt-br/file-viewer.msg.js} +1 -2
- package/dist/collection/lib/message/resources/{snk-application.msg.js → pt-br/snk-application.msg.js} +1 -2
- package/dist/collection/lib/message/resources/{snk-attach.msg.js → pt-br/snk-attach.msg.js} +0 -1
- package/dist/collection/lib/message/resources/{snk-crud.msg.js → pt-br/snk-crud.msg.js} +0 -1
- package/dist/collection/lib/message/resources/{snk-data-unit.msg.js → pt-br/snk-data-unit.msg.js} +1 -2
- 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 +64 -0
- package/dist/collection/lib/message/resources/pt-br/snk-grid.msg.js +41 -0
- package/dist/collection/lib/message/resources/{snk-simple-crud.msg.js → pt-br/snk-simple-crud.msg.js} +0 -1
- package/dist/collection/lib/message/resources/{snk-taskbar.msg.js → pt-br/snk-taskbar.msg.js} +1 -2
- package/dist/components/ConfigStorage.js +11 -1
- package/dist/components/DataFetcher.js +6 -1
- package/dist/components/SnkMessageBuilder.js +1345 -139
- package/dist/components/snk-attach2.js +29 -11
- package/dist/components/snk-crud.js +1 -0
- package/dist/components/snk-grid-config2.js +73 -35
- package/dist/components/snk-select-box2.js +4 -2
- package/dist/components/snk-simple-crud2.js +7 -7
- package/dist/esm/{ClientSideExporterProvider-b468acad.js → ClientSideExporterProvider-09dee1a3.js} +4 -4
- package/dist/esm/{ConfigStorage-79b9e180.js → ConfigStorage-cf578768.js} +12 -2
- package/dist/esm/{DataFetcher-88e56266.js → DataFetcher-db08cad0.js} +6 -1
- package/dist/esm/{ISave-5efafc97.js → ISave-da565824.js} +1 -1
- package/dist/esm/{SnkFormConfigManager-b4b93298.js → SnkFormConfigManager-c1cd9dcd.js} +2 -2
- package/dist/esm/SnkMessageBuilder-c8b452b6.js +1915 -0
- package/dist/esm/{auth-fetcher-3510520e.js → auth-fetcher-43c8d76b.js} +1 -1
- package/dist/esm/{dataunit-fetcher-613a6fb9.js → dataunit-fetcher-1b78797a.js} +1 -1
- package/dist/esm/{form-config-fetcher-fa208a6c.js → form-config-fetcher-e623539b.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/pesquisa-grid_2.entry.js +4 -4
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-actions-button_8.entry.js +80 -41
- package/dist/esm/snk-application.entry.js +7 -7
- package/dist/esm/snk-attach.entry.js +33 -16
- package/dist/esm/snk-crud.entry.js +6 -5
- package/dist/esm/snk-data-exporter.entry.js +6 -6
- package/dist/esm/{snk-data-unit-8da2d175.js → snk-data-unit-c12986b7.js} +2 -2
- package/dist/esm/snk-data-unit.entry.js +4 -4
- package/dist/esm/snk-detail-view.entry.js +8 -8
- package/dist/esm/snk-filter-bar_4.entry.js +3 -3
- package/dist/esm/snk-filter-modal-item.entry.js +3 -3
- package/dist/esm/snk-form_2.entry.js +5 -5
- package/dist/esm/snk-grid.entry.js +6 -6
- package/dist/esm/{snk-guides-viewer-0fc793de.js → snk-guides-viewer-defa2629.js} +5 -5
- package/dist/esm/snk-guides-viewer.entry.js +7 -7
- package/dist/esm/snk-personalized-filter.entry.js +3 -3
- package/dist/esm/snk-pesquisa.entry.js +4 -4
- package/dist/esm/snk-simple-crud.entry.js +14 -14
- package/dist/sankhyablocks/{p-5b963f03.entry.js → p-09ba8326.entry.js} +1 -1
- package/dist/sankhyablocks/{p-134414d0.entry.js → p-1c69a957.entry.js} +1 -1
- package/dist/sankhyablocks/p-224fa6f9.js +1 -0
- package/dist/sankhyablocks/{p-a414a26c.entry.js → p-2628f34e.entry.js} +1 -1
- package/dist/sankhyablocks/{p-cb4bcf34.entry.js → p-34cfb5ad.entry.js} +2 -2
- package/dist/sankhyablocks/p-360f0b74.js +1 -0
- package/dist/sankhyablocks/{p-8f8367d5.js → p-37b4f642.js} +1 -1
- package/dist/sankhyablocks/p-405edf96.js +56 -0
- package/dist/sankhyablocks/{p-848c0ece.js → p-4b8691b6.js} +1 -1
- package/dist/sankhyablocks/{p-6d2c841d.js → p-4eb731b3.js} +1 -1
- package/dist/sankhyablocks/{p-59d84130.entry.js → p-60d3abf6.entry.js} +1 -1
- package/dist/sankhyablocks/{p-9751c42f.entry.js → p-6bc7c7ee.entry.js} +1 -1
- package/dist/sankhyablocks/p-81820bf8.entry.js +1 -0
- package/dist/sankhyablocks/{p-a5bb2f93.entry.js → p-86c8f7f2.entry.js} +1 -1
- package/dist/sankhyablocks/{p-c926cf6b.entry.js → p-90ee1990.entry.js} +1 -1
- package/dist/sankhyablocks/{p-d0d8de69.entry.js → p-aef68e58.entry.js} +1 -1
- package/dist/sankhyablocks/p-b033bf30.entry.js +1 -0
- package/dist/sankhyablocks/{p-8691b78e.entry.js → p-b1ea8c6d.entry.js} +1 -1
- package/dist/sankhyablocks/{p-601b252b.js → p-b21d32f6.js} +1 -1
- package/dist/sankhyablocks/{p-6dd38d7b.js → p-c9657baa.js} +1 -1
- package/dist/sankhyablocks/p-cb2a4613.entry.js +1 -0
- package/dist/sankhyablocks/{p-fbba7e3d.js → p-cd1a5b6a.js} +1 -1
- package/dist/sankhyablocks/p-cfa8cac2.entry.js +1 -0
- package/dist/sankhyablocks/{p-73285a8a.js → p-e25412da.js} +1 -1
- package/dist/sankhyablocks/{p-e0313142.entry.js → p-f442c8f6.entry.js} +1 -1
- package/dist/sankhyablocks/{p-f21325f1.entry.js → p-f65421cd.entry.js} +1 -1
- package/dist/sankhyablocks/{p-7bb04271.js → p-fa591f6f.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- 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-crud/snk-crud.d.ts +1 -0
- package/dist/types/components/snk-grid-config/snk-grid-config.d.ts +7 -0
- package/dist/types/components/snk-grid-config/snk-select-box/snk-select-box.d.ts +4 -0
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +1 -1
- package/dist/types/components.d.ts +16 -0
- package/dist/types/lib/configs/ConfigStorage.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/grid-config-fetcher.d.ts +3 -2
- package/dist/types/lib/message/SnkMessageBuilder.d.ts +4 -0
- package/dist/types/lib/message/resources/en-us/crud-utils.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-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/{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-taskbar.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/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-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-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-personalized-filter.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-taskbar.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/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-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-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-personalized-filter.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-taskbar.msg.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/SnkMessageBuilder-221cc88d.js +0 -731
- package/dist/collection/lib/message/resources/snk-filter-bar.msg.js +0 -65
- package/dist/collection/lib/message/resources/snk-grid.msg.js +0 -40
- package/dist/esm/SnkMessageBuilder-da87a821.js +0 -709
- package/dist/sankhyablocks/p-536dc236.entry.js +0 -1
- package/dist/sankhyablocks/p-6416975c.js +0 -56
- package/dist/sankhyablocks/p-a6513fcb.js +0 -1
- package/dist/sankhyablocks/p-ef2022ac.entry.js +0 -1
- package/dist/sankhyablocks/p-efb76b5f.entry.js +0 -1
- package/dist/sankhyablocks/p-fac65ae7.entry.js +0 -1
- package/dist/sankhyablocks/p-fc4eac32.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-actions-button.msg.js → pt-br/snk-actions-button.msg.js} +0 -0
- /package/dist/collection/lib/message/resources/{snk-configurator.msg.js → pt-br/snk-configurator.msg.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-form.msg.js → pt-br/snk-form.msg.js} +0 -0
- /package/dist/collection/lib/message/resources/{snk-personalized-filter.msg.js → pt-br/snk-personalized-filter.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
@@ -7,6 +7,8 @@ import InMemoryLoader from '../../lib/dataUnit/InMemoryLoader';
|
|
7
7
|
import { SaveErrorsEnum } from '../../lib/http/data-fetcher/fetchers/AttachFetcher/interfaces';
|
8
8
|
const RESOURCE_ID = 'AnexoSistema';
|
9
9
|
const DATA_UNIT_NAME = 'br.com.sankhya.core.v3.anexoSistema';
|
10
|
+
const GRID_LEGACY_CONFIG_NAME = 'GrdCfgHtml5:grdcfg.dynaform.anexo';
|
11
|
+
const LINKORFILE_COLUMN_NAME = "ARQUIVOOULINK";
|
10
12
|
export class SnkAttach {
|
11
13
|
constructor() {
|
12
14
|
this.handleTaskbarClick = async ({ detail: taskbar }) => {
|
@@ -33,6 +35,7 @@ export class SnkAttach {
|
|
33
35
|
this.back.emit();
|
34
36
|
});
|
35
37
|
};
|
38
|
+
this.gridLegacyConfigName = undefined;
|
36
39
|
this.fetcherType = undefined;
|
37
40
|
this.fetcher = undefined;
|
38
41
|
this.dataUnit = undefined;
|
@@ -144,9 +147,11 @@ export class SnkAttach {
|
|
144
147
|
var _a, _b;
|
145
148
|
this._currentDataUnit = new DataUnitFetcher().getDataUnit(RESOURCE_ID, DATA_UNIT_NAME);
|
146
149
|
this._currentFetcher = this.getAnexoSistemaFetcherInstance();
|
150
|
+
let gridValidateForm;
|
147
151
|
if (!this._currentDataUnit.metadata) {
|
148
152
|
await ((_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadMetadata());
|
149
|
-
this.crudConfig = Object.assign({}, anexoSistemaCrudConfig);
|
153
|
+
this.crudConfig = this.entityName ? { form: anexoSistemaCrudConfig === null || anexoSistemaCrudConfig === void 0 ? void 0 : anexoSistemaCrudConfig.form } : Object.assign({}, anexoSistemaCrudConfig);
|
154
|
+
gridValidateForm = { grid: anexoSistemaCrudConfig === null || anexoSistemaCrudConfig === void 0 ? void 0 : anexoSistemaCrudConfig.grid };
|
150
155
|
}
|
151
156
|
this.initDataUnitLoaders();
|
152
157
|
this._currentDataUnit.addFilterProvider({
|
@@ -156,19 +161,21 @@ export class SnkAttach {
|
|
156
161
|
interceptAction: (action) => this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit, action, this._crudElement)
|
157
162
|
});
|
158
163
|
await ((_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadData());
|
159
|
-
this.disableEditFieldsNotInForm();
|
164
|
+
this.disableEditFieldsNotInForm(gridValidateForm);
|
160
165
|
}
|
161
166
|
async loadAttach() {
|
162
167
|
var _a, _b;
|
163
168
|
this._currentFetcher = new AttachFetcher();
|
164
169
|
this._currentDataUnit = new DataUnit(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME);
|
165
170
|
this._currentDataUnit.pageSize = 150;
|
171
|
+
let gridValidateForm;
|
166
172
|
this.initDataUnitLoaders();
|
167
173
|
this._currentDataUnit.addInterceptor({
|
168
174
|
interceptAction: (action) => {
|
169
175
|
var _a;
|
170
176
|
if (action.type === Action.METADATA_LOADED) {
|
171
|
-
this.crudConfig = Object.assign({}, attachCrudConfig);
|
177
|
+
this.crudConfig = this.entityName ? { form: attachCrudConfig === null || attachCrudConfig === void 0 ? void 0 : attachCrudConfig.form } : Object.assign({}, attachCrudConfig);
|
178
|
+
gridValidateForm = { grid: attachCrudConfig === null || attachCrudConfig === void 0 ? void 0 : attachCrudConfig.grid };
|
172
179
|
(_a = this._crudElement) === null || _a === void 0 ? void 0 : _a.updateConfig();
|
173
180
|
}
|
174
181
|
return this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit, action, this._crudElement);
|
@@ -176,9 +183,10 @@ export class SnkAttach {
|
|
176
183
|
});
|
177
184
|
if (!this._currentDataUnit.metadata) {
|
178
185
|
await ((_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadMetadata());
|
179
|
-
this.crudConfig = Object.assign({}, attachCrudConfig);
|
186
|
+
this.crudConfig = this.entityName ? { form: attachCrudConfig === null || attachCrudConfig === void 0 ? void 0 : attachCrudConfig.form } : Object.assign({}, attachCrudConfig);
|
187
|
+
gridValidateForm = { grid: attachCrudConfig === null || attachCrudConfig === void 0 ? void 0 : attachCrudConfig.grid };
|
180
188
|
await ((_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadData(undefined, undefined, true, this.registerKey));
|
181
|
-
this.disableEditFieldsNotInForm();
|
189
|
+
this.disableEditFieldsNotInForm(gridValidateForm);
|
182
190
|
}
|
183
191
|
}
|
184
192
|
initDataUnitLoaders() {
|
@@ -197,12 +205,16 @@ export class SnkAttach {
|
|
197
205
|
});
|
198
206
|
}
|
199
207
|
}
|
200
|
-
disableEditFieldsNotInForm() {
|
201
|
-
var _a;
|
202
|
-
(_a = this.
|
203
|
-
|
208
|
+
disableEditFieldsNotInForm(gridValidateForm) {
|
209
|
+
var _a, _b, _c, _d, _e;
|
210
|
+
const gridColumns = ((_b = (_a = this._crudElement) === null || _a === void 0 ? void 0 : _a.gridConfig) === null || _b === void 0 ? void 0 : _b.columns) || ((_c = gridValidateForm === null || gridValidateForm === void 0 ? void 0 : gridValidateForm.grid) === null || _c === void 0 ? void 0 : _c.columns) || ((_e = (_d = this.crudConfig) === null || _d === void 0 ? void 0 : _d.grid) === null || _e === void 0 ? void 0 : _e.columns);
|
211
|
+
if (!!this.getGridLegacyConfigName()) {
|
212
|
+
this._currentDataUnit.disableField(LINKORFILE_COLUMN_NAME);
|
213
|
+
}
|
214
|
+
gridColumns === null || gridColumns === void 0 ? void 0 : gridColumns.forEach(column => {
|
215
|
+
var _a, _b;
|
204
216
|
const fieldName = column.name;
|
205
|
-
if (!((_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.form.fields.some(field => field.name === fieldName))) {
|
217
|
+
if (!((_b = (_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.form) === null || _b === void 0 ? void 0 : _b.fields.some(field => (field === null || field === void 0 ? void 0 : field.name) === fieldName))) {
|
206
218
|
this._currentDataUnit.disableField(fieldName);
|
207
219
|
}
|
208
220
|
});
|
@@ -252,11 +264,16 @@ export class SnkAttach {
|
|
252
264
|
await this._currentDataUnit.loadMetadata();
|
253
265
|
}
|
254
266
|
;
|
267
|
+
getGridLegacyConfigName() {
|
268
|
+
if (this.gridLegacyConfigName)
|
269
|
+
return this.gridLegacyConfigName;
|
270
|
+
return this.entityName ? GRID_LEGACY_CONFIG_NAME + "." + this.entityName : this.entityName;
|
271
|
+
}
|
255
272
|
render() {
|
256
273
|
var _a, _b;
|
257
274
|
if (!this._currentDataUnit)
|
258
275
|
return null;
|
259
|
-
return (h("main", { class: "snk-attach__main" }, h("header", { class: "snk-attach__header" }, h("snk-simple-bar", { onExit: this.handleBack, messagesBuilder: this.messagesBuilder }, h("div", { slot: "rightSlot" }, h("ez-button", { class: "ez-button--primary", label: this.getMessage("snkAttach.finish"), onClick: this.handleFinish })))), h("div", { class: "snk-attach__crud-section ez-size-height--full ez-size-width--full ez-flex ez-flex--column" }, h("div", { class: "ez-box__container" }, h("snk-simple-crud", { ref: (el) => this._crudElement = el, dataUnit: this._currentDataUnit, taskbarManager: buildTaskBarManager(), gridConfig: (_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.grid, formConfig: (_b = this.crudConfig) === null || _b === void 0 ? void 0 : _b.form, useCancelConfirm: false, onActionClick: this.handleTaskbarClick, messagesBuilder: this.messagesBuilder, onDataStateChange: this.handleOnDataStateChange.bind(this), multipleSelection: true }, h("div", { slot: "snkSimpleCrudHeader" }, h("div", { class: "ez-flex ez-flex--column" }, h("span", { class: "ez-title--primary ez-text ez-text--large ez-text--bold ez-padding-bottom--medium" }, this.getMessage("snkAttach.title")), h("span", { class: "ez-text ez-text--medium ez-text--secondary ez-padding-bottom--medium" }, this.getMessage("snkAttach.description")))))))));
|
276
|
+
return (h("main", { class: "snk-attach__main" }, h("header", { class: "snk-attach__header" }, h("snk-simple-bar", { onExit: this.handleBack, messagesBuilder: this.messagesBuilder }, h("div", { slot: "rightSlot" }, h("ez-button", { class: "ez-button--primary", label: this.getMessage("snkAttach.finish"), onClick: this.handleFinish })))), h("div", { class: "snk-attach__crud-section ez-size-height--full ez-size-width--full ez-flex ez-flex--column" }, h("div", { class: "ez-box__container" }, h("snk-simple-crud", { ref: (el) => this._crudElement = el, dataUnit: this._currentDataUnit, taskbarManager: buildTaskBarManager(), gridConfig: (_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.grid, formConfig: (_b = this.crudConfig) === null || _b === void 0 ? void 0 : _b.form, useCancelConfirm: false, onActionClick: this.handleTaskbarClick, messagesBuilder: this.messagesBuilder, onDataStateChange: this.handleOnDataStateChange.bind(this), multipleSelection: true, configName: this.entityName, ignoreReadOnlyFormFields: this.entityName ? true : false, gridLegacyConfigName: this.getGridLegacyConfigName() }, h("div", { slot: "snkSimpleCrudHeader" }, h("div", { class: "ez-flex ez-flex--column" }, h("span", { class: "ez-title--primary ez-text ez-text--large ez-text--bold ez-padding-bottom--medium" }, this.getMessage("snkAttach.title")), h("span", { class: "ez-text ez-text--medium ez-text--secondary ez-padding-bottom--medium" }, this.getMessage("snkAttach.description")))))))));
|
260
277
|
}
|
261
278
|
static get is() { return "snk-attach"; }
|
262
279
|
static get encapsulation() { return "scoped"; }
|
@@ -272,6 +289,23 @@ export class SnkAttach {
|
|
272
289
|
}
|
273
290
|
static get properties() {
|
274
291
|
return {
|
292
|
+
"gridLegacyConfigName": {
|
293
|
+
"type": "string",
|
294
|
+
"mutable": false,
|
295
|
+
"complexType": {
|
296
|
+
"original": "string",
|
297
|
+
"resolved": "string",
|
298
|
+
"references": {}
|
299
|
+
},
|
300
|
+
"required": false,
|
301
|
+
"optional": false,
|
302
|
+
"docs": {
|
303
|
+
"tags": [],
|
304
|
+
"text": "Chave da configura\u00E7\u00E3o legado da grid."
|
305
|
+
},
|
306
|
+
"attribute": "grid-legacy-config-name",
|
307
|
+
"reflect": false
|
308
|
+
},
|
275
309
|
"fetcherType": {
|
276
310
|
"type": "string",
|
277
311
|
"mutable": false,
|
@@ -49,6 +49,7 @@ export class SnkCrud {
|
|
49
49
|
this.layoutFormConfig = false;
|
50
50
|
this.multipleEditionEnabled = true;
|
51
51
|
this.paginationCounterMode = 'auto';
|
52
|
+
this.layoutFormConfig = false;
|
52
53
|
this.customContainerId = `SNK-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
|
53
54
|
}
|
54
55
|
/**
|
@@ -892,6 +893,24 @@ export class SnkCrud {
|
|
892
893
|
"attribute": "pagination-counter-mode",
|
893
894
|
"reflect": false,
|
894
895
|
"defaultValue": "'auto'"
|
896
|
+
},
|
897
|
+
"layoutFormConfig": {
|
898
|
+
"type": "boolean",
|
899
|
+
"mutable": false,
|
900
|
+
"complexType": {
|
901
|
+
"original": "boolean",
|
902
|
+
"resolved": "boolean",
|
903
|
+
"references": {}
|
904
|
+
},
|
905
|
+
"required": false,
|
906
|
+
"optional": false,
|
907
|
+
"docs": {
|
908
|
+
"tags": [],
|
909
|
+
"text": "Define se o LayoutFormConfig ser\u00E1 exibido no configurador."
|
910
|
+
},
|
911
|
+
"attribute": "layout-form-config",
|
912
|
+
"reflect": false,
|
913
|
+
"defaultValue": "false"
|
895
914
|
}
|
896
915
|
};
|
897
916
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { ApplicationContext, ElementIDUtils, StringUtils } from '@sankhyalabs/core';
|
2
2
|
import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
|
3
3
|
import { h, Host } from '@stencil/core';
|
4
4
|
import { ConfigStorage } from '../../lib/configs/ConfigStorage';
|
@@ -75,23 +75,10 @@ export class SnkGridConfig {
|
|
75
75
|
this._orderListItems = newSortableList;
|
76
76
|
}
|
77
77
|
createColumnList() {
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
let hiddenGroup = {
|
83
|
-
group: this.getMessage('snkGridConfig.group.hidden'),
|
84
|
-
items: [],
|
85
|
-
sort: ORDER_VALUES.asc.value,
|
86
|
-
};
|
87
|
-
this.columns.forEach((column) => {
|
88
|
-
var _a;
|
89
|
-
let item = {
|
90
|
-
label: column.label,
|
91
|
-
selected: false,
|
92
|
-
sort: (_a = column === null || column === void 0 ? void 0 : column.sort) !== null && _a !== void 0 ? _a : ORDER_VALUES.asc.value,
|
93
|
-
id: column.name,
|
94
|
-
};
|
78
|
+
const visibleGroup = this.buildVisibleGroup();
|
79
|
+
const hiddenGroup = this.buildHiddenGroup();
|
80
|
+
this.columns.forEach(column => {
|
81
|
+
const item = this.buildListItemFromColumn(column);
|
95
82
|
if (column.hidden) {
|
96
83
|
hiddenGroup.items.push(item);
|
97
84
|
}
|
@@ -104,6 +91,19 @@ export class SnkGridConfig {
|
|
104
91
|
this._hiddenList = hiddenGroup.items;
|
105
92
|
this.createOrderList();
|
106
93
|
}
|
94
|
+
buildVisibleGroup() {
|
95
|
+
return {
|
96
|
+
group: this.getMessage('snkGridConfig.group.visible'),
|
97
|
+
items: [],
|
98
|
+
};
|
99
|
+
}
|
100
|
+
buildHiddenGroup() {
|
101
|
+
return {
|
102
|
+
group: this.getMessage('snkGridConfig.group.hidden'),
|
103
|
+
items: [],
|
104
|
+
sort: ORDER_VALUES.asc.value,
|
105
|
+
};
|
106
|
+
}
|
107
107
|
createOrderListSlotDataElementId(item) {
|
108
108
|
return `${this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME)}_configItem_${StringUtils.toCamelCase(item.label)}`;
|
109
109
|
}
|
@@ -116,7 +116,7 @@ export class SnkGridConfig {
|
|
116
116
|
return (h("snk-select-box", { selectedOption: selectedOption, key: 'snk-select-box-' + this._componenteInternalKey + '-' + item, "data-element-id": dataElementId, onEzChange: (evt) => {
|
117
117
|
evt.stopPropagation();
|
118
118
|
this.updateOrder(evt.detail, item.label);
|
119
|
-
} }));
|
119
|
+
}, preventAutoFocus: true }));
|
120
120
|
}
|
121
121
|
updateOrder(sortOrder, updatedItemLabel) {
|
122
122
|
var _a;
|
@@ -151,25 +151,21 @@ export class SnkGridConfig {
|
|
151
151
|
this.closeConfig();
|
152
152
|
return;
|
153
153
|
}
|
154
|
-
|
155
|
-
this._columListItems.forEach((group) => {
|
156
|
-
group.items.forEach((item) => {
|
157
|
-
const baseColumn = this.columns.find((column) => column.label === item.label);
|
158
|
-
let newColumnItem = Object.assign({}, baseColumn);
|
159
|
-
if (group.group === this.getMessage('snkGridConfig.group.hidden')) {
|
160
|
-
newColumnItem.hidden = true;
|
161
|
-
}
|
162
|
-
else {
|
163
|
-
newColumnItem.hidden = false;
|
164
|
-
}
|
165
|
-
newColumnList.push(newColumnItem);
|
166
|
-
});
|
167
|
-
});
|
168
|
-
this.columns = newColumnList;
|
154
|
+
this.updateColumns();
|
169
155
|
this._dataChanged = false;
|
170
156
|
this.closeConfig();
|
171
157
|
this.save();
|
172
158
|
}
|
159
|
+
updateColumns() {
|
160
|
+
this.columns = this._columListItems.flatMap((group) => group.items.map((item) => this.buildColumnFromListItem(item, group)));
|
161
|
+
}
|
162
|
+
buildColumnFromListItem(item, group) {
|
163
|
+
const baseColumn = this.columns.find((column) => column.label === item.label);
|
164
|
+
if (!baseColumn) {
|
165
|
+
throw new Error(`Column with label "${item.label}" not found.`);
|
166
|
+
}
|
167
|
+
return Object.assign(Object.assign({}, baseColumn), { hidden: group.group === this.getMessage('snkGridConfig.group.hidden') });
|
168
|
+
}
|
173
169
|
saveGridConfigOnStorage(_newConfig) {
|
174
170
|
ConfigStorage.saveGridConfig(_newConfig, this.configName, this.resourceID)
|
175
171
|
.then((savedConfig) => {
|
@@ -339,13 +335,55 @@ export class SnkGridConfig {
|
|
339
335
|
},
|
340
336
|
};
|
341
337
|
}
|
338
|
+
renderResetConfigBtn() {
|
339
|
+
if (!this.resourceID)
|
340
|
+
return;
|
341
|
+
return h("ez-button", { class: "padding-right--medium", label: this.getMessage('snkGridConfig.reset'), onClick: () => this.setDefaultConfig() });
|
342
|
+
}
|
343
|
+
async setDefaultConfig() {
|
344
|
+
var _a;
|
345
|
+
if (!this.resourceID)
|
346
|
+
return;
|
347
|
+
this._dataChanged = true;
|
348
|
+
const config = await ConfigStorage.getDefaultGridConfig(this.resourceID);
|
349
|
+
const defaultVisibleCols = (_a = config === null || config === void 0 ? void 0 : config.columns.map(col => col.name)) !== null && _a !== void 0 ? _a : [];
|
350
|
+
const visibleGroup = this.buildVisibleGroup();
|
351
|
+
const hiddenGroup = this.buildHiddenGroup();
|
352
|
+
const visibleItemsMap = new Map();
|
353
|
+
this.columns.forEach(column => {
|
354
|
+
const item = this.buildListItemFromColumn(column);
|
355
|
+
if (defaultVisibleCols.includes(column.name)) {
|
356
|
+
visibleItemsMap.set(column.name, item);
|
357
|
+
}
|
358
|
+
else {
|
359
|
+
hiddenGroup.items.push(item);
|
360
|
+
}
|
361
|
+
});
|
362
|
+
visibleGroup.items = defaultVisibleCols
|
363
|
+
.map(name => visibleItemsMap.get(name))
|
364
|
+
.filter(item => item);
|
365
|
+
this._columListItems = [visibleGroup, hiddenGroup];
|
366
|
+
this._visibleList = visibleGroup.items;
|
367
|
+
this._hiddenList = hiddenGroup.items;
|
368
|
+
this.updateColumns();
|
369
|
+
this.createOrderList();
|
370
|
+
}
|
371
|
+
buildListItemFromColumn(column) {
|
372
|
+
var _a;
|
373
|
+
return {
|
374
|
+
label: column.label,
|
375
|
+
selected: false,
|
376
|
+
sort: (_a = column === null || column === void 0 ? void 0 : column.sort) !== null && _a !== void 0 ? _a : ORDER_VALUES.asc.value,
|
377
|
+
id: column.name,
|
378
|
+
};
|
379
|
+
}
|
342
380
|
render() {
|
343
|
-
return (h(Host, null, h("div", { class: "grid-config__header" }, h("div", { class: "title-container" }, h("div", { class: "ez-margin-bottom--medium" }, h("label", { class: "title" }, this.getMessage('snkGridConfig.gridConfiguration')), h("label", { class: "subtitle" }, this.getMessage('snkGridConfig.columnVisibilityOrder'))), h("div", { class: "button-close" }, h("ez-button", { mode: "icon", iconName: "close", size: "medium", class: "ez-button--tertiary", onClick: () => this.closeConfig() })))), h("div", { class:
|
381
|
+
return (h(Host, null, h("div", { class: "grid-config__header" }, h("div", { class: "title-container" }, h("div", { class: "ez-margin-bottom--medium" }, h("label", { class: "title" }, this.getMessage('snkGridConfig.gridConfiguration')), h("label", { class: "subtitle" }, this.getMessage('snkGridConfig.columnVisibilityOrder'))), h("div", { class: "button-close" }, h("ez-button", { mode: "icon", iconName: "close", size: "medium", class: "ez-button--tertiary", onClick: () => this.closeConfig() })))), h("div", { class: 'grid-config__body' }, h("ez-collapsible-box", { id: 'group-select-columns', label: this.getMessage('snkGridConfig.columnsSelection'), "header-size": "medium", key: 'key_group-select-columns', value: this._collapsibleBoxListSelect, onEzChange: ({ detail }) => this._collapsibleBoxListOrder = !detail }, h("div", { class: "grid-config__main" }, h("ez-double-list", { leftList: this._hiddenList, leftTitle: this.getMessage('snkGridConfig.availableColumns'), rightList: this._visibleList, rightTitle: this.getMessage('snkGridConfig.selectedColumns'), onEzRightListChanged: ({ detail }) => this.handleRightListChange(detail), emptyMessage: {
|
344
382
|
LEFT_LIST: this.getMessage('snkGridConfig.emptyMensage.left'),
|
345
383
|
RIGHT_LIST: this.getMessage('snkGridConfig.emptyMensage.right'),
|
346
384
|
}, entityLabel: 'coluna', entityLabelPlural: 'colunas' }))), h("ez-collapsible-box", { id: 'ID_group-order-columns', label: this.getMessage('snkGridConfig.dataOrdering'), "header-size": "medium", key: 'KEY_group-order-columns', value: this._collapsibleBoxListOrder, onEzChange: ({ detail }) => this._collapsibleBoxListSelect = !detail }, h("div", { class: "grid-config__main" }, h("ez-double-list", { rightList: this._orderListItems, rightTitle: this.getMessage('snkGridConfig.selectedColumns'), useOnlyRightList: true, slotsListBuilder: this.getListSlots(), emptyMessage: {
|
347
385
|
RIGHT_LIST: this.getMessage('snkGridConfig.emptyMensage.right'),
|
348
|
-
}, entityLabel: 'coluna', entityLabelPlural: 'colunas' })))), h("div", { class: "grid-config__footer" }, h("ez-button", { class: "padding-right--medium", label: this.getMessage('snkGridConfig.cancel'), onClick: () => this.closeConfig() }), h("ez-button", { label: this.getMessage('snkGridConfig.complete'), class: "ez-button--primary", onClick: () => this.finish() }))));
|
386
|
+
}, entityLabel: 'coluna', entityLabelPlural: 'colunas' })))), h("div", { class: "grid-config__footer" }, this.renderResetConfigBtn(), h("ez-button", { class: "padding-right--medium", label: this.getMessage('snkGridConfig.cancel'), onClick: () => this.closeConfig() }), h("ez-button", { label: this.getMessage('snkGridConfig.complete'), class: "ez-button--primary", onClick: () => this.finish() }))));
|
349
387
|
}
|
350
388
|
static get is() { return "snk-grid-config"; }
|
351
389
|
static get encapsulation() { return "scoped"; }
|
@@ -3,9 +3,10 @@ import { ORDER_VALUES } from '../../../lib/utils/constants';
|
|
3
3
|
export class SelectBox {
|
4
4
|
constructor() {
|
5
5
|
this.selectedOption = ORDER_VALUES.none;
|
6
|
+
this.preventAutoFocus = false;
|
6
7
|
}
|
7
8
|
render() {
|
8
|
-
return (h("ez-combo-box", { class: "grid-config-combo ez-input--inverted", label: "", suppressSearch: true, value: this.selectedOption, enabled: true, canShowError: false, suppressEmptyOption: true }, Object.keys(ORDER_VALUES).map((key) => {
|
9
|
+
return (h("ez-combo-box", { class: "grid-config-combo ez-input--inverted", label: "", suppressSearch: true, value: this.selectedOption, enabled: true, canShowError: false, suppressEmptyOption: true, preventAutoFocus: this.preventAutoFocus }, Object.keys(ORDER_VALUES).map((key) => {
|
9
10
|
return h("option", { value: ORDER_VALUES[key].value }, ORDER_VALUES[key].label);
|
10
11
|
})));
|
11
12
|
}
|
@@ -46,6 +47,24 @@ export class SelectBox {
|
|
46
47
|
"attribute": "selected-option",
|
47
48
|
"reflect": false,
|
48
49
|
"defaultValue": "ORDER_VALUES.none"
|
50
|
+
},
|
51
|
+
"preventAutoFocus": {
|
52
|
+
"type": "boolean",
|
53
|
+
"mutable": false,
|
54
|
+
"complexType": {
|
55
|
+
"original": "boolean",
|
56
|
+
"resolved": "boolean",
|
57
|
+
"references": {}
|
58
|
+
},
|
59
|
+
"required": false,
|
60
|
+
"optional": false,
|
61
|
+
"docs": {
|
62
|
+
"tags": [],
|
63
|
+
"text": "Se true, impede que o campo de texto receba foco automaticamente ao abrir as op\u00E7\u00F5es."
|
64
|
+
},
|
65
|
+
"attribute": "prevent-auto-focus",
|
66
|
+
"reflect": false,
|
67
|
+
"defaultValue": "false"
|
49
68
|
}
|
50
69
|
};
|
51
70
|
}
|
@@ -9,7 +9,7 @@ import InMemoryLoader from '../../lib/dataUnit/InMemoryLoader';
|
|
9
9
|
import SnkMultiSelectionListDataSource from '../snk-grid/filtercolumn/SnkMultiSelectionListDataSource';
|
10
10
|
import { ConfigStorage } from '../../lib/configs/ConfigStorage';
|
11
11
|
import { SnkFormConfigManager } from '../snk-form-config/SnkFormConfigManager';
|
12
|
-
import { REGULAR_DEFAULT_BTNS, REGULAR_SELECTED_BTNS } from './
|
12
|
+
import { REGULAR_DEFAULT_BTNS, REGULAR_SELECTED_BTNS } from './snk-simple-crud.constants';
|
13
13
|
import RmPrecisionCustomValueFormatter from '../../lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter';
|
14
14
|
import ClientSideExporterProvider from '../snk-data-exporter/providers/ClientSideExporterProvider';
|
15
15
|
import store from '../../lib/store';
|
@@ -85,15 +85,15 @@ export class SnkSimpleCrud {
|
|
85
85
|
newCustomRenders.set(fieldName, customRender);
|
86
86
|
this._customRenders = newCustomRenders;
|
87
87
|
}
|
88
|
-
handleResourceIDChanged(newValue, oldValue) {
|
88
|
+
async handleResourceIDChanged(newValue, oldValue) {
|
89
89
|
if (StringUtils.isEmpty(newValue)) {
|
90
90
|
return;
|
91
91
|
}
|
92
92
|
if (newValue === oldValue) {
|
93
93
|
return;
|
94
94
|
}
|
95
|
-
this.loadFormConfig(true);
|
96
|
-
this.loadGridConfig(true);
|
95
|
+
await this.loadFormConfig(true);
|
96
|
+
await this.loadGridConfig(true);
|
97
97
|
}
|
98
98
|
/**
|
99
99
|
* Registra um formatador de valores para uma coluna da grid.
|
@@ -149,7 +149,7 @@ export class SnkSimpleCrud {
|
|
149
149
|
.concat(extraButtons));
|
150
150
|
}
|
151
151
|
addConfigButton(buttons) {
|
152
|
-
if (this.configName === undefined) {
|
152
|
+
if (this.configName === undefined || (this.configName && this.gridLegacyConfigName)) {
|
153
153
|
return buttons;
|
154
154
|
}
|
155
155
|
return buttons.concat(TaskbarElement.CONFIGURATOR);
|
@@ -260,7 +260,7 @@ export class SnkSimpleCrud {
|
|
260
260
|
if (!this._formConfigAlreadyLoaded) {
|
261
261
|
return;
|
262
262
|
}
|
263
|
-
this.loadFormConfig(true);
|
263
|
+
await this.loadFormConfig(true);
|
264
264
|
}
|
265
265
|
openConfig(viewMode) {
|
266
266
|
this._snkConfigurator.close();
|
@@ -345,8 +345,8 @@ export class SnkSimpleCrud {
|
|
345
345
|
return;
|
346
346
|
}
|
347
347
|
await this.addGridLegacyConfigName();
|
348
|
-
this.loadGridConfig();
|
349
|
-
this.loadFormConfig();
|
348
|
+
await this.loadGridConfig();
|
349
|
+
await this.loadFormConfig();
|
350
350
|
}
|
351
351
|
componentDidRender() {
|
352
352
|
this._rmPrecisionCustomValueFormatter.setGrid(this._grid);
|
@@ -67,6 +67,9 @@ export class ConfigStorage {
|
|
67
67
|
static async saveCardState(config, name, resourceID) {
|
68
68
|
return this.formConfigFetcher.saveCardState(config, name, resourceID);
|
69
69
|
}
|
70
|
+
static async getDefaultGridConfig(resourceId) {
|
71
|
+
return await this.gridConfigFetcher.getDefaultConfig(resourceId);
|
72
|
+
}
|
70
73
|
static async saveGridConfig(config, name, resourceID) {
|
71
74
|
if (config == undefined) {
|
72
75
|
return;
|
@@ -102,6 +102,9 @@ export class DataFetcher {
|
|
102
102
|
}
|
103
103
|
return new ErrorException(title, statusMessage, tsErrorCode);
|
104
104
|
}
|
105
|
+
isDevMode() {
|
106
|
+
return window === null || window === void 0 ? void 0 : window.hasOwnProperty('wksdata');
|
107
|
+
}
|
105
108
|
async callGraphQL(req, quietMode = false) {
|
106
109
|
var _a;
|
107
110
|
if (this.ready) {
|
@@ -258,7 +261,9 @@ export class DataFetcher {
|
|
258
261
|
const ctx = this.getContext(module);
|
259
262
|
let url = `${ctx.baseUrl}?serviceName=${name}&counter=21&application=${ctx.appName}&outputType=json&preventTransform=false&mgeSession=${ctx.mgeSession}&resourceID=${ctx.resourceID}&globalID=${ctx.globalID}&allowConcurrentCalls=true`;
|
260
263
|
url = await this.addUrlParams(options, url);
|
261
|
-
|
264
|
+
if (this.isDevMode()) {
|
265
|
+
document.cookie = `JSESSIONID=${ctx.mgeSession};`;
|
266
|
+
}
|
262
267
|
const http = new XMLHttpRequest();
|
263
268
|
var payloadJson = {};
|
264
269
|
if ('string' == typeof payload) {
|
@@ -1,9 +1,17 @@
|
|
1
|
-
import { ResourceFetcher } from
|
1
|
+
import { ResourceFetcher } from './resource-fetcher';
|
2
|
+
import { DataFetcher } from '../DataFetcher';
|
2
3
|
export default class GridConfigFetcher extends ResourceFetcher {
|
3
4
|
constructor() {
|
4
5
|
super(...arguments);
|
5
6
|
this.GRID_CONFIG_VERSION = "V3:";
|
6
7
|
}
|
8
|
+
async getDefaultConfig(resourceId) {
|
9
|
+
var _a, _b;
|
10
|
+
const payload = { 'requestBody': { 'gridConfig': { 'configName': `GrdCfgHtml5:${resourceId}` } } };
|
11
|
+
const response = await DataFetcher.get().callServiceBroker('GridConfig.restoreGridConfigFromJson', JSON.stringify(payload));
|
12
|
+
const columns = (_b = (_a = response === null || response === void 0 ? void 0 : response.gridConfig) === null || _a === void 0 ? void 0 : _a.field) !== null && _b !== void 0 ? _b : [];
|
13
|
+
return { columns };
|
14
|
+
}
|
7
15
|
getConfig(gridName, resourceID) {
|
8
16
|
const completePath = this.getPath(resourceID, gridName);
|
9
17
|
return new Promise((resolve, reject) => {
|
@@ -1,57 +1,16 @@
|
|
1
|
-
import snkDataUnitMessages from "./resources/snk-data-unit.msg";
|
2
|
-
import snkFilterBarMessages from "./resources/snk-filter-bar.msg";
|
3
|
-
import snkTaskbarMessages from "./resources/snk-taskbar.msg";
|
4
|
-
import crudUtilsMessages from "./resources/crud-utils.msg";
|
5
|
-
import snkExporterMessages from "./resources/snk-exporter.msg";
|
6
|
-
import snkCrudMessages from "./resources/snk-crud.msg";
|
7
|
-
import snkSimpleCrudMessages from "./resources/snk-simple-crud.msg";
|
8
|
-
import fileViewerMessages from "./resources/file-viewer.msg";
|
9
|
-
import snkApplicationMessages from "./resources/snk-application.msg";
|
10
|
-
import { snkFormConfigMessages, snkConfigOptionsMessages, snkFieldConfigMessages, snkTabConfigMessages } from "./resources/snk-form.msg";
|
11
|
-
import { snkConfiguratorMessages } from "./resources/snk-configurator.msg";
|
12
|
-
import { snkGridMessages, snkGridConfigMessages } from "./resources/snk-grid.msg";
|
13
|
-
import { snkDataExporterMessages } from "./resources/snk-data-exporter.msg";
|
14
|
-
import { snkFilterParamConfigMessages } from "./resources/snk-filter-param-config.msg";
|
15
|
-
import { snkFilterFieldSearchMessages } from "./resources/snk-filter-field-search.msg";
|
16
|
-
import { snkSimpleBarMessages } from './resources/snk-simple-bar.msg';
|
17
|
-
import { snkAttachMessages } from "./resources/snk-attach.msg";
|
18
|
-
import { snkPersonalizedFilterMessages } from "./resources/snk-personalized-filter.msg";
|
19
|
-
import { snkEntityListMessages } from "./resources/snk-entity-list.msg";
|
20
|
-
import { snkActionsButtonMessages } from "./resources/snk-actions-button.msg";
|
21
|
-
import { snkPrintSelectorMessages } from "./resources/snk-print-selector.msg";
|
22
1
|
import { ApplicationContext } from "@sankhyalabs/core";
|
2
|
+
import messageResourcePtBR from "./messageResourcePtBRUtils";
|
3
|
+
import messageResourceEnUS from "./messageResourceEnUSUtils";
|
4
|
+
import messageResourceEsES from "./messageResourceEsESUtils";
|
23
5
|
export class SnkMessageBuilder {
|
24
6
|
constructor(domainName) {
|
25
|
-
this._defaults =
|
26
|
-
|
27
|
-
|
28
|
-
snkFormConfig: snkFormConfigMessages,
|
29
|
-
snkConfigOptions: snkConfigOptionsMessages,
|
30
|
-
snkTaskbar: snkTaskbarMessages,
|
31
|
-
snkFieldConfig: snkFieldConfigMessages,
|
32
|
-
snkFilterBar: snkFilterBarMessages,
|
33
|
-
snkConfigurator: snkConfiguratorMessages,
|
34
|
-
snkTabConfig: snkTabConfigMessages,
|
35
|
-
crudUtils: crudUtilsMessages,
|
36
|
-
snkGrid: snkGridMessages,
|
37
|
-
snkGridConfig: snkGridConfigMessages,
|
38
|
-
snkExporter: snkExporterMessages,
|
39
|
-
snkDataExporter: snkDataExporterMessages,
|
40
|
-
snkCrud: snkCrudMessages,
|
41
|
-
snkSimpleCrud: snkSimpleCrudMessages,
|
42
|
-
fileViewer: fileViewerMessages,
|
43
|
-
snkFilterParamConfig: snkFilterParamConfigMessages,
|
44
|
-
snkFilterFieldSearch: snkFilterFieldSearchMessages,
|
45
|
-
snkSimpleBar: snkSimpleBarMessages,
|
46
|
-
snkAttach: snkAttachMessages,
|
47
|
-
snkPersonalizedFilter: snkPersonalizedFilterMessages,
|
48
|
-
snkEntityList: snkEntityListMessages,
|
49
|
-
snkActionsButton: snkActionsButtonMessages,
|
50
|
-
snkPrintSelector: snkPrintSelectorMessages,
|
51
|
-
};
|
7
|
+
this._defaults = messageResourcePtBR;
|
8
|
+
this._messageResourceEnUS = messageResourceEnUS;
|
9
|
+
this._messageResourceEsES = messageResourceEsES;
|
52
10
|
this._currentOperation = OperationMap.CLEAN;
|
53
11
|
this._domainName = domainName;
|
54
12
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
13
|
+
this._lang = document.documentElement.lang || 'pt-BR';
|
55
14
|
this.loadAppMessages().then((msgs) => {
|
56
15
|
this._appMessages = msgs;
|
57
16
|
}, error => {
|
@@ -78,13 +37,12 @@ export class SnkMessageBuilder {
|
|
78
37
|
* @returns A mensagem formatada.
|
79
38
|
*/
|
80
39
|
getMessage(key, params) {
|
81
|
-
if (key == undefined)
|
40
|
+
if (key == undefined)
|
82
41
|
return undefined;
|
83
|
-
}
|
84
42
|
var parts = key.split(".");
|
85
43
|
let msg = this.resolveMessage(parts, this.getDomainMessages());
|
86
44
|
if (msg == undefined) {
|
87
|
-
msg = this.
|
45
|
+
msg = this.getMessagesDefaults(parts);
|
88
46
|
}
|
89
47
|
if (this.customMessageBuilder) {
|
90
48
|
const result = this.customMessageBuilder(key, msg, params);
|
@@ -93,6 +51,19 @@ export class SnkMessageBuilder {
|
|
93
51
|
}
|
94
52
|
return this.postProcess(msg, params);
|
95
53
|
}
|
54
|
+
getMessagesDefaults(parts) {
|
55
|
+
var _a;
|
56
|
+
switch ((_a = this._lang) === null || _a === void 0 ? void 0 : _a.toLocaleLowerCase()) {
|
57
|
+
case "en":
|
58
|
+
case "en_us":
|
59
|
+
return this.resolveMessage(parts, this._messageResourceEnUS);
|
60
|
+
case "es":
|
61
|
+
case "es_es":
|
62
|
+
return this.resolveMessage(parts, this._messageResourceEsES);
|
63
|
+
default:
|
64
|
+
return this.resolveMessage(parts, this._defaults);
|
65
|
+
}
|
66
|
+
}
|
96
67
|
getDomainMessages() {
|
97
68
|
if (!this._appMessages)
|
98
69
|
return undefined;
|
@@ -149,7 +120,9 @@ export class SnkMessageBuilder {
|
|
149
120
|
}
|
150
121
|
async loadAppMessages() {
|
151
122
|
const messagesUrl = await this._application.getApplicationPath();
|
152
|
-
const
|
123
|
+
const langSuffix = this._lang !== "pt" ? `-${this._lang}` : "";
|
124
|
+
const fileName = `appmessages${langSuffix}.js`;
|
125
|
+
const module = await import(/* webpackIgnore: true */ `${messagesUrl}/messages/${fileName}`);
|
153
126
|
return module.default;
|
154
127
|
}
|
155
128
|
}
|