@sankhyalabs/ezui 7.1.0-dev.21 → 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-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} +214 -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 +122 -36
- package/dist/cjs/ez-form.cjs.entry.js +12 -8
- package/dist/cjs/ez-grid-view.cjs.entry.js +1 -1
- package/dist/cjs/ez-grid.cjs.entry.js +8 -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-e61642ff.js → index-350d0fa0.js} +30 -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-51e50b59.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 +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-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/custom-elements/index.d.ts +48 -0
- package/dist/custom-elements/index.js +2705 -324
- 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} +213 -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 +122 -36
- package/dist/esm/ez-form.entry.js +12 -8
- package/dist/esm/ez-grid-view.entry.js +1 -1
- package/dist/esm/ez-grid.entry.js +6 -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-a3b24b5d.js → index-225aa0c3.js} +30 -0
- package/dist/esm/{index-baa5e267.js → index-5a720e56.js} +45 -19
- package/dist/esm/loader.js +5 -5
- package/dist/esm/{search-column-0c42248b.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-6c484770.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-9568a93d.entry.js → p-0ba284cd.entry.js} +1 -1
- package/dist/ezui/p-0d393a5d.entry.js +1 -0
- package/dist/ezui/{p-714452c7.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-47d9256e.entry.js → p-181cb82f.entry.js} +1 -1
- package/dist/ezui/{p-a13e65a4.entry.js → p-24993171.entry.js} +1 -1
- package/dist/ezui/{p-3d71e8e1.entry.js → p-25748a4e.entry.js} +1 -1
- package/dist/ezui/p-27421015.entry.js +1 -0
- package/dist/ezui/p-27c8a9b7.entry.js +1 -0
- package/dist/ezui/{p-474076b3.js → p-29341f74.js} +1 -1
- package/dist/ezui/p-29f0de90.entry.js +1 -0
- package/dist/ezui/{p-e4a579f2.entry.js → p-2b51d5a9.entry.js} +1 -1
- package/dist/ezui/p-2c123fdf.entry.js +1 -0
- package/dist/ezui/{p-5e6de2c1.entry.js → p-2fa490f1.entry.js} +1 -1
- package/dist/ezui/{p-582c3f90.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-4ea5c8a7.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-28af6826.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-7624767b.entry.js → p-534209bf.entry.js} +1 -1
- package/dist/ezui/{p-0e325699.entry.js → p-55a9e4ba.entry.js} +1 -1
- package/dist/ezui/p-5895e687.js +1 -0
- package/dist/ezui/{p-e2e0dd76.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-f45ddc1f.entry.js → p-75443a91.entry.js} +1 -1
- package/dist/ezui/{p-a1a63294.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-0ec5c128.js → p-9825c1d2.js} +1 -1
- package/dist/ezui/{p-a3075f52.entry.js → p-9bcfa689.entry.js} +1 -1
- package/dist/ezui/{p-0aafbc30.entry.js → p-9d515e5b.entry.js} +1 -1
- package/dist/ezui/{p-2b23906a.entry.js → p-9fb7131e.entry.js} +1 -1
- package/dist/ezui/{p-3fcf79c7.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-2676e2a3.entry.js → p-be2e39c5.entry.js} +1 -1
- package/dist/ezui/{p-98218fbc.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-2fd16ff2.entry.js → p-e0380234.entry.js} +1 -1
- package/dist/ezui/{p-67f9fadb.entry.js → p-e039e049.entry.js} +1 -1
- package/dist/ezui/{p-dc192d01.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-1c3f43e8.entry.js → p-e275353b.entry.js} +1 -1
- package/dist/ezui/{p-23a36bb6.js → p-e4c7eb39.js} +2 -2
- package/dist/ezui/{p-6570ca10.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-9771ea3c.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-1bf40959.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-782fe2e3.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 +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-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-bc2f844e.entry.js +0 -1
- package/dist/ezui/p-c711900a.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-e82a12c6.entry.js +0 -1
- package/dist/ezui/p-f1bbf23f.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as e,H as i,g as n}from"./p-
|
|
1
|
+
import{r as t,h as e,H as i,g as n}from"./p-e4c7eb39.js";import{FloatingManager as a,ElementIDUtils as o}from"@sankhyalabs/core";import{i as l}from"./p-c178730b.js";const r=class{constructor(e){t(this,e),this._container=void 0,this.alerts=[],this.enableDragAndDrop=void 0,this.enableExpand=!0,this.itemRightSlotBuilder=void 0,this.opened=!0,this.expanded=!1}observeOpened(){this.opened&&this.manageOverlay()}alertId(t,e){return`alert-${e}-${(t=>{var e;return null!==(e=null==t?void 0:t.split(" ").join("-"))&&void 0!==e?e:""})(t)}`}getAlertTitle(t){var e;return null===(e=this.alerts.find(((e,i)=>this.alertId(e.title,i)===t)))||void 0===e?void 0:e.title}getLinkActionClick(t){var e;return(null===(e=this.alerts.find(((e,i)=>this.alertId(e.title,i)===t.id)))||void 0===e?void 0:e.onClickLink)||(()=>{})}getTitleText(t){var e;const i=null!==(e=this.getAlertTitle(t.id))&&void 0!==e?e:"";return`${i}${i&&t.label?":":""}`}toggleExpandContainer(){this.enableExpand&&(this.expanded=!this.expanded,this._container.classList.toggle("expanded",this.expanded),this.expanded?this.updatePosition(this.getBoundingRight(),this.getBoundingBottom()):this.updatePosition("10px","10px"))}manageOverlay(){if(this.opened&&this._container)this._overlayId=a.float(this._container,this._overlayRef,this.getFloatOptions());else{if(void 0===this._overlayId)return;a.close(this._overlayId),this._overlayId=void 0}}updatePosition(t,e){this.opened&&a.updateFloatPosition(this._container,this._overlayRef,Object.assign(Object.assign({},this.getFloatOptions()),{right:t,bottom:e}))}getFloatOptions(){return{autoClose:!1,isFixed:!0,bottom:"10px",right:"10px"}}getBoundingRight(){return(document.body.clientWidth-this._container.getBoundingClientRect().width)/2+"px"}getBoundingBottom(){return(document.body.clientHeight-this._container.getBoundingClientRect().height)/2+"px"}componentDidLoad(){this.manageOverlay(),this.opened&&this._container&&this._container.focus()}async componentWillLoad(){this.dataElementId=o.addIDInfo(this._element,"EzAlertList"),this.i18n=await l()}render(){return e(i,Object.assign({},{[o.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:this.dataElementId}),this.opened?e("div",{ref:t=>this._overlayRef=t},e("div",{class:"alert-list__container "+(this.expanded?"expanded":""),ref:t=>this._container=t},e("div",{class:"alert-list__content"},e("div",{class:"alert-list__header"},e("div",{class:"alert-list__title"},`${this.i18n("app.alerts")} (${this.alerts.length})`),e("div",{class:"alert-list__header__buttons"},this.enableExpand&&e("ez-button",{mode:"icon",size:"small",iconName:"expand",onClick:()=>this.toggleExpandContainer(),"data-element-id":o.getInternalIDInfo("expandButton"),title:this.i18n(this.expanded?"app.collapse":"app.expand")}),e("ez-button",{mode:"icon",size:"small",iconName:"close","data-element-id":o.getInternalIDInfo("closeButton"),onClick:()=>{this.opened=!1},title:this.i18n("app.close")}))),e("div",{class:"alert-list__expandable-content"},e("ez-list",{itemSlotBuilder:this.itemRightSlotBuilder,hoverFeedback:!0,itemLeftSlotBuilder:t=>e("a",{onClick:this.getLinkActionClick(t),style:{fontFamily:"var(--font-pattern, 'Roboto')",fontSize:"var(--text--medium, 14px)",fontWeight:"var(--text-weight--medium, 400)",color:"var(--color--primary, #008561)",marginRight:"4px",cursor:"pointer",display:"flex",width:"max-content",textDecoration:"none"}},this.getTitleText(t)),dataSource:this.alerts.map(((t,e)=>{var i;return{id:this.alertId(t.title,e),label:null!==(i=t.detail)&&void 0!==i?i:""}}))}))))):null)}get _element(){return n(this)}static get watchers(){return{_container:["observeOpened"]}}};r.style=':host {\n display: flex;\n\n /* Alert List */\n \n /*@doc Define a largura da lista minimizado */\n --ez-alert-list__container--width: 680px;\n /*@doc Define a altura da lista minimizado */\n --ez-alert-list__container--height: 220px;\n \n /*@doc Define a largura da lista maximizada */\n --ez-alert-list__container--width--expanded: 920px;\n /*@doc Define a altura da lista maximizada */\n --ez-alert-list__container--height--expanded: 540px;\n\n /* Title */\n /*@doc Define a fonte do título do componente */\n --ez-alert-list__title--font-family: var(--font-pattern, "Roboto");\n /*@doc Define o tamanho da fonte do título do popup.*/\n --ez-alert-list__title--font-size: var(--title--large, 20px);\n /*@doc Define a cor da fonte do título do popup.*/\n --ez-alert-list__title--color: var(--title--primary, #2b3a54);\n /*@doc Define o peso da fonte do título do popup.*/\n --ez-alert-list__title--font-weight: var(--text-weight--extra-large, 700);\n\n /* @doc Define a borda inferior do item da lista. */\n --ez-list__item--border-bottom: var(--border--small, 1px solid);\n\n /* @doc Define a cor da borda inferior do item da lista. */\n --ez-list__item--border-bottom-color: var(--color--strokes, #DCE0E8);\n\n /* @doc Define o tipo da quebra de linha do item da lista. */\n --ez-list__item--white-space: break-space;\n}\n\n.alert-list__content {\n display: flex;\n flex-direction: column;\n \n gap: var(--space--xs);\n margin: var(--space--large, 24px);\n width: 100%;\n}\n\n.alert-list__container {\n z-index: var(--ez-elevation--8, 8);\n display: flex;\n height: var(--ez-alert-list__container--height);\n width: var(--ez-alert-list__container--width);\n border-radius: var(--border--radius-medium);\n background-color: var(--background--xlight);\n box-shadow: var(--shadow--medium);\n\n &.expanded {\n height: var(--ez-alert-list__container--height--expanded);\n width: var(--ez-alert-list__container--width--expanded);\n }\n\n @media (max-height: 640px) {\n max-height: calc(100vh - var(--space--3xl));\n } \n}\n\n.alert-list__header {\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.alert-list__title {\n font-family: var(--ez-alert-list__title--font-family);\n font-size: var(--ez-alert-list__title--font-size);\n font-weight: var(--ez-alert-list__title--font-weight);\n color: var(--ez-alert-list__title--color);\n}\n\n.alert-list__header__buttons {\n display: flex;\n gap: var(--space--xs);\n}\n\n.alert-list__expandable-content {\n overflow-y: auto;\n scrollbar-width: thin;\n}\n\n';export{r as ez_alert_list}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as i,h as t,g as r}from"./p-
|
|
1
|
+
import{r as e,c as i,h as t,g as r}from"./p-e4c7eb39.js";import{StringUtils as o,ElementIDUtils as l}from"@sankhyalabs/core";import{i as s}from"./p-c178730b.js";const a=class{constructor(t){e(this,t),this.ezClick=i(this,"ezClick",7),this.ezRemove=i(this,"ezRemove",7),this.canRemove=!0,this.fileName=void 0,this.iconName=void 0,this.fileSize=void 0,this.progress=100}observeProgress(e){if(e<0||e>100)throw new Error(this.i18n("ez-file-item.invalidProgress"));this._element.style.setProperty("--ez-file-item--upload-progress",100-e+"%")}getFileSize(){return this.fileSize&&0!==this.fileSize?`(${o.formatBytes(this.fileSize)})`:""}getIconName(){let e;if(this.iconName)return this.iconName;if(this.fileName.indexOf(".")>-1){const i=this.fileName.lastIndexOf(".");e=this.fileName.substring(i)}return n[e]||f}async componentWillLoad(){this.i18n=await s()}render(){return this._element.title=`${this.fileName} ${this.getFileSize()}`,l.addIDInfoIfNotExists(this._element,"ezFileIcon"),t("div",{class:"box",onClick:()=>this.ezClick.emit(this.fileName)},t("div",{class:"content"},t("ez-icon",{"data-element-id":l.getInternalIDInfo("fileIcon"),class:"file-type-icon",size:"medium","icon-name":this.getIconName()}),t("label",{class:"file-name"},this.fileName),t("label",{class:"file-size"},this.getFileSize())),this.canRemove?t("ez-icon",{"data-element-id":l.getInternalIDInfo("remove"),class:"btn-remove",size:"medium","icon-name":"close",title:this.i18n("app.remove"),onClick:e=>{this.ezRemove.emit(this.fileName),e.stopPropagation()}}):void 0)}get _element(){return r(this)}static get watchers(){return{progress:["observeProgress"]}}},n={".exe":"exe",".gif":"gif",".mp3":"mp3",".mp4":"mp4",".pdf":"pdf",".png":"png",".txt":"txt",".zip":"zip",".docx":"docx",".xlsx":"xlsx",".pptx":"pptx"},f="generic";a.style=':host{display:flex;width:100%;--ez-file-item--height:42px;--ez-file-item--padding:9px;--ez-file-item--border-radius:var(--border--radius-medium, 12px);--ez-file-item--border-color:var(--color--strokes, #DCE0E8);--ez-file-item--border-style:var(--border--small, 1px solid);--ez-file-item--font-family:var(--font-pattern, Arial);--ez-file-item--font-size:var(--text--medium, 14px);--ez-file-item--font-weight:var(--text-weight--medium, 400);--ez-file-item--color:var(--title--primary, #2B3A54);--ez-file-item__file-size--font-weight:var(--text-weight--large, 600);--ez-file-item__file-size--color:var(--color--primary, #008561);--ez-file-item__background-progress--color:var(--color--primary-300, E2F4EF);--ez-file-item--icon-color:var(--title--primary, #2B3A54)}.box{display:flex;box-sizing:border-box;position:relative;align-items:center;justify-content:space-between;width:100%;padding:var(--ez-file-item--padding);border:var(--ez-file-item--border-color) var(--ez-file-item--border-style);border-radius:var(--ez-file-item--border-radius);height:var(--ez-file-item--height)}.box::before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;clip-path:inset(2px calc(var(--ez-file-item--upload-progress, 0%) + 2px) 2px 2px round calc(var(--ez-file-item--border-radius) - 4px));background-color:var(--ez-file-item__background-progress--color)}.content{display:flex;align-items:center;z-index:0;overflow:hidden}.file-name{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-family:var(--ez-file-item--font-family);font-size:var(--ez-file-item--font-size);font-weight:var(--ez-file-item--font-weight);color:var(--ez-file-item--color)}.file-type-icon{flex-shrink:0;--ez-icon--color:var(--ez-file-item--icon-color);padding-right:var(--ez-file-item--padding)}.file-size{padding-left:2px;overflow:hidden;flex-shrink:0;white-space:nowrap;font-family:var(--ez-file-item--font-family);font-size:var(--ez-file-item--font-size);font-weight:var(--ez-file-item__file-size--font-weight);color:var(--ez-file-item__file-size--color)}.btn-remove{cursor:pointer;flex-shrink:0;--ez-icon--color:var(--ez-file-item--icon-color)}';export{a as ez_file_item}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var D,R,n;!function(D){D.GRID="GRID",D.FORM="FORM"}(D||(D={})),function(D){D.GRID="GRID",D.FORM="FORM"}(R||(R={})),function(D){D.ADVANCED="ADVANCED",D.PREDICTIVE="PREDICTIVE",D.LOAD_DESCRIPTION="LOAD_DESCRIPTION",D.PRELOAD="PRELOAD"}(n||(n={}));export{D as C,n as S,R as a}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,h as r}from"./p-
|
|
1
|
+
import{r as a,h as r}from"./p-e4c7eb39.js";import{i as t}from"./p-c178730b.js";import"@sankhyalabs/core";const e=class{constructor(r){a(this,r),this.DECIMAL_PARSE_BASE=10,this.FONT_SIZE_BASE_CALC=.375,this.DEFAULT_ICON_NAME="account-outline",this.name=void 0,this.imageSrc=void 0,this.iconName=void 0,this.size="100",this.shape="circle",this.isInteractive=!1}getInitial(){var a;return(null===(a=this.name)||void 0===a?void 0:a.trim())?this.name.charAt(0).toUpperCase():""}calcFontSize(){const a=parseInt(this.size,this.DECIMAL_PARSE_BASE);return this.FONT_SIZE_BASE_CALC*a}getClass(){return`avatar avatar--${this.size} avatar--${this.shape} ${this.imageSrc?"avatar--has-image":""}`}renderAvatarContent(){var a;return this.imageSrc?r("img",{src:this.imageSrc,alt:this.name||"Avatar",class:"avatar-image"}):this.name?r("span",{class:"avatar-initial","aria-hidden":"true"},this.getInitial()):r("ez-icon",{class:"avatar-icon",iconName:null!==(a=this.iconName)&&void 0!==a?a:this.DEFAULT_ICON_NAME,fontSize:this.calcFontSize()})}async componentWillLoad(){this.i18n=await t()}render(){return this.isInteractive?r("button",{"aria-label":this.i18n("app.profile"),class:this.getClass()},this.renderAvatarContent()):r("figure",{class:this.getClass()},this.renderAvatarContent())}};e.style=":host{--ez-avatar--background-color:var(--color--ocean-green-600, #008561);--ez-avatar--color:var(--color--gray-70, #fff);--ez-avatar--border-radius-circle:50%;--ez-avatar--border-radius-square:25%;--ez-avatar--background-color-hover:var(--color--ocean-green-700, #00684C)}button,figure{display:flex;align-items:center;justify-content:center;border:var(--ez-avatar--border);background-color:var(--ez-avatar--background-color);color:var(--ez-avatar--color);font-weight:var(--font-weight--medium, 500);font-family:var(--font-pattern, 'Roboto');transition:background-color 0.2s linear, color 0.2s linear;margin:0;padding:0}button:hover{cursor:pointer;background-color:var(--ez-avatar--background-color-hover)}.avatar--320{--avatar-size:320px;width:20rem;height:20rem}.avatar--300{--avatar-size:300px;width:18.75rem;height:18.75rem}.avatar--280{--avatar-size:280px;width:17.5rem;height:17.5rem}.avatar--260{--avatar-size:260px;width:16.25rem;height:16.25rem}.avatar--240{--avatar-size:240px;width:15rem;height:15rem}.avatar--220{--avatar-size:220px;width:13.75rem;height:13.75rem}.avatar--200{--avatar-size:200px;width:12.5rem;height:12.5rem}.avatar--180{--avatar-size:180px;width:11.25rem;height:11.25rem}.avatar--160{--avatar-size:160px;width:10rem;height:10rem}.avatar--140{--avatar-size:140px;width:8.75rem;height:8.75rem}.avatar--120{--avatar-size:120px;width:7.5rem;height:7.5rem}.avatar--100{--avatar-size:100px;width:6.25rem;height:6.25rem}.avatar--80{--avatar-size:80px;width:5rem;height:5rem}.avatar--60{--avatar-size:60px;width:3.75rem;height:3.75rem}.avatar-initial{font-size:calc(0.375 * var(--avatar-size));}.avatar--circle{border-radius:var(--ez-avatar--border-radius-circle)}.avatar--square{border-radius:var(--ez-avatar--border-radius-square)}.avatar-image{width:100%;height:100%;object-fit:cover;border-radius:inherit}.avatar--has-image{background-color:transparent}ez-icon{--ez-icon--color:var(--color--gray-70, #fff);font-weight:var(--font-weight--medium, 500)}";export{e as ez_avatar}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,h as a,H as e,g as t}from"./p-
|
|
1
|
+
import{r,h as a,H as e,g as t}from"./p-e4c7eb39.js";import{ElementIDUtils as o}from"@sankhyalabs/core";const c={warn:"warning_triangle",critical:"close",success:"check"},n=class{constructor(a){r(this,a),this.alertType="success"}componentWillRender(){this.dataElementId=o.addIDInfo(this._element)}render(){return a(e,null,a("div",{class:`alert-container ${this.alertType}`},a("div",null,a("ez-icon",Object.assign({},{[o.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:this.dataElementId},{class:`alert-container__icon-${this.alertType}`,size:"large",iconName:c[this.alertType]}))),a("div",Object.assign({},{[o.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:`${this.dataElementId}_text`}),a("slot",null))))}get _element(){return t(this)}};n.style=':host{--ez-alert-alert-container--padding-up-down:var(--space--small, 6px);--ez-alert-alert-container--padding-right-left:var(--space--medium, 12px);--ez-alert-alert-container--gap:var(--space--medium, 12px);--ez-alert-alert-container--border-radius:var(--border--radius-medium, 12px);--ez-alert-alert-container--font-color-warn:var(--color--alert-warning-900, #8C6B00);--ez-alert-alert-container--icon-warn:var(--color--alert-warning-900, #8C6B00);--ez-alert-alert-container--background-color-warn:var(--color--alert-warning-200, #FFF7D5);--ez-alert-alert-container--font-color-critical:var(--color--alert-error, #BD0025);--ez-alert-alert-container--icon-critical:var(--color--alert-error, #BD0025);--ez-alert-alert-container--background-color-critical:var(--color--alert-error-200, #F7E0E5);--ez-alert-alert-container--font-color-success:var(--color--alert-success, #157A00);--ez-alert-alert-container--icon-success:var(--color--alert-success, #157A00);--ez-alert-alert-container--background-color-success:var(--color--alert-success-200, #E7F6E0);font-size:var(--text--small, 12px);font-family:var(--font-pattern, "Roboto");width:100%;hyphens:auto;display:block}.alert-container{display:flex;align-items:center;gap:var(--ez-alert-alert-container--gap);padding:var(--ez-alert-alert-container--padding-up-down) var(--ez-alert-alert-container--padding-right-left);border-radius:var(--ez-alert-alert-container--border-radius)}.warn{background-color:var(--ez-alert-alert-container--background-color-warn);color:var(--ez-alert-alert-container--font-color-warn)}.critical{background-color:var(--ez-alert-alert-container--background-color-critical);color:var(--ez-alert-alert-container--font-color-critical)}.success{background-color:var(--ez-alert-alert-container--background-color-success);color:var(--ez-alert-alert-container--font-color-success)}ez-icon{--ez-icon--color:inherit}.alert-container__icon-warn{--ez-icon--color:var(--ez-alert-alert-container--icon-warn)}.alert-container__icon-critical{--ez-icon--color:var(--ez-alert-alert-container--icon-critical)}.alert-container__icon-success{--ez-icon--color:var(--ez-alert-alert-container--icon-success)}';export{n as ez_alert}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,c as t,h as i}from"./p-e4c7eb39.js";const s=class{constructor(i){o(this,i),this.applicationLoaded=t(this,"applicationLoaded",7)}componentWillLoad(){}componentDidLoad(){this.applicationLoaded.emit(!0)}render(){return i("div",null)}};s.style="";export{s as ez_application}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as i,H as o}from"./p-
|
|
1
|
+
import{r as t,h as i,H as o}from"./p-e4c7eb39.js";const r=class{constructor(i){t(this,i),this._showLoading=!0}async hide(){this._showLoading=!1}async show(){this._showLoading=!0}render(){return i(o,null,this._showLoading&&i("div",{class:"loading-bar"},i("div",{class:"loading-bar__container"})))}};r.style=":host{position:fixed;top:0px;width:100%}.loading-bar{width:100%;margin:0 auto;position:absolute;background-color:var(--color--primary-300, #e2f4ef);height:5px}.loading-bar:before{content:'';position:absolute}.loading-bar__container{position:absolute;top:0;right:100%;bottom:0;left:0;background-color:var(--color--primary, #008561);width:0;animation:loading 2s linear infinite}@keyframes loading{0%{left:0%;right:100%;width:0%}25%{left:0%;right:75%;width:25%}50%{left:0%;right:50%;width:90%}70%{right:0%;left:75%;width:25%}100%{left:100%;right:0%;width:0%}}@-webkit-keyframes loading{0%{left:0%;right:100%;width:0%}25%{left:0%;right:75%;width:25%}50%{left:0%;right:50%;width:90%}70%{right:0%;left:75%;width:25%}100%{left:100%;right:0%;width:0%}}";export{r as ez_loading_bar}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as e,f as n,H as s,g as r}from"./p-e4c7eb39.js";import{DateUtils as o,ApplicationContext as l,Action as a,StringUtils as u,KeyboardManager as h,DataUnit as c,ElementIDUtils as d}from"@sankhyalabs/core";import{b as f,a as v,S as m,f as p,c as b,D as y}from"./p-29341f74.js";import{g as w,i as g}from"./p-c178730b.js";import{F as _}from"./p-47e4a8ce.js";import"./p-9825c1d2.js";import"./p-ab574d59.js";import"./p-b853763b.js";import"./p-5895e687.js";const O=/child\[([^\]]+)\]/,C=/\$\{.+\}/;class j{constructor(){this._sheets=new Map,this._requiredFields=[],this._cleanOnCopyFields=[],this._defaultValues={}}static getDetailName(t){const i=O.exec(t);return i?i[1]:void 0}getSheet(t){return this._sheets.get(t)}getAllSheets(){return this._sheets}addSheet(t){this._sheets.set(t.name,t)}addRequiredFields(t){this._requiredFields=this._requiredFields.concat(t)}getRequiredFields(){return this._requiredFields}addCleanOnCopyFields(t){this._cleanOnCopyFields=this._cleanOnCopyFields.concat(t)}getCleanOnCopyFields(){return this._cleanOnCopyFields}addDefaultValues(t){return this._defaultValues=Object.assign(Object.assign({},this._defaultValues),t)}getDefaultValues(){const t={};return Object.entries(this._defaultValues).forEach((([i,e])=>{if("string"==typeof e){const t=C.exec(e);t&&(e=this.getDefaultVar(t[0]))}t[i]=e})),t}getDefaultVar(t){return"${data}"===t?o.getToday():"${datahora}"===t?o.getToday(!0):this._defaultVars?this._defaultVars.get(t):void 0}setDefaultVars(t){this._defaultVars=t}}const E=(t,i)=>{var e;if(i)return null===(e=i.tabs)||void 0===e?void 0:e.find((i=>i.label===t))},F=(t,i,e)=>{if("string"!=typeof t)return t;if(e){const i=E(t,e);if(i)return i}return Array.from(i.keys()).find((i=>i.label===t))||{label:t,visible:!0}};function z(t,i){var e,n;return"__main"===t[0].label&&"__main"!==i[0].label?-1:"__main"!==t[0].label&&"__main"===i[0].label?1:(null!==(e=t[0].order)&&void 0!==e?e:Number.MAX_VALUE)-(null!==(n=i[0].order)&&void 0!==n?n:Number.MAX_VALUE)}const x=t=>`child[${t.name}]`,A=t=>({name:x(t),label:t.label,fields:[]});function N(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var S="function"==typeof Symbol&&Symbol.observable||"@@observable",M=function(){return Math.random().toString(36).substring(7).split("").join(".")},D={INIT:"@@redux/INIT"+M(),REPLACE:"@@redux/REPLACE"+M(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+M()}};function R(t){if("object"!=typeof t||null===t)return!1;for(var i=t;null!==Object.getPrototypeOf(i);)i=Object.getPrototypeOf(i);return Object.getPrototypeOf(t)===i}function T(t,i,e){var n;if("function"==typeof i&&"function"==typeof e||"function"==typeof e&&"function"==typeof arguments[3])throw new Error(N(0));if("function"==typeof i&&void 0===e&&(e=i,i=void 0),void 0!==e){if("function"!=typeof e)throw new Error(N(1));return e(T)(t,i)}if("function"!=typeof t)throw new Error(N(2));var s=t,r=i,o=[],l=o,a=!1;function u(){l===o&&(l=o.slice())}function h(){if(a)throw new Error(N(3));return r}function c(t){if("function"!=typeof t)throw new Error(N(4));if(a)throw new Error(N(5));var i=!0;return u(),l.push(t),function(){if(i){if(a)throw new Error(N(6));i=!1,u();var e=l.indexOf(t);l.splice(e,1),o=null}}}function d(t){if(!R(t))throw new Error(N(7));if(void 0===t.type)throw new Error(N(8));if(a)throw new Error(N(9));try{a=!0,r=s(r,t)}finally{a=!1}for(var i=o=l,e=0;e<i.length;e++)(0,i[e])();return t}function f(t){if("function"!=typeof t)throw new Error(N(10));s=t,d({type:D.REPLACE})}function v(){var t,i=c;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(N(11));function e(){t.next&&t.next(h())}return e(),{unsubscribe:i(e)}}})[S]=function(){return this},t}return d({type:D.INIT}),(n={dispatch:d,subscribe:c,getState:h,replaceReducer:f})[S]=v,n}const P={};function I(t=P,i){switch(i.type){case K.METADATA_LOADED:return Object.assign(Object.assign({},t),{formMetadata:i.payload,currentSheet:void 0});case K.CHANGE_TAB:return Object.assign(Object.assign({},t),{currentSheet:i.payload});default:return t}}function L(t){return t.formMetadata}function V(t){const i=function(t){return t.currentSheet}(t);return i?t.formMetadata.getSheet(i):Array.from(t.formMetadata.getAllSheets().values())[0]}var K;!function(t){t.METADATA_LOADED="FORM/METADATA_LOADED",t.CHANGE_TAB="FORM/CHANGE_TAB"}(K||(K={}));const $=class{constructor(e){t(this,e),this.ezFormRequestClearFieldToFocus=i(this,"ezFormRequestClearFieldToFocus",7),this.ezFormSetFields=i(this,"ezFormSetFields",7),this.ezReady=i(this,"ezReady",7),this.formItemsReady=i(this,"formItemsReady",7),this._customEditors=new Map,this._application=l.getContextValue("__SNK__APPLICATION__"),this.onDataUnitAction=t=>{t.type===a.METADATA_LOADED&&this.processMetadata()},this._fieldsProps=new Map,this._singleColumn=!1,this._formLayout=void 0,this.dataUnit=void 0,this.config=void 0,this.recordsValidator=void 0,this.fieldToFocus=void 0,this.onlyStaticFields=!1,this.useSearchField=!0,this.elementFocusSearchField=void 0,this.customUiBuilders=new Map}validate(){return this._dataBinder.validate()}async addCustomEditor(t,i,e){if(this._formView)return void this._formView.addCustomEditor(t,i,e);const n=new Map(this._customEditors);n.set(t,{customEditor:i,detailContext:e}),this._customEditors=n}observeConfig(){this.processMetadata()}async setFieldProp(t,i,e){const n=new Map(this._fieldsProps),s=this._fieldsProps.get(t);n.set(t,Object.assign(Object.assign({},s),{[i]:e})),this._fieldsProps=n}getDynamicContent(){var t;const i=L(this._store.getState());if(!i)return null;const n=Array.from(i.getAllSheets().values()),s=V(null===(t=this._store)||void 0===t?void 0:t.getState());let r=[];if(n.length>1){const t=n.map(((t,i)=>({tabKey:t.name,label:t.label,index:i}))),i="selector";r.push(e("ez-tabselector",{tabs:this.buildIdTabSelector(t),onEzChange:t=>this._store.dispatch(function(t){return{type:K.CHANGE_TAB,payload:"string"==typeof t?t:t.tabKey}}(t.detail)),selectedTab:s.name,"data-element-id":i}))}return r=r.concat(this.buildFormContent(s)),r}buildFormContent(t){const i=null==t?void 0:t.fields;if(null==t)return;this.ezFormSetFields.emit(i);const n=`${u.replaceAccentuatedChars(u.toCamelCase(null==t?void 0:t.label),!1)}_selectorContainer`;return e("div",{class:"dynamic-content ez-box--no-outline","data-element-id":n,ref:t=>this._container=t,tabindex:"0"},e("ez-popover",{ref:t=>this._ezPopoverSearchField=t,overlayType:"none"},this.renderFieldColumn()),e("ez-form-view",{ref:t=>this._formView=t,class:"ez-row ez-padding-vertical--small",fields:i,singleColumn:this._singleColumn,formLayout:this._formLayout,selectedRecord:this.dataUnit.getSelectedRecord(),customUiBuilders:this.customUiBuilders}))}renderFieldColumn(){return null!=this._fieldSearch||(this._fieldSearch=v({value:u.generateUUID(),label:this._i18n("ez-form.labelSearchField")},(({argument:t})=>this.fieldsOptionLoader(t)),(t=>this.onSelectField(t)))),this._fieldSearch}getFormFields(){var t;return null===(t=this.config)||void 0===t?void 0:t.fields}fieldsOptionLoader(t){const i=null==t?void 0:t.toLowerCase(),e=this.getFormFields().map((t=>{var i;return null===(i=this.dataUnit)||void 0===i?void 0:i.getField(t.name)})).filter((t=>{var e,n;return(null===(e=t.name)||void 0===e?void 0:e.toLowerCase().includes(i))||(null===(n=t.label)||void 0===n?void 0:n.toLowerCase().includes(i))})).map((t=>({value:t.name,label:t.label})));return Promise.resolve(e)}onSelectField(t){null!=t&&null!=t.value?(this.fieldToFocus=t.value,this._ezPopoverSearchField.hide()):this.fieldToFocus=""}async initKeyboardManager(){var t,i;this._keyboardManager=new h({propagate:!1,element:null!==(t=this.elementFocusSearchField)&&void 0!==t?t:this._element}),this.useSearchField&&this._keyboardManager.bind(m,(async()=>{if(!this._container||!this._ezPopoverSearchField)return;const t=this._container.getBoundingClientRect();await p(this._fieldSearch),this._ezPopoverSearchField.showUnder(this._container,{horizontalGap:t.width-b,verticalGap:-1*t.height})}),{description:this._i18n("ez-form.labelSearchField"),element:null!==(i=this.elementFocusSearchField)&&void 0!==i?i:this._element})}componentDidLoad(){this.initKeyboardManager()}processMetadata(){if(this.bindFields()&&this.dataUnit&&this._store){const t=((t,i,e=!1,n)=>{var s;null!=t&&!0!==(null==t?void 0:t.emptyConfig)||(t=(t=>{const i=t.metadata;let e;return i&&(e=i.fields.filter((t=>!1!==t.visible)).map((t=>({name:t.name,defaultValue:t.defaultValue})))),{emptyConfig:!1,fields:e}})(i));const r=new Map,o=new Map,l=[],a=[],u={};(null!==(s=null==t?void 0:t.tabs)&&void 0!==s?s:[]).forEach((t=>{o.has(t.label)||!1!==t.visible||o.set(t.label,t)})),function(t,i,e,n,s,r,o){var l;null===(l=null==t?void 0:t.fields)||void 0===l||l.forEach((l=>{var a,u,h;if(!1!==l.visible){const c=F(l.tab||"__main",i,t);if(e.has(c.label))return;const d=n.getField(l.name);if(d&&(null==(null==d?void 0:d.visible)||!0===(null==d?void 0:d.visible))&&c.visible){i.has(c)||i.set(c,[]);const t=f(d,l);i.get(c).push(t),t.required&&s.push(l.name),((null==l.cleanOnCopy?null===(a=d.properties)||void 0===a?void 0:a.cleanOnCopy:l.cleanOnCopy)||(null===(u=d.properties)||void 0===u?void 0:u.cleanOnCopy))&&r.push(l.name);let e=null==l.defaultValue?null===(h=d.properties)||void 0===h?void 0:h.defaultValue:l.defaultValue;if(e&&null!=e.value){const{type:t,value:i}=e;if(t)if("V"===t)e=i;else try{const t=JSON.parse(i);e=t&&"value"in t?t:i}catch(t){}o[l.name]=e}}}}))}(t,r,o,i,l,a,u);const h=new j;return h.setDefaultVars(t.defaultVars),e&&function(t,i,e){const n=t.metadata;void 0!==n&&void 0!==n.children&&n.children.forEach((t=>{const n=E(t.label,i);if(n)return void e.set(Object.assign(n,{name:x(t),isDetail:!0}),[]);const{label:s,name:r,fields:o}=A(t);e.set({name:r,label:s,isDetail:!0},o)}))}(i,t,r),n&&function(t,i,e){t.forEach((t=>{const n=E(t.label,i),s={};Object.entries(t).forEach((([t,i])=>{(function(t){return["id","label"].includes(t)})(t)||(s[t]=i)})),e.set(n?Object.assign(n,{name:t.id,isCustom:!0,ctxProps:s}):{label:t.label,name:t.id,isCustom:!0,visible:!0,ctxProps:s},[])}))}(n,t,r),Array.from(r.entries()).sort(z).forEach((([t,i])=>{o.has(t.label)||h.addSheet(function(t,i){const e=w();return{label:"__main"===t.label?e("ez-form.mainTab"):t.label,name:t.name||t.label,isCustom:t.isCustom,isDetail:t.isDetail,ctxProps:t.ctxProps,fields:i}}(t,i))})),h.addRequiredFields(l),h.addCleanOnCopyFields(a),h.addDefaultValues(u),h})(this.config,this.dataUnit);this._store.dispatch({type:K.METADATA_LOADED,payload:t})}}isStatic(){var t;return(null===(t=this._staticFields)||void 0===t?void 0:t.length)>0}bindFields(){return!this.isStatic()||!1===this.onlyStaticFields}async componentWillLoad(){var t;void 0===this.dataUnit&&(this.dataUnit=new c("ez-form")),this.dataUnit.unsubscribe(this.onDataUnitAction),this.dataUnit.subscribe(this.onDataUnitAction),this._dataBinder=new y(this.dataUnit),this._store=T(I),this._store.subscribe((()=>n(this))),this._staticFields=Array.from(this._element.querySelectorAll("[data-field-name]")),this.processMetadata(),d.addIDInfo(this._element,null,{dataUnit:this.dataUnit});const i=await(null===(t=this._application)||void 0===t?void 0:t.getLayoutFormConfig());this.setSingleColumn(i),this.registerNotifyListeners(i),this._i18n=await g()}async setSingleColumn(t){this._singleColumn=(null==t?void 0:t.config)===_.CASCADE||(null==t?void 0:t.config)===_.CLASSIC_CASCADE,this._formLayout=null==t?void 0:t.config}async registerNotifyListeners(t){t&&t.onConfigChange((t=>{this._singleColumn=t===_.CASCADE||t===_.CLASSIC_CASCADE,this._formLayout=t}))}componentDidRender(){const t=L(this._store.getState());t.addRequiredFields(this._staticFields.filter((t=>t.dataset.required)).map((t=>t.dataset.fieldName))),this._dataBinder.bind(Array.from(this._element.querySelectorAll("[data-field-name]")),this.dataUnit.dataUnitId,t,this.recordsValidator),this.ezReady.emit(),this.handleFieldToFocus(),this.setCustomEditors(),this.setFieldsProps()}setCustomEditors(){if(this._formView)for(const[t,i]of this._customEditors)this._formView.addCustomEditor(t,i.customEditor,i.detailContext),this._customEditors.delete(t)}handleFieldToFocus(){var t;if(null==this.fieldToFocus)return;const i=V(null===(t=this._store)||void 0===t?void 0:t.getState());(null==i?void 0:i.fields).some((t=>t.name===this.fieldToFocus))&&requestAnimationFrame((()=>{this._dataBinder.setFocus(this.fieldToFocus),this.ezFormRequestClearFieldToFocus.emit(),this.fieldToFocus=null}))}setFieldsProps(){if(this._formView)for(const[t,i]of this._fieldsProps){for(const e in i)this._formView.setFieldProp(t,e,i[e]);this._fieldsProps.delete(t)}}disconnectedCallback(){var t;this.dataUnit.unsubscribe(this.onDataUnitAction),this._dataBinder.onDisconnectedCallback(),null===(t=this._keyboardManager)||void 0===t||t.unbindAllShortcutKeys()}buildIdTabSelector(t){return t&&t.forEach((t=>t[d.DATA_ELEMENT_ID_ATTRIBUTE_NAME]=u.toCamelCase(t.label))),t}render(){return e(s,null,this.isStatic()?null:this.getDynamicContent())}get _element(){return r(this)}static get watchers(){return{config:["observeConfig"]}}};$.style=".sc-ez-form-h{display:flex;flex-direction:column;width:100%}.dynamic-content.sc-ez-form ez-collapsible-box.sc-ez-form{--ez-collapsible-box__header--padding-right:var(--space-small, 6px);--ez-collapsible-box__header--padding-left:var(--space-small, 6px)}";export{$ as ez_form}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as s,H as o,g as e}from"./p-e4c7eb39.js";import{ObjectUtils as h,ElementIDUtils as r}from"@sankhyalabs/core";import"./p-9825c1d2.js";import{C as n}from"./p-ec7db713.js";import"./p-ab574d59.js";import"./p-b853763b.js";import{i as a}from"./p-c178730b.js";import"./p-5895e687.js";import"./p-47e4a8ce.js";const l=class{constructor(s){t(this,s),this.ezChange=i(this,"ezChange",7),this.ezVisibilityChange=i(this,"ezVisibilityChange",7),this._changeDeboucingTimeout=null,this._deboucingTime=300,this._maxWidthValue=0,this._tabPressed=!1,this._lookupMode=!1,this.isOpen=!1,this._preSelection=void 0,this._visibleOptions=void 0,this._startLoading=!1,this._showLoading=!0,this._criteria=void 0,this.limitCharsToSearch=3,this.value=void 0,this.label=void 0,this.enabled=!0,this.options=void 0,this.errorMessage=void 0,this.showSelectedValue=!1,this.showOptionValue=!1,this.suppressSearch=!1,this.optionLoader=void 0,this.suppressEmptyOption=!1,this.stopPropagateEnterKeyEvent=!0,this.canShowError=!0,this.mode="regular",this.hideErrorOnFocusOut=!0,this.listOptionsPosition=void 0,this.isTextSearch=!1,this.autoFocus=!1,this.preventAutoFocus=!1,this.alternativePlaceholder=void 0,this.textEmptyOption=void 0}observeErrorMessage(){var t;this._textInput&&(this._textInput.errorMessage=this.errorMessage,(null===(t=this.errorMessage)||void 0===t?void 0:t.trim())||this.setInputValue())}observeValue(t,i){if(this._textInput&&t!=i)try{if("string"==typeof t)return void this.setInputValue();const s=this.getSelectedOption(t),o=this.getSelectedOption(i),e=this.getSelectedOption(this.value);this.isDifferentValues(e,s)&&(this.value=s),this.isDifferentValues(s,o)&&(this.setInputValue(),this._lookupMode||this.ezChange.emit(null===s?void 0:s)),this.resetOptions()}finally{this._lookupMode=!1}}observeOptions(t,i){h.equals(t,i)||this.loadOptions(d.PRELOAD)}async getValueAsync(){return new Promise(this._showLoading?t=>{let i=setInterval((()=>{this._showLoading||(clearInterval(i),t(this.sanitizeValue(this.value)))}),100)}:t=>t(this.sanitizeValue(this.value)))}async setFocus(t){this._textInput&&this._textInput.setFocus(t)}async setBlur(){this._textInput&&this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async clearValue(){this.clearSearch()}isDifferentValues(t,i){return h.objectToString(t||{})!==h.objectToString(i||{})}getFormattedText(t){if(null!=t)return this.showSelectedValue&&null!=t.value?t.label?`${t.value} - ${t.label}`:t.value:t.label}getText(){const t=this.getSelectedOption(this.sanitizeValue(this.value)),i=this.getFormattedText(t);if(null!=i)return String(i).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')}getSelectedOption(t){return"string"==typeof t||t instanceof String?this._visibleOptions.find((i=>i.value===t)):t}updateVisibleOptions(){let t=this._source||[];if(this._criteria){const i=this._criteria.toUpperCase();t=t.filter((t=>t.label.toLocaleUpperCase().indexOf(i)>-1))}this.hasToAddEmptyoption(t)&&(t=[{value:void 0,label:this.textEmptyOption||this.i18n("ez-combo-box.placeholder")}].concat(t)),this._visibleOptions=t,this._maxWidthValue=this.getMaxWidthValue()}hasToAddEmptyoption(t){return!this.suppressEmptyOption&&!t.filter((t=>!t.value)).length}getMaxWidthValue(){var t;if(this.showOptionValue){const i=[];return null===(t=this._visibleOptions)||void 0===t||t.forEach((t=>{const s=this.getWidthValue(t.value);i.includes(s)||i.push(s)})),i.length>1?Math.max(...i):0}return 0}getWidthValue(t){if(null!=this._itemValueBasis){const i=this._itemValueBasis;if(null!=t)return i.innerHTML=t,i.clientWidth>0?i.clientWidth+2:0;i.innerHTML=""}return 0}async showOptions(){var t,i;if(!this.enabled)return;await this.openPopover();const s=null!==(i=null===(t=this.value)||void 0===t?void 0:t.value)&&void 0!==i?i:this.value,o=this._visibleOptions.findIndex((t=>t.value===s));this._preSelection=-1===o?0:o,this._resizeObserver&&this._resizeObserver.observe(this._textInput),this.preventAutoFocus||await this.setFocus()}hideOptions(){var t;null===(t=this._popover)||void 0===t||t.hide(),this._resizeObserver&&this._resizeObserver.unobserve(this._textInput)}updateSource(t){this._startLoading=!1,t instanceof Promise?(this._showLoading=!0,t.then((t=>{this._showLoading=!1,this.updateSource(t)})).catch((()=>this._showLoading=!1)),this.updateVisibleOptions()):(this._showLoading=!1,Array.isArray(t)?(this._source=t,this.updateVisibleOptions(),this._tabPressed&&(this._tabPressed=!1)):this.selectOption(t))}selectOption(t,i=!0){var s,o,e;const h=this.getSelectedOption(this.value);(null===(s=null==h?void 0:h.value)||void 0===s?void 0:s.toString())!==(null===(o=null==t?void 0:t.value)||void 0===o?void 0:o.toString())||null==h&&null!=t&&"value"in t?(this.value=(null==t?void 0:t.value)?t:void 0,null===(e=this._popover)||void 0===e||e.hide()):this.resetOptions(),i&&setTimeout((()=>{this.setFocus()}),0)}loadOptions(t,i=""){this._criteria=i,this._startLoading=!0,this.updateSource(this.optionLoader?this.optionLoader({mode:t,argument:i}):this.options)}cancelPreselection(){!this._textInput.value&&this.sanitizeValue(this.value)?this.selectOption(void 0):window.setTimeout((()=>{this.setInputValue(!1)}),this._deboucingTime)}setInputValue(t=!0){const i=this.getText();(this._textInput.value||"")!==i&&(this._textInput.value=i,t&&(this.errorMessage=null))}clearSearch(){this.value=null}resetOptions(){this.hideOptions(),this._criteria=void 0,this._preSelection=void 0,this.updateVisibleOptions()}sanitizeValue(t){if("undefined"!==t&&"null"!==t)return t}async componentWillLoad(){if(this.i18n=await a(),void 0===this.options){this.options=[];const t=this.el.querySelectorAll("option");t&&t.forEach((t=>{let i=t.innerText,s=t.getAttribute("value");s||(s=i),this.options.push({label:i,value:s}),t.hidden=!0}))}this.loadOptions(d.PRELOAD)}setResizeObserver(){this._resizeObserver=new ResizeObserver((t=>{window.requestAnimationFrame((()=>{Array.isArray(t)&&t.length&&this._textInput&&this._comboBoxList&&(this._comboBoxList.width=this._textInput.clientWidth)}))}))}connectedCallback(){this._resizeObserver||this.setResizeObserver()}componentDidLoad(){n.applyVarsTextInput(this.el,this._textInput),this.setInputValue(!1),this.setResizeObserver(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})}))}disconnectedCallback(){var t;null===(t=this._popover)||void 0===t||t.remove(),this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}handlerIconClick(){this.showOptions()}onTextInputChangeHandler(t){var i;if(this.clearDeboucingTimeout(),this._startLoading)return void(this._changeDeboucingTimeout=window.setTimeout((()=>{this.onTextInputChangeHandler(t)}),this._deboucingTime));const s=null===(i=t.target.value)||void 0===i?void 0:i.trim();this._criteria||(this._textInput.value=t.data||s),this._criteria=s,s?(this.updateVisibleOptions(),this.showOptions()):(this._preSelection=void 0,this.updateVisibleOptions())}clearDeboucingTimeout(){this._changeDeboucingTimeout&&(window.clearTimeout(this._changeDeboucingTimeout),this._changeDeboucingTimeout=null)}onTextInputClickHandler(){this.showOptions()}keyDownHandler(t){var i,s,o,e,h,r;if(t.ctrlKey&&("f"===t.key||"F"===t.key))return this.loadOptions(d.ADVANCED),t.preventDefault(),void t.stopPropagation();switch(t.key){case"ArrowDown":t.preventDefault(),this.canShowListOptions()&&(this.showOptions(),null===(i=this._comboBoxList)||void 0===i||i.nextOption());break;case"ArrowUp":t.preventDefault(),this.canShowListOptions()&&(this.showOptions(),null===(s=this._comboBoxList)||void 0===s||s.previousOption());break;case"Enter":this.isOpen&&(t.preventDefault(),null===(o=this._comboBoxList)||void 0===o||o.selectCurrentOption());break;case"Escape":this.isOpen&&(t.preventDefault(),null===(e=this._popover)||void 0===e||e.hide());break;case"Tab":this._tabPressed=!0,this.isOpen&&(null===(h=this._comboBoxList)||void 0===h||h.selectCurrentOption(),null===(r=this._popover)||void 0===r||r.hide())}}onTextInputFocusOutHandler(){this.hideErrorOnFocusOut&&this.cancelPreselection()}canShowListOptions(){return!this._showLoading&&this._visibleOptions.length>0}async openPopover(){var t;this.isOpen=!0,await(null===(t=this._popover)||void 0===t?void 0:t.showUnder(this._textInput))}render(){var t;return r.addIDInfoIfNotExists(this.el,"input"),s(o,null,s("ez-text-input",{"data-element-id":r.getInternalIDInfo("textInput"),class:"text-input-slot-container "+(this.suppressSearch?"suppressed-search-input":""),ref:t=>this._textInput=t,"data-slave-mode":"true",enabled:this.enabled&&!this.suppressSearch,onInput:t=>this.onTextInputChangeHandler(t),onClick:()=>this.onTextInputClickHandler(),onFocusout:()=>this.onTextInputFocusOutHandler(),onKeyDown:t=>this.keyDownHandler(t),label:this.label,canShowError:this.canShowError,errorMessage:this.errorMessage,mode:this.mode,alternativePlaceholder:this.alternativePlaceholder||this.i18n("ez-combo-box.placeholder")},s("button",{class:"btn",slot:"rightIcon",disabled:!this.enabled,tabindex:-1,onClick:()=>this.handlerIconClick()},s("ez-icon",{iconName:"chevron-down"}))),s("ez-popover-plus",{ref:t=>this._popover=t,anchorElement:this._textInput,autoClose:!0,boxWidth:"fit-content",overlayType:"none",onEzVisibilityChange:t=>this.isOpen=t.detail,"data-element-id":this.el.getAttribute("data-element-id")},s("ez-combo-box-list",{ref:t=>this._comboBoxList=t,showLoading:this._showLoading,visibleOptions:this._visibleOptions,textEmptyList:this.i18n("ez-combo-box.noResults"),showOptionValue:this.showOptionValue,preSelection:this._preSelection,maxWidth:this._maxWidthValue,width:null===(t=this._textInput)||void 0===t?void 0:t.clientWidth,onOptionSelect:t=>this.selectOption(t),onOptionHover:t=>this._preSelection=t})))}get el(){return e(this)}static get watchers(){return{errorMessage:["observeErrorMessage"],value:["observeValue"],options:["observeOptions"]}}};var d;!function(t){t.ADVANCED="ADVANCED",t.PRELOAD="PRELOAD",t.PREDICTIVE="PREDICTIVE"}(d||(d={})),l.style=":host{--ez-combo-box--height:42px;--ez-combo-box--width:100%;--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--font-size:var(--text--medium, 14px);--ez-combo-box--font-family:var(--font-pattern, Arial);--ez-combo-box--background-color--xlight:var(--background--xlight, #fff);--ez-combo-box__input--background-color:var(--background--medium, #e0e0e0);--ez-combo-box__input--border:var(--border--medium, 2px solid);--ez-combo-box__input--border-color:var(--ez-combo-box__input--background-color);--ez-combo-box__input--focus--border-color:var(--color--primary, #008561);--ez-combo-box__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-combo-box__input--disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__btn--color:var(--title--primary, #2B3A54);--ez-combo-box__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-hover--color:var(--color--primary, #4e4e4e);width:var(--ez-combo-box--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #2B3A54)}.btn{outline:none;border:none;background:none;cursor:pointer;padding:0px;color:var(--ez-combo-box__btn--color)}.btn:disabled{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:disabled:hover{cursor:not-allowed;color:var(--ez-combo-box__btn-disabled--color)}.btn:hover{color:var(--ez-combo-box__btn-hover--color)}.btn__close{visibility:hidden}ez-text-input:hover .btn__close,ez-text-input:focus .btn__close{visibility:visible}.text-input-slot-container{--ez-text-input__icon--width:32px;--ez-text-input__min-width:var(--ez-combo-box__min-width);--ez-text-input__max-width:var(--ez-combo-box__max-width)}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";export{l as ez_combo_box}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as d,h as i,H as o,g as
|
|
1
|
+
import{r as t,c as d,h as i,H as o,g as e}from"./p-e4c7eb39.js";import{FloatingManager as l,KeyboardManager as a}from"@sankhyalabs/core";import{i as n}from"./p-c178730b.js";const s=class{constructor(i){t(this,i),this.ezCloseModal=d(this,"ezCloseModal",7),this.ezOpenModal=d(this,"ezOpenModal",7),this.ezModalAction=d(this,"ezModalAction",7),this.modalSize=void 0,this.align=void 0,this.heightMode="regular",this.opened=!0,this.closeEsc=!1,this.closeOutsideClick=!1,this.closeOutsideLeave=!1,this.scrim="medium"}observeOpened(){this.opened?this._overlayId=l.subscribeOverlayControl(this._modalRef):l.unsubscribeOverlayControl(this._modalRef||this._overlayId)}closeModal(){this.opened=!1,this.ezCloseModal.emit(this.opened)}async componentWillLoad(){this.i18n=await n()}componentDidLoad(){this.observeOpened(),this._keyboardManager=new a({propagate:!1,element:this._element,enableShadowDom:!0}).bind("Enter",this.ezModalAction.emit.bind("OK")).bind("Escape",(()=>this.closeModal())).bind("Esc",(()=>this.closeModal()))}componentDidRender(){this.modalFocus()}disconnectedCallback(){var t;null===(t=this._keyboardManager)||void 0===t||t.unbindAllShortcutKeys()}modalFocus(){this.opened&&requestAnimationFrame((()=>{const t=this._element.shadowRoot.querySelector("ez-modal-container");this._modalRef&&null===t&&this._modalRef.focus()}))}onMouseDownHandler(t){this.closeOutsideClick&&t.target===this._overlay&&this.closeModal()}onMouseLeaveHandler(){this.closeOutsideLeave&&this.closeModal()}render(){const t="left"===this.align?"left":"right",d="regular"===this.heightMode?`modal__content--${t}`:"";return i(o,null,this.opened?i("div",{ref:t=>this._modalRef=t,class:`modal modal__screen-${this.scrim} ${"regular"===this.heightMode?"modal__vertical-padding":""}`,onMouseDown:t=>this.onMouseDownHandler(t),tabIndex:-1,"aria-label":this.i18n("ez-modal.close")},i("div",{class:`modal__container modal__container--${t}`,ref:t=>this._overlay=t},i("div",{onMouseLeave:()=>this.onMouseLeaveHandler(),class:`modal__content ${d} ${this.modalSize}`},i("slot",null)))):void 0)}get _element(){return e(this)}static get watchers(){return{opened:["observeOpened"]}}};s.style=":host{--ez-modal-z-index:var(--elevation--22, 22);--ez-modal-vertical-padding:var(--space--large, 24px);--ez-modal-content-padding:24px;display:block;--ez-modal-content-min-width:auto}.modal{position:fixed;display:flex;top:0px;z-index:var(--ez-modal-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;outline:none}.modal__screen-light{background:rgba(0, 4, 12, 0.1)}.modal__screen-none{background:none}.modal__screen-medium{backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.modal__vertical-padding{padding:var(--ez-modal-vertical-padding) 0}@keyframes expand-modal--left{from{transform:translate(-100%)}}@keyframes expand-modal--right{from{transform:translate(100%)}}.modal__container{display:flex;flex-wrap:wrap;height:100%;box-sizing:border-box;width:100%;align-items:flex-start}.modal__container--right{animation:expand-modal--right .2s ease-in-out 1;justify-content:flex-end}.modal__container--left{animation:expand-modal--left .2s ease-in-out 1;justify-content:flex-start}.modal__content{display:flex;flex-wrap:wrap;box-sizing:border-box;max-height:100%;min-width:var(--ez-modal-content-min-width);height:100%;overflow-y:auto;background-color:rgb(255, 255, 255);padding:var(--ez-modal-content-padding);box-shadow:rgb(0 38 111 / 12%) 0px 0px 16px 0px}.modal__content--right{border-radius:12px 0px 0px 12px}.modal__content--left{border-radius:0px 12px 12px 0px}.modal__box__container{display:flex;flex-wrap:wrap;background-color:#fff;width:100%;border-radius:12px}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";export{s as ez_modal}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as a,h as i,H as t,g as s}from"./p-
|
|
1
|
+
import{r as e,c as a,h as i,H as t,g as s}from"./p-e4c7eb39.js";import{ElementIDUtils as r}from"@sankhyalabs/core";import{E as o}from"./p-98bb8b16.js";import{i as n}from"./p-c178730b.js";var d,l,h;!function(e){e.FLOAT="float",e.FIXED="fixed"}(d||(d={})),function(e){e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg"}(l||(l={})),function(e){e.FLOAT="float",e.FIXED="fixed",e.DYNAMIC="dynamic"}(h||(h={}));const b=class{constructor(i){e(this,i),this.ezChangeMode=a(this,"ezChangeMode",7),this.handleToggleSidebar=()=>{this.open=!this.open},this.handleToggleMode=()=>{this.mode=this.mode===d.FIXED?d.FLOAT:d.FIXED,this.ezChangeMode.emit(this.mode)},this.type=h.DYNAMIC,this.mode=d.FLOAT,this.size=l.SMALL,this.isResponsive=!1,this.titleMenu="",this.showCollapseMenu=!0,this.showFixedButton=!0,this.open=!1}async changeModeMenu(){this.type===h.DYNAMIC&&this.handleToggleMode()}async closeSidebar(){this.open=!1}async openSidebar(){this.open=!0}async componentWillLoad(){this.i18n=await n()}componentDidLoad(){this.type===h.FIXED&&(this.mode=d.FIXED,this.open=!0)}render(){return r.addIDInfoIfNotExists(this._element),i(t,null,i("ez-sidebar-button",{class:this.open?"hidden":"",onEzClick:this.mode===d.FIXED?this.handleToggleSidebar:void 0,onMouseEnter:this.mode===d.FLOAT?this.handleToggleSidebar:void 0,"aria-controls":"navigator","aria-expanded":this.open,"data-element-id":r.getInternalIDInfo("openButton")}),this.open?i("aside",{tabIndex:-1,id:"navigator",class:`ez-col ez-col--sd-12 ez-col--tb-3 ez-sidebar-navigator ${this.mode===d.FLOAT?"dynamic":"fixed"} ${this.isResponsive?"responsive":this.size} ${this.open?"show":"hidden"}`,"data-element-id":r.getInternalIDInfo("sidebar"),onMouseLeave:this.type!==h.FIXED&&this.mode===d.FLOAT?this.handleToggleSidebar:void 0},i("header",{class:"ez-sidebar-navigator__header"},i("slot",{name:"start"}),""!==this.titleMenu&&i("div",{class:"ez-sidebar-navigator__title",title:this.titleMenu},this.titleMenu),!this.titleMenu&&i("slot",{name:"content"}),i("div",{class:"ez-sidebar-navigator__end"},i("slot",{name:"end"}),this.type===h.DYNAMIC&&this.showFixedButton&&i("ez-button",{onClick:this.handleToggleMode,mode:"icon",size:"small",iconName:this.mode===d.FIXED?"un-pin":"push-pin",title:this.i18n(this.mode===d.FIXED?"ez-sidebar.unPinMenu":"ez-sidebar.pushPinMenu"),"aria-label":this.i18n(this.mode===d.FIXED?"ez-sidebar.unPinMenu":"ez-sidebar.pushPinMenu"),"aria-controls":"navigator","data-element-id":r.getInternalIDInfo("pinButton")}),this.mode===d.FIXED&&this.showCollapseMenu&&i("ez-button",{onClick:this.handleToggleSidebar,class:"inverted",mode:"icon",size:"small",iconName:"show_menu",title:this.i18n("ez-sidebar.hideMenu"),"aria-label":this.i18n("ez-sidebar.hideMenu"),"aria-controls":"navigator","data-element-id":r.getInternalIDInfo("closeButton")}))),this.titleMenu&&i("slot",{name:"content"}),i("ez-scroller",{class:"ez-sidebar-navigator__content",direction:o.VERTICAL,activeShadow:!0},i("slot",null)),i("footer",{class:"ez-sidebar-navigator__footer"},i("slot",{name:"footer"}))):void 0)}get _element(){return s(this)}};b.style=':host{--ez-sidebar-navigator--padding-left:var(--space--xs, 12px);--ez-sidebar-navigator--padding-right:var(--space--xs, 12px);--ez-sidebar-navigator--gap:var(--space--xs, 12px);--ez-sidebar-navigator--box-shadow:var(--shadow, 0px 0px 24px 0px #000);--ez-sidebar-navigator--background-color:var(--color--inverted);--ez-sidebar-navigator--border-radius:0px var(--border--radius-medium) var(--border--radius-medium) 0px;--ez-sidebar-navigator--height:calc(100vh - var(--space--lg, 24px));--ez-sidebar-navigator--z-index:var(--elevation--20, 20);--ez-sidebar-navigator--header-gap:var(--space--xs, 12px);--ez-sidebar-navigator--footer-gap:var(--space--xs, 12px);--ez-ez-sidebar-navigator__title--font-family:var(--font-pattern, "Roboto");--ez-ez-sidebar-navigator__title--font-size:var(--title--medium, 16px);--ez-ez-sidebar-navigator__title--color:var(--title--primary, #2b3a54);--ez-ez-sidebar-navigator__title--font-weight:var(--text-weight--extra-large, 700)}.inverted{transform:rotate(180deg)}.ez-sidebar-navigator{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:var(--ez-sidebar-navigator--height);padding-top:var(--space--xs, 12px);padding-bottom:var(--space--xs, 12px);outline:none;gap:var(--ez-sidebar-navigator--gap);padding-left:var(--ez-sidebar-navigator--padding-left);padding-right:var(--ez-sidebar-navigator--padding-right);background-color:var(--ez-sidebar-navigator--background-color);-webkit-box-shadow:var(--ez-sidebar-navigator--box-shadow);box-shadow:var(--ez-sidebar-navigator--box-shadow);border-radius:var(--ez-sidebar-navigator--border-radius)}.ez-sidebar-navigator__header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;justify-content:space-between;gap:var(--ez-sidebar-navigator--header-gap)}.ez-sidebar-navigator__content{height:100%}.ez-sidebar-navigator__footer{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:var(--ez-sidebar-navigator--footer-gap)}.ez-sidebar-navigator__title{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-family:var(--ez-ez-sidebar-navigator__title--font-family);font-size:var(--ez-ez-sidebar-navigator__title--font-size);font-weight:var(--ez-ez-sidebar-navigator__title--font-weight);color:var(--ez-ez-sidebar-navigator__title--color)}.ez-sidebar-navigator__end{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-left:auto;gap:var(--ez-sidebar-navigator--gap)}.dynamic{position:absolute;z-index:var(--ez-sidebar-navigator--z-index)}.fixed{position:relative}.hidden{display:none}.show{animation:fadeIn .1s ease-in-out 1}@keyframes fadeIn{from{transform:translate(-100%)}}.sm{width:240px}.md{width:280px}.lg{width:320px}@media screen and (max-width: 991px){.responsive{width:240px}}@media screen and (min-width: 992px){.responsive{width:280px}}@media screen and (min-width: 1200px){.responsive{width:320px}}';export{b as ez_sidebar_navigator}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as s,H as e,g as a}from"./p-e4c7eb39.js";import{DateUtils as n,ElementIDUtils as h}from"@sankhyalabs/core";import{C as o}from"./p-ec7db713.js";import{i as r}from"./p-c178730b.js";const l=class{constructor(s){t(this,s),this.ezChange=i(this,"ezChange",7),this.ezStartChange=i(this,"ezStartChange",7),this.ezCancelWaitingChange=i(this,"ezCancelWaitingChange",7),this.ezInput=i(this,"ezInput",7),this._changePending=!1,this._focused=!1,this._valuePromiseCallbacks=[],this.label=void 0,this.value=void 0,this.enabled=!0,this.errorMessage=void 0,this.mode="regular",this.size="default",this.required=!1,this.canShowError=!0,this.autoFocus=!1,this.alternativePlaceholder=void 0}observeLabel(){this._textInput&&(this._textInput.label=this.label)}observeErrorMessage(){var t;this._textInput&&(this._textInput.errorMessage=this.errorMessage,(null===(t=this.errorMessage)||void 0===t?void 0:t.trim())||this.setInputValue())}observeValue(t,i){if(this._textInput&&t!=i){const s=n.validateDate(t),e=n.validateDate(i);if((null==s?void 0:s.getTime())!==(null==e?void 0:e.getTime())){const t=this.getTextValue(s)||"";!n.strToDate(t)&&this._focused||(this._textInput.value||"")===t||(this._textInput.value=t,this._focused=!1,this.errorMessage=""),this.ezChange.emit(null===s?void 0:s)}}this._changePending=!1}async setFocus(t){this._textInput.setFocus(t)}async setBlur(){this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async getValueAsync(){return this._changePending?new Promise((t=>{this._valuePromiseCallbacks.push(t)})):Promise.resolve(this.value)}changeValue(t){const i=n.validateDate(this.value),s=n.validateDate(t);(null==i?void 0:i.getTime())!==(null==s?void 0:s.getTime())?this.value=s:this._changePending=!1}async handleChangeCalendar(t){this.changeValue(this._calendar.value),this.ezInput.emit(this._calendar.value),this._popover.hide(),await this.setFocus(),t.stopPropagation()}handleBlur(){if(this._changePending)try{const t=this._textInput.value,i=n.strToDate(t);if(i||!t){this.errorMessage="";const t=n.validateDate(this.value),s=n.validateDate(i);(null==t?void 0:t.getTime())===(null==s?void 0:s.getTime())?(s&&(this._textInput.value=this.getTextValue(s)||"",this._focused=!1),this.ezCancelWaitingChange.emit()):(this._focused=!1,this.changeValue(s))}else this.changeValue(void 0),this.ezCancelWaitingChange.emit(),this.errorMessage=this.i18n("ez-classic-date-input.invalidDate")}finally{for(const t of this._valuePromiseCallbacks)t(this.value);this._valuePromiseCallbacks=[]}}getTextValue(t){return t?n.formatDate(t):void 0}handleInput(t){const i=n.strToDate(this._textInput.value),s=n.validateDate(this.value),e=n.validateDate(i);if((null==s?void 0:s.getTime())!==(null==e?void 0:e.getTime())&&(this._changePending=!0,this._focused=!0,this.ezStartChange.emit({waitmessage:"",blocking:!1})),"H"===t.data||"h"===t.data){const t=new Date;this.ezInput.emit(t),this.changeValue(t)}}setInputValue(){const t=this.getTextValue(this.value)||"";(this._textInput.value||"")!==t&&(this._textInput.value=t)}disconnectedCallback(){this._popover.hide()}async componentWillLoad(){this.i18n=await r()}componentDidLoad(){o.applyVarsTextInput(this._elem,this._textInput),this.setInputValue(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})}))}render(){return h.addIDInfoIfNotExists(this._elem,"input"),s(e,null,s("ez-classic-input",{"data-element-id":h.getInternalIDInfo("textInput"),ref:t=>this._textInput=t,"data-slave-mode":"true",label:this.label,onBlur:()=>this.handleBlur(),onInput:t=>this.handleInput(t),restrict:"0123456789/",enabled:this.enabled,errorMessage:this.errorMessage,mode:this.mode,size:this.size,canShowError:this.canShowError,alternativePlaceholder:this.alternativePlaceholder,required:this.required,leftIconName:"calendar",leftIconClickable:this.enabled,onIconClick:()=>{var t;return null===(t=this._popover)||void 0===t?void 0:t.showUnder(this._textInput)},onEzChange:t=>t.stopPropagation()}),s("ez-popover-plus",{ref:t=>this._popover=t,anchorElement:this._textInput,autoClose:!0,boxWidth:"fit-content",overlayType:"none","data-element-id":this._elem.getAttribute("data-element-id"),onEzVisibilityChange:t=>t.stopPropagation()},s("ez-calendar",{ref:t=>this._calendar=t,"data-element-id":h.getInternalIDInfo("calendar"),onEzChange:t=>this.handleChangeCalendar(t),value:this.value})))}get _elem(){return a(this)}static get watchers(){return{label:["observeLabel"],errorMessage:["observeErrorMessage"],value:["observeValue"]}}};l.style=':host{display:block;width:100%;--ez-classic-date-input__input--background-color:var(--background--medium, #e0e0e0);--ez-classic-date-input__input--border-color:var(--ez-classic-date-input__input--background-color);--ez-classic-date-input__calendar-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="15px"><path d="M 3.171875,5.25 C 2.6485088,5.25 2.21875,5.6797588 2.21875,6.203125 2.21875,6.7264912 2.6485088,7.15625 3.171875,7.15625 3.6952412,7.15625 4.125,6.7264912 4.125,6.203125 4.125,5.6797588 3.6952412,5.25 3.171875,5.25 Z m 2.875,0 C 5.5235088,5.25 5.09375,5.6797588 5.09375,6.203125 5.09375,6.7264912 5.5235088,7.15625 6.046875,7.15625 6.5702412,7.15625 7,6.7264912 7,6.203125 7,5.6797588 6.5702412,5.25 6.046875,5.25 Z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.9511719,-0.4297588 0.9511719,-0.953125 C 9.8730469,5.6797588 9.4452412,5.25 8.921875,5.25 Z m 2.873047,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.953125 0.953125,0.953125 0.523366,0 0.953125,-0.4297588 0.953125,-0.953125 C 12.748047,5.6797588 12.318288,5.25 11.794922,5.25 Z M 3.171875,8.1230469 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 0.5233662,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 C 6.5702412,10.029297 7,9.5995381 7,9.0761719 7,8.5528057 6.5702412,8.1230469 6.046875,8.1230469 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297587,0.9531251 0.953125,0.9531251 0.5233661,0 0.9531249,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.9531251 0.953125,0.9531251 0.523367,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.171875,10.998047 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 C 6.5702412,12.904297 7,12.474538 7,11.951172 7,11.427806 6.5702412,10.998047 6.046875,10.998047 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297587,0.953125 0.953125,0.953125 0.5233661,0 0.9531249,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.429759,0.953125 0.953125,0.953125 0.523367,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.5,0 c -0.554,0 -1,0.446 -1,1 v 0.050781 C 1.0853217,1.2909766 0,2.5186658 0,4 v 9 c 0,1.652487 1.3475134,3 3,3 h 9 c 1.652487,0 3,-1.347513 3,-3 V 4 C 15,2.5186658 13.914678,1.2909766 12.5,1.0507812 V 1 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 C 4.5,0.446 4.054,0 3.5,0 Z m 1,2.0996094 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 v -0.640625 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 V 2.1738281 C 13.311725,2.3905225 13.900391,3.11278 13.900391,4 v 9 c 0,1.062113 -0.838278,1.900391 -1.900391,1.900391 H 3 C 1.9378864,14.900391 1.0996094,14.062113 1.0996094,13 V 4 C 1.0996094,3.11278 1.6882747,2.3905225 2.5,2.1738281 v 0.5664063 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 z"/></svg>\')}.btn-open-cal{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-cal:disabled{cursor:not-allowed}.btn-open-cal::after{content:\'\';display:flex;background-color:var(--text--primary, #008561);width:15px;height:16px;-webkit-mask-image:var(--ez-classic-date-input__calendar-image);mask-image:var(--ez-classic-date-input__calendar-image)}.btn-open-cal:disabled:after{background-color:var(--text--disable, #AFB6C0)}.btn-open-cal:enabled:hover::after{background-color:var(--color--primary, #4e4e4e)}ez-classic-input{--text-input__input--background-color:var(--ez-classic-date-input__input--background-color, #FFFFFF);--text-input__input--border-color:var(--ez-classic-date-input__input--border-color, #DCE0E8)}';export{l as ez_classic_date_input}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as n,h as t,H as i,g as a}from"./p-
|
|
1
|
+
import{r as e,c as n,h as t,H as i,g as a}from"./p-e4c7eb39.js";import{StringUtils as o,ElementIDUtils as d}from"@sankhyalabs/core";const r=class{constructor(t){e(this,t),this.ezClick=n(this,"ezClick",7),this.item=void 0,this.enableKey=!0,this.compacted=!1}componentWillRender(){this.createDetailList()}componentDidLoad(){var e,n;const t={id:o.toCamelCase((null===(e=this.item)||void 0===e?void 0:e.key)||(null===(n=this.item)||void 0===n?void 0:n.title)||"")};d.addIDInfo(this._element,null,t)}createDetailList(){var e,n,t;this._details={detailsLeft:[],detailsRight:[]};let i=0;if(null===(e=this.item)||void 0===e?void 0:e.details)for(const e in this.item.details)i<3?this._details.detailsLeft.push({label:e,value:null===(n=this.item.details[e])||void 0===n?void 0:n.toString()}):this._details.detailsRight.push({label:e,value:null===(t=this.item.details[e])||void 0===t?void 0:t.toString()}),i++}buildDetailContentTitle(e){var n,t;if(null!=(null==e?void 0:e.label)||null!=(null==e?void 0:e.value))return`${null===(n=o.replaceAccentuatedCharsHtmlEntities(null==e?void 0:e.label))||void 0===n?void 0:n.replace(/<[^>]*>/g,"")}: ${null===(t=o.replaceAccentuatedCharsHtmlEntities(null==e?void 0:e.value))||void 0===t?void 0:t.replace(/<[^>]*>/g,"")}`}buildDetailContent(e){return t("div",{class:"card-item__detail "+(this.compacted?"":"card-item__detail-default"),title:this.buildDetailContentTitle(e)},t("label",{class:"card-item__detail-label "+(this.compacted?"card-item__detail-label-compacted":"")},`${e.label}: `)," ",t("label",{class:"card-item__detail-value "+(this.compacted?"card-item__detail-value-compacted":""),innerHTML:e.value}))}render(){return t(i,null,this.item&&t("div",{class:`card-item ${this.compacted?"card-item__compacted":"card-item__expanded"} `,onClick:()=>{this.ezClick.emit(this.item)}},t("div",{class:"ez-row card-item__content"},t("div",{class:"ez-col ez-col--sd-11 card-item__details"},t("label",{class:"card-item__title "+(this.compacted?"card-item__title-compacted":"")},this.enableKey&&t("span",{class:"card-item__key",innerHTML:this.item.key}),t("span",{innerHTML:this.item.title})),t("div",{class:this.compacted?"card-item__details-container_compacted":"card-item__details-container_default"},t("div",{class:"card-item__details-container__left "+(this.compacted?"card-item__details-container__left-compacted":"")},this._details.detailsLeft.map((e=>this.buildDetailContent(e)))),t("div",{class:"card-item__details-container__right "+(this.compacted?"card-item__details-container__right-compacted":"")},this._details.detailsRight.map((e=>this.buildDetailContent(e)))))),t("div",{class:"ez-col ez-col--sd-1 card-item__details-slot"},t("slot",{name:"rightSlot"})))))}get _element(){return a(this)}};r.style=":host { \n /*@doc Define o tamanho da fonte do componente.*/\n --ez-card-item--font-size: var(--text--medium, 14px);\n\n /*@doc Define o tamanho da fonte do componente no modo compacto.*/\n --ez-card-item--font-size-compacted: var(--text--extra-small, 10px);\n\n /*@doc Define a família da fonte do componente.*/\n --ez-card-item--font-family: var(--font-pattern, Arial);\n\n /*@doc Define o peso da fonte do componente.*/\n --ez-card-item--font-weight: var(--font-weight--semi-bold, 600);\n\n /*@doc Define o peso da fonte do title do componente.*/\n --ez-card-item--font-weight-large: var(--font-weight--semi-bold, 600);\n\n /*@doc Define a cor da fonte do componente.*/\n --ez-card-item--color: var(--text--primary, #626e82);\n\n /*@doc Define a cor da fonte da key do componente.*/\n --ez-card-item__key--color: var(--text--primary, #626e82);\n\n /*@doc Define a cor da fonte do label do detalhe do componente.*/\n --ez-card-item__detail-label--color: var(--text--secondary, #A2ABB9);\n\n /*@doc Define a cor da fonte do valor do detalhe do componente.*/\n --ez-card-item__detail-value--color: var(--color--petroleum-500, #404E65);\n\n /*@doc Define o espaçamento inferior dos detalhes do componente.*/\n --ez-card-item__detail--padding-bottom: var(--space--extra-small, 3px);\n\n /*@doc Define o espaçamento inferior do title do componente.*/\n --ez-card-item__title--padding-bottom: var(--space--extra-small, 3px);\n\n /*@doc Define a cor do highlight / marcação nos textos do componente.*/\n --ez-card-item__highlight--color: var(--color--primary-300, #E2F4EF);\n\n /*@doc Define o peso da fonte do componente.*/\n --ez-card-item--detail-label--font-weight: var(--text-weight--large, 400);\n\n width: 100%;\n display: flex;\n cursor: pointer;\n}\n\n.card-item {\n display: flex;\n flex-direction: column;\n width: 100%;\n cursor: pointer;\n z-index: 0;\n position: relative;\n container-type: inline-size;\n container-name: box;\n white-space: pre-line;\n}\n\n.card-item__detail{\n display: inline-block;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n opacity: 0.95;\n}\n\n\n\n.card-item__expanded {\n padding: var(--space--medium);\n}\n\n.card-item:hover {\n background: #F0F3F7;\n border-radius: 12px;\n}\n\n.card-item__title {\n display: flex;\n align-items: center;\n line-height: 18px;\n cursor: pointer;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--font-weight-large);\n color: var(--ez-card-item--color);\n padding-bottom: var(--ez-card-item__title--padding-bottom);\n gap: var(--space--small, 6px);\n}\n\n.card-item__key {\n /*public*/\n color: var(--ez-card-item__key--color);\n}\n\n.card-item__details {\n display: flex;\n flex-direction: column;\n cursor: pointer;\n justify-content: space-between;\n width: 100%;\n}\n\n.card-item__details-container__left {\n display: flex;\n flex-direction: column;\n white-space: pre-line;\n cursor: pointer;\n width: 50%;\n}\n\n.card-item__details-container__right {\n display: flex;\n flex-direction: column;\n white-space: pre-line;\n width: 50%;\n cursor: pointer;\n}\n\n.card-item__detail{\n cursor: pointer;\n}\n\n.card-item__detail-default:not(:last-child) {\n padding-bottom: var(--ez-card-item__detail--padding-bottom);\n}\n\n.card-item__detail-label {\n cursor: pointer;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--detail-label--font-weight);\n}\n\n.card-item__detail-value {\n cursor: pointer;\n line-break: anywhere;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--font-weight);\n color: var(--ez-card-item__detail-value--color);\n}\n\n.card-item__highlight {\n position: relative;\n border-radius: 8px;\n z-index: -1;\n\n /*public*/\n background-color: var(--ez-card-item__highlight--color);\n outline: 2px solid var(--ez-card-item__highlight--color);\n box-shadow: -4px 0px 0px 0px var(--ez-card-item__highlight--color), \n 4px 0px 0px 0px var(--ez-card-item__highlight--color);\n}\n\n.card-item__content{\n display: flex;\n align-items: center;\n}\n\n.card-item__details-container_default{\n display: flex;\n}\n\n.card-item__details-slot{\n margin-left: auto;\n}\n\n/* Modo compacto */\n.card-item__compacted {\n padding: var(--space--2xs) var(--space--small);\n}\n\n.card-item__detail-label-compacted {\n font-size: var(--ez-card-item--font-size-compacted);\n}\n\n.card-item__detail-value-compacted {\n font-size: var(--ez-card-item--font-size-compacted);\n}\n\n.card-item__title-compacted {\n font-size: var(--ez-card-item--font-size-compacted);\n}\n\n.card-item__details-container__left-compacted{\n width: 100%;\n}\n\n.card-item__details-container__right-compacted {\n width: 100%;\n}\n\n\n@container box (max-width: 550px) {\n .card-item__details {\n flex-direction: column;\n }\n\n .card-item__details-container__left {\n width: 100%;\n }\n \n .card-item__details-container__right {\n width: 100%;\n }\n}\n\n@container box (max-width: 200px) {\n .card-item__title {\n font-size: 10px;\n }\n\n .card-item__detail-label {\n font-size: 10px;\n }\n\n .card-item__detail-value {\n font-size: 10px;\n }\n\n}";export{r as ez_card_item}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,c as t,h as o}from"./p-
|
|
1
|
+
import{r as i,c as t,h as o}from"./p-e4c7eb39.js";const r=class{constructor(o){i(this,o),this.actionTriggered=t(this,"actionTriggered",7),this.icon=void 0,this.command=void 0,this.title=void 0,this.value=void 0}async triggerAction(){this.actionTriggered.emit({command:this.command,value:this.value})}render(){return o("div",{id:`rich-toolbar-item-${this.icon}`,class:"rich-toolbar-item",title:this.title,onClick:this.triggerAction.bind(this)},o("ez-icon",{class:"toolbar-item",iconName:this.icon}))}};r.style="ez-icon.sc-ez-rich-toolbar-item{--ez-icon--color:var(--color--secondary, #383c45)}.rich-toolbar-item.sc-ez-rich-toolbar-item{display:flex;align-items:center;justify-content:center;width:32px;height:32px;background:none;border:none;border-radius:4px;cursor:pointer;transition:0.3s all ease-in-out}.rich-toolbar-item.sc-ez-rich-toolbar-item:hover{background-color:#f5f5f5}";export{r as ez_rich_toolbar_item}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,r as i,c as e,g as s}from"./p-
|
|
1
|
+
import{h as t,r as i,c as e,g as s}from"./p-e4c7eb39.js";import{ElementIDUtils as r,ObjectUtils as o,JSUtils as h}from"@sankhyalabs/core";const l=i=>{const{items:e,selectedItem:s,itemsHidden:o,showDropdown:h,handleShowDropdown:l,collapseConfigPosition:a,ellipsesPositionedEnd:c}=i,n=i=>t("li",Object.assign({class:"breadcrumb__item",onClick:t=>(t=>{t.stopPropagation(),l(!h)})(t)},{[r.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:r.getInternalIDInfo("ezBreadcrumbItem_ellipsis")}),c&&t("ez-icon",Object.assign({class:"breadcrumb__item--chevron",size:"small",iconName:"chevron-right"},{[r.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:`${r.getInternalIDInfo(`iconPath${i.id}`)}`})),t("span",{class:"ellipses__item"},"..."),c||t("ez-icon",Object.assign({class:"breadcrumb__item--chevron",size:"small",iconName:"chevron-right"},{[r.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:`${r.getInternalIDInfo(`iconPath${i.id}`)}`})),h&&t("ez-dropdown",Object.assign({class:"dropdown-ellipsis",items:o.map((t=>Object.assign(Object.assign({},t),{type:"item",children:null,iconName:t.iconName||null,subAction:null,group:null}))),onEzClick:t=>s.emit(t.detail)},{[r.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:`${r.getInternalIDInfo("dropdown")}`})));return t("div",{class:"breadcrumb__items"},e.map(((i,o)=>{const h=o===e.length-1;return t("div",{class:"breadcrumb__group"},a===o&&n(i),t("li",Object.assign({class:"breadcrumb__item",id:i.id},{[r.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:r.getInternalIDInfo(`ezBreadcrumb_item_${i.id}_${i.label}`)}),i.iconName&&t("ez-icon",Object.assign({class:"breadcrumb__item--icon "+(h&&!c?"active-icon":""),size:"small",iconName:i.iconName},{[r.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:`${r.getInternalIDInfo(`iconItem${i.id}`)}`})),t("p",{class:"breadcrumb__item--label "+(h&&!c?"active":""),onClick:c||!h?()=>s.emit(i):void 0},i.label),!h&&t("ez-icon",Object.assign({class:"breadcrumb__item--chevron",size:"small",iconName:"chevron-right"},{[r.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:`${r.getInternalIDInfo(`iconPath${i.id}`)}`}))),a-1===o&&c&&n(i))})))},a=class{constructor(t){i(this,t),this.selectedItem=e(this,"selectedItem",7),this._ellipsesPositionedEnd=!1,this._renderSecond=!1,this.INDEX_ITEM_TO_REMOVE=1,this.CHEVRON_SIZE=28,this.handleShowDropdown=t=>{this.showDropdown=t},this.items=[],this.fillMode="auto",this.maxItems=4,this.positionEllipsis=1,this.visibleItems=void 0,this.hiddenItems=[],this.showDropdown=!1,this.collapseConfigPosition=-1}watchPropHandler(t,i){o.objectToString(t||[])!==o.objectToString(i||[])&&this.loadItems(),"auto"===this.fillMode&&this.handleResize()}watchPropHiddenItems(){"auto"===this.fillMode&&(this.collapseConfigPosition=this.hiddenItems.length>0?1:-1)}componentDidUpdate(){this.positionDropdown(),this.setEvents()}componentWillLoad(){this.loadItems()}loadItems(){this.visibleItems=[...this.items],this.hiddenItems=[],"regular"===this.fillMode?this.configModeRegular():"auto"===this.fillMode&&this.startResize(),this.setEvents()}closeDropdown(t){const i=null==t?void 0:t.target;null!=i&&i!==this._element.shadowRoot.querySelector(".ellipses__item")&&(this.showDropdown=!1)}setEvents(){document.removeEventListener("click",this.closeDropdown.bind(this)),document.addEventListener("click",this.closeDropdown.bind(this)),document.removeEventListener("scroll",this.positionDropdown.bind(this)),document.addEventListener("scroll",this.positionDropdown.bind(this))}componentDidLoad(){r.addIDInfo(this._element)}componentDidRender(){"auto"===this.fillMode&&this.configResize()}configResize(){null!=this._resizeObserver&&this._resizeObserver.unobserve(this._element.parentElement),this._resizeObserver=new ResizeObserver(h.debounce(this.handleResize.bind(this),200)),this._resizeObserver.observe(this._element.parentElement)}handleResize(){if(!this._renderSecond)return void(this._renderSecond=!0);if(null==this._element.parentElement)return;let{offsetWidth:t}=this._element.parentElement,i=0;this.visibleItems.forEach((t=>i+=t.width));const e=this.collapseConfigPosition>-1?39:0;t<i+e?this.handleCollapse(t,i):t>=i+e&&this.handleExpand(t)}handleCollapse(t,i){if(this.visibleItems.length<=2)return;let e=[...this.visibleItems],s=[...this.hiddenItems],r=e[this.INDEX_ITEM_TO_REMOVE],o=!1;for(;e.length>2&&null!=r&&i>t;)o=!0,e=e.filter(((t,i)=>i!==this.INDEX_ITEM_TO_REMOVE)),s=[...s,r],i-=r.width,r=e[this.INDEX_ITEM_TO_REMOVE];o&&(this.visibleItems=e,this.hiddenItems=s,this.showDropdown=!1)}handleExpand(t){if(!this.hiddenItems.length)return;let i=Math.abs(this._elBreadcrumbList.offsetWidth-t),e=[...this.visibleItems],s=[...this.hiddenItems],r=s[s.length-1],o=!1;for(;r&&i>=r.width;)i-=r.width,s.pop(),e.splice(this.INDEX_ITEM_TO_REMOVE,0,r),r=s[s.length-1],o=!0;o&&(this.visibleItems=e,this.hiddenItems=s,this.showDropdown=!1)}configModeRegular(){if(this.visibleItems.length>this.maxItems){const t=Math.abs(this.visibleItems.length-this.maxItems);if(0===this.positionEllipsis){const i=this.visibleItems.slice(0,t);this.hiddenItems.push(...i),this.visibleItems.splice(0,t)}else if(this.positionEllipsis>=this.maxItems){const t=this.visibleItems.slice(this.maxItems);this.hiddenItems.push(...t),this.visibleItems.splice(this.maxItems),this._ellipsesPositionedEnd=!0}else{const i=this.visibleItems.splice(this.positionEllipsis,t);this.hiddenItems.push(...i)}this.collapseConfigPosition=this.positionEllipsis}}positionDropdown(){var t;const i=null===(t=this._element.shadowRoot.querySelector(".ellipses__item"))||void 0===t?void 0:t.getBoundingClientRect(),e=this._element.shadowRoot.querySelector(".dropdown-ellipsis");null!=i&&null!=e&&(e.style.top=i.y+i.height+5+"px",e.style.left=i.x+"px")}async startResize(){const t=this._element.parentElement.offsetWidth,i=await Promise.all(this.visibleItems.map((async(t,i)=>(t.width=await this.measureSizeHTMLElement(t),i===this.visibleItems.length-1&&(t.width-=this.CHEVRON_SIZE),t))));if(i.reduce(((t,i)=>t+i.width),0)>t){const e=[],s=[...i],r=s.shift(),o=s.pop();o.width+=10,e.push(r,o);let h=e.reduce(((t,i)=>t+i.width),0),l=Math.abs(h-t);s.reverse().forEach((i=>{if(i.width<l){const i=s.shift();e.splice(1,0,i),h=e.reduce(((t,i)=>t+i.width),0),l=Math.abs(h-t)}})),this.visibleItems=[...e],this.hiddenItems=[...s.reverse()]}}measureSizeHTMLElement(t){return new Promise((i=>{this.waitFontLoad().then((()=>{void 0===this._textMesurement&&(this._textMesurement=this._element.shadowRoot.ownerDocument.createElement("canvas"));const e=this._textMesurement.getContext("2d");e.font="14px Roboto, Algerian",i((t.iconName?19:0)+this.CHEVRON_SIZE+e.measureText(t.label).width)}))}))}waitFontLoad(){return new Promise((t=>{document.fonts.load("14px Roboto").then((()=>t()),t())}))}getItemContent(){return t("nav",{class:"breadcrumb"},t("ol",{class:"breadcrumb__list",ref:t=>this._elBreadcrumbList=t},t(l,{items:this.visibleItems,selectedItem:this.selectedItem,itemsHidden:this.hiddenItems,showDropdown:this.showDropdown,handleShowDropdown:this.handleShowDropdown,collapseConfigPosition:this.collapseConfigPosition,ellipsesPositionedEnd:this._ellipsesPositionedEnd})))}render(){return this.getItemContent()}get _element(){return s(this)}static get watchers(){return{items:["watchPropHandler"],hiddenItems:["watchPropHiddenItems"]}}};a.style=":host{--breadcrumb__item--label--color--title-primary:var(--color--title-primary, #2B3A54);--breadcrumb__item--label--color--active:var(--color--primary, '#008561');--breadcrumb__item--label--font-weight:var(--text-weight--large, 600);display:block;font-size:var(--text--medium, 14px);font-family:var(--font-pattern, \"Roboto\");font-weight:var(--text-weight--medium, 400)}.breadcrumb{display:flex}.breadcrumb__group{display:flex}.breadcrumb__list{list-style-type:none;display:inline-block;margin:0;padding:0;overflow:hidden;white-space:nowrap}.breadcrumb__item{display:inline-flex;align-items:center;cursor:pointer}.breadcrumb__item--label{color:var(--breadcrumb__item--label--color--title-primary);margin:0px}.breadcrumb__item--icon{padding-right:3px;color:var(--breadcrumb__item--label--color--title-primary)}.breadcrumb__item--chevron{padding:0px 6px;cursor:default}.active{color:var(--breadcrumb__item--label--color--active);font-weight:var(--breadcrumb__item--label--font-weight);cursor:default}.active-icon{--icon--color:var(--breadcrumb__item--label--color--active);cursor:default}.breadcrumb__items{display:flex}";export{a as ez_breadcrumb}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as t,h as i,H as r,g as s}from"./p-e4c7eb39.js";import{StringUtils as a,KeyboardManager as o,ElementIDUtils as l}from"@sankhyalabs/core";import"./p-9825c1d2.js";import{C as n}from"./p-ec7db713.js";import"./p-ab574d59.js";import"./p-b853763b.js";import{i as h}from"./p-c178730b.js";import{S as c}from"./p-5895e687.js";import"./p-47e4a8ce.js";const d=class{constructor(i){e(this,i),this.ezChange=t(this,"ezChange",7),this.SEARCH_DESCRIPTION_TIMEOUT=300,this.INTERVAL_TO_RETRY_ASYNC_VALUE=100,this._ignoreNextValue=!1,this.value=void 0,this.enabled=!0,this.disableCodeInput=!1,this.disableDescriptionInput=!1,this.label=void 0,this.codLabel=void 0,this.hideDescriptionInput=!1,this.canShowError=!0,this.errorMessage=void 0,this.mode="regular",this.contextProperties=void 0,this.optionLoader=void 0,this.showOptionValue=!0,this.stopPropagateEnterKeyEvent=!1,this.autoFocus=!1,this.showSelectedValue=!0,this.suppressEmptyOption=!1,this.hideErrorOnFocusOut=!0,this.listOptionsPosition=void 0,this.isTextSearch=!1,this.ignoreLimitCharsToSearch=!1,this.suppressSearch=!1,this.suppressPreLoad=!0,this.ensureClearButtonVisible=!1,this.descriptionValue="",this.codeValue="",this.isLoadingDescription=!1,this.searchDescriptionIsOpen=!1,this.visibleOptions=void 0,this.showLoading=!0}async observeValue(e,t){var i;if(this._ignoreNextValue)return void(this._ignoreNextValue=!1);const r=this.normalizeValueToCodeValue(e);if(r!==this.normalizeValueToCodeValue(t)){if(void 0===r)return this.codeValue=void 0,this.descriptionValue=void 0,void this.ezChange.emit(void 0);this.codeValue=r;try{if(this.descriptionValue=await this.normalizeCodeToDescriptionValue(e),null==this.descriptionValue)throw new Error("Valor não encontrado!")}catch(e){throw this._ignoreNextValue=!0,this.clearSearch(),console.warn("[EzSearchPlus] Erro ao obter descrição do registro.",e),"WarningException"===(null===(i=null==e?void 0:e.constructor)||void 0===i?void 0:i.name)&&(this.errorMessage=e.message),e}this.value=this.buildCurrentValue(),this.ezChange.emit(this.value),this.errorMessage=null}}canShowLoadSpinDescription(){return this.isLoadingDescription}async setFocus(e){var t;this.disableCodeInput?null===(t=this._textInputDescriptionValue)||void 0===t||t.setFocus(e):this._latestFocusedInputElement?this._latestFocusedInputElement.setFocus(e):this._textInputCodeValue.setFocus(e)}async getValueAsync(){if(!this.isLoadingDescription){const e=this.buildCurrentValue();return new Promise((t=>t(e)))}return new Promise((e=>{let t=setInterval((()=>{if(!this.isLoadingDescription){clearInterval(t);const i=this.buildCurrentValue();e(i)}}),this.INTERVAL_TO_RETRY_ASYNC_VALUE)}))}async clearValue(){this.clearSearch()}async setBlur(){var e,t;null===(e=this._textInputCodeValue)||void 0===e||e.setBlur(),null===(t=this._textInputDescriptionValue)||void 0===t||t.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async componentWillLoad(){this.i18n=await h(),this.value&&a.isEmpty(this.codeValue)&&await this.observeValue(this.value,void 0)}componentDidLoad(){n.applyVarsTextInput(this.el,this._textInputCodeValue),n.applyVarsTextInput(this.el,this._textInputDescriptionValue)}connectedCallback(){this.initKeyboardManager(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})}))}clearSearch(){this.value=null,this.codeValue=null,this.descriptionValue=null,this.hideDescriptionInput||(this._textInputDescriptionValue.value=null)}getCodLabel(){var e;return this.hideDescriptionInput?this.label:null!==(e=this.codLabel)&&void 0!==e?e:this.i18n("ez-search-plus.defaultCodeLabel")}async normalizeCodeToDescriptionValue(e){if(!e)return"";if("string"==typeof e)try{if((null==(e=JSON.parse(e))?void 0:e.value)&&!(null==e?void 0:e.label))return await this.loadDescriptionValueByCode(null==e?void 0:e.value)}catch(t){return await this.loadDescriptionValueByCode(e)}return"object"!=typeof e?await this.loadDescriptionValueByCode(e):null==e?void 0:e.label}normalizeValueToCodeValue(e){if(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(t){return e}return"object"!=typeof e?"number"==typeof e?String(e):e:null==e?void 0:e.value}}async loadDescriptionValueByCode(e){if(!this.optionLoader)return console.warn(this.i18n("ez-search-plus.optionLoaderNotDefined")),"";try{this.isLoadingDescription=!0;const t={mode:c.LOAD_DESCRIPTION,argument:e},i=await this.optionLoader(t);return i?Array.isArray(i)?i[0].label:i.label:""}finally{this.isLoadingDescription=!1}}handleCodeInputFocusOut(){this.cancelSelection(),this.codeValue!=this._textInputCodeValue.value&&(this.value=this._textInputCodeValue.value)}handleSearchClick(){this.loadAdvancedSearch()}async loadAdvancedSearch(){if(!this.optionLoader)return void console.warn(this.i18n("ez-search-plus.optionLoaderNotDefined"));const e={mode:c.ADVANCED,argument:""};let t;try{t=await this.optionLoader(e,this.contextProperties)}catch(e){}t&&(this.value=t)}buildCurrentValue(){if(!a.isEmpty(this.codeValue))return{value:this.codeValue,label:this.descriptionValue}}async handleTextInputChangeHandler(e){this.searchDescriptionIsOpen||this._popover.showUnder(this.el);const t=e.target.value;await this.debounceLoaderOptions(t)}async debounceLoaderOptions(e){return this._debounceSearch&&clearTimeout(this._debounceSearch),new Promise((t=>{this._debounceSearch=setTimeout((async()=>{await this.processOptionsLoader(e),t()}),this.SEARCH_DESCRIPTION_TIMEOUT)}))}updateKeyOption(e){return Object.assign(Object.assign({},e),{presentationValue:e.value,presentationLabel:e.label})}parseSearchOptions(e=[]){if(Array.isArray(e)){const t=e[0];return t?"label"in t||"value"in t?e.map((e=>this.updateKeyOption(e))):e:[]}return("label"in e||"value"in e)&&this.updateKeyOption(e),[e]}async processOptionsLoader(e){try{this.showLoading=!0;const t={mode:c.PREDICTIVE,argument:e},i=await this.optionLoader(t);this.visibleOptions=this.parseSearchOptions(i)}finally{this.showLoading=!1}}handleSelectItem(e){this.value=e.detail,this._popover.hide(),window.requestAnimationFrame((()=>{var e;null===(e=this._textInputDescriptionValue)||void 0===e||e.setFocus({selectText:!0})}))}async handleArrowUp(){this.isOptionsVisible()&&await this._searchList.previousOption()}async handleArrowDown(){this.isOptionsVisible()&&await this._searchList.nextOption()}async selectCurrentItem(){var e;await(null===(e=this._searchList)||void 0===e?void 0:e.selectCurrentItem())}async cancelSelection(){var e,t,i;const r="object"==typeof this.value?null===(e=this.value)||void 0===e?void 0:e.label:"";this._textInputDescriptionValue&&r&&this._textInputDescriptionValue.value!=r&&(this._textInputDescriptionValue.value=r),await(null===(t=this._searchList)||void 0===t?void 0:t.cancelSelection()),null===(i=this._popover)||void 0===i||i.hide()}async handleInputTab(){await this.cancelSelection()}async handleInputEsc(){var e;await this.cancelSelection(),await(null===(e=this._latestFocusedInputElement)||void 0===e?void 0:e.setFocus({selectText:!0}))}async initKeyboardManager(){this._keyboardManager=new o;const e={element:this.el,propagate:!0};this._keyboardManager.bind("ArrowUp",(()=>this.handleArrowUp()),Object.assign(Object.assign({},e),{propagate:!1})).bind("ArrowDown",(()=>this.handleArrowDown()),Object.assign(Object.assign({},e),{propagate:!1})).bind("Enter",(()=>this.selectCurrentItem()),Object.assign(Object.assign({},e),{propagate:!this.stopPropagateEnterKeyEvent})).bind("Tab",(()=>this.handleInputTab()),e).bind("Escape",(()=>this.handleInputEsc()),e)}disconnectedCallback(){this._keyboardManager.unbind("ArrowUp").unbind("ArrowDown").unbind("Enter").unbind("Tab").unbind("Escape")}isOptionsVisible(){return this._popover.opened}setLatestFocusedInputElement(e){this._latestFocusedInputElement=e}handleCodeInputFocus(){this.setLatestFocusedInputElement(this._textInputCodeValue)}handleDescriptionInputFocus(){this.setLatestFocusedInputElement(this._textInputDescriptionValue)}getRightIconElement(){var e,t;return this.ensureClearButtonVisible||this.value||(null===(e=this._textInputCodeValue)||void 0===e?void 0:e.value)||(null===(t=this._textInputDescriptionValue)||void 0===t?void 0:t.value)?i("button",{class:"btn btn__close",slot:"rightIcon",disabled:!this.enabled,tabindex:-1,onClick:()=>this.clearSearch()},i("ez-icon",{iconName:"close"})):null}getLeftIconElement(){return i("button",{class:"btn",slot:"leftIcon",disabled:!this.enabled,tabindex:-1,onClick:()=>this.handleSearchClick()},this.canShowLoadSpinDescription()?i("div",{class:"message__loading"}):i("ez-icon",{iconName:"search"}))}handleOnEzVisibilityChange(e){e.stopPropagation(),this.searchDescriptionIsOpen=e.detail}render(){return l.addIDInfoIfNotExists(this.el,"input"),i(r,null,i("div",{class:"ez-search-plus__container"},i("ez-text-input",{ref:e=>this._textInputCodeValue=e,class:{"ez-search-plus__code-input":!this.hideDescriptionInput,"ez-search-plus__code-input-no-border":!this.hideDescriptionInput,"ez-search-plus__code-input-full":this.hideDescriptionInput},"data-element-id":l.getInternalIDInfo("codeInput"),"data-slave-mode":"true",enabled:!this.disableCodeInput&&this.enabled,mode:this.mode,label:this.getCodLabel(),canShowError:this.canShowError,hasInvalid:!a.isEmpty(this.errorMessage),errorMessage:this.hideDescriptionInput?this.errorMessage:"",value:this.codeValue,onFocusout:()=>this.handleCodeInputFocusOut(),onFocus:()=>this.handleCodeInputFocus()},this.getLeftIconElement()),!this.hideDescriptionInput&&i("div",{class:"description-input-container"},i("ez-text-input",{ref:e=>this._textInputDescriptionValue=e,tabIndex:-1,class:"ez-search-plus__text-input","data-element-id":l.getInternalIDInfo("textInput"),"data-slave-mode":"true",enabled:!this.disableDescriptionInput&&this.enabled,label:this.label,canShowError:this.canShowError,errorMessage:this.errorMessage,mode:this.mode,value:this.descriptionValue,onInput:e=>this.handleTextInputChangeHandler(e),onFocus:()=>this.handleDescriptionInputFocus()},this.getRightIconElement()),i("ez-popover-plus",{ref:e=>this._popover=e,anchorElement:this.el,autoClose:!0,boxWidth:"fit-content",overlayType:"none",useAnchorSize:!0,onEzVisibilityChange:e=>this.handleOnEzVisibilityChange(e),"data-element-id":this.el.getAttribute("data-element-id")},i("ez-search-result-list",{ref:e=>this._searchList=e,showLoading:this.showLoading,visibleOptions:this.visibleOptions,value:this.value,showOptionValue:this.showOptionValue,onChangeValue:e=>this.handleSelectItem(e)})))))}get el(){return s(this)}static get watchers(){return{value:["observeValue"]}}};d.style=":host{--ez-search--height:42px;--ez-search--width:100%;--ez-search__icon--width:48px;--ez-search--border-radius:var(--border--radius-medium, 12px);--ez-search--border-radius-small:var(--border--radius-small, 6px);--ez-search--font-size:var(--text--medium, 14px);--ez-search--font-family:var(--font-pattern, Arial);--ez-search--font-weight--large:var(--text-weight--large, 500);--ez-search--font-weight--medium:var(--text-weight--medium, 400);--ez-search--background-color--xlight:var(--background--xlight, #fff);--ez-search--background-medium:var(--background--medium, #f0f3f7);--ez-search--line-height:calc(var(--text--medium, 14px) + 4px);--ez-search__input--background-color:var(--background--medium, #e0e0e0);--ez-search__input--border:var(--border--medium, 2px solid);--ez-search__input--border-color:var(--ez-search__input--background-color);--ez-search__input--focus--border-color:var(--color--primary, #008561);--ez-search__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-search__input--disabled--color:var(--text--disable, #AFB6C0);--ez-search__input--error--border-color:#CC2936;--ez-search__btn--color:var(--title--primary, #2B3A54);--ez-search__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-search__btn-hover--color:var(--color--primary, #4e4e4e);--ez-search__label--color:var(--title--primary, #2B3A54);--ez-search__list-title--primary:var(--title--primary, #2B3A54);--ez-search__list-text--primary:var(--text--primary, #626e82);--ez-search__list-height:calc(var(--ez-search--font-size) + var(--ez-search--space--medium) + 4px);--ez-search__list-min-width:64px;--ez-search--space--medium:var(--space--medium, 12px);--ez-search--space--small:var(--space--small, 6px);--ez-search__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-search__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-search__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-search__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-search__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-search__scrollbar--width:var(--space--medium, 12px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-search--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #2B3A54)}.list-container{min-width:var(--ez-search__list-min-width);overflow:auto;position:relative;width:100%}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:0;z-index:var(--more-visible, 2);max-height:350px;min-width:150px;background-color:var(--ez-search--background-color--xlight);border-radius:var(--ez-search--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000)}.list-options{margin-top:0px;box-sizing:border-box;width:100%;height:100%;padding:0;display:flex;flex-direction:column;scroll-behavior:smooth;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:var(--ez-search__scrollbar--color-clicked) var(--ez-search__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--scrollbar--background);width:var(--space--small);max-width:var(--space--small);min-width:var(--space--small);height:var(--space--small);max-height:var(--space--small);min-height:var(--space--small)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-search__scrollbar--color-background);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-search__scrollbar--color-default);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-search__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-search__scrollbar--color-clicked)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-search--border-radius-small);gap:var(--space--small, 6px)}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size);line-height:var(--ez-search--line-height)}.item__label{font-weight:var(--ez-search--font-weight--medium)}.item__label--bold{font-weight:var(--ez-search--font-weight--large)}.item__value{text-align:center;color:var(--ez-search__list-text--primary);font-weight:var(--ez-search--font-weight--large)}.item__value--hidden{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}.item__label{text-align:left}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;min-height:var(--ez-search__list-height)}.message__no-result{color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size)}.message__loading{border-radius:50%;width:14px;height:14px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;border:3px solid var(--ez-search__list-title--primary);border-top:3px solid transparent}.item__list>li:hover{background-color:var(--ez-search--background-medium)}.preselected{background-color:var(--background--medium)}.btn{outline:none;border:none;background:none;cursor:pointer;color:var(--ez-search__btn--color)}.btn:disabled{cursor:not-allowed;color:var(--ez-search__btn-disabled--color)}.btn:disabled:hover{cursor:not-allowed;color:var(--ez-search__btn-disabled--color)}.btn:hover{color:var(--ez-search__btn-hover--color)}.btn__close{visibility:hidden}ez-text-input:hover .btn__close,ez-text-input:focus .btn__close{visibility:visible}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@supports not (scrollbar-width: thin){.item{padding-right:8px}}.ez-search-plus__container{display:flex;flex-grow:1;gap:3px}.ez-search-plus__text-input{--ez-text-input--border-top-left-radius:0px;--ez-text-input--border-bottom-left-radius:0px;outline:none}.ez-search-plus__code-input-no-border{--ez-text-input--border-top-right-radius:0px;--ez-text-input--border-bottom-right-radius:0px}.ez-search-plus__code-input{max-width:85px}.ez-search-plus__code-input-full{width:100%}.description-input-container{width:100%;outline:none}";export{d as ez_search_plus}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,c as t,h as s,H as e,g as h}from"./p-e4c7eb39.js";import{C as a}from"./p-ec7db713.js";import{ObjectUtils as r,StringUtils as o,ElementIDUtils as l}from"@sankhyalabs/core";import{A as n}from"./p-9825c1d2.js";import"./p-ab574d59.js";import"./p-b853763b.js";import{i as c}from"./p-c178730b.js";import{S as d}from"./p-5895e687.js";import"./p-47e4a8ce.js";import{r as u,a as v}from"./p-88a115b3.js";const p=class{constructor(s){i(this,s),this.ezChange=t(this,"ezChange",7),this._changeDeboucingTimeout=null,this._limitCharsToSearch=3,this._deboucingTime=300,this._maxWidthValue=0,this._tabPressed=!1,this._startHighlightTag="<span class='card-item__highlight'>",this._endHighlightTag="</span>",this._preSelection=void 0,this._visibleOptions=void 0,this._startLoading=!1,this._showLoading=!0,this._criteria=void 0,this.value=void 0,this.label=void 0,this.enabled=!0,this.errorMessage=void 0,this.size="default",this.optionLoader=void 0,this.contextProperties=void 0,this.showSelectedValue=!0,this.showOptionValue=!0,this.suppressEmptyOption=!1,this.stopPropagateEnterKeyEvent=!1,this.mode="regular",this.classic=!1,this.required=!1,this.canShowError=!0,this.hideErrorOnFocusOut=!0,this.listOptionsPosition=void 0,this.isTextSearch=!1,this.ignoreLimitCharsToSearch=!1,this.options=void 0,this.suppressSearch=!1,this.ensureClearButtonVisible=!1,this.suppressPreLoad=!0,this.autoFocus=!1,this.alternativePlaceholder=void 0,this.showMore=void 0,this.suppressInputPersist=!1,this.hideDescriptionInput=!1}observeErrorMessage(){var i;this._textInput&&(this._textInput.errorMessage=this.errorMessage,!(null===(i=this.errorMessage)||void 0===i?void 0:i.trim())&&this.errorMessage&&this.setInputValue())}getValue(i){return"object"==typeof i?null==i?void 0:i.value:i}validateNewValue(i,t){const s=this.getValue(i),e=this.getValue(t);return!("[object Object]"===s||s===e)}async observeValue(i,t){if(this._textInput&&this.validateNewValue(i,t)){if("string"==typeof i)return void await this.handleValueAsString(i);const t=this.getSelectedOption(i),s=this.getSelectedOption(this._currentValue);this.isDifferentValues(s,t)&&(this._currentValue=t,this.setInputValue(),this.ezChange.emit(null!=t?t:void 0)),this.resetOptions()}}observeOptions(i,t){!i.length&&this.suppressPreLoad||(null==i?void 0:i.join(""))!==(null==t?void 0:t.join(""))&&this.loadOptions(d.PRELOAD)}async getValueAsync(){return new Promise(this._showLoading?i=>{let t=setInterval((()=>{this._showLoading||(clearInterval(t),i(this.value))}),100)}:i=>i(this.value))}async setFocus(i){this._textInput&&this._textInput.setFocus(i)}async setBlur(){this._textInput&&this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async clearValue(){this.clearSearch()}async handleValueAsString(i){this.getSelectedOption(i)?this.setInputValue():(await this.loadDescriptionValue(i),this._currentValue&&(this.setInputValue(),this.ezChange.emit(this.value),this._currentValue=this.value))}isDifferentValues(i,t){return r.objectToString(i||{})!==r.objectToString(t||{})}getFormattedText(i){if(null==i)return;let t=this.showSelectedValue&&null!=i.value?i.label?`${i.value} - ${i.label}`:i.value:i.label;return t=null==t?void 0:t.replace(new RegExp(this._startHighlightTag,"g"),"").replace(new RegExp(this._endHighlightTag,"g"),""),t}getText(){const i=this.getSelectedOption(this._currentValue),t=this.getFormattedText(i);return u(t)}getSelectedOption(i){return"string"==typeof i||i instanceof String?this._visibleOptions.find((t=>t.value===i)):i?Object.assign(Object.assign({},i),{value:v(null==i?void 0:i.value),label:v(null==i?void 0:i.label)}):i}updateVisibleOptions(){let i=this._source||[];this._visibleOptions=this.suppressEmptyOption?i:[{value:void 0,label:""}].concat(i),this._maxWidthValue=this.getMaxWidthValue()}getMaxWidthValue(){var i;const t=[];return null===(i=this._visibleOptions)||void 0===i||i.forEach((i=>{const s=this.getWidthValue(i.value);t.includes(s)||t.push(s)})),t.length>1?Math.max(...t):0}getWidthValue(i){if(null!=this._itemValueBasis){const t=this._itemValueBasis;if(null!=i)return t.innerHTML=i,t.clientWidth>0?t.clientWidth+2:0;t.innerHTML=""}return 0}showOptions(){this.enabled&&(this.isOptionsVisible()||this._ezPopOverPlusElement.showUnder(this._textInput))}hideOptions(){this._ezPopOverPlusElement.hide()}isOptionsVisible(){return this._ezPopOverPlusElement.opened}selectCurrentOption(i=!0){void 0!==this._preSelection?(this.selectOption(this._visibleOptions[this._preSelection],i),this._preSelection=void 0):this.controlListWithOnlyOne()}updateSource(i){this._startLoading=!1,i instanceof Promise?(this._showLoading=!0,i.then((i=>{this.updateSource(i)})).finally((()=>{this._showLoading=!1})),this.updateVisibleOptions()):(this._showLoading=!1,Array.isArray(i)?(this._source=i,this.updateVisibleOptions(),this._tabPressed&&(this._tabPressed=!1,this.controlEmptySearch(!1))):this.selectOption(i))}clearSource(){this._source=[],this.updateVisibleOptions()}selectOption(i,t=!0){var s,e;const h=this.getSelectedOption(this.value),a=Object.assign(Object.assign({},i),{value:v(null==i?void 0:i.value),label:v(null==i?void 0:i.label)}),r=Object.assign(Object.assign({},a),{value:u(null==a?void 0:a.value),label:u(null==a?void 0:a.label)});if((null===(s=null==h?void 0:h.value)||void 0===s?void 0:s.toString())!==(null===(e=null==r?void 0:r.value)||void 0===e?void 0:e.toString())||null==h&&null!=r&&"value"in r){const i=(null==r?void 0:r.value)?r:void 0;this.value=i,this._currentValue=i}else this.setInputValue(),this.resetOptions();this._visibleOptions=[],this.clearSource(),t&&setTimeout((()=>{this.setFocus()}),0)}loadOptions(i,t=""){this._criteria=t,this._startLoading=!0,this.updateSource(this.optionLoader?this.optionLoader({mode:i,argument:t},this.contextProperties):this.options)}cancelPreselection(){!this._textInput.value&&this._currentValue&&this._source.length>0?this.selectOption(void 0):window.setTimeout((()=>{this.setInputValue()}),this._deboucingTime),this.resetOptions()}setInputValue(i=!0){if(this.suppressInputPersist)return void this.clearSearch();const t=this.getText();(this._textInput.value||"")!==t&&(this._textInput.value=t,i&&(this.errorMessage=null))}clearSearch(){this.value=null,this._currentValue=null,this._textInput.value=""}controlListWithOnlyOne(i=!0){var t,s;const e=null===(t=this._visibleOptions)||void 0===t?void 0:t.filter((i=>""!==i.label&&null!=i.value));if((null==e?void 0:e.length)>0){const t=new RegExp(this._startHighlightTag,"g"),h=new RegExp(this._endHighlightTag,"g");let a=o.decodeHtmlEntities(e[0].label);const r={value:null===(s=e[0].value)||void 0===s?void 0:s.replace(t,"").replace(h,""),label:null==a?void 0:a.replace(t,"").replace(h,"")};this.selectOption(r,i)}}controlEmptySearch(i=!0){var t;(null===(t=this._visibleOptions)||void 0===t?void 0:t.length)?this.controlListWithOnlyOne(i):(this.clearSearch(),n.info(this.i18n("ez-classic-search.emptyList")))}async loadDescriptionValue(i){var t,s,e;if(null==i)return;if((null===(t=this.options)||void 0===t?void 0:t.length)>0)return void this.loadOptionValue(i);const h={mode:this.hideDescriptionInput?d.LOAD_DESCRIPTION:d.PREDICTIVE,argument:i};try{const i=await(null===(s=this.optionLoader)||void 0===s?void 0:s.call(this,h,this.contextProperties));if(null==i)return;i instanceof Promise?i.then((i=>{this.setDescriptionValue(i)})):this.setDescriptionValue(i)}catch(i){throw"WarningException"===(null===(e=null==i?void 0:i.constructor)||void 0===e?void 0:e.name)&&(this.errorMessage=i.message),i}}setDescriptionValue(i){const t=(null==i?void 0:i[0])||i;null!=t&&Object.keys(t).length?(this._currentValue=t?Object.assign(Object.assign({},t),{value:v(t.value),label:v(t.label)}):t,this.value=this._currentValue,this.setTextInputValue()):this.showNoResultMessage()}setTextInputValue(){if(this._textInput&&null==this._textInput.value){if(null==this.value)return;const i="string"==typeof this.value?this.value:this.getFormattedText(this.value);this._textInput.value=u(i)}}loadOptionValue(i){var t;const s=null===(t=this.options)||void 0===t?void 0:t.find((t=>t.value===i));null!=s?this.selectOption(s):this.showNoResultMessage()}async showNoResultMessage(){this.clearSearch(),n.info(this.i18n("ez-classic-search.emptySearch",{field:this.getFieldLabel()}))}getFieldLabel(){var i;return null===(i=this.label)||void 0===i?void 0:i.replace(this.i18n("app.requiredInfo"),"").toUpperCase()}resetOptions(){this.showMore?this.handleResetOptionsWithShowMoreVisible():(this.hideOptions(),this._criteria=void 0,this._preSelection=void 0,this.updateVisibleOptions())}handleResetOptionsWithShowMoreVisible(){setTimeout((()=>{this.hideOptions(),this._criteria=void 0,this._preSelection=void 0,this.updateVisibleOptions()}),100)}async handleInitialValue(){if(!this.getValue(this.value))return;if("string"==typeof this.value)return void await this.handleValueAsString(this.value);let i=this.getFormattedText(this.value);i=u(i),this._textInput.value=i}async componentWillLoad(){if(this.i18n=await c(),void 0===this.options){this.options=[];const i=this.el.querySelectorAll("option");i&&i.forEach((i=>{let t=i.innerText,s=i.getAttribute("value"),e=i.getAttribute("details");s||(s=t),this.options.push({label:t,value:s,details:e}),i.hidden=!0}))}this.updateSource([])}componentDidRender(){var i;null===(i=this._optionsList)||void 0===i||i.querySelectorAll(".item").forEach((i=>{l.addIDInfoIfNotExists(i,"itemSearch")}))}async componentDidLoad(){this._currentValue=this.value,a.applyVarsTextInput(this.el,this._textInput),this._resizeObserver=new ResizeObserver((i=>{window.requestAnimationFrame((()=>{Array.isArray(i)}))})),this._intersectionObserver=new IntersectionObserver((i=>{i.forEach((i=>{!i.isIntersecting&&this._ezPopOverPlusElement&&this._ezPopOverPlusElement.hide()}))}),{threshold:.1}),this._textInput&&this._intersectionObserver.observe(this._textInput),await this.handleInitialValue(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})}))}disconnectedCallback(){var i,t;null===(i=this._resizeObserver)||void 0===i||i.disconnect(),null===(t=this._intersectionObserver)||void 0===t||t.disconnect()}handleClassicIconClick(i){const{icon:t}=i.detail;"left"!==t?this.clearSearch():this.loadOptions(d.ADVANCED)}buildNumberArgument(i){return this.isTextSearch?NaN:Number(i||void 0)}onTextInputChangeHandler(i){var t;if(this.clearDeboucingTimeout(),this._startLoading)return void(this._changeDeboucingTimeout=window.setTimeout((()=>{this.onTextInputChangeHandler(i)}),this._deboucingTime));const s=null===(t=i.target.value)||void 0===t?void 0:t.trim(),e=this.buildNumberArgument(s);this._criteria||(this._textInput.value=i.data||s),this._criteria=s,s?(this._showLoading=!1,this.clearSource(),this.ignoreLimitCharsToSearch||!isNaN(e)||s.length>=this._limitCharsToSearch?(this._showLoading=!0,this._changeDeboucingTimeout=window.setTimeout((()=>{this.loadOptions(d.PREDICTIVE,isNaN(e)?s:e.toString())}),this._deboucingTime),this.showOptions()):this.hideOptions()):(this.hideOptions(),this._showLoading=!1,this.clearSource())}clearDeboucingTimeout(){this._changeDeboucingTimeout&&(window.clearTimeout(this._changeDeboucingTimeout),this._changeDeboucingTimeout=null)}async keyDownHandler(i){switch(this._tabPressed=!1,i.ctrlKey&&("f"!==i.key&&"F"!==i.key||(this.loadOptions(d.ADVANCED),i.stopPropagation(),i.stopImmediatePropagation(),i.preventDefault())),i.key){case"ArrowDown":i.stopPropagation(),this.canShowListOptions()&&i.preventDefault(),this.isOptionsVisible()||this.showOptions(),await this._classicSearchList.nextOption();break;case"ArrowUp":i.stopPropagation(),this.canShowListOptions()&&i.preventDefault(),await this._classicSearchList.previousOption();break;case"Enter":this.handleEventPropagation(i),this.selectCurrentOption();break;case"Escape":this.cancelPreselection();break;case"Tab":this._tabPressed=!0,this.selectCurrentOption(!1)}}handleEventPropagation(i){this._ezPopOverPlusElement.opened&&this.stopPropagateEnterKeyEvent&&i.stopPropagation()}onTextInputFocusOutHandler(){this.hideErrorOnFocusOut&&this.cancelPreselection()}canShowListOptions(){return!this._showLoading&&this._visibleOptions.length>0}onChangePreSelection(i){this._preSelection=i}async handleClickShowMore(){var i,t;if(!this.optionLoader)return;const s=null!==(t=null===(i=this._textInput)||void 0===i?void 0:i.value)&&void 0!==t?t:"",e={mode:d.ADVANCED,argument:s},h=await this.optionLoader(e,this.contextProperties);h&&!Array.isArray(h)&&this.selectOption(h)}renderShowMore(){if(this.showMore&&!this._showLoading)return s("div",{style:{display:"flex",justifyContent:"center"},"data-element-id":l.getInternalIDInfo("showMore")},s("ez-button",{onClick:async()=>await this.handleClickShowMore(),variant:"tertiary",style:{width:"100%",justifyContent:"center"},label:this.i18n("ez-classic-search.showMore")}))}render(){var i;l.addIDInfoIfNotExists(this.el,"input");const t=!(!(null===(i=this._textInput)||void 0===i?void 0:i.value)||!this._criteria&&!this.value)||this.ensureClearButtonVisible;return s(e,null,s("ez-classic-input",{"data-element-id":l.getInternalIDInfo("textInput"),class:this.suppressSearch?"suppressed-search-input":"",ref:i=>this._textInput=i,"data-slave-mode":"true",enabled:this.enabled&&!this.suppressSearch,onInput:i=>this.onTextInputChangeHandler(i),onFocusout:()=>this.onTextInputFocusOutHandler(),onKeyDown:i=>this.keyDownHandler(i),label:this.label,helpText:this.canShowError?this.errorMessage:void 0,state:this.errorMessage&&this.canShowError?"error":"default",size:this.size,placeholder:this.alternativePlaceholder,leftIconName:"search",leftIconClickable:!0,rightIconName:t?"close":null,rightIconClickable:!0,required:this.required,onIconClick:i=>this.handleClassicIconClick(i),onEzChange:i=>i.stopPropagation()}),s("ez-popover-plus",{ref:i=>this._ezPopOverPlusElement=i,autoClose:!1,overlayType:"none",useAnchorSize:!0,anchorElement:[this._textInput,this.el],"data-element-id":this.el.getAttribute("data-element-id"),onEzVisibilityChange:i=>i.stopPropagation()},s("div",null,s("classic-search-list",{ref:i=>this._classicSearchList=i,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:i})=>this.selectOption(i),onChangePreSelection:({detail:i})=>this.onChangePreSelection(i)}),this.renderShowMore())))}get el(){return h(this)}static get watchers(){return{errorMessage:["observeErrorMessage"],value:["observeValue"],options:["observeOptions"]}}};p.style=":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}";export{p as ez_classic_search}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,f as e,h as i,H as o,g as s}from"./p-
|
|
1
|
+
import{r as t,f as e,h as i,H as o,g as s}from"./p-e4c7eb39.js";import{ElementIDUtils as a}from"@sankhyalabs/core";const n=class{constructor(e){t(this,e),this._nextMessages=[],this._currentMessageInfo={message:"",fadeTime:void 0,useIcon:void 0},this._toastOpenedClass="toast__container--opened",this._lastTimeOut=void 0,this._lang="pt",this.message=void 0,this.fadeTime=5e3,this.useIcon=!1,this.canClose=!0}async show(t,i,o,s){const a=void 0!==s?s:this.canClose;return new Promise((s=>{var n;if(null===(n=this.container)||void 0===n?void 0:n.classList.contains(this._toastOpenedClass)){if(this.isRepeatedMessage(t))return;this._nextMessages.push({message:t,fadeTime:i,useIcon:o,canClose:a,callBack:s})}else this._currentMessageInfo.message=t||this.message,this._currentMessageInfo.fadeTime=i||this.fadeTime,this._currentMessageInfo.useIcon=o||this.useIcon,this._currentMessageInfo.callBack=s,a&&(this._currentMessageInfo.canClose=a),e(this),this.displayToast(),this._lastTimeOut=setTimeout((()=>{this.hideToast()}),this._currentMessageInfo.fadeTime+400)}))}hideToast(){this.makeToastInvisible(),this._nextMessages.length>0&&(this._currentMessageInfo.callBack&&this._currentMessageInfo.callBack(!0),setTimeout((()=>{let t=this._nextMessages.shift();this.show(t.message,t.fadeTime,t.useIcon)}))),this._currentMessageInfo.callBack&&this._currentMessageInfo.callBack(!0)}isRepeatedMessage(t){var e,i;return(null===(e=this._nextMessages)||void 0===e?void 0:e.some((e=>e.message===t)))||(null===(i=this._currentMessageInfo)||void 0===i?void 0:i.message)===t}makeToastInvisible(){this.container.classList.remove(this._toastOpenedClass),this.container.style.animation="none",this._lastTimeOut&&clearTimeout(this._lastTimeOut)}displayToast(){this.container.classList.add(this._toastOpenedClass),this.container.style.animation=`fadein 0.5s, fadeout 0.5s ${this.fadeTime/1e3}s`}buildDataElementId(){var t,e;const i=a.addIDInfo(this._element),o=a.DATA_ELEMENT_ID_ATTRIBUTE_NAME;null===(t=this._elemBtnClose)||void 0===t||t.setAttribute(o,`${i}_buttonClose`),null===(e=this._elemText)||void 0===e||e.setAttribute(o,`${i}_title`)}componentDidLoad(){this.buildDataElementId()}render(){return i(o,null,i("div",{ref:t=>this.container=t,class:"toast__container"},this._currentMessageInfo.useIcon&&i("slot",{name:"icon"}),i("div",{lang:this._lang,ref:t=>this._elemText=t,class:this._currentMessageInfo.useIcon?"message__container message__container--icon":"message__container",title:this._currentMessageInfo.message,innerHTML:this._currentMessageInfo.message}),this._currentMessageInfo.canClose&&i("button",{class:"btn-close",onClick:()=>{this.hideToast()},ref:t=>this._elemBtnClose=t})))}get _element(){return s(this)}};n.style=':host{--ez-toast__btn__close__image:url(\'data:image/svg+xml;utf8,<svg width="12" height="12" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg%22%3E<path d="M 7.0060773,5.995511 11.461972,1.5397722 c 0.132856,-0.1328413 0.207547,-0.3130253 0.207547,-0.5009046 0,-0.18786999 -0.07469,-0.3680541 -0.207547,-0.5009048 -0.132857,-0.13284126 -0.31302,-0.20748126 -0.500927,-0.20748126 -0.187812,0 -0.36807,0.07464 -0.500926,0.20748126 L 6.0042244,4.9937015 1.5482921,0.5379628 C 1.4154357,0.40512154 1.2352533,0.33048154 1.0473657,0.33048154 c -0.18787813,0 -0.36807,0.07464 -0.50092647,0.20748126 -0.13285646,0.1328507 -0.20749026,0.31303481 -0.20749026,0.5009048 0,0.1878793 0.0746338,0.3680633 0.20749026,0.5009046 L 5.0023715,5.995511 0.54643923,10.452213 c -0.0676086,0.06534 -0.12151598,0.14352 -0.15859681,0.229916 -0.0370714,0.08639 -0.0565645,0.1794 -0.0573369,0.27335 -7.724e-4,0.09404 0.0171873,0.187331 0.0528423,0.274293 0.0356455,0.08705 0.0882688,0.166087 0.15479148,0.23256 0.0665321,0.06648 0.14562277,0.11897 0.2326735,0.154567 0.0870507,0.0356 0.18031463,0.05344 0.2743433,0.05259 0.094029,-8.5e-4 0.1869528,-0.02049 0.2733331,-0.0576 0.08639,-0.0372 0.1645078,-0.09121 0.2298029,-0.158817 L 6.0042244,6.9973204 10.460119,11.453078 c 0.132856,0.132851 0.313114,0.207444 0.500926,0.207444 0.187907,0 0.36807,-0.07459 0.500927,-0.207444 0.132856,-0.13285 0.207547,-0.313006 0.207547,-0.500904 0,-0.187898 -0.07469,-0.368054 -0.207547,-0.500905 z"/></svg>\');--ez-toast__container--z-index:var(--elevation--100, 100);--ez-toast__container--background-color:var(--color--secondary, #383c45);--ez-toast__container--left:var(--space--large, 24px);--ez-toast__container--bottom:var(--space--large, 24px);--ez-toast__container--width:400px;--ez-toast__icon--padding-left:var(--space--small, 6px)}.toast__container{position:fixed;display:flex;box-sizing:border-box;border-radius:6px;align-items:center;padding:12px;visibility:hidden;width:var(--ez-toast__container--width);left:var(--ez-toast__container--left);bottom:var(--ez-toast__container--bottom);z-index:var(--ez-toast__container--z-index);background-color:var(--ez-toast__container--background-color)}.message__container{text-shadow:0 0 0 #353535, 0 0 1px transparent;color:#FFFFFF;font-size:14px;width:90%;overflow:hidden;hyphens:auto;height:auto;-webkit-box-orient:vertical;-webkit-line-clamp:4;display:-webkit-box;text-overflow:ellipsis;font-family:var(--font-pattern, "Roboto")}.message__container--icon{width:80%;padding-left:var(--ez-toast__icon--padding-left)}.btn-close{margin-top:3px;display:flex;justify-content:flex-end;align-self:flex-start;padding:0;outline:none;width:10%;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:\'\';display:flex;background-color:#FFFFFF;width:12px;height:12px;-webkit-mask-image:var(--ez-toast__btn__close__image);mask-image:var(--ez-toast__btn__close__image)}.toast__container--opened{animation:fadein 0.5s, fadeout 0.5s 3s;visibility:visible}@-webkit-keyframes fadein{from{opacity:0;left:calc(var(--ez-toast__container--left) * -1)}to{opacity:1;left:var(--ez-toast__container--left)}}@keyframes fadein{from{opacity:0;left:calc(var(--ez-toast__container--left) * -1)}to{opacity:1;left:var(--ez-toast__container--left)}}@-webkit-keyframes fadeout{from{opacity:1;left:var(--ez-toast__container--left)}to{bottom:0;opacity:0}}@keyframes fadeout{from{opacity:1;left:var(--ez-toast__container--left)}to{bottom:0;opacity:0}}';export{n as ez_toast}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as s,H as e,g as r}from"./p-e4c7eb39.js";import{ElementIDUtils as o,MaskFormatter as a}from"@sankhyalabs/core";class n{constructor(t){this.mask=t,this.maskChars={"#":t=>/\d/.test(t),U:t=>/[a-zA-Z]/.test(t),L:t=>/[a-zA-Z]/.test(t),A:t=>/[a-zA-Z0-9]/.test(t),"?":t=>/[a-zA-Z]/.test(t),"*":()=>!0}}format(t){if(!t||!this.mask)return t;const i=this.removeIncompatibleChars(t);let s="",e=0,r=0;for(;r<this.mask.length&&e<i.length;){const t=this.mask[r],o=i[e];if("'"!==t){if(this.maskChars[t]){if(!this.maskChars[t](o)){e++;continue}s+="U"===t?o.toUpperCase():"L"===t?o.toLowerCase():o,e++}else s+=t,o===t&&e++;r++}else r++,r<this.mask.length&&(s+=this.mask[r],r++)}return s}removeIncompatibleChars(t){let i="";for(let s=0;s<t.length;s++){const e=t[s];let r=!1;for(const t in this.maskChars)if(this.maskChars[t](e)){r=!0;break}if(!r)for(let t=0;t<this.mask.length;t++)if(this.mask[t]===e&&!this.maskChars[this.mask[t]]){r=!0;break}r&&(i+=e)}return i}removeMask(t){if(!t||!this.mask)return t;let i="",s=0,e=0;for(;s<t.length&&e<this.mask.length;){const r=this.mask[e],o=t[s];"'"!==r?(this.maskChars[r]?(this.maskChars[r](o)&&(i+=o),s++):o===r&&s++,e++):(e++,e<this.mask.length&&(o===this.mask[e]&&s++,e++))}for(;s<t.length;){const e=t[s];/[a-zA-Z0-9]/.test(e)&&(i+=e),s++}return i}getMask(){return this.mask}generatePlaceholder(){if(!this.mask)return"";let t="",i=0;for(;i<this.mask.length;){const s=this.mask[i];if("'"!==s){if(this.maskChars[s])switch(s){case"#":case"~":t+="0";break;case"U":case"L":case"?":case"A":t+="A";break;default:t+="_"}else t+=s;i++}else i++,i<this.mask.length&&(t+=this.mask[i],i++)}return t}}const c=class{constructor(s){t(this,s),this.ezChange=i(this,"ezChange",7),this.ezBlur=i(this,"ezBlur",7),this.ezFocus=i(this,"ezFocus",7),this.iconClick=i(this,"iconClick",7),this._internalValueChange=!1,this.type="text",this.value=void 0,this.label=void 0,this.helpText=void 0,this.errorMessage=void 0,this.placeholder=void 0,this.enabled=!0,this.readonly=!1,this.required=!1,this.name=void 0,this.size="default",this.minlength=void 0,this.maxlength=void 0,this.leftIconName=void 0,this.rightIconName=void 0,this.rightIconTooltip=void 0,this.leftIconTooltip=void 0,this.state="default",this.leftIconClickable=!1,this.rightIconClickable=!1,this.mask=void 0,this.emitMaskedValue=!1}async setFocus(t){(null==t?void 0:t.selectText)&&this._inputElem.select(),(null==t?void 0:t.preventScroll)||this._inputElem.scrollIntoView({behavior:"smooth",block:"center"}),this._inputElem.focus({preventScroll:!0})}async setBlur(){this._inputElem.blur()}async syncValue(){if(this._internalValueChange)this._internalValueChange=!1;else if(this.value&&this._maskFormatter&&this._inputElem){const t=this._maskFormatter.format(this.value);this._inputElem.value=t}else this._inputElem&&(this._inputElem.value=this.value||"")}async observeErrorMessage(t){this.state=t&&""!==t.trim()?"error":"default"}onInput(t){try{const i=t.target,s=i.value;if(this._maskFormatter){const{formattedValue:t,cleanValue:e}=this.processInputWithMask(s);this.updateInputValue(i,t,e)}else this.updateInputValueWithoutMask(s)}catch(t){console.error("Error processing input event:",t)}}processInputWithMask(t){return"cgc_cpf"===this.mask?this.processCgcCpfMask(t):this.processRegularMask(t)}processCgcCpfMask(t){const i=t.replace(/\D/g,"");return 11===i.length||14===i.length?(this._maskFormatter=new n(11===i.length?a.DEFAULT_MASKS.cpf:a.DEFAULT_MASKS.cnpj),{formattedValue:this._maskFormatter.format(i),cleanValue:i}):{formattedValue:i,cleanValue:i}}processRegularMask(t){const i=this._maskFormatter.format(t);return{formattedValue:i,cleanValue:this._maskFormatter.removeMask(i)}}updateInputValue(t,i,s){t.value=i,this._internalValueChange=!0,this.value=s,this.ezChange.emit(this.emitMaskedValue?i:s)}updateInputValueWithoutMask(t){this._internalValueChange=!0,this.value=t,this.ezChange.emit(t)}onBlur(){this.ezBlur.emit(this.value)}onFocus(){this.ezFocus.emit(this.value)}handleIconClick(t,i){this.enabled&&("left"===i&&!this.leftIconClickable||"right"===i&&!this.rightIconClickable?this.setFocus({preventScroll:!0}):(t.stopPropagation(),this.iconClick.emit({icon:i})))}addInfoId(){this._element&&o.addIDInfo(this._element),this._inputElem&&o.addIDInfo(this._inputElem,"classic-input",{id:"embedded"})}buildPlaceholder(){!this.placeholder&&this._maskFormatter&&(this.placeholder=this._maskFormatter.generatePlaceholder())}buildMaskFormatter(){if(this.mask&&(!this._maskFormatter||"cgc_cpf"===this.mask)){const t=this.getMaskToBuilder();this._maskFormatter=t?new n(t):void 0}}getMaskToBuilder(){return"cgc_cpf"===this.mask?this.getCGCCpfMask():"phone"===this.mask?this.getPhoneMask():this.mask in a.DEFAULT_MASKS?a.DEFAULT_MASKS[this.mask]:this.mask}getPhoneMask(){return this.value&&10===this.value.length?n.DEFAULT_MASKS?n.DEFAULT_MASKS.phone:void 0:this.value&&11===this.value.length&&n.DEFAULT_MASKS?n.DEFAULT_MASKS.phone_mobile:void 0}getCGCCpfMask(){var t,i;return 11===(null===(t=this.value)||void 0===t?void 0:t.length)?a.DEFAULT_MASKS.cpf:14===(null===(i=this.value)||void 0===i?void 0:i.length)?a.DEFAULT_MASKS.cnpj:void 0}componentDidRender(){this.buildMaskFormatter(),this.buildPlaceholder(),this.syncValue()}componentDidLoad(){this.syncValue(),this.addInfoId()}render(){return s(e,null,s("label",{title:this.label,htmlFor:this.name},this.label,this.required&&s("span",{class:"required-indicator"},"*")),s("div",{class:"input-container "+(this.size?`input-container--${this.size}`:""),"data-state":this.state,"data-disabled":(!this.enabled).toString(),onClick:()=>this.setFocus({preventScroll:!0})},this.leftIconName&&s("ez-icon",{iconName:this.leftIconName,title:this.leftIconTooltip,onClick:t=>this.handleIconClick(t,"left"),class:{"icon-clickable":this.leftIconClickable}}),s("input",{ref:t=>this._inputElem=t,id:this.name,type:this.type,title:this.value,placeholder:this.placeholder,disabled:!this.enabled,readonly:this.readonly,name:this.name,minlength:this.minlength,maxlength:this.maxlength,onInput:t=>this.onInput(t),onBlur:this.onBlur.bind(this),onFocus:this.onFocus.bind(this)}),this.rightIconName&&s("ez-icon",{iconName:this.rightIconName,title:this.rightIconTooltip,onClick:t=>this.handleIconClick(t,"right"),class:{"icon-clickable":this.rightIconClickable}})),(this.helpText||this.errorMessage)&&s("span",{id:"input_helpText",title:this.errorMessage||this.helpText},this.errorMessage||this.helpText))}get _element(){return r(this)}static get watchers(){return{value:["syncValue"],errorMessage:["observeErrorMessage"]}}};c.style=':host{display:flex;flex-direction:column;align-items:flex-start;box-sizing:border-box;font-family:var(--font--pattern, Arial, sans-serif);font-size:var(--font-size--default, 14px);color:var(--color--ocean-green-1000, #00281D);border:none;padding:0;padding-inline:var(--space--2, 2px);width:100%;--ez-classic-input--label-color:var(--color--ocean-green-1000, #00281D);--ez-classic-input--border-color-default:var(--color--gray-200, #D2D2D3);--ez-classic-input--border-color-focus:var(--color--gray-300, #A4A5A7);--ez-classic-input--border-color-success:var(--color--green-600, #157A00);--ez-classic-input--border-color-error:var(--color--red-600, #BD0025);--ez-classic-input--border-color-warning:var(--color--yellow-600, #EFB103);--ez-classic-input--background-color:var(--color--gray-70, #FFFFFF);--ez-classic-input--background-color-disabled:var(--color--gray-90, #EAEAEA);--ez-classic-input--text-color:var(--color--ocean-green-1000, #00281D);--ez-classic-input--placeholder-color:#bdbdbd;--ez-classic-input--icon-color:var(--color--gray-400, #77777A);--ez-classic-input--helptext-color:var(--color--ocean-green-1000, #00281D);--ez-classic-input--height:var(--space--56, 56px);--ez-classic-input--height-small:var(--space--48, 48px);--ez-classic-input--height-xsmall:var(--space--40, 40px);--ez-classic-input--gap:var(--space--10, 10px);--ez-classic-input--padding-inline:var(--space--16, 16px)}.input-container{display:flex;flex-direction:row;align-items:center;width:100%;border:none;border-radius:var(--border--radius-8, 8px);padding-inline:var(--ez-classic-input--padding-inline);box-sizing:border-box;gap:var(--ez-classic-input--gap);margin-block:var(--space--4, 4px);transition:box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);height:var(--ez-classic-input--height);background-color:var(--ez-classic-input--background-color)}.input-container--small{height:var(--ez-classic-input--height-small)}.input-container--xsmall{height:var(--ez-classic-input--height-xsmall)}.input-container,.input-container[data-state="default"]{box-shadow:0 0 0 1px var(--ez-classic-input--border-color-default)}.input-container[data-state="success"]{box-shadow:0 0 0 var(--space--2, 2px) var(--ez-classic-input--border-color-success)}.input-container[data-state="error"]{box-shadow:0 0 0 var(--space--2, 2px) var(--ez-classic-input--border-color-error)}.input-container[data-state="warning"]{box-shadow:0 0 0 var(--space--2, 2px) var(--ez-classic-input--border-color-warning)}.input-container:focus-within{box-shadow:0 0 0 var(--space--2, 2px) var(--ez-classic-input--border-color-focus)}ez-icon{min-width:var(--space--24, 24px);color:var(--ez-classic-input--icon-color)}input{flex:1;border:none;outline:none;background:transparent;height:100%;width:100%;padding:0;font-family:var(--font--pattern, Arial, sans-serif);font-size:var(--font-size--default, 14px);color:var(--color--ocean-green-1000, #00281D);text-overflow:ellipsis;color:var(--ez-classic-input--text-color)}input::placeholder{color:var(--ez-classic-input--placeholder-color)}.input-container[data-disabled="true"]{cursor:not-allowed;background:var(--ez-classic-input--background-color-disabled);border-color:var(--ez-classic-input--border-color-default)}.input-container[data-disabled="true"]>*{cursor:not-allowed}.input-container input:read-only{cursor:default}@keyframes ez-helptext-fadein{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}span{font-size:var(--font-size--xsmall, 10px);line-height:var(--line-height--16, 16px);overflow:hidden;text-overflow:ellipsis;animation:ez-helptext-fadein 0.3s ease;color:var(--ez-classic-input--helptext-color)}label{display:block;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-classic-input--label-color)}.icon-clickable{cursor:pointer}.required-indicator{font-size:var(--font--size--default, 14px);font-family:var(--font--pattern, \'Roboto\');color:var(--color--red-600, #BD0025);margin-left:var(--space--4, 4px);vertical-align:top}';export{c as ez_classic_input}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function n(n){const t=new RegExp("<span class='card-item__highlight'>","g"),r=new RegExp("</span>","g");return g(String(null!=n?n:"").replace(t,"").replace(r,""))}function g(n){if(null!=n)return String(n).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')}export{n as a,g as r}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,c as t,h as s,H as o,g as e}from"./p-e4c7eb39.js";import{ElementIDUtils as h,KeyboardManager as a}from"@sankhyalabs/core";const c=class{constructor(s){i(this,s),this.ezChange=t(this,"ezChange",7),this.ezBlur=t(this,"ezBlur",7),this.iconClick=t(this,"iconClick",7),this.ezVisibilityChange=t(this,"ezVisibilityChange",7),this.ezType=t(this,"ezType",7),this._keyboardManager=void 0,this._boundHandleDocumentClick=this.handleDocumentClick.bind(this),this.popoverVisible=!1,this.hasSlotContent=!1,this.highlightedIndex=0,this.filteredOptions=[],this.inputValue="",this.value=null,this.label=void 0,this.placeholder=void 0,this.enabled=!0,this.required=!1,this.readonly=!1,this.name=void 0,this.state="default",this.size="default",this.helpText=void 0,this.iconName=void 0,this.titleIcon=void 0,this.iconClickable=!1,this.suppressSearch=!1,this.options=void 0,this.textEmptyOption=void 0,this.suppressEmptyOption=!1}async setFocus(i){var t;await(null===(t=this._inputElem)||void 0===t?void 0:t.setFocus(i))}async setBlur(){var i;await(null===(i=this._inputElem)||void 0===i?void 0:i.setBlur()),await this.hidePopover()}async showPopover(){var i,t,s;if(!this._popoverElem||!this._inputElem||this.popoverVisible)return;this.popoverVisible=!0;const o=null===(t=null===(i=this._inputElem)||void 0===i?void 0:i.shadowRoot)||void 0===t?void 0:t.querySelector(".input-container");await(null===(s=this._popoverElem)||void 0===s?void 0:s.showUnder(null!=o?o:this._inputElem))}async hidePopover(){var i;this.popoverVisible=!1,await(null===(i=this._popoverElem)||void 0===i?void 0:i.hide())}getFullOption(i){return"string"==typeof i?this.options.find((t=>t.value===i)):i}getOptionValue(i){return i?"string"==typeof i?i:i.value:null}compareOptionValues(i,t){return this.getOptionValue(i)===this.getOptionValue(t)}setEmptyValue(){this.value=null,this.inputValue=""}async setValue(i){if(!i||!this.options)return this.setEmptyValue(),void await this.hidePopover();this.compareOptionValues(this.value,i)||(this.getOptionValue(i)?(i=this.getFullOption(i),this.value=i,this.inputValue=i.label):this.setEmptyValue(),this.ezChange.emit(this.value)),await this.hidePopover()}async optionsChanged(){this.filterOptions("")}async valueChanged(i,t){this.compareOptionValues(i,t)||(i?(this.value=this.getFullOption(i),this.inputValue=this.value.label,this.setHighlightedIndexToValue()):(this.inputValue="",this.highlightedIndex=0))}async handleIconClick(i){i.stopPropagation(),i.preventDefault(),"right"===i.detail.icon?this.popoverVisible?await this.hidePopover():await this.showPopover():this.iconClick.emit()}async handleEzChange(i){i.stopPropagation(),this.inputValue=i.detail,!this.popoverVisible&&this.inputValue.length>0&&await this.showPopover(),this.ezType.emit(this.inputValue),this.highlightedIndex=0,this.filterOptions(this.inputValue)}async handleEzBlur(i){i.stopPropagation();const t=this.getFullOption(this.value);(null==t?void 0:t.label)!==this.inputValue&&(this.inputValue=(null==t?void 0:t.label)||""),this.ezBlur.emit(t)}filterOptions(i){if(!this.options)return void(this.filteredOptions=[]);let t=[];if(i&&""!==i.trim()){const s=i.toLowerCase().trim();t=t.concat(this.options.filter((i=>i.label.toLowerCase().includes(s)||i.value.toLowerCase().includes(s))))}else t=t.concat([...this.options]);!this.suppressEmptyOption&&t.length>0&&(t=[{value:null,label:this.textEmptyOption||"Selecione um item"},...t]),this.filteredOptions=t,this.setHighlightedIndexToValue(),this.scrollToHighlightedOption()}scrollToHighlightedOption(){if(this.highlightedIndex<0||!this._listElem)return;const i=this._listElem.children[this.highlightedIndex];i&&i.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}async selectOption(i){i&&!this.readonly&&this.enabled&&await this.setValue(i)}async handleArrowUp(){var i;this.popoverVisible?((null===(i=this.filteredOptions)||void 0===i?void 0:i.length)||0)<=0||this.highlightedIndex<=0||(this.highlightedIndex=Math.max(0,this.highlightedIndex-1),this.scrollToHighlightedOption()):await this.showPopover()}handleArrowDown(){var i;if(!this.popoverVisible)return void this.showPopover();const t=(null===(i=this.filteredOptions)||void 0===i?void 0:i.length)||0;t<=0||(this.highlightedIndex=Math.min(t-1,this.highlightedIndex+1),this.scrollToHighlightedOption())}async selectCurrentItem(){!this.popoverVisible||this.highlightedIndex<0||(this.hasSlotContent||0===this.filteredOptions.length||this.readonly||!this.enabled?await this.hidePopover():this.filteredOptions&&this.filteredOptions[this.highlightedIndex]&&this.selectOption(this.filteredOptions[this.highlightedIndex]))}handleVisibilityChange(i){this.popoverVisible=i.detail,this.ezVisibilityChange.emit(this.popoverVisible)}checkSlotContent(){const i=this._element.querySelector("slot")||this._element;this.hasSlotContent=i instanceof HTMLSlotElement?i.assignedNodes().length>0:i.children.length>0}setHighlightedIndexToValue(){if(this.value&&this.filteredOptions){const i=this.filteredOptions.findIndex((i=>i.value===this.getOptionValue(this.value)));if(i>=0)return void(this.highlightedIndex=i);this.highlightedIndex=0}}async handleDocumentClick(i){const t=i.target;this._element.contains(t)||this._popoverElem.contains(t)||await this.hidePopover()}addInfoId(){const i={id:"embedded"};this._element&&h.addIDInfo(this._element),this._inputElem&&h.addIDInfo(this._inputElem,"classic-combo-box-input",i),this._popoverElem&&h.addIDInfo(this._popoverElem,"classic-combo-box-popover",i)}async initKeyboardManager(){this._keyboardManager=new a({element:this._element,propagate:!0}),this._keyboardManager.bind("ArrowUp",(()=>this.handleArrowUp()),{propagate:!1}).bind("ArrowDown",(()=>this.handleArrowDown()),{propagate:!1}).bind("Enter",(()=>this.selectCurrentItem()),{propagate:!1}).bind("Tab",(()=>this.selectCurrentItem())).bind("shift+Tab",(()=>this.selectCurrentItem())).bind("Escape",(()=>this.hidePopover()))}async connectedCallback(){await this.initKeyboardManager(),document.addEventListener("mouseup",this._boundHandleDocumentClick)}disconnectedCallback(){this._keyboardManager.unbindAllShortcutKeys(),document.removeEventListener("mouseup",this._boundHandleDocumentClick)}componentWillLoad(){this.filterOptions("")}componentDidLoad(){this.addInfoId(),this.checkSlotContent(),this.value&&(this.inputValue=this.getFullOption(this.value).label,this.setHighlightedIndexToValue())}render(){var i;return s(o,null,s("ez-classic-input",{ref:i=>this._inputElem=i,name:this.name,label:this.label,placeholder:this.placeholder,value:this.inputValue,state:this.state,enabled:this.enabled,required:this.required,size:this.size,readonly:this.readonly||this.suppressSearch,leftIconName:this.iconName,leftIconTooltip:this.titleIcon,leftIconClickable:this.iconClickable,rightIconClickable:!0,helpText:this.helpText,rightIconName:this.popoverVisible?"chevron-up":"chevron-down",onIconClick:this.handleIconClick.bind(this),onEzChange:this.handleEzChange.bind(this),onEzFocus:this.showPopover.bind(this),onEzBlur:this.handleEzBlur.bind(this)}),s("ez-popover-core",{ref:i=>this._popoverElem=i,useAnchorSize:!0,onEzVisibilityChange:this.handleVisibilityChange.bind(this),overlayType:"none",options:{verticalGap:2,horizontalGap:0},autoClose:!1},s("slot",{onSlotchange:this.checkSlotContent.bind(this)}),!this.hasSlotContent&&((null===(i=this.filteredOptions)||void 0===i?void 0:i.length)>0?s("ul",{ref:i=>this._listElem=i,tabIndex:-1},this.filteredOptions.map(((i,t)=>{var o;return s("li",{key:null!==(o=i.value)&&void 0!==o?o:"__empty__",value:i.value,class:{highlighted:this.highlightedIndex===t,selected:this.getOptionValue(this.value)===i.value},onMouseDown:()=>this.selectOption(i)},i.label)}))):s("span",{class:"no-results"},"Nenhum resultado encontrado"))))}get _element(){return e(this)}static get watchers(){return{options:["optionsChanged"],value:["valueChanged"]}}};c.style=":host{display:block;box-sizing:border-box;font-family:var(--font--pattern, 'Roboto', Arial, sans-serif);font-size:var(--font-size--default, 14px);color:var(--color--gray-500, #494A4E);--ez-classic-combo-box-highlighted-bg-color:var(--color--gray-90, #EAEAEA);--ez-classic-combo-box-max-height:180px;--ez-classic-combo-box-list-bg-color:var(--color--gray-70, #FFFFFF);--ez-classic-combo-box-item-hover-bg-color:var(--color--gray-100, #DEDEDE);--ez-classic-combo-box-selected-bg-color:var(--color--ocean-green-90, #E6F3EF);--ez-classic-combo-box-selected-text-color:var(--color--ocean-green-600, #008561);--ez-classic-combo-box-selected-font-weight:var(--font-weight--medium, 500);--ez-classic-combo-box-item-padding:var(--space--8, 8px) var(--space--4, 4px);--ez-classic-combo-box-item-border-radius:var(--border--radius-8, 8px);--ez-classic-combo-box-list-margin:var(--space--6, 6px);--ez-classic-combo-box-transition-duration:150ms;--ez-classic-combo-box-scrollbar-color:var(--color--gray-300, #C4C4C4);--ez-classic-combo-box-no-results-margin:var(--space--52, 52px) 0;--ez-classic-combo-box-item-text-color:inherit;--ez-classic-combo-box-item-min-height:auto;--ez-classic-combo-box-width:100%;width:var(--ez-classic-combo-box-width)}ul{list-style:none;padding:0;margin:var(--ez-classic-combo-box-list-margin);display:flex;flex-direction:column;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--ez-classic-combo-box-scrollbar-color) transparent;max-height:var(--ez-classic-combo-box-max-height);scroll-behavior:smooth;background-color:var(--ez-classic-combo-box-list-bg-color)}li{cursor:pointer;border-radius:var(--ez-classic-combo-box-item-border-radius);padding:var(--ez-classic-combo-box-item-padding);transition:var(--ez-classic-combo-box-transition-duration) background-color linear;color:var(--ez-classic-combo-box-item-text-color);min-height:var(--ez-classic-combo-box-item-min-height)}li:hover{background-color:var(--ez-classic-combo-box-item-hover-bg-color)}li.highlighted{background-color:var(--ez-classic-combo-box-highlighted-bg-color)}li.selected{background-color:var(--ez-classic-combo-box-selected-bg-color);color:var(--ez-classic-combo-box-selected-text-color);font-weight:var(--ez-classic-combo-box-selected-font-weight)}span.no-results{margin:var(--ez-classic-combo-box-no-results-margin);cursor:default;text-align:center;display:flex;align-items:center;justify-content:center}";export{c as ez_classic_combo_box}
|