@sankhyalabs/sankhyablocks 8.16.0-dev.114 → 8.16.0-dev.115
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/FormConfigHelper-c664dbae.js +260 -0
- package/dist/cjs/{SnkFormConfigManager-ce7b0951.js → SnkFormConfigManager-aa4631bd.js} +2 -3
- package/dist/cjs/{SnkMessageBuilder-21cc7f09.js → SnkMessageBuilder-e3b7850b.js} +16 -2
- 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/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/guides-configurator.cjs.entry.js +164 -0
- package/dist/cjs/{index-102ba62d.js → index-0ad2baeb.js} +4 -5
- package/dist/cjs/{index-f9e81701.js → index-1cf293c1.js} +28 -10
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/pesquisa-grid_2.cjs.entry.js +2 -2
- package/dist/cjs/sankhyablocks.cjs.js +2 -2
- package/dist/cjs/snk-actions-button_8.cjs.entry.js +2 -2
- package/dist/cjs/snk-actions-form.cjs.entry.js +1 -1
- package/dist/cjs/snk-application.cjs.entry.js +3 -3
- package/dist/cjs/snk-attach.cjs.entry.js +4 -4
- 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 +4 -4
- 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-7913a033.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 +1 -1
- package/dist/cjs/snk-detail-view.cjs.entry.js +7 -7
- 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 +2 -2
- package/dist/cjs/snk-filter-advanced-mode_2.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +1 -1
- 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 +1 -1
- package/dist/cjs/snk-filter-field-search_2.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +1 -1
- 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 +1 -1
- package/dist/cjs/snk-form_2.cjs.entry.js +433 -0
- package/dist/cjs/snk-grid.cjs.entry.js +5 -5
- package/dist/cjs/{snk-guides-viewer-450baf6a.js → snk-guides-viewer-edc0a00a.js} +5 -5
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +6 -6
- package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +1 -1
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +2 -2
- package/dist/cjs/snk-pesquisa.cjs.entry.js +2 -2
- 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 +6 -6
- package/dist/cjs/snk-taskbar.cjs.entry.js +3 -3
- package/dist/cjs/sortable.esm-9a110bb7.js +2668 -0
- package/dist/cjs/{taskbar-elements-6f4e06af.js → taskbar-elements-3b74cd21.js} +2 -2
- package/dist/cjs/teste-pesquisa.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +7 -14
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +1 -1
- 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/lib/message/resources/snk-form.msg.js +16 -2
- package/dist/collection/lib/utils/constants.js +7 -1
- package/dist/components/SnkFormConfigManager.js +2 -3
- package/dist/components/SnkMessageBuilder.js +16 -2
- 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/{snk-config-options.d.ts → configs-button.d.ts} +4 -4
- 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 +7 -3
- package/dist/components/index.js +7 -3
- package/dist/components/index2.js +3 -4
- package/dist/components/snk-application2.js +1 -1
- package/dist/components/snk-crud.js +86 -62
- package/dist/components/snk-detail-view2.js +113 -89
- package/dist/components/snk-form-config2.js +253 -953
- package/dist/components/snk-form.js +33 -9
- package/dist/components/sortable.esm.js +2666 -0
- package/dist/esm/{ClientSideExporterProvider-b3871edb.js → ClientSideExporterProvider-3ed744fd.js} +2 -2
- package/dist/esm/FormConfigHelper-49fe72ca.js +248 -0
- package/dist/esm/{SnkFormConfigManager-327dfdd4.js → SnkFormConfigManager-b4b93298.js} +2 -3
- package/dist/esm/{SnkMessageBuilder-0f112c19.js → SnkMessageBuilder-9c269caf.js} +16 -2
- 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/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/guides-configurator.entry.js +160 -0
- package/dist/esm/{index-a7d3d3f1.js → index-479e1293.js} +28 -10
- package/dist/esm/{index-bdf75557.js → index-b72af127.js} +4 -5
- package/dist/esm/loader.js +3 -3
- package/dist/esm/pesquisa-grid_2.entry.js +2 -2
- package/dist/esm/sankhyablocks.js +3 -3
- package/dist/esm/snk-actions-button_8.entry.js +2 -2
- package/dist/esm/snk-actions-form.entry.js +1 -1
- package/dist/esm/snk-application.entry.js +3 -3
- package/dist/esm/snk-attach.entry.js +4 -4
- 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 +4 -4
- 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-a95dc9fe.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 +1 -1
- package/dist/esm/snk-detail-view.entry.js +7 -7
- 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 +2 -2
- package/dist/esm/snk-filter-advanced-mode_2.entry.js +1 -1
- package/dist/esm/snk-filter-bar_4.entry.js +1 -1
- 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 +1 -1
- package/dist/esm/snk-filter-field-search_2.entry.js +1 -1
- package/dist/esm/snk-filter-modal-item.entry.js +1 -1
- 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 +1 -1
- package/dist/esm/snk-form_2.entry.js +428 -0
- package/dist/esm/snk-grid.entry.js +5 -5
- package/dist/esm/{snk-guides-viewer-ebb40908.js → snk-guides-viewer-32f3d3ab.js} +5 -5
- package/dist/esm/snk-guides-viewer.entry.js +6 -6
- package/dist/esm/snk-personalized-filter-editor.entry.js +1 -1
- package/dist/esm/snk-personalized-filter.entry.js +2 -2
- package/dist/esm/snk-pesquisa.entry.js +2 -2
- 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 +6 -6
- package/dist/esm/snk-taskbar.entry.js +3 -3
- package/dist/esm/sortable.esm-842f85a3.js +2666 -0
- package/dist/esm/{taskbar-elements-f2cb4922.js → taskbar-elements-171476d4.js} +2 -2
- package/dist/esm/teste-pesquisa.entry.js +1 -1
- package/dist/sankhyablocks/{p-24a0dbd2.entry.js → p-0024d3fd.entry.js} +1 -1
- package/dist/sankhyablocks/{p-e6d90f89.entry.js → p-09e60995.entry.js} +1 -1
- package/dist/sankhyablocks/{p-7effe55f.entry.js → p-0cb295c1.entry.js} +1 -1
- package/dist/sankhyablocks/{p-b0ab5066.entry.js → p-1456d7cb.entry.js} +1 -1
- package/dist/sankhyablocks/{p-9531fd46.entry.js → p-180716b2.entry.js} +1 -1
- package/dist/sankhyablocks/{p-6a03b190.entry.js → p-1ea34488.entry.js} +1 -1
- package/dist/sankhyablocks/{p-5182513e.entry.js → p-21107f0d.entry.js} +1 -1
- package/dist/sankhyablocks/{p-118e769b.entry.js → p-27482793.entry.js} +1 -1
- package/dist/sankhyablocks/{p-d257ff20.entry.js → p-290fea5f.entry.js} +1 -1
- package/dist/sankhyablocks/{p-794840bd.entry.js → p-295aa209.entry.js} +1 -1
- package/dist/sankhyablocks/{p-bd6a6203.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-39f3b02d.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-def1fe2d.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-814d99ec.entry.js → p-60dd1d27.entry.js} +1 -1
- package/dist/sankhyablocks/{p-bd7ccf60.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-a9813a81.entry.js → p-71a05822.entry.js} +1 -1
- 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-d07b18a4.js → p-7de79adf.js} +1 -1
- 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-86bd4478.entry.js +1 -0
- package/dist/sankhyablocks/p-9019a32f.js +1 -0
- package/dist/sankhyablocks/{p-70da6817.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-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-a349689a.js +1 -0
- package/dist/sankhyablocks/{p-13a0ead0.entry.js → p-a5bb2f93.entry.js} +1 -1
- package/dist/sankhyablocks/{p-088d7e7b.js → p-a6513fcb.js} +1 -1
- package/dist/sankhyablocks/{p-8c235d4c.entry.js → p-a76e6d51.entry.js} +1 -1
- package/dist/sankhyablocks/{p-ce94e6c4.entry.js → p-bd665460.entry.js} +1 -1
- 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-043bef5f.entry.js → p-c926cf6b.entry.js} +1 -1
- 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-ab12216c.entry.js → p-e2988bb1.entry.js} +1 -1
- package/dist/sankhyablocks/{p-6a5f061b.entry.js → p-e3521eae.entry.js} +1 -1
- package/dist/sankhyablocks/{p-34f7a3ab.entry.js → p-e7cccc45.entry.js} +1 -1
- package/dist/sankhyablocks/{p-1f80174b.entry.js → p-f4e31122.entry.js} +1 -1
- package/dist/sankhyablocks/{p-c7492861.js → p-fc0b609e.js} +1 -1
- package/dist/sankhyablocks/{p-a14a09c3.entry.js → p-ff7060bc.entry.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- 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.d.ts +197 -199
- package/dist/types/lib/utils/constants.d.ts +6 -0
- package/package.json +4 -2
- package/react/components.d.ts +7 -3
- package/react/components.js +7 -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/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-3749dffb.entry.js +0 -1
- package/dist/sankhyablocks/p-6dc031de.js +0 -1
- package/dist/sankhyablocks/p-79b3cccc.js +0 -1
- package/dist/sankhyablocks/p-9261d8a0.js +0 -1
- package/dist/sankhyablocks/p-c0eb761b.entry.js +0 -1
- package/dist/sankhyablocks/p-e3c71e43.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/cjs/{ClientSideExporterProvider-a2753c93.js → ClientSideExporterProvider-0ce2bcd9.js}
RENAMED
@@ -9,9 +9,9 @@ const UnitMetadata = require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetad
|
|
9
9
|
const dataunitFetcher = require('./dataunit-fetcher-a723f0dc.js');
|
10
10
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
11
11
|
require('./form-config-fetcher-40d3f752.js');
|
12
|
-
require('./constants-
|
12
|
+
require('./constants-6d82e405.js');
|
13
13
|
const InMemoryFilterColumnDataSource = require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource');
|
14
|
-
const index = require('./index-
|
14
|
+
const index = require('./index-1cf293c1.js');
|
15
15
|
const GetSelectedRecordsIDsInfo = require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
|
16
16
|
const IFetchDataExporterParams = require('./IFetchDataExporterParams-e78ec415.js');
|
17
17
|
|
@@ -0,0 +1,260 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
const core = require('@sankhyalabs/core');
|
4
|
+
const constants = require('./constants-6d82e405.js');
|
5
|
+
|
6
|
+
const iconMap = new Map([
|
7
|
+
[core.UserInterface.DATE, 'calendar'],
|
8
|
+
[core.UserInterface.DATETIME, 'calendar-clock'],
|
9
|
+
[core.UserInterface.ELAPSEDTIME, 'timer-outline'],
|
10
|
+
[core.UserInterface.TIME, 'timer-outline'],
|
11
|
+
[core.UserInterface.DECIMALNUMBER, 'number'],
|
12
|
+
[core.UserInterface.INTEGERNUMBER, 'number'],
|
13
|
+
[core.UserInterface.FILE, 'zip'],
|
14
|
+
[core.UserInterface.IMAGE, 'pdf'],
|
15
|
+
[core.UserInterface.HTML, 'tag_code'],
|
16
|
+
[core.UserInterface.SEARCH, 'search'],
|
17
|
+
[core.UserInterface.SEARCHPLUS, 'search'],
|
18
|
+
[core.UserInterface.OPTIONSELECTOR, 'list'],
|
19
|
+
[core.UserInterface.CHECKBOX, 'list'],
|
20
|
+
[core.UserInterface.SWITCH, 'boolean'],
|
21
|
+
[core.UserInterface.PASSWORD, 'eye-off'],
|
22
|
+
]);
|
23
|
+
const ID_AVAILABLE_FIELDS = 'container-available-fields';
|
24
|
+
exports.SORTABLE_PATH = void 0;
|
25
|
+
(function (SORTABLE_PATH) {
|
26
|
+
SORTABLE_PATH["FROM"] = "from";
|
27
|
+
SORTABLE_PATH["TO"] = "to";
|
28
|
+
})(exports.SORTABLE_PATH || (exports.SORTABLE_PATH = {}));
|
29
|
+
function getFieldsStructure(evt, path, group, tab) {
|
30
|
+
var _a;
|
31
|
+
const htmlStructure = (_a = evt === null || evt === void 0 ? void 0 : evt[path]) === null || _a === void 0 ? void 0 : _a.children;
|
32
|
+
if (!htmlStructure)
|
33
|
+
return [];
|
34
|
+
return Array.from(htmlStructure).map(({ fieldConfig }) => {
|
35
|
+
return Object.assign(Object.assign({}, fieldConfig), { group, tab });
|
36
|
+
});
|
37
|
+
}
|
38
|
+
function updateTabInFieldsFromGroupList(guideGroups, updatedName) {
|
39
|
+
return guideGroups.map(group => {
|
40
|
+
return Object.assign(Object.assign({}, group), { fields: group.fields.map(field => (Object.assign(Object.assign({}, field), { tab: updatedName }))) });
|
41
|
+
});
|
42
|
+
}
|
43
|
+
function getValidatedFieldValue(fieldValue, dataUnit, fieldName) {
|
44
|
+
var _a;
|
45
|
+
if (fieldValue == undefined || !dataUnit || !fieldName)
|
46
|
+
return;
|
47
|
+
const dataType = (_a = dataUnit.getField(fieldName)) === null || _a === void 0 ? void 0 : _a.dataType;
|
48
|
+
if (dataType == undefined)
|
49
|
+
return;
|
50
|
+
if ((fieldValue === null || fieldValue === void 0 ? void 0 : fieldValue.waitmessage) !== undefined)
|
51
|
+
return undefined;
|
52
|
+
const isNonObjectValue = dataType !== core.DataType.OBJECT &&
|
53
|
+
dataType !== core.DataType.DATE &&
|
54
|
+
typeof fieldValue === 'object';
|
55
|
+
const processedValue = isNonObjectValue ? fieldValue.value : fieldValue;
|
56
|
+
return dataType === core.DataType.OBJECT
|
57
|
+
? JSON.stringify(processedValue)
|
58
|
+
: processedValue;
|
59
|
+
}
|
60
|
+
function getEnabledByProperty(attribName, propertyName, fieldDescriptor) {
|
61
|
+
if (!fieldDescriptor)
|
62
|
+
return true;
|
63
|
+
const fieldProperties = fieldDescriptor.properties || {};
|
64
|
+
const fromAttribName = fieldDescriptor[attribName] !== true;
|
65
|
+
return fieldProperties.hasOwnProperty(propertyName)
|
66
|
+
? fieldProperties[propertyName] !== 'S'
|
67
|
+
: fromAttribName;
|
68
|
+
}
|
69
|
+
function getValueByProperty(property, fieldDescriptor, defaultValue) {
|
70
|
+
if (fieldDescriptor && fieldDescriptor[property] === true) {
|
71
|
+
return true;
|
72
|
+
}
|
73
|
+
return defaultValue;
|
74
|
+
}
|
75
|
+
function getIconName(userInterface) {
|
76
|
+
return iconMap.get(userInterface) || 'text';
|
77
|
+
}
|
78
|
+
function buildNewGuideName(guidesList) {
|
79
|
+
var _a, _b;
|
80
|
+
const qtdWithNewGuideName = (_b = (_a = guidesList.filter(g => g.name.includes(constants.TAB_NAMES.newGuide))) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
|
81
|
+
return qtdWithNewGuideName === 0
|
82
|
+
? constants.TAB_NAMES.newGuide
|
83
|
+
: `${constants.TAB_NAMES.newGuide} (${qtdWithNewGuideName})`;
|
84
|
+
}
|
85
|
+
function getFieldsToSave(guidesMap) {
|
86
|
+
const fieldsToSave = [];
|
87
|
+
guidesMap.forEach(groups => {
|
88
|
+
groups.forEach(({ fields }) => {
|
89
|
+
fields === null || fields === void 0 ? void 0 : fields.forEach((fieldConfig) => {
|
90
|
+
fieldsToSave.push(buildFieldToSave(fieldConfig));
|
91
|
+
});
|
92
|
+
});
|
93
|
+
});
|
94
|
+
return fieldsToSave;
|
95
|
+
}
|
96
|
+
function buildGuidesMap(rawFields, tabs, dataUnit, generalTab) {
|
97
|
+
const fields = handleFieldsTabNames(rawFields);
|
98
|
+
const guidesMap = initGuidesMap(tabs);
|
99
|
+
if (!(fields === null || fields === void 0 ? void 0 : fields.length))
|
100
|
+
return;
|
101
|
+
for (let guideName of guidesMap.keys()) {
|
102
|
+
const fieldsFromGuide = getFieldsFromGuide(fields, guideName, generalTab);
|
103
|
+
const fieldsByGroupMap = getGroupsFromGuide(fieldsFromGuide, dataUnit, generalTab);
|
104
|
+
const groupsList = parserGroupMapIntoList(fieldsByGroupMap);
|
105
|
+
guidesMap.set(guideName, groupsList);
|
106
|
+
}
|
107
|
+
return guidesMap;
|
108
|
+
}
|
109
|
+
function buildGuides(config, mainArea) {
|
110
|
+
let tabs = config.tabs ? [...config.tabs] : buildTabsFromFields(config === null || config === void 0 ? void 0 : config.fields);
|
111
|
+
tabs = getPossibleGuides(tabs);
|
112
|
+
tabs = initializeTabsNames(tabs);
|
113
|
+
return handleMainTab(tabs, mainArea);
|
114
|
+
}
|
115
|
+
function handleFieldsTabNames(allFields) {
|
116
|
+
// Campos que não fazem parte de nenhuma aba ou da aba "Geral", devem ser movidos para a aba __main.
|
117
|
+
return allFields.map(field => {
|
118
|
+
const tabName = field.tab;
|
119
|
+
return Object.assign(Object.assign({}, field), { tab: (!tabName || tabName === constants.TAB_NAMES.general) ? constants.TAB_NAMES.main : field.tab });
|
120
|
+
});
|
121
|
+
}
|
122
|
+
function initializeTabsNames(tabs) {
|
123
|
+
return tabs.map((tab) => {
|
124
|
+
return Object.assign(Object.assign({}, tab), { name: tab.name ? tab.name : tab.label });
|
125
|
+
});
|
126
|
+
}
|
127
|
+
function handleMainTab(tabs, mainTabName) {
|
128
|
+
const mainTab = { name: constants.TAB_NAMES.main, label: mainTabName, visible: true };
|
129
|
+
const hasTabMain = tabs.some((tab) => tab.name === constants.TAB_NAMES.main);
|
130
|
+
if (hasTabMain) {
|
131
|
+
tabs = tabs.map(tab => tab.name === constants.TAB_NAMES.main ? mainTab : tab);
|
132
|
+
}
|
133
|
+
else {
|
134
|
+
tabs.unshift(mainTab);
|
135
|
+
}
|
136
|
+
return tabs;
|
137
|
+
}
|
138
|
+
function getPossibleGuides(tabs) {
|
139
|
+
//O usuário não pode criar uma guia com o nome "Geral".
|
140
|
+
// Nesses casos, precisamos mover os campos dessa guia, para a guia __main.
|
141
|
+
return [...tabs.filter(tab => tab.label !== constants.TAB_NAMES.general)];
|
142
|
+
}
|
143
|
+
function initGuidesMap(tabs) {
|
144
|
+
const map = new Map();
|
145
|
+
let possibleGuides = getPossibleGuides(tabs);
|
146
|
+
possibleGuides.forEach(tab => {
|
147
|
+
map.set(tab.name, []);
|
148
|
+
});
|
149
|
+
return map;
|
150
|
+
}
|
151
|
+
function handleFieldLabel(field, fieldDescriptor) {
|
152
|
+
if (!field.label) {
|
153
|
+
field.label = fieldDescriptor.label;
|
154
|
+
}
|
155
|
+
}
|
156
|
+
function handleFieldTab(field, generalTabName) {
|
157
|
+
if (!field.tab) {
|
158
|
+
field.tab = generalTabName;
|
159
|
+
}
|
160
|
+
}
|
161
|
+
function handleFieldGroup(field) {
|
162
|
+
if (!field.group) {
|
163
|
+
field.group = constants.GROUP_NAMES.noGroup;
|
164
|
+
}
|
165
|
+
}
|
166
|
+
function isVisibleOnConfig(fieldDescriptor) {
|
167
|
+
var _a;
|
168
|
+
/**
|
169
|
+
* Quando um campo é ocultado pelo dev, mas queremos manter ele na config precisamos fazer essa tratativa.
|
170
|
+
*/
|
171
|
+
return ((_a = fieldDescriptor === null || fieldDescriptor === void 0 ? void 0 : fieldDescriptor.properties) === null || _a === void 0 ? void 0 : _a.visibleOnConfig) === true && (fieldDescriptor === null || fieldDescriptor === void 0 ? void 0 : fieldDescriptor.visible) === false;
|
172
|
+
}
|
173
|
+
function getGroupsFromGuide(fieldsFromGuide, dataUnit, generalTabName) {
|
174
|
+
const groupsMap = new Map();
|
175
|
+
groupsMap.set(constants.GROUP_NAMES.noGroup, []);
|
176
|
+
for (let field of fieldsFromGuide) {
|
177
|
+
const fieldDescriptor = dataUnit.getField(field.name);
|
178
|
+
if (!(fieldDescriptor === null || fieldDescriptor === void 0 ? void 0 : fieldDescriptor.visible) && !isVisibleOnConfig(fieldDescriptor))
|
179
|
+
continue;
|
180
|
+
handleFieldLabel(field, fieldDescriptor);
|
181
|
+
handleFieldTab(field, generalTabName);
|
182
|
+
handleFieldGroup(field);
|
183
|
+
if (groupsMap.has(field.group)) {
|
184
|
+
groupsMap.get(field.group).push(field);
|
185
|
+
}
|
186
|
+
else {
|
187
|
+
groupsMap.set(field.group, [field]);
|
188
|
+
}
|
189
|
+
}
|
190
|
+
return groupsMap;
|
191
|
+
}
|
192
|
+
function getFieldsFromGuide(fields, guideName, generalTabName) {
|
193
|
+
return fields.filter(field => {
|
194
|
+
const fieldTab = getTabName(field.tab, generalTabName);
|
195
|
+
return fieldTab === guideName;
|
196
|
+
});
|
197
|
+
}
|
198
|
+
function getTabName(tab, generalTabName) {
|
199
|
+
var _a;
|
200
|
+
if (typeof tab === 'string')
|
201
|
+
return tab;
|
202
|
+
return (_a = tab === null || tab === void 0 ? void 0 : tab.label) !== null && _a !== void 0 ? _a : generalTabName;
|
203
|
+
}
|
204
|
+
function parserGroupMapIntoList(groupsMap) {
|
205
|
+
const groupsList = [];
|
206
|
+
for (let groupName of groupsMap.keys()) {
|
207
|
+
groupsList.push({ name: groupName, fields: groupsMap.get(groupName) });
|
208
|
+
}
|
209
|
+
return groupsList;
|
210
|
+
}
|
211
|
+
function canAddTab(tab, guideList) {
|
212
|
+
return tab && !(guideList.map(g => g.name).includes(tab));
|
213
|
+
}
|
214
|
+
function buildTabsFromFields(fields) {
|
215
|
+
const guideList = [];
|
216
|
+
let order = 1;
|
217
|
+
fields === null || fields === void 0 ? void 0 : fields.forEach((field) => {
|
218
|
+
const tab = field.tab;
|
219
|
+
if (canAddTab(tab, guideList)) {
|
220
|
+
guideList.push({ name: tab, label: tab, visible: true, order });
|
221
|
+
order = order + 1;
|
222
|
+
}
|
223
|
+
});
|
224
|
+
return guideList;
|
225
|
+
}
|
226
|
+
function buildFieldToSave(fieldConfig) {
|
227
|
+
const fieldToSave = {
|
228
|
+
cleanOnCopy: fieldConfig.cleanOnCopy || false,
|
229
|
+
group: fieldConfig.group === constants.GROUP_NAMES.noGroup ? undefined : fieldConfig.group,
|
230
|
+
label: fieldConfig.label,
|
231
|
+
name: fieldConfig.name,
|
232
|
+
required: fieldConfig.required,
|
233
|
+
readOnly: fieldConfig.readOnly,
|
234
|
+
tab: fieldConfig.tab,
|
235
|
+
};
|
236
|
+
if (fieldConfig.defaultValue != undefined) {
|
237
|
+
if (fieldConfig.defaultValue.type == undefined) {
|
238
|
+
fieldToSave.defaultValue = {
|
239
|
+
type: constants.DEFAULT_TYPE.fixed,
|
240
|
+
value: fieldConfig.defaultValue,
|
241
|
+
};
|
242
|
+
}
|
243
|
+
else {
|
244
|
+
fieldToSave.defaultValue = fieldConfig.defaultValue;
|
245
|
+
}
|
246
|
+
}
|
247
|
+
return fieldToSave;
|
248
|
+
}
|
249
|
+
|
250
|
+
exports.ID_AVAILABLE_FIELDS = ID_AVAILABLE_FIELDS;
|
251
|
+
exports.buildGuides = buildGuides;
|
252
|
+
exports.buildGuidesMap = buildGuidesMap;
|
253
|
+
exports.buildNewGuideName = buildNewGuideName;
|
254
|
+
exports.getEnabledByProperty = getEnabledByProperty;
|
255
|
+
exports.getFieldsStructure = getFieldsStructure;
|
256
|
+
exports.getFieldsToSave = getFieldsToSave;
|
257
|
+
exports.getIconName = getIconName;
|
258
|
+
exports.getValidatedFieldValue = getValidatedFieldValue;
|
259
|
+
exports.getValueByProperty = getValueByProperty;
|
260
|
+
exports.updateTabInFieldsFromGroupList = updateTabInFieldsFromGroupList;
|
@@ -3,7 +3,7 @@
|
|
3
3
|
const ConfigStorage = require('./ConfigStorage-48ba265b.js');
|
4
4
|
const core = require('@sankhyalabs/core');
|
5
5
|
const formConfigFetcher = require('./form-config-fetcher-40d3f752.js');
|
6
|
-
const constants = require('./constants-
|
6
|
+
const constants = require('./constants-6d82e405.js');
|
7
7
|
|
8
8
|
class SnkFormConfigManager {
|
9
9
|
constructor(configName, resourceID, onConfigChange, dataUnit) {
|
@@ -31,8 +31,7 @@ class SnkFormConfigManager {
|
|
31
31
|
});
|
32
32
|
}
|
33
33
|
getEmptyConfig() {
|
34
|
-
|
35
|
-
return config;
|
34
|
+
return this.buildFormMetadataUITabs({ fields: [], emptyConfig: true }, true);
|
36
35
|
}
|
37
36
|
saveConfig(config) {
|
38
37
|
const configToSave = core.ObjectUtils.copy(config);
|
@@ -239,23 +239,37 @@ const snkFormConfigMessages = {
|
|
239
239
|
mainArea: "Área principal",
|
240
240
|
tabGeneral: "Geral"
|
241
241
|
},
|
242
|
+
configs: {
|
243
|
+
buttonLabel: "Configurações",
|
244
|
+
selectedConfig: "configuração selecionada"
|
245
|
+
},
|
242
246
|
confirm: {
|
243
247
|
title: "Aviso",
|
244
248
|
deleteTab: "Você realmente deseja excluir a aba",
|
249
|
+
deleteGuide: "Deseja realmente excluir a guia <b>{0}</b>?",
|
245
250
|
cancel: "As alterações realizadas serão descartadas.<br/><br/><b>Gostaria de continuar?</b>",
|
246
251
|
exit: "Ao sair as alterações serão descartadas.<br/><br/><b>Você realmente gostaria de sair?</b>",
|
247
|
-
apply: "A <b>{0}</b> irá substituir a
|
252
|
+
apply: "A <b>{0}</b> irá substituir a configuração atual!<br/><br/><b>Deseja continuar?</b>",
|
248
253
|
group: "Não é possível salvar as configurações com um grupo vazio!",
|
249
254
|
labelCancel: "Cancelar",
|
250
255
|
labelDelete: "Excluir"
|
251
256
|
},
|
257
|
+
noGuideSelected: {
|
258
|
+
title: "Atenção",
|
259
|
+
message: "Selecione uma guia para iniciar a configuração!"
|
260
|
+
},
|
252
261
|
alert: {
|
253
262
|
titleGroupExists: "Já existe um grupo com título",
|
263
|
+
titleGroupEditing: "Há um <b>grupo<b/> em edição. <br/> Finalize a edição para salvar as configurações.",
|
264
|
+
titleGuideExists: "Já existe uma guia com título",
|
265
|
+
titleGuideEditing: "Há uma <b>guia<b/> em edição. <br/> Finalize a edição para salvar as configurações.",
|
266
|
+
titleGuideReservedName: "Este título é reservado para configurações internas do sistema e não pode ser utilizado.",
|
254
267
|
infoValidTitle: "Por favor, digite um título válido.",
|
255
268
|
inTab: "na aba"
|
256
269
|
},
|
257
270
|
info: {
|
258
|
-
successfullyConfigSaved: "As configurações foram salvas com sucesso!"
|
271
|
+
successfullyConfigSaved: "As configurações foram salvas com sucesso!",
|
272
|
+
successfullyGuideDeleted: 'A guia "{0}" foi excluída. Salve para confirmar a alteração.'
|
259
273
|
}
|
260
274
|
};
|
261
275
|
const snkFieldConfigMessages = {
|
@@ -0,0 +1,79 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
const index = require('./index-1cf293c1.js');
|
6
|
+
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
7
|
+
|
8
|
+
const configHeaderCss = ".sc-config-header-h{display:flex;padding-top:12px;padding-left:12px;align-items:center;width:100%;justify-content:space-between}.left-group.sc-config-header{display:flex;gap:8px}.right-group.sc-config-header{padding-right:18px;display:flex}";
|
9
|
+
|
10
|
+
const ConfigHeader = class {
|
11
|
+
constructor(hostRef) {
|
12
|
+
index.registerInstance(this, hostRef);
|
13
|
+
this.configClose = index.createEvent(this, "configClose", 7);
|
14
|
+
this.saveConfig = index.createEvent(this, "saveConfig", 7);
|
15
|
+
this.isEditingGuide = false;
|
16
|
+
this.isEditingGroup = false;
|
17
|
+
this.configOptions = [];
|
18
|
+
this.selectedConfig = undefined;
|
19
|
+
this.messagesBuilder = undefined;
|
20
|
+
this.hasChanges = false;
|
21
|
+
this.optionConfigChanged = false;
|
22
|
+
}
|
23
|
+
handleIsEditingGuideName({ detail }) {
|
24
|
+
this.isEditingGuide = detail;
|
25
|
+
}
|
26
|
+
handleIsEditingGroupName({ detail }) {
|
27
|
+
this.isEditingGroup = detail;
|
28
|
+
}
|
29
|
+
saveFormConfig() {
|
30
|
+
if (this.isEditingGuide || this.isEditingGroup) {
|
31
|
+
const title = this.getMessage('snkFormConfig.confirm.title');
|
32
|
+
const message = this.isEditingGuide
|
33
|
+
? this.getMessage('snkFormConfig.alert.titleGuideEditing')
|
34
|
+
: this.getMessage('snkFormConfig.alert.titleGroupEditing');
|
35
|
+
utils.ApplicationUtils.alert(title, message);
|
36
|
+
return;
|
37
|
+
}
|
38
|
+
this.saveConfig.emit();
|
39
|
+
}
|
40
|
+
async closeFormConfig() {
|
41
|
+
if (this.hasChanges) {
|
42
|
+
const title = this.getMessage('snkFormConfig.confirm.title');
|
43
|
+
const msg = this.getMessage('snkFormConfig.confirm.cancel');
|
44
|
+
const confirm = await utils.ApplicationUtils.confirm(title, msg);
|
45
|
+
if (!confirm)
|
46
|
+
return;
|
47
|
+
}
|
48
|
+
this.configClose.emit();
|
49
|
+
}
|
50
|
+
getMessage(key, params) {
|
51
|
+
return this.messagesBuilder.getMessage(key, params);
|
52
|
+
}
|
53
|
+
openConfirmDialog(msg = '', title = this.getMessage('snkFormConfig.confirm.title')) {
|
54
|
+
return utils.ApplicationUtils.confirm(title, msg);
|
55
|
+
}
|
56
|
+
async applyOptionConfig() {
|
57
|
+
var _a, _b;
|
58
|
+
const name = (_b = (_a = this.selectedConfig) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : this.getMessage('snkFormConfig.configs.selectedConfig');
|
59
|
+
const msg = this.getMessage('snkFormConfig.confirm.apply').replace('{0}', name);
|
60
|
+
const confirm = await this.openConfirmDialog(msg);
|
61
|
+
if (confirm) {
|
62
|
+
this.saveConfig.emit();
|
63
|
+
}
|
64
|
+
}
|
65
|
+
renderSaveActions() {
|
66
|
+
if (!this.hasChanges && !this.optionConfigChanged)
|
67
|
+
return;
|
68
|
+
if (this.hasChanges) {
|
69
|
+
return (index.h("div", { class: "right-group" }, index.h("ez-button", { title: 'Cancelar', label: 'Cancelar', onClick: this.closeFormConfig.bind(this), size: "medium" }), index.h("ez-button", { title: 'Salvar', label: 'Salvar', class: 'ez-button--primary ez-padding-left--medium', onClick: () => this.saveFormConfig(), size: "medium" })));
|
70
|
+
}
|
71
|
+
return (index.h("div", { class: "right-group" }, index.h("ez-button", { title: 'Cancelar', label: 'Cancelar', onClick: this.closeFormConfig.bind(this), size: "medium" }), index.h("ez-button", { title: 'Salvar', label: this.getMessage('snkFormConfig.applyConfig'), class: 'ez-button--primary ez-padding-left--medium', onClick: async () => await this.applyOptionConfig(), size: "medium" })));
|
72
|
+
}
|
73
|
+
render() {
|
74
|
+
return (index.h(index.Host, null, index.h("div", { class: 'left-group' }, index.h("ez-button", { mode: "icon", title: this.getMessage('snkFormConfig.goBackTitle'), iconName: "arrow_back", class: "ez-padding--small", size: "small", onClick: this.closeFormConfig.bind(this), id: "formConfigToBack" }), index.h("h1", { class: "ez-title ez-title--primary ez-title--extra-large ez-padding--small" }, this.getMessage('snkFormConfig.title')), index.h("configs-button", { hasChanges: this.hasChanges, configOptions: this.configOptions, selectedConfig: this.selectedConfig, messagesBuilder: this.messagesBuilder })), this.renderSaveActions()));
|
75
|
+
}
|
76
|
+
};
|
77
|
+
ConfigHeader.style = configHeaderCss;
|
78
|
+
|
79
|
+
exports.config_header = ConfigHeader;
|
@@ -0,0 +1,61 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
const index = require('./index-1cf293c1.js');
|
6
|
+
const core = require('@sankhyalabs/core');
|
7
|
+
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
8
|
+
|
9
|
+
const configsButtonCss = ".dropdown-container.sc-configs-button{font-family:'Roboto';font-size:12px;font-weight:400;display:flex;flex-direction:column;color:#2b3a54;width:200px}.main-item.sc-configs-button{padding:12px;font-size:14px;cursor:pointer;transition:all .2s ease-in-out;display:flex;flex-direction:row;gap:8px;align-items:center;justify-content:start}.main-item.sc-configs-button ez-icon.sc-configs-button{--ez-icon--color:#008561}.main-item.sc-configs-button:nth-of-type(1){padding-bottom:6px}.main-item.sc-configs-button:nth-of-type(2){padding-top:6px}.main-item.sc-configs-button:hover{background-color:#FAFCFF}.item-label.sc-configs-button{display:flex}";
|
10
|
+
|
11
|
+
const ConfigsButton = class {
|
12
|
+
constructor(hostRef) {
|
13
|
+
index.registerInstance(this, hostRef);
|
14
|
+
this.formConfigOptionSelected = index.createEvent(this, "formConfigOptionSelected", 7);
|
15
|
+
this.configOptions = [];
|
16
|
+
this.selectedConfig = undefined;
|
17
|
+
this.hasChanges = false;
|
18
|
+
this.messagesBuilder = undefined;
|
19
|
+
}
|
20
|
+
getMessage(key, params) {
|
21
|
+
return this.messagesBuilder.getMessage(key, params);
|
22
|
+
}
|
23
|
+
async showShareConfigOptions() {
|
24
|
+
if (this._refOptionsPopover && this._refShareConfigBtn) {
|
25
|
+
await this._refOptionsPopover.showUnder(this._refShareConfigBtn);
|
26
|
+
}
|
27
|
+
}
|
28
|
+
async handleSelectOption(option) {
|
29
|
+
if (core.ObjectUtils.equals(option, this.selectedConfig))
|
30
|
+
return;
|
31
|
+
if (this.hasChanges) {
|
32
|
+
const title = this.getMessage('snkFormConfig.confirm.title');
|
33
|
+
const msg = this.getMessage('snkFormConfig.confirm.cancel');
|
34
|
+
const confirm = await utils.ApplicationUtils.confirm(title, msg);
|
35
|
+
if (!confirm)
|
36
|
+
return;
|
37
|
+
}
|
38
|
+
this.selectedConfig = option;
|
39
|
+
this.formConfigOptionSelected.emit(option);
|
40
|
+
await this._refOptionsPopover.hide();
|
41
|
+
}
|
42
|
+
getButtonLabel() {
|
43
|
+
var _a, _b;
|
44
|
+
return (_b = (_a = this.selectedConfig) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : this.getMessage('snkFormConfig.configs.buttonLabel');
|
45
|
+
}
|
46
|
+
renderConfigOptions() {
|
47
|
+
return this.configOptions.map((option) => {
|
48
|
+
return (index.h("div", { class: `main-item`, onClick: async () => await this.handleSelectOption(option) }, index.h("span", { class: 'item-label' }, " ", option.name), this.renderCheckIcon(option)));
|
49
|
+
});
|
50
|
+
}
|
51
|
+
renderCheckIcon(option) {
|
52
|
+
if (this.selectedConfig && this.selectedConfig.origin === option.origin)
|
53
|
+
return index.h("ez-icon", { iconName: "check" });
|
54
|
+
}
|
55
|
+
render() {
|
56
|
+
return (index.h(index.Host, null, index.h("ez-button", { ref: ref => this._refShareConfigBtn = ref, label: this.getButtonLabel(), onClick: async () => await this.showShareConfigOptions() }, index.h("ez-icon", { slot: "rightIcon", iconName: "chevron-down" })), index.h("ez-popover-plus", { ref: ref => this._refOptionsPopover = ref, autoClose: true, overlayType: "none" }, index.h("div", { class: 'dropdown-container' }, this.renderConfigOptions()))));
|
57
|
+
}
|
58
|
+
};
|
59
|
+
ConfigsButton.style = configsButtonCss;
|
60
|
+
|
61
|
+
exports.configs_button = ConfigsButton;
|
@@ -7,11 +7,6 @@ exports.VIEW_MODE = void 0;
|
|
7
7
|
VIEW_MODE[VIEW_MODE["FORM"] = 1] = "FORM";
|
8
8
|
VIEW_MODE[VIEW_MODE["ATTACHMENT"] = 2] = "ATTACHMENT";
|
9
9
|
})(exports.VIEW_MODE || (exports.VIEW_MODE = {}));
|
10
|
-
const ACTION_CONFIG = {
|
11
|
-
add: 'ADD',
|
12
|
-
remove: 'REMOVE',
|
13
|
-
configuration: 'CONFIGURATION'
|
14
|
-
};
|
15
10
|
const VARS_BY_TYPE = {
|
16
11
|
UserInterface: {
|
17
12
|
DATE: [{ label: "Data atual", value: "${data}" }],
|
@@ -28,35 +23,14 @@ const DEFAULT_TYPE = {
|
|
28
23
|
fixed: "F",
|
29
24
|
variable: "V"
|
30
25
|
};
|
31
|
-
const CONFIG_EVENTS = {
|
32
|
-
closeModal: "ezCloseModal",
|
33
|
-
cancelConfig: "cancelConfig",
|
34
|
-
changeConfig: "changeConfig",
|
35
|
-
configChanged: "configChanged",
|
36
|
-
fieldChanged: "ezChange",
|
37
|
-
dragStartDistance: 40
|
38
|
-
};
|
39
|
-
const CONFIG_SORTABLE_EVENTS = {
|
40
|
-
dragStart: "sortable:start",
|
41
|
-
dragSort: "sortable:sort",
|
42
|
-
dragSorted: "sortable:sorted",
|
43
|
-
dragStop: "sortable:stop"
|
44
|
-
};
|
45
|
-
const KEY_EVENTS = {
|
46
|
-
enter: "Enter",
|
47
|
-
arrowLeft: "ArrowLeft",
|
48
|
-
arrowRight: "ArrowRight",
|
49
|
-
tab: "Tab",
|
50
|
-
escape: "Escape"
|
51
|
-
};
|
52
|
-
const TYPE_ACTIONS = {
|
53
|
-
rename: "RENAME",
|
54
|
-
hide: "HIDE",
|
55
|
-
show: "SHOW",
|
56
|
-
delete: "DELETE"
|
57
|
-
};
|
58
26
|
const TAB_NAMES = {
|
59
|
-
main: "__main"
|
27
|
+
main: "__main",
|
28
|
+
general: "Geral",
|
29
|
+
newGuide: "Nova guia",
|
30
|
+
};
|
31
|
+
const GROUP_NAMES = {
|
32
|
+
noGroup: "__no_group",
|
33
|
+
newGroup: "Novo Grupo",
|
60
34
|
};
|
61
35
|
const TAGS_BY_TYPE = {
|
62
36
|
LONGTEXT: "ez-text-area",
|
@@ -102,14 +76,10 @@ exports.TEMPLATES_SKELETON = void 0;
|
|
102
76
|
TEMPLATES_SKELETON[TEMPLATES_SKELETON["FORM_WITH_SIDEBAR"] = 4] = "FORM_WITH_SIDEBAR";
|
103
77
|
})(exports.TEMPLATES_SKELETON || (exports.TEMPLATES_SKELETON = {}));
|
104
78
|
|
105
|
-
exports.ACTION_CONFIG = ACTION_CONFIG;
|
106
|
-
exports.CONFIG_EVENTS = CONFIG_EVENTS;
|
107
|
-
exports.CONFIG_SORTABLE_EVENTS = CONFIG_SORTABLE_EVENTS;
|
108
79
|
exports.DEFAULT_TYPE = DEFAULT_TYPE;
|
109
|
-
exports.
|
80
|
+
exports.GROUP_NAMES = GROUP_NAMES;
|
110
81
|
exports.ORDER_VALUES = ORDER_VALUES;
|
111
82
|
exports.REPORT_LAUNCHER_RESOURCE_ID = REPORT_LAUNCHER_RESOURCE_ID;
|
112
83
|
exports.TAB_NAMES = TAB_NAMES;
|
113
84
|
exports.TAGS_BY_TYPE = TAGS_BY_TYPE;
|
114
|
-
exports.TYPE_ACTIONS = TYPE_ACTIONS;
|
115
85
|
exports.VARS_BY_TYPE = VARS_BY_TYPE;
|