@sankhyalabs/ezui 7.1.0-dev.20 → 7.1.0-dev.22
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-d04f5c94.js → ApplicationUtils-006ca96f.js} +1 -1
- package/dist/cjs/FormLayout-fe8da83c.js +9 -0
- package/dist/cjs/{app-globals-c128c97e.js → app-globals-5cb12916.js} +1 -1
- package/dist/cjs/{ez-combo-box-list_4.cjs.entry.js → classic-search-list_7.cjs.entry.js} +361 -7
- package/dist/cjs/ez-actions-button.cjs.entry.js +5 -4
- package/dist/cjs/ez-alert-list.cjs.entry.js +2 -2
- package/dist/cjs/ez-alert.cjs.entry.js +1 -1
- package/dist/cjs/ez-application.cjs.entry.js +1 -1
- package/dist/cjs/ez-avatar.cjs.entry.js +2 -2
- package/dist/cjs/ez-badge.cjs.entry.js +1 -1
- package/dist/cjs/ez-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/ez-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-calendar.cjs.entry.js +2 -2
- package/dist/cjs/ez-card-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-chart.cjs.entry.js +1 -1
- package/dist/cjs/ez-check.cjs.entry.js +1 -1
- package/dist/cjs/ez-chip.cjs.entry.js +1 -1
- package/dist/cjs/ez-classic-combo-box.cjs.entry.js +37 -16
- 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 +100 -19
- 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 +2 -2
- package/dist/cjs/ez-classic-time-input.cjs.entry.js +197 -0
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +5 -4
- package/dist/cjs/ez-combo-box.cjs.entry.js +5 -4
- package/dist/cjs/ez-date-input.cjs.entry.js +2 -2
- package/dist/cjs/ez-date-time-input.cjs.entry.js +2 -2
- package/dist/cjs/ez-dialog.cjs.entry.js +2 -2
- package/dist/cjs/ez-double-list.cjs.entry.js +2 -2
- package/dist/cjs/ez-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/ez-empty-card.cjs.entry.js +1 -1
- package/dist/cjs/ez-file-item.cjs.entry.js +2 -2
- package/dist/cjs/ez-filter-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-form-view.cjs.entry.js +130 -37
- package/dist/cjs/ez-form.cjs.entry.js +13 -8
- package/dist/cjs/ez-grid-view.cjs.entry.js +1 -1
- package/dist/cjs/ez-grid.cjs.entry.js +11 -7
- package/dist/cjs/ez-guide-navigator.cjs.entry.js +2 -2
- package/dist/cjs/ez-icon.cjs.entry.js +2 -2
- package/dist/cjs/ez-link-builder_6.cjs.entry.js +2 -2
- package/dist/cjs/ez-list-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-list.cjs.entry.js +2 -2
- package/dist/cjs/ez-loading-bar.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal-container.cjs.entry.js +2 -2
- package/dist/cjs/ez-modal.cjs.entry.js +2 -2
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js +2 -2
- package/dist/cjs/ez-number-input.cjs.entry.js +2 -2
- package/dist/cjs/ez-pagination.cjs.entry.js +2 -2
- package/dist/cjs/ez-popover-core.cjs.entry.js +1 -1
- package/dist/cjs/ez-popover-plus_3.cjs.entry.js +1 -1
- package/dist/cjs/ez-popover.cjs.entry.js +1 -1
- package/dist/cjs/ez-popup.cjs.entry.js +2 -2
- package/dist/cjs/ez-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/ez-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-rich-toolbar-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-scroller_2.cjs.entry.js +1 -1
- package/dist/cjs/ez-search-plus.cjs.entry.js +8 -7
- package/dist/cjs/ez-search-result-list.cjs.entry.js +2 -2
- package/dist/cjs/ez-search.cjs.entry.js +11 -10
- package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +2 -2
- package/dist/cjs/ez-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/ez-sortable-list.cjs.entry.js +2 -2
- package/dist/cjs/ez-spinner.cjs.entry.js +2 -2
- package/dist/cjs/ez-split-button.cjs.entry.js +2 -2
- package/dist/cjs/ez-split-item.cjs.entry.js +5 -4
- package/dist/cjs/ez-split-panel.cjs.entry.js +1 -1
- package/dist/cjs/ez-tabselector.cjs.entry.js +1 -1
- package/dist/cjs/ez-tag-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-tag.cjs.entry.js +1 -1
- package/dist/cjs/ez-text-area.cjs.entry.js +1 -1
- package/dist/cjs/ez-text-input.cjs.entry.js +38 -1
- package/dist/cjs/ez-tile-medium.cjs.entry.js +1 -1
- package/dist/cjs/ez-tile.cjs.entry.js +1 -1
- package/dist/cjs/ez-time-input.cjs.entry.js +2 -2
- package/dist/cjs/ez-toast.cjs.entry.js +1 -1
- package/dist/cjs/ez-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/ez-tree.cjs.entry.js +2 -2
- package/dist/cjs/ez-underface.cjs.entry.js +1 -1
- package/dist/cjs/ez-upload.cjs.entry.js +3 -3
- package/dist/cjs/ez-view-stack.cjs.entry.js +1 -1
- package/dist/cjs/ezui.cjs.js +4 -4
- package/dist/cjs/filter-column.cjs.entry.js +2 -2
- package/dist/cjs/{index-00d0166b.js → index-350d0fa0.js} +54 -0
- package/dist/cjs/{index-a7b0c73d.js → index-9e5554cb.js} +45 -18
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/{search-column-8bfee733.js → search-column-9654bf26.js} +5 -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 +59 -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 +30 -4
- package/dist/collection/components/ez-form-view/ez-form-view.css +8 -3
- package/dist/collection/components/ez-form-view/ez-form-view.js +61 -3
- package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js +9 -4
- 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/ImageInput.tpl.js +4 -0
- 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-grid/controller/ag-grid/DataSource.js +3 -0
- package/dist/collection/components/ez-icon/ez-icon.css +1 -0
- package/dist/collection/components/ez-image-input/ez-image-input.css +173 -0
- package/dist/collection/components/ez-image-input/ez-image-input.js +324 -0
- package/dist/collection/components/ez-rich-text/ez-rich-text.js +2 -3
- 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 +18 -0
- package/dist/collection/utils/i18n/locales/es-es.js +18 -0
- package/dist/collection/utils/i18n/locales/pt-br.js +18 -0
- package/dist/custom-elements/index.d.ts +54 -0
- package/dist/custom-elements/index.js +2913 -347
- package/dist/esm/{ApplicationUtils-12768f5a.js → ApplicationUtils-0c5cb207.js} +1 -1
- package/dist/esm/FormLayout-bda67973.js +9 -0
- package/dist/esm/{app-globals-9507c20e.js → app-globals-1db10325.js} +1 -1
- package/dist/esm/{ez-combo-box-list_4.entry.js → classic-search-list_7.entry.js} +359 -8
- package/dist/esm/ez-actions-button.entry.js +5 -4
- package/dist/esm/ez-alert-list.entry.js +2 -2
- package/dist/esm/ez-alert.entry.js +1 -1
- package/dist/esm/ez-application.entry.js +1 -1
- package/dist/esm/ez-avatar.entry.js +2 -2
- package/dist/esm/ez-badge.entry.js +1 -1
- package/dist/esm/ez-breadcrumb.entry.js +1 -1
- package/dist/esm/ez-button.entry.js +1 -1
- package/dist/esm/ez-calendar.entry.js +2 -2
- package/dist/esm/ez-card-item.entry.js +1 -1
- package/dist/esm/ez-chart.entry.js +1 -1
- package/dist/esm/ez-check.entry.js +1 -1
- package/dist/esm/ez-chip.entry.js +1 -1
- package/dist/esm/ez-classic-combo-box.entry.js +37 -16
- 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 +101 -20
- 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 +2 -2
- package/dist/esm/ez-classic-time-input.entry.js +193 -0
- package/dist/esm/ez-collapsible-box.entry.js +5 -4
- package/dist/esm/ez-combo-box.entry.js +5 -4
- package/dist/esm/ez-date-input.entry.js +2 -2
- package/dist/esm/ez-date-time-input.entry.js +2 -2
- package/dist/esm/ez-dialog.entry.js +2 -2
- package/dist/esm/ez-double-list.entry.js +2 -2
- package/dist/esm/ez-dropdown.entry.js +1 -1
- package/dist/esm/ez-empty-card.entry.js +1 -1
- package/dist/esm/ez-file-item.entry.js +2 -2
- package/dist/esm/ez-filter-input.entry.js +1 -1
- package/dist/esm/ez-form-view.entry.js +130 -37
- package/dist/esm/ez-form.entry.js +13 -8
- package/dist/esm/ez-grid-view.entry.js +1 -1
- package/dist/esm/ez-grid.entry.js +9 -5
- package/dist/esm/ez-guide-navigator.entry.js +2 -2
- package/dist/esm/ez-icon.entry.js +2 -2
- package/dist/esm/ez-link-builder_6.entry.js +2 -2
- package/dist/esm/ez-list-item.entry.js +1 -1
- package/dist/esm/ez-list.entry.js +2 -2
- package/dist/esm/ez-loading-bar.entry.js +1 -1
- package/dist/esm/ez-modal-container.entry.js +2 -2
- package/dist/esm/ez-modal.entry.js +2 -2
- package/dist/esm/ez-multi-selection-list.entry.js +2 -2
- package/dist/esm/ez-number-input.entry.js +2 -2
- package/dist/esm/ez-pagination.entry.js +2 -2
- package/dist/esm/ez-popover-core.entry.js +1 -1
- package/dist/esm/ez-popover-plus_3.entry.js +1 -1
- package/dist/esm/ez-popover.entry.js +1 -1
- package/dist/esm/ez-popup.entry.js +2 -2
- package/dist/esm/ez-progress-bar.entry.js +1 -1
- package/dist/esm/ez-radio-button.entry.js +1 -1
- package/dist/esm/ez-rich-toolbar-item.entry.js +1 -1
- package/dist/esm/ez-scroller_2.entry.js +1 -1
- package/dist/esm/ez-search-plus.entry.js +5 -4
- package/dist/esm/ez-search-result-list.entry.js +2 -2
- package/dist/esm/ez-search.entry.js +5 -4
- package/dist/esm/ez-sidebar-navigator.entry.js +2 -2
- package/dist/esm/ez-skeleton.entry.js +2 -2
- package/dist/esm/ez-sortable-list.entry.js +2 -2
- package/dist/esm/ez-spinner.entry.js +2 -2
- package/dist/esm/ez-split-button.entry.js +2 -2
- package/dist/esm/ez-split-item.entry.js +5 -4
- package/dist/esm/ez-split-panel.entry.js +1 -1
- package/dist/esm/ez-tabselector.entry.js +1 -1
- package/dist/esm/ez-tag-input.entry.js +1 -1
- package/dist/esm/ez-tag.entry.js +1 -1
- package/dist/esm/ez-text-area.entry.js +1 -1
- package/dist/esm/ez-text-input.entry.js +38 -1
- package/dist/esm/ez-tile-medium.entry.js +1 -1
- package/dist/esm/ez-tile.entry.js +1 -1
- package/dist/esm/ez-time-input.entry.js +2 -2
- package/dist/esm/ez-toast.entry.js +1 -1
- package/dist/esm/ez-tooltip.entry.js +1 -1
- package/dist/esm/ez-tree.entry.js +2 -2
- package/dist/esm/ez-underface.entry.js +1 -1
- package/dist/esm/ez-upload.entry.js +3 -3
- package/dist/esm/ez-view-stack.entry.js +1 -1
- package/dist/esm/ezui.js +5 -5
- package/dist/esm/filter-column.entry.js +2 -2
- package/dist/esm/{index-62fc771e.js → index-225aa0c3.js} +54 -0
- package/dist/esm/{index-baa5e267.js → index-5a720e56.js} +45 -19
- package/dist/esm/loader.js +5 -5
- package/dist/esm/{search-column-c00119ae.js → search-column-c3df6285.js} +5 -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-e75c7a23.entry.js → p-000159dc.entry.js} +1 -1
- package/dist/ezui/p-05bcbe61.entry.js +1 -0
- package/dist/ezui/{p-93e1c917.entry.js → p-05e68ab3.entry.js} +1 -1
- package/dist/ezui/{p-288631d1.entry.js → p-06f1b8e4.entry.js} +1 -1
- package/dist/ezui/{p-2854f087.entry.js → p-0820f8c3.entry.js} +1 -1
- package/dist/ezui/{p-6d596a5a.entry.js → p-0b531233.entry.js} +1 -1
- package/dist/ezui/{p-79277e43.entry.js → p-0ba284cd.entry.js} +1 -1
- package/dist/ezui/p-0d393a5d.entry.js +1 -0
- package/dist/ezui/{p-3fe05d6b.entry.js → p-12cc95dc.entry.js} +1 -1
- package/dist/ezui/p-14d6aeb8.entry.js +1 -0
- package/dist/ezui/{p-2528e988.entry.js → p-169d460d.entry.js} +1 -1
- package/dist/ezui/{p-6f77a359.entry.js → p-1723f728.entry.js} +1 -1
- package/dist/ezui/{p-a401041c.entry.js → p-181cb82f.entry.js} +1 -1
- package/dist/ezui/{p-eee3c7ff.entry.js → p-24993171.entry.js} +1 -1
- package/dist/ezui/{p-377768bd.entry.js → p-25748a4e.entry.js} +2 -2
- package/dist/ezui/p-27421015.entry.js +1 -0
- package/dist/ezui/p-27c8a9b7.entry.js +1 -0
- package/dist/ezui/{p-4f0632b4.js → p-29341f74.js} +1 -1
- package/dist/ezui/p-29f0de90.entry.js +1 -0
- package/dist/ezui/{p-44ad16df.entry.js → p-2b51d5a9.entry.js} +1 -1
- package/dist/ezui/p-2c123fdf.entry.js +1 -0
- package/dist/ezui/{p-6a9a20a0.entry.js → p-2fa490f1.entry.js} +1 -1
- package/dist/ezui/{p-da585ff3.entry.js → p-3453dad5.entry.js} +1 -1
- package/dist/ezui/p-34d596a3.entry.js +1 -0
- package/dist/ezui/{p-ef8bd3e8.entry.js → p-35e3715c.entry.js} +1 -1
- package/dist/ezui/{p-fa6732f2.entry.js → p-44b39e81.entry.js} +1 -1
- package/dist/ezui/{p-124699e0.entry.js → p-458027b5.entry.js} +1 -1
- package/dist/ezui/p-47e4a8ce.js +1 -0
- package/dist/ezui/{p-4d30b703.entry.js → p-4a876b8b.entry.js} +1 -1
- package/dist/ezui/p-4d909730.entry.js +1 -0
- package/dist/ezui/{p-e27d7dc2.entry.js → p-4df2edb5.entry.js} +1 -1
- package/dist/ezui/{p-6369a0cd.entry.js → p-51e34317.entry.js} +1 -1
- package/dist/ezui/{p-957d08cd.entry.js → p-534209bf.entry.js} +1 -1
- package/dist/ezui/{p-0c0eb410.entry.js → p-55a9e4ba.entry.js} +1 -1
- package/dist/ezui/p-5895e687.js +1 -0
- package/dist/ezui/{p-59a98e31.entry.js → p-636ea910.entry.js} +1 -1
- package/dist/ezui/{p-1f50fa05.entry.js → p-6b51c9cc.entry.js} +1 -1
- package/dist/ezui/p-6ec40dec.entry.js +1 -0
- package/dist/ezui/{p-5ed81457.entry.js → p-6fc26622.entry.js} +1 -1
- package/dist/ezui/p-70f30bfe.entry.js +1 -0
- package/dist/ezui/p-71b341cc.entry.js +1 -0
- package/dist/ezui/{p-cd6f5783.entry.js → p-75443a91.entry.js} +1 -1
- package/dist/ezui/{p-e8c6c973.entry.js → p-75e650ff.entry.js} +1 -1
- package/dist/ezui/p-75e8862c.entry.js +1 -0
- package/dist/ezui/{p-d6f50207.entry.js → p-770cf2b8.entry.js} +1 -1
- package/dist/ezui/{p-91c9d50e.entry.js → p-78e975b4.entry.js} +1 -1
- package/dist/ezui/{p-1e7a8633.entry.js → p-81461d2f.entry.js} +1 -1
- package/dist/ezui/p-81a98a7c.entry.js +1 -0
- package/dist/ezui/p-82e1d7fc.entry.js +1 -0
- package/dist/ezui/{p-8df1ca33.entry.js → p-82fa4b09.entry.js} +1 -1
- package/dist/ezui/p-87739608.entry.js +1 -0
- package/dist/ezui/p-88a115b3.js +1 -0
- package/dist/ezui/p-892e7326.entry.js +1 -0
- package/dist/ezui/p-8f7373ab.entry.js +1 -0
- package/dist/ezui/{p-f34ec732.entry.js → p-980f1f18.entry.js} +1 -1
- package/dist/ezui/{p-5a11cf56.js → p-9825c1d2.js} +1 -1
- package/dist/ezui/{p-a3075f52.entry.js → p-9bcfa689.entry.js} +1 -1
- package/dist/ezui/{p-e882635e.entry.js → p-9d515e5b.entry.js} +1 -1
- package/dist/ezui/{p-1adf7139.entry.js → p-9fb7131e.entry.js} +1 -1
- package/dist/ezui/{p-6f119d5f.entry.js → p-a6ea8da3.entry.js} +1 -1
- package/dist/ezui/{p-d6742c1e.entry.js → p-a9432878.entry.js} +1 -1
- package/dist/ezui/{p-e8c57463.entry.js → p-b21efe83.entry.js} +1 -1
- package/dist/ezui/{p-a0bf1fc7.entry.js → p-bc693db6.entry.js} +1 -1
- package/dist/ezui/{p-1cde96f9.entry.js → p-be2e39c5.entry.js} +1 -1
- package/dist/ezui/{p-641ee538.js → p-c178730b.js} +1 -1
- package/dist/ezui/{p-9f5fa3f9.entry.js → p-c2b20f78.entry.js} +1 -1
- package/dist/ezui/{p-6020f3d5.entry.js → p-c754774e.entry.js} +1 -1
- package/dist/ezui/{p-d2645bdf.entry.js → p-c96e536d.entry.js} +1 -1
- package/dist/ezui/{p-cfa26133.entry.js → p-ce2614fc.entry.js} +1 -1
- package/dist/ezui/{p-20c024f7.entry.js → p-cf33bc48.entry.js} +1 -1
- package/dist/ezui/p-d3aca6aa.entry.js +1 -0
- package/dist/ezui/p-d57ea090.entry.js +1 -0
- package/dist/ezui/{p-a80b1287.entry.js → p-dfca5946.entry.js} +1 -1
- package/dist/ezui/{p-5ab08b60.entry.js → p-e0380234.entry.js} +1 -1
- package/dist/ezui/{p-e99cbb51.entry.js → p-e039e049.entry.js} +1 -1
- package/dist/ezui/{p-a7eab406.entry.js → p-e0fd2ce5.entry.js} +1 -1
- package/dist/ezui/{p-7f792043.entry.js → p-e195eaad.entry.js} +1 -1
- package/dist/ezui/{p-7b999377.entry.js → p-e275353b.entry.js} +1 -1
- package/dist/ezui/{p-23a36bb6.js → p-e4c7eb39.js} +2 -2
- package/dist/ezui/{p-2a70f094.entry.js → p-e94d3af5.entry.js} +1 -1
- package/dist/ezui/p-e963cb3f.entry.js +1 -0
- package/dist/ezui/{p-e7a7c594.entry.js → p-e9b409c1.entry.js} +1 -1
- package/dist/ezui/p-f0425f87.entry.js +1 -0
- package/dist/ezui/{p-19cf13bc.entry.js → p-f1b54699.entry.js} +1 -1
- package/dist/ezui/{p-a3ada561.entry.js → p-f26b97e9.entry.js} +1 -1
- package/dist/ezui/{p-ff4bde07.entry.js → p-f32d5a82.entry.js} +1 -1
- package/dist/ezui/{p-411c0222.entry.js → p-f7ca8634.entry.js} +1 -1
- package/dist/ezui/{p-294f54fe.entry.js → p-fe0bca65.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 +6 -0
- package/dist/types/components/ez-form-view/ez-form-view.d.ts +11 -0
- package/dist/types/components/ez-form-view/fieldbuilder/FieldBuilder.d.ts +8 -1
- 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/ImageInput.tpl.d.ts +2 -0
- 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-image-input/ez-image-input.d.ts +42 -0
- package/dist/types/components/ez-text-input/ez-text-input.d.ts +4 -0
- package/dist/types/components.d.ts +3220 -1969
- package/dist/types/utils/form/interfaces/FormLayout.d.ts +3 -1
- package/dist/types/utils/i18n/locales/en-us.d.ts +18 -0
- package/dist/types/utils/i18n/locales/es-es.d.ts +18 -0
- package/dist/types/utils/i18n/locales/pt-br.d.ts +18 -0
- package/dist/types/utils/i18n/translations.d.ts +54 -0
- package/package.json +1 -1
- package/react/components.d.ts +9 -0
- package/react/components.js +9 -0
- package/react/components.js.map +1 -1
- package/dist/ezui/p-1266fe78.entry.js +0 -1
- package/dist/ezui/p-14807f4e.js +0 -1
- package/dist/ezui/p-1730ee24.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-59092a66.entry.js +0 -1
- package/dist/ezui/p-7fe97ef5.entry.js +0 -1
- package/dist/ezui/p-8d626d2b.entry.js +0 -1
- package/dist/ezui/p-8dc267ff.entry.js +0 -1
- package/dist/ezui/p-96b33264.entry.js +0 -1
- package/dist/ezui/p-9b2e6438.entry.js +0 -1
- package/dist/ezui/p-adaa2a81.entry.js +0 -1
- package/dist/ezui/p-bc2f844e.entry.js +0 -1
- package/dist/ezui/p-c82acfc6.entry.js +0 -1
- package/dist/ezui/p-d8cc640d.entry.js +0 -1
- package/dist/ezui/p-dee18824.entry.js +0 -1
- package/dist/ezui/p-df316d40.entry.js +0 -1
- package/dist/ezui/p-eca050b4.entry.js +0 -1
|
@@ -0,0 +1,683 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-9e5554cb.js');
|
|
6
|
+
const CSSVarsUtils = require('./CSSVarsUtils-f20973d1.js');
|
|
7
|
+
const core = require('@sankhyalabs/core');
|
|
8
|
+
const ApplicationUtils = require('./ApplicationUtils-006ca96f.js');
|
|
9
|
+
require('./DialogType-2114c337.js');
|
|
10
|
+
require('./CheckMode-ecb90b87.js');
|
|
11
|
+
const index$1 = require('./index-350d0fa0.js');
|
|
12
|
+
const types = require('./types-6a5df0c7.js');
|
|
13
|
+
require('./FormLayout-fe8da83c.js');
|
|
14
|
+
const searchFormatters = require('./searchFormatters-051f8677.js');
|
|
15
|
+
|
|
16
|
+
const ezClassicSearchCss = ":host{--ez-classic-search--height:42px;--ez-classic-search--width:100%;--ez-classic-search__icon--width:48px;--ez-classic-search--border-radius:var(--border--radius-medium, 12px);--ez-classic-search--border-radius-small:var(--border--radius-small, 6px);--ez-classic-search--font-size:var(--text--medium, 14px);--ez-classic-search--font-family:var(--font-pattern, Arial);--ez-classic-search--font-weight--large:var(--text-weight--large, 500);--ez-classic-search--font-weight--medium:var(--text-weight--medium, 400);--ez-classic-search--background-color--xlight:var(--background--xlight, #fff);--ez-classic-search--background-medium:var(--background--medium, #f0f3f7);--ez-classic-search--line-height:calc(var(--text--medium, 14px) + 4px);--ez-classic-search__input--background-color:var(--background--medium, #e0e0e0);--ez-classic-search__input--border:var(--border--medium, 2px solid);--ez-classic-search__input--border-color:var(--ez-classic-search__input--background-color);--ez-classic-search__input--focus--border-color:var(--color--primary, #008561);--ez-classic-search__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-classic-search__input--disabled--color:var(--text--disable, #AFB6C0);--ez-classic-search__input--error--border-color:#CC2936;--ez-classic-search__btn--color:var(--title--primary, #2B3A54);--ez-classic-search__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-classic-search__btn-hover--color:var(--color--primary, #4e4e4e);--ez-classic-search__label--color:var(--title--primary, #2B3A54);--ez-classic-search--space--medium:var(--space--medium, 12px);--ez-classic-search--space--small:var(--space--small, 6px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-classic-search--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-classic-input__input--border-color:var(--color--strokes, #dce0e8);--ez-classic-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-classic-input__input--disabled--color:var(--title--primary, #2B3A54)}.btn{outline:none;border:none;background:none;cursor:pointer;color:var(--ez-classic-search__btn--color)}.btn:disabled{cursor:not-allowed;color:var(--ez-classic-search__btn-disabled--color)}.btn:disabled:hover{cursor:not-allowed;color:var(--ez-classic-search__btn-disabled--color)}.btn:hover{color:var(--ez-classic-search__btn-hover--color)}.btn__close{visibility:hidden}ez-classic-input:hover .btn__close,ez-classic-input:focus .btn__close{visibility:visible}";
|
|
17
|
+
|
|
18
|
+
const EzClassicSearch = class {
|
|
19
|
+
constructor(hostRef) {
|
|
20
|
+
index.registerInstance(this, hostRef);
|
|
21
|
+
this.ezChange = index.createEvent(this, "ezChange", 7);
|
|
22
|
+
this._changeDeboucingTimeout = null;
|
|
23
|
+
this._limitCharsToSearch = 3;
|
|
24
|
+
this._deboucingTime = 300;
|
|
25
|
+
this._maxWidthValue = 0;
|
|
26
|
+
this._tabPressed = false;
|
|
27
|
+
this._startHighlightTag = "<span class='card-item__highlight'>";
|
|
28
|
+
this._endHighlightTag = "</span>";
|
|
29
|
+
this._preSelection = undefined;
|
|
30
|
+
this._visibleOptions = undefined;
|
|
31
|
+
this._startLoading = false;
|
|
32
|
+
this._showLoading = true;
|
|
33
|
+
this._criteria = undefined;
|
|
34
|
+
this.value = undefined;
|
|
35
|
+
this.label = undefined;
|
|
36
|
+
this.enabled = true;
|
|
37
|
+
this.errorMessage = undefined;
|
|
38
|
+
this.size = "default";
|
|
39
|
+
this.optionLoader = undefined;
|
|
40
|
+
this.contextProperties = undefined;
|
|
41
|
+
this.showSelectedValue = true;
|
|
42
|
+
this.showOptionValue = true;
|
|
43
|
+
this.suppressEmptyOption = false;
|
|
44
|
+
this.stopPropagateEnterKeyEvent = false;
|
|
45
|
+
this.mode = "regular";
|
|
46
|
+
this.classic = false;
|
|
47
|
+
this.required = false;
|
|
48
|
+
this.canShowError = true;
|
|
49
|
+
this.hideErrorOnFocusOut = true;
|
|
50
|
+
this.listOptionsPosition = undefined;
|
|
51
|
+
this.isTextSearch = false;
|
|
52
|
+
this.ignoreLimitCharsToSearch = false;
|
|
53
|
+
this.options = undefined;
|
|
54
|
+
this.suppressSearch = false;
|
|
55
|
+
this.ensureClearButtonVisible = false;
|
|
56
|
+
this.suppressPreLoad = true;
|
|
57
|
+
this.autoFocus = false;
|
|
58
|
+
this.alternativePlaceholder = undefined;
|
|
59
|
+
this.showMore = undefined;
|
|
60
|
+
this.suppressInputPersist = false;
|
|
61
|
+
this.hideDescriptionInput = false;
|
|
62
|
+
}
|
|
63
|
+
observeErrorMessage() {
|
|
64
|
+
var _a;
|
|
65
|
+
if (this._textInput) {
|
|
66
|
+
this._textInput.errorMessage = this.errorMessage;
|
|
67
|
+
if (!((_a = this.errorMessage) === null || _a === void 0 ? void 0 : _a.trim()) && this.errorMessage) {
|
|
68
|
+
this.setInputValue();
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
getValue(val) {
|
|
73
|
+
return typeof val === 'object' ? val === null || val === void 0 ? void 0 : val.value : val;
|
|
74
|
+
}
|
|
75
|
+
validateNewValue(newValue, oldValue) {
|
|
76
|
+
const parsedNewValue = this.getValue(newValue);
|
|
77
|
+
const parsedOldValue = this.getValue(oldValue);
|
|
78
|
+
const newValueIsValid = parsedNewValue !== "[object Object]";
|
|
79
|
+
const valuesIsDifferent = parsedNewValue !== parsedOldValue;
|
|
80
|
+
if (newValueIsValid && valuesIsDifferent) {
|
|
81
|
+
return true;
|
|
82
|
+
}
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
async observeValue(newValue, oldValue) {
|
|
86
|
+
if (this._textInput && this.validateNewValue(newValue, oldValue)) {
|
|
87
|
+
if (typeof newValue === "string") {
|
|
88
|
+
await this.handleValueAsString(newValue);
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
const newValueSelected = this.getSelectedOption(newValue);
|
|
92
|
+
const currentValue = this.getSelectedOption(this._currentValue);
|
|
93
|
+
if (this.isDifferentValues(currentValue, newValueSelected)) {
|
|
94
|
+
this._currentValue = newValueSelected;
|
|
95
|
+
this.setInputValue();
|
|
96
|
+
const valueEmitted = newValueSelected !== null && newValueSelected !== void 0 ? newValueSelected : undefined;
|
|
97
|
+
this.ezChange.emit(valueEmitted);
|
|
98
|
+
}
|
|
99
|
+
this.resetOptions();
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
observeOptions(newOptions, oldOptions) {
|
|
103
|
+
if (!newOptions.length && this.suppressPreLoad)
|
|
104
|
+
return;
|
|
105
|
+
if ((newOptions === null || newOptions === void 0 ? void 0 : newOptions.join('')) === (oldOptions === null || oldOptions === void 0 ? void 0 : oldOptions.join('')))
|
|
106
|
+
return;
|
|
107
|
+
this.loadOptions(types.SearchMode.PRELOAD);
|
|
108
|
+
}
|
|
109
|
+
/*
|
|
110
|
+
* Retorna uma promise com o valor da opção selecionada,
|
|
111
|
+
* que será resolvida quando o backend devolver este dado.
|
|
112
|
+
*/
|
|
113
|
+
async getValueAsync() {
|
|
114
|
+
if (!this._showLoading) {
|
|
115
|
+
return new Promise(resolve => resolve(this.value));
|
|
116
|
+
}
|
|
117
|
+
return new Promise(resolve => {
|
|
118
|
+
let id = setInterval(() => {
|
|
119
|
+
if (!this._showLoading) {
|
|
120
|
+
clearInterval(id);
|
|
121
|
+
resolve(this.value);
|
|
122
|
+
}
|
|
123
|
+
}, 100);
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Aplica o foco no campo.
|
|
128
|
+
*/
|
|
129
|
+
async setFocus(options) {
|
|
130
|
+
if (this._textInput) {
|
|
131
|
+
this._textInput.setFocus(options);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Remove o foco do campo.
|
|
136
|
+
*/
|
|
137
|
+
async setBlur() {
|
|
138
|
+
if (this._textInput) {
|
|
139
|
+
this._textInput.setBlur();
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Retorna se o conteúdo é inválido.
|
|
144
|
+
*/
|
|
145
|
+
async isInvalid() {
|
|
146
|
+
return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Limpa o valor do campo de pesquisa
|
|
150
|
+
*/
|
|
151
|
+
async clearValue() {
|
|
152
|
+
this.clearSearch();
|
|
153
|
+
}
|
|
154
|
+
async handleValueAsString(value) {
|
|
155
|
+
if (this.getSelectedOption(value)) {
|
|
156
|
+
this.setInputValue();
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
await this.loadDescriptionValue(value);
|
|
160
|
+
if (!this._currentValue) {
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
this.setInputValue();
|
|
164
|
+
this.ezChange.emit(this.value);
|
|
165
|
+
this._currentValue = this.value;
|
|
166
|
+
}
|
|
167
|
+
isDifferentValues(firstValue, secondValue) {
|
|
168
|
+
return core.ObjectUtils.objectToString(firstValue || {}) !== core.ObjectUtils.objectToString(secondValue || {});
|
|
169
|
+
}
|
|
170
|
+
getFormattedText(currentValue) {
|
|
171
|
+
if (currentValue == undefined) {
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
let text = (!this.showSelectedValue || currentValue.value == undefined) ? currentValue.label : currentValue.label ? `${currentValue.value} - ${currentValue.label}` : currentValue.value;
|
|
175
|
+
text = text === null || text === void 0 ? void 0 : text.replace(new RegExp(this._startHighlightTag, 'g'), '').replace(new RegExp(this._endHighlightTag, 'g'), '');
|
|
176
|
+
return text;
|
|
177
|
+
}
|
|
178
|
+
getText() {
|
|
179
|
+
const currentValue = this.getSelectedOption(this._currentValue);
|
|
180
|
+
const text = this.getFormattedText(currentValue);
|
|
181
|
+
return searchFormatters.replaceQuotes(text);
|
|
182
|
+
}
|
|
183
|
+
getSelectedOption(value) {
|
|
184
|
+
if (typeof value === "string" || value instanceof String) {
|
|
185
|
+
return this._visibleOptions.find(o => o.value === value);
|
|
186
|
+
}
|
|
187
|
+
if (value) {
|
|
188
|
+
return Object.assign(Object.assign({}, value), { value: searchFormatters.replaceHighlight(value === null || value === void 0 ? void 0 : value.value), label: searchFormatters.replaceHighlight(value === null || value === void 0 ? void 0 : value.label) });
|
|
189
|
+
}
|
|
190
|
+
return value;
|
|
191
|
+
}
|
|
192
|
+
updateVisibleOptions() {
|
|
193
|
+
let opts = this._source || [];
|
|
194
|
+
if (this.suppressEmptyOption) {
|
|
195
|
+
this._visibleOptions = opts;
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
this._visibleOptions = [{ value: undefined, label: "" }].concat(opts);
|
|
199
|
+
}
|
|
200
|
+
this._maxWidthValue = this.getMaxWidthValue();
|
|
201
|
+
}
|
|
202
|
+
getMaxWidthValue() {
|
|
203
|
+
var _a;
|
|
204
|
+
const arrValues = [];
|
|
205
|
+
(_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.forEach(opt => {
|
|
206
|
+
const widthValue = this.getWidthValue(opt.value);
|
|
207
|
+
if (!arrValues.includes(widthValue)) {
|
|
208
|
+
arrValues.push(widthValue);
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
return arrValues.length > 1 ? Math.max(...arrValues) : 0;
|
|
212
|
+
}
|
|
213
|
+
getWidthValue(value) {
|
|
214
|
+
if (this._itemValueBasis != undefined) {
|
|
215
|
+
const span = this._itemValueBasis;
|
|
216
|
+
if (value != undefined) {
|
|
217
|
+
span.innerHTML = value;
|
|
218
|
+
return span.clientWidth > 0 ? (span.clientWidth + 2) : 0;
|
|
219
|
+
}
|
|
220
|
+
else {
|
|
221
|
+
span.innerHTML = "";
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
return 0;
|
|
225
|
+
}
|
|
226
|
+
showOptions() {
|
|
227
|
+
if (!this.enabled)
|
|
228
|
+
return;
|
|
229
|
+
if (this.isOptionsVisible()) {
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
this._ezPopOverPlusElement.showUnder(this._textInput);
|
|
233
|
+
}
|
|
234
|
+
hideOptions() {
|
|
235
|
+
this._ezPopOverPlusElement.hide();
|
|
236
|
+
}
|
|
237
|
+
isOptionsVisible() {
|
|
238
|
+
return this._ezPopOverPlusElement.opened;
|
|
239
|
+
}
|
|
240
|
+
selectCurrentOption(focusOnInput = true) {
|
|
241
|
+
if (this._preSelection !== undefined) {
|
|
242
|
+
this.selectOption(this._visibleOptions[this._preSelection], focusOnInput);
|
|
243
|
+
this._preSelection = undefined;
|
|
244
|
+
}
|
|
245
|
+
else {
|
|
246
|
+
this.controlListWithOnlyOne();
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
updateSource(source) {
|
|
250
|
+
this._startLoading = false;
|
|
251
|
+
if (source instanceof Promise) {
|
|
252
|
+
this._showLoading = true;
|
|
253
|
+
source.then(result => {
|
|
254
|
+
this.updateSource(result);
|
|
255
|
+
}).finally(() => {
|
|
256
|
+
this._showLoading = false;
|
|
257
|
+
});
|
|
258
|
+
this.updateVisibleOptions();
|
|
259
|
+
}
|
|
260
|
+
else {
|
|
261
|
+
this._showLoading = false;
|
|
262
|
+
if (Array.isArray(source)) {
|
|
263
|
+
this._source = source;
|
|
264
|
+
this.updateVisibleOptions();
|
|
265
|
+
if (this._tabPressed) {
|
|
266
|
+
this._tabPressed = false;
|
|
267
|
+
this.controlEmptySearch(false);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
else {
|
|
271
|
+
this.selectOption(source);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
clearSource() {
|
|
276
|
+
this._source = [];
|
|
277
|
+
this.updateVisibleOptions();
|
|
278
|
+
}
|
|
279
|
+
selectOption(newOption, focusOnInput = true) {
|
|
280
|
+
var _a, _b;
|
|
281
|
+
const currentValue = this.getSelectedOption(this.value);
|
|
282
|
+
const newOptionsReplaced = Object.assign(Object.assign({}, newOption), { value: searchFormatters.replaceHighlight(newOption === null || newOption === void 0 ? void 0 : newOption.value), label: searchFormatters.replaceHighlight(newOption === null || newOption === void 0 ? void 0 : newOption.label) });
|
|
283
|
+
const newOptionsFormatted = Object.assign(Object.assign({}, newOptionsReplaced), { value: searchFormatters.replaceQuotes(newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.value), label: searchFormatters.replaceQuotes(newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.label) });
|
|
284
|
+
if ((((_a = currentValue === null || currentValue === void 0 ? void 0 : currentValue.value) === null || _a === void 0 ? void 0 : _a.toString()) !== ((_b = newOptionsFormatted === null || newOptionsFormatted === void 0 ? void 0 : newOptionsFormatted.value) === null || _b === void 0 ? void 0 : _b.toString()))
|
|
285
|
+
|| (currentValue == undefined && newOptionsFormatted != undefined && "value" in newOptionsFormatted)) {
|
|
286
|
+
const adjustedOpt = !(newOptionsFormatted === null || newOptionsFormatted === void 0 ? void 0 : newOptionsFormatted.value) ? undefined : newOptionsFormatted;
|
|
287
|
+
this.value = adjustedOpt;
|
|
288
|
+
this._currentValue = adjustedOpt;
|
|
289
|
+
}
|
|
290
|
+
else {
|
|
291
|
+
this.setInputValue();
|
|
292
|
+
this.resetOptions();
|
|
293
|
+
}
|
|
294
|
+
this._visibleOptions = [];
|
|
295
|
+
this.clearSource();
|
|
296
|
+
if (focusOnInput) {
|
|
297
|
+
setTimeout(() => {
|
|
298
|
+
this.setFocus();
|
|
299
|
+
}, 0);
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
loadOptions(mode, argument = "") {
|
|
303
|
+
this._criteria = argument;
|
|
304
|
+
this._startLoading = true;
|
|
305
|
+
if (this.optionLoader) {
|
|
306
|
+
const searchArgument = { mode, argument };
|
|
307
|
+
this.updateSource(this.optionLoader(searchArgument, this.contextProperties));
|
|
308
|
+
}
|
|
309
|
+
else {
|
|
310
|
+
this.updateSource(this.options);
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
cancelPreselection() {
|
|
314
|
+
if (!this._textInput.value && this._currentValue && this._source.length > 0) {
|
|
315
|
+
this.selectOption(undefined);
|
|
316
|
+
}
|
|
317
|
+
else {
|
|
318
|
+
window.setTimeout(() => {
|
|
319
|
+
this.setInputValue();
|
|
320
|
+
}, this._deboucingTime);
|
|
321
|
+
}
|
|
322
|
+
this.resetOptions();
|
|
323
|
+
}
|
|
324
|
+
setInputValue(clearError = true) {
|
|
325
|
+
if (this.suppressInputPersist) {
|
|
326
|
+
this.clearSearch();
|
|
327
|
+
return;
|
|
328
|
+
}
|
|
329
|
+
const textValue = this.getText();
|
|
330
|
+
if ((this._textInput.value || '') !== textValue) {
|
|
331
|
+
this._textInput.value = textValue;
|
|
332
|
+
if (clearError) {
|
|
333
|
+
this.errorMessage = null;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
clearSearch() {
|
|
338
|
+
this.value = null;
|
|
339
|
+
this._currentValue = null;
|
|
340
|
+
this._textInput.value = "";
|
|
341
|
+
}
|
|
342
|
+
controlListWithOnlyOne(focusOnInput = true) {
|
|
343
|
+
var _a, _b;
|
|
344
|
+
const source = (_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.filter((opt) => opt.label !== "" && opt.value != undefined);
|
|
345
|
+
if ((source === null || source === void 0 ? void 0 : source.length) > 0) {
|
|
346
|
+
const startHighlight = new RegExp(this._startHighlightTag, 'g');
|
|
347
|
+
const endHighlight = new RegExp(this._endHighlightTag, 'g');
|
|
348
|
+
let title = core.StringUtils.decodeHtmlEntities(source[0].label);
|
|
349
|
+
const option = {
|
|
350
|
+
value: (_b = source[0].value) === null || _b === void 0 ? void 0 : _b.replace(startHighlight, '').replace(endHighlight, ''),
|
|
351
|
+
label: title === null || title === void 0 ? void 0 : title.replace(startHighlight, '').replace(endHighlight, '')
|
|
352
|
+
};
|
|
353
|
+
this.selectOption(option, focusOnInput);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
controlEmptySearch(focusOnInput = true) {
|
|
357
|
+
var _a;
|
|
358
|
+
if (!((_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
359
|
+
this.clearSearch();
|
|
360
|
+
ApplicationUtils.ApplicationUtils.info(this.i18n("ez-classic-search.emptyList"));
|
|
361
|
+
}
|
|
362
|
+
else {
|
|
363
|
+
this.controlListWithOnlyOne(focusOnInput);
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
async loadDescriptionValue(argument) {
|
|
367
|
+
var _a, _b, _c;
|
|
368
|
+
if (argument == undefined) {
|
|
369
|
+
return;
|
|
370
|
+
}
|
|
371
|
+
if (((_a = this.options) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
372
|
+
this.loadOptionValue(argument);
|
|
373
|
+
return;
|
|
374
|
+
}
|
|
375
|
+
const searchMode = this.hideDescriptionInput ? types.SearchMode.LOAD_DESCRIPTION : types.SearchMode.PREDICTIVE;
|
|
376
|
+
const searchArgument = {
|
|
377
|
+
mode: searchMode,
|
|
378
|
+
argument
|
|
379
|
+
};
|
|
380
|
+
try {
|
|
381
|
+
const source = await ((_b = this.optionLoader) === null || _b === void 0 ? void 0 : _b.call(this, searchArgument, this.contextProperties));
|
|
382
|
+
if (source == undefined) {
|
|
383
|
+
return;
|
|
384
|
+
}
|
|
385
|
+
if (source instanceof Promise) {
|
|
386
|
+
source.then((result) => {
|
|
387
|
+
this.setDescriptionValue(result);
|
|
388
|
+
});
|
|
389
|
+
}
|
|
390
|
+
else {
|
|
391
|
+
this.setDescriptionValue(source);
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
catch (error) {
|
|
395
|
+
if (((_c = error === null || error === void 0 ? void 0 : error.constructor) === null || _c === void 0 ? void 0 : _c.name) === "WarningException") {
|
|
396
|
+
this.errorMessage = error.message;
|
|
397
|
+
}
|
|
398
|
+
throw error;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
setDescriptionValue(source) {
|
|
402
|
+
const value = (source === null || source === void 0 ? void 0 : source[0]) || source;
|
|
403
|
+
if (value == undefined || !Object.keys(value).length) {
|
|
404
|
+
this.showNoResultMessage();
|
|
405
|
+
return;
|
|
406
|
+
}
|
|
407
|
+
this._currentValue = value ? Object.assign(Object.assign({}, value), { value: searchFormatters.replaceHighlight(value.value), label: searchFormatters.replaceHighlight(value.label) }) : value;
|
|
408
|
+
this.value = this._currentValue;
|
|
409
|
+
this.setTextInputValue();
|
|
410
|
+
}
|
|
411
|
+
setTextInputValue() {
|
|
412
|
+
if (this._textInput && (this._textInput.value === null || this._textInput.value === undefined)) {
|
|
413
|
+
if (this.value === undefined || this.value === null)
|
|
414
|
+
return;
|
|
415
|
+
const textValue = (typeof this.value === 'string') ? this.value : this.getFormattedText(this.value);
|
|
416
|
+
this._textInput.value = searchFormatters.replaceQuotes(textValue);
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
loadOptionValue(argument) {
|
|
420
|
+
var _a;
|
|
421
|
+
const source = (_a = this.options) === null || _a === void 0 ? void 0 : _a.find((opt) => opt.value === argument);
|
|
422
|
+
if (source != undefined) {
|
|
423
|
+
this.selectOption(source);
|
|
424
|
+
}
|
|
425
|
+
else {
|
|
426
|
+
this.showNoResultMessage();
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
async showNoResultMessage() {
|
|
430
|
+
this.clearSearch();
|
|
431
|
+
ApplicationUtils.ApplicationUtils.info(this.i18n("ez-classic-search.emptySearch", { field: this.getFieldLabel() }));
|
|
432
|
+
}
|
|
433
|
+
getFieldLabel() {
|
|
434
|
+
var _a;
|
|
435
|
+
return (_a = this.label) === null || _a === void 0 ? void 0 : _a.replace(this.i18n("app.requiredInfo"), "").toUpperCase();
|
|
436
|
+
}
|
|
437
|
+
resetOptions() {
|
|
438
|
+
if (this.showMore) {
|
|
439
|
+
this.handleResetOptionsWithShowMoreVisible();
|
|
440
|
+
return;
|
|
441
|
+
}
|
|
442
|
+
this.hideOptions();
|
|
443
|
+
this._criteria = undefined;
|
|
444
|
+
this._preSelection = undefined;
|
|
445
|
+
this.updateVisibleOptions();
|
|
446
|
+
}
|
|
447
|
+
handleResetOptionsWithShowMoreVisible() {
|
|
448
|
+
//Eh preciso adicionar um timeout para garantir que o evento seja escutado pelo botão de mostrar mais.
|
|
449
|
+
setTimeout(() => {
|
|
450
|
+
this.hideOptions();
|
|
451
|
+
this._criteria = undefined;
|
|
452
|
+
this._preSelection = undefined;
|
|
453
|
+
this.updateVisibleOptions();
|
|
454
|
+
}, 100);
|
|
455
|
+
}
|
|
456
|
+
async handleInitialValue() {
|
|
457
|
+
const valueIsValid = !!this.getValue(this.value);
|
|
458
|
+
if (!valueIsValid) {
|
|
459
|
+
return;
|
|
460
|
+
}
|
|
461
|
+
if (typeof this.value === "string") {
|
|
462
|
+
await this.handleValueAsString(this.value);
|
|
463
|
+
return;
|
|
464
|
+
}
|
|
465
|
+
let text = this.getFormattedText(this.value);
|
|
466
|
+
text = searchFormatters.replaceQuotes(text);
|
|
467
|
+
this._textInput.value = text;
|
|
468
|
+
}
|
|
469
|
+
//---------------------------------------------
|
|
470
|
+
// Lifecycle web component
|
|
471
|
+
//---------------------------------------------
|
|
472
|
+
async componentWillLoad() {
|
|
473
|
+
this.i18n = await index$1.initI18n();
|
|
474
|
+
if (this.options === undefined) {
|
|
475
|
+
this.options = [];
|
|
476
|
+
const optionsTags = this.el.querySelectorAll("option");
|
|
477
|
+
if (optionsTags) {
|
|
478
|
+
optionsTags.forEach(e => {
|
|
479
|
+
let label = e.innerText;
|
|
480
|
+
let value = e.getAttribute("value");
|
|
481
|
+
let details = e.getAttribute("details");
|
|
482
|
+
if (!value) {
|
|
483
|
+
value = label;
|
|
484
|
+
}
|
|
485
|
+
this.options.push({ label, value, details });
|
|
486
|
+
e.hidden = true;
|
|
487
|
+
});
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
this.updateSource([]);
|
|
491
|
+
}
|
|
492
|
+
componentDidRender() {
|
|
493
|
+
var _a;
|
|
494
|
+
(_a = this._optionsList) === null || _a === void 0 ? void 0 : _a.querySelectorAll(".item").forEach((elem) => {
|
|
495
|
+
core.ElementIDUtils.addIDInfoIfNotExists(elem, "itemSearch");
|
|
496
|
+
});
|
|
497
|
+
}
|
|
498
|
+
async componentDidLoad() {
|
|
499
|
+
this._currentValue = this.value;
|
|
500
|
+
CSSVarsUtils.CSSVarsUtils.applyVarsTextInput(this.el, this._textInput);
|
|
501
|
+
this._resizeObserver = new ResizeObserver((entries) => {
|
|
502
|
+
window.requestAnimationFrame(() => {
|
|
503
|
+
if (!Array.isArray(entries) || !entries.length)
|
|
504
|
+
return;
|
|
505
|
+
});
|
|
506
|
+
});
|
|
507
|
+
this._intersectionObserver = new IntersectionObserver((entries) => {
|
|
508
|
+
entries.forEach(entry => {
|
|
509
|
+
if (!entry.isIntersecting && this._ezPopOverPlusElement) {
|
|
510
|
+
this._ezPopOverPlusElement.hide();
|
|
511
|
+
}
|
|
512
|
+
});
|
|
513
|
+
}, { threshold: 0.1 });
|
|
514
|
+
if (this._textInput) {
|
|
515
|
+
this._intersectionObserver.observe(this._textInput);
|
|
516
|
+
}
|
|
517
|
+
await this.handleInitialValue();
|
|
518
|
+
if (this.autoFocus) {
|
|
519
|
+
requestAnimationFrame(() => {
|
|
520
|
+
this.setFocus({ selectText: true });
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
disconnectedCallback() {
|
|
525
|
+
var _a, _b;
|
|
526
|
+
(_a = this._resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
527
|
+
(_b = this._intersectionObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
|
|
528
|
+
}
|
|
529
|
+
//---------------------------------------------
|
|
530
|
+
// Event handlers
|
|
531
|
+
//---------------------------------------------
|
|
532
|
+
handleClassicIconClick(event) {
|
|
533
|
+
const { icon } = event.detail;
|
|
534
|
+
if (icon === "left") {
|
|
535
|
+
this.loadOptions(types.SearchMode.ADVANCED);
|
|
536
|
+
return;
|
|
537
|
+
}
|
|
538
|
+
this.clearSearch();
|
|
539
|
+
}
|
|
540
|
+
buildNumberArgument(argument) {
|
|
541
|
+
if (this.isTextSearch) {
|
|
542
|
+
return NaN;
|
|
543
|
+
}
|
|
544
|
+
return Number(argument || undefined);
|
|
545
|
+
}
|
|
546
|
+
onTextInputChangeHandler(event) {
|
|
547
|
+
var _a;
|
|
548
|
+
this.clearDeboucingTimeout();
|
|
549
|
+
if (this._startLoading) {
|
|
550
|
+
this._changeDeboucingTimeout = window.setTimeout(() => {
|
|
551
|
+
this.onTextInputChangeHandler(event);
|
|
552
|
+
}, this._deboucingTime);
|
|
553
|
+
return;
|
|
554
|
+
}
|
|
555
|
+
const argument = (_a = event.target.value) === null || _a === void 0 ? void 0 : _a.trim();
|
|
556
|
+
const argumentNumber = this.buildNumberArgument(argument);
|
|
557
|
+
if (!this._criteria) {
|
|
558
|
+
this._textInput.value = event.data || argument;
|
|
559
|
+
}
|
|
560
|
+
this._criteria = argument;
|
|
561
|
+
if (argument) {
|
|
562
|
+
this._showLoading = false;
|
|
563
|
+
this.clearSource();
|
|
564
|
+
if (this.ignoreLimitCharsToSearch || !isNaN(argumentNumber) || argument.length >= this._limitCharsToSearch) {
|
|
565
|
+
this._showLoading = true;
|
|
566
|
+
this._changeDeboucingTimeout = window.setTimeout(() => {
|
|
567
|
+
this.loadOptions(types.SearchMode.PREDICTIVE, isNaN(argumentNumber) ? argument : argumentNumber.toString());
|
|
568
|
+
}, this._deboucingTime);
|
|
569
|
+
this.showOptions();
|
|
570
|
+
}
|
|
571
|
+
else {
|
|
572
|
+
this.hideOptions();
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
else {
|
|
576
|
+
this.hideOptions();
|
|
577
|
+
this._showLoading = false;
|
|
578
|
+
this.clearSource();
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
clearDeboucingTimeout() {
|
|
582
|
+
if (this._changeDeboucingTimeout) {
|
|
583
|
+
window.clearTimeout(this._changeDeboucingTimeout);
|
|
584
|
+
this._changeDeboucingTimeout = null;
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
async keyDownHandler(event) {
|
|
588
|
+
this._tabPressed = false;
|
|
589
|
+
if (event.ctrlKey) {
|
|
590
|
+
if (event.key === "f" || event.key === "F") {
|
|
591
|
+
this.loadOptions(types.SearchMode.ADVANCED);
|
|
592
|
+
//ATENÇÃO: Ctrl + F tem ação específica nos browsers
|
|
593
|
+
//nesse caso, como vamos abrir o popup de busca avançada,
|
|
594
|
+
//não é interessante deixar o evento propagar;
|
|
595
|
+
event.stopPropagation();
|
|
596
|
+
event.stopImmediatePropagation();
|
|
597
|
+
event.preventDefault();
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
switch (event.key) {
|
|
601
|
+
case "ArrowDown":
|
|
602
|
+
event.stopPropagation();
|
|
603
|
+
if (this.canShowListOptions()) {
|
|
604
|
+
event.preventDefault();
|
|
605
|
+
}
|
|
606
|
+
if (!this.isOptionsVisible()) {
|
|
607
|
+
this.showOptions();
|
|
608
|
+
}
|
|
609
|
+
await this._classicSearchList.nextOption();
|
|
610
|
+
break;
|
|
611
|
+
case "ArrowUp":
|
|
612
|
+
event.stopPropagation();
|
|
613
|
+
if (this.canShowListOptions()) {
|
|
614
|
+
event.preventDefault();
|
|
615
|
+
}
|
|
616
|
+
await this._classicSearchList.previousOption();
|
|
617
|
+
break;
|
|
618
|
+
case "Enter":
|
|
619
|
+
this.handleEventPropagation(event);
|
|
620
|
+
this.selectCurrentOption();
|
|
621
|
+
break;
|
|
622
|
+
case "Escape":
|
|
623
|
+
this.cancelPreselection();
|
|
624
|
+
break;
|
|
625
|
+
case "Tab":
|
|
626
|
+
this._tabPressed = true;
|
|
627
|
+
this.selectCurrentOption(false);
|
|
628
|
+
break;
|
|
629
|
+
}
|
|
630
|
+
//ATENÇÃO: Existe a necessidade de propagar o evento de teclado.
|
|
631
|
+
//Por exemplo, quando o usuário dá um Enter, além de selecionar
|
|
632
|
+
//um valor, também significa que a ateração finalizou,
|
|
633
|
+
//e o contexto pode reagir (fechar um popup por exemplo).
|
|
634
|
+
//event.stopPropagation();
|
|
635
|
+
}
|
|
636
|
+
//O evento deve ter sua propagação interrompida, apenas se a lista de opções estiver sendo exibida.
|
|
637
|
+
handleEventPropagation(event) {
|
|
638
|
+
if (this._ezPopOverPlusElement.opened && this.stopPropagateEnterKeyEvent) {
|
|
639
|
+
event.stopPropagation();
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
onTextInputFocusOutHandler() {
|
|
643
|
+
if (this.hideErrorOnFocusOut)
|
|
644
|
+
this.cancelPreselection();
|
|
645
|
+
}
|
|
646
|
+
canShowListOptions() {
|
|
647
|
+
return !this._showLoading && this._visibleOptions.length > 0;
|
|
648
|
+
}
|
|
649
|
+
onChangePreSelection(value) {
|
|
650
|
+
this._preSelection = value;
|
|
651
|
+
}
|
|
652
|
+
async handleClickShowMore() {
|
|
653
|
+
var _a, _b;
|
|
654
|
+
if (!this.optionLoader)
|
|
655
|
+
return;
|
|
656
|
+
const argument = (_b = (_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : "";
|
|
657
|
+
const searchArgument = { mode: types.SearchMode.ADVANCED, argument };
|
|
658
|
+
const selectedOption = await this.optionLoader(searchArgument, this.contextProperties);
|
|
659
|
+
if (selectedOption && !Array.isArray(selectedOption)) {
|
|
660
|
+
this.selectOption(selectedOption);
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
renderShowMore() {
|
|
664
|
+
if (!this.showMore || this._showLoading)
|
|
665
|
+
return;
|
|
666
|
+
return (index.h("div", { style: { display: "flex", justifyContent: "center" }, "data-element-id": core.ElementIDUtils.getInternalIDInfo("showMore") }, index.h("ez-button", { onClick: async () => await this.handleClickShowMore(), variant: "tertiary", style: { width: "100%", justifyContent: "center" }, label: this.i18n("ez-classic-search.showMore") })));
|
|
667
|
+
}
|
|
668
|
+
render() {
|
|
669
|
+
var _a;
|
|
670
|
+
core.ElementIDUtils.addIDInfoIfNotExists(this.el, 'input');
|
|
671
|
+
const canClearSearch = !!(((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) && (this._criteria || this.value)) || this.ensureClearButtonVisible;
|
|
672
|
+
return (index.h(index.Host, null, index.h("ez-classic-input", { "data-element-id": core.ElementIDUtils.getInternalIDInfo("textInput"), class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this._textInput = elem, "data-slave-mode": "true", enabled: this.enabled && !this.suppressSearch, onInput: event => this.onTextInputChangeHandler(event), onFocusout: () => this.onTextInputFocusOutHandler(), onKeyDown: event => this.keyDownHandler(event), label: this.label, helpText: this.canShowError ? this.errorMessage : undefined, state: this.errorMessage && this.canShowError ? "error" : "default", size: this.size, placeholder: this.alternativePlaceholder, leftIconName: "search", leftIconClickable: true, rightIconName: canClearSearch ? "close" : null, rightIconClickable: true, required: this.required, onIconClick: (event) => this.handleClassicIconClick(event), onEzChange: (event) => event.stopPropagation() }), index.h("ez-popover-plus", { ref: elem => this._ezPopOverPlusElement = elem, autoClose: false, overlayType: "none", useAnchorSize: true, anchorElement: [this._textInput, this.el], "data-element-id": this.el.getAttribute("data-element-id"), onEzVisibilityChange: (event) => event.stopPropagation() }, index.h("div", null, index.h("classic-search-list", { ref: (ref) => this._classicSearchList = ref, showLoading: this._showLoading, visibleOptions: this._visibleOptions, textEmptyList: this.i18n("ez-classic-search.emptyList"), canShowListOptions: this.canShowListOptions(), value: this.value, showOptionValue: this.showOptionValue, preSelection: this._preSelection, onChangeValue: ({ detail }) => this.selectOption(detail), onChangePreSelection: ({ detail }) => this.onChangePreSelection(detail) }), this.renderShowMore()))));
|
|
673
|
+
}
|
|
674
|
+
get el() { return index.getElement(this); }
|
|
675
|
+
static get watchers() { return {
|
|
676
|
+
"errorMessage": ["observeErrorMessage"],
|
|
677
|
+
"value": ["observeValue"],
|
|
678
|
+
"options": ["observeOptions"]
|
|
679
|
+
}; }
|
|
680
|
+
};
|
|
681
|
+
EzClassicSearch.style = ezClassicSearchCss;
|
|
682
|
+
|
|
683
|
+
exports.ez_classic_search = EzClassicSearch;
|