@sankhyalabs/ezui 7.1.0-dev.21 → 7.1.0-dev.23
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/{ApplicationUtils-4fb87a9e.js → ApplicationUtils-006ca96f.js} +1 -1
- package/dist/cjs/FormLayout-fe8da83c.js +9 -0
- package/dist/cjs/{app-globals-cb31a206.js → app-globals-5cb12916.js} +1 -1
- package/dist/cjs/{ez-combo-box-list_5.cjs.entry.js → classic-search-list_7.cjs.entry.js} +212 -5
- package/dist/cjs/ez-actions-button.cjs.entry.js +4 -3
- package/dist/cjs/ez-alert-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-avatar.cjs.entry.js +1 -1
- package/dist/cjs/ez-calendar.cjs.entry.js +1 -1
- package/dist/cjs/ez-classic-combo-box.cjs.entry.js +36 -15
- package/dist/cjs/ez-classic-date-input.cjs.entry.js +201 -0
- package/dist/cjs/ez-classic-date-time-input.cjs.entry.js +246 -0
- package/dist/cjs/ez-classic-input.cjs.entry.js +99 -18
- package/dist/cjs/ez-classic-number-input.cjs.entry.js +205 -0
- package/dist/cjs/ez-classic-search-plus.cjs.entry.js +407 -0
- package/dist/cjs/ez-classic-search.cjs.entry.js +683 -0
- package/dist/cjs/ez-classic-text-area.cjs.entry.js +1 -1
- package/dist/cjs/ez-classic-time-input.cjs.entry.js +197 -0
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +4 -3
- package/dist/cjs/ez-combo-box.cjs.entry.js +4 -3
- package/dist/cjs/ez-date-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-date-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ez-double-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-file-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-form-view.cjs.entry.js +121 -35
- package/dist/cjs/ez-form.cjs.entry.js +11 -7
- package/dist/cjs/ez-grid.cjs.entry.js +7 -6
- package/dist/cjs/ez-guide-navigator.cjs.entry.js +1 -1
- package/dist/cjs/ez-icon.cjs.entry.js +1 -1
- package/dist/cjs/ez-link-builder_6.cjs.entry.js +1 -1
- package/dist/cjs/ez-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal-container.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal.cjs.entry.js +1 -1
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-number-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-pagination.cjs.entry.js +1 -1
- package/dist/cjs/ez-popup.cjs.entry.js +1 -1
- package/dist/cjs/ez-search-plus.cjs.entry.js +7 -6
- package/dist/cjs/ez-search-result-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-search.cjs.entry.js +10 -9
- package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +1 -1
- package/dist/cjs/ez-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/ez-sortable-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-spinner.cjs.entry.js +1 -1
- package/dist/cjs/ez-split-button.cjs.entry.js +13 -14
- package/dist/cjs/ez-split-item.cjs.entry.js +4 -3
- package/dist/cjs/ez-text-input.cjs.entry.js +37 -0
- package/dist/cjs/ez-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-tree.cjs.entry.js +1 -1
- package/dist/cjs/ez-upload.cjs.entry.js +2 -2
- package/dist/cjs/ezui.cjs.js +3 -3
- package/dist/cjs/filter-column.cjs.entry.js +1 -1
- package/dist/cjs/{index-e61642ff.js → index-350d0fa0.js} +30 -0
- package/dist/cjs/index-a7b0c73d.js +42 -18
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{search-column-51e50b59.js → search-column-fbf680d7.js} +10 -5
- package/dist/cjs/searchFormatters-051f8677.js +23 -0
- package/dist/cjs/{FormLayout-18853e70.js → types-6a5df0c7.js} +0 -6
- package/dist/collection/collection-manifest.json +58 -5
- package/dist/collection/components/ez-classic-combo-box/ez-classic-combo-box.css +5 -0
- package/dist/collection/components/ez-classic-combo-box/ez-classic-combo-box.js +77 -18
- package/dist/collection/components/ez-classic-date-input/ez-classic-date-input.css +44 -0
- package/dist/collection/components/ez-classic-date-input/ez-classic-date-input.js +541 -0
- package/dist/collection/components/ez-classic-date-time-input/ez-classic-date-time-input.css +44 -0
- package/dist/collection/components/ez-classic-date-time-input/ez-classic-date-time-input.js +586 -0
- package/dist/collection/components/ez-classic-input/ez-classic-input.css +33 -5
- package/dist/collection/components/ez-classic-input/ez-classic-input.js +155 -19
- package/dist/collection/components/ez-classic-number-input/ez-classic-number-input.css +16 -0
- package/dist/collection/components/ez-classic-number-input/ez-classic-number-input.js +583 -0
- package/dist/collection/components/ez-classic-search/ez-classic-search.css +126 -0
- package/dist/collection/components/ez-classic-search/ez-classic-search.js +1330 -0
- package/dist/collection/components/ez-classic-search/subcomponent/classic-search-list/classic-search-list.css +227 -0
- package/dist/collection/components/ez-classic-search/subcomponent/classic-search-list/classic-search-list.js +316 -0
- package/dist/collection/components/ez-classic-search/utils/searchFormatters.js +18 -0
- package/dist/collection/components/ez-classic-search-plus/ez-classic-search-plus.css +406 -0
- package/dist/collection/components/ez-classic-search-plus/ez-classic-search-plus.js +988 -0
- package/dist/collection/components/ez-classic-search-plus/subcomponent/ez-search-result-list/ez-classic-search-result-list.css +221 -0
- package/dist/collection/components/ez-classic-search-plus/subcomponent/ez-search-result-list/ez-classic-search-result-list.js +298 -0
- package/dist/collection/components/ez-classic-text-area/ez-classic-text-area.css +1 -0
- package/dist/collection/components/ez-classic-time-input/ez-classic-time-input.css +14 -0
- package/dist/collection/components/ez-classic-time-input/ez-classic-time-input.js +511 -0
- package/dist/collection/components/ez-form/ez-form.js +9 -5
- package/dist/collection/components/ez-form-view/ez-form-view.css +8 -3
- package/dist/collection/components/ez-form-view/ez-form-view.js +40 -4
- package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js +6 -3
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/CheckBox.tpl.js +9 -6
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/ComboBox.tpl.js +8 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.js +30 -6
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/FileInput.tpl.js +1 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/NumberInput.tpl.js +12 -5
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/RichText.tpl.js +1 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.js +9 -3
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInputPlus.tpl.js +8 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextArea.tpl.js +7 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.js +8 -1
- package/dist/collection/components/ez-form-view/structure/index.js +1 -1
- package/dist/collection/components/ez-icon/ez-icon.css +1 -0
- package/dist/collection/components/ez-rich-text/ez-rich-text.js +2 -3
- package/dist/collection/components/ez-split-button/ez-split-button.js +18 -13
- package/dist/collection/components/ez-text-input/ez-text-input.js +38 -1
- package/dist/collection/utils/form/DataBinder.js +2 -2
- package/dist/collection/utils/form/interfaces/FormLayout.js +3 -1
- package/dist/collection/utils/i18n/locales/en-us.js +10 -0
- package/dist/collection/utils/i18n/locales/es-es.js +10 -0
- package/dist/collection/utils/i18n/locales/pt-br.js +10 -0
- package/dist/collection/utils/searchColumn/search-column.js +6 -1
- package/dist/custom-elements/index.d.ts +48 -0
- package/dist/custom-elements/index.js +2722 -337
- package/dist/esm/{ApplicationUtils-985c24ae.js → ApplicationUtils-0c5cb207.js} +1 -1
- package/dist/esm/FormLayout-bda67973.js +9 -0
- package/dist/esm/{app-globals-75f8a758.js → app-globals-1db10325.js} +1 -1
- package/dist/esm/{ez-combo-box-list_5.entry.js → classic-search-list_7.entry.js} +212 -7
- package/dist/esm/ez-actions-button.entry.js +4 -3
- package/dist/esm/ez-alert-list.entry.js +1 -1
- package/dist/esm/ez-avatar.entry.js +1 -1
- package/dist/esm/ez-calendar.entry.js +1 -1
- package/dist/esm/ez-classic-combo-box.entry.js +36 -15
- package/dist/esm/ez-classic-date-input.entry.js +197 -0
- package/dist/esm/ez-classic-date-time-input.entry.js +242 -0
- package/dist/esm/ez-classic-input.entry.js +100 -19
- package/dist/esm/ez-classic-number-input.entry.js +201 -0
- package/dist/esm/ez-classic-search-plus.entry.js +403 -0
- package/dist/esm/ez-classic-search.entry.js +679 -0
- package/dist/esm/ez-classic-text-area.entry.js +1 -1
- package/dist/esm/ez-classic-time-input.entry.js +193 -0
- package/dist/esm/ez-collapsible-box.entry.js +4 -3
- package/dist/esm/ez-combo-box.entry.js +4 -3
- package/dist/esm/ez-date-input.entry.js +1 -1
- package/dist/esm/ez-date-time-input.entry.js +1 -1
- package/dist/esm/ez-dialog.entry.js +1 -1
- package/dist/esm/ez-double-list.entry.js +1 -1
- package/dist/esm/ez-file-item.entry.js +1 -1
- package/dist/esm/ez-form-view.entry.js +121 -35
- package/dist/esm/ez-form.entry.js +11 -7
- package/dist/esm/ez-grid.entry.js +5 -4
- package/dist/esm/ez-guide-navigator.entry.js +1 -1
- package/dist/esm/ez-icon.entry.js +1 -1
- package/dist/esm/ez-link-builder_6.entry.js +1 -1
- package/dist/esm/ez-list.entry.js +1 -1
- package/dist/esm/ez-modal-container.entry.js +1 -1
- package/dist/esm/ez-modal.entry.js +1 -1
- package/dist/esm/ez-multi-selection-list.entry.js +1 -1
- package/dist/esm/ez-number-input.entry.js +1 -1
- package/dist/esm/ez-pagination.entry.js +1 -1
- package/dist/esm/ez-popup.entry.js +1 -1
- package/dist/esm/ez-search-plus.entry.js +4 -3
- package/dist/esm/ez-search-result-list.entry.js +1 -1
- package/dist/esm/ez-search.entry.js +4 -3
- package/dist/esm/ez-sidebar-navigator.entry.js +1 -1
- package/dist/esm/ez-skeleton.entry.js +1 -1
- package/dist/esm/ez-sortable-list.entry.js +1 -1
- package/dist/esm/ez-spinner.entry.js +1 -1
- package/dist/esm/ez-split-button.entry.js +13 -14
- package/dist/esm/ez-split-item.entry.js +4 -3
- package/dist/esm/ez-text-input.entry.js +37 -0
- package/dist/esm/ez-time-input.entry.js +1 -1
- package/dist/esm/ez-tree.entry.js +1 -1
- package/dist/esm/ez-upload.entry.js +2 -2
- package/dist/esm/ezui.js +3 -3
- package/dist/esm/filter-column.entry.js +1 -1
- package/dist/esm/{index-a3b24b5d.js → index-225aa0c3.js} +30 -0
- package/dist/esm/index-baa5e267.js +42 -18
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{search-column-0c42248b.js → search-column-40a78cac.js} +10 -5
- package/dist/esm/searchFormatters-6d9b06e4.js +20 -0
- package/dist/esm/{FormLayout-071d324c.js → types-6f6b2650.js} +1 -7
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/{p-1c3f43e8.entry.js → p-0248846f.entry.js} +1 -1
- package/dist/ezui/p-0625743b.entry.js +1 -0
- package/dist/ezui/p-07fb22c3.entry.js +1 -0
- package/dist/ezui/p-26cd4c2e.entry.js +1 -0
- package/dist/ezui/{p-2fd16ff2.entry.js → p-2da9faf1.entry.js} +1 -1
- package/dist/ezui/{p-1bf40959.entry.js → p-34d459e4.entry.js} +1 -1
- package/dist/ezui/p-44183c39.entry.js +1 -0
- package/dist/ezui/p-47e4a8ce.js +1 -0
- package/dist/ezui/p-4af745e1.entry.js +1 -0
- package/dist/ezui/{p-6c484770.entry.js → p-4c2a4435.entry.js} +1 -1
- package/dist/ezui/{p-782fe2e3.entry.js → p-4c76b365.entry.js} +1 -1
- package/dist/ezui/p-4e576bb9.entry.js +1 -0
- package/dist/ezui/{p-5e6de2c1.entry.js → p-4e869617.entry.js} +1 -1
- package/dist/ezui/{p-0e325699.entry.js → p-4f7ad3ee.entry.js} +1 -1
- package/dist/ezui/{p-582c3f90.entry.js → p-544605c4.entry.js} +1 -1
- package/dist/ezui/p-556bf329.entry.js +1 -0
- package/dist/ezui/{p-2676e2a3.entry.js → p-56565777.entry.js} +1 -1
- package/dist/ezui/p-57b68d43.entry.js +1 -0
- package/dist/ezui/p-5895e687.js +1 -0
- package/dist/ezui/{p-714452c7.entry.js → p-5abb220b.entry.js} +1 -1
- package/dist/ezui/p-619225ce.entry.js +1 -0
- package/dist/ezui/p-679a2942.entry.js +1 -0
- package/dist/ezui/{p-474076b3.js → p-6a794336.js} +1 -1
- package/dist/ezui/{p-4ea5c8a7.entry.js → p-6ac056d7.entry.js} +1 -1
- package/dist/ezui/p-7134726a.entry.js +1 -0
- package/dist/ezui/{p-67f9fadb.entry.js → p-729bd1be.entry.js} +1 -1
- package/dist/ezui/p-7953ecb9.entry.js +1 -0
- package/dist/ezui/{p-e2e0dd76.entry.js → p-7edc3ef7.entry.js} +1 -1
- package/dist/ezui/p-88a115b3.js +1 -0
- package/dist/ezui/{p-f45ddc1f.entry.js → p-8e5f1c74.entry.js} +1 -1
- package/dist/ezui/p-951b32a1.entry.js +1 -0
- package/dist/ezui/{p-9568a93d.entry.js → p-97312709.entry.js} +1 -1
- package/dist/ezui/{p-0ec5c128.js → p-9825c1d2.js} +1 -1
- package/dist/ezui/p-987185c4.entry.js +1 -0
- package/dist/ezui/p-a0f51b99.entry.js +1 -0
- package/dist/ezui/p-a3bad8f8.entry.js +1 -0
- package/dist/ezui/{p-6570ca10.entry.js → p-a4351519.entry.js} +1 -1
- package/dist/ezui/{p-7624767b.entry.js → p-a872c642.entry.js} +1 -1
- package/dist/ezui/p-b0a716ef.entry.js +1 -0
- package/dist/ezui/p-b36475f9.entry.js +1 -0
- package/dist/ezui/{p-2b23906a.entry.js → p-b705b342.entry.js} +1 -1
- package/dist/ezui/{p-9771ea3c.entry.js → p-b8078832.entry.js} +1 -1
- package/dist/ezui/p-c0ae79fa.entry.js +1 -0
- package/dist/ezui/{p-98218fbc.js → p-c178730b.js} +1 -1
- package/dist/ezui/{p-a1a63294.entry.js → p-c56ee8c0.entry.js} +1 -1
- package/dist/ezui/{p-3d71e8e1.entry.js → p-cd8be0c7.entry.js} +1 -1
- package/dist/ezui/{p-a13e65a4.entry.js → p-ce0a0036.entry.js} +1 -1
- package/dist/ezui/{p-0aafbc30.entry.js → p-df802548.entry.js} +1 -1
- package/dist/ezui/p-e2689b33.entry.js +1 -0
- package/dist/ezui/{p-dc192d01.entry.js → p-e2972977.entry.js} +1 -1
- package/dist/ezui/{p-47d9256e.entry.js → p-e3a42f47.entry.js} +1 -1
- package/dist/ezui/p-e3cd5080.entry.js +1 -0
- package/dist/ezui/{p-28af6826.entry.js → p-e493ad57.entry.js} +1 -1
- package/dist/ezui/{p-3fcf79c7.entry.js → p-f5552540.entry.js} +1 -1
- package/dist/ezui/p-ff4312d5.js +1 -0
- package/dist/types/components/ez-classic-combo-box/ez-classic-combo-box.d.ts +9 -3
- package/dist/types/components/ez-classic-date-input/ez-classic-date-input.d.ts +91 -0
- package/dist/types/components/ez-classic-date-time-input/ez-classic-date-time-input.d.ts +95 -0
- package/dist/types/components/ez-classic-input/ez-classic-input.d.ts +18 -1
- package/dist/types/components/ez-classic-number-input/ez-classic-number-input.d.ts +101 -0
- package/dist/types/components/ez-classic-search/ez-classic-search.d.ts +219 -0
- package/dist/types/components/ez-classic-search/subcomponent/classic-search-list/classic-search-list.d.ts +29 -0
- package/dist/types/components/ez-classic-search/utils/searchFormatters.d.ts +2 -0
- package/dist/types/components/ez-classic-search-plus/ez-classic-search-plus.d.ts +186 -0
- package/dist/types/components/ez-classic-search-plus/subcomponent/ez-search-result-list/ez-classic-search-result-list.d.ts +29 -0
- package/dist/types/components/ez-form/ez-form.d.ts +1 -0
- package/dist/types/components/ez-form-view/ez-form-view.d.ts +7 -0
- package/dist/types/components/ez-form-view/fieldbuilder/FieldBuilder.d.ts +7 -2
- package/dist/types/components/ez-form-view/fieldbuilder/templates/CheckBox.tpl.d.ts +3 -2
- package/dist/types/components/ez-form-view/fieldbuilder/templates/ComboBox.tpl.d.ts +2 -1
- package/dist/types/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.d.ts +5 -4
- package/dist/types/components/ez-form-view/fieldbuilder/templates/FileInput.tpl.d.ts +2 -1
- package/dist/types/components/ez-form-view/fieldbuilder/templates/NumberInput.tpl.d.ts +3 -2
- package/dist/types/components/ez-form-view/fieldbuilder/templates/RichText.tpl.d.ts +2 -1
- package/dist/types/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.d.ts +2 -1
- package/dist/types/components/ez-form-view/fieldbuilder/templates/SearchInputPlus.tpl.d.ts +2 -1
- package/dist/types/components/ez-form-view/fieldbuilder/templates/TextArea.tpl.d.ts +2 -1
- package/dist/types/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.d.ts +2 -1
- package/dist/types/components/ez-split-button/ez-split-button.d.ts +1 -2
- package/dist/types/components/ez-text-input/ez-text-input.d.ts +4 -0
- package/dist/types/components.d.ts +2967 -1814
- package/dist/types/utils/form/interfaces/FormLayout.d.ts +3 -1
- package/dist/types/utils/i18n/locales/en-us.d.ts +10 -0
- package/dist/types/utils/i18n/locales/es-es.d.ts +10 -0
- package/dist/types/utils/i18n/locales/pt-br.d.ts +10 -0
- package/dist/types/utils/i18n/translations.d.ts +30 -0
- package/package.json +1 -1
- package/react/components.d.ts +8 -0
- package/react/components.js +8 -0
- package/react/components.js.map +1 -1
- package/dist/ezui/p-2e5de2a7.entry.js +0 -1
- package/dist/ezui/p-30ffb9ed.js +0 -1
- package/dist/ezui/p-48effc69.entry.js +0 -1
- package/dist/ezui/p-6a982147.js +0 -1
- package/dist/ezui/p-6d7f2fdc.entry.js +0 -1
- package/dist/ezui/p-6f466aec.entry.js +0 -1
- package/dist/ezui/p-7fe97ef5.entry.js +0 -1
- package/dist/ezui/p-8709c4f6.entry.js +0 -1
- package/dist/ezui/p-8a8006e6.entry.js +0 -1
- package/dist/ezui/p-8d626d2b.entry.js +0 -1
- package/dist/ezui/p-9b2e6438.entry.js +0 -1
- package/dist/ezui/p-9d004e22.entry.js +0 -1
- package/dist/ezui/p-c711900a.entry.js +0 -1
- package/dist/ezui/p-dee18824.entry.js +0 -1
- package/dist/ezui/p-e4a579f2.entry.js +0 -1
- package/dist/ezui/p-e82a12c6.entry.js +0 -1
- package/dist/ezui/p-f1bbf23f.entry.js +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { UserInterface } from "@sankhyalabs/core";
|
|
2
|
+
import { FormLayout } from "../../../utils/form/interfaces/FormLayout";
|
|
2
3
|
import { buildCheckBox, buildSwitch } from "./templates/CheckBox.tpl";
|
|
3
4
|
import { buildComboBox } from "./templates/ComboBox.tpl";
|
|
4
5
|
import { buildDate, buildTime, buildDateTime, buildTimeSeconds } from "./templates/DateInput.tpl";
|
|
@@ -27,11 +28,13 @@ uiBuilders.set(UserInterface.SEARCHPLUS, buildSearchPlus);
|
|
|
27
28
|
uiBuilders.set(UserInterface.LONGTEXT, buildTextArea);
|
|
28
29
|
uiBuilders.set(UserInterface.HTML, buildRichText);
|
|
29
30
|
uiBuilders.set(UserInterface.IMAGE, buildImage);
|
|
30
|
-
export const fieldBuilder = (field, customUiBuilders = new Map()) => {
|
|
31
|
+
export const fieldBuilder = (field, customUiBuilders = new Map(), context) => {
|
|
31
32
|
const i18n = getI18n();
|
|
33
|
+
const shouldUseClassic = (context === null || context === void 0 ? void 0 : context.formLayout) === FormLayout.CLASSIC_CASCADE ||
|
|
34
|
+
(context === null || context === void 0 ? void 0 : context.formLayout) === FormLayout.CLASSIC_SIDE_BY_SIDE;
|
|
32
35
|
const builder = (customUiBuilders.get(field.userInterface) || uiBuilders.get(field.userInterface)) || buildTextInput;
|
|
33
|
-
const label = field.required ? `${field.label}${i18n("app.requiredInfo")}` : field.label;
|
|
34
|
-
const builtElement = builder(Object.assign(Object.assign({}, field), { label }));
|
|
36
|
+
const label = !shouldUseClassic && field.required ? `${field.label}${i18n("app.requiredInfo")}` : field.label;
|
|
37
|
+
const builtElement = builder(Object.assign(Object.assign({}, field), { label }), context);
|
|
35
38
|
//@ts-ignore
|
|
36
39
|
builtElement.$attrs$['data-form-item'] = field.name;
|
|
37
40
|
return builtElement;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { CheckMode } from "../../../ez-check/CheckMode";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import { FormLayout } from "../../../../utils/form/interfaces/FormLayout";
|
|
4
|
+
export const buildSwitch = (field, context) => {
|
|
5
|
+
return buildField(field.name, field.label, field.readOnly, field.contextName, true, context);
|
|
5
6
|
};
|
|
6
|
-
export const buildCheckBox = (field) => {
|
|
7
|
-
return buildField(field.name, field.label, field.readOnly, field.contextName, false);
|
|
7
|
+
export const buildCheckBox = (field, context) => {
|
|
8
|
+
return buildField(field.name, field.label, field.readOnly, field.contextName, false, context);
|
|
8
9
|
};
|
|
9
|
-
function buildField(fieldName, fieldLabel, readOnly, contextName, switchMode) {
|
|
10
|
-
|
|
10
|
+
function buildField(fieldName, fieldLabel, readOnly, contextName, switchMode, context) {
|
|
11
|
+
const shouldUseClassic = (context === null || context === void 0 ? void 0 : context.formLayout) === FormLayout.CLASSIC_CASCADE ||
|
|
12
|
+
(context === null || context === void 0 ? void 0 : context.formLayout) === FormLayout.CLASSIC_SIDE_BY_SIDE;
|
|
13
|
+
return (h("div", { class: `ez-col ez-col--sd-12 ez-align--middle ez-padding-top--medium ez-padding-bottom--medium ez-size-height--full ${shouldUseClassic ? "ez-margin-top--small" : ""}` }, h("ez-check", { enabled: !readOnly, label: fieldLabel, mode: switchMode ? CheckMode.SWITCH : CheckMode.REGULAR, "data-field-name": fieldName, "data-context-name": contextName, key: fieldName })));
|
|
11
14
|
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
-
|
|
2
|
+
import { FormLayout } from "../../../../utils/form/interfaces/FormLayout";
|
|
3
|
+
export const buildComboBox = ({ name, label, readOnly, required, props, contextName, canShowError }, context) => {
|
|
4
|
+
var _a;
|
|
5
|
+
const shouldUseClassic = (context === null || context === void 0 ? void 0 : context.formLayout) === FormLayout.CLASSIC_CASCADE ||
|
|
6
|
+
(context === null || context === void 0 ? void 0 : context.formLayout) === FormLayout.CLASSIC_SIDE_BY_SIDE;
|
|
3
7
|
const prop = props === null || props === void 0 ? void 0 : props.options;
|
|
4
8
|
let options;
|
|
5
9
|
if (typeof prop === "string") {
|
|
@@ -9,5 +13,8 @@ export const buildComboBox = ({ name, label, readOnly, required, props, contextN
|
|
|
9
13
|
else {
|
|
10
14
|
options = prop;
|
|
11
15
|
}
|
|
16
|
+
if (shouldUseClassic) {
|
|
17
|
+
return (h("div", { class: "ez-col ez-col--sd-12" }, h("ez-classic-combo-box", { class: "ez-input__no-margin", enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, "data-context-name": contextName, key: name, options: options, size: (_a = context === null || context === void 0 ? void 0 : context.size) !== null && _a !== void 0 ? _a : "small", required: required })));
|
|
18
|
+
}
|
|
12
19
|
return (h("div", { class: "ez-col ez-col--sd-12" }, h("ez-combo-box", { class: "ez-input__no-margin", enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, "data-context-name": contextName, key: name, options: options, canShowError: canShowError })));
|
|
13
20
|
};
|
|
@@ -1,14 +1,38 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
-
|
|
2
|
+
import { FormLayout } from "../../../../utils/form/interfaces/FormLayout";
|
|
3
|
+
export const buildDate = ({ name, label, readOnly, canShowError, props, required }, context) => {
|
|
4
|
+
var _a;
|
|
5
|
+
const shouldUseClassic = (context === null || context === void 0 ? void 0 : context.formLayout) === FormLayout.CLASSIC_CASCADE ||
|
|
6
|
+
(context === null || context === void 0 ? void 0 : context.formLayout) === FormLayout.CLASSIC_SIDE_BY_SIDE;
|
|
7
|
+
if (shouldUseClassic) {
|
|
8
|
+
return (h("div", { class: "ez-col ez-col--sd-12" }, h("ez-classic-date-input", { class: "ez-input__no-margin", enabled: !readOnly, label: label, "data-field-name": name, key: name, canShowError: canShowError, size: (_a = context === null || context === void 0 ? void 0 : context.size) !== null && _a !== void 0 ? _a : "small", required: required })));
|
|
9
|
+
}
|
|
3
10
|
return (h("div", { class: "ez-col ez-col--sd-12" }, h("ez-date-input", { class: "ez-input__no-margin", enabled: !readOnly, label: label, "data-field-name": name, key: name, canShowError: canShowError })));
|
|
4
11
|
};
|
|
5
|
-
export const buildTime = ({ name, label, readOnly, canShowError, props }) => {
|
|
6
|
-
var _a;
|
|
7
|
-
|
|
12
|
+
export const buildTime = ({ name, label, readOnly, canShowError, props, required }, context) => {
|
|
13
|
+
var _a, _b, _c;
|
|
14
|
+
const shouldUseClassic = (context === null || context === void 0 ? void 0 : context.formLayout) === FormLayout.CLASSIC_CASCADE ||
|
|
15
|
+
(context === null || context === void 0 ? void 0 : context.formLayout) === FormLayout.CLASSIC_SIDE_BY_SIDE;
|
|
16
|
+
if (shouldUseClassic) {
|
|
17
|
+
return (h("div", { class: "ez-col ez-col--sd-12" }, h("ez-classic-time-input", { class: "ez-input__no-margin", enabled: !readOnly, label: label, "data-field-name": name, key: name, canShowError: canShowError, "show-seconds": (_a = props === null || props === void 0 ? void 0 : props.showSeconds) !== null && _a !== void 0 ? _a : false, size: (_b = context === null || context === void 0 ? void 0 : context.size) !== null && _b !== void 0 ? _b : "small", required: required })));
|
|
18
|
+
}
|
|
19
|
+
return (h("div", { class: "ez-col ez-col--sd-12" }, h("ez-time-input", { class: "ez-input__no-margin", enabled: !readOnly, label: label, "data-field-name": name, key: name, canShowError: canShowError, "show-seconds": (_c = props === null || props === void 0 ? void 0 : props.showSeconds) !== null && _c !== void 0 ? _c : false })));
|
|
8
20
|
};
|
|
9
|
-
export const buildTimeSeconds = ({ name, label, readOnly, canShowError }) => {
|
|
21
|
+
export const buildTimeSeconds = ({ name, label, readOnly, canShowError, props, required }, context) => {
|
|
22
|
+
var _a;
|
|
23
|
+
const shouldUseClassic = (context === null || context === void 0 ? void 0 : context.formLayout) === FormLayout.CLASSIC_CASCADE ||
|
|
24
|
+
(context === null || context === void 0 ? void 0 : context.formLayout) === FormLayout.CLASSIC_SIDE_BY_SIDE;
|
|
25
|
+
if (shouldUseClassic) {
|
|
26
|
+
return (h("div", { class: "ez-col ez-col--sd-12" }, h("ez-classic-time-input", { class: "ez-input__no-margin", enabled: !readOnly, label: label, "data-field-name": name, key: name, canShowError: canShowError, showSeconds: true, size: (_a = context === null || context === void 0 ? void 0 : context.size) !== null && _a !== void 0 ? _a : "small", required: required })));
|
|
27
|
+
}
|
|
10
28
|
return (h("div", { class: "ez-col ez-col--sd-12" }, h("ez-time-input", { class: "ez-input__no-margin", enabled: !readOnly, label: label, "data-field-name": name, key: name, canShowError: canShowError, showSeconds: true })));
|
|
11
29
|
};
|
|
12
|
-
export const buildDateTime = ({ name, label, readOnly, contextName, canShowError }) => {
|
|
30
|
+
export const buildDateTime = ({ name, label, readOnly, contextName, canShowError, props, required }, context) => {
|
|
31
|
+
var _a;
|
|
32
|
+
const shouldUseClassic = (context === null || context === void 0 ? void 0 : context.formLayout) === FormLayout.CLASSIC_CASCADE ||
|
|
33
|
+
(context === null || context === void 0 ? void 0 : context.formLayout) === FormLayout.CLASSIC_SIDE_BY_SIDE;
|
|
34
|
+
if (shouldUseClassic) {
|
|
35
|
+
return (h("div", { class: "ez-col ez-col--sd-12" }, h("ez-classic-date-time-input", { class: "ez-input__no-margin", enabled: !readOnly, label: label, "data-field-name": name, "data-context-name": contextName, key: name, canShowError: canShowError, size: (_a = context === null || context === void 0 ? void 0 : context.size) !== null && _a !== void 0 ? _a : "small", required: required })));
|
|
36
|
+
}
|
|
13
37
|
return (h("div", { class: "ez-col ez-col--sd-12" }, h("ez-date-time-input", { class: "ez-input__no-margin", enabled: !readOnly, label: label, "data-field-name": name, "data-context-name": contextName, key: name, canShowError: canShowError })));
|
|
14
38
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { ObjectUtils } from "@sankhyalabs/core";
|
|
3
|
-
export const buildFile = ({ name, label, readOnly, contextName, props }) => {
|
|
3
|
+
export const buildFile = ({ name, label, readOnly, contextName, props }, context) => {
|
|
4
4
|
const uploadProps = ObjectUtils.removeEmptyValues({
|
|
5
5
|
subTitle: props.subTitle,
|
|
6
6
|
requestHeaders: Object.assign(Object.assign({}, (props.STORAGESTRATEGY && {
|
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
-
|
|
2
|
+
import { FormLayout } from "../../../../utils/form/interfaces/FormLayout";
|
|
3
|
+
export const buildDecimal = ({ name, label, readOnly, props, contextName, canShowError, required }, context) => {
|
|
3
4
|
var _a, _b;
|
|
4
5
|
const precision = Number((_a = props === null || props === void 0 ? void 0 : props.precision) !== null && _a !== void 0 ? _a : 2);
|
|
5
6
|
const prettyPrecision = Number((_b = props === null || props === void 0 ? void 0 : props.prettyPrecision) !== null && _b !== void 0 ? _b : precision);
|
|
6
|
-
return buildNumeric(name, label, readOnly, precision, prettyPrecision, contextName, canShowError);
|
|
7
|
+
return buildNumeric(name, label, readOnly, precision, prettyPrecision, contextName, canShowError, props, required, context);
|
|
7
8
|
};
|
|
8
|
-
export const buildInteger = ({ name, label, readOnly, contextName, canShowError }) => {
|
|
9
|
-
return buildNumeric(name, label, readOnly, 0, 0, contextName, canShowError);
|
|
9
|
+
export const buildInteger = ({ name, label, readOnly, contextName, canShowError, props, required }, context) => {
|
|
10
|
+
return buildNumeric(name, label, readOnly, 0, 0, contextName, canShowError, props, required, context);
|
|
10
11
|
};
|
|
11
|
-
function buildNumeric(fieldName, fieldLabel, readOnly, precision, prettyPrecision, contextName, canShowError) {
|
|
12
|
+
function buildNumeric(fieldName, fieldLabel, readOnly, precision, prettyPrecision, contextName, canShowError, props, required, context) {
|
|
13
|
+
var _a;
|
|
14
|
+
const shouldUseClassic = (context === null || context === void 0 ? void 0 : context.formLayout) === FormLayout.CLASSIC_CASCADE ||
|
|
15
|
+
(context === null || context === void 0 ? void 0 : context.formLayout) === FormLayout.CLASSIC_SIDE_BY_SIDE;
|
|
16
|
+
if (shouldUseClassic) {
|
|
17
|
+
return (h("div", { class: "ez-col ez-col--sd-12" }, h("ez-classic-number-input", { class: "ez-input__no-margin", enabled: !readOnly, label: fieldLabel, precision: precision, prettyPrecision: prettyPrecision, "data-field-name": fieldName, "data-context-name": contextName, key: fieldName, canShowError: canShowError, size: (_a = context === null || context === void 0 ? void 0 : context.size) !== null && _a !== void 0 ? _a : "small", required: required })));
|
|
18
|
+
}
|
|
12
19
|
return (h("div", { class: "ez-col ez-col--sd-12" }, h("ez-number-input", { class: "ez-input__no-margin", enabled: !readOnly, label: fieldLabel, precision: precision, prettyPrecision: prettyPrecision, "data-field-name": fieldName, "data-context-name": contextName, key: fieldName, canShowError: canShowError })));
|
|
13
20
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
-
export const buildRichText = ({ name, label, readOnly, contextName, rows, canShowError }) => {
|
|
2
|
+
export const buildRichText = ({ name, label, readOnly, contextName, rows, canShowError }, context) => {
|
|
3
3
|
return (h("div", { class: "ez-col ez-col--sd-12" }, h("ez-rich-text", { key: name, enabled: !readOnly, label: label, "data-field-name": name, "data-context-name": contextName, rows: rows, canShowError: canShowError })));
|
|
4
4
|
};
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
+
import { FormLayout } from "../../../../utils/form/interfaces/FormLayout";
|
|
2
3
|
import { StringUtils } from "@sankhyalabs/core";
|
|
3
|
-
export const buildSearch = ({ name, label, readOnly, required, contextName, canShowError, optionLoader, props }) => {
|
|
4
|
-
var _a;
|
|
4
|
+
export const buildSearch = ({ name, label, readOnly, required, contextName, canShowError, optionLoader, props }, context) => {
|
|
5
|
+
var _a, _b, _c;
|
|
5
6
|
const hasDescriptionField = !StringUtils.isEmpty(props === null || props === void 0 ? void 0 : props.DESCRIPTIONFIELD);
|
|
6
|
-
|
|
7
|
+
const shouldUseClassic = (context === null || context === void 0 ? void 0 : context.formLayout) === FormLayout.CLASSIC_CASCADE ||
|
|
8
|
+
(context === null || context === void 0 ? void 0 : context.formLayout) === FormLayout.CLASSIC_SIDE_BY_SIDE;
|
|
9
|
+
if (shouldUseClassic) {
|
|
10
|
+
return (h("div", { class: "ez-col ez-col--sd-12" }, h("ez-classic-search", { class: "ez-input__no-margin", enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, "data-context-name": contextName, key: name, canShowError: canShowError, optionLoader: optionLoader, ignoreLimitCharsToSearch: (_a = props === null || props === void 0 ? void 0 : props.ignoreLimitCharsToSearch) !== null && _a !== void 0 ? _a : false, hideDescriptionInput: !hasDescriptionField, size: (_b = context === null || context === void 0 ? void 0 : context.size) !== null && _b !== void 0 ? _b : "small", required: required })));
|
|
11
|
+
}
|
|
12
|
+
return (h("div", { class: "ez-col ez-col--sd-12" }, h("ez-search", { class: "ez-input__no-margin", enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, "data-context-name": contextName, key: name, canShowError: canShowError, optionLoader: optionLoader, ignoreLimitCharsToSearch: (_c = props === null || props === void 0 ? void 0 : props.ignoreLimitCharsToSearch) !== null && _c !== void 0 ? _c : false, hideDescriptionInput: !hasDescriptionField })));
|
|
7
13
|
};
|
package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInputPlus.tpl.js
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { StringUtils } from "@sankhyalabs/core";
|
|
3
|
-
|
|
3
|
+
import { FormLayout } from "../../../../utils/form/interfaces/FormLayout";
|
|
4
|
+
export const buildSearchPlus = ({ name, label, readOnly, contextName, canShowError, optionLoader, props, required }, context) => {
|
|
5
|
+
var _a;
|
|
6
|
+
const shouldUseClassic = (context === null || context === void 0 ? void 0 : context.formLayout) === FormLayout.CLASSIC_CASCADE ||
|
|
7
|
+
(context === null || context === void 0 ? void 0 : context.formLayout) === FormLayout.CLASSIC_SIDE_BY_SIDE;
|
|
4
8
|
const hasDescriptionField = !StringUtils.isEmpty(props === null || props === void 0 ? void 0 : props.DESCRIPTIONFIELD);
|
|
9
|
+
if (shouldUseClassic) {
|
|
10
|
+
return (h("div", { class: "ez-col ez-col--sd-12" }, h("ez-classic-search-plus", { class: "ez-input__no-margin", enabled: !readOnly, label: label, "data-field-name": name, "data-context-name": contextName, key: name, canShowError: canShowError, optionLoader: optionLoader, hideDescriptionInput: !hasDescriptionField, size: (_a = context === null || context === void 0 ? void 0 : context.size) !== null && _a !== void 0 ? _a : "small", required: required })));
|
|
11
|
+
}
|
|
5
12
|
return (h("div", { class: "ez-col ez-col--sd-12" }, h("ez-search-plus", { class: "ez-input__no-margin", enabled: !readOnly, label: label, "data-field-name": name, "data-context-name": contextName, key: name, canShowError: canShowError, optionLoader: optionLoader, hideDescriptionInput: !hasDescriptionField })));
|
|
6
13
|
};
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
-
|
|
2
|
+
import { FormLayout } from "../../../../utils/form/interfaces/FormLayout";
|
|
3
|
+
export const buildTextArea = ({ name, label, readOnly, rows, contextName, canShowError, props, required }, context) => {
|
|
4
|
+
const shouldUseClassic = (context === null || context === void 0 ? void 0 : context.formLayout) === FormLayout.CLASSIC_CASCADE ||
|
|
5
|
+
(context === null || context === void 0 ? void 0 : context.formLayout) === FormLayout.CLASSIC_SIDE_BY_SIDE;
|
|
6
|
+
if (shouldUseClassic) {
|
|
7
|
+
return (h("div", { class: "ez-col ez-col--sd-12", key: name }, h("ez-classic-text-area", { enabled: !readOnly, label: label, "data-field-name": name, "data-context-name": contextName, rows: rows })));
|
|
8
|
+
}
|
|
3
9
|
return (h("div", { class: "ez-col ez-col--sd-12", key: name }, h("ez-text-area", { enabled: !readOnly, label: label, "data-field-name": name, "data-context-name": contextName, rows: rows, canShowError: canShowError })));
|
|
4
10
|
};
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
-
|
|
2
|
+
import { FormLayout } from "../../../../utils/form/interfaces/FormLayout";
|
|
3
|
+
export const buildTextInput = ({ name, label, readOnly, contextName, canShowError, props, required }, context) => {
|
|
4
|
+
var _a;
|
|
5
|
+
const shouldUseClassic = (context === null || context === void 0 ? void 0 : context.formLayout) === FormLayout.CLASSIC_CASCADE ||
|
|
6
|
+
(context === null || context === void 0 ? void 0 : context.formLayout) === FormLayout.CLASSIC_SIDE_BY_SIDE;
|
|
7
|
+
if (shouldUseClassic) {
|
|
8
|
+
return (h("div", { class: "ez-col ez-col--sd-12" }, h("ez-classic-input", { class: "ez-input__no-margin", label: label, "data-field-name": name, "data-context-name": contextName, key: name, enabled: !readOnly, mask: props === null || props === void 0 ? void 0 : props.mask, "clean-value-mask": props === null || props === void 0 ? void 0 : props.cleanValueMask, size: (_a = context === null || context === void 0 ? void 0 : context.size) !== null && _a !== void 0 ? _a : "small", required: required })));
|
|
9
|
+
}
|
|
3
10
|
return (h("div", { class: "ez-col ez-col--sd-12" }, h("ez-text-input", { class: "ez-input__no-margin", label: label, "data-field-name": name, "data-context-name": contextName, key: name, enabled: !readOnly, canShowError: canShowError, mask: props === null || props === void 0 ? void 0 : props.mask, "clean-value-mask": props === null || props === void 0 ? void 0 : props.cleanValueMask })));
|
|
4
11
|
};
|
|
@@ -4,7 +4,7 @@ class FormItem {
|
|
|
4
4
|
}
|
|
5
5
|
addRightElement(el) {
|
|
6
6
|
this.removeRightElement();
|
|
7
|
-
el.classList.add('ez-padding-left--small');
|
|
7
|
+
el.classList.add('ez-padding-left--small', 'ez-margin-top--auto', 'ez-margin-bottom--extra-small');
|
|
8
8
|
el.setAttribute('data-custom-item', 'true');
|
|
9
9
|
this.elem.classList.add('ez-col--nowrap');
|
|
10
10
|
this.elem.appendChild(el);
|
|
@@ -9,7 +9,7 @@ export class EzRichText {
|
|
|
9
9
|
this.historyIndex = -1;
|
|
10
10
|
this.previewMode = false;
|
|
11
11
|
this.showPreview = true;
|
|
12
|
-
this.value =
|
|
12
|
+
this.value = undefined;
|
|
13
13
|
this.label = undefined;
|
|
14
14
|
this.mode = "regular";
|
|
15
15
|
this.enabled = true;
|
|
@@ -313,8 +313,7 @@ export class EzRichText {
|
|
|
313
313
|
"text": "Define o valor HTML do campo."
|
|
314
314
|
},
|
|
315
315
|
"attribute": "value",
|
|
316
|
-
"reflect": true
|
|
317
|
-
"defaultValue": "''"
|
|
316
|
+
"reflect": true
|
|
318
317
|
},
|
|
319
318
|
"label": {
|
|
320
319
|
"type": "string",
|
|
@@ -60,7 +60,11 @@ export class EzSplitButton {
|
|
|
60
60
|
const spaceLeft = rightButtonRect.left;
|
|
61
61
|
const shouldOpenUpward = spaceBelow < dropdownRect.height && spaceAbove > dropdownRect.height;
|
|
62
62
|
const shouldOpenLeftward = spaceRight < dropdownRect.width && spaceLeft > dropdownRect.width;
|
|
63
|
-
const styles =
|
|
63
|
+
const styles = {
|
|
64
|
+
position: 'fixed',
|
|
65
|
+
top: shouldOpenUpward ? `${rightButtonRect.top - dropdownRect.height}px` : `${rightButtonRect.bottom}px`,
|
|
66
|
+
left: shouldOpenLeftward ? `${rightButtonRect.right - dropdownRect.width}px` : `${rightButtonRect.left}px`,
|
|
67
|
+
};
|
|
64
68
|
Object.assign(dropdownParent.style, styles);
|
|
65
69
|
});
|
|
66
70
|
};
|
|
@@ -197,6 +201,9 @@ export class EzSplitButton {
|
|
|
197
201
|
return;
|
|
198
202
|
}
|
|
199
203
|
}
|
|
204
|
+
onItemActionExecuted() {
|
|
205
|
+
this.closeDropdown();
|
|
206
|
+
}
|
|
200
207
|
clickListener(evt) {
|
|
201
208
|
const isDisabled = !this.enabled ||
|
|
202
209
|
this.isDisabled === true ||
|
|
@@ -227,26 +234,18 @@ export class EzSplitButton {
|
|
|
227
234
|
this.buttonClick.emit();
|
|
228
235
|
}
|
|
229
236
|
handleDropdownItemClick(evt) {
|
|
237
|
+
var _a;
|
|
230
238
|
this.dropdownItemClick.emit(evt.detail);
|
|
231
239
|
evt.stopPropagation();
|
|
232
|
-
|
|
240
|
+
if (!((_a = evt.detail) === null || _a === void 0 ? void 0 : _a.disableCloseOnSelect)) {
|
|
241
|
+
this.closeDropdown();
|
|
242
|
+
}
|
|
233
243
|
}
|
|
234
244
|
handleDropdownSubActionClick(evt) {
|
|
235
245
|
this.dropdownSubActionClick.emit(evt.detail);
|
|
236
246
|
evt.stopPropagation();
|
|
237
247
|
this.closeDropdown();
|
|
238
248
|
}
|
|
239
|
-
calculateDropdownPosition(buttonRect, dropdownRect, openUpward, openLeftward) {
|
|
240
|
-
const baseOffset = this.offsetParentRect || { top: 0, left: 0 };
|
|
241
|
-
return {
|
|
242
|
-
top: openUpward ? 'auto' : `${buttonRect.bottom - baseOffset.top + window.scrollY}px`,
|
|
243
|
-
bottom: openUpward ? `${window.innerHeight - buttonRect.top - window.scrollY}px` : 'auto',
|
|
244
|
-
left: openLeftward
|
|
245
|
-
? `${buttonRect.right - dropdownRect.width - baseOffset.left + window.scrollX}px`
|
|
246
|
-
: `${buttonRect.left - baseOffset.left + window.scrollX}px`,
|
|
247
|
-
maxHeight: openUpward ? `${buttonRect.top - baseOffset.top}px` : 'none'
|
|
248
|
-
};
|
|
249
|
-
}
|
|
250
249
|
setupEventListeners() {
|
|
251
250
|
const controller = new AbortController();
|
|
252
251
|
const { signal } = controller;
|
|
@@ -835,6 +834,12 @@ export class EzSplitButton {
|
|
|
835
834
|
"target": undefined,
|
|
836
835
|
"capture": false,
|
|
837
836
|
"passive": true
|
|
837
|
+
}, {
|
|
838
|
+
"name": "ezCloseSplitButtonDropdown",
|
|
839
|
+
"method": "onItemActionExecuted",
|
|
840
|
+
"target": "window",
|
|
841
|
+
"capture": false,
|
|
842
|
+
"passive": false
|
|
838
843
|
}, {
|
|
839
844
|
"name": "click",
|
|
840
845
|
"method": "clickListener",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
|
-
import { ElementIDUtils, MaskFormatter } from
|
|
2
|
+
import { ElementIDUtils, MaskFormatter as CoreMaskFormatter, MaskFormatter } from '@sankhyalabs/core';
|
|
3
3
|
export class EzTextInput {
|
|
4
4
|
constructor() {
|
|
5
5
|
this._isOverflowing = false;
|
|
@@ -113,6 +113,42 @@ export class EzTextInput {
|
|
|
113
113
|
this._inputElem.classList.add("input__slim--noborder");
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
|
+
buildMaskFormatter() {
|
|
117
|
+
if (this.mask) {
|
|
118
|
+
const maskToBuilder = this.getMaskToBuilder();
|
|
119
|
+
this._maskFormatter = maskToBuilder ? new MaskFormatter(maskToBuilder) : undefined;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
getMaskToBuilder() {
|
|
123
|
+
if (this.mask === 'cgc_cpf') {
|
|
124
|
+
return this.getCGCCpfMask();
|
|
125
|
+
}
|
|
126
|
+
if (this.mask === 'phone') {
|
|
127
|
+
return this.getPhoneMask();
|
|
128
|
+
}
|
|
129
|
+
if (this.mask in CoreMaskFormatter.DEFAULT_MASKS) {
|
|
130
|
+
return CoreMaskFormatter.DEFAULT_MASKS[this.mask];
|
|
131
|
+
}
|
|
132
|
+
return this.mask;
|
|
133
|
+
}
|
|
134
|
+
getPhoneMask() {
|
|
135
|
+
if (this.value && this.value.length === 10) {
|
|
136
|
+
return MaskFormatter.DEFAULT_MASKS ? MaskFormatter.DEFAULT_MASKS.phone : undefined;
|
|
137
|
+
}
|
|
138
|
+
if (this.value && this.value.length === 11) {
|
|
139
|
+
return MaskFormatter.DEFAULT_MASKS ? MaskFormatter.DEFAULT_MASKS.phone_mobile : undefined;
|
|
140
|
+
}
|
|
141
|
+
return undefined;
|
|
142
|
+
}
|
|
143
|
+
getCGCCpfMask() {
|
|
144
|
+
if (this.value && this.value.length === 11) {
|
|
145
|
+
return MaskFormatter.DEFAULT_MASKS ? MaskFormatter.DEFAULT_MASKS.cpf : undefined;
|
|
146
|
+
}
|
|
147
|
+
if (this.value && this.value.length === 14) {
|
|
148
|
+
return MaskFormatter.DEFAULT_MASKS ? MaskFormatter.DEFAULT_MASKS.cnpj : undefined;
|
|
149
|
+
}
|
|
150
|
+
return undefined;
|
|
151
|
+
}
|
|
116
152
|
//---------------------------------------------
|
|
117
153
|
// Public methods
|
|
118
154
|
//---------------------------------------------
|
|
@@ -336,6 +372,7 @@ export class EzTextInput {
|
|
|
336
372
|
}
|
|
337
373
|
componentDidRender() {
|
|
338
374
|
this.adjustFloatingLabel();
|
|
375
|
+
this.buildMaskFormatter();
|
|
339
376
|
}
|
|
340
377
|
render() {
|
|
341
378
|
ElementIDUtils.addIDInfoIfNotExists(this._hostElement, 'input');
|
|
@@ -250,8 +250,8 @@ export default class DataBinder {
|
|
|
250
250
|
}
|
|
251
251
|
}
|
|
252
252
|
bindSearchOptionsLoader(fieldName, field) {
|
|
253
|
-
if ((field.nodeName === "EZ-SEARCH" || field.nodeName === "EZ-SEARCH-PLUS") && field["optionLoader"] == undefined) {
|
|
254
|
-
const isSearchPlus = field.nodeName === "EZ-SEARCH-PLUS";
|
|
253
|
+
if ((field.nodeName === "EZ-SEARCH" || field.nodeName === "EZ-CLASSIC-SEARCH" || field.nodeName === "EZ-SEARCH-PLUS" || field.nodeName === "EZ-CLASSIC-SEARCH-PLUS") && field["optionLoader"] == undefined) {
|
|
254
|
+
const isSearchPlus = (field.nodeName === "EZ-SEARCH-PLUS" || field.nodeName === "EZ-CLASSIC-SEARCH-PLUS");
|
|
255
255
|
const loader = isSearchPlus ? ApplicationContext.getContextValue("__EZUI__SEARCH__PLUS__OPTION__LOADER__") : ApplicationContext.getContextValue("__EZUI__SEARCH__OPTION__LOADER__");
|
|
256
256
|
if (loader) {
|
|
257
257
|
field["optionLoader"] = (arg, ctxOptions) => {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export var FormLayout;
|
|
2
2
|
(function (FormLayout) {
|
|
3
3
|
FormLayout[FormLayout["CASCADE"] = 0] = "CASCADE";
|
|
4
|
-
FormLayout[FormLayout["
|
|
4
|
+
FormLayout[FormLayout["CLASSIC_CASCADE"] = 1] = "CLASSIC_CASCADE";
|
|
5
|
+
FormLayout[FormLayout["SIDE_BY_SIDE"] = 2] = "SIDE_BY_SIDE";
|
|
6
|
+
FormLayout[FormLayout["CLASSIC_SIDE_BY_SIDE"] = 3] = "CLASSIC_SIDE_BY_SIDE";
|
|
5
7
|
})(FormLayout || (FormLayout = {}));
|
|
@@ -260,6 +260,16 @@ export default {
|
|
|
260
260
|
optionLoaderNotDefined: "optionLoader not defined",
|
|
261
261
|
defaultCodeLabel: "Code",
|
|
262
262
|
},
|
|
263
|
+
"ez-classic-search": {
|
|
264
|
+
emptyList: "No results found",
|
|
265
|
+
emptySearch: "No results for {{field}} found",
|
|
266
|
+
showMore: "Show more"
|
|
267
|
+
},
|
|
268
|
+
"ez-classic-search-plus": {
|
|
269
|
+
emptyList: "No results found",
|
|
270
|
+
optionLoaderNotDefined: "optionLoader not defined",
|
|
271
|
+
defaultCodeLabel: "Code",
|
|
272
|
+
},
|
|
263
273
|
"ez-sortable-list": {
|
|
264
274
|
emptyMessage: "No items in the list",
|
|
265
275
|
entityLabel: "item",
|
|
@@ -260,6 +260,16 @@ export default {
|
|
|
260
260
|
optionLoaderNotDefined: "optionLoader no definido",
|
|
261
261
|
defaultCodeLabel: "Cód.",
|
|
262
262
|
},
|
|
263
|
+
"ez-classic-search": {
|
|
264
|
+
emptyList: "No se encontraron resultados",
|
|
265
|
+
emptySearch: "No se encontraron resultados de {{field}}",
|
|
266
|
+
showMore: "Mostrar más"
|
|
267
|
+
},
|
|
268
|
+
"ez-classic-search-plus": {
|
|
269
|
+
emptyList: "No se encontraron resultados",
|
|
270
|
+
optionLoaderNotDefined: "optionLoader no definido",
|
|
271
|
+
defaultCodeLabel: "Cód.",
|
|
272
|
+
},
|
|
263
273
|
"ez-sortable-list": {
|
|
264
274
|
emptyMessage: "No hay elementos en la lista",
|
|
265
275
|
entityLabel: "elemento",
|
|
@@ -260,6 +260,16 @@ export default {
|
|
|
260
260
|
optionLoaderNotDefined: "optionLoader não definido",
|
|
261
261
|
defaultCodeLabel: "Cód.",
|
|
262
262
|
},
|
|
263
|
+
"ez-classic-search": {
|
|
264
|
+
emptyList: "Nenhum resultado encontrado",
|
|
265
|
+
emptySearch: "Nenhum resultado de {{field}} encontrado",
|
|
266
|
+
showMore: "Mostrar mais"
|
|
267
|
+
},
|
|
268
|
+
"ez-classic-search-plus": {
|
|
269
|
+
emptyList: "Nenhum resultado encontrado",
|
|
270
|
+
optionLoaderNotDefined: "optionLoader não definido",
|
|
271
|
+
defaultCodeLabel: "Cód.",
|
|
272
|
+
},
|
|
263
273
|
"ez-sortable-list": {
|
|
264
274
|
emptyMessage: "Nenhum item na lista",
|
|
265
275
|
entityLabel: "item",
|
|
@@ -7,7 +7,12 @@ export const buildFieldSearch = (action, optionLoader, onSelectField) => {
|
|
|
7
7
|
return h("ez-search", { class: 'ez-padding--small ez-margin--none', style: {
|
|
8
8
|
"--ez-text-input__margin-bottom": SEARCH_FIELD_MARGIN_BOTTOM,
|
|
9
9
|
"--ez-search--width": SEARCH_FIELD_WIDTH
|
|
10
|
-
}, canShowError: false, showSelectedValue: false, showOptionValue: false, suppressEmptyOption: true, label: action.label, value: null, optionLoader: optionLoader, onEzChange: (evt) =>
|
|
10
|
+
}, canShowError: false, showSelectedValue: false, showOptionValue: false, suppressEmptyOption: true, label: action.label, value: null, optionLoader: optionLoader, onEzChange: (evt) => {
|
|
11
|
+
window.dispatchEvent(new CustomEvent('ezCloseSplitButtonDropdown', { detail: { action, value: evt.detail } }));
|
|
12
|
+
requestAnimationFrame(() => {
|
|
13
|
+
onSelectField(evt.detail);
|
|
14
|
+
});
|
|
15
|
+
}, ignoreLimitCharsToSearch: true });
|
|
11
16
|
};
|
|
12
17
|
export const openFieldSearch = async (splitButton, field) => {
|
|
13
18
|
if (!splitButton) {
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
import type { Components, JSX } from "../types/components";
|
|
4
4
|
|
|
5
|
+
interface ClassicSearchList extends Components.ClassicSearchList, HTMLElement {}
|
|
6
|
+
export const ClassicSearchList: {
|
|
7
|
+
prototype: ClassicSearchList;
|
|
8
|
+
new (): ClassicSearchList;
|
|
9
|
+
};
|
|
10
|
+
|
|
5
11
|
interface EzActionsButton extends Components.EzActionsButton, HTMLElement {}
|
|
6
12
|
export const EzActionsButton: {
|
|
7
13
|
prototype: EzActionsButton;
|
|
@@ -86,18 +92,60 @@ export const EzClassicComboBox: {
|
|
|
86
92
|
new (): EzClassicComboBox;
|
|
87
93
|
};
|
|
88
94
|
|
|
95
|
+
interface EzClassicDateInput extends Components.EzClassicDateInput, HTMLElement {}
|
|
96
|
+
export const EzClassicDateInput: {
|
|
97
|
+
prototype: EzClassicDateInput;
|
|
98
|
+
new (): EzClassicDateInput;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
interface EzClassicDateTimeInput extends Components.EzClassicDateTimeInput, HTMLElement {}
|
|
102
|
+
export const EzClassicDateTimeInput: {
|
|
103
|
+
prototype: EzClassicDateTimeInput;
|
|
104
|
+
new (): EzClassicDateTimeInput;
|
|
105
|
+
};
|
|
106
|
+
|
|
89
107
|
interface EzClassicInput extends Components.EzClassicInput, HTMLElement {}
|
|
90
108
|
export const EzClassicInput: {
|
|
91
109
|
prototype: EzClassicInput;
|
|
92
110
|
new (): EzClassicInput;
|
|
93
111
|
};
|
|
94
112
|
|
|
113
|
+
interface EzClassicNumberInput extends Components.EzClassicNumberInput, HTMLElement {}
|
|
114
|
+
export const EzClassicNumberInput: {
|
|
115
|
+
prototype: EzClassicNumberInput;
|
|
116
|
+
new (): EzClassicNumberInput;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
interface EzClassicSearch extends Components.EzClassicSearch, HTMLElement {}
|
|
120
|
+
export const EzClassicSearch: {
|
|
121
|
+
prototype: EzClassicSearch;
|
|
122
|
+
new (): EzClassicSearch;
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
interface EzClassicSearchPlus extends Components.EzClassicSearchPlus, HTMLElement {}
|
|
126
|
+
export const EzClassicSearchPlus: {
|
|
127
|
+
prototype: EzClassicSearchPlus;
|
|
128
|
+
new (): EzClassicSearchPlus;
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
interface EzClassicSearchResultList extends Components.EzClassicSearchResultList, HTMLElement {}
|
|
132
|
+
export const EzClassicSearchResultList: {
|
|
133
|
+
prototype: EzClassicSearchResultList;
|
|
134
|
+
new (): EzClassicSearchResultList;
|
|
135
|
+
};
|
|
136
|
+
|
|
95
137
|
interface EzClassicTextArea extends Components.EzClassicTextArea, HTMLElement {}
|
|
96
138
|
export const EzClassicTextArea: {
|
|
97
139
|
prototype: EzClassicTextArea;
|
|
98
140
|
new (): EzClassicTextArea;
|
|
99
141
|
};
|
|
100
142
|
|
|
143
|
+
interface EzClassicTimeInput extends Components.EzClassicTimeInput, HTMLElement {}
|
|
144
|
+
export const EzClassicTimeInput: {
|
|
145
|
+
prototype: EzClassicTimeInput;
|
|
146
|
+
new (): EzClassicTimeInput;
|
|
147
|
+
};
|
|
148
|
+
|
|
101
149
|
interface EzCollapsibleBox extends Components.EzCollapsibleBox, HTMLElement {}
|
|
102
150
|
export const EzCollapsibleBox: {
|
|
103
151
|
prototype: EzCollapsibleBox;
|