@sankhyalabs/ezui 6.1.0-dev.2 → 6.1.0-dev.21
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-c9d1205c.js → ApplicationUtils-39807831.js} +43 -15
- package/dist/cjs/RichToolbarHelper-ea12328f.js +33 -0
- package/dist/cjs/_commonjsHelpers-537d719a.js +20 -0
- package/dist/cjs/app-globals-86776e90.js +12 -0
- package/dist/cjs/{constants-569271bc.js → constants-72b7e05e.js} +0 -2
- package/dist/cjs/ez-actions-button.cjs.entry.js +3 -2
- package/dist/cjs/ez-alert-list.cjs.entry.js +6 -4
- 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 +7 -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 +8 -7
- package/dist/cjs/ez-card-item_2.cjs.entry.js +2 -2
- package/dist/cjs/ez-chart.cjs.entry.js +4 -19
- package/dist/cjs/ez-check.cjs.entry.js +2 -2
- package/dist/cjs/ez-chip.cjs.entry.js +3 -2
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +15 -12
- package/dist/cjs/{ez-combo-box-list_3.cjs.entry.js → ez-combo-box-list_4.cjs.entry.js} +292 -6
- package/dist/cjs/ez-combo-box.cjs.entry.js +33 -15
- package/dist/cjs/ez-date-input.cjs.entry.js +6 -2
- package/dist/cjs/ez-date-time-input.cjs.entry.js +6 -2
- package/dist/cjs/ez-dialog.cjs.entry.js +9 -7
- package/dist/cjs/ez-double-list.cjs.entry.js +13 -5
- package/dist/cjs/ez-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/ez-empty-card.cjs.entry.js +34 -0
- package/dist/cjs/ez-file-item.cjs.entry.js +10 -7
- package/dist/cjs/ez-filter-input.cjs.entry.js +129 -0
- package/dist/cjs/ez-form-view.cjs.entry.js +13 -5
- package/dist/cjs/ez-form.cjs.entry.js +5 -4
- package/dist/cjs/ez-grid.cjs.entry.js +172 -133
- package/dist/cjs/ez-guide-navigator.cjs.entry.js +6 -2
- package/dist/cjs/ez-icon.cjs.entry.js +2 -2
- package/dist/cjs/ez-link-builder_6.cjs.entry.js +315 -0
- package/dist/cjs/ez-list.cjs.entry.js +5 -3
- package/dist/cjs/ez-loading-bar.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal-container.cjs.entry.js +7 -3
- package/dist/cjs/ez-modal.cjs.entry.js +6 -2
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js +10 -6
- package/dist/cjs/ez-number-input.cjs.entry.js +6 -2
- 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 +1 -1
- package/dist/cjs/ez-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-rich-toolbar-item.cjs.entry.js +27 -0
- package/dist/cjs/ez-scroller_2.cjs.entry.js +1 -1
- package/dist/cjs/ez-search-plus.cjs.entry.js +19 -10
- package/dist/cjs/ez-search-result-list.cjs.entry.js +25 -8
- package/dist/cjs/ez-search.cjs.entry.js +9 -10
- package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +6 -8
- package/dist/cjs/ez-skeleton.cjs.entry.js +6 -4
- package/dist/cjs/ez-sortable-list.cjs.entry.js +13 -6
- package/dist/cjs/ez-split-button.cjs.entry.js +6 -5
- package/dist/cjs/ez-split-item.cjs.entry.js +7 -3
- 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-text-area.cjs.entry.js +35 -28
- package/dist/cjs/ez-text-input.cjs.entry.js +3 -2
- package/dist/cjs/ez-tile.cjs.entry.js +62 -0
- package/dist/cjs/ez-time-input.cjs.entry.js +13 -11
- package/dist/cjs/ez-toast.cjs.entry.js +1 -1
- package/dist/cjs/{ez-filter-input_2.cjs.entry.js → ez-tooltip.cjs.entry.js} +2 -124
- package/dist/cjs/ez-tree.cjs.entry.js +6 -2
- package/dist/cjs/ez-upload.cjs.entry.js +18 -12
- package/dist/cjs/ez-view-stack.cjs.entry.js +1 -1
- package/dist/cjs/ezui.cjs.js +6 -2
- package/dist/cjs/filter-column.cjs.entry.js +9 -5
- package/dist/cjs/index-02854309.js +3672 -0
- package/dist/cjs/{index-9e5554cb.js → index-a7b0c73d.js} +32 -15
- package/dist/cjs/loader.cjs.js +6 -2
- package/dist/cjs/purify-a7dc3a08.js +1354 -0
- package/dist/cjs/{search-column-1d3c9fa5.js → search-column-82c52e20.js} +11 -5
- package/dist/collection/collection-manifest.json +27 -1
- package/dist/collection/components/ez-alert-list/ez-alert-list.js +5 -3
- package/dist/collection/components/ez-avatar/ez-avatar.js +5 -1
- package/dist/collection/components/ez-calendar/ez-calendar.js +7 -6
- package/dist/collection/components/ez-check/ez-check.css +1 -1
- package/dist/collection/components/ez-chip/ez-chip.js +20 -1
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +1 -0
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.js +12 -9
- package/dist/collection/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.js +7 -4
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +50 -15
- package/dist/collection/components/ez-date-input/ez-date-input.js +5 -1
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +5 -1
- package/dist/collection/components/ez-dialog/ez-dialog.js +8 -6
- package/dist/collection/components/ez-double-list/ez-double-list.js +12 -4
- package/dist/collection/components/ez-empty-card/ez-empty-card.css +55 -0
- package/dist/collection/components/ez-empty-card/ez-empty-card.js +91 -0
- package/dist/collection/components/ez-file-item/ez-file-item.js +9 -6
- package/dist/collection/components/ez-form/ez-form.js +1 -1
- package/dist/collection/components/ez-form-view/ez-form-view.js +4 -3
- package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js +5 -2
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/RichText.tpl.js +4 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +38 -11
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +14 -4
- package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +4 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/test/constants/GridEditionMock.js +3 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/utils/buildLocaleText.js +67 -0
- package/dist/collection/components/ez-grid/ez-grid.js +15 -13
- package/dist/collection/components/ez-grid/subcomponents/filter-column.js +7 -3
- package/dist/collection/components/ez-grid/subcomponents/selection-counter.js +2 -2
- package/dist/collection/components/ez-grid/subcomponents/utils/selectionCounterUtils.js +11 -7
- package/dist/collection/components/ez-guide-navigator/ez-guide-navigator.js +5 -1
- package/dist/collection/components/ez-icon/ez-icon.css +147 -140
- package/dist/collection/components/ez-list/ez-list.js +4 -2
- package/dist/collection/components/ez-modal/ez-modal.js +5 -1
- package/dist/collection/components/ez-modal-container/ez-modal-container.css +2 -0
- package/dist/collection/components/ez-modal-container/ez-modal-container.js +5 -1
- package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.js +9 -5
- package/dist/collection/components/ez-number-input/ez-number-input.js +5 -1
- package/dist/collection/components/ez-popover-plus/subcomponent/ez-popover-core.css +3 -2
- package/dist/collection/components/ez-rich-text/ez-link-builder/ez-link-builder.css +22 -0
- package/dist/collection/components/ez-rich-text/ez-link-builder/ez-link-builder.js +135 -0
- package/dist/collection/components/ez-rich-text/ez-rich-text.css +30 -0
- package/dist/collection/components/ez-rich-text/ez-rich-text.js +575 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/RichToolbarHelper.js +27 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-arrows/ez-rich-toolbar-arrows.css +4 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-arrows/ez-rich-toolbar-arrows.js +23 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-configs/ez-rich-toolbar-configs.css +4 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-configs/ez-rich-toolbar-configs.js +23 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-item/ez-rich-toolbar-item.css +20 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-item/ez-rich-toolbar-item.js +122 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-letters/ez-rich-toolbar-letters.css +4 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-letters/ez-rich-toolbar-letters.js +23 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar.css +42 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar.js +187 -0
- package/dist/collection/components/ez-rich-text/ez-simple-image-uploader/ez-simple-image-uploader.css +70 -0
- package/dist/collection/components/ez-rich-text/ez-simple-image-uploader/ez-simple-image-uploader.js +220 -0
- package/dist/collection/components/ez-rich-text/ez-simple-image-uploader/test/resource/imageBase64.js +1 -0
- package/dist/collection/components/ez-rich-text/ez-simple-image-uploader/utils/fileToBase64.js +14 -0
- package/dist/collection/components/ez-rich-text/ez-simple-image-uploader/utils/formatBytes.js +10 -0
- package/dist/collection/components/ez-search/ez-search.js +7 -8
- package/dist/collection/components/ez-search-plus/ez-search-plus.css +2 -0
- package/dist/collection/components/ez-search-plus/ez-search-plus.js +16 -7
- package/dist/collection/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.js +27 -7
- package/dist/collection/components/ez-sidebar-navigator/ez-sidebar-navigator.js +5 -2
- package/dist/collection/components/ez-skeleton/ez-skeleton.constants.js +0 -1
- package/dist/collection/components/ez-skeleton/ez-skeleton.js +4 -2
- package/dist/collection/components/ez-sortable-list/ez-sortable-list.js +15 -11
- package/dist/collection/components/ez-split-button/ez-split-button.js +6 -6
- package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.js +5 -1
- package/dist/collection/components/ez-text-area/ez-text-area.css +244 -212
- package/dist/collection/components/ez-text-area/ez-text-area.js +35 -28
- package/dist/collection/components/ez-text-edit/ez-text-edit.js +5 -1
- package/dist/collection/components/ez-text-input/ez-text-input.js +2 -1
- package/dist/collection/components/ez-tile/ez-tile.css +151 -0
- package/dist/collection/components/ez-tile/ez-tile.js +269 -0
- package/dist/collection/components/ez-time-input/ez-time-input.js +12 -10
- package/dist/collection/components/ez-tooltip/ez-tooltip.js +1 -1
- package/dist/collection/components/ez-tree/ez-tree.js +5 -1
- package/dist/collection/components/ez-upload/ez-upload.js +18 -12
- package/dist/collection/global/app-init.js +6 -0
- package/dist/collection/setupTests.js +1 -1
- package/dist/collection/utils/ApplicationUtils.js +43 -15
- package/dist/collection/utils/constants.js +0 -1
- package/dist/collection/utils/i18n/elanguages.js +6 -0
- package/dist/collection/utils/i18n/i18nUtils.js +20 -0
- package/dist/collection/utils/i18n/index.js +30 -0
- package/dist/collection/utils/i18n/locales/en-us.js +275 -0
- package/dist/collection/utils/i18n/locales/es-es.js +275 -0
- package/dist/collection/utils/i18n/locales/pt-br.js +275 -0
- package/dist/collection/utils/i18n/translations.js +9 -0
- package/dist/collection/utils/validators/recordvalidator/RecordValidationProcessor.js +8 -2
- package/dist/custom-elements/index.d.ts +60 -0
- package/dist/custom-elements/index.js +6252 -308
- package/dist/esm/{ApplicationUtils-eaf91331.js → ApplicationUtils-72f474e8.js} +43 -15
- package/dist/esm/RichToolbarHelper-f3a149c4.js +29 -0
- package/dist/esm/_commonjsHelpers-9943807e.js +17 -0
- package/dist/esm/app-globals-2ccb253f.js +10 -0
- package/dist/esm/{constants-b036528f.js → constants-3fabe81e.js} +1 -2
- package/dist/esm/ez-actions-button.entry.js +3 -2
- package/dist/esm/ez-alert-list.entry.js +6 -4
- 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 +7 -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 +8 -7
- package/dist/esm/ez-card-item_2.entry.js +2 -2
- package/dist/esm/ez-chart.entry.js +2 -17
- package/dist/esm/ez-check.entry.js +2 -2
- package/dist/esm/ez-chip.entry.js +3 -2
- package/dist/esm/ez-collapsible-box.entry.js +15 -12
- package/dist/esm/{ez-combo-box-list_3.entry.js → ez-combo-box-list_4.entry.js} +293 -8
- package/dist/esm/ez-combo-box.entry.js +33 -15
- package/dist/esm/ez-date-input.entry.js +6 -2
- package/dist/esm/ez-date-time-input.entry.js +6 -2
- package/dist/esm/ez-dialog.entry.js +9 -7
- package/dist/esm/ez-double-list.entry.js +13 -5
- package/dist/esm/ez-dropdown.entry.js +1 -1
- package/dist/esm/ez-empty-card.entry.js +30 -0
- package/dist/esm/ez-file-item.entry.js +10 -7
- package/dist/esm/ez-filter-input.entry.js +125 -0
- package/dist/esm/ez-form-view.entry.js +13 -5
- package/dist/esm/ez-form.entry.js +5 -4
- package/dist/esm/ez-grid.entry.js +155 -116
- package/dist/esm/ez-guide-navigator.entry.js +6 -2
- package/dist/esm/ez-icon.entry.js +2 -2
- package/dist/esm/ez-link-builder_6.entry.js +306 -0
- package/dist/esm/ez-list.entry.js +5 -3
- package/dist/esm/ez-loading-bar.entry.js +1 -1
- package/dist/esm/ez-modal-container.entry.js +7 -3
- package/dist/esm/ez-modal.entry.js +6 -2
- package/dist/esm/ez-multi-selection-list.entry.js +10 -6
- package/dist/esm/ez-number-input.entry.js +6 -2
- 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 +1 -1
- package/dist/esm/ez-radio-button.entry.js +1 -1
- package/dist/esm/ez-rich-toolbar-item.entry.js +23 -0
- package/dist/esm/ez-scroller_2.entry.js +1 -1
- package/dist/esm/ez-search-plus.entry.js +19 -10
- package/dist/esm/ez-search-result-list.entry.js +25 -8
- package/dist/esm/ez-search.entry.js +9 -10
- package/dist/esm/ez-sidebar-navigator.entry.js +6 -8
- package/dist/esm/ez-skeleton.entry.js +6 -4
- package/dist/esm/ez-sortable-list.entry.js +13 -6
- package/dist/esm/ez-split-button.entry.js +6 -5
- package/dist/esm/ez-split-item.entry.js +7 -3
- package/dist/esm/ez-split-panel.entry.js +1 -1
- package/dist/esm/ez-tabselector.entry.js +1 -1
- package/dist/esm/ez-text-area.entry.js +35 -28
- package/dist/esm/ez-text-input.entry.js +3 -2
- package/dist/esm/ez-tile.entry.js +58 -0
- package/dist/esm/ez-time-input.entry.js +13 -11
- package/dist/esm/ez-toast.entry.js +1 -1
- package/dist/esm/{ez-filter-input_2.entry.js → ez-tooltip.entry.js} +3 -124
- package/dist/esm/ez-tree.entry.js +6 -2
- package/dist/esm/ez-upload.entry.js +18 -12
- package/dist/esm/ez-view-stack.entry.js +1 -1
- package/dist/esm/ezui.js +7 -3
- package/dist/esm/filter-column.entry.js +9 -5
- package/dist/esm/index-b623906e.js +3669 -0
- package/dist/esm/{index-5a720e56.js → index-baa5e267.js} +33 -15
- package/dist/esm/loader.js +7 -3
- package/dist/esm/purify-da6317bb.js +1352 -0
- package/dist/esm/{search-column-35f4ad93.js → search-column-5a55f676.js} +10 -4
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-0603bcc7.entry.js +1 -0
- package/dist/ezui/p-0ec7aa3a.entry.js +1 -0
- package/dist/ezui/p-0f0f3efe.entry.js +1 -0
- package/dist/ezui/p-112455b1.js +1 -0
- package/dist/ezui/{p-87f5a060.entry.js → p-1bcfd88c.entry.js} +1 -1
- package/dist/ezui/p-1c3efd36.entry.js +1 -0
- package/dist/ezui/p-1c55dda0.js +3 -0
- package/dist/ezui/{p-81461d2f.entry.js → p-1e7a8633.entry.js} +1 -1
- package/dist/ezui/{p-6b51c9cc.entry.js → p-1f50fa05.entry.js} +1 -1
- package/dist/ezui/p-1ffb75d5.js +1 -0
- package/dist/ezui/p-20c024f7.entry.js +1 -0
- package/dist/ezui/p-22934e19.entry.js +1 -0
- package/dist/ezui/{p-e4c7eb39.js → p-23a36bb6.js} +2 -2
- package/dist/ezui/{p-06f1b8e4.entry.js → p-288631d1.entry.js} +1 -1
- package/dist/ezui/p-2f471aca.entry.js +1 -0
- package/dist/ezui/p-303b3b8c.entry.js +1 -0
- package/dist/ezui/p-3b89a9a0.entry.js +1 -0
- package/dist/ezui/p-3e71ca08.entry.js +1 -0
- package/dist/ezui/p-3e767a74.js +1 -0
- package/dist/ezui/p-3e88fbb6.entry.js +1 -0
- package/dist/ezui/p-4044a7d7.entry.js +1 -0
- package/dist/ezui/{p-0378416a.entry.js → p-44caad9a.entry.js} +1 -1
- package/dist/ezui/p-45c9b292.entry.js +1 -0
- package/dist/ezui/p-45e64547.entry.js +1 -0
- package/dist/ezui/p-46913da7.js +1 -0
- package/dist/ezui/p-4773ff4c.js +1 -0
- package/dist/ezui/{p-769632d5.entry.js → p-4b67138e.entry.js} +1 -1
- package/dist/ezui/{p-4a876b8b.entry.js → p-4d30b703.entry.js} +1 -1
- package/dist/ezui/p-4fc5f926.entry.js +1 -0
- package/dist/ezui/p-53bc30a1.entry.js +1 -0
- package/dist/ezui/{p-6fc26622.entry.js → p-5ed81457.entry.js} +1 -1
- package/dist/ezui/p-627ff5a2.entry.js +1 -0
- package/dist/ezui/p-629e32e2.entry.js +1 -0
- package/dist/ezui/p-6369a0cd.entry.js +1 -0
- package/dist/ezui/{p-80764ff6.entry.js → p-6562b5c8.entry.js} +46 -46
- package/dist/ezui/p-6d596a5a.entry.js +1 -0
- package/dist/ezui/p-6e6fccfb.entry.js +1 -0
- package/dist/ezui/p-713dc93e.entry.js +1 -0
- package/dist/ezui/p-79044c3e.entry.js +1 -0
- package/dist/ezui/{p-5b85d3de.entry.js → p-7f792043.entry.js} +1 -1
- package/dist/ezui/p-80461324.entry.js +1 -0
- package/dist/ezui/p-84a136bf.entry.js +1 -0
- package/dist/ezui/{p-b3b3c99a.entry.js → p-8afb6e8a.entry.js} +1 -1
- package/dist/ezui/{p-82fa4b09.entry.js → p-8df1ca33.entry.js} +1 -1
- package/dist/ezui/p-91c9d50e.entry.js +1 -0
- package/dist/ezui/p-973e6a40.entry.js +1 -0
- package/dist/ezui/{p-18e71523.entry.js → p-9c5cd3b2.entry.js} +1 -1
- package/dist/ezui/{p-c2b20f78.entry.js → p-9f5fa3f9.entry.js} +1 -1
- package/dist/ezui/p-a12f6074.entry.js +1 -0
- package/dist/ezui/p-a482aae1.entry.js +1 -0
- package/dist/ezui/p-a687f14c.entry.js +7 -0
- package/dist/ezui/{p-dfca5946.entry.js → p-a80b1287.entry.js} +1 -1
- package/dist/ezui/p-adbc3261.entry.js +1 -0
- package/dist/ezui/p-b115058e.entry.js +1 -0
- package/dist/ezui/p-b1e45320.js +1 -0
- package/dist/ezui/p-b4215a04.entry.js +1 -0
- package/dist/ezui/p-b8ed876d.entry.js +1 -0
- package/dist/ezui/p-ba07b3df.js +1 -0
- package/dist/ezui/p-bc2f844e.entry.js +1 -0
- package/dist/ezui/p-beb42de1.entry.js +1 -0
- package/dist/ezui/p-c00ad772.entry.js +1 -0
- package/dist/ezui/{p-92748142.entry.js → p-c0d9c4f8.entry.js} +1 -1
- package/dist/ezui/p-c2a8139d.entry.js +1 -0
- package/dist/ezui/p-caf2584a.entry.js +1 -0
- package/dist/ezui/p-d1d0868b.entry.js +1 -0
- package/dist/ezui/p-d2645bdf.entry.js +1 -0
- package/dist/ezui/p-e5260556.entry.js +1 -0
- package/dist/ezui/{p-000159dc.entry.js → p-e75c7a23.entry.js} +1 -1
- package/dist/ezui/p-e7a7c594.entry.js +1 -0
- package/dist/ezui/p-ed3bed1e.entry.js +1 -0
- package/dist/ezui/{p-44b39e81.entry.js → p-fa6732f2.entry.js} +1 -1
- package/dist/types/components/ez-alert-list/ez-alert-list.d.ts +2 -1
- package/dist/types/components/ez-avatar/ez-avatar.d.ts +2 -0
- package/dist/types/components/ez-calendar/ez-calendar.d.ts +2 -3
- package/dist/types/components/ez-chip/ez-chip.d.ts +4 -0
- package/dist/types/components/ez-collapsible-box/ez-collapsible-box.d.ts +2 -0
- package/dist/types/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.d.ts +2 -0
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +9 -2
- package/dist/types/components/ez-date-input/ez-date-input.d.ts +2 -0
- package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +2 -0
- package/dist/types/components/ez-dialog/ez-dialog.d.ts +2 -2
- package/dist/types/components/ez-double-list/ez-double-list.d.ts +2 -0
- package/dist/types/components/ez-empty-card/ez-empty-card.d.ts +18 -0
- package/dist/types/components/ez-file-item/ez-file-item.d.ts +2 -0
- package/dist/types/components/ez-form-view/fieldbuilder/templates/RichText.tpl.d.ts +2 -0
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +5 -0
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +2 -0
- package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +1 -0
- package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +1 -0
- package/dist/types/components/ez-grid/controller/ag-grid/test/constants/GridEditionMock.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/utils/buildLocaleText.d.ts +66 -0
- package/dist/types/components/ez-grid/ez-grid.d.ts +2 -2
- package/dist/types/components/ez-grid/subcomponents/filter-column.d.ts +2 -0
- package/dist/types/components/ez-grid/subcomponents/selection-counter.d.ts +2 -0
- package/dist/types/components/ez-grid/subcomponents/utils/selectionCounterUtils.d.ts +2 -2
- package/dist/types/components/ez-guide-navigator/ez-guide-navigator.d.ts +2 -0
- package/dist/types/components/ez-list/ez-list.d.ts +2 -1
- package/dist/types/components/ez-modal/ez-modal.d.ts +2 -0
- package/dist/types/components/ez-modal-container/ez-modal-container.d.ts +2 -0
- package/dist/types/components/ez-multi-selection-list/ez-multi-selection-list.d.ts +2 -0
- package/dist/types/components/ez-number-input/ez-number-input.d.ts +2 -0
- package/dist/types/components/ez-rich-text/ez-link-builder/ez-link-builder.d.ts +19 -0
- package/dist/types/components/ez-rich-text/ez-rich-text.d.ts +105 -0
- package/dist/types/components/ez-rich-text/ez-rich-toolbar/RichToolbarHelper.d.ts +31 -0
- package/dist/types/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-arrows/ez-rich-toolbar-arrows.d.ts +5 -0
- package/dist/types/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-configs/ez-rich-toolbar-configs.d.ts +5 -0
- package/dist/types/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-item/ez-rich-toolbar-item.d.ts +11 -0
- package/dist/types/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-letters/ez-rich-toolbar-letters.d.ts +5 -0
- package/dist/types/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar.d.ts +35 -0
- package/dist/types/components/ez-rich-text/ez-simple-image-uploader/ez-simple-image-uploader.d.ts +39 -0
- package/dist/types/components/ez-rich-text/ez-simple-image-uploader/test/resource/imageBase64.d.ts +1 -0
- package/dist/types/components/ez-rich-text/ez-simple-image-uploader/utils/fileToBase64.d.ts +1 -0
- package/dist/types/components/ez-rich-text/ez-simple-image-uploader/utils/formatBytes.d.ts +1 -0
- package/dist/types/components/ez-search/ez-search.d.ts +2 -3
- package/dist/types/components/ez-search-plus/ez-search-plus.d.ts +4 -1
- package/dist/types/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.d.ts +4 -1
- package/dist/types/components/ez-sidebar-navigator/ez-sidebar-navigator.d.ts +2 -0
- package/dist/types/components/ez-skeleton/ez-skeleton.constants.d.ts +0 -1
- package/dist/types/components/ez-skeleton/ez-skeleton.d.ts +2 -1
- package/dist/types/components/ez-sortable-list/ez-sortable-list.d.ts +2 -0
- package/dist/types/components/ez-split-button/ez-split-button.d.ts +2 -2
- package/dist/types/components/ez-split-panel/structure/item/ez-split-item.d.ts +2 -0
- package/dist/types/components/ez-text-area/ez-text-area.d.ts +6 -3
- package/dist/types/components/ez-text-edit/ez-text-edit.d.ts +2 -0
- package/dist/types/components/ez-tile/ez-tile.d.ts +58 -0
- package/dist/types/components/ez-time-input/ez-time-input.d.ts +2 -1
- package/dist/types/components/ez-tree/ez-tree.d.ts +2 -0
- package/dist/types/components/ez-upload/ez-upload.d.ts +3 -1
- package/dist/types/components.d.ts +447 -2
- package/dist/types/global/app-init.d.ts +1 -0
- package/dist/types/utils/ApplicationUtils.d.ts +3 -1
- package/dist/types/utils/constants.d.ts +0 -1
- package/dist/types/utils/i18n/elanguages.d.ts +5 -0
- package/dist/types/utils/i18n/i18nUtils.d.ts +2 -0
- package/dist/types/utils/i18n/index.d.ts +5 -0
- package/dist/types/utils/i18n/locales/en-us.d.ts +276 -0
- package/dist/types/utils/i18n/locales/es-es.d.ts +276 -0
- package/dist/types/utils/i18n/locales/pt-br.d.ts +276 -0
- package/dist/types/utils/i18n/translations.d.ts +828 -0
- package/dist/types/utils/validators/recordvalidator/RecordValidationProcessor.d.ts +1 -0
- package/package.json +8 -1
- package/react/components.d.ts +10 -0
- package/react/components.js +10 -0
- package/react/components.js.map +1 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/i18n/pt-BR.js +0 -75
- package/dist/collection/components/ez-sidebar-navigator/messages/constants.js +0 -5
- package/dist/ezui/p-01b72d7e.entry.js +0 -1
- package/dist/ezui/p-07594da0.entry.js +0 -1
- package/dist/ezui/p-11bfeca3.entry.js +0 -1
- package/dist/ezui/p-175154a0.js +0 -1
- package/dist/ezui/p-1fefb37a.entry.js +0 -1
- package/dist/ezui/p-2187f86c.js +0 -1
- package/dist/ezui/p-220b9944.entry.js +0 -1
- package/dist/ezui/p-28987410.entry.js +0 -1
- package/dist/ezui/p-2d10bb18.entry.js +0 -1
- package/dist/ezui/p-2f351332.entry.js +0 -1
- package/dist/ezui/p-4e66eaeb.entry.js +0 -1
- package/dist/ezui/p-545bd5d5.entry.js +0 -7
- package/dist/ezui/p-5eea9886.js +0 -1
- package/dist/ezui/p-61f5c258.entry.js +0 -1
- package/dist/ezui/p-6b2cc9b8.entry.js +0 -1
- package/dist/ezui/p-6b3fddee.entry.js +0 -1
- package/dist/ezui/p-6ec40dec.entry.js +0 -1
- package/dist/ezui/p-700c1320.entry.js +0 -1
- package/dist/ezui/p-708b196e.entry.js +0 -1
- package/dist/ezui/p-7567ccdd.entry.js +0 -1
- package/dist/ezui/p-791f4e43.entry.js +0 -1
- package/dist/ezui/p-7db20f8e.entry.js +0 -1
- package/dist/ezui/p-7ec3f335.entry.js +0 -1
- package/dist/ezui/p-85d7b78a.entry.js +0 -1
- package/dist/ezui/p-90c90351.entry.js +0 -1
- package/dist/ezui/p-90e91173.entry.js +0 -1
- package/dist/ezui/p-91ccae0c.entry.js +0 -1
- package/dist/ezui/p-926a0bde.entry.js +0 -1
- package/dist/ezui/p-97d94ef3.entry.js +0 -1
- package/dist/ezui/p-9e95bfeb.entry.js +0 -1
- package/dist/ezui/p-a11827ca.entry.js +0 -1
- package/dist/ezui/p-c7035d65.entry.js +0 -1
- package/dist/ezui/p-c8e6204f.entry.js +0 -1
- package/dist/ezui/p-d2290004.entry.js +0 -1
- package/dist/ezui/p-d4d6d5fe.entry.js +0 -1
- package/dist/ezui/p-ddb22a70.entry.js +0 -1
- package/dist/ezui/p-ddd0bd61.entry.js +0 -1
- package/dist/ezui/p-e4ae4ddb.entry.js +0 -1
- package/dist/ezui/p-e4ead194.entry.js +0 -1
- package/dist/ezui/p-e6b38ade.entry.js +0 -1
- package/dist/ezui/p-ed48a632.entry.js +0 -1
- package/dist/ezui/p-fc194825.entry.js +0 -1
- package/dist/types/components/ez-grid/controller/ag-grid/i18n/pt-BR.d.ts +0 -2
- package/dist/types/components/ez-sidebar-navigator/messages/constants.d.ts +0 -5
package/dist/collection/components/ez-rich-text/ez-simple-image-uploader/utils/fileToBase64.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export function fileToBase64(file) {
|
|
2
|
+
return new Promise((resolve, reject) => {
|
|
3
|
+
try {
|
|
4
|
+
const reader = new FileReader();
|
|
5
|
+
reader.onload = () => {
|
|
6
|
+
resolve(reader.result);
|
|
7
|
+
};
|
|
8
|
+
reader.readAsDataURL(file);
|
|
9
|
+
}
|
|
10
|
+
catch (error) {
|
|
11
|
+
reject(error);
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export function formatBytes(bytes, decimals = 1) {
|
|
2
|
+
if (bytes === 0) {
|
|
3
|
+
return "0 Bytes";
|
|
4
|
+
}
|
|
5
|
+
const k = 1024;
|
|
6
|
+
const dm = decimals < 0 ? 0 : decimals;
|
|
7
|
+
const sizes = ["Bytes", "Kilobytes", "Megabytes", "Gigabytes", "Terabytes", "Petabytes", "Exabytes", "Zettabytes", "Yottabytes"];
|
|
8
|
+
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
9
|
+
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + " " + sizes[i];
|
|
10
|
+
}
|
|
@@ -2,8 +2,8 @@ import { h, Host } from "@stencil/core";
|
|
|
2
2
|
import CSSVarsUtils from "../../utils/CSSVarsUtils";
|
|
3
3
|
import { ElementIDUtils, ObjectUtils, StringUtils } from "@sankhyalabs/core";
|
|
4
4
|
import { ApplicationUtils } from "../../utils";
|
|
5
|
-
import { REQUIRED_INFO } from "../../utils/constants";
|
|
6
5
|
import { replaceHighlight, replaceQuotes } from "./utils/searchFormatters";
|
|
6
|
+
import initI18n from '../../utils/i18n';
|
|
7
7
|
export class EzSearch {
|
|
8
8
|
constructor() {
|
|
9
9
|
this._changeDeboucingTimeout = null;
|
|
@@ -11,8 +11,6 @@ export class EzSearch {
|
|
|
11
11
|
this._deboucingTime = 300;
|
|
12
12
|
this._maxWidthValue = 0;
|
|
13
13
|
this._tabPressed = false;
|
|
14
|
-
this._textEmptyList = "Nenhum resultado encontrado";
|
|
15
|
-
this._textEmptySearch = "Nenhum resultado de {0} encontrado";
|
|
16
14
|
this._startHighlightTag = "<span class='card-item__highlight'>";
|
|
17
15
|
this._endHighlightTag = "</span>";
|
|
18
16
|
this._preSelection = undefined;
|
|
@@ -338,7 +336,7 @@ export class EzSearch {
|
|
|
338
336
|
var _a;
|
|
339
337
|
if (!((_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
340
338
|
this.clearSearch();
|
|
341
|
-
ApplicationUtils.info(this.
|
|
339
|
+
ApplicationUtils.info(this.i18n("ez-search.emptyList"));
|
|
342
340
|
}
|
|
343
341
|
else {
|
|
344
342
|
this.controlListWithOnlyOne(focusOnInput);
|
|
@@ -400,11 +398,11 @@ export class EzSearch {
|
|
|
400
398
|
}
|
|
401
399
|
async showNoResultMessage() {
|
|
402
400
|
this.clearSearch();
|
|
403
|
-
ApplicationUtils.info(this.
|
|
401
|
+
ApplicationUtils.info(this.i18n("ez-search.emptySearch", { field: this.getFieldLabel() }));
|
|
404
402
|
}
|
|
405
403
|
getFieldLabel() {
|
|
406
404
|
var _a;
|
|
407
|
-
return (_a = this.label) === null || _a === void 0 ? void 0 : _a.replace(
|
|
405
|
+
return (_a = this.label) === null || _a === void 0 ? void 0 : _a.replace(this.i18n("app.requiredInfo"), "").toUpperCase();
|
|
408
406
|
}
|
|
409
407
|
resetOptions() {
|
|
410
408
|
this.hideOptions();
|
|
@@ -428,7 +426,8 @@ export class EzSearch {
|
|
|
428
426
|
//---------------------------------------------
|
|
429
427
|
// Lifecycle web component
|
|
430
428
|
//---------------------------------------------
|
|
431
|
-
componentWillLoad() {
|
|
429
|
+
async componentWillLoad() {
|
|
430
|
+
this.i18n = await initI18n();
|
|
432
431
|
if (this.options === undefined) {
|
|
433
432
|
this.options = [];
|
|
434
433
|
const optionsTags = this.el.querySelectorAll("option");
|
|
@@ -610,7 +609,7 @@ export class EzSearch {
|
|
|
610
609
|
ElementIDUtils.addIDInfoIfNotExists(this.el, 'input');
|
|
611
610
|
return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this._textInput = elem, "data-slave-mode": "true", enabled: this.enabled && !this.suppressSearch, onInput: event => this.onTextInputChangeHandler(event), onFocusout: () => this.onTextInputFocusOutHandler(), onKeyDown: event => this.keyDownHandler(event), label: this.label, canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode, alternativePlaceholder: this.alternativePlaceholder }, h("button", { class: "btn", slot: "leftIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() }, this.canShowLoadSpinDescription() ? h("div", { class: "message__loading" }) : h("ez-icon", { iconName: "search" })), (((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) && (this._criteria || this.value) || this.ensureClearButtonVisible)
|
|
612
611
|
? h("button", { class: "btn btn__close", slot: "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.clearSearch() }, h("ez-icon", { iconName: "close" }))
|
|
613
|
-
: undefined), h("ez-popover-plus", { ref: elem => this._ezPopOverPlusElement = elem, autoClose: false, overlayType: "none", useAnchorSize: true, anchorElement: [this._textInput, this.el] }, h("search-list", { ref: (ref) => this._searchList = ref, showLoading: this._showLoading, visibleOptions: this._visibleOptions, textEmptyList: this.
|
|
612
|
+
: undefined), h("ez-popover-plus", { ref: elem => this._ezPopOverPlusElement = elem, autoClose: false, overlayType: "none", useAnchorSize: true, anchorElement: [this._textInput, this.el] }, h("search-list", { ref: (ref) => this._searchList = ref, showLoading: this._showLoading, visibleOptions: this._visibleOptions, textEmptyList: this.i18n("ez-search.emptyList"), canShowListOptions: this.canShowListOptions(), value: this.value, showOptionValue: this.showOptionValue, preSelection: this._preSelection, onChangeValue: ({ detail }) => this.selectOption(detail), onChangePreSelection: ({ detail }) => this.onChangePreSelection(detail) }))));
|
|
614
613
|
}
|
|
615
614
|
static get is() { return "ez-search"; }
|
|
616
615
|
static get encapsulation() { return "shadow"; }
|
|
@@ -353,6 +353,7 @@ ez-text-input:hover .btn__close, ez-text-input:focus .btn__close {
|
|
|
353
353
|
.ez-search-plus__text-input{
|
|
354
354
|
--ez-text-input--border-top-left-radius: 0px;
|
|
355
355
|
--ez-text-input--border-bottom-left-radius: 0px;
|
|
356
|
+
outline: none;
|
|
356
357
|
}
|
|
357
358
|
|
|
358
359
|
.ez-search-plus__code-input-no-border{
|
|
@@ -370,4 +371,5 @@ ez-text-input:hover .btn__close, ez-text-input:focus .btn__close {
|
|
|
370
371
|
|
|
371
372
|
.description-input-container{
|
|
372
373
|
width: 100%;
|
|
374
|
+
outline: none;
|
|
373
375
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { h, Host, } from "@stencil/core";
|
|
2
2
|
import { ElementIDUtils, KeyboardManager, StringUtils, } from "@sankhyalabs/core";
|
|
3
3
|
import { CSSVarsUtils, SearchMode } from "../../utils";
|
|
4
|
+
import initI18n from '../../utils/i18n';
|
|
4
5
|
export class EzSearchPlus {
|
|
5
6
|
constructor() {
|
|
6
7
|
this.SEARCH_DESCRIPTION_TIMEOUT = 300;
|
|
@@ -120,14 +121,17 @@ export class EzSearchPlus {
|
|
|
120
121
|
async isInvalid() {
|
|
121
122
|
return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
|
|
122
123
|
}
|
|
123
|
-
componentWillLoad() {
|
|
124
|
+
async componentWillLoad() {
|
|
125
|
+
this.i18n = await initI18n();
|
|
124
126
|
if (this.value && StringUtils.isEmpty(this.codeValue)) {
|
|
125
|
-
this.observeValue(this.value, undefined);
|
|
127
|
+
await this.observeValue(this.value, undefined);
|
|
126
128
|
}
|
|
127
129
|
}
|
|
128
130
|
componentDidLoad() {
|
|
129
131
|
CSSVarsUtils.applyVarsTextInput(this.el, this._textInputCodeValue);
|
|
130
132
|
CSSVarsUtils.applyVarsTextInput(this.el, this._textInputDescriptionValue);
|
|
133
|
+
}
|
|
134
|
+
connectedCallback() {
|
|
131
135
|
this.initKeyboardManager();
|
|
132
136
|
if (this.autoFocus) {
|
|
133
137
|
requestAnimationFrame(() => {
|
|
@@ -137,13 +141,14 @@ export class EzSearchPlus {
|
|
|
137
141
|
}
|
|
138
142
|
clearSearch() {
|
|
139
143
|
this.value = null;
|
|
144
|
+
this.descriptionValue = null;
|
|
140
145
|
}
|
|
141
146
|
getCodLabel() {
|
|
142
147
|
var _a;
|
|
143
148
|
if (this.hideDescriptionInput) {
|
|
144
149
|
return this.label;
|
|
145
150
|
}
|
|
146
|
-
return (_a = this.codLabel) !== null && _a !== void 0 ? _a : "
|
|
151
|
+
return (_a = this.codLabel) !== null && _a !== void 0 ? _a : this.i18n("ez-search-plus.defaultCodeLabel");
|
|
147
152
|
}
|
|
148
153
|
async normalizeCodeToDescriptionValue(valueToNormalize) {
|
|
149
154
|
if (!valueToNormalize) {
|
|
@@ -185,7 +190,7 @@ export class EzSearchPlus {
|
|
|
185
190
|
}
|
|
186
191
|
async loadDescriptionValueByCode(codeValue) {
|
|
187
192
|
if (!this.optionLoader) {
|
|
188
|
-
console.warn("
|
|
193
|
+
console.warn(this.i18n("ez-search-plus.optionLoaderNotDefined"));
|
|
189
194
|
return "";
|
|
190
195
|
}
|
|
191
196
|
try {
|
|
@@ -215,7 +220,7 @@ export class EzSearchPlus {
|
|
|
215
220
|
}
|
|
216
221
|
async loadAdvancedSearch() {
|
|
217
222
|
if (!this.optionLoader) {
|
|
218
|
-
console.warn("
|
|
223
|
+
console.warn(this.i18n("ez-search-plus.optionLoaderNotDefined"));
|
|
219
224
|
return;
|
|
220
225
|
}
|
|
221
226
|
const searchArgument = { mode: SearchMode.ADVANCED, argument: "" };
|
|
@@ -332,7 +337,7 @@ export class EzSearchPlus {
|
|
|
332
337
|
this._keyboardManager
|
|
333
338
|
.bind("ArrowUp", () => this.handleArrowUp(), Object.assign(Object.assign({}, defaultOpts), { propagate: false }))
|
|
334
339
|
.bind("ArrowDown", () => this.handleArrowDown(), Object.assign(Object.assign({}, defaultOpts), { propagate: false }))
|
|
335
|
-
.bind("Enter", () => this.selectCurrentItem(), defaultOpts)
|
|
340
|
+
.bind("Enter", () => this.selectCurrentItem(), Object.assign(Object.assign({}, defaultOpts), { propagate: !this.stopPropagateEnterKeyEvent }))
|
|
336
341
|
.bind("Tab", () => this.handleInputTab(), defaultOpts)
|
|
337
342
|
.bind("Escape", () => this.handleInputEsc(), defaultOpts);
|
|
338
343
|
}
|
|
@@ -366,13 +371,17 @@ export class EzSearchPlus {
|
|
|
366
371
|
getLeftIconElement() {
|
|
367
372
|
return h("button", { class: "btn", slot: "leftIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handleSearchClick() }, this.canShowLoadSpinDescription() ? h("div", { class: "message__loading" }) : h("ez-icon", { iconName: "search" }));
|
|
368
373
|
}
|
|
374
|
+
handleOnEzVisibilityChange(event) {
|
|
375
|
+
event.stopPropagation();
|
|
376
|
+
this.searchDescriptionIsOpen = event.detail;
|
|
377
|
+
}
|
|
369
378
|
render() {
|
|
370
379
|
ElementIDUtils.addIDInfoIfNotExists(this.el, 'input');
|
|
371
380
|
return (h(Host, null, h("div", { class: "ez-search-plus__container" }, h("ez-text-input", { ref: elem => this._textInputCodeValue = elem, class: {
|
|
372
381
|
"ez-search-plus__code-input": !this.hideDescriptionInput,
|
|
373
382
|
"ez-search-plus__code-input-no-border": !this.hideDescriptionInput,
|
|
374
383
|
"ez-search-plus__code-input-full": this.hideDescriptionInput
|
|
375
|
-
}, "data-element-id": ElementIDUtils.getInternalIDInfo("codeInput"), "data-slave-mode": "true", enabled: !this.disableCodeInput && this.enabled, mode: this.mode, label: this.getCodLabel(), canShowError: this.canShowError, hasInvalid: !StringUtils.isEmpty(this.errorMessage), errorMessage: this.hideDescriptionInput ? this.errorMessage : "", value: this.codeValue, onFocusout: () => this.handleCodeInputFocusOut(), onFocus: () => this.handleCodeInputFocus() }, this.getLeftIconElement()), !this.hideDescriptionInput && (h("div", { class: "description-input-container" }, h("ez-text-input", { ref: elem => this._textInputDescriptionValue = elem, tabIndex: -1, class: "ez-search-plus__text-input", "data-element-id": ElementIDUtils.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: event => this.handleTextInputChangeHandler(event), onFocus: () => this.handleDescriptionInputFocus() }, this.getRightIconElement()), h("ez-popover-plus", { ref: elem => this._popover = elem, anchorElement: this.el, autoClose: true, boxWidth: 'fit-content', overlayType: 'none', useAnchorSize: true, onEzVisibilityChange: (event) => this.
|
|
384
|
+
}, "data-element-id": ElementIDUtils.getInternalIDInfo("codeInput"), "data-slave-mode": "true", enabled: !this.disableCodeInput && this.enabled, mode: this.mode, label: this.getCodLabel(), canShowError: this.canShowError, hasInvalid: !StringUtils.isEmpty(this.errorMessage), errorMessage: this.hideDescriptionInput ? this.errorMessage : "", value: this.codeValue, onFocusout: () => this.handleCodeInputFocusOut(), onFocus: () => this.handleCodeInputFocus() }, this.getLeftIconElement()), !this.hideDescriptionInput && (h("div", { class: "description-input-container" }, h("ez-text-input", { ref: elem => this._textInputDescriptionValue = elem, tabIndex: -1, class: "ez-search-plus__text-input", "data-element-id": ElementIDUtils.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: event => this.handleTextInputChangeHandler(event), onFocus: () => this.handleDescriptionInputFocus() }, this.getRightIconElement()), h("ez-popover-plus", { ref: elem => this._popover = elem, anchorElement: this.el, autoClose: true, boxWidth: 'fit-content', overlayType: 'none', useAnchorSize: true, onEzVisibilityChange: (event) => this.handleOnEzVisibilityChange(event) }, h("ez-search-result-list", { ref: (ref) => this._searchList = ref, showLoading: this.showLoading, visibleOptions: this.visibleOptions, value: this.value, showOptionValue: this.showOptionValue, onChangeValue: (evt) => this.handleSelectItem(evt) })))))));
|
|
376
385
|
}
|
|
377
386
|
static get is() { return "ez-search-plus"; }
|
|
378
387
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Host, h } from '@stencil/core';
|
|
2
2
|
import { StringUtils } from '@sankhyalabs/core';
|
|
3
|
+
import initI18n from '../../../../utils/i18n';
|
|
3
4
|
export class EzSearchResultList {
|
|
4
5
|
constructor() {
|
|
5
|
-
this._textEmptyList = "Nenhum resultado encontrado";
|
|
6
6
|
this._startHighlightTag = "<span class='card-item__highlight'>";
|
|
7
7
|
this._endHighlightTag = "</span>";
|
|
8
8
|
this.showLoading = undefined;
|
|
@@ -11,6 +11,11 @@ export class EzSearchResultList {
|
|
|
11
11
|
this.showOptionValue = true;
|
|
12
12
|
this._preSelection = undefined;
|
|
13
13
|
}
|
|
14
|
+
observerVisivleOptions(newValue) {
|
|
15
|
+
if (newValue.length) {
|
|
16
|
+
this.preSelectItemByIndex(0);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
14
19
|
async nextOption() {
|
|
15
20
|
const newPreSelection = this._preSelection === undefined ? 0 : Math.min(this._preSelection + 1, this.visibleOptions.length - 1);
|
|
16
21
|
this.preSelectItemByIndex(newPreSelection);
|
|
@@ -26,18 +31,24 @@ export class EzSearchResultList {
|
|
|
26
31
|
}
|
|
27
32
|
selectOption(newOption) {
|
|
28
33
|
const newOptionsReplaced = Object.assign(Object.assign({}, newOption), { value: newOption === null || newOption === void 0 ? void 0 : newOption.value, label: newOption === null || newOption === void 0 ? void 0 : newOption.label });
|
|
29
|
-
const newOptionsFormatted = Object.assign(Object.assign({}, newOptionsReplaced), { value: newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.value, label: newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.label });
|
|
34
|
+
const newOptionsFormatted = Object.assign(Object.assign({}, newOptionsReplaced), { value: this.removeHighLight(newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.value), label: this.removeHighLight(newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.label) });
|
|
30
35
|
this.changeValue.emit(newOptionsFormatted);
|
|
31
36
|
}
|
|
37
|
+
removeHighLight(text) {
|
|
38
|
+
if (!text || typeof text !== 'string') {
|
|
39
|
+
return text;
|
|
40
|
+
}
|
|
41
|
+
const startHighlight = new RegExp(this._startHighlightTag, 'g');
|
|
42
|
+
const endHighlight = new RegExp(this._endHighlightTag, 'g');
|
|
43
|
+
return text.replace(startHighlight, '').replace(endHighlight, '');
|
|
44
|
+
}
|
|
32
45
|
createAndSelectOption(detail) {
|
|
33
46
|
let { key, title } = detail;
|
|
34
47
|
key = String(key !== null && key !== void 0 ? key : "");
|
|
35
|
-
const startHighlight = new RegExp(this._startHighlightTag, 'g');
|
|
36
|
-
const endHighlight = new RegExp(this._endHighlightTag, 'g');
|
|
37
48
|
title = StringUtils.decodeHtmlEntities(title);
|
|
38
49
|
const option = {
|
|
39
|
-
value:
|
|
40
|
-
label:
|
|
50
|
+
value: this.removeHighLight(key),
|
|
51
|
+
label: this.removeHighLight(title)
|
|
41
52
|
};
|
|
42
53
|
this.selectOption(option);
|
|
43
54
|
}
|
|
@@ -77,10 +88,13 @@ export class EzSearchResultList {
|
|
|
77
88
|
canShowListOptions() {
|
|
78
89
|
return !this.showLoading && this.visibleOptions.length > 0;
|
|
79
90
|
}
|
|
91
|
+
async componentWillLoad() {
|
|
92
|
+
this.i18n = await initI18n();
|
|
93
|
+
}
|
|
80
94
|
render() {
|
|
81
95
|
return (h(Host, null, h("ul", { class: "list-options", ref: elem => this._optionsList = elem }, !this.showLoading
|
|
82
96
|
&& this.visibleOptions.length === 0
|
|
83
|
-
&& h("div", { class: "message" }, h("span", { class: "message__no-result" }, this.
|
|
97
|
+
&& h("div", { class: "message" }, h("span", { class: "message__no-result" }, this.i18n("ez-search-plus.emptyList"))), this.showLoading && (h("div", { class: "loading__container" }, h("ez-skeleton", { count: 4, height: '20px' }))), this.canShowListOptions() && this.visibleOptions.map((opt, index) => this.buildItem(opt, index)))));
|
|
84
98
|
}
|
|
85
99
|
static get is() { return "ez-search-result-list"; }
|
|
86
100
|
static get encapsulation() { return "shadow"; }
|
|
@@ -275,4 +289,10 @@ export class EzSearchResultList {
|
|
|
275
289
|
}
|
|
276
290
|
};
|
|
277
291
|
}
|
|
292
|
+
static get watchers() {
|
|
293
|
+
return [{
|
|
294
|
+
"propName": "visibleOptions",
|
|
295
|
+
"methodName": "observerVisivleOptions"
|
|
296
|
+
}];
|
|
297
|
+
}
|
|
278
298
|
}
|
|
@@ -2,7 +2,7 @@ import { h, Host } from "@stencil/core";
|
|
|
2
2
|
import { ElementIDUtils } from "@sankhyalabs/core";
|
|
3
3
|
import { EzScrollDirection } from "../ez-scroller/EzScrollDirection";
|
|
4
4
|
import { ModeMenuEnum, SizeMenuEnum, TypeMenuEnum } from "./interfaces";
|
|
5
|
-
import
|
|
5
|
+
import initI18n from '../../utils/i18n';
|
|
6
6
|
export class EzSidebarNavigator {
|
|
7
7
|
constructor() {
|
|
8
8
|
this.handleToggleSidebar = () => {
|
|
@@ -41,6 +41,9 @@ export class EzSidebarNavigator {
|
|
|
41
41
|
async openSidebar() {
|
|
42
42
|
this.open = true;
|
|
43
43
|
}
|
|
44
|
+
async componentWillLoad() {
|
|
45
|
+
this.i18n = await initI18n();
|
|
46
|
+
}
|
|
44
47
|
componentDidLoad() {
|
|
45
48
|
if (this.type === TypeMenuEnum.FIXED) {
|
|
46
49
|
this.mode = ModeMenuEnum.FIXED;
|
|
@@ -49,7 +52,7 @@ export class EzSidebarNavigator {
|
|
|
49
52
|
}
|
|
50
53
|
render() {
|
|
51
54
|
ElementIDUtils.addIDInfoIfNotExists(this._element);
|
|
52
|
-
return (h(Host, null, h("ez-sidebar-button", { class: this.open ? "hidden" : "", onEzClick: this.mode === ModeMenuEnum.FIXED ? this.handleToggleSidebar : undefined, onMouseEnter: this.mode === ModeMenuEnum.FLOAT ? this.handleToggleSidebar : undefined, "aria-controls": "navigator", "aria-expanded": this.open, "data-element-id": ElementIDUtils.getInternalIDInfo("openButton") }), this.open ? (h("aside", { tabIndex: -1, id: "navigator", class: `ez-col ez-col--sd-12 ez-col--tb-3 ez-sidebar-navigator ${this.mode === ModeMenuEnum.FLOAT ? 'dynamic' : 'fixed'} ${this.isResponsive ? 'responsive' : this.size} ${!this.open ? "hidden" : "show"}`, "data-element-id": ElementIDUtils.getInternalIDInfo("sidebar"), onMouseLeave: this.type !== TypeMenuEnum.FIXED && this.mode === ModeMenuEnum.FLOAT ? this.handleToggleSidebar : undefined }, h("header", { class: "ez-sidebar-navigator__header" }, h("slot", { name: "start" }), this.titleMenu !== '' && (h("div", { class: "ez-sidebar-navigator__title", title: this.titleMenu }, this.titleMenu)), !this.titleMenu && (h("slot", { name: "content" })), h("div", { class: "ez-sidebar-navigator__end" }, h("slot", { name: "end" }), (this.type === TypeMenuEnum.DYNAMIC && this.showFixedButton) && (h("ez-button", { onClick: this.handleToggleMode, mode: "icon", size: "small", iconName: this.mode === ModeMenuEnum.FIXED ? "un-pin" : "push-pin", title: this.mode === ModeMenuEnum.FIXED ?
|
|
55
|
+
return (h(Host, null, h("ez-sidebar-button", { class: this.open ? "hidden" : "", onEzClick: this.mode === ModeMenuEnum.FIXED ? this.handleToggleSidebar : undefined, onMouseEnter: this.mode === ModeMenuEnum.FLOAT ? this.handleToggleSidebar : undefined, "aria-controls": "navigator", "aria-expanded": this.open, "data-element-id": ElementIDUtils.getInternalIDInfo("openButton") }), this.open ? (h("aside", { tabIndex: -1, id: "navigator", class: `ez-col ez-col--sd-12 ez-col--tb-3 ez-sidebar-navigator ${this.mode === ModeMenuEnum.FLOAT ? 'dynamic' : 'fixed'} ${this.isResponsive ? 'responsive' : this.size} ${!this.open ? "hidden" : "show"}`, "data-element-id": ElementIDUtils.getInternalIDInfo("sidebar"), onMouseLeave: this.type !== TypeMenuEnum.FIXED && this.mode === ModeMenuEnum.FLOAT ? this.handleToggleSidebar : undefined }, h("header", { class: "ez-sidebar-navigator__header" }, h("slot", { name: "start" }), this.titleMenu !== '' && (h("div", { class: "ez-sidebar-navigator__title", title: this.titleMenu }, this.titleMenu)), !this.titleMenu && (h("slot", { name: "content" })), h("div", { class: "ez-sidebar-navigator__end" }, h("slot", { name: "end" }), (this.type === TypeMenuEnum.DYNAMIC && this.showFixedButton) && (h("ez-button", { onClick: this.handleToggleMode, mode: "icon", size: "small", iconName: this.mode === ModeMenuEnum.FIXED ? "un-pin" : "push-pin", title: this.mode === ModeMenuEnum.FIXED ? this.i18n("ez-sidebar.unPinMenu") : this.i18n("ez-sidebar.pushPinMenu"), "aria-label": this.mode === ModeMenuEnum.FIXED ? this.i18n("ez-sidebar.unPinMenu") : this.i18n("ez-sidebar.pushPinMenu"), "aria-controls": "navigator", "data-element-id": ElementIDUtils.getInternalIDInfo("pinButton") })), (this.mode === ModeMenuEnum.FIXED && this.showCollapseMenu) && (h("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": ElementIDUtils.getInternalIDInfo("closeButton") })))), this.titleMenu && (h("slot", { name: "content" })), h("ez-scroller", { class: "ez-sidebar-navigator__content", direction: EzScrollDirection.VERTICAL, activeShadow: true }, h("slot", null)), h("footer", { class: "ez-sidebar-navigator__footer" }, h("slot", { name: "footer" }))))
|
|
53
56
|
: undefined));
|
|
54
57
|
}
|
|
55
58
|
static get is() { return "ez-sidebar-navigator"; }
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { h } from '@stencil/core';
|
|
2
2
|
import { ALLOWED_ANIMATIONS, ALLOWED_VARIANTS, DEFAULT_VALUES, SKELETON_ARIA, VARIANT_TYPES, ANIMATION_TYPES, } from './ez-skeleton.constants';
|
|
3
|
+
import initI18n from '../../utils/i18n';
|
|
3
4
|
export class EzSkeleton {
|
|
4
5
|
constructor() {
|
|
5
6
|
this.items = [];
|
|
@@ -14,7 +15,8 @@ export class EzSkeleton {
|
|
|
14
15
|
this.marginLeft = null;
|
|
15
16
|
this.animation = DEFAULT_VALUES.ANIMATION;
|
|
16
17
|
}
|
|
17
|
-
componentWillLoad() {
|
|
18
|
+
async componentWillLoad() {
|
|
19
|
+
this.i18n = await initI18n();
|
|
18
20
|
this.initializeItems();
|
|
19
21
|
}
|
|
20
22
|
componentWillUpdate() {
|
|
@@ -105,7 +107,7 @@ export class EzSkeleton {
|
|
|
105
107
|
return this.renderSkeletonSpan(index, config);
|
|
106
108
|
}
|
|
107
109
|
renderSkeletonSpan(index, config) {
|
|
108
|
-
return (h("span", { key: index, class: config === null || config === void 0 ? void 0 : config.skeletonClasses, style: config === null || config === void 0 ? void 0 : config.styles, "data-busy": SKELETON_ARIA.DATA_BUSY, "data-valuemin": SKELETON_ARIA.DATA_VALUEMIN, "data-valuemax": SKELETON_ARIA.DATA_VALUEMAX, "data-valuetext":
|
|
110
|
+
return (h("span", { key: index, class: config === null || config === void 0 ? void 0 : config.skeletonClasses, style: config === null || config === void 0 ? void 0 : config.styles, "data-busy": SKELETON_ARIA.DATA_BUSY, "data-valuemin": SKELETON_ARIA.DATA_VALUEMIN, "data-valuemax": SKELETON_ARIA.DATA_VALUEMAX, "data-valuetext": this.i18n("app.loading"), role: SKELETON_ARIA.ROLE, tabindex: SKELETON_ARIA.TABINDEX }));
|
|
109
111
|
}
|
|
110
112
|
render() {
|
|
111
113
|
return !this.template ? this.items.map((_, index) => this.renderSkeletonItem(index)) : this.renderSkeletonTemplate(this.template);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { h } from '@stencil/core';
|
|
2
2
|
import Sortable, { MultiDrag } from 'sortablejs';
|
|
3
3
|
import { ArrayUtils } from '@sankhyalabs/core';
|
|
4
|
+
import initI18n from '../../utils/i18n';
|
|
4
5
|
Sortable.mount(new MultiDrag());
|
|
5
6
|
export class EzSortableList {
|
|
6
7
|
constructor() {
|
|
@@ -11,9 +12,9 @@ export class EzSortableList {
|
|
|
11
12
|
this.group = 'default';
|
|
12
13
|
this.dataSource = [];
|
|
13
14
|
this.idSortableList = 'DEFAULT_LIST';
|
|
14
|
-
this.entityLabel =
|
|
15
|
-
this.entityLabelPlural =
|
|
16
|
-
this.emptyMessage =
|
|
15
|
+
this.entityLabel = undefined;
|
|
16
|
+
this.entityLabelPlural = undefined;
|
|
17
|
+
this.emptyMessage = undefined;
|
|
17
18
|
this.hoverFeedback = true;
|
|
18
19
|
this.enableMultipleSelection = false;
|
|
19
20
|
this.removeItensMoved = false;
|
|
@@ -34,6 +35,12 @@ export class EzSortableList {
|
|
|
34
35
|
});
|
|
35
36
|
this.ezSelectItens.emit([]);
|
|
36
37
|
}
|
|
38
|
+
async componentWillLoad() {
|
|
39
|
+
this.i18n = await initI18n();
|
|
40
|
+
this.emptyMessage = this.i18n("ez-sortable-list.emptyMessage");
|
|
41
|
+
this.entityLabel = this.i18n("ez-sortable-list.entityLabel");
|
|
42
|
+
this.entityLabelPlural = this.i18n("ez-sortable-list.entityLabelPlural");
|
|
43
|
+
}
|
|
37
44
|
componentDidLoad() {
|
|
38
45
|
this.initSortable();
|
|
39
46
|
}
|
|
@@ -174,7 +181,7 @@ export class EzSortableList {
|
|
|
174
181
|
}
|
|
175
182
|
}
|
|
176
183
|
buildTotalizer() {
|
|
177
|
-
return
|
|
184
|
+
return `${this.i18n("ez-sortable-list.total")} ${this.dataSource.length} ${this.dataSource.length === 1 ? this.entityLabel : this.entityLabelPlural}`;
|
|
178
185
|
}
|
|
179
186
|
renderItems() {
|
|
180
187
|
const itemsToRender = ArrayUtils.applyStringFilter(this.filterTerm, this.dataSource);
|
|
@@ -196,7 +203,7 @@ export class EzSortableList {
|
|
|
196
203
|
renderHeader() {
|
|
197
204
|
if (this.hideHeader)
|
|
198
205
|
return;
|
|
199
|
-
return (h("div", { class: 'sortable-header' }, h("span", { class: 'sortable-label' }, this.title), h("ez-filter-input", { label:
|
|
206
|
+
return (h("div", { class: 'sortable-header' }, h("span", { class: 'sortable-label' }, this.title), h("ez-filter-input", { label: `${this.i18n("ez-sortable-list.search")} ${this.entityLabel}`, mode: "slim", onEzChange: evt => this.handleFilterChanged(evt) })));
|
|
200
207
|
}
|
|
201
208
|
render() {
|
|
202
209
|
return (h("div", { class: 'sortable-content' }, this.renderHeader(), h("div", { class: `sortable-list ${this.dataSource.length < 1 ? 'empty-content' : ''} list-scroller--fix`, "data-content": this.emptyMessage, style: { '--empty-content': `"${this.emptyMessage}"` }, id: this.idSortableList, key: this.idSortableList }, this.renderItems()), this.renderTotalizer()));
|
|
@@ -342,8 +349,7 @@ export class EzSortableList {
|
|
|
342
349
|
"text": "Nome da entidade listada.\nExemplo: \"Campo\", \"Item\", \"Empresa\"."
|
|
343
350
|
},
|
|
344
351
|
"attribute": "entity-label",
|
|
345
|
-
"reflect": false
|
|
346
|
-
"defaultValue": "'item'"
|
|
352
|
+
"reflect": false
|
|
347
353
|
},
|
|
348
354
|
"entityLabelPlural": {
|
|
349
355
|
"type": "string",
|
|
@@ -360,8 +366,7 @@ export class EzSortableList {
|
|
|
360
366
|
"text": "Varia\u00E7\u00E3o plural do nome da entidade listada.\nExemplo: \"Campos\", \"Itens\", \"Empresas\"."
|
|
361
367
|
},
|
|
362
368
|
"attribute": "entity-label-plural",
|
|
363
|
-
"reflect": false
|
|
364
|
-
"defaultValue": "'itens'"
|
|
369
|
+
"reflect": false
|
|
365
370
|
},
|
|
366
371
|
"emptyMessage": {
|
|
367
372
|
"type": "string",
|
|
@@ -378,8 +383,7 @@ export class EzSortableList {
|
|
|
378
383
|
"text": "Mensagem exibida quando a lista est\u00E1 vazia"
|
|
379
384
|
},
|
|
380
385
|
"attribute": "empty-message",
|
|
381
|
-
"reflect": false
|
|
382
|
-
"defaultValue": "'Nenhum item na lista'"
|
|
386
|
+
"reflect": false
|
|
383
387
|
},
|
|
384
388
|
"hoverFeedback": {
|
|
385
389
|
"type": "boolean",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
2
2
|
import { h } from '@stencil/core';
|
|
3
|
+
import initI18n from '../../utils/i18n';
|
|
3
4
|
export class EzSplitButton {
|
|
4
5
|
constructor() {
|
|
5
|
-
this.rightDefaultTitle = 'Mais opções';
|
|
6
6
|
this.show = false;
|
|
7
7
|
this.enabled = true;
|
|
8
8
|
this.iconName = undefined;
|
|
@@ -10,7 +10,7 @@ export class EzSplitButton {
|
|
|
10
10
|
this.items = undefined;
|
|
11
11
|
this.label = undefined;
|
|
12
12
|
this.leftTitle = undefined;
|
|
13
|
-
this.rightTitle =
|
|
13
|
+
this.rightTitle = undefined;
|
|
14
14
|
this.mode = 'default';
|
|
15
15
|
this.size = 'medium';
|
|
16
16
|
this.itemBuilder = undefined;
|
|
@@ -123,7 +123,8 @@ export class EzSplitButton {
|
|
|
123
123
|
window.removeEventListener('scroll', this.positionDropdown.bind(this));
|
|
124
124
|
window.addEventListener('scroll', this.positionDropdown.bind(this));
|
|
125
125
|
}
|
|
126
|
-
componentWillLoad() {
|
|
126
|
+
async componentWillLoad() {
|
|
127
|
+
this.i18n = await initI18n();
|
|
127
128
|
this.setEvents();
|
|
128
129
|
}
|
|
129
130
|
componentWillRender() {
|
|
@@ -149,7 +150,7 @@ export class EzSplitButton {
|
|
|
149
150
|
const hasIconButton = this.shouldShowIconOnLeftButton();
|
|
150
151
|
const hasLabelButton = this.shouldShowLabelOnLeftButton();
|
|
151
152
|
const iconSize = this.getIconSize();
|
|
152
|
-
return (h("div", { class: "label-icon" }, h("button", { class: `ez-split-button__left-button ${iconSize} ${this.mode}`, title: this.leftTitle || this.label, type: "button", disabled: !this.enabled, onClick: () => { this.handleButtonClick(); }, ref: el => (this.leftButton = el) }, hasIconButton && h("ez-icon", { href: this.image, iconName: this.iconName, size: iconSize }), hasLabelButton && h("label", { title: this.leftTitle || this.label }, this.label)), h("div", { class: "dropdown" }, h("button", { class: `ez-split-button__right-button ${iconSize} ez-split-button__right-button--${iconSize} ez-split-button__right-button--divider`, title: this.rightTitle || this.
|
|
153
|
+
return (h("div", { class: "label-icon" }, h("button", { class: `ez-split-button__left-button ${iconSize} ${this.mode}`, title: this.leftTitle || this.label, type: "button", disabled: !this.enabled, onClick: () => { this.handleButtonClick(); }, ref: el => (this.leftButton = el) }, hasIconButton && h("ez-icon", { href: this.image, iconName: this.iconName, size: iconSize }), hasLabelButton && h("label", { title: this.leftTitle || this.label }, this.label)), h("div", { class: "dropdown" }, h("button", { class: `ez-split-button__right-button ${iconSize} ez-split-button__right-button--${iconSize} ez-split-button__right-button--divider`, title: this.rightTitle || this.i18n("ez-split-button.moreOptions"), type: "button", disabled: !this.enabled, onClick: () => { this.toggleDropdown(); }, ref: el => (this.rightButton = el) }, h("ez-icon", { class: `ez-split-button__right-button-container ` + (iconSize ? `btn-icon--${iconSize}` : ''), iconName: 'chevron-down', size: iconSize })), h("div", { class: `dropdown-content dropdown-content--${this.size}`, ref: (ref) => (this.dropdownParent = ref) }, this.show && (h("ez-dropdown", { items: this.items, onClick: evt => { evt.stopPropagation(); }, onEzOutsideClick: () => { this.closeDropdown(); }, onEzClick: evt => { this.handleDropdownItemClick(evt); }, onEzSubActionClick: evt => { this.handleDropdownSubActionClick(evt); }, itemBuilder: this.itemBuilder }))))));
|
|
153
154
|
}
|
|
154
155
|
shouldShowLabelOnLeftButton() {
|
|
155
156
|
return ['icon-left', 'default'].includes(this.mode);
|
|
@@ -313,8 +314,7 @@ export class EzSplitButton {
|
|
|
313
314
|
"text": "Texto a ser apresentado como title do bot\u00E3o dropdown"
|
|
314
315
|
},
|
|
315
316
|
"attribute": "right-title",
|
|
316
|
-
"reflect": true
|
|
317
|
-
"defaultValue": "'Mais op\u00E7\u00F5es'"
|
|
317
|
+
"reflect": true
|
|
318
318
|
},
|
|
319
319
|
"mode": {
|
|
320
320
|
"type": "string",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Host, h } from '@stencil/core';
|
|
2
2
|
import { CSSVarsUtils } from '../../../../utils';
|
|
3
|
+
import initI18n from '../../../../utils/i18n';
|
|
3
4
|
export class SplitItem {
|
|
4
5
|
constructor() {
|
|
5
6
|
this.label = undefined;
|
|
@@ -16,11 +17,14 @@ export class SplitItem {
|
|
|
16
17
|
this._expanded = !this._expanded;
|
|
17
18
|
(_b = (_a = this.expandButtonRef.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('button')) === null || _b === void 0 ? void 0 : _b.blur();
|
|
18
19
|
}
|
|
20
|
+
async componentWillLoad() {
|
|
21
|
+
this.i18n = await initI18n();
|
|
22
|
+
}
|
|
19
23
|
componentDidLoad() {
|
|
20
24
|
CSSVarsUtils.applyVarsGrid(this._element, this._slot.children[0]);
|
|
21
25
|
}
|
|
22
26
|
render() {
|
|
23
|
-
return (h(Host, { class: `box_split-item ${this._expanded ? 'expanded__item' : ''} ${this.structural ? 'structural__item' : 'content__item'}`, ref: el => (this._element = el) }, h("div", { class: "ez-split-item--header" }, h("slot", { name: "leftButtons" }), h("div", { class: "ez-split-item--header-title" }, this.label && (h("h3", { class: "ez-text ez-text--primary ez-title ez-title--medium ez-margin--small", title: this.label }, this.label))), h("div", { class: "ez-split-item--header-buttons" }, h("slot", { name: "rightButtons" }), this.enableExpand && (h("ez-button", { ref: el => this.expandButtonRef = el, size: "small", mode: "icon", iconName: "expand", class: 'ez-button--tertiary', onClick: () => this.toggleExpandItem(), title: this._expanded ? '
|
|
27
|
+
return (h(Host, { class: `box_split-item ${this._expanded ? 'expanded__item' : ''} ${this.structural ? 'structural__item' : 'content__item'}`, ref: el => (this._element = el) }, h("div", { class: "ez-split-item--header" }, h("slot", { name: "leftButtons" }), h("div", { class: "ez-split-item--header-title" }, this.label && (h("h3", { class: "ez-text ez-text--primary ez-title ez-title--medium ez-margin--small", title: this.label }, this.label))), h("div", { class: "ez-split-item--header-buttons" }, h("slot", { name: "rightButtons" }), this.enableExpand && (h("ez-button", { ref: el => this.expandButtonRef = el, size: "small", mode: "icon", iconName: "expand", class: 'ez-button--tertiary', onClick: () => this.toggleExpandItem(), title: this._expanded ? this.i18n('app.collapse') : this.i18n('app.expand') })))), h("div", { class: "ez-split-item--content grid_height-0", ref: el => (this._slot = el) }, h("slot", null))));
|
|
24
28
|
}
|
|
25
29
|
static get is() { return "ez-split-item"; }
|
|
26
30
|
static get originalStyleUrls() {
|