@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-KB-86600.1 → 0.0.0-bugfix-dev-KB-86904.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{ClientSideExporterProvider-a2753c93.js → ClientSideExporterProvider-0ce2bcd9.js} +2 -2
- package/dist/cjs/{ConfigStorage-df09fb78.js → ConfigStorage-48ba265b.js} +45 -17
- package/dist/cjs/FormConfigHelper-c664dbae.js +260 -0
- package/dist/cjs/{PersonalizedFilterUtils-0184ffbb.js → PersonalizedFilterUtils-7259cf65.js} +1 -1
- package/dist/cjs/{SnkFormConfigManager-45a8d7b7.js → SnkFormConfigManager-aa4631bd.js} +3 -4
- package/dist/cjs/{SnkMessageBuilder-aecd7c18.js → SnkMessageBuilder-e3b7850b.js} +32 -6
- package/dist/cjs/config-header.cjs.entry.js +79 -0
- package/dist/cjs/configs-button.cjs.entry.js +61 -0
- package/dist/cjs/{constants-77c1b8bd.js → constants-6d82e405.js} +8 -38
- package/dist/cjs/default-filters-a09bf82b.js +8 -0
- package/dist/cjs/field-config_2.cjs.entry.js +324 -0
- package/dist/cjs/fields-layout.cjs.entry.js +341 -0
- package/dist/cjs/fields-selector.cjs.entry.js +74 -0
- package/dist/cjs/{filter-type.enum-b14ce507.js → filter-type.enum-2bb46d2a.js} +1 -0
- package/dist/cjs/guides-configurator.cjs.entry.js +164 -0
- package/dist/cjs/{index-ab1cfb44.js → index-0ad2baeb.js} +1 -1
- package/dist/cjs/{index-f9e81701.js → index-1cf293c1.js} +34 -12
- package/dist/cjs/{index-c5771aba.js → index-62760a9c.js} +5 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/pesquisa-grid_2.cjs.entry.js +3 -3
- package/dist/cjs/sankhyablocks.cjs.js +2 -2
- package/dist/cjs/{snk-actions-button_7.cjs.entry.js → snk-actions-button_8.cjs.entry.js} +64 -3
- package/dist/cjs/snk-actions-form.cjs.entry.js +1 -1
- package/dist/cjs/snk-application.cjs.entry.js +8 -8
- package/dist/cjs/snk-attach.cjs.entry.js +47 -18
- package/dist/cjs/snk-client-confirm.cjs.entry.js +1 -1
- package/dist/cjs/snk-configurator.cjs.entry.js +2 -2
- package/dist/cjs/snk-crud.cjs.entry.js +6 -30
- package/dist/cjs/snk-custom-slot-elements.cjs.entry.js +1 -1
- package/dist/cjs/snk-data-exporter.cjs.entry.js +4 -4
- package/dist/cjs/{snk-data-unit-ebfdb9ba.js → snk-data-unit-3684c96e.js} +2 -2
- package/dist/cjs/snk-data-unit.cjs.entry.js +3 -3
- package/dist/cjs/snk-default-filter.cjs.entry.js +77 -0
- package/dist/cjs/snk-detail-view.cjs.entry.js +62 -10
- package/dist/cjs/snk-entity-list.cjs.entry.js +1 -1
- package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +1 -1
- package/dist/cjs/snk-expression-group_2.cjs.entry.js +10 -8
- package/dist/cjs/snk-filter-advanced-mode_2.cjs.entry.js +5 -4
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +83 -29
- package/dist/cjs/snk-filter-binary-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-checkbox-list.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-detail.cjs.entry.js +3 -3
- package/dist/cjs/snk-filter-field-search_2.cjs.entry.js +3 -3
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
- package/dist/cjs/snk-filter-multi-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-number.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-period.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-search.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-text.cjs.entry.js +1 -1
- package/dist/cjs/snk-form-summary.cjs.entry.js +1 -1
- package/dist/cjs/snk-form-view.cjs.entry.js +20 -8
- package/dist/cjs/snk-form_2.cjs.entry.js +433 -0
- package/dist/cjs/snk-grid.cjs.entry.js +30 -30
- package/dist/cjs/{snk-guides-viewer-401c4854.js → snk-guides-viewer-edc0a00a.js} +39 -27
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +9 -8
- package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +1 -1
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +53 -18
- package/dist/cjs/snk-pesquisa.cjs.entry.js +9 -3
- package/dist/cjs/snk-print-selector.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-bar.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-crud.cjs.entry.js +79 -91
- package/dist/cjs/snk-taskbar.cjs.entry.js +9 -5
- package/dist/cjs/sortable.esm-9a110bb7.js +2668 -0
- package/dist/cjs/{taskbar-elements-21f0370c.js → taskbar-elements-3b74cd21.js} +10 -2
- package/dist/cjs/{field-search-68e34bf4.js → taskbar-processor-2fba34a8.js} +0 -35
- package/dist/cjs/teste-pesquisa.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +9 -14
- package/dist/collection/components/snk-application/snk-application.js +4 -4
- package/dist/collection/components/snk-attach/snk-attach.js +27 -1
- package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js +17 -13
- package/dist/collection/components/snk-crud/snk-crud.js +21 -45
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +58 -4
- package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +54 -7
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +36 -40
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +80 -12
- package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-default-filter/snk-default-filter.css +34 -0
- package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-default-filter/snk-default-filter.js +142 -0
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +1 -0
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +24 -15
- package/dist/collection/components/snk-filter-bar/types/default-filters.js +6 -0
- package/dist/collection/components/snk-filter-bar/types/filter-type.enum.js +1 -0
- package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js +4 -4
- package/dist/collection/components/snk-form-config/FormConfigHelper.js +245 -0
- package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +4 -5
- package/dist/collection/components/snk-form-config/config-header/config-header.css +18 -0
- package/dist/collection/components/snk-form-config/config-header/config-header.js +236 -0
- package/dist/collection/components/snk-form-config/config-header/configs-button/configs-button.css +41 -0
- package/dist/collection/components/snk-form-config/config-header/configs-button/configs-button.js +170 -0
- package/dist/collection/components/snk-form-config/field-item/field-config/field-config.css +21 -0
- package/dist/collection/components/snk-form-config/field-item/field-config/field-config.js +408 -0
- package/dist/collection/components/snk-form-config/field-item/field-item.css +108 -0
- package/dist/collection/components/snk-form-config/field-item/field-item.js +206 -0
- package/dist/collection/components/snk-form-config/fields-layout/fields-layout.css +133 -0
- package/dist/collection/components/snk-form-config/fields-layout/fields-layout.js +578 -0
- package/dist/collection/components/snk-form-config/fields-selector/fields-selector.css +38 -0
- package/dist/collection/components/snk-form-config/fields-selector/fields-selector.js +146 -0
- package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.css +132 -0
- package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.js +317 -0
- package/dist/collection/components/snk-form-config/snk-form-config.css +16 -229
- package/dist/collection/components/snk-form-config/snk-form-config.js +288 -980
- package/dist/collection/components/snk-grid/snk-grid.css +1 -0
- package/dist/collection/components/snk-grid/snk-grid.js +64 -45
- package/dist/collection/components/snk-personalized-filter/interfaces/index.js +5 -0
- package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +67 -13
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.css +3 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.js +20 -1
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.js +22 -3
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-assistent-mode/snk-filter-assistent-mode.js +20 -1
- package/dist/collection/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.js +1 -1
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +9 -2
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +75 -85
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +8 -0
- package/dist/collection/components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button.css +0 -0
- package/dist/collection/components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button.js +220 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +28 -2
- package/dist/collection/lib/configs/ConfigStorage.js +16 -8
- package/dist/collection/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.js +29 -9
- package/dist/collection/lib/message/resources/snk-crud.msg.js +1 -1
- package/dist/collection/lib/message/resources/snk-filter-bar.msg.js +6 -0
- package/dist/collection/lib/message/resources/snk-form.msg.js +16 -2
- package/dist/collection/lib/message/resources/snk-grid.msg.js +1 -1
- package/dist/collection/lib/message/resources/snk-personalized-filter.msg.js +6 -1
- package/dist/collection/lib/message/resources/snk-simple-crud.msg.js +2 -1
- package/dist/collection/lib/utils/constants.js +7 -1
- package/dist/components/ConfigStorage.js +45 -17
- package/dist/components/ContinuousInsertUtils.js +2 -33
- package/dist/components/PersonalizedFilterUtils.js +6 -1
- package/dist/components/SnkFormConfigManager.js +2 -3
- package/dist/components/SnkMessageBuilder.js +32 -6
- package/dist/components/{snk-tab-config.d.ts → config-header.d.ts} +4 -4
- package/dist/components/config-header.js +6 -0
- package/dist/components/config-header2.js +103 -0
- package/dist/components/configs-button.d.ts +11 -0
- package/dist/components/configs-button.js +6 -0
- package/dist/components/configs-button2.js +76 -0
- package/dist/components/constants.js +8 -34
- package/dist/components/field-config.d.ts +11 -0
- package/dist/components/field-config.js +6 -0
- package/dist/components/field-config2.js +525 -0
- package/dist/components/field-item.d.ts +11 -0
- package/dist/components/field-item.js +6 -0
- package/dist/components/field-item2.js +93 -0
- package/dist/components/fields-layout.d.ts +11 -0
- package/dist/components/fields-layout.js +6 -0
- package/dist/components/fields-layout2.js +370 -0
- package/dist/components/{snk-field-config.d.ts → fields-selector.d.ts} +4 -4
- package/dist/components/fields-selector.js +6 -0
- package/dist/components/fields-selector2.js +98 -0
- package/dist/components/guides-configurator.d.ts +11 -0
- package/dist/components/guides-configurator.js +6 -0
- package/dist/components/guides-configurator2.js +182 -0
- package/dist/components/index.d.ts +9 -3
- package/dist/components/index.js +9 -3
- package/dist/components/pesquisa-grid2.js +1 -1
- package/dist/components/snk-application2.js +5 -5
- package/dist/components/snk-attach2.js +77 -42
- package/dist/components/snk-crud.js +65 -59
- package/dist/components/{snk-config-options.d.ts → snk-default-filter.d.ts} +4 -4
- package/dist/components/snk-default-filter.js +6 -0
- package/dist/components/snk-default-filter2.js +97 -0
- package/dist/components/snk-detail-view2.js +168 -68
- package/dist/components/snk-expression-group2.js +4 -2
- package/dist/components/snk-expression-item2.js +5 -3
- package/dist/components/snk-filter-assistent-mode2.js +4 -2
- package/dist/components/snk-filter-bar2.js +29 -20
- package/dist/components/snk-filter-modal-item2.js +1 -0
- package/dist/components/snk-filter-modal.js +59 -8
- package/dist/components/snk-form-config2.js +253 -953
- package/dist/components/snk-form-view2.js +22 -8
- package/dist/components/snk-form.js +33 -9
- package/dist/components/snk-grid2.js +67 -60
- package/dist/components/snk-personalized-filter2.js +50 -14
- package/dist/components/snk-pesquisa2.js +9 -2
- package/dist/components/snk-simple-crud2.js +104 -109
- package/dist/components/snk-taskbar2.js +29 -10
- package/dist/components/sortable.esm.js +2666 -0
- package/dist/components/taskbar-split-button.d.ts +11 -0
- package/dist/components/taskbar-split-button.js +6 -0
- package/dist/components/taskbar-split-button2.js +87 -0
- package/dist/esm/{ClientSideExporterProvider-b3871edb.js → ClientSideExporterProvider-3ed744fd.js} +2 -2
- package/dist/esm/{ConfigStorage-71e6766f.js → ConfigStorage-79b9e180.js} +45 -17
- package/dist/esm/FormConfigHelper-49fe72ca.js +248 -0
- package/dist/esm/{PersonalizedFilterUtils-e2b38ef7.js → PersonalizedFilterUtils-2db38ff2.js} +1 -1
- package/dist/esm/{SnkFormConfigManager-be490a33.js → SnkFormConfigManager-b4b93298.js} +3 -4
- package/dist/esm/{SnkMessageBuilder-12f5fe1a.js → SnkMessageBuilder-9c269caf.js} +32 -6
- package/dist/esm/config-header.entry.js +75 -0
- package/dist/esm/configs-button.entry.js +57 -0
- package/dist/esm/{constants-7db1128a.js → constants-7b422de0.js} +8 -34
- package/dist/esm/default-filters-50105e43.js +8 -0
- package/dist/esm/field-config_2.entry.js +319 -0
- package/dist/esm/fields-layout.entry.js +337 -0
- package/dist/esm/fields-selector.entry.js +70 -0
- package/dist/esm/{filter-type.enum-a80c1b6b.js → filter-type.enum-f6a8fe23.js} +1 -0
- package/dist/esm/guides-configurator.entry.js +160 -0
- package/dist/esm/{index-a7d3d3f1.js → index-479e1293.js} +34 -12
- package/dist/esm/{index-ae591a44.js → index-8acbae97.js} +6 -1
- package/dist/esm/{index-c57e49af.js → index-b72af127.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/pesquisa-grid_2.entry.js +3 -3
- package/dist/esm/sankhyablocks.js +3 -3
- package/dist/esm/{snk-actions-button_7.entry.js → snk-actions-button_8.entry.js} +64 -4
- package/dist/esm/snk-actions-form.entry.js +1 -1
- package/dist/esm/snk-application.entry.js +8 -8
- package/dist/esm/snk-attach.entry.js +47 -18
- package/dist/esm/snk-client-confirm.entry.js +1 -1
- package/dist/esm/snk-configurator.entry.js +2 -2
- package/dist/esm/snk-crud.entry.js +7 -31
- package/dist/esm/snk-custom-slot-elements.entry.js +1 -1
- package/dist/esm/snk-data-exporter.entry.js +4 -4
- package/dist/esm/{snk-data-unit-03654813.js → snk-data-unit-027bca56.js} +2 -2
- package/dist/esm/snk-data-unit.entry.js +3 -3
- package/dist/esm/snk-default-filter.entry.js +73 -0
- package/dist/esm/snk-detail-view.entry.js +63 -11
- package/dist/esm/snk-entity-list.entry.js +1 -1
- package/dist/esm/snk-exporter-email-sender.entry.js +1 -1
- package/dist/esm/snk-expression-group_2.entry.js +10 -8
- package/dist/esm/snk-filter-advanced-mode_2.entry.js +5 -4
- package/dist/esm/snk-filter-bar_4.entry.js +83 -29
- package/dist/esm/snk-filter-binary-select.entry.js +1 -1
- package/dist/esm/snk-filter-checkbox-list.entry.js +1 -1
- package/dist/esm/snk-filter-detail.entry.js +3 -3
- package/dist/esm/snk-filter-field-search_2.entry.js +3 -3
- package/dist/esm/snk-filter-modal-item.entry.js +3 -3
- package/dist/esm/snk-filter-multi-select.entry.js +1 -1
- package/dist/esm/snk-filter-number.entry.js +1 -1
- package/dist/esm/snk-filter-period.entry.js +1 -1
- package/dist/esm/snk-filter-search.entry.js +1 -1
- package/dist/esm/snk-filter-text.entry.js +1 -1
- package/dist/esm/snk-form-summary.entry.js +1 -1
- package/dist/esm/snk-form-view.entry.js +20 -8
- package/dist/esm/snk-form_2.entry.js +428 -0
- package/dist/esm/snk-grid.entry.js +28 -28
- package/dist/esm/{snk-guides-viewer-e17ff4ec.js → snk-guides-viewer-32f3d3ab.js} +39 -27
- package/dist/esm/snk-guides-viewer.entry.js +9 -8
- package/dist/esm/snk-personalized-filter-editor.entry.js +1 -1
- package/dist/esm/snk-personalized-filter.entry.js +53 -18
- package/dist/esm/snk-pesquisa.entry.js +9 -3
- package/dist/esm/snk-print-selector.entry.js +1 -1
- package/dist/esm/snk-simple-bar.entry.js +1 -1
- package/dist/esm/snk-simple-crud.entry.js +80 -92
- package/dist/esm/snk-taskbar.entry.js +9 -5
- package/dist/esm/sortable.esm-842f85a3.js +2666 -0
- package/dist/esm/{taskbar-elements-08cf25e8.js → taskbar-elements-171476d4.js} +10 -2
- package/dist/esm/{field-search-f8b1d91e.js → taskbar-processor-3436124c.js} +1 -34
- package/dist/esm/teste-pesquisa.entry.js +1 -1
- package/dist/sankhyablocks/p-0024d3fd.entry.js +1 -0
- package/dist/sankhyablocks/{p-2c08fa3e.entry.js → p-09e60995.entry.js} +3 -3
- package/dist/sankhyablocks/p-0cb295c1.entry.js +1 -0
- package/dist/sankhyablocks/p-11f099ea.entry.js +1 -0
- package/dist/sankhyablocks/p-1456d7cb.entry.js +1 -0
- package/dist/sankhyablocks/{p-9531fd46.entry.js → p-180716b2.entry.js} +1 -1
- package/dist/sankhyablocks/p-19156e59.entry.js +1 -0
- package/dist/sankhyablocks/p-1a0caadb.js +1 -0
- package/dist/sankhyablocks/p-21107f0d.entry.js +1 -0
- package/dist/sankhyablocks/{p-118e769b.entry.js → p-27482793.entry.js} +1 -1
- package/dist/sankhyablocks/{p-f4d5bb7f.js → p-2bde486e.js} +1 -1
- package/dist/sankhyablocks/{p-26b0ce3e.entry.js → p-2fdac5e6.entry.js} +1 -1
- package/dist/sankhyablocks/p-349d1968.entry.js +1 -0
- package/dist/sankhyablocks/p-35e73c5d.js +1 -0
- package/dist/sankhyablocks/{p-89c92727.entry.js → p-398cdd67.entry.js} +1 -1
- package/dist/sankhyablocks/{p-6a0c8ce0.entry.js → p-3a48bff3.entry.js} +1 -1
- package/dist/sankhyablocks/{p-434817f0.entry.js → p-3d41f5a8.entry.js} +1 -1
- package/dist/sankhyablocks/p-3f24c9b2.js +1 -0
- package/dist/sankhyablocks/{p-8002dcd0.entry.js → p-471b34f4.entry.js} +1 -1
- package/dist/sankhyablocks/{p-7e2ded86.entry.js → p-49d968e2.entry.js} +1 -1
- package/dist/sankhyablocks/p-4d2ff2fb.entry.js +1 -0
- package/dist/sankhyablocks/p-51833248.js +7 -0
- package/dist/sankhyablocks/p-60dd1d27.entry.js +1 -0
- package/dist/sankhyablocks/p-6416975c.js +56 -0
- package/dist/sankhyablocks/{p-ad07f0c5.entry.js → p-65c5d430.entry.js} +1 -1
- package/dist/sankhyablocks/{p-21a81901.entry.js → p-667cab42.entry.js} +1 -1
- package/dist/sankhyablocks/p-67d6d0c8.entry.js +1 -0
- package/dist/sankhyablocks/p-6a4b21dd.js +1 -0
- package/dist/sankhyablocks/p-71a05822.entry.js +1 -0
- package/dist/sankhyablocks/p-72c8c847.entry.js +1 -0
- package/dist/sankhyablocks/{p-ac8d1cd6.entry.js → p-7345782c.entry.js} +1 -1
- package/dist/sankhyablocks/{p-885802c3.js → p-763b04fa.js} +1 -1
- package/dist/sankhyablocks/p-7de79adf.js +1 -0
- package/dist/sankhyablocks/p-7e250432.entry.js +1 -0
- package/dist/sankhyablocks/{p-47178038.entry.js → p-83c100f2.entry.js} +1 -1
- package/dist/sankhyablocks/p-84345e7a.js +1 -0
- package/dist/sankhyablocks/p-86bd4478.entry.js +1 -0
- package/dist/sankhyablocks/p-9019a32f.js +1 -0
- package/dist/sankhyablocks/{p-54a5d52a.entry.js → p-90805683.entry.js} +1 -1
- package/dist/sankhyablocks/{p-c2e468c9.entry.js → p-91a9abb6.entry.js} +1 -1
- package/dist/sankhyablocks/p-9751c42f.entry.js +1 -0
- package/dist/sankhyablocks/{p-057fad05.js → p-988afe78.js} +1 -1
- package/dist/sankhyablocks/{p-16a1dd18.entry.js → p-9a63f3f7.entry.js} +1 -1
- package/dist/sankhyablocks/{p-90684a75.entry.js → p-9ad3557c.entry.js} +1 -1
- package/dist/sankhyablocks/{p-b6200d32.entry.js → p-9fd87bfd.entry.js} +1 -1
- package/dist/sankhyablocks/p-a06bf7b9.entry.js +1 -0
- package/dist/sankhyablocks/{p-33718dfc.entry.js → p-a227b650.entry.js} +1 -1
- package/dist/sankhyablocks/{p-5e9fbd76.js → p-a349689a.js} +1 -1
- package/dist/sankhyablocks/p-a5bb2f93.entry.js +1 -0
- package/dist/sankhyablocks/{p-ebdb9d89.js → p-a6513fcb.js} +1 -1
- package/dist/sankhyablocks/{p-8c235d4c.entry.js → p-a76e6d51.entry.js} +1 -1
- package/dist/sankhyablocks/p-b568c1d4.js +1 -0
- package/dist/sankhyablocks/p-bd665460.entry.js +1 -0
- package/dist/sankhyablocks/p-c3324d79.entry.js +1 -0
- package/dist/sankhyablocks/{p-bf2acf72.entry.js → p-c6a8a8bc.entry.js} +1 -1
- package/dist/sankhyablocks/{p-165cde3b.entry.js → p-c926cf6b.entry.js} +1 -1
- package/dist/sankhyablocks/p-cfd0a4c6.entry.js +1 -0
- package/dist/sankhyablocks/{p-79f823f3.entry.js → p-d67526b6.entry.js} +1 -1
- package/dist/sankhyablocks/{p-d2d301a6.js → p-d8d8169b.js} +1 -1
- package/dist/sankhyablocks/{p-5f157b09.entry.js → p-dff65083.entry.js} +1 -1
- package/dist/sankhyablocks/{p-4a93daef.entry.js → p-e3521eae.entry.js} +1 -1
- package/dist/sankhyablocks/p-e7cccc45.entry.js +1 -0
- package/dist/sankhyablocks/p-fc0b609e.js +1 -0
- package/dist/sankhyablocks/p-ff7060bc.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-attach/snk-attach.d.ts +1 -0
- package/dist/types/components/snk-crud/snk-crud.d.ts +4 -7
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +12 -0
- package/dist/types/components/snk-crud/subcomponents/snk-form-view.d.ts +11 -1
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +6 -6
- package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +16 -4
- package/dist/types/components/snk-filter-bar/filter-modal/subcomponents/snk-default-filter/snk-default-filter.d.ts +27 -0
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +4 -3
- package/dist/types/components/snk-filter-bar/types/default-filters.d.ts +5 -0
- package/dist/types/components/snk-filter-bar/types/filter-type.enum.d.ts +2 -1
- package/dist/types/components/snk-filter-bar/utils/SnkFilterModalFactory.d.ts +3 -3
- package/dist/types/components/snk-form-config/FormConfigHelper.d.ts +31 -0
- package/dist/types/components/snk-form-config/SnkFormConfigManager.d.ts +3 -3
- package/dist/types/components/snk-form-config/config-header/config-header.d.ts +23 -0
- package/dist/types/components/snk-form-config/config-header/configs-button/configs-button.d.ts +19 -0
- package/dist/types/components/snk-form-config/field-item/field-config/field-config.d.ts +56 -0
- package/dist/types/components/snk-form-config/fields-layout/fields-layout.d.ts +63 -0
- package/dist/types/components/snk-form-config/fields-selector/fields-selector.d.ts +18 -0
- package/dist/types/components/snk-form-config/guides-configurator/guides-configurator.d.ts +42 -0
- package/dist/types/components/snk-form-config/snk-form-config.d.ts +51 -120
- package/dist/types/components/snk-grid/snk-grid.d.ts +13 -7
- package/dist/types/components/snk-personalized-filter/interfaces/index.d.ts +4 -0
- package/dist/types/components/snk-personalized-filter/snk-personalized-filter.d.ts +7 -1
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.d.ts +4 -0
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.d.ts +4 -0
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-assistent-mode/snk-filter-assistent-mode.d.ts +4 -0
- package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +1 -0
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +10 -10
- package/dist/types/components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button.d.ts +44 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +5 -0
- package/dist/types/components.d.ts +391 -211
- package/dist/types/lib/configs/ConfigStorage.d.ts +4 -2
- package/dist/types/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.d.ts +8 -4
- package/dist/types/lib/utils/constants.d.ts +6 -0
- package/package.json +8 -6
- package/react/components.d.ts +9 -3
- package/react/components.js +9 -3
- package/react/components.js.map +1 -1
- package/dist/cjs/Sortable-fb1c4cbb.js +0 -2853
- package/dist/cjs/snk-config-options_3.cjs.entry.js +0 -1390
- package/dist/cjs/snk-field-config.cjs.entry.js +0 -60
- package/dist/cjs/snk-tab-config.cjs.entry.js +0 -332
- package/dist/collection/components/snk-form-config/subcomponents/snk-config-options/snk-config-options.css +0 -16
- package/dist/collection/components/snk-form-config/subcomponents/snk-config-options/snk-config-options.js +0 -346
- package/dist/collection/components/snk-form-config/subcomponents/snk-field-config/snk-field-config.css +0 -219
- package/dist/collection/components/snk-form-config/subcomponents/snk-field-config/snk-field-config.js +0 -184
- package/dist/collection/components/snk-form-config/subcomponents/snk-tab-config/snk-tab-config.css +0 -323
- package/dist/collection/components/snk-form-config/subcomponents/snk-tab-config/snk-tab-config.js +0 -527
- package/dist/collection/components/snk-taskbar/subcomponents/field-search.js +0 -31
- package/dist/components/snk-config-options.js +0 -6
- package/dist/components/snk-config-options2.js +0 -257
- package/dist/components/snk-field-config.js +0 -6
- package/dist/components/snk-field-config2.js +0 -76
- package/dist/components/snk-tab-config.js +0 -6
- package/dist/components/snk-tab-config2.js +0 -3202
- package/dist/esm/Sortable-83960219.js +0 -2851
- package/dist/esm/snk-config-options_3.entry.js +0 -1384
- package/dist/esm/snk-field-config.entry.js +0 -56
- package/dist/esm/snk-tab-config.entry.js +0 -328
- package/dist/sankhyablocks/p-03b68a74.js +0 -56
- package/dist/sankhyablocks/p-1db45d26.entry.js +0 -1
- package/dist/sankhyablocks/p-1ee379ce.entry.js +0 -1
- package/dist/sankhyablocks/p-23736d75.js +0 -1
- package/dist/sankhyablocks/p-3749dffb.entry.js +0 -1
- package/dist/sankhyablocks/p-3ab6df3d.entry.js +0 -1
- package/dist/sankhyablocks/p-3c9794dc.entry.js +0 -1
- package/dist/sankhyablocks/p-42dd1346.js +0 -1
- package/dist/sankhyablocks/p-5ffa0493.entry.js +0 -1
- package/dist/sankhyablocks/p-60137b7a.entry.js +0 -1
- package/dist/sankhyablocks/p-7b920eb8.entry.js +0 -1
- package/dist/sankhyablocks/p-80f8c22c.js +0 -1
- package/dist/sankhyablocks/p-847449f8.entry.js +0 -1
- package/dist/sankhyablocks/p-9261d8a0.js +0 -1
- package/dist/sankhyablocks/p-933c0c0b.js +0 -1
- package/dist/sankhyablocks/p-979ecc40.entry.js +0 -1
- package/dist/sankhyablocks/p-a3f5ebb6.entry.js +0 -1
- package/dist/sankhyablocks/p-aadd3911.entry.js +0 -1
- package/dist/sankhyablocks/p-bfdf92e9.entry.js +0 -1
- package/dist/sankhyablocks/p-c0eb761b.entry.js +0 -1
- package/dist/sankhyablocks/p-c8b3cb54.js +0 -1
- package/dist/sankhyablocks/p-d31a701e.entry.js +0 -1
- package/dist/sankhyablocks/p-d9804798.js +0 -1
- package/dist/sankhyablocks/p-dc6ad9a6.entry.js +0 -1
- package/dist/sankhyablocks/p-dce8e631.entry.js +0 -1
- package/dist/sankhyablocks/p-fa816fb2.js +0 -1
- package/dist/types/components/snk-form-config/subcomponents/snk-config-options/snk-config-options.d.ts +0 -57
- package/dist/types/components/snk-form-config/subcomponents/snk-field-config/snk-field-config.d.ts +0 -43
- package/dist/types/components/snk-form-config/subcomponents/snk-tab-config/snk-tab-config.d.ts +0 -105
- package/dist/types/components/snk-taskbar/subcomponents/field-search.d.ts +0 -4
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-1cf293c1.js');
|
|
4
4
|
const index$2 = require('./index-e3e39724.js');
|
|
5
|
-
const index$1 = require('./index-
|
|
5
|
+
const index$1 = require('./index-0ad2baeb.js');
|
|
6
6
|
|
|
7
7
|
exports.TaskbarElement = void 0;
|
|
8
8
|
(function (TaskbarElement) {
|
|
@@ -90,6 +90,9 @@ const buildElem = (element, className, dataElementId, getTitle, action, isEnable
|
|
|
90
90
|
case exports.TaskbarElement.FORM_MODE:
|
|
91
91
|
return iconButton("list", element, className, dataElementId, title, action, isEnabled);
|
|
92
92
|
case exports.TaskbarElement.CONFIGURATOR:
|
|
93
|
+
if ((actions === null || actions === void 0 ? void 0 : actions.length) > 0) {
|
|
94
|
+
return splitButton("settings-inverted", element, className, title, dataElementId, isEnabled, actions, action);
|
|
95
|
+
}
|
|
93
96
|
return iconButton("settings-inverted", element, className, dataElementId, title, action, isEnabled);
|
|
94
97
|
case exports.TaskbarElement.MORE_OPTIONS:
|
|
95
98
|
return actionButton(element, className, dataElementId, title, isEnabled, actions, action);
|
|
@@ -114,6 +117,11 @@ function iconTextButton(iconName, name, className, dataElementId, text, title, a
|
|
|
114
117
|
return index.h("ez-button", { key: dataElementId, title: title, label: text, size: "small", class: className, "data-taskbar-label": text, "data-taskbar-icon": iconName, "data-taskbar-element": name, "data-element-id": dataElementId, enabled: isEnabled(name), onClick: () => action(name) },
|
|
115
118
|
index.h("ez-icon", { class: "ez-padding-right--small", slot: "leftIcon", iconName: iconName }));
|
|
116
119
|
}
|
|
120
|
+
function splitButton(iconName, element, className, title, dataElementId, isEnabled, actions, action) {
|
|
121
|
+
return actions && actions.length > 0
|
|
122
|
+
? index.h("taskbar-split-button", { iconName: iconName, class: className, key: dataElementId, "data-taskbar-icon": iconName, "data-taskbar-label": title, "data-taskbar-element": element, "data-element-id": dataElementId, enabled: isEnabled(element), actions: actions, title: title, action: () => action(element) })
|
|
123
|
+
: undefined;
|
|
124
|
+
}
|
|
117
125
|
function actionButton(element, className, dataElementId, title, isEnabled, actions, action) {
|
|
118
126
|
return actions && actions.length > 0
|
|
119
127
|
? index.h("taskbar-actions-button", { class: className, key: dataElementId, title: title, "data-taskbar-element": element, "data-element-id": dataElementId, enabled: isEnabled(element), actions: actions, onTaskbarActionSelected: (evt) => action(evt.detail.value) })
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-f9e81701.js');
|
|
4
|
-
|
|
5
3
|
class TaskbarProcessor {
|
|
6
4
|
constructor(defaultButtons) {
|
|
7
5
|
this._defaultButtons = defaultButtons;
|
|
@@ -52,37 +50,4 @@ class TaskbarProcessor {
|
|
|
52
50
|
}
|
|
53
51
|
}
|
|
54
52
|
|
|
55
|
-
const EVENT_NAME = 'taskbarActionsOpened';
|
|
56
|
-
const buildFieldSearch = (action, optionLoader, onSelectField) => {
|
|
57
|
-
return index.h("ez-search", { class: 'ez-actions-button--bottom-padding', canShowError: 'false', showSelectedValue: 'false', showOptionValue: 'false', suppressEmptyOption: 'true', label: action.label, value: '', optionLoader: optionLoader, onEzChange: (evt) => onSelectField(evt.detail), ignoreLimitCharsToSearch: true });
|
|
58
|
-
};
|
|
59
|
-
async function focusOnFieldSerch(field) {
|
|
60
|
-
requestAnimationFrame(async () => {
|
|
61
|
-
if (field) {
|
|
62
|
-
const realElement = field['$elm$'];
|
|
63
|
-
if (!realElement)
|
|
64
|
-
return;
|
|
65
|
-
realElement.value = null;
|
|
66
|
-
await realElement.setFocus();
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
const openFieldSearch = async (moreOptions, field) => {
|
|
71
|
-
if (!moreOptions) {
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
if ((await moreOptions.isOpened())) {
|
|
75
|
-
await focusOnFieldSerch(field);
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
const eventHandler = () => {
|
|
79
|
-
focusOnFieldSerch(field);
|
|
80
|
-
moreOptions.removeEventListener(EVENT_NAME, eventHandler);
|
|
81
|
-
};
|
|
82
|
-
moreOptions.addEventListener(EVENT_NAME, eventHandler);
|
|
83
|
-
await moreOptions.showActions();
|
|
84
|
-
};
|
|
85
|
-
|
|
86
53
|
exports.TaskbarProcessor = TaskbarProcessor;
|
|
87
|
-
exports.buildFieldSearch = buildFieldSearch;
|
|
88
|
-
exports.openFieldSearch = openFieldSearch;
|
|
@@ -32,12 +32,17 @@
|
|
|
32
32
|
"./components/snk-filter-bar/filter-item/editors/snk-filter-text.js",
|
|
33
33
|
"./components/snk-filter-bar/filter-modal/snk-filter-modal.js",
|
|
34
34
|
"./components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js",
|
|
35
|
+
"./components/snk-filter-bar/filter-modal/subcomponents/snk-default-filter/snk-default-filter.js",
|
|
35
36
|
"./components/snk-filter-field-search/snk-filter-field-search.js",
|
|
36
37
|
"./components/snk-form/snk-form.js",
|
|
37
|
-
"./components/snk-form-config/subcomponents/snk-tab-config/snk-tab-config.js",
|
|
38
38
|
"./components/snk-form-config/snk-form-config.js",
|
|
39
|
-
"./components/snk-form-config/
|
|
40
|
-
"./components/snk-form-config/
|
|
39
|
+
"./components/snk-form-config/config-header/config-header.js",
|
|
40
|
+
"./components/snk-form-config/config-header/configs-button/configs-button.js",
|
|
41
|
+
"./components/snk-form-config/field-item/field-item.js",
|
|
42
|
+
"./components/snk-form-config/field-item/field-config/field-config.js",
|
|
43
|
+
"./components/snk-form-config/fields-layout/fields-layout.js",
|
|
44
|
+
"./components/snk-form-config/fields-selector/fields-selector.js",
|
|
45
|
+
"./components/snk-form-config/guides-configurator/guides-configurator.js",
|
|
41
46
|
"./components/snk-grid/snk-grid.js",
|
|
42
47
|
"./components/snk-grid-config/snk-grid-config.js",
|
|
43
48
|
"./components/snk-grid-config/snk-select-box/snk-select-box.js",
|
|
@@ -56,6 +61,7 @@
|
|
|
56
61
|
"./components/snk-simple-crud/snk-simple-crud.js",
|
|
57
62
|
"./components/snk-simple-form-config/snk-simple-form-config.js",
|
|
58
63
|
"./components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js",
|
|
64
|
+
"./components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button.js",
|
|
59
65
|
"./components/teste-pesquisa/teste-pesquisa.js"
|
|
60
66
|
],
|
|
61
67
|
"compiler": {
|
|
@@ -70,11 +76,6 @@
|
|
|
70
76
|
"snk-application"
|
|
71
77
|
]
|
|
72
78
|
},
|
|
73
|
-
{
|
|
74
|
-
"components": [
|
|
75
|
-
"snk-tab-config"
|
|
76
|
-
]
|
|
77
|
-
},
|
|
78
79
|
{
|
|
79
80
|
"components": [
|
|
80
81
|
"snk-configurator"
|
|
@@ -120,11 +121,6 @@
|
|
|
120
121
|
"snk-data-unit"
|
|
121
122
|
]
|
|
122
123
|
},
|
|
123
|
-
{
|
|
124
|
-
"components": [
|
|
125
|
-
"snk-field-config"
|
|
126
|
-
]
|
|
127
|
-
},
|
|
128
124
|
{
|
|
129
125
|
"components": [
|
|
130
126
|
"snk-grid"
|
|
@@ -142,7 +138,6 @@
|
|
|
142
138
|
},
|
|
143
139
|
{
|
|
144
140
|
"components": [
|
|
145
|
-
"snk-config-options",
|
|
146
141
|
"snk-form",
|
|
147
142
|
"snk-form-config"
|
|
148
143
|
]
|
|
@@ -1201,16 +1201,16 @@ export class SnkApplication {
|
|
|
1201
1201
|
};
|
|
1202
1202
|
}
|
|
1203
1203
|
getSkeletonTemplateGrid() {
|
|
1204
|
-
return (h("div", { class: "loading-hidden", style: this.getLoadingVisibilityStyle() }, h("div", { class: "ez-flex ez-flex--column ez-margin--large ez-margin-top--medium" }, h("div", { class: "ez-margin-bottom--medium" }, h("ez-skeleton", { count: 1, variant: "
|
|
1204
|
+
return (h("div", { class: "loading-hidden", style: this.getLoadingVisibilityStyle() }, h("div", { class: "ez-flex ez-flex--column ez-margin--large ez-margin-top--medium" }, h("div", { class: "ez-margin-bottom--medium" }, h("ez-skeleton", { count: 1, variant: "text", width: "20%", height: "35px", animation: "progress" })), h("div", { class: "" }, h("ez-skeleton", { count: 1, variant: "text", width: "70%", height: "25px", animation: "progress" }))), h("div", { class: "ez-flex ez-flex--justify-start skeleton-content-column ez-margin-horizontal--large", style: { height: "calc(-105px + 100vh)" } }, [1, 2, 3, 4].map((_, index) => (h("div", { class: "ez-margin-right--large", key: index, style: { width: "25%" } }, h("ez-skeleton", { count: this.getCountSkeleton(50, 10), variant: "text", width: "100%", height: "50px", animation: "progress", marginBottom: "10px" })))))));
|
|
1205
1205
|
}
|
|
1206
1206
|
getSkeletonTemplateGridWithSidebar() {
|
|
1207
|
-
return (h("div", { class: "loading-hidden", style: this.getLoadingVisibilityStyle() }, h("div", { class: "ez-flex ez-flex--column ez-margin--large ez-margin-top--medium" }, h("div", { class: "ez-margin-bottom--medium" }, h("ez-skeleton", { count: 1, variant: "
|
|
1207
|
+
return (h("div", { class: "loading-hidden", style: this.getLoadingVisibilityStyle() }, h("div", { class: "ez-flex ez-flex--column ez-margin--large ez-margin-top--medium" }, h("div", { class: "ez-margin-bottom--medium" }, h("ez-skeleton", { count: 1, variant: "text", width: "20%", height: "35px", animation: "progress" })), h("div", { class: "" }, h("ez-skeleton", { count: 1, variant: "text", width: "70%", height: "25px", animation: "progress" }))), h("div", { class: "ez-flex ez-flex--justify-start skeleton-content-column ez-margin-horizontal--large", style: { height: "calc(100vh - 160px)" } }, h("div", { class: "ez-flex ez-flex--column ez-margin-right--large", style: { width: "25%", overflow: "hidden" } }, Array(this.getCountSkeleton(30, 6)).fill(null).map((_, index) => h("ez-skeleton", { key: index, count: 1, variant: "text", width: this.getSkeletonRandomWidth(), height: "30px", animation: "progress", marginBottom: "10px" }))), h("div", { class: "ez-margin-right--large", style: { width: "75%" } }, h("ez-skeleton", { count: this.getCountSkeleton(50, 10), variant: "text", width: "100%", height: "50px", animation: "progress", marginBottom: "10px" })))));
|
|
1208
1208
|
}
|
|
1209
1209
|
getSkeletonTemplateGridWithPanel() {
|
|
1210
|
-
return (h("div", { class: "loading-hidden", style: this.getLoadingVisibilityStyle() }, h("div", { class: "ez-margin--medium ez-margin-top--medium ez-padding--medium" }, h("ez-skeleton", { count: 1, variant: "
|
|
1210
|
+
return (h("div", { class: "loading-hidden", style: this.getLoadingVisibilityStyle() }, h("div", { class: "ez-margin--medium ez-margin-top--medium ez-padding--medium" }, h("ez-skeleton", { count: 1, variant: "text", width: "70%", height: "25px", animation: "progress" })), h("div", { class: "ez-flex ez-margin--medium ez-margin-top--medium", style: { maxHeight: "calc(-105px + 100vh)", overflow: "hidden" } }, h("div", { class: "", style: { width: "70%", overflow: "hidden" } }, h("div", { class: "ez-padding--medium", style: { height: "50%" } }, h("ez-skeleton", { count: 1, variant: "text", width: "100%", height: "100%", animation: "progress" })), h("div", { class: "ez-padding--medium", style: {} }, h("ez-skeleton", { count: 1, variant: "text", width: "250px", height: "25px", animation: "progress" })), h("div", { class: "ez-flex ez-padding--medium", style: { height: "45%" } }, [1, 2].map(() => (h("div", { style: { width: "50%" } }, h("ez-skeleton", { count: 1, variant: "text", width: "100%", height: "100%", animation: "progress" })))))), h("div", { class: "ez-flex ez-flex--column ez-padding--medium", style: { width: "30%", overflow: "hidden" } }, Array(this.getCountSkeleton(30, 10)).fill(null).map((_, index) => h("ez-skeleton", { key: index, count: 1, variant: "text", width: "100%", height: "50px", animation: "progress", marginBottom: "10px" }))))));
|
|
1211
1211
|
}
|
|
1212
1212
|
getSkeletonTemplateFormWithSidebar() {
|
|
1213
|
-
return (h("div", { class: "loading-hidden", style: this.getLoadingVisibilityStyle() }, h("div", { class: "ez-margin--medium ez-margin-top--medium ez-padding--medium" }, h("ez-skeleton", { count: 1, variant: "
|
|
1213
|
+
return (h("div", { class: "loading-hidden", style: this.getLoadingVisibilityStyle() }, h("div", { class: "ez-margin--medium ez-margin-top--medium ez-padding--medium" }, h("ez-skeleton", { count: 1, variant: "text", width: "70%", height: "25px", animation: "progress" })), h("div", { class: "ez-flex ez-margin--medium ez-margin-top--medium", style: { maxHeight: "calc(-105px + 100vh)", overflow: "hidden" } }, h("div", { class: "ez-flex ez-flex--column ez-margin-right--large", style: { width: "25%", overflow: "hidden" } }, Array(this.getCountSkeleton(30, 6)).fill(null).map((_, index) => h("ez-skeleton", { key: index, count: 1, variant: "text", width: this.getSkeletonRandomWidth(), height: "30px", animation: "progress", marginBottom: "10px" }))), h("div", { class: "ez-flex ez-flex--column", style: { width: "75%" } }, h("div", { class: "ez-padding--medium", style: { width: "100%" } }, h("ez-skeleton", { count: 1, variant: "text", width: "30%", height: "25px", animation: "progress" })), h("div", { class: "ez-padding--medium", style: { height: "45%" } }, h("div", { class: "ez-flex", style: { width: "100%", height: "100%" } }, [1, 2, 3, 4].map((_, columnIndex) => (h("div", { key: columnIndex, class: "ez-padding-right--large", style: { width: "25%", overflow: "hidden" } }, Array(this.getCountSkeleton(50, 20)).fill(null).map((_, index) => h("ez-skeleton", { key: index, count: 1, variant: "text", width: "100%", height: "50px", animation: "progress", marginBottom: "10px" }))))))), h("div", { class: "ez-padding--medium", style: { width: "100%" } }, h("ez-skeleton", { count: 1, variant: "text", width: "30%", height: "25px", animation: "progress" })), h("div", { class: "ez-padding--medium", style: { height: "45%" } }, h("div", { class: "ez-flex", style: { width: "100%", height: "100%" } }, [1, 2, 3, 4].map((_, columnIndex) => (h("div", { key: columnIndex, class: "ez-padding-right--large", style: { width: "25%", overflow: "hidden" } }, Array(this.getCountSkeleton(50, 20)).fill(null).map((_, index) => h("ez-skeleton", { key: index, count: 1, variant: "text", width: "100%", height: "50px", animation: "progress", marginBottom: "10px" })))))))))));
|
|
1214
1214
|
}
|
|
1215
1215
|
getSpinnerLoadingDefault() {
|
|
1216
1216
|
return (h("div", { class: "loading-hidden", style: this.getLoadingVisibilityStyle() }, h("div", { class: "ez-flex ez-size-height--full ez-size-width--full ez-flex--justify-center ez-flex--align-items-center spinner" }, h("ez-icon", { iconName: "sync", size: "x-large", class: "spin" }), h("span", { class: "ez-title ez-title--secondary ez-title--extra-large" }, "Carregando..."))));
|
|
@@ -4,6 +4,7 @@ import { AnexoSistemaFetcher, AttachFetcher, DataUnitFetcher } from '../../lib';
|
|
|
4
4
|
import { VIEW_MODE } from '../../lib/utils/constants';
|
|
5
5
|
import { anexoSistemaCrudConfig, AnexoSistemaDataUnitFactory, attachCrudConfig, AttachFetcherDataUnitFactory, buildTaskBarManager, } from './structure';
|
|
6
6
|
import InMemoryLoader from '../../lib/dataUnit/InMemoryLoader';
|
|
7
|
+
import { SaveErrorsEnum } from '../../lib/http/data-fetcher/fetchers/AttachFetcher/interfaces';
|
|
7
8
|
const RESOURCE_ID = 'AnexoSistema';
|
|
8
9
|
const DATA_UNIT_NAME = 'br.com.sankhya.core.v3.anexoSistema';
|
|
9
10
|
export class SnkAttach {
|
|
@@ -24,6 +25,9 @@ export class SnkAttach {
|
|
|
24
25
|
this.handleFinish = () => {
|
|
25
26
|
if (!this._currentDataUnit.isDirty())
|
|
26
27
|
return this.back.emit();
|
|
28
|
+
if (!this.validateAnexoSistema()) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
27
31
|
this._currentDataUnit.saveData().then(() => {
|
|
28
32
|
this.showFinishedToast();
|
|
29
33
|
this.back.emit();
|
|
@@ -158,6 +162,7 @@ export class SnkAttach {
|
|
|
158
162
|
var _a, _b;
|
|
159
163
|
this._currentFetcher = new AttachFetcher();
|
|
160
164
|
this._currentDataUnit = new DataUnit(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME);
|
|
165
|
+
this._currentDataUnit.pageSize = 150;
|
|
161
166
|
this.initDataUnitLoaders();
|
|
162
167
|
this._currentDataUnit.addInterceptor({
|
|
163
168
|
interceptAction: (action) => {
|
|
@@ -202,6 +207,27 @@ export class SnkAttach {
|
|
|
202
207
|
}
|
|
203
208
|
});
|
|
204
209
|
}
|
|
210
|
+
validateAnexoSistema() {
|
|
211
|
+
var _a;
|
|
212
|
+
if (this._currentFetcher instanceof AnexoSistemaFetcher) {
|
|
213
|
+
try {
|
|
214
|
+
let fields = this._currentDataUnit.getSelectedRecord();
|
|
215
|
+
fields = Object.assign(Object.assign({}, fields), { NOMEARQUIVO: (_a = fields.NOMEARQUIVO) === null || _a === void 0 ? void 0 : _a[0] });
|
|
216
|
+
this._currentFetcher.validateFields(fields);
|
|
217
|
+
}
|
|
218
|
+
catch (error) {
|
|
219
|
+
if (error.message === SaveErrorsEnum.LINK_AND_FILE_AT_THE_SAME_TIME) {
|
|
220
|
+
this._application.alert(this.getMessage('snkAttach.alertValidation.fileAndLinkAtTheSameTime.title'), this.getMessage('snkAttach.alertValidation.fileAndLinkAtTheSameTime.message'));
|
|
221
|
+
return false;
|
|
222
|
+
}
|
|
223
|
+
if (error.message === SaveErrorsEnum.ANY_LINK_OR_FILE_FILLED) {
|
|
224
|
+
this._application.alert(this.getMessage('snkAttach.alertValidation.anyLinkOrFileFilled.title'), this.getMessage('snkAttach.alertValidation.anyLinkOrFileFilled.message'));
|
|
225
|
+
return false;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
return true;
|
|
230
|
+
}
|
|
205
231
|
async componentWillLoad() {
|
|
206
232
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
207
233
|
await this.initAttach();
|
|
@@ -230,7 +256,7 @@ export class SnkAttach {
|
|
|
230
256
|
var _a, _b;
|
|
231
257
|
if (!this._currentDataUnit)
|
|
232
258
|
return null;
|
|
233
|
-
return (h("main", { class: "snk-attach__main" }, h("header", { class: "snk-attach__header" }, h("snk-simple-bar", { onExit: this.handleBack, messagesBuilder: this.messagesBuilder }, h("div", { slot: "rightSlot" }, h("ez-button", { class: "ez-button--primary", label: this.getMessage("snkAttach.finish"), onClick: this.handleFinish })))), h("div", { class: "snk-attach__crud-section ez-size-height--full ez-size-width--full ez-flex ez-flex--column" }, h("div", { class: "ez-box__container" }, h("snk-simple-crud", { ref: (el) => this._crudElement = el, dataUnit: this._currentDataUnit, taskbarManager: buildTaskBarManager(), gridConfig: (_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.grid, formConfig: (_b = this.crudConfig) === null || _b === void 0 ? void 0 : _b.form, useCancelConfirm: false, onActionClick: this.handleTaskbarClick, messagesBuilder: this.messagesBuilder, onDataStateChange: this.handleOnDataStateChange.bind(this) }, h("div", { slot: "snkSimpleCrudHeader" }, h("div", { class: "ez-flex ez-flex--column" }, h("span", { class: "ez-title--primary ez-text ez-text--large ez-text--bold ez-padding-bottom--medium" }, this.getMessage("snkAttach.title")), h("span", { class: "ez-text ez-text--medium ez-text--secondary ez-padding-bottom--medium" }, this.getMessage("snkAttach.description")))))))));
|
|
259
|
+
return (h("main", { class: "snk-attach__main" }, h("header", { class: "snk-attach__header" }, h("snk-simple-bar", { onExit: this.handleBack, messagesBuilder: this.messagesBuilder }, h("div", { slot: "rightSlot" }, h("ez-button", { class: "ez-button--primary", label: this.getMessage("snkAttach.finish"), onClick: this.handleFinish })))), h("div", { class: "snk-attach__crud-section ez-size-height--full ez-size-width--full ez-flex ez-flex--column" }, h("div", { class: "ez-box__container" }, h("snk-simple-crud", { ref: (el) => this._crudElement = el, dataUnit: this._currentDataUnit, taskbarManager: buildTaskBarManager(), gridConfig: (_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.grid, formConfig: (_b = this.crudConfig) === null || _b === void 0 ? void 0 : _b.form, useCancelConfirm: false, onActionClick: this.handleTaskbarClick, messagesBuilder: this.messagesBuilder, onDataStateChange: this.handleOnDataStateChange.bind(this), multipleSelection: true }, h("div", { slot: "snkSimpleCrudHeader" }, h("div", { class: "ez-flex ez-flex--column" }, h("span", { class: "ez-title--primary ez-text ez-text--large ez-text--bold ez-padding-bottom--medium" }, this.getMessage("snkAttach.title")), h("span", { class: "ez-text ez-text--medium ez-text--secondary ez-padding-bottom--medium" }, this.getMessage("snkAttach.description")))))))));
|
|
234
260
|
}
|
|
235
261
|
static get is() { return "snk-attach"; }
|
|
236
262
|
static get encapsulation() { return "scoped"; }
|
|
@@ -94,20 +94,24 @@ export class AttachFetcherDataUnitFactory {
|
|
|
94
94
|
}
|
|
95
95
|
getInterceptions(dataUnit, action, crudRef) {
|
|
96
96
|
return new Promise((resolve) => {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
if (cancellationConfirmed) {
|
|
102
|
-
crudRef.goToView(VIEW_MODE.GRID);
|
|
97
|
+
var _a, _b, _c, _d, _e, _f;
|
|
98
|
+
switch (action.type) {
|
|
99
|
+
case Action.EDITION_CANCELED:
|
|
100
|
+
if (!dataUnit.isDirty())
|
|
103
101
|
return resolve(action);
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
102
|
+
return this._application.confirm(this.getMessage('snkAttach.cancelConfirmation.title'), this.getMessage('snkAttach.cancelConfirmation.message')).then((cancellationConfirmed) => {
|
|
103
|
+
if (cancellationConfirmed) {
|
|
104
|
+
crudRef.goToView(VIEW_MODE.GRID);
|
|
105
|
+
return resolve(action);
|
|
106
|
+
}
|
|
107
|
+
return resolve(undefined);
|
|
108
|
+
});
|
|
109
|
+
case Action.DATA_SAVED:
|
|
110
|
+
dataUnit.loadData(undefined, undefined, false, (_c = (_b = (_a = action === null || action === void 0 ? void 0 : action.payload) === null || _a === void 0 ? void 0 : _a.records) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.REGISTER_KEY);
|
|
111
|
+
return resolve(action);
|
|
112
|
+
case Action.RECORDS_REMOVED:
|
|
113
|
+
dataUnit.loadData(undefined, undefined, false, (_f = (_e = (_d = action === null || action === void 0 ? void 0 : action.payload) === null || _d === void 0 ? void 0 : _d.cachedRecords) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.CODATA);
|
|
114
|
+
return resolve(action);
|
|
111
115
|
}
|
|
112
116
|
resolve(action);
|
|
113
117
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h, Host } from '@stencil/core';
|
|
2
|
-
import { ApplicationContext, ElementIDUtils,
|
|
2
|
+
import { ApplicationContext, ElementIDUtils, StringUtils, KeyboardManager } from '@sankhyalabs/core';
|
|
3
3
|
import { TaskbarElement } from '../snk-taskbar/elements/taskbar-elements';
|
|
4
4
|
import { PresentationMode } from '../../lib';
|
|
5
5
|
import { VIEW_MODE } from '../../lib/utils/constants';
|
|
@@ -12,7 +12,6 @@ import { ExporterStrategy } from '../../lib/@types';
|
|
|
12
12
|
*/
|
|
13
13
|
export class SnkCrud {
|
|
14
14
|
constructor() {
|
|
15
|
-
this._keyDownHandler = async (event) => this.keyDownListener(event);
|
|
16
15
|
this._viewHistory = [];
|
|
17
16
|
this._customEditors = new Map();
|
|
18
17
|
this._customRenders = new Map();
|
|
@@ -47,9 +46,9 @@ export class SnkCrud {
|
|
|
47
46
|
this.ignoreReadOnlyFormFields = undefined;
|
|
48
47
|
this.setCustomFormTitle = undefined;
|
|
49
48
|
this.strategyExporter = ExporterStrategy.SERVER_SIDE;
|
|
50
|
-
this.paginationCounterMode = 'auto';
|
|
51
49
|
this.layoutFormConfig = false;
|
|
52
50
|
this.multipleEditionEnabled = true;
|
|
51
|
+
this.paginationCounterMode = 'auto';
|
|
53
52
|
this.customContainerId = `SNK-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
|
|
54
53
|
}
|
|
55
54
|
/**
|
|
@@ -257,7 +256,6 @@ export class SnkCrud {
|
|
|
257
256
|
}
|
|
258
257
|
disconnectedCallback() {
|
|
259
258
|
this.removeShortcuts();
|
|
260
|
-
window.removeEventListener("keydown", this._keyDownHandler);
|
|
261
259
|
}
|
|
262
260
|
async handleDataStateChange(evt) {
|
|
263
261
|
var _a;
|
|
@@ -353,34 +351,12 @@ export class SnkCrud {
|
|
|
353
351
|
}
|
|
354
352
|
this.configuratorCancel.emit();
|
|
355
353
|
}
|
|
356
|
-
async keyDownListener(event) {
|
|
357
|
-
if (!event.ctrlKey || event.key == undefined || event.key.toUpperCase() !== "F") {
|
|
358
|
-
return;
|
|
359
|
-
}
|
|
360
|
-
if (this._element == undefined) {
|
|
361
|
-
return;
|
|
362
|
-
}
|
|
363
|
-
if (JSUtils.isHiddenElement(this._element)) {
|
|
364
|
-
return;
|
|
365
|
-
}
|
|
366
|
-
FloatingManager.closeAll();
|
|
367
|
-
if (this._currentViewMode === VIEW_MODE.GRID) {
|
|
368
|
-
await this._snkGrid.findColumn();
|
|
369
|
-
}
|
|
370
|
-
else {
|
|
371
|
-
await this._guidesViewer.findField();
|
|
372
|
-
}
|
|
373
|
-
event.preventDefault();
|
|
374
|
-
}
|
|
375
|
-
connectedCallback() {
|
|
376
|
-
window.addEventListener("keydown", this._keyDownHandler, { capture: true });
|
|
377
|
-
}
|
|
378
354
|
render() {
|
|
379
355
|
if (this._resourceID == undefined) {
|
|
380
356
|
return;
|
|
381
357
|
}
|
|
382
358
|
this._snkDataUnit.ignoreSaveMessage = (this._currentViewMode === VIEW_MODE.GRID && !this.enableGridInsert);
|
|
383
|
-
return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", { class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full ez-padding--medium' }, h("snk-grid", { ref: (ref) => this._snkGrid = ref, class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full', filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, strategyExporter: this.strategyExporter, multipleEditionEnabled: this.multipleEditionEnabled, paginationCounterMode: this.paginationCounterMode }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId, formLegacyConfigName: this.formLegacyConfigName, enableGridInsert: this.enableGridInsert, getCustomTitle: this.setCustomFormTitle, ignoreReadOnlyFormFields: this.ignoreReadOnlyFormFields }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item",
|
|
359
|
+
return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", { class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full ez-padding--medium' }, h("snk-grid", { ref: (ref) => this._snkGrid = ref, class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full', filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, strategyExporter: this.strategyExporter, multipleEditionEnabled: this.multipleEditionEnabled, paginationCounterMode: this.paginationCounterMode }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId, formLegacyConfigName: this.formLegacyConfigName, enableGridInsert: this.enableGridInsert, getCustomTitle: this.setCustomFormTitle, ignoreReadOnlyFormFields: this.ignoreReadOnlyFormFields }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", { tabIndex: "0" }, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId, layoutFormConfig: this.layoutFormConfig })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
|
|
384
360
|
}
|
|
385
361
|
static get is() { return "snk-crud"; }
|
|
386
362
|
static get encapsulation() { return "scoped"; }
|
|
@@ -863,24 +839,6 @@ export class SnkCrud {
|
|
|
863
839
|
"reflect": false,
|
|
864
840
|
"defaultValue": "ExporterStrategy.SERVER_SIDE"
|
|
865
841
|
},
|
|
866
|
-
"paginationCounterMode": {
|
|
867
|
-
"type": "string",
|
|
868
|
-
"mutable": false,
|
|
869
|
-
"complexType": {
|
|
870
|
-
"original": "'show' | 'hidden' | 'auto'",
|
|
871
|
-
"resolved": "\"auto\" | \"hidden\" | \"show\"",
|
|
872
|
-
"references": {}
|
|
873
|
-
},
|
|
874
|
-
"required": false,
|
|
875
|
-
"optional": true,
|
|
876
|
-
"docs": {
|
|
877
|
-
"tags": [],
|
|
878
|
-
"text": "Define se a grid ser\u00E1 focada ao ser carregada."
|
|
879
|
-
},
|
|
880
|
-
"attribute": "pagination-counter-mode",
|
|
881
|
-
"reflect": false,
|
|
882
|
-
"defaultValue": "'auto'"
|
|
883
|
-
},
|
|
884
842
|
"layoutFormConfig": {
|
|
885
843
|
"type": "boolean",
|
|
886
844
|
"mutable": false,
|
|
@@ -916,6 +874,24 @@ export class SnkCrud {
|
|
|
916
874
|
"attribute": "multiple-edition-enabled",
|
|
917
875
|
"reflect": false,
|
|
918
876
|
"defaultValue": "true"
|
|
877
|
+
},
|
|
878
|
+
"paginationCounterMode": {
|
|
879
|
+
"type": "string",
|
|
880
|
+
"mutable": false,
|
|
881
|
+
"complexType": {
|
|
882
|
+
"original": "'show' | 'hidden' | 'auto'",
|
|
883
|
+
"resolved": "\"auto\" | \"hidden\" | \"show\"",
|
|
884
|
+
"references": {}
|
|
885
|
+
},
|
|
886
|
+
"required": false,
|
|
887
|
+
"optional": true,
|
|
888
|
+
"docs": {
|
|
889
|
+
"tags": [],
|
|
890
|
+
"text": "Define se a grid ser\u00E1 focada ao ser carregada."
|
|
891
|
+
},
|
|
892
|
+
"attribute": "pagination-counter-mode",
|
|
893
|
+
"reflect": false,
|
|
894
|
+
"defaultValue": "'auto'"
|
|
919
895
|
}
|
|
920
896
|
};
|
|
921
897
|
}
|
package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Action } from '@sankhyalabs/core';
|
|
1
|
+
import { Action as DUAction, KeyboardManager, StringUtils } from '@sankhyalabs/core';
|
|
2
2
|
import { Host, forceUpdate, h } from '@stencil/core';
|
|
3
3
|
import { SnkFormConfigManager } from '../../../snk-form-config/SnkFormConfigManager';
|
|
4
4
|
import { buildFormMetadata } from "@sankhyalabs/ezui/dist/collection/utils/form";
|
|
@@ -8,11 +8,14 @@ import { VIEW_MODE } from '../../../../lib/utils/constants';
|
|
|
8
8
|
import { SnkGuidesViewer } from '../snk-guides-viewer';
|
|
9
9
|
import { SnkMessageBuilder } from '../../../../lib/message/SnkMessageBuilder';
|
|
10
10
|
import { GuideBuilder } from '../GuideBuilder';
|
|
11
|
+
import { buildFieldSearch, LABEL_SEARCH_FIELD, SHORTCUT_SEARCH_FIELD } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
11
12
|
export class SnkDetailView {
|
|
12
13
|
constructor() {
|
|
13
14
|
this._disabledButtons = undefined;
|
|
14
15
|
this._currentView = undefined;
|
|
15
16
|
this.attachmentRegisterKey = undefined;
|
|
17
|
+
this._fieldToGetFocus = undefined;
|
|
18
|
+
this._hasToCreateFieldSearch = true;
|
|
16
19
|
this.formConfigManager = undefined;
|
|
17
20
|
this.dataUnitName = undefined;
|
|
18
21
|
this.resourceID = undefined;
|
|
@@ -232,9 +235,14 @@ export class SnkDetailView {
|
|
|
232
235
|
async componentDidLoad() {
|
|
233
236
|
await this.observerPropsCustomEditor(this.customEditors);
|
|
234
237
|
await this.observeCustomRenders(this.customRenders);
|
|
238
|
+
this.initKeyboardManager();
|
|
239
|
+
}
|
|
240
|
+
disconnectedCallback() {
|
|
241
|
+
var _a;
|
|
242
|
+
(_a = this._keyboardManager) === null || _a === void 0 ? void 0 : _a.unbindAllShortcutKeys();
|
|
235
243
|
}
|
|
236
244
|
async dataUnitActionHandler(action) {
|
|
237
|
-
if (action.type ===
|
|
245
|
+
if (action.type === DUAction.FIELD_INVALIDATED) {
|
|
238
246
|
this.addErrorBadgeToBranchGuide();
|
|
239
247
|
}
|
|
240
248
|
}
|
|
@@ -245,10 +253,53 @@ export class SnkDetailView {
|
|
|
245
253
|
normalizeBranchGuideId(id) {
|
|
246
254
|
return id === null || id === void 0 ? void 0 : id.replace(/child\[(.*?)\]/g, '$1').replace(/::/g, '>');
|
|
247
255
|
}
|
|
256
|
+
getSettingsListForm() {
|
|
257
|
+
const hardList = [{
|
|
258
|
+
value: StringUtils.generateUUID(),
|
|
259
|
+
label: this.messagesBuilder.getMessage("snkCrud.findColumn", undefined),
|
|
260
|
+
disableCloseOnSelect: true,
|
|
261
|
+
eagerInitialize: true,
|
|
262
|
+
itemBuilder: (_, item) => this.getFieldsSearch(item)
|
|
263
|
+
}];
|
|
264
|
+
return hardList;
|
|
265
|
+
}
|
|
266
|
+
getFieldsSearch(item) {
|
|
267
|
+
if (this._fieldSearch == undefined || this._hasToCreateFieldSearch) {
|
|
268
|
+
this._hasToCreateFieldSearch = false;
|
|
269
|
+
this._fieldSearch = buildFieldSearch(item, ({ argument }) => this.fieldsOptionLoader(argument), (option) => this.onSelectField(option));
|
|
270
|
+
}
|
|
271
|
+
return this._fieldSearch;
|
|
272
|
+
}
|
|
273
|
+
fieldsOptionLoader(argument) {
|
|
274
|
+
const searchTerm = argument === null || argument === void 0 ? void 0 : argument.toLowerCase();
|
|
275
|
+
const allFields = this.getFormFields().map(field => { var _a; return (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getField(field.name); });
|
|
276
|
+
const filteredFields = allFields.filter(field => {
|
|
277
|
+
var _a, _b;
|
|
278
|
+
return ((_a = field.name) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(searchTerm)) ||
|
|
279
|
+
((_b = field.label) === null || _b === void 0 ? void 0 : _b.toLowerCase().includes(searchTerm));
|
|
280
|
+
});
|
|
281
|
+
const options = filteredFields.map(field => ({ value: field.name, label: field.label }));
|
|
282
|
+
return Promise.resolve(options);
|
|
283
|
+
}
|
|
284
|
+
onSelectField(option) {
|
|
285
|
+
if (option == undefined) {
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
this._fieldToGetFocus = option.value;
|
|
289
|
+
}
|
|
290
|
+
clearFieldToFocusHandler() {
|
|
291
|
+
this._fieldToGetFocus = undefined;
|
|
292
|
+
}
|
|
293
|
+
async initKeyboardManager() {
|
|
294
|
+
this._keyboardManager = new KeyboardManager({ propagate: false, element: this._element });
|
|
295
|
+
this._keyboardManager.bind(SHORTCUT_SEARCH_FIELD, async () => {
|
|
296
|
+
await this._snkFormView.showSearchField();
|
|
297
|
+
}, { description: LABEL_SEARCH_FIELD, element: this._element });
|
|
298
|
+
}
|
|
248
299
|
render() {
|
|
249
300
|
this.updateLabel();
|
|
250
301
|
//const cardConfig: IFormCardConfig = this._cardsState?.get(this.selectedForm);
|
|
251
|
-
return (h(Host, null, h("snk-data-unit", { ref: (el) => this._snkDataUnit = el, dataUnitName: `${this.dataUnitName}`, onDataUnitReady: evt => this.dataUnitReadyHandler(evt), entityName: this.entityName, onDataStateChange: this.handleDataStateChange.bind(this), ignoreSaveMessage: this._currentView === VIEW_MODE.GRID, messagesBuilder: this.messagesBuilder, configName: this._configName }, h("ez-view-stack", { ref: (ref) => this.updateViewStack(ref) }, h("stack-item", null, h("div", { class: "ez-box ez-box--shadow grid-container" }, h("div", { class: "ez-title--primary ez-size-width--full ez-padding--large detail-header" }, h("div", { class: "ez-flex ez-text ez-text--bold ez-flex--justify-start ez-flex--align-items-center" }, this._levelPath ? h("span", { class: "level-path" }, this._levelPath + " /") : undefined, this.label)), h("snk-grid", { class: "ez-size-width--full", ref: (ref) => this._snkGrid = ref, configName: this._configName, messagesBuilder: this.messagesBuilder, onGridDoubleClick: () => this.emitSwitchEvent(VIEW_MODE.FORM), onActionClick: (evt) => this.executeActionHandler(evt), presentationMode: this.presentationMode, canEdit: this.canEdit, isDetail: true, taskbarCustomContainerId: this.taskbarCustomContainerId, gridHeaderCustomSlotId: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS", topTaskbarCustomSlotId: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS", outlineMode: false }))), h("stack-item", null, h("snk-form-view", { ref: (ref) => this._snkFormView = ref, canExpand: false, canFix: false, name: this.selectedForm, formMetadata: this._formMetadata, dataUnit: this.dataUnit, fields: this.getFormFields(), label: this.label, levelPath: this._levelPath, onFormItemsReady: ({ detail: formItems }) => this.formItemsReady.emit(formItems) }, h("snk-taskbar", { key: "guideViewerTaskbar", class: "form-taskbar", "data-element-id": "guideViewer", configName: this._configName, messagesBuilder: this.messagesBuilder, disabledButtons: this._disabledButtons, buttons: "INSERT,PREVIOUS,NEXT,DIVIDER,CLONE,REMOVE,MORE_OPTIONS,DIVIDER,GRID_MODE,CONFIGURATOR", primaryButton: "INSERT", presentationMode: this.presentationMode, onActionClick: evt => this.executeActionHandler(evt), dataUnit: this.dataUnit, resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }, h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" })))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this.entityName, onBack: this.handleAttachBack.bind(this) }))))));
|
|
302
|
+
return (h(Host, null, h("snk-data-unit", { ref: (el) => this._snkDataUnit = el, dataUnitName: `${this.dataUnitName}`, onDataUnitReady: evt => this.dataUnitReadyHandler(evt), entityName: this.entityName, onDataStateChange: this.handleDataStateChange.bind(this), ignoreSaveMessage: this._currentView === VIEW_MODE.GRID, messagesBuilder: this.messagesBuilder, configName: this._configName }, h("ez-view-stack", { ref: (ref) => this.updateViewStack(ref) }, h("stack-item", null, h("div", { class: "ez-box ez-box--shadow grid-container" }, h("div", { class: "ez-title--primary ez-size-width--full ez-padding--large detail-header" }, h("div", { class: "ez-flex ez-text ez-text--bold ez-flex--justify-start ez-flex--align-items-center" }, this._levelPath ? h("span", { class: "level-path" }, this._levelPath + " /") : undefined, this.label)), h("snk-grid", { class: "ez-size-width--full", ref: (ref) => this._snkGrid = ref, configName: this._configName, messagesBuilder: this.messagesBuilder, onGridDoubleClick: () => this.emitSwitchEvent(VIEW_MODE.FORM), onActionClick: (evt) => this.executeActionHandler(evt), presentationMode: this.presentationMode, canEdit: this.canEdit, isDetail: true, taskbarCustomContainerId: this.taskbarCustomContainerId, gridHeaderCustomSlotId: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS", topTaskbarCustomSlotId: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS", outlineMode: false }))), h("stack-item", null, h("snk-form-view", { ref: (ref) => this._snkFormView = ref, canExpand: false, canFix: false, name: this.selectedForm, formMetadata: this._formMetadata, dataUnit: this.dataUnit, fields: this.getFormFields(), fieldToFocus: this._fieldToGetFocus, label: this.label, levelPath: this._levelPath, onFormItemsReady: ({ detail: formItems }) => this.formItemsReady.emit(formItems), onSnkRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this), fieldSearch: this._fieldSearch }, h("snk-taskbar", { key: "guideViewerTaskbar", class: "form-taskbar", "data-element-id": "guideViewer", configName: this._configName, messagesBuilder: this.messagesBuilder, disabledButtons: this._disabledButtons, buttons: "INSERT,PREVIOUS,NEXT,DIVIDER,CLONE,REMOVE,MORE_OPTIONS,DIVIDER,GRID_MODE,CONFIGURATOR", primaryButton: "INSERT", presentationMode: this.presentationMode, onActionClick: evt => this.executeActionHandler(evt), dataUnit: this.dataUnit, resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: "DETAIL_TASKBAR_CUSTOM_ELEMENTS", actionsSettingsList: this.getSettingsListForm() }, h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" })))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this.entityName, onBack: this.handleAttachBack.bind(this) }))))));
|
|
252
303
|
}
|
|
253
304
|
static get is() { return "snk-detail-view"; }
|
|
254
305
|
static get encapsulation() { return "scoped"; }
|
|
@@ -576,7 +627,9 @@ export class SnkDetailView {
|
|
|
576
627
|
return {
|
|
577
628
|
"_disabledButtons": {},
|
|
578
629
|
"_currentView": {},
|
|
579
|
-
"attachmentRegisterKey": {}
|
|
630
|
+
"attachmentRegisterKey": {},
|
|
631
|
+
"_fieldToGetFocus": {},
|
|
632
|
+
"_hasToCreateFieldSearch": {}
|
|
580
633
|
};
|
|
581
634
|
}
|
|
582
635
|
static get events() {
|
|
@@ -756,6 +809,7 @@ export class SnkDetailView {
|
|
|
756
809
|
}
|
|
757
810
|
};
|
|
758
811
|
}
|
|
812
|
+
static get elementRef() { return "_element"; }
|
|
759
813
|
static get watchers() {
|
|
760
814
|
return [{
|
|
761
815
|
"propName": "dataUnit",
|