@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
|
@@ -0,0 +1,575 @@
|
|
|
1
|
+
import { h, Host } from '@stencil/core';
|
|
2
|
+
import { KeyboardManager, ObjectUtils } from '@sankhyalabs/core';
|
|
3
|
+
import { RICH_TOOLBAR_COMMANDS, RICH_TOOLBAR_FORMAT_TAGS, } from './ez-rich-toolbar/RichToolbarHelper';
|
|
4
|
+
import DOMPurify from 'dompurify';
|
|
5
|
+
import initI18n from '../../utils/i18n';
|
|
6
|
+
export class EzRichText {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.historyStack = [];
|
|
9
|
+
this.historyIndex = -1;
|
|
10
|
+
this.previewMode = false;
|
|
11
|
+
this.showPreview = true;
|
|
12
|
+
this.value = '';
|
|
13
|
+
this.label = undefined;
|
|
14
|
+
this.mode = "regular";
|
|
15
|
+
this.enabled = true;
|
|
16
|
+
this.rows = 6;
|
|
17
|
+
this.errorMessage = undefined;
|
|
18
|
+
this.canShowError = true;
|
|
19
|
+
this.showConfigs = true;
|
|
20
|
+
this.showTextFormat = true;
|
|
21
|
+
this.showUndoRedo = true;
|
|
22
|
+
}
|
|
23
|
+
observeValue(newValue, oldValue) {
|
|
24
|
+
if (ObjectUtils.equals(newValue, oldValue))
|
|
25
|
+
return;
|
|
26
|
+
this.ezChange.emit(newValue);
|
|
27
|
+
}
|
|
28
|
+
observeErrorMessage(newValue) {
|
|
29
|
+
if (newValue && this.previewMode) {
|
|
30
|
+
this.previewMode = false;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
async handleExecuteToolbarCommand(event) {
|
|
34
|
+
const { command, value } = event.detail;
|
|
35
|
+
await this.executeCommand(command, value);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Aplica o foco no campo.
|
|
39
|
+
*/
|
|
40
|
+
async setFocus() {
|
|
41
|
+
this.handleFocus();
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Remove o foco do campo.
|
|
45
|
+
*/
|
|
46
|
+
async setBlur() {
|
|
47
|
+
var _a;
|
|
48
|
+
await ((_a = this.textAreaRef) === null || _a === void 0 ? void 0 : _a.setBlur());
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Retorna se o conteúdo é inválido.
|
|
52
|
+
*/
|
|
53
|
+
async isInvalid() {
|
|
54
|
+
return typeof this.errorMessage === 'string' && this.errorMessage.trim() !== '';
|
|
55
|
+
}
|
|
56
|
+
bindPreview() {
|
|
57
|
+
if (!this._keyboardManager || !this.showPreview)
|
|
58
|
+
return;
|
|
59
|
+
this._keyboardManager
|
|
60
|
+
.bind('ctrl + p', async () => {
|
|
61
|
+
await this.togglePreview();
|
|
62
|
+
}, { description: 'Entra em modo de pré visualização.', element: this.element });
|
|
63
|
+
}
|
|
64
|
+
bindConfigs() {
|
|
65
|
+
if (!this._keyboardManager || !this.showConfigs)
|
|
66
|
+
return;
|
|
67
|
+
this._keyboardManager
|
|
68
|
+
.bind('ctrl + l', async () => {
|
|
69
|
+
await this.handleFormatSelection(RICH_TOOLBAR_FORMAT_TAGS.LIST);
|
|
70
|
+
}, { description: this.i18n("ez-rich-text.listShortcut"), element: this.element })
|
|
71
|
+
.bind('ctrl + k', async () => {
|
|
72
|
+
await this.handleLink();
|
|
73
|
+
}, { description: this.i18n("ez-rich-text.linkShortcut"), element: this.element })
|
|
74
|
+
.bind('ctrl + o', async () => {
|
|
75
|
+
await this.handleImage();
|
|
76
|
+
}, { description: this.i18n("ez-rich-text.imageShortcut"), element: this.element });
|
|
77
|
+
}
|
|
78
|
+
bindTextFormat() {
|
|
79
|
+
if (!this._keyboardManager || !this.showTextFormat)
|
|
80
|
+
return;
|
|
81
|
+
this._keyboardManager
|
|
82
|
+
.bind('ctrl + b', async () => {
|
|
83
|
+
await this.handleFormatSelection(RICH_TOOLBAR_FORMAT_TAGS.BOLD);
|
|
84
|
+
}, { description: this.i18n("ez-rich-text.boldShortcut"), element: this.element })
|
|
85
|
+
.bind('ctrl + i', async () => {
|
|
86
|
+
await this.handleFormatSelection(RICH_TOOLBAR_FORMAT_TAGS.ITALIC);
|
|
87
|
+
}, { description: this.i18n("ez-rich-text.italicShortcut"), element: this.element })
|
|
88
|
+
.bind('ctrl + u', async () => {
|
|
89
|
+
await this.handleFormatSelection(RICH_TOOLBAR_FORMAT_TAGS.UNDERLINE);
|
|
90
|
+
}, { description: this.i18n("ez-rich-text.underlineShortcut"), element: this.element });
|
|
91
|
+
}
|
|
92
|
+
initKeyboardManager() {
|
|
93
|
+
this._keyboardManager = new KeyboardManager({ propagate: false, element: this.element });
|
|
94
|
+
this._keyboardManager
|
|
95
|
+
.bind('ctrl + Enter', async () => {
|
|
96
|
+
await this.handleFormatSelection(RICH_TOOLBAR_FORMAT_TAGS.BREAK_LINE);
|
|
97
|
+
}, { description: this.i18n("ez-rich-text.breakLineShortcut"), element: this.element })
|
|
98
|
+
.bind('ctrl + z', async () => {
|
|
99
|
+
await this.handleUndo();
|
|
100
|
+
}, { description: this.i18n("ez-rich-text.undoShortcut"), element: this.element })
|
|
101
|
+
.bind('ctrl + x', async () => {
|
|
102
|
+
await this.handleRedo();
|
|
103
|
+
}, { description: this.i18n("ez-rich-text.redoShortcut"), element: this.element });
|
|
104
|
+
this.bindPreview();
|
|
105
|
+
this.bindConfigs();
|
|
106
|
+
this.bindTextFormat();
|
|
107
|
+
}
|
|
108
|
+
async executeCommand(command, value) {
|
|
109
|
+
switch (command) {
|
|
110
|
+
case RICH_TOOLBAR_COMMANDS.FOCUS:
|
|
111
|
+
this.handleFocus();
|
|
112
|
+
break;
|
|
113
|
+
case RICH_TOOLBAR_COMMANDS.PREVIEW:
|
|
114
|
+
await this.togglePreview();
|
|
115
|
+
break;
|
|
116
|
+
case RICH_TOOLBAR_COMMANDS.FORMAT:
|
|
117
|
+
await this.handleFormatSelection(value);
|
|
118
|
+
break;
|
|
119
|
+
case RICH_TOOLBAR_COMMANDS.UNDO:
|
|
120
|
+
await this.handleUndo();
|
|
121
|
+
break;
|
|
122
|
+
case RICH_TOOLBAR_COMMANDS.REDO:
|
|
123
|
+
await this.handleRedo();
|
|
124
|
+
break;
|
|
125
|
+
case RICH_TOOLBAR_COMMANDS.LINK:
|
|
126
|
+
await this.handleLink();
|
|
127
|
+
break;
|
|
128
|
+
case RICH_TOOLBAR_COMMANDS.IMAGE:
|
|
129
|
+
await this.handleImage();
|
|
130
|
+
break;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
handleFocus() {
|
|
134
|
+
this.previewMode = false;
|
|
135
|
+
requestAnimationFrame(async () => {
|
|
136
|
+
await this.textAreaRef.setFocus();
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
async handleLink() {
|
|
140
|
+
this.previewMode = false;
|
|
141
|
+
requestAnimationFrame(async () => {
|
|
142
|
+
await this.linkBuilderRef.show(this.getSelectedText());
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
async handleImage() {
|
|
146
|
+
this.previewMode = false;
|
|
147
|
+
await this.imageUploaderRef.show();
|
|
148
|
+
}
|
|
149
|
+
async handleRedo() {
|
|
150
|
+
this.previewMode = false;
|
|
151
|
+
requestAnimationFrame(async () => {
|
|
152
|
+
this.redo();
|
|
153
|
+
await this.textAreaRef.setFocus();
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
async handleUndo() {
|
|
157
|
+
this.previewMode = false;
|
|
158
|
+
requestAnimationFrame(async () => {
|
|
159
|
+
this.undo();
|
|
160
|
+
await this.textAreaRef.setFocus();
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
async handleFormatSelection(value) {
|
|
164
|
+
if (!value)
|
|
165
|
+
return;
|
|
166
|
+
this.previewMode = false;
|
|
167
|
+
requestAnimationFrame(async () => {
|
|
168
|
+
await this.formatSelection(value);
|
|
169
|
+
await this.textAreaRef.setFocus();
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
async togglePreview() {
|
|
173
|
+
this.previewMode = !this.previewMode;
|
|
174
|
+
if (this.previewMode) {
|
|
175
|
+
await this.textAreaRef.setFocus();
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
getSelectedText() {
|
|
179
|
+
const textarea = this.getTextAreaElement();
|
|
180
|
+
if (!textarea)
|
|
181
|
+
return undefined;
|
|
182
|
+
const selectionStart = textarea.selectionStart;
|
|
183
|
+
const selectionEnd = textarea.selectionEnd;
|
|
184
|
+
const currentValue = this.textAreaRef.value || '';
|
|
185
|
+
return currentValue.substring(selectionStart, selectionEnd);
|
|
186
|
+
}
|
|
187
|
+
getTextAreaElement() {
|
|
188
|
+
const textAreaElement = this.element.querySelector('ez-text-area');
|
|
189
|
+
return textAreaElement.shadowRoot.querySelector('textarea');
|
|
190
|
+
}
|
|
191
|
+
async formatSelection(htmlTag) {
|
|
192
|
+
if (!this.textAreaRef)
|
|
193
|
+
return;
|
|
194
|
+
const formattedHtml = htmlTag.replace('$selection', this.getSelectedText() || '');
|
|
195
|
+
await this.textAreaRef.appendTextToSelection(formattedHtml);
|
|
196
|
+
this.value = this.textAreaRef.value;
|
|
197
|
+
this.addToHistory(this.value);
|
|
198
|
+
}
|
|
199
|
+
addToHistory(content) {
|
|
200
|
+
// Só adiciona ao histórico se for diferente do estado atual
|
|
201
|
+
if (this.historyIndex >= 0 && content === this.historyStack[this.historyIndex]) {
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
//se o tamanho do histórico chegou ao máximo, faz um splice mantendo os últimos 49 elementos
|
|
205
|
+
if (this.historyStack.length >= 50) {
|
|
206
|
+
this.historyStack.splice(0, this.historyStack.length - 49);
|
|
207
|
+
}
|
|
208
|
+
//Adiciona novo estado ao histórico
|
|
209
|
+
this.historyStack.push(content);
|
|
210
|
+
this.historyIndex = this.historyStack.length - 1;
|
|
211
|
+
}
|
|
212
|
+
undo() {
|
|
213
|
+
if (!this.canExecuteUndo())
|
|
214
|
+
return;
|
|
215
|
+
this.historyIndex--;
|
|
216
|
+
const content = this.historyStack[this.historyIndex];
|
|
217
|
+
this.value = content;
|
|
218
|
+
this.textAreaRef.value = content;
|
|
219
|
+
}
|
|
220
|
+
canExecuteUndo() {
|
|
221
|
+
return this.historyIndex > 0;
|
|
222
|
+
}
|
|
223
|
+
redo() {
|
|
224
|
+
if (!this.canExecuteRedo())
|
|
225
|
+
return;
|
|
226
|
+
this.historyIndex++;
|
|
227
|
+
this.getValueFromHistory();
|
|
228
|
+
}
|
|
229
|
+
canExecuteRedo() {
|
|
230
|
+
return this.historyIndex < this.historyStack.length - 1;
|
|
231
|
+
}
|
|
232
|
+
getValueFromHistory() {
|
|
233
|
+
const content = this.historyStack[this.historyIndex];
|
|
234
|
+
this.value = content;
|
|
235
|
+
this.textAreaRef.value = content;
|
|
236
|
+
}
|
|
237
|
+
handleTextAreaChanged(event) {
|
|
238
|
+
this.value = event.detail;
|
|
239
|
+
this.addToHistory(this.value);
|
|
240
|
+
}
|
|
241
|
+
async removeShortcuts() {
|
|
242
|
+
var _a;
|
|
243
|
+
(_a = this._keyboardManager) === null || _a === void 0 ? void 0 : _a.unbindAllShortcutKeys();
|
|
244
|
+
}
|
|
245
|
+
async componentWillLoad() {
|
|
246
|
+
this.i18n = await initI18n();
|
|
247
|
+
}
|
|
248
|
+
componentDidLoad() {
|
|
249
|
+
this.initKeyboardManager();
|
|
250
|
+
this.addToHistory(this.value);
|
|
251
|
+
}
|
|
252
|
+
async disconnectedCallback() {
|
|
253
|
+
await this.removeShortcuts();
|
|
254
|
+
}
|
|
255
|
+
getSanitizedValue() {
|
|
256
|
+
return DOMPurify.sanitize(this.value, {
|
|
257
|
+
ADD_ATTR: ['target', 'rel']
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
renderContent() {
|
|
261
|
+
if (this.previewMode) {
|
|
262
|
+
return (h("div", { id: 'rich-text-preview-container', class: "preview", innerHTML: this.getSanitizedValue() }));
|
|
263
|
+
}
|
|
264
|
+
return h("ez-text-area", { ref: (el) => this.textAreaRef = el, label: this.label, value: this.value, enabled: this.enabled, rows: this.rows, mode: this.mode, canShowError: this.canShowError, errorMessage: this.errorMessage, onEzChange: this.handleTextAreaChanged.bind(this) });
|
|
265
|
+
}
|
|
266
|
+
render() {
|
|
267
|
+
return (h(Host, null, h("div", { class: 'editor-container bordered' }, h("ez-rich-toolbar", { isPreviewMode: this.previewMode, showPreview: this.showPreview, showConfigs: this.showConfigs && this.enabled, showTextFormat: this.showTextFormat && this.enabled, showUndoRedo: this.showUndoRedo && this.enabled }), this.renderContent()), h("ez-link-builder", { ref: (el) => this.linkBuilderRef = el }), h("ez-simple-image-uploader", { ref: (el) => this.imageUploaderRef = el })));
|
|
268
|
+
}
|
|
269
|
+
static get is() { return "ez-rich-text"; }
|
|
270
|
+
static get encapsulation() { return "scoped"; }
|
|
271
|
+
static get originalStyleUrls() {
|
|
272
|
+
return {
|
|
273
|
+
"$": ["ez-rich-text.css"]
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
static get styleUrls() {
|
|
277
|
+
return {
|
|
278
|
+
"$": ["ez-rich-text.css"]
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
static get properties() {
|
|
282
|
+
return {
|
|
283
|
+
"showPreview": {
|
|
284
|
+
"type": "boolean",
|
|
285
|
+
"mutable": false,
|
|
286
|
+
"complexType": {
|
|
287
|
+
"original": "boolean",
|
|
288
|
+
"resolved": "boolean",
|
|
289
|
+
"references": {}
|
|
290
|
+
},
|
|
291
|
+
"required": false,
|
|
292
|
+
"optional": false,
|
|
293
|
+
"docs": {
|
|
294
|
+
"tags": [],
|
|
295
|
+
"text": "Informa se as op\u00E7\u00F5es a op\u00E7\u00E3o de pr\u00E9-visualiza\u00E7\u00E3o deve ser apresentada."
|
|
296
|
+
},
|
|
297
|
+
"attribute": "show-preview",
|
|
298
|
+
"reflect": false,
|
|
299
|
+
"defaultValue": "true"
|
|
300
|
+
},
|
|
301
|
+
"value": {
|
|
302
|
+
"type": "string",
|
|
303
|
+
"mutable": true,
|
|
304
|
+
"complexType": {
|
|
305
|
+
"original": "string",
|
|
306
|
+
"resolved": "string",
|
|
307
|
+
"references": {}
|
|
308
|
+
},
|
|
309
|
+
"required": false,
|
|
310
|
+
"optional": false,
|
|
311
|
+
"docs": {
|
|
312
|
+
"tags": [],
|
|
313
|
+
"text": "Define o valor HTML do campo."
|
|
314
|
+
},
|
|
315
|
+
"attribute": "value",
|
|
316
|
+
"reflect": true,
|
|
317
|
+
"defaultValue": "''"
|
|
318
|
+
},
|
|
319
|
+
"label": {
|
|
320
|
+
"type": "string",
|
|
321
|
+
"mutable": false,
|
|
322
|
+
"complexType": {
|
|
323
|
+
"original": "string",
|
|
324
|
+
"resolved": "string",
|
|
325
|
+
"references": {}
|
|
326
|
+
},
|
|
327
|
+
"required": false,
|
|
328
|
+
"optional": false,
|
|
329
|
+
"docs": {
|
|
330
|
+
"tags": [],
|
|
331
|
+
"text": "Texto a ser apresentado como t\u00EDtulo do campo."
|
|
332
|
+
},
|
|
333
|
+
"attribute": "label",
|
|
334
|
+
"reflect": true
|
|
335
|
+
},
|
|
336
|
+
"mode": {
|
|
337
|
+
"type": "string",
|
|
338
|
+
"mutable": false,
|
|
339
|
+
"complexType": {
|
|
340
|
+
"original": "\"slim\" | \"regular\"",
|
|
341
|
+
"resolved": "\"regular\" | \"slim\"",
|
|
342
|
+
"references": {}
|
|
343
|
+
},
|
|
344
|
+
"required": false,
|
|
345
|
+
"optional": false,
|
|
346
|
+
"docs": {
|
|
347
|
+
"tags": [],
|
|
348
|
+
"text": "Define o tamanho do campo."
|
|
349
|
+
},
|
|
350
|
+
"attribute": "mode",
|
|
351
|
+
"reflect": true,
|
|
352
|
+
"defaultValue": "\"regular\""
|
|
353
|
+
},
|
|
354
|
+
"enabled": {
|
|
355
|
+
"type": "boolean",
|
|
356
|
+
"mutable": false,
|
|
357
|
+
"complexType": {
|
|
358
|
+
"original": "boolean",
|
|
359
|
+
"resolved": "boolean",
|
|
360
|
+
"references": {}
|
|
361
|
+
},
|
|
362
|
+
"required": false,
|
|
363
|
+
"optional": false,
|
|
364
|
+
"docs": {
|
|
365
|
+
"tags": [],
|
|
366
|
+
"text": "Se false o usu\u00E1rio n\u00E3o pode interagir com o campo."
|
|
367
|
+
},
|
|
368
|
+
"attribute": "enabled",
|
|
369
|
+
"reflect": true,
|
|
370
|
+
"defaultValue": "true"
|
|
371
|
+
},
|
|
372
|
+
"rows": {
|
|
373
|
+
"type": "number",
|
|
374
|
+
"mutable": false,
|
|
375
|
+
"complexType": {
|
|
376
|
+
"original": "number",
|
|
377
|
+
"resolved": "number",
|
|
378
|
+
"references": {}
|
|
379
|
+
},
|
|
380
|
+
"required": false,
|
|
381
|
+
"optional": false,
|
|
382
|
+
"docs": {
|
|
383
|
+
"tags": [],
|
|
384
|
+
"text": "Define o n\u00FAmero de linhas."
|
|
385
|
+
},
|
|
386
|
+
"attribute": "rows",
|
|
387
|
+
"reflect": true,
|
|
388
|
+
"defaultValue": "6"
|
|
389
|
+
},
|
|
390
|
+
"errorMessage": {
|
|
391
|
+
"type": "string",
|
|
392
|
+
"mutable": true,
|
|
393
|
+
"complexType": {
|
|
394
|
+
"original": "string",
|
|
395
|
+
"resolved": "string",
|
|
396
|
+
"references": {}
|
|
397
|
+
},
|
|
398
|
+
"required": false,
|
|
399
|
+
"optional": false,
|
|
400
|
+
"docs": {
|
|
401
|
+
"tags": [],
|
|
402
|
+
"text": "Define uma mensagem de orienta\u00E7\u00E3o ao usu\u00E1rio, colocando o campo em modo inv\u00E1lido."
|
|
403
|
+
},
|
|
404
|
+
"attribute": "error-message",
|
|
405
|
+
"reflect": true
|
|
406
|
+
},
|
|
407
|
+
"canShowError": {
|
|
408
|
+
"type": "boolean",
|
|
409
|
+
"mutable": false,
|
|
410
|
+
"complexType": {
|
|
411
|
+
"original": "boolean",
|
|
412
|
+
"resolved": "boolean",
|
|
413
|
+
"references": {}
|
|
414
|
+
},
|
|
415
|
+
"required": false,
|
|
416
|
+
"optional": false,
|
|
417
|
+
"docs": {
|
|
418
|
+
"tags": [],
|
|
419
|
+
"text": "Se false deixa de exibir a mensagem de erro dentro do campo."
|
|
420
|
+
},
|
|
421
|
+
"attribute": "can-show-error",
|
|
422
|
+
"reflect": true,
|
|
423
|
+
"defaultValue": "true"
|
|
424
|
+
},
|
|
425
|
+
"showConfigs": {
|
|
426
|
+
"type": "boolean",
|
|
427
|
+
"mutable": false,
|
|
428
|
+
"complexType": {
|
|
429
|
+
"original": "boolean",
|
|
430
|
+
"resolved": "boolean",
|
|
431
|
+
"references": {}
|
|
432
|
+
},
|
|
433
|
+
"required": false,
|
|
434
|
+
"optional": false,
|
|
435
|
+
"docs": {
|
|
436
|
+
"tags": [],
|
|
437
|
+
"text": "Informa se as op\u00E7\u00F5es de configura\u00E7\u00F5es (lista, imagem e link) devem ser apresentadas"
|
|
438
|
+
},
|
|
439
|
+
"attribute": "show-configs",
|
|
440
|
+
"reflect": false,
|
|
441
|
+
"defaultValue": "true"
|
|
442
|
+
},
|
|
443
|
+
"showTextFormat": {
|
|
444
|
+
"type": "boolean",
|
|
445
|
+
"mutable": false,
|
|
446
|
+
"complexType": {
|
|
447
|
+
"original": "boolean",
|
|
448
|
+
"resolved": "boolean",
|
|
449
|
+
"references": {}
|
|
450
|
+
},
|
|
451
|
+
"required": false,
|
|
452
|
+
"optional": false,
|
|
453
|
+
"docs": {
|
|
454
|
+
"tags": [],
|
|
455
|
+
"text": "Informa se as op\u00E7\u00F5es de formata\u00E7\u00E3o de texto (it\u00E1lico, sublinhado e negrito) devem ser apresentadas"
|
|
456
|
+
},
|
|
457
|
+
"attribute": "show-text-format",
|
|
458
|
+
"reflect": false,
|
|
459
|
+
"defaultValue": "true"
|
|
460
|
+
},
|
|
461
|
+
"showUndoRedo": {
|
|
462
|
+
"type": "boolean",
|
|
463
|
+
"mutable": false,
|
|
464
|
+
"complexType": {
|
|
465
|
+
"original": "boolean",
|
|
466
|
+
"resolved": "boolean",
|
|
467
|
+
"references": {}
|
|
468
|
+
},
|
|
469
|
+
"required": false,
|
|
470
|
+
"optional": false,
|
|
471
|
+
"docs": {
|
|
472
|
+
"tags": [],
|
|
473
|
+
"text": "Informa se as op\u00E7\u00F5es de desfazer e refazer devem ser habilitadas."
|
|
474
|
+
},
|
|
475
|
+
"attribute": "show-undo-redo",
|
|
476
|
+
"reflect": false,
|
|
477
|
+
"defaultValue": "true"
|
|
478
|
+
}
|
|
479
|
+
};
|
|
480
|
+
}
|
|
481
|
+
static get states() {
|
|
482
|
+
return {
|
|
483
|
+
"previewMode": {}
|
|
484
|
+
};
|
|
485
|
+
}
|
|
486
|
+
static get events() {
|
|
487
|
+
return [{
|
|
488
|
+
"method": "ezChange",
|
|
489
|
+
"name": "ezChange",
|
|
490
|
+
"bubbles": true,
|
|
491
|
+
"cancelable": true,
|
|
492
|
+
"composed": true,
|
|
493
|
+
"docs": {
|
|
494
|
+
"tags": [],
|
|
495
|
+
"text": "Emitido quando acontece a altera\u00E7\u00E3o de valor do campo."
|
|
496
|
+
},
|
|
497
|
+
"complexType": {
|
|
498
|
+
"original": "string",
|
|
499
|
+
"resolved": "string",
|
|
500
|
+
"references": {}
|
|
501
|
+
}
|
|
502
|
+
}];
|
|
503
|
+
}
|
|
504
|
+
static get methods() {
|
|
505
|
+
return {
|
|
506
|
+
"setFocus": {
|
|
507
|
+
"complexType": {
|
|
508
|
+
"signature": "() => Promise<void>",
|
|
509
|
+
"parameters": [],
|
|
510
|
+
"references": {
|
|
511
|
+
"Promise": {
|
|
512
|
+
"location": "global"
|
|
513
|
+
}
|
|
514
|
+
},
|
|
515
|
+
"return": "Promise<void>"
|
|
516
|
+
},
|
|
517
|
+
"docs": {
|
|
518
|
+
"text": "Aplica o foco no campo.",
|
|
519
|
+
"tags": []
|
|
520
|
+
}
|
|
521
|
+
},
|
|
522
|
+
"setBlur": {
|
|
523
|
+
"complexType": {
|
|
524
|
+
"signature": "() => Promise<void>",
|
|
525
|
+
"parameters": [],
|
|
526
|
+
"references": {
|
|
527
|
+
"Promise": {
|
|
528
|
+
"location": "global"
|
|
529
|
+
}
|
|
530
|
+
},
|
|
531
|
+
"return": "Promise<void>"
|
|
532
|
+
},
|
|
533
|
+
"docs": {
|
|
534
|
+
"text": "Remove o foco do campo.",
|
|
535
|
+
"tags": []
|
|
536
|
+
}
|
|
537
|
+
},
|
|
538
|
+
"isInvalid": {
|
|
539
|
+
"complexType": {
|
|
540
|
+
"signature": "() => Promise<boolean>",
|
|
541
|
+
"parameters": [],
|
|
542
|
+
"references": {
|
|
543
|
+
"Promise": {
|
|
544
|
+
"location": "global"
|
|
545
|
+
}
|
|
546
|
+
},
|
|
547
|
+
"return": "Promise<boolean>"
|
|
548
|
+
},
|
|
549
|
+
"docs": {
|
|
550
|
+
"text": "Retorna se o conte\u00FAdo \u00E9 inv\u00E1lido.",
|
|
551
|
+
"tags": []
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
};
|
|
555
|
+
}
|
|
556
|
+
static get elementRef() { return "element"; }
|
|
557
|
+
static get watchers() {
|
|
558
|
+
return [{
|
|
559
|
+
"propName": "value",
|
|
560
|
+
"methodName": "observeValue"
|
|
561
|
+
}, {
|
|
562
|
+
"propName": "errorMessage",
|
|
563
|
+
"methodName": "observeErrorMessage"
|
|
564
|
+
}];
|
|
565
|
+
}
|
|
566
|
+
static get listeners() {
|
|
567
|
+
return [{
|
|
568
|
+
"name": "executeToolbarCommand",
|
|
569
|
+
"method": "handleExecuteToolbarCommand",
|
|
570
|
+
"target": undefined,
|
|
571
|
+
"capture": false,
|
|
572
|
+
"passive": false
|
|
573
|
+
}];
|
|
574
|
+
}
|
|
575
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export const RICH_TOOLBAR_COMMANDS = {
|
|
2
|
+
PREVIEW: 'preview',
|
|
3
|
+
UNDO: 'undo',
|
|
4
|
+
REDO: 'redo',
|
|
5
|
+
FORMAT: 'format',
|
|
6
|
+
LINK: 'link',
|
|
7
|
+
IMAGE: 'image',
|
|
8
|
+
FOCUS: 'focus',
|
|
9
|
+
};
|
|
10
|
+
export const RICH_TOOLBAR_FORMAT_TAGS = {
|
|
11
|
+
BOLD: '<strong>$selection</strong>',
|
|
12
|
+
ITALIC: '<em>$selection</em>',
|
|
13
|
+
UNDERLINE: '<u>$selection</u>',
|
|
14
|
+
LIST: '<ul><li>$selection</li></ul>',
|
|
15
|
+
BREAK_LINE: '\n<br/>\n',
|
|
16
|
+
};
|
|
17
|
+
export const RICH_TOOLBAR_COMMAND_ICON = {
|
|
18
|
+
PREVIEW: 'Ctrl + P',
|
|
19
|
+
UNDO: 'undo',
|
|
20
|
+
REDO: 'redo',
|
|
21
|
+
LINK: 'link',
|
|
22
|
+
IMAGE: 'image-plus',
|
|
23
|
+
LIST: 'list',
|
|
24
|
+
UNDERLINE: 'underline',
|
|
25
|
+
ITALIC: 'italic',
|
|
26
|
+
BOLD: 'bold',
|
|
27
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { h, Host } from '@stencil/core';
|
|
2
|
+
import { RICH_TOOLBAR_COMMAND_ICON, RICH_TOOLBAR_COMMANDS } from '../RichToolbarHelper';
|
|
3
|
+
import initI18n from '../../../../utils/i18n';
|
|
4
|
+
export class EzRichToolbarArrows {
|
|
5
|
+
async componentWillLoad() {
|
|
6
|
+
this.i18n = await initI18n();
|
|
7
|
+
}
|
|
8
|
+
render() {
|
|
9
|
+
return (h(Host, null, h("ez-rich-toolbar-item", { icon: RICH_TOOLBAR_COMMAND_ICON.UNDO, command: RICH_TOOLBAR_COMMANDS.UNDO, title: this.i18n("ez-rich-text.title.undo") }), h("ez-rich-toolbar-item", { icon: RICH_TOOLBAR_COMMAND_ICON.REDO, command: RICH_TOOLBAR_COMMANDS.REDO, title: this.i18n("ez-rich-text.title.redo") })));
|
|
10
|
+
}
|
|
11
|
+
static get is() { return "ez-rich-toolbar-arrows"; }
|
|
12
|
+
static get encapsulation() { return "scoped"; }
|
|
13
|
+
static get originalStyleUrls() {
|
|
14
|
+
return {
|
|
15
|
+
"$": ["ez-rich-toolbar-arrows.css"]
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
static get styleUrls() {
|
|
19
|
+
return {
|
|
20
|
+
"$": ["ez-rich-toolbar-arrows.css"]
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { h, Host } from '@stencil/core';
|
|
2
|
+
import { RICH_TOOLBAR_COMMAND_ICON, RICH_TOOLBAR_COMMANDS, RICH_TOOLBAR_FORMAT_TAGS, } from '../RichToolbarHelper';
|
|
3
|
+
import initI18n from '../../../../utils/i18n';
|
|
4
|
+
export class EzRichToolbarConfigs {
|
|
5
|
+
async componentWillLoad() {
|
|
6
|
+
this.i18n = await initI18n();
|
|
7
|
+
}
|
|
8
|
+
render() {
|
|
9
|
+
return (h(Host, null, h("ez-rich-toolbar-item", { icon: RICH_TOOLBAR_COMMAND_ICON.LIST, command: RICH_TOOLBAR_COMMANDS.FORMAT, value: RICH_TOOLBAR_FORMAT_TAGS.LIST, title: this.i18n("ez-rich-text.title.list") }), h("ez-rich-toolbar-item", { icon: RICH_TOOLBAR_COMMAND_ICON.IMAGE, command: RICH_TOOLBAR_COMMANDS.IMAGE, title: this.i18n("ez-rich-text.title.image") }), h("ez-rich-toolbar-item", { icon: RICH_TOOLBAR_COMMAND_ICON.LINK, command: RICH_TOOLBAR_COMMANDS.LINK, title: this.i18n("ez-rich-text.title.link") })));
|
|
10
|
+
}
|
|
11
|
+
static get is() { return "ez-rich-toolbar-configs"; }
|
|
12
|
+
static get encapsulation() { return "scoped"; }
|
|
13
|
+
static get originalStyleUrls() {
|
|
14
|
+
return {
|
|
15
|
+
"$": ["ez-rich-toolbar-configs.css"]
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
static get styleUrls() {
|
|
19
|
+
return {
|
|
20
|
+
"$": ["ez-rich-toolbar-configs.css"]
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
ez-icon {
|
|
2
|
+
--ez-icon--color: var(--color--secondary, #383c45);
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.rich-toolbar-item {
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
width: 32px;
|
|
10
|
+
height: 32px;
|
|
11
|
+
background: none;
|
|
12
|
+
border: none;
|
|
13
|
+
border-radius: 4px;
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
transition: 0.3s all ease-in-out;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.rich-toolbar-item:hover {
|
|
19
|
+
background-color: #f5f5f5;
|
|
20
|
+
}
|