@sankhyalabs/sankhyablocks 9.1.0-dev.13 → 9.1.0-dev.15
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-6a4108c9.js → ClientSideExporterProvider-c14393e1.js} +10 -6
- package/dist/cjs/{ConfigStorage-bb8c0edf.js → ConfigStorage-54b9f26d.js} +2 -2
- package/dist/cjs/{DataFetcher-e23a263b.js → DataFetcher-b3508dda.js} +2737 -22
- package/dist/cjs/{FormConfigHelper-c664dbae.js → FormConfigHelper-ebb77625.js} +4 -5
- package/dist/cjs/{ISave-e0be2362.js → ISave-b4f736d5.js} +1 -1
- package/dist/cjs/{SnkFormConfigManager-a23df43c.js → SnkFormConfigManager-ee250c13.js} +2 -2
- package/dist/cjs/{auth-fetcher-8670a38f.js → auth-fetcher-e9ffe276.js} +1 -1
- package/dist/cjs/config-header.cjs.entry.js +2 -2
- package/dist/cjs/{dataunit-fetcher-c34a8217.js → dataunit-fetcher-0fe0ee18.js} +22 -21
- package/dist/cjs/field-config_2.cjs.entry.js +9 -6
- package/dist/cjs/fields-layout.cjs.entry.js +20 -13
- package/dist/cjs/fields-selector.cjs.entry.js +11 -6
- package/dist/cjs/{form-config-fetcher-d8b78403.js → form-config-fetcher-e4187da9.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 +20 -9
- package/dist/cjs/snk-application.cjs.entry.js +51 -21
- package/dist/cjs/snk-attach.cjs.entry.js +18 -12
- package/dist/cjs/snk-configurator.cjs.entry.js +1 -1
- package/dist/cjs/snk-crud.cjs.entry.js +17 -13
- package/dist/cjs/snk-data-exporter.cjs.entry.js +5 -6
- package/dist/cjs/{snk-data-unit-47c6d16b.js → snk-data-unit-a0224064.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-expression-group_2.cjs.entry.js +21 -20
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +10 -10
- 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 +8 -8
- package/dist/cjs/snk-grid.cjs.entry.js +6 -6
- package/dist/cjs/{snk-guides-viewer-1689e877.js → snk-guides-viewer-6b4be669.js} +9 -9
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -7
- 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 +18 -16
- 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 +51 -7
- package/dist/collection/components/snk-attach/snk-attach.js +1 -1
- 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 +12 -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-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-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.js +5 -5
- package/dist/collection/components/snk-form-config/FormConfigHelper.js +4 -5
- 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.js +6 -3
- package/dist/collection/components/snk-form-config/fields-layout/fields-layout.css +2 -2
- 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.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-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 +12 -10
- package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.js +26 -1
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +19 -12
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/helpers/DataUnitDataLoaderHelper.js +22 -20
- package/dist/collection/lib/message/SnkMessageBuilder.js +28 -7
- package/dist/collection/lib/message/messageResourceEnUSUtils.js +30 -45
- package/dist/collection/lib/message/messageResourceEsESUtils.js +30 -45
- package/dist/collection/lib/message/messageResourcePtBRUtils.js +30 -45
- package/dist/collection/lib/message/resources/en-us/continuousInsertUtils.msg.js +6 -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/snk-actions-button.msg.js +3 -1
- package/dist/collection/lib/message/resources/en-us/snk-application.msg.js +21 -2
- package/dist/collection/lib/message/resources/en-us/snk-attach.msg.js +4 -1
- package/dist/collection/lib/message/resources/en-us/snk-configurator.msg.js +6 -1
- package/dist/collection/lib/message/resources/en-us/snk-crud.msg.js +28 -3
- package/dist/collection/lib/message/resources/en-us/snk-data-unit.msg.js +5 -2
- package/dist/collection/lib/message/resources/en-us/snk-error-handler.msg.js +17 -0
- package/dist/collection/lib/message/resources/en-us/snk-filter-bar.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-form.msg.js +44 -2
- 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 +17 -0
- package/dist/collection/lib/message/resources/en-us/snk-pesquisa.msg.js +25 -0
- package/dist/collection/lib/message/resources/en-us/snk-simple-crud.msg.js +6 -0
- package/dist/collection/lib/message/resources/en-us/snk-simple-form-config.msg.js +16 -0
- package/dist/collection/lib/message/resources/es-es/continuousInsertUtils.msg.js +6 -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/snk-actions-button.msg.js +3 -1
- package/dist/collection/lib/message/resources/es-es/snk-application.msg.js +21 -2
- package/dist/collection/lib/message/resources/es-es/snk-attach.msg.js +3 -0
- package/dist/collection/lib/message/resources/es-es/snk-configurator.msg.js +6 -1
- package/dist/collection/lib/message/resources/es-es/snk-crud.msg.js +27 -2
- package/dist/collection/lib/message/resources/es-es/snk-data-unit.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-filter-bar.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-form.msg.js +44 -2
- 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 +17 -0
- package/dist/collection/lib/message/resources/es-es/snk-pesquisa.msg.js +25 -0
- package/dist/collection/lib/message/resources/es-es/snk-simple-crud.msg.js +6 -0
- package/dist/collection/lib/message/resources/es-es/snk-simple-form-config.msg.js +16 -0
- package/dist/collection/lib/message/resources/pt-br/continuousInsertUtils.msg.js +6 -0
- 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/pt-br/snk-actions-button.msg.js +3 -1
- package/dist/collection/lib/message/resources/pt-br/snk-application.msg.js +19 -0
- package/dist/collection/lib/message/resources/pt-br/snk-attach.msg.js +3 -0
- package/dist/collection/lib/message/resources/pt-br/snk-configurator.msg.js +6 -1
- package/dist/collection/lib/message/resources/pt-br/snk-crud.msg.js +27 -2
- package/dist/collection/lib/message/resources/pt-br/snk-data-unit.msg.js +3 -0
- package/dist/collection/lib/message/resources/pt-br/snk-error-handler.msg.js +17 -0
- package/dist/collection/lib/message/resources/pt-br/snk-filter-bar.msg.js +7 -0
- package/dist/collection/lib/message/resources/pt-br/snk-filter-list.msg.js +3 -0
- package/dist/collection/lib/message/resources/pt-br/snk-form.msg.js +45 -3
- package/dist/collection/lib/message/resources/pt-br/snk-layout-form-config.msg.js +10 -0
- package/dist/collection/lib/message/resources/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/pt-br/snk-simple-crud.msg.js +6 -0
- package/dist/collection/lib/message/resources/pt-br/snk-simple-form-config.msg.js +16 -0
- package/dist/collection/lib/utils/ContinuousInsertUtils.js +6 -2
- package/dist/components/ContinuousInsertUtils.js +6 -2
- package/dist/components/DataFetcher.js +2707 -13
- package/dist/components/config-header2.js +2 -2
- package/dist/components/dataunit-fetcher.js +22 -21
- package/dist/components/field-config2.js +6 -7
- package/dist/components/field-item2.js +6 -3
- package/dist/components/fields-layout2.js +19 -12
- package/dist/components/fields-selector2.js +11 -5
- 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 +46 -15
- package/dist/components/snk-attach2.js +14 -8
- package/dist/components/snk-configurator2.js +1 -1
- package/dist/components/snk-crud.js +12 -8
- package/dist/components/snk-data-unit2.js +5 -11
- package/dist/components/snk-detail-view2.js +19 -13
- 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 +5 -5
- 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-layout-form-config2.js +7 -1
- package/dist/components/snk-personalized-filter2.js +1 -1
- package/dist/components/snk-pesquisa2.js +23 -16
- package/dist/components/snk-simple-crud2.js +12 -10
- package/dist/components/snk-simple-form-config2.js +7 -1
- package/dist/esm/{ClientSideExporterProvider-09dee1a3.js → ClientSideExporterProvider-4f81855c.js} +10 -6
- package/dist/esm/{ConfigStorage-cf578768.js → ConfigStorage-7f782e00.js} +2 -2
- package/dist/esm/{DataFetcher-db08cad0.js → DataFetcher-b51050a0.js} +2707 -13
- package/dist/esm/{FormConfigHelper-49fe72ca.js → FormConfigHelper-4e42f0b6.js} +4 -5
- package/dist/esm/{ISave-da565824.js → ISave-bc31d9f4.js} +1 -1
- package/dist/esm/{SnkFormConfigManager-c1cd9dcd.js → SnkFormConfigManager-ab1948b0.js} +2 -2
- package/dist/esm/{auth-fetcher-43c8d76b.js → auth-fetcher-8ac800aa.js} +1 -1
- package/dist/esm/config-header.entry.js +2 -2
- package/dist/esm/{dataunit-fetcher-1b78797a.js → dataunit-fetcher-16702941.js} +22 -21
- package/dist/esm/field-config_2.entry.js +9 -6
- package/dist/esm/fields-layout.entry.js +20 -13
- package/dist/esm/fields-selector.entry.js +11 -6
- package/dist/esm/{form-config-fetcher-e623539b.js → form-config-fetcher-6fe8d856.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 +20 -9
- package/dist/esm/snk-application.entry.js +50 -20
- package/dist/esm/snk-attach.entry.js +18 -12
- package/dist/esm/snk-configurator.entry.js +1 -1
- package/dist/esm/snk-crud.entry.js +17 -13
- package/dist/esm/snk-data-exporter.entry.js +5 -6
- package/dist/esm/{snk-data-unit-c12986b7.js → snk-data-unit-fd6be603.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-expression-group_2.entry.js +21 -20
- package/dist/esm/snk-filter-bar_4.entry.js +10 -10
- 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 +8 -8
- package/dist/esm/snk-grid.entry.js +6 -6
- package/dist/esm/{snk-guides-viewer-defa2629.js → snk-guides-viewer-480d909c.js} +10 -10
- package/dist/esm/snk-guides-viewer.entry.js +7 -7
- 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 +19 -17
- package/dist/sankhyablocks/{p-fa591f6f.js → p-05969d8a.js} +1 -1
- package/dist/sankhyablocks/p-07b14811.entry.js +1 -0
- package/dist/sankhyablocks/p-11346b8d.entry.js +1 -0
- package/dist/sankhyablocks/p-162a92a7.entry.js +1 -0
- package/dist/sankhyablocks/p-187a58f2.entry.js +1 -0
- package/dist/sankhyablocks/p-1a150f81.entry.js +1 -0
- package/dist/sankhyablocks/p-1a53afc6.entry.js +1 -0
- package/dist/sankhyablocks/p-20e0db8f.entry.js +1 -0
- package/dist/sankhyablocks/p-21b7b011.entry.js +1 -0
- package/dist/sankhyablocks/p-367c998c.entry.js +1 -0
- package/dist/sankhyablocks/p-379d6206.js +60 -0
- package/dist/sankhyablocks/p-566b468b.entry.js +1 -0
- package/dist/sankhyablocks/{p-c9657baa.js → p-56874df8.js} +1 -1
- package/dist/sankhyablocks/p-5bab470d.entry.js +1 -0
- package/dist/sankhyablocks/p-64fed9bf.js +1 -0
- package/dist/sankhyablocks/p-6703336d.entry.js +1 -0
- package/dist/sankhyablocks/p-68d66cd8.entry.js +11 -0
- package/dist/sankhyablocks/p-6cf54569.js +1 -0
- package/dist/sankhyablocks/{p-b21d32f6.js → p-709bf708.js} +1 -1
- 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-7baecc09.entry.js +1 -0
- package/dist/sankhyablocks/p-7fd47ce5.entry.js +1 -0
- package/dist/sankhyablocks/p-8f73da95.js +1 -0
- package/dist/sankhyablocks/{p-90ee1990.entry.js → p-a200817c.entry.js} +1 -1
- package/dist/sankhyablocks/p-a5108625.entry.js +1 -0
- package/dist/sankhyablocks/p-c4eae355.entry.js +1 -0
- package/dist/sankhyablocks/p-cc55bf41.entry.js +1 -0
- package/dist/sankhyablocks/p-d271f2b4.entry.js +1 -0
- package/dist/sankhyablocks/p-d540affc.js +1 -0
- package/dist/sankhyablocks/{p-e25412da.js → p-dc27d59a.js} +1 -1
- package/dist/sankhyablocks/{p-cfa8cac2.entry.js → p-e67e9a48.entry.js} +1 -1
- package/dist/sankhyablocks/p-e93ca8a8.js +1 -0
- package/dist/sankhyablocks/p-f8f29e1a.entry.js +1 -0
- package/dist/sankhyablocks/{p-405edf96.js → p-fb757021.js} +1 -1
- 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 +6 -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 +1 -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-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-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-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 +1 -0
- package/dist/types/components/snk-simple-form-config/snk-simple-form-config.d.ts +6 -0
- package/dist/types/components.d.ts +24 -0
- package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +2 -0
- package/dist/types/lib/message/SnkMessageBuilder.d.ts +8 -1
- package/dist/types/lib/message/resources/en-us/continuousInsertUtils.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/snk-error-handler.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/en-us/snk-simple-form-config.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/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/snk-error-handler.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-layout-form-config.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-simple-form-config.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/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/snk-error-handler.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-layout-form-config.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-simple-form-config.msg.d.ts +1 -0
- package/dist/types/lib/utils/ContinuousInsertUtils.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/SnkMessageBuilder-acd9ec62.js +0 -1937
- package/dist/components/SnkMessageBuilder.js +0 -1915
- package/dist/esm/SnkMessageBuilder-c8b452b6.js +0 -1915
- package/dist/sankhyablocks/p-09ba8326.entry.js +0 -1
- package/dist/sankhyablocks/p-1c69a957.entry.js +0 -1
- package/dist/sankhyablocks/p-224fa6f9.js +0 -1
- package/dist/sankhyablocks/p-22a8656b.entry.js +0 -1
- package/dist/sankhyablocks/p-23b20add.entry.js +0 -1
- package/dist/sankhyablocks/p-2628f34e.entry.js +0 -1
- package/dist/sankhyablocks/p-34cfb5ad.entry.js +0 -11
- package/dist/sankhyablocks/p-35e73c5d.js +0 -1
- package/dist/sankhyablocks/p-360f0b74.js +0 -1
- package/dist/sankhyablocks/p-37b4f642.js +0 -60
- package/dist/sankhyablocks/p-49d968e2.entry.js +0 -1
- package/dist/sankhyablocks/p-4b8691b6.js +0 -1
- package/dist/sankhyablocks/p-4d2ff2fb.entry.js +0 -1
- package/dist/sankhyablocks/p-4eb731b3.js +0 -1
- package/dist/sankhyablocks/p-60d3abf6.entry.js +0 -1
- package/dist/sankhyablocks/p-6bc7c7ee.entry.js +0 -1
- package/dist/sankhyablocks/p-71a05822.entry.js +0 -1
- package/dist/sankhyablocks/p-7ced2cf4.entry.js +0 -1
- package/dist/sankhyablocks/p-81820bf8.entry.js +0 -1
- package/dist/sankhyablocks/p-86bd4478.entry.js +0 -1
- package/dist/sankhyablocks/p-86c8f7f2.entry.js +0 -1
- package/dist/sankhyablocks/p-aef68e58.entry.js +0 -1
- package/dist/sankhyablocks/p-b033bf30.entry.js +0 -1
- package/dist/sankhyablocks/p-b1ea8c6d.entry.js +0 -1
- package/dist/sankhyablocks/p-cb2a4613.entry.js +0 -1
- package/dist/sankhyablocks/p-cd1a5b6a.js +0 -1
- package/dist/sankhyablocks/p-cfc219f6.entry.js +0 -1
- package/dist/sankhyablocks/p-d67526b6.entry.js +0 -1
- package/dist/sankhyablocks/p-f442c8f6.entry.js +0 -1
- package/dist/sankhyablocks/p-f65421cd.entry.js +0 -1
@@ -6,6 +6,7 @@ export class PesquisaTree {
|
|
6
6
|
this.argument = undefined;
|
7
7
|
this.allowsNonAnalytic = false;
|
8
8
|
this.shouldLoadTree = false;
|
9
|
+
this.messagesBuilder = undefined;
|
9
10
|
this.items = [];
|
10
11
|
}
|
11
12
|
async applyFilter() {
|
@@ -36,8 +37,8 @@ export class PesquisaTree {
|
|
36
37
|
handleDbClick(item) {
|
37
38
|
var _a;
|
38
39
|
if (!this.allowsNonAnalytic && !((_a = item['props']) === null || _a === void 0 ? void 0 : _a['analitico'])) {
|
39
|
-
const title = '
|
40
|
-
const message =
|
40
|
+
const title = this.getMessage('snkPesquisa.tree.errorTitle');
|
41
|
+
const message = this.getMessage('snkPesquisa.tree.nonAnalyticError');
|
41
42
|
ApplicationUtils.error(title, message);
|
42
43
|
return;
|
43
44
|
}
|
@@ -48,13 +49,16 @@ export class PesquisaTree {
|
|
48
49
|
this.pesquisaTreeSelectItem.emit(option);
|
49
50
|
}
|
50
51
|
renderEmptyMessage() {
|
51
|
-
return (h("div", { class: "ez-flex ez-flex--justify-center ez-flex--align-items-center ez-margin--large ez-text ez-text--xlarge ez-text--secondary" }, h("span", null,
|
52
|
+
return (h("div", { class: "ez-flex ez-flex--justify-center ez-flex--align-items-center ez-margin--large ez-text ez-text--xlarge ez-text--secondary" }, h("span", null, this.getMessage('snkPesquisa.tree.emptyMessage'))));
|
53
|
+
}
|
54
|
+
getMessage(key, params) {
|
55
|
+
return this.messagesBuilder.getMessage(key, params);
|
52
56
|
}
|
53
57
|
render() {
|
54
58
|
var _a;
|
55
59
|
return (h(Host, null, !((_a = this.items) === null || _a === void 0 ? void 0 : _a.length) ?
|
56
60
|
this.renderEmptyMessage() :
|
57
|
-
h(Fragment, null, h("div", { class: 'actions-container' }, h("ez-button", { size: 'small', mode: 'icon', class: 'ez-margin-right--small', iconName: 'show-list', title:
|
61
|
+
h(Fragment, null, h("div", { class: 'actions-container' }, h("ez-button", { size: 'small', mode: 'icon', class: 'ez-margin-right--small', iconName: 'show-list', title: this.getMessage('snkPesquisa.tree.expandButton'), onClick: () => this.handleExpandAll() }), h("ez-button", { size: 'small', mode: 'icon', iconName: 'hide-list', title: this.getMessage('snkPesquisa.tree.collapseButton'), onClick: () => this.handleCloseAll() })), h("ez-tree", { ref: (element) => this._tree = element, onEzDbClickItem: ({ detail }) => this.handleDbClick(detail), items: this.items }))));
|
58
62
|
}
|
59
63
|
static get is() { return "pesquisa-tree"; }
|
60
64
|
static get encapsulation() { return "scoped"; }
|
@@ -148,6 +152,26 @@ export class PesquisaTree {
|
|
148
152
|
"attribute": "should-load-tree",
|
149
153
|
"reflect": false,
|
150
154
|
"defaultValue": "false"
|
155
|
+
},
|
156
|
+
"messagesBuilder": {
|
157
|
+
"type": "unknown",
|
158
|
+
"mutable": true,
|
159
|
+
"complexType": {
|
160
|
+
"original": "SnkMessageBuilder",
|
161
|
+
"resolved": "SnkMessageBuilder",
|
162
|
+
"references": {
|
163
|
+
"SnkMessageBuilder": {
|
164
|
+
"location": "import",
|
165
|
+
"path": "../../../lib/message/SnkMessageBuilder"
|
166
|
+
}
|
167
|
+
}
|
168
|
+
},
|
169
|
+
"required": false,
|
170
|
+
"optional": false,
|
171
|
+
"docs": {
|
172
|
+
"tags": [],
|
173
|
+
"text": "Respons\u00E1vel por flexibilizar e padronizar o uso de mensagens nos blocos de constru\u00E7\u00E3o."
|
174
|
+
}
|
151
175
|
}
|
152
176
|
};
|
153
177
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ElementIDUtils, ObjectUtils, StringUtils } from '@sankhyalabs/core';
|
1
|
+
import { ApplicationContext, ElementIDUtils, ObjectUtils, StringUtils } from '@sankhyalabs/core';
|
2
2
|
import { h, Host } from '@stencil/core';
|
3
3
|
import { buildGridMetadata, PESQUISA_VIEW_MODE } from './pesquisaHelper';
|
4
4
|
import { PesquisaFetcher } from '../../lib';
|
@@ -310,17 +310,21 @@ export class SnkPesquisa {
|
|
310
310
|
this._valideDataSource = true;
|
311
311
|
}
|
312
312
|
getMessageView() {
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
313
|
+
if (this._startLoading)
|
314
|
+
return this.getMessage('snkPesquisa.search.waitMessage');
|
315
|
+
if (!this._itemList)
|
316
|
+
return this.getMessage('snkPesquisa.search.initialMessage');
|
317
|
+
const itemsCount = this._itemList.length;
|
318
|
+
if (itemsCount < 1)
|
319
|
+
return this.getMessage('snkPesquisa.search.noResultsMessage');
|
320
|
+
if (itemsCount === 1)
|
321
|
+
return this.getMessage('snkPesquisa.search.resultsFoundSingular');
|
322
|
+
return this.getMessage('snkPesquisa.search.resultsFoundPlural', { COUNT: itemsCount });
|
322
323
|
}
|
323
324
|
async componentWillLoad() {
|
325
|
+
var _a;
|
326
|
+
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
327
|
+
this._messagesBuilder = (_a = this._application) === null || _a === void 0 ? void 0 : _a.messagesBuilder;
|
324
328
|
const mode = await this.pesquisaFetcher.loadPresentationConfig(this.entityName);
|
325
329
|
this._presentationMode = mode === 'list' ? 'list' : 'table';
|
326
330
|
}
|
@@ -328,6 +332,9 @@ export class SnkPesquisa {
|
|
328
332
|
ElementIDUtils.addIDInfo(this._element);
|
329
333
|
await this.chooseViewMode();
|
330
334
|
}
|
335
|
+
getMessage(key, params) {
|
336
|
+
return this._messagesBuilder.getMessage(key, params);
|
337
|
+
}
|
331
338
|
async handleChangeViewMode() {
|
332
339
|
this._presentationMode = this._presentationMode === 'list' ? 'table' : 'list';
|
333
340
|
await this.chooseViewMode();
|
@@ -357,28 +364,28 @@ export class SnkPesquisa {
|
|
357
364
|
if (this._presentationMode === 'list') {
|
358
365
|
return {
|
359
366
|
iconName: 'table',
|
360
|
-
title: '
|
367
|
+
title: this.getMessage('snkPesquisa.viewMode.tableMode'),
|
361
368
|
};
|
362
369
|
}
|
363
370
|
if (this.isHierarchyEntity) {
|
364
371
|
return {
|
365
372
|
iconName: 'hierarchical-tree',
|
366
|
-
title: '
|
373
|
+
title: this.getMessage('snkPesquisa.viewMode.tableMode'),
|
367
374
|
};
|
368
375
|
}
|
369
376
|
return {
|
370
377
|
iconName: 'list',
|
371
|
-
title: '
|
378
|
+
title: this.getMessage('snkPesquisa.viewMode.listMode'),
|
372
379
|
};
|
373
380
|
}
|
374
381
|
render() {
|
375
382
|
var _a, _b;
|
376
|
-
return (h(Host, null, h("div", { class: "snk-pesquisa" }, h("div", { class: "snk-pesquisa__input" }, h("ez-text-input", { label:
|
383
|
+
return (h(Host, null, h("div", { class: "snk-pesquisa" }, h("div", { class: "snk-pesquisa__input" }, h("ez-text-input", { label: this.getMessage('snkPesquisa.search.label'), class: "ez-margin-right--medium", canShowError: false, ref: (ref) => this._textInput = ref, onEzChange: (event) => this.onChangeValue(event), value: this.argument, "data-element-id": "searchInput" }, h("ez-icon", { slot: "leftIcon", iconName: "search" }), this.argument && ((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value)
|
377
384
|
? h("button", { slot: "rightIcon", class: "snk-pesquisa__btn", onClick: () => this.clearSearch() }, h("ez-icon", { iconName: "close" }))
|
378
|
-
: undefined), h("ez-button", { class: "ez-button--primary", label:
|
385
|
+
: undefined), h("ez-button", { class: "ez-button--primary", label: this.getMessage('snkPesquisa.search.button'), onClick: () => this.onClickSearch() }), h("ez-button", { class: "ez-margin-left--medium", mode: "icon", iconName: this.getButtonModeInfo().iconName, title: this.getButtonModeInfo().title, onClick: async () => await this.handleChangeViewMode() })), h("div", { class: `snk-pesquisa__records-label ${this._currentView === PESQUISA_VIEW_MODE.TREE ? 'hidden' : ''}` }, h("label", { class: `snk-pesquisa__records ${this.hideRecordsMessage() ? "hidden" : ""}` }, this.getMessageView()), h("label", { class: `snk-pesquisa__records-limit ${this.hideLimitMessage() ? "hidden" : ""}` }, this.getMessage('snkPesquisa.search.limitMessage'))), h("div", { class: "snk-pesquisa__content" }, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null, this._valideDataSource &&
|
379
386
|
h("pesquisa-grid", { metadata: this._gridMetadata, dataSource: this._gridDataSource, pkField: this._pkField, descriptionField: this._descriptionField, entityName: this.entityName, shouldLoadConfig: this._currentView === PESQUISA_VIEW_MODE.GRID, onPesquisaGridSelectItem: ({ detail }) => this.selectItem(detail) })), h("stack-item", null, h("div", { class: 'snk-pesquisa__cards-container' }, (_b = this._itemList) === null || _b === void 0 ? void 0 : _b.map((item) => {
|
380
387
|
return (h("ez-card-item", { onEzClick: (event) => this.createOption(event.detail), item: item }));
|
381
|
-
}))), h("stack-item", null, h("pesquisa-tree", { ref: (element) => this._pesquisaTree = element, argument: this.argument, treeLoader: this.treeLoader, allowsNonAnalytic: this.allowsNonAnalytic, shouldLoadTree: this._currentView === PESQUISA_VIEW_MODE.TREE, onPesquisaTreeSelectItem: ({ detail }) => this.selectItem(detail) })))))));
|
388
|
+
}))), h("stack-item", null, h("pesquisa-tree", { ref: (element) => this._pesquisaTree = element, argument: this.argument, treeLoader: this.treeLoader, allowsNonAnalytic: this.allowsNonAnalytic, shouldLoadTree: this._currentView === PESQUISA_VIEW_MODE.TREE, onPesquisaTreeSelectItem: ({ detail }) => this.selectItem(detail), messagesBuilder: this._messagesBuilder })))))));
|
382
389
|
}
|
383
390
|
static get is() { return "snk-pesquisa"; }
|
384
391
|
static get encapsulation() { return "scoped"; }
|
@@ -14,7 +14,7 @@ import RmPrecisionCustomValueFormatter from '../../lib/DefaultCustomFormatters/R
|
|
14
14
|
import ClientSideExporterProvider from '../snk-data-exporter/providers/ClientSideExporterProvider';
|
15
15
|
import store from '../../lib/store';
|
16
16
|
import { ContinuousInsertUtils } from '../../lib/utils/ContinuousInsertUtils';
|
17
|
-
import { buildFieldSearch
|
17
|
+
import { buildFieldSearch } from '@sankhyalabs/ezui/dist/collection/utils';
|
18
18
|
export class SnkSimpleCrud {
|
19
19
|
constructor() {
|
20
20
|
this._multiSelectionListDataSource = new SnkMultiSelectionListDataSource();
|
@@ -377,6 +377,10 @@ export class SnkSimpleCrud {
|
|
377
377
|
}
|
378
378
|
}
|
379
379
|
}
|
380
|
+
getMessage(key, params) {
|
381
|
+
var _a;
|
382
|
+
return (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage(key, params);
|
383
|
+
}
|
380
384
|
disconnectedCallback() {
|
381
385
|
var _a;
|
382
386
|
(_a = this._keyboardManager) === null || _a === void 0 ? void 0 : _a.unbindAllShortcutKeys();
|
@@ -630,10 +634,9 @@ export class SnkSimpleCrud {
|
|
630
634
|
return hardList.concat(this.actionsList);
|
631
635
|
}
|
632
636
|
getSettingsListGrid() {
|
633
|
-
var _a, _b;
|
634
637
|
const hardList = [{
|
635
638
|
value: StringUtils.generateUUID(),
|
636
|
-
label:
|
639
|
+
label: this.getMessage("snkSimpleCrud.findColumn"),
|
637
640
|
disableCloseOnSelect: true,
|
638
641
|
eagerInitialize: true,
|
639
642
|
itemBuilder: (splitButton, item) => this.getColumnSearch(splitButton, item)
|
@@ -641,10 +644,9 @@ export class SnkSimpleCrud {
|
|
641
644
|
return hardList;
|
642
645
|
}
|
643
646
|
getSettingsListForm() {
|
644
|
-
var _a, _b;
|
645
647
|
const hardList = [{
|
646
648
|
value: StringUtils.generateUUID(),
|
647
|
-
label:
|
649
|
+
label: this.getMessage("snkSimpleCrud.findFields"),
|
648
650
|
disableCloseOnSelect: true,
|
649
651
|
eagerInitialize: true,
|
650
652
|
itemBuilder: (splitButton, item) => this.getFieldSearch(splitButton, item)
|
@@ -745,16 +747,16 @@ export class SnkSimpleCrud {
|
|
745
747
|
return;
|
746
748
|
}
|
747
749
|
this._keyboardManager
|
748
|
-
.bind("F7", () => dataUnit.saveData(), { description: "
|
749
|
-
.bind("F8", dataUnit.addRecord.bind(dataUnit), { description: "
|
750
|
-
.bind("F9", dataUnit.removeSelectedRecords.bind(dataUnit), { description: "
|
750
|
+
.bind("F7", () => dataUnit.saveData(), { description: this.getMessage("snkSimpleCrud.keyboardShortcuts.saveData"), element: this._element })
|
751
|
+
.bind("F8", dataUnit.addRecord.bind(dataUnit), { description: this.getMessage("snkSimpleCrud.keyboardShortcuts.addRecord"), element: this._element })
|
752
|
+
.bind("F9", dataUnit.removeSelectedRecords.bind(dataUnit), { description: this.getMessage("snkSimpleCrud.keyboardShortcuts.removeRecord"), element: this._element })
|
751
753
|
.bind("Escape", () => {
|
752
754
|
if (dataUnit.isDirty()) {
|
753
755
|
dataUnit.cancelEdition();
|
754
756
|
}
|
755
757
|
}, {
|
756
758
|
debounceTime: 1000,
|
757
|
-
description: "
|
759
|
+
description: this.getMessage("snkSimpleCrud.keyboardShortcuts.cancelAction"), element: this._element
|
758
760
|
});
|
759
761
|
}
|
760
762
|
async handleFormConfigSaved() {
|
@@ -780,7 +782,7 @@ export class SnkSimpleCrud {
|
|
780
782
|
}
|
781
783
|
return (h("snk-data-unit", { ref: ref => this._snkDataUnit = ref, class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), pageSize: this.getPageSize(), onInsertionMode: this.handleDataUnitOnInsertionMode.bind(this), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail, onDataUnitFieldsHidded: this.updateFormConfig.bind(this), domainMessagesBuilder: this.domainMessagesBuilder }, h("header", null, h("slot", { name: "snkSimpleCrudHeader" })), h("section", { class: `ez-box ez-box--no-outline ${this.outlineMode ? 'ez-box--outline' : 'ez-box--shadow'} simple-crud__container-section`, ref: (ref) => this._container = ref, tabindex: "0" }, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null, h("ez-grid", { class: "ez-margin-bottom--large ez-box--no-outline", ref: ref => this._grid = ref, dataUnit: this.dataUnit, config: this.gridConfig, "no-header": true, multipleSelection: this.multipleSelection, onEzDoubleClick: () => this.goToView(VIEW_MODE.FORM), onConfigChange: evt => this.gridConfigChangeHandler(evt), columnfilterDataSource: this.dataUnit.name && this.dataUnit.name.includes(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
|
782
784
|
? undefined
|
783
|
-
: this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this.enableContinuousInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, outlineMode: this.outlineMode, tabindex: "0", paginationCounterMode: this.paginationCounterMode }, this.renderTaskbarContent(VIEW_MODE.GRID), h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, this.renderTaskbarContent(VIEW_MODE.FORM), h("ez-form", { ref: (ref) => this._form = ref, class: `ez-margin-top--large ez-box--no-outline`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this), elementFocusSearchField: this._container, tabindex: "0" }), h("snk-simple-form-config", { ref: (ref) => this._snkSimpleFormConfig = ref, dataUnit: this.dataUnit, onSnkConfigSaved: this.handleFormConfigSaved.bind(this), configName: (_a = this.formLegacyConfigName) !== null && _a !== void 0 ? _a : this.configName })), this.messagesBuilder && h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this.resolveResourceID(), customContainerId: this._customContainerId, layoutFormConfig: this.layoutFormConfig })), h("div", { id: `${this._customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }))), h("ez-popup", { size: "medium", heightMode: "auto", useHeader: false, opened: this._showPopUpGridConfig, onEzClosePopup: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
|
785
|
+
: this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this.enableContinuousInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, outlineMode: this.outlineMode, tabindex: "0", paginationCounterMode: this.paginationCounterMode }, this.renderTaskbarContent(VIEW_MODE.GRID), h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, this.renderTaskbarContent(VIEW_MODE.FORM), h("ez-form", { ref: (ref) => this._form = ref, class: `ez-margin-top--large ez-box--no-outline`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this), elementFocusSearchField: this._container, tabindex: "0" }), h("snk-simple-form-config", { ref: (ref) => this._snkSimpleFormConfig = ref, dataUnit: this.dataUnit, onSnkConfigSaved: this.handleFormConfigSaved.bind(this), configName: (_a = this.formLegacyConfigName) !== null && _a !== void 0 ? _a : this.configName, messagesBuilder: this.messagesBuilder })), this.messagesBuilder && h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this.resolveResourceID(), customContainerId: this._customContainerId, layoutFormConfig: this.layoutFormConfig })), h("div", { id: `${this._customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }))), h("ez-popup", { size: "medium", heightMode: "auto", useHeader: false, opened: this._showPopUpGridConfig, onEzClosePopup: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
|
784
786
|
}
|
785
787
|
static get is() { return "snk-simple-crud"; }
|
786
788
|
static get encapsulation() { return "scoped"; }
|
@@ -6,6 +6,7 @@ export class SnkSimpleFormConfig {
|
|
6
6
|
this.fieldsToSave = [];
|
7
7
|
this.dataUnit = undefined;
|
8
8
|
this.configName = undefined;
|
9
|
+
this.messagesBuilder = undefined;
|
9
10
|
this.avaliableFields = [];
|
10
11
|
this.selectedFields = [];
|
11
12
|
}
|
@@ -41,6 +42,10 @@ export class SnkSimpleFormConfig {
|
|
41
42
|
const fieldList = await this._formConfigFetcher.fetchSimpleFormConfig(this.configName);
|
42
43
|
return [...this.removeDuplicates(fieldList)];
|
43
44
|
}
|
45
|
+
getMessage(key, params) {
|
46
|
+
var _a;
|
47
|
+
return (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage(key, params);
|
48
|
+
}
|
44
49
|
removeDuplicates(strings) {
|
45
50
|
return strings.filter((item, index) => strings.indexOf(item) === index);
|
46
51
|
}
|
@@ -80,7 +85,7 @@ export class SnkSimpleFormConfig {
|
|
80
85
|
this.snkConfigSaved.emit();
|
81
86
|
}
|
82
87
|
render() {
|
83
|
-
return (h("ez-popup", { ref: (ref) => this.ezPopupRef = ref, heightMode: 'auto', size: 'medium', ezTitle:
|
88
|
+
return (h("ez-popup", { ref: (ref) => this.ezPopupRef = ref, heightMode: 'auto', size: 'medium', ezTitle: this.getMessage("snkSimpleFormConfig.popup.title") }, h("div", { class: 'config-container' }, h("div", { class: 'config-lists' }, h("ez-double-list", { ref: (ref) => this.ezDoubleListRef = ref, leftList: this.avaliableFields, leftTitle: this.getMessage("snkSimpleFormConfig.lists.availableFields"), rightList: this.selectedFields, rightTitle: this.getMessage("snkSimpleFormConfig.lists.selectedFields"), onEzRightListChanged: ({ detail }) => this.fieldsToSave = [...detail], entityLabel: this.getMessage("snkSimpleFormConfig.lists.entityLabel"), entityLabelPlural: this.getMessage("snkSimpleFormConfig.lists.entityLabelPlural") })), h("div", { class: 'config-actions' }, h("ez-button", { label: this.getMessage("snkSimpleFormConfig.buttons.restore"), onClick: this.handleResetConfigs.bind(this), size: 'small' }), h("ez-button", { label: this.getMessage("snkSimpleFormConfig.buttons.cancel"), onClick: this.handleCancel.bind(this), size: 'small' }), h("ez-button", { label: this.getMessage("snkSimpleFormConfig.buttons.save"), class: 'ez-button--primary', onClick: this.handleSave.bind(this), size: 'small' })))));
|
84
89
|
}
|
85
90
|
static get is() { return "snk-simple-form-config"; }
|
86
91
|
static get originalStyleUrls() {
|
@@ -131,6 +136,26 @@ export class SnkSimpleFormConfig {
|
|
131
136
|
},
|
132
137
|
"attribute": "config-name",
|
133
138
|
"reflect": false
|
139
|
+
},
|
140
|
+
"messagesBuilder": {
|
141
|
+
"type": "unknown",
|
142
|
+
"mutable": false,
|
143
|
+
"complexType": {
|
144
|
+
"original": "SnkMessageBuilder",
|
145
|
+
"resolved": "SnkMessageBuilder",
|
146
|
+
"references": {
|
147
|
+
"SnkMessageBuilder": {
|
148
|
+
"location": "import",
|
149
|
+
"path": "../../lib/message/SnkMessageBuilder"
|
150
|
+
}
|
151
|
+
}
|
152
|
+
},
|
153
|
+
"required": false,
|
154
|
+
"optional": false,
|
155
|
+
"docs": {
|
156
|
+
"tags": [],
|
157
|
+
"text": "Respons\u00E1vel por flexibilizar e padronizar o uso de mensagens nos blocos de constru\u00E7\u00E3o."
|
158
|
+
}
|
134
159
|
}
|
135
160
|
};
|
136
161
|
}
|
@@ -12,11 +12,18 @@ import UrlUtils from "../../../lib/utils/urlutils";
|
|
12
12
|
import { PrintUtils } from '../../utils/PrintUtils';
|
13
13
|
import { GraphQLRecaller } from './recaller/GraphQLRecaller';
|
14
14
|
import { ServiceBrokerRecaller } from './recaller/ServiceBrokerRecaller';
|
15
|
+
import { SnkMessageBuilder } from '../../message/SnkMessageBuilder';
|
15
16
|
export class DataFetcher {
|
16
17
|
constructor() {
|
17
18
|
this.ready = true;
|
18
19
|
this.watingRequestsById = new Map();
|
19
20
|
}
|
21
|
+
static getMessage(key, params) {
|
22
|
+
if (!this.messageBuilder) {
|
23
|
+
this.messageBuilder = new SnkMessageBuilder();
|
24
|
+
}
|
25
|
+
return this.messageBuilder.getMessage(key, params);
|
26
|
+
}
|
20
27
|
static get() {
|
21
28
|
if (!DataFetcher.instance) {
|
22
29
|
DataFetcher.instance = new DataFetcher();
|
@@ -56,11 +63,11 @@ export class DataFetcher {
|
|
56
63
|
processGraphQlErrorInfo(errors) {
|
57
64
|
var _a, _b;
|
58
65
|
const POSITION_ERROR_INFO = 0;
|
59
|
-
const errorTitle = "
|
66
|
+
const errorTitle = DataFetcher.getMessage("dataFetcher.errorDetected");
|
60
67
|
const error = errors[POSITION_ERROR_INFO];
|
61
68
|
if (error.length > 0) { //As informações do erro vem no primeiro indice de um array
|
62
69
|
const errorInfo = error[POSITION_ERROR_INFO];
|
63
|
-
const errorMessage = (errorInfo === null || errorInfo === void 0 ? void 0 : errorInfo.message) ? errorInfo === null || errorInfo === void 0 ? void 0 : errorInfo.message : "
|
70
|
+
const errorMessage = (errorInfo === null || errorInfo === void 0 ? void 0 : errorInfo.message) ? errorInfo === null || errorInfo === void 0 ? void 0 : errorInfo.message : DataFetcher.getMessage("dataFetcher.noErrorMessage");
|
64
71
|
/*
|
65
72
|
No HTML5, todos os erros de Troubleshooting são considerados alerta,
|
66
73
|
pois a comparação errorLevel == ServiceProxyConstants.LEVEL.ERROR sempre é falsa
|
@@ -77,14 +84,14 @@ export class DataFetcher {
|
|
77
84
|
}
|
78
85
|
}
|
79
86
|
else {
|
80
|
-
return new ErrorException(errorTitle, "
|
87
|
+
return new ErrorException(errorTitle, DataFetcher.getMessage("dataFetcher.noErrorInfo"));
|
81
88
|
}
|
82
89
|
}
|
83
90
|
processServiceBrokerErrorInfo(serviceBrokerResponse) {
|
84
|
-
const title = "
|
91
|
+
const title = DataFetcher.getMessage("dataFetcher.errorDetected");
|
85
92
|
let { statusMessage, tsError } = serviceBrokerResponse || {};
|
86
93
|
if (!statusMessage) {
|
87
|
-
statusMessage = "
|
94
|
+
statusMessage = DataFetcher.getMessage("dataFetcher.noErrorInfo");
|
88
95
|
}
|
89
96
|
let tsErrorCode, tsErrorLevel;
|
90
97
|
if (tsError) {
|
@@ -157,8 +164,8 @@ export class DataFetcher {
|
|
157
164
|
}
|
158
165
|
for (const id in clientEvents) {
|
159
166
|
if (!DataFetcher.hasClientEvent(id)) {
|
160
|
-
console.warn(
|
161
|
-
throw new WarningException("
|
167
|
+
console.warn(DataFetcher.getMessage("dataFetcher.clientEventNotRegisteredWarn", { id }));
|
168
|
+
throw new WarningException(DataFetcher.getMessage("dataFetcher.clientEventNotRegisteredTitle"), DataFetcher.getMessage("dataFetcher.clientEventNotRegisteredMsg", { id }));
|
162
169
|
}
|
163
170
|
const handlers = DataFetcher.clientEventsByID.get(id);
|
164
171
|
handlers.forEach(async (handler) => {
|
@@ -317,12 +324,12 @@ export class DataFetcher {
|
|
317
324
|
this.processServiceBrokerClientEvents({ clientEvents: jsonResp === null || jsonResp === void 0 ? void 0 : jsonResp.clientEvents, serviceName, payloadJson, accept, reject });
|
318
325
|
}
|
319
326
|
catch (err) {
|
320
|
-
console.warn(
|
321
|
-
reject(new ErrorException(
|
327
|
+
console.warn(DataFetcher.getMessage("dataFetcher.serviceExecutionErrorWarn", { err }));
|
328
|
+
reject(new ErrorException(DataFetcher.getMessage("dataFetcher.serviceExecutionError"), err));
|
322
329
|
}
|
323
330
|
}
|
324
331
|
else if (http.readyState == 4 && http.status != 200) {
|
325
|
-
reject(new ErrorException(
|
332
|
+
reject(new ErrorException(DataFetcher.getMessage("dataFetcher.serviceExecutionErrorWithName", { serviceName }), http.responseText));
|
326
333
|
}
|
327
334
|
DataFetcher.requestListener.forEach(listener => listener.onRequestEnd({ url: url, requestBody: payload, requestId }));
|
328
335
|
};
|
@@ -394,10 +401,10 @@ export class DataFetcher {
|
|
394
401
|
]);
|
395
402
|
if (!hasClientEvent || data === false) {
|
396
403
|
if (Object.keys(errorResponse[0].extensions).includes("SERVICE_CANCELED") || Object.keys(extensions).includes("isServiceCancelled")) {
|
397
|
-
(((_a = watingRequestsById.get(value.request.variables[value.index].queryID)) === null || _a === void 0 ? void 0 : _a.reject) || Promise.reject)(new ServiceCanceledException("
|
404
|
+
(((_a = watingRequestsById.get(value.request.variables[value.index].queryID)) === null || _a === void 0 ? void 0 : _a.reject) || Promise.reject)(new ServiceCanceledException(DataFetcher.getMessage("dataFetcher.serviceCanceled"), value.message));
|
398
405
|
}
|
399
406
|
else {
|
400
|
-
(((_b = watingRequestsById.get(value.request.variables[value.index].queryID)) === null || _b === void 0 ? void 0 : _b.reject) || Promise.reject)(new ErrorException("
|
407
|
+
(((_b = watingRequestsById.get(value.request.variables[value.index].queryID)) === null || _b === void 0 ? void 0 : _b.reject) || Promise.reject)(new ErrorException(DataFetcher.getMessage("dataFetcher.errorDetected"), value.message));
|
401
408
|
}
|
402
409
|
}
|
403
410
|
}
|
package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/helpers/DataUnitDataLoaderHelper.js
CHANGED
@@ -1,35 +1,37 @@
|
|
1
|
+
import { SnkMessageBuilder } from "../../../../../message/SnkMessageBuilder";
|
1
2
|
export async function showAskCancelPaginationPopup() {
|
2
3
|
return new Promise((resolve) => {
|
3
|
-
const
|
4
|
-
const
|
4
|
+
const messagesBuilder = new SnkMessageBuilder();
|
5
|
+
const { checkboxContainer, checkbox } = buildCheckboxContainer(messagesBuilder);
|
6
|
+
const popup = builPopup(resolve, checkbox, messagesBuilder);
|
5
7
|
const contentContainer = buildContentContainer();
|
6
|
-
contentContainer.appendChild(buildMessage());
|
7
|
-
contentContainer.appendChild(checkboxContainer);
|
8
8
|
const actionsContainer = buildActionsContainer();
|
9
|
-
|
10
|
-
|
9
|
+
contentContainer.appendChild(checkboxContainer);
|
10
|
+
contentContainer.appendChild(buildMessage(messagesBuilder));
|
11
|
+
actionsContainer.appendChild(buildContinuePaginationBtn(popup, checkbox, resolve, messagesBuilder));
|
12
|
+
actionsContainer.appendChild(buildCancelPaginationBtn(popup, resolve, messagesBuilder));
|
11
13
|
contentContainer.appendChild(actionsContainer);
|
12
14
|
popup.appendChild(contentContainer);
|
13
15
|
document.body.appendChild(popup);
|
14
16
|
});
|
15
17
|
}
|
16
|
-
function buildCheckboxContainer() {
|
18
|
+
function buildCheckboxContainer(messagesBuilder) {
|
17
19
|
const checkboxContainer = document.createElement('div');
|
18
20
|
checkboxContainer.style.marginBottom = '14px';
|
19
21
|
checkboxContainer.style.display = 'flex';
|
20
22
|
checkboxContainer.style.alignItems = 'center';
|
21
|
-
const { checkbox, checkboxLabel } = buildCheckbox();
|
23
|
+
const { checkbox, checkboxLabel } = buildCheckbox(messagesBuilder);
|
22
24
|
checkboxContainer.appendChild(checkbox);
|
23
25
|
checkboxContainer.appendChild(checkboxLabel);
|
24
26
|
return { checkboxContainer, checkbox };
|
25
27
|
}
|
26
|
-
function buildCheckbox() {
|
28
|
+
function buildCheckbox(messagesBuilder) {
|
27
29
|
const checkbox = document.createElement('input');
|
28
30
|
checkbox.type = 'checkbox';
|
29
31
|
checkbox.id = 'loadAll';
|
30
32
|
const checkboxLabel = document.createElement('label');
|
31
33
|
checkboxLabel.htmlFor = 'loadAll';
|
32
|
-
checkboxLabel.textContent =
|
34
|
+
checkboxLabel.textContent = messagesBuilder === null || messagesBuilder === void 0 ? void 0 : messagesBuilder.getMessage("dataUnitDataLoaderHelper.checkbox.loadAll");
|
33
35
|
checkboxLabel.style.marginLeft = '5px';
|
34
36
|
return { checkbox, checkboxLabel };
|
35
37
|
}
|
@@ -49,23 +51,23 @@ function buildContentContainer() {
|
|
49
51
|
contentContainer.style.fontSize = 'var(--text--medium)';
|
50
52
|
return contentContainer;
|
51
53
|
}
|
52
|
-
function buildMessage() {
|
54
|
+
function buildMessage(messagesBuilder) {
|
53
55
|
const message = document.createElement('div');
|
54
56
|
const line1 = document.createElement('p');
|
55
57
|
const line2 = document.createElement('p');
|
56
58
|
const line3 = document.createElement('p');
|
57
59
|
line3.style.fontWeight = 'var(--text-weight--large, 600)';
|
58
|
-
line1.textContent =
|
59
|
-
line2.textContent =
|
60
|
-
line3.textContent =
|
60
|
+
line1.textContent = messagesBuilder === null || messagesBuilder === void 0 ? void 0 : messagesBuilder.getMessage("dataUnitDataLoaderHelper.pagination.line1");
|
61
|
+
line2.textContent = messagesBuilder === null || messagesBuilder === void 0 ? void 0 : messagesBuilder.getMessage("dataUnitDataLoaderHelper.pagination.line2");
|
62
|
+
line3.textContent = messagesBuilder === null || messagesBuilder === void 0 ? void 0 : messagesBuilder.getMessage("dataUnitDataLoaderHelper.pagination.line3");
|
61
63
|
message.appendChild(line1);
|
62
64
|
message.appendChild(line2);
|
63
65
|
message.appendChild(line3);
|
64
66
|
return message;
|
65
67
|
}
|
66
|
-
function buildCancelPaginationBtn(popup, resolve) {
|
68
|
+
function buildCancelPaginationBtn(popup, resolve, messagesBuilder) {
|
67
69
|
const cancelPaginationBtn = document.createElement('ez-button');
|
68
|
-
cancelPaginationBtn.label =
|
70
|
+
cancelPaginationBtn.label = messagesBuilder === null || messagesBuilder === void 0 ? void 0 : messagesBuilder.getMessage("dataUnitDataLoaderHelper.buttons.cancel");
|
69
71
|
cancelPaginationBtn.size = 'medium';
|
70
72
|
cancelPaginationBtn.classList.add('ez-button--primary');
|
71
73
|
cancelPaginationBtn.onclick = () => {
|
@@ -74,9 +76,9 @@ function buildCancelPaginationBtn(popup, resolve) {
|
|
74
76
|
};
|
75
77
|
return cancelPaginationBtn;
|
76
78
|
}
|
77
|
-
function buildContinuePaginationBtn(popup, checkBox, resolve) {
|
79
|
+
function buildContinuePaginationBtn(popup, checkBox, resolve, messagesBuilder) {
|
78
80
|
const continuePaginationBtn = document.createElement('ez-button');
|
79
|
-
continuePaginationBtn.label =
|
81
|
+
continuePaginationBtn.label = messagesBuilder === null || messagesBuilder === void 0 ? void 0 : messagesBuilder.getMessage("dataUnitDataLoaderHelper.buttons.continue");
|
80
82
|
continuePaginationBtn.size = 'medium';
|
81
83
|
continuePaginationBtn.onclick = () => {
|
82
84
|
document.body.removeChild(popup);
|
@@ -84,11 +86,11 @@ function buildContinuePaginationBtn(popup, checkBox, resolve) {
|
|
84
86
|
};
|
85
87
|
return continuePaginationBtn;
|
86
88
|
}
|
87
|
-
function builPopup(resolve, checkBox) {
|
89
|
+
function builPopup(resolve, checkBox, messagesBuilder) {
|
88
90
|
const popup = document.createElement('ez-popup');
|
89
91
|
popup.opened = true;
|
90
92
|
popup.size = 'x-small';
|
91
|
-
popup.ezTitle =
|
93
|
+
popup.ezTitle = messagesBuilder === null || messagesBuilder === void 0 ? void 0 : messagesBuilder.getMessage("dataUnitDataLoaderHelper.pagination.title");
|
92
94
|
popup.heightMode = "auto";
|
93
95
|
popup.addEventListener('ezClosePopup', () => {
|
94
96
|
document.body.removeChild(popup);
|
@@ -10,7 +10,7 @@ export class SnkMessageBuilder {
|
|
10
10
|
this._currentOperation = OperationMap.CLEAN;
|
11
11
|
this._domainName = domainName;
|
12
12
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
13
|
-
this._lang = document.documentElement.lang || 'pt-BR';
|
13
|
+
this._lang = document.documentElement.lang || navigator.language || 'pt-BR';
|
14
14
|
this.loadAppMessages().then((msgs) => {
|
15
15
|
this._appMessages = msgs;
|
16
16
|
}, error => {
|
@@ -46,19 +46,39 @@ export class SnkMessageBuilder {
|
|
46
46
|
}
|
47
47
|
if (this.customMessageBuilder) {
|
48
48
|
const result = this.customMessageBuilder(key, msg, params);
|
49
|
-
msg = result.message;
|
50
|
-
params = result.params;
|
49
|
+
msg = result === null || result === void 0 ? void 0 : result.message;
|
50
|
+
params = result === null || result === void 0 ? void 0 : result.params;
|
51
51
|
}
|
52
52
|
return this.postProcess(msg, params);
|
53
53
|
}
|
54
|
+
/**
|
55
|
+
* Retorna o idioma atual configurado na aplicação.
|
56
|
+
*
|
57
|
+
* @returns {string} O código do idioma atual (por exemplo: 'pt-BR', 'en-US', 'es-ES')
|
58
|
+
*/
|
59
|
+
getLanguageApplication() {
|
60
|
+
return this._lang;
|
61
|
+
}
|
62
|
+
getParsedLanguage() {
|
63
|
+
var _a;
|
64
|
+
if (!this._lang) {
|
65
|
+
return "pt";
|
66
|
+
}
|
67
|
+
let language = (_a = this._lang) === null || _a === void 0 ? void 0 : _a.toLocaleLowerCase();
|
68
|
+
language = language.replace("_", "-");
|
69
|
+
language = language.split("-")[0];
|
70
|
+
return language;
|
71
|
+
}
|
54
72
|
getMessagesDefaults(parts) {
|
55
73
|
var _a;
|
56
74
|
switch ((_a = this._lang) === null || _a === void 0 ? void 0 : _a.toLocaleLowerCase()) {
|
57
75
|
case "en":
|
58
76
|
case "en_us":
|
77
|
+
case "en-us":
|
59
78
|
return this.resolveMessage(parts, this._messageResourceEnUS);
|
60
79
|
case "es":
|
61
80
|
case "es_es":
|
81
|
+
case "es-es":
|
62
82
|
return this.resolveMessage(parts, this._messageResourceEsES);
|
63
83
|
default:
|
64
84
|
return this.resolveMessage(parts, this._defaults);
|
@@ -120,10 +140,11 @@ export class SnkMessageBuilder {
|
|
120
140
|
}
|
121
141
|
async loadAppMessages() {
|
122
142
|
const messagesUrl = await this._application.getApplicationPath();
|
123
|
-
const
|
124
|
-
const
|
125
|
-
const
|
126
|
-
|
143
|
+
const lang = this.getParsedLanguage();
|
144
|
+
const langSuffix = (lang !== "pt") ? `-${lang}` : "";
|
145
|
+
const fileUrl = `${messagesUrl}/messages/appmessages${langSuffix}.js`;
|
146
|
+
const module = await import(/* webpackIgnore: true */ fileUrl);
|
147
|
+
return module === null || module === void 0 ? void 0 : module.default;
|
127
148
|
}
|
128
149
|
}
|
129
150
|
export var OperationMap;
|