@sankhyalabs/sankhyablocks 9.1.0-dev.12 → 9.1.0-dev.14
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-34aa43d8.js → ConfigStorage-54b9f26d.js} +12 -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-61bf3266.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 +92 -43
- package/dist/cjs/snk-application.cjs.entry.js +26 -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-5517689f.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 +9 -9
- package/dist/cjs/snk-grid.cjs.entry.js +6 -6
- package/dist/cjs/{snk-guides-viewer-29298823.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 +7 -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-grid-config/snk-grid-config.js +73 -35
- 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/configs/ConfigStorage.js +3 -0
- 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/http/data-fetcher/fetchers/grid-config-fetcher.js +9 -1
- 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-grid.msg.js +27 -26
- 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-grid.msg.js +27 -26
- 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-grid.msg.js +27 -26
- 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/ConfigStorage.js +11 -1
- 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 +20 -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-grid-config2.js +72 -34
- 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-89154c4e.js → ConfigStorage-7f782e00.js} +12 -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-d64d62d6.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 +92 -43
- package/dist/esm/snk-application.entry.js +25 -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-fbb82ed9.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 +9 -9
- package/dist/esm/snk-grid.entry.js +6 -6
- package/dist/esm/{snk-guides-viewer-9335318d.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-6444de46.entry.js +11 -0
- package/dist/sankhyablocks/p-64fed9bf.js +1 -0
- package/dist/sankhyablocks/p-6703336d.entry.js +1 -0
- package/dist/sankhyablocks/{p-412e06e9.js → p-6cf54569.js} +1 -1
- 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-b2946adb.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-5126b34e.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-fb757021.js +56 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/errorhandler/snk-error-handler.d.ts +1 -0
- package/dist/types/components/snk-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-grid-config/snk-grid-config.d.ts +7 -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 +20 -0
- package/dist/types/lib/configs/ConfigStorage.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +2 -0
- package/dist/types/lib/http/data-fetcher/fetchers/grid-config-fetcher.d.ts +3 -2
- 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-252f813c.js +0 -1934
- package/dist/components/SnkMessageBuilder.js +0 -1912
- package/dist/esm/SnkMessageBuilder-6327dfe7.js +0 -1912
- package/dist/sankhyablocks/p-02480593.entry.js +0 -1
- package/dist/sankhyablocks/p-1c69a957.entry.js +0 -1
- package/dist/sankhyablocks/p-1ea6925d.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-2d58f98e.entry.js +0 -1
- package/dist/sankhyablocks/p-2ffd4b27.entry.js +0 -1
- package/dist/sankhyablocks/p-31193a60.entry.js +0 -1
- package/dist/sankhyablocks/p-35e73c5d.js +0 -1
- package/dist/sankhyablocks/p-37b4f642.js +0 -60
- package/dist/sankhyablocks/p-4212e05b.js +0 -1
- package/dist/sankhyablocks/p-49d968e2.entry.js +0 -1
- package/dist/sankhyablocks/p-4d2ff2fb.entry.js +0 -1
- package/dist/sankhyablocks/p-60d3abf6.entry.js +0 -1
- package/dist/sankhyablocks/p-71a05822.entry.js +0 -1
- package/dist/sankhyablocks/p-79387c24.entry.js +0 -1
- package/dist/sankhyablocks/p-7ced2cf4.entry.js +0 -1
- package/dist/sankhyablocks/p-86bd4478.entry.js +0 -1
- package/dist/sankhyablocks/p-8758404f.js +0 -56
- package/dist/sankhyablocks/p-a2c6944d.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-d079567f.entry.js +0 -11
- package/dist/sankhyablocks/p-d67526b6.entry.js +0 -1
- package/dist/sankhyablocks/p-d74ed09e.entry.js +0 -1
- package/dist/sankhyablocks/p-e56eb36b.entry.js +0 -1
- package/dist/sankhyablocks/p-f442c8f6.entry.js +0 -1
- package/dist/sankhyablocks/p-fc87708a.js +0 -1
- package/dist/sankhyablocks/p-fd571197.entry.js +0 -1
@@ -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
|
}
|
@@ -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"; }
|
@@ -6,6 +6,7 @@ const FORM_COL_CONFIG_PREFIX = 'formColCfg.';
|
|
6
6
|
export class SnkLayoutFormConfig {
|
7
7
|
constructor() {
|
8
8
|
this._formConfigFetcher = new FormConfigFetcher();
|
9
|
+
this.messagesBuilder = undefined;
|
9
10
|
this.layoutType = FormLayout.CASCADE;
|
10
11
|
}
|
11
12
|
/**
|
@@ -30,8 +31,12 @@ export class SnkLayoutFormConfig {
|
|
30
31
|
toggleLayout(key) {
|
31
32
|
this.layoutType = key;
|
32
33
|
}
|
34
|
+
getMessage(key, params) {
|
35
|
+
var _a;
|
36
|
+
return (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage(key, params);
|
37
|
+
}
|
33
38
|
render() {
|
34
|
-
return (h("div", { class: "ez-flex ez-flex--column" }, h("div", { class: "ez-margin-bottom--small" }, h("ez-check", { label:
|
39
|
+
return (h("div", { class: "ez-flex ez-flex--column" }, h("div", { class: "ez-margin-bottom--small" }, h("ez-check", { label: this.getMessage('snkLayoutFormConfig.cascadeLayout.label'), class: "ez-margin-bottom--small", onEzChange: () => this.toggleLayout(FormLayout.CASCADE), value: this.layoutType === FormLayout.CASCADE }), h("snk-view-representation", { mode: FormLayout.CASCADE }), h("label", { class: "ez-label ez-margin--small ez-flex ez-text--medium" }, this.getMessage('snkLayoutFormConfig.cascadeLayout.description'))), h("div", null, h("ez-check", { label: this.getMessage('snkLayoutFormConfig.sideBySideLayout.label'), class: "ez-margin-bottom--small", onEzChange: () => this.toggleLayout(FormLayout.SIDE_BY_SIDE), value: this.layoutType === FormLayout.SIDE_BY_SIDE }), h("snk-view-representation", { mode: FormLayout.SIDE_BY_SIDE }), h("label", { class: "ez-label ez-margin--small ez-flex ez-text--medium" }, this.getMessage('snkLayoutFormConfig.sideBySideLayout.description')))));
|
35
40
|
}
|
36
41
|
static get is() { return "snk-layout-form-config"; }
|
37
42
|
static get encapsulation() { return "scoped"; }
|
@@ -45,6 +50,30 @@ export class SnkLayoutFormConfig {
|
|
45
50
|
"$": ["snk-layout-form-config.css"]
|
46
51
|
};
|
47
52
|
}
|
53
|
+
static get properties() {
|
54
|
+
return {
|
55
|
+
"messagesBuilder": {
|
56
|
+
"type": "unknown",
|
57
|
+
"mutable": false,
|
58
|
+
"complexType": {
|
59
|
+
"original": "SnkMessageBuilder",
|
60
|
+
"resolved": "SnkMessageBuilder",
|
61
|
+
"references": {
|
62
|
+
"SnkMessageBuilder": {
|
63
|
+
"location": "import",
|
64
|
+
"path": "../../lib/message/SnkMessageBuilder"
|
65
|
+
}
|
66
|
+
}
|
67
|
+
},
|
68
|
+
"required": false,
|
69
|
+
"optional": false,
|
70
|
+
"docs": {
|
71
|
+
"tags": [],
|
72
|
+
"text": ""
|
73
|
+
}
|
74
|
+
}
|
75
|
+
};
|
76
|
+
}
|
48
77
|
static get states() {
|
49
78
|
return {
|
50
79
|
"layoutType": {}
|
@@ -51,7 +51,7 @@ export class SnkPersonalizedFilter {
|
|
51
51
|
entityName: "",
|
52
52
|
fieldName: "",
|
53
53
|
description: "",
|
54
|
-
fieldLabel: "
|
54
|
+
fieldLabel: this.getMessage("snkPersonalizedFilter.info.labelDefaultValue"),
|
55
55
|
type: undefined,
|
56
56
|
expression: undefined,
|
57
57
|
operand: undefined,
|
@@ -117,7 +117,7 @@ export class SnkExpressionGroup {
|
|
117
117
|
entityName: "",
|
118
118
|
fieldName: "",
|
119
119
|
description: "",
|
120
|
-
label: "
|
120
|
+
label: this.getMessage("snkPersonalizedFilter.info.labelDefaultValue"),
|
121
121
|
type: undefined,
|
122
122
|
expression: undefined,
|
123
123
|
operand: undefined,
|
@@ -142,7 +142,7 @@ export class SnkExpressionGroup {
|
|
142
142
|
entityName: "",
|
143
143
|
fieldName: "",
|
144
144
|
description: "",
|
145
|
-
label: "
|
145
|
+
label: this.getMessage("snkPersonalizedFilter.info.labelDefaultValue"),
|
146
146
|
type: undefined,
|
147
147
|
expression: undefined,
|
148
148
|
operand: undefined,
|
@@ -229,7 +229,7 @@ export class SnkExpressionGroup {
|
|
229
229
|
}
|
230
230
|
render() {
|
231
231
|
const canAddGroup = this.canAddGroup();
|
232
|
-
return (h(Host, null, h("div", { class: !this.isFirstLevel() && this._showDashes ? 'dashes' : 'hidden', style: this.buildGroupStyle() }), h("div", { class: !this.isFirstLevel() && this._showDashes ? 'horizontal-dashes' : 'hidden' }), h("div", { class: 'ez-flex ez-flex--align-items-center' }, h("div", { class: 'snk-expression-group__container-condition ez-flex ez-flex-item--align-center ez-flex--align-items-center', "data-condition": this._conditionOperator, title: this.getTooltipMessageForOperator() }, h("label", { class: "ez-label ez-padding-right--medium ez-padding-left--medium ez-title--primary" }, this.getMessage("snkPersonalizedFilter.info.condition")), h("div", null, h("ez-combo-box", Object.assign({ class: "snk-expression-group__container-option", canShowError: false, mode: "slim", suppressEmptyOption: true, enabled: this.canChangeGroupCondition(), value: this._conditionOperator, onEzChange: (evt) => this.handleConditionOperatorChange(evt.detail.value) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `comboBoxConditions_level_${this.getDataGroupLevel()}` }), h("option", { value: FilterGroupCondition.AND }, "
|
232
|
+
return (h(Host, null, h("div", { class: !this.isFirstLevel() && this._showDashes ? 'dashes' : 'hidden', style: this.buildGroupStyle() }), h("div", { class: !this.isFirstLevel() && this._showDashes ? 'horizontal-dashes' : 'hidden' }), h("div", { class: 'ez-flex ez-flex--align-items-center' }, h("div", { class: 'snk-expression-group__container-condition ez-flex ez-flex-item--align-center ez-flex--align-items-center', "data-condition": this._conditionOperator, title: this.getTooltipMessageForOperator() }, h("label", { class: "ez-label ez-padding-right--medium ez-padding-left--medium ez-title--primary" }, this.getMessage("snkPersonalizedFilter.info.condition")), h("div", null, h("ez-combo-box", Object.assign({ class: "snk-expression-group__container-option", canShowError: false, mode: "slim", suppressEmptyOption: true, enabled: this.canChangeGroupCondition(), value: this._conditionOperator, onEzChange: (evt) => this.handleConditionOperatorChange(evt.detail.value) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `comboBoxConditions_level_${this.getDataGroupLevel()}` }), h("option", { value: FilterGroupCondition.AND }, this.getMessage("snkPersonalizedFilter.info.conditionAnd")), h("option", { value: FilterGroupCondition.OR }, this.getMessage("snkPersonalizedFilter.info.conditionOr"))))), h("ez-button", { class: "ez-padding-right--medium ez-padding-left--medium", mode: "icon", iconName: "plus", size: "small", enabled: this.canAddExpression, title: this.getMessageAddTooltip(), onClick: () => this.handleAddExpression() }), h("ez-button", { label: this.getMessage("snkPersonalizedFilter.info.addGroup"), size: "small", enabled: canAddGroup, title: !canAddGroup ? this.getMessage('snkPersonalizedFilter.info.labelDisabledAddGroupButton', { LIMIT_GROUP_LEVEL: this.LIMIT_GROUP_LEVEL + 1 }) : '', onClick: () => this.handleAddGroup() }, h("ez-icon", { class: "ez-padding-right--small", slot: "leftIcon", iconName: "plus" })), !this.isFirstLevel() && h("ez-button", { title: this.getMessage("snkPersonalizedFilter.info.labelDeleteExpression"), class: "ez-padding-left--medium", mode: "icon", iconName: "delete", size: "small", onClick: (evt) => this.confirmRemoveGroup(evt) })), h("div", { class: "ez-padding-top--small snk-expression-group__container-expression" }, h("div", { class: "ez-padding-top--small" }, this.renderExpressionItems())), h("div", { class: "ez-padding-top--small snk-expression-group__container-expression" }, h("div", { class: "ez-padding-top--small" }, this.renderGroups()))));
|
233
233
|
}
|
234
234
|
static get is() { return "snk-expression-group"; }
|
235
235
|
static get encapsulation() { return "scoped"; }
|
@@ -1,19 +1,19 @@
|
|
1
1
|
import { UserInterface } from '@sankhyalabs/core';
|
2
2
|
const defaultsOperand = [
|
3
|
-
{ label: "
|
4
|
-
{ label: "
|
5
|
-
{ label: "
|
6
|
-
{ label: "
|
7
|
-
{ label: "
|
8
|
-
{ label: "
|
9
|
-
{ label: "
|
10
|
-
{ label: "
|
3
|
+
{ label: "snkPersonalizedFilter.operands.equal", value: "EQUAL" },
|
4
|
+
{ label: "snkPersonalizedFilter.operands.different", value: "DIFFERENT" },
|
5
|
+
{ label: "snkPersonalizedFilter.operands.like", value: "LIKE" },
|
6
|
+
{ label: "snkPersonalizedFilter.operands.in", value: "IN" },
|
7
|
+
{ label: "snkPersonalizedFilter.operands.startWith", value: "START_WITH" },
|
8
|
+
{ label: "snkPersonalizedFilter.operands.finishedWith", value: "FINISHED_WITH" },
|
9
|
+
{ label: "snkPersonalizedFilter.operands.null", value: "NULL" },
|
10
|
+
{ label: "snkPersonalizedFilter.operands.notNull", value: "NOT_NULL" },
|
11
11
|
];
|
12
12
|
export const FilterOperandDefault = defaultsOperand.concat([
|
13
|
-
{ label: "
|
14
|
-
{ label: "
|
15
|
-
{ label: "
|
16
|
-
{ label: "
|
13
|
+
{ label: "snkPersonalizedFilter.operands.larger", value: "LARGER" },
|
14
|
+
{ label: "snkPersonalizedFilter.operands.largerEqual", value: "LARGER_EQUAL" },
|
15
|
+
{ label: "snkPersonalizedFilter.operands.smaller", value: "SMALLER" },
|
16
|
+
{ label: "snkPersonalizedFilter.operands.smallerEqual", value: "SMALLER_EQUAL" }
|
17
17
|
]);
|
18
18
|
export const FilterOperandTypeTextSearch = defaultsOperand;
|
19
19
|
export const FIELD_TYPE_SEARCH_AND_TEXT = [
|
@@ -155,12 +155,15 @@ export class SnkExpressionItem {
|
|
155
155
|
buildOptionsOperator() {
|
156
156
|
var _a;
|
157
157
|
if (FIELD_TYPE_SEARCH_AND_TEXT.includes((_a = this._fieldSelected) === null || _a === void 0 ? void 0 : _a.userInterface)) {
|
158
|
-
return this.filterOperandTypeTextSearch;
|
158
|
+
return this.translateOperandOptions(this.filterOperandTypeTextSearch);
|
159
159
|
}
|
160
160
|
else {
|
161
|
-
return this.filterOperandDefault;
|
161
|
+
return this.translateOperandOptions(this.filterOperandDefault);
|
162
162
|
}
|
163
163
|
}
|
164
|
+
translateOperandOptions(options) {
|
165
|
+
return options.map(option => ({ label: this.getMessage(option.label), value: option.value }));
|
166
|
+
}
|
164
167
|
handleChangeOperator(optionSelected) {
|
165
168
|
this.checkOptionIsNull(optionSelected);
|
166
169
|
this.setValueExpression("operand", optionSelected);
|
@@ -256,9 +259,7 @@ export class SnkExpressionItem {
|
|
256
259
|
}
|
257
260
|
render() {
|
258
261
|
var _a;
|
259
|
-
return (h(Host, null, h("div", { class: "dashes" }), h("div", { class: "box" }, h("div", { class: "box__container" }, h("div", { class: "box__container--input-filter" }, h("ez-filter-input", Object.assign({ ref: ref => this._elFilterInput = ref, value: (_a = this._fieldSelected) === null || _a === void 0 ? void 0 : _a.path, label: this.getMessage("snkPersonalizedFilter.info.labelSearchField"), canShowError: false, onEzChange: (evt) => this.handleChangeFilterInput(evt), onFocus: () => this.handleFocus() }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `expressionFilterInput_${this.expression.fieldName || this.DEFAULT_FIELD_NAME}` })), h("snk-filter-field-search", { ref: ref => this._elFilterFieldSearch = ref, searchable: false, onEzSelectFilterItem: (ev) => this.handleSelectItem(ev.detail), fieldsDataSource: this._dataSourceFetcher })), h("div", { class: "box__container--input-operator" }, h("ez-combo-box", Object.assign({ label: this.getMessage("snkPersonalizedFilter.info.labelOperator"), value: this.expression.operand, canShowError: false, options: this.buildOptionsOperator(), onEzChange: (evt) => { var _a; return this.handleChangeOperator((_a = evt.detail) === null || _a === void 0 ? void 0 : _a.value); }, suppressEmptyOption: true }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `comboBoxOperand_${this.expression.fieldName || this.DEFAULT_FIELD_NAME}` }))), h("div", { class: "box__container--input-value" }, !this._fieldSelected ?
|
260
|
-
h("ez-number-input", { label: "Valor", canShowError: false, enabled: (!this._showValueVariable && !this._optionNotNull) }) :
|
261
|
-
this.buildFieldByType()), h("div", { class: "box__container--input-value-variable" }, !this._optionNotNull &&
|
262
|
+
return (h(Host, null, h("div", { class: "dashes" }), h("div", { class: "box" }, h("div", { class: "box__container" }, h("div", { class: "box__container--input-filter" }, h("ez-filter-input", Object.assign({ ref: ref => this._elFilterInput = ref, value: (_a = this._fieldSelected) === null || _a === void 0 ? void 0 : _a.path, label: this.getMessage("snkPersonalizedFilter.info.labelSearchField"), canShowError: false, onEzChange: (evt) => this.handleChangeFilterInput(evt), onFocus: () => this.handleFocus() }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `expressionFilterInput_${this.expression.fieldName || this.DEFAULT_FIELD_NAME}` })), h("snk-filter-field-search", { ref: ref => this._elFilterFieldSearch = ref, searchable: false, onEzSelectFilterItem: (ev) => this.handleSelectItem(ev.detail), fieldsDataSource: this._dataSourceFetcher })), h("div", { class: "box__container--input-operator" }, h("ez-combo-box", Object.assign({ label: this.getMessage("snkPersonalizedFilter.info.labelOperator"), value: this.expression.operand, canShowError: false, options: this.buildOptionsOperator(), onEzChange: (evt) => { var _a; return this.handleChangeOperator((_a = evt.detail) === null || _a === void 0 ? void 0 : _a.value); }, suppressEmptyOption: true }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `comboBoxOperand_${this.expression.fieldName || this.DEFAULT_FIELD_NAME}` }))), h("div", { class: "box__container--input-value" }, !this._fieldSelected ? (h("ez-number-input", { label: this.getMessage('snkPersonalizedFilter.info.labelDefaultValue'), canShowError: false, enabled: !this._showValueVariable && !this._optionNotNull })) : (this.buildFieldByType())), h("div", { class: "box__container--input-value-variable" }, !this._optionNotNull &&
|
262
263
|
h("ez-tooltip", { message: this.getMessage("snkPersonalizedFilter.info.checkVariableDisabled"), active: this.isDefaultFilter }, h("ez-check", { ref: ref => this._elValueVariable = ref, value: this.expression.paramVariable, label: this.getMessage("snkPersonalizedFilter.info.labelValueVarible"), mode: CheckMode.SWITCH, onEzChange: (evt) => this.handleChangeValueVariable(evt.detail), enabled: !this.isDefaultFilter })), (this._showValueVariable && !this._optionNotNull) &&
|
263
264
|
h("ez-icon", Object.assign({ class: "box__container--input-value-variable--icon", size: "large", iconName: "settings-inverted" }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: 'iconConfig' }, { title: this.getMessage("snkPersonalizedFilter.info.titleTooltip"), onClick: () => this.openSnkFilterParamConfig() })), h("snk-filter-param-config", { ref: (el) => this._elFilterParamConfigRef = el, messagesBuilder: this.messagesBuilder })), h("div", { class: "box__container--button-delete" }, h("div", { class: "box__container--button-delete--icon" }, h("ez-button", { mode: "icon", iconName: "delete", enabled: this.canRemove, label: this.getMessage("snkPersonalizedFilter.info.labelDeleteItem"), onClick: (evt) => this.confirmRemove(evt) })))))));
|
264
265
|
}
|
@@ -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
|
}
|