@sankhyalabs/ezui 6.1.0-dev.4 → 6.1.0-dev.5
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/RichToolbarHelper-438916fa.js +46 -0
- package/dist/cjs/{ez-combo-box-list_3.cjs.entry.js → ez-combo-box-list_4.cjs.entry.js} +269 -0
- package/dist/cjs/ez-filter-input.cjs.entry.js +129 -0
- package/dist/cjs/ez-form-view.cjs.entry.js +6 -0
- package/dist/cjs/ez-grid.cjs.entry.js +3 -1348
- package/dist/cjs/ez-icon.cjs.entry.js +1 -1
- package/dist/cjs/ez-link-builder_6.cjs.entry.js +295 -0
- package/dist/cjs/ez-modal-container.cjs.entry.js +1 -1
- package/dist/cjs/ez-rich-toolbar-item.cjs.entry.js +27 -0
- package/dist/cjs/{ez-filter-input_2.cjs.entry.js → ez-tooltip.cjs.entry.js} +1 -123
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/index-a7b0c73d.js +20 -8
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/purify-6de957d4.js +1351 -0
- package/dist/collection/collection-manifest.json +8 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js +2 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/RichText.tpl.js +4 -0
- package/dist/collection/components/ez-icon/ez-icon.css +147 -140
- package/dist/collection/components/ez-modal-container/ez-modal-container.css +2 -0
- 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 +131 -0
- package/dist/collection/components/ez-rich-text/ez-rich-text.css +35 -0
- package/dist/collection/components/ez-rich-text/ez-rich-text.js +544 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/RichToolbarHelper.js +39 -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 +19 -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 +19 -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 +19 -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 +183 -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 +216 -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-tooltip/ez-tooltip.js +1 -1
- package/dist/custom-elements/index.d.ts +48 -0
- package/dist/custom-elements/index.js +641 -4
- package/dist/esm/RichToolbarHelper-fd6427df.js +41 -0
- package/dist/esm/{ez-combo-box-list_3.entry.js → ez-combo-box-list_4.entry.js} +270 -2
- package/dist/esm/ez-filter-input.entry.js +125 -0
- package/dist/esm/ez-form-view.entry.js +6 -0
- package/dist/esm/ez-grid.entry.js +2 -1347
- package/dist/esm/ez-icon.entry.js +1 -1
- package/dist/esm/ez-link-builder_6.entry.js +286 -0
- package/dist/esm/ez-modal-container.entry.js +1 -1
- package/dist/esm/ez-rich-toolbar-item.entry.js +23 -0
- package/dist/esm/{ez-filter-input_2.entry.js → ez-tooltip.entry.js} +3 -124
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/index-baa5e267.js +20 -8
- package/dist/esm/loader.js +1 -1
- package/dist/esm/purify-aa3062c4.js +1349 -0
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-098594de.entry.js +1 -0
- package/dist/ezui/p-1cebdc92.js +1 -0
- package/dist/ezui/p-20c024f7.entry.js +1 -0
- package/dist/ezui/{p-26685c50.entry.js → p-454bba13.entry.js} +1 -1
- package/dist/ezui/p-566c809b.entry.js +1 -0
- package/dist/ezui/{p-38581954.entry.js → p-5f1e98da.entry.js} +45 -47
- package/dist/ezui/p-79044c3e.entry.js +1 -0
- package/dist/ezui/p-80461324.entry.js +1 -0
- package/dist/ezui/p-91c9d50e.entry.js +1 -0
- package/dist/ezui/p-bcae530a.js +3 -0
- package/dist/ezui/p-ec0d8122.entry.js +1 -0
- package/dist/types/components/ez-form-view/fieldbuilder/templates/RichText.tpl.d.ts +2 -0
- package/dist/types/components/ez-rich-text/ez-link-builder/ez-link-builder.d.ts +17 -0
- package/dist/types/components/ez-rich-text/ez-rich-text.d.ts +98 -0
- package/dist/types/components/ez-rich-text/ez-rich-toolbar/RichToolbarHelper.d.ts +43 -0
- package/dist/types/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-arrows/ez-rich-toolbar-arrows.d.ts +3 -0
- package/dist/types/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-configs/ez-rich-toolbar-configs.d.ts +3 -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 +3 -0
- package/dist/types/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar.d.ts +33 -0
- package/dist/types/components/ez-rich-text/ez-simple-image-uploader/ez-simple-image-uploader.d.ts +37 -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.d.ts +291 -0
- package/package.json +1 -1
- package/react/components.d.ts +8 -0
- package/react/components.js +8 -0
- package/react/components.js.map +1 -1
- package/dist/ezui/p-2b42abbb.entry.js +0 -1
- package/dist/ezui/p-63cb493e.entry.js +0 -1
- package/dist/ezui/p-7ab19270.entry.js +0 -1
- package/dist/ezui/p-9567b31a.entry.js +0 -1
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-a7b0c73d.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
|
|
8
|
-
const ezIconCss = ":host{display:flex;overflow:hidden;position:relative;--ez-icon--color:var(--icon--color, #ffffff)}svg{display:flex;justify-content:center;align-items:center;fill:var(--ez-icon--color)}.x-small{width:12px;height:12px}.small{width:16px;height:16px}.medium{width:20px;height:20px}.large{width:24px;height:24px}.x-large{width:30px;height:30px}[class^=\"ez-icon-\"],[class*=\" ez-icon-\"]{color:var(--ez-icon--color)}[class^=\"ez-icon-\"],[class*=\" ez-icon-\"]{font-family:'ez-icons' !important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ez-icon-2chevron-down:before{content:\"\\ea01\"}.ez-icon-2chevron-up:before{content:\"\\ea02\"}.ez-icon-acao:before{content:\"\\ea03\"}.ez-icon-account-outline:before{content:\"\\ea04\"}.ez-icon-account:before{content:\"\\ea05\"}.ez-icon-add-to-cart:before{content:\"\\ea06\"}.ez-icon-alert-circle-inverted:before{content:\"\\ea07\"}.ez-icon-alert-circle:before{content:\"\\ea08\"}.ez-icon-alert-mail:before{content:\"\\ea09\"}.ez-icon-alert-popup:before{content:\"\\ea0a\"}.ez-icon-anexo:before{content:\"\\ea0b\"}.ez-icon-antecipação:before{content:\"\\ea0c\"}.ez-icon-apps:before{content:\"\\ea0d\"}.ez-icon-arrow-forward:before{content:\"\\ea0e\"}.ez-icon-arrow-upward:before{content:\"\\ea0f\"}.ez-icon-arrow_back:before{content:\"\\ea10\"}.ez-icon-arrow_downward:before{content:\"\\ea11\"}.ez-icon-baixa:before{content:\"\\ea12\"}.ez-icon-balance:before{content:\"\\ea13\"}.ez-icon-bell-inverted:before{content:\"\\ea14\"}.ez-icon-bell:before{content:\"\\ea15\"}.ez-icon-
|
|
8
|
+
const ezIconCss = ":host{display:flex;overflow:hidden;position:relative;--ez-icon--color:var(--icon--color, #ffffff)}svg{display:flex;justify-content:center;align-items:center;fill:var(--ez-icon--color)}.x-small{width:12px;height:12px}.small{width:16px;height:16px}.medium{width:20px;height:20px}.large{width:24px;height:24px}.x-large{width:30px;height:30px}[class^=\"ez-icon-\"],[class*=\" ez-icon-\"]{color:var(--ez-icon--color)}[class^=\"ez-icon-\"],[class*=\" ez-icon-\"]{font-family:'ez-icons' !important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ez-icon-2chevron-down:before{content:\"\\ea01\"}.ez-icon-2chevron-up:before{content:\"\\ea02\"}.ez-icon-acao:before{content:\"\\ea03\"}.ez-icon-account-outline:before{content:\"\\ea04\"}.ez-icon-account:before{content:\"\\ea05\"}.ez-icon-add-to-cart:before{content:\"\\ea06\"}.ez-icon-alert-circle-inverted:before{content:\"\\ea07\"}.ez-icon-alert-circle:before{content:\"\\ea08\"}.ez-icon-alert-mail:before{content:\"\\ea09\"}.ez-icon-alert-popup:before{content:\"\\ea0a\"}.ez-icon-anexo:before{content:\"\\ea0b\"}.ez-icon-antecipação:before{content:\"\\ea0c\"}.ez-icon-apps:before{content:\"\\ea0d\"}.ez-icon-arrow-forward:before{content:\"\\ea0e\"}.ez-icon-arrow-upward:before{content:\"\\ea0f\"}.ez-icon-arrow_back:before{content:\"\\ea10\"}.ez-icon-arrow_downward:before{content:\"\\ea11\"}.ez-icon-baixa:before{content:\"\\ea12\"}.ez-icon-balance:before{content:\"\\ea13\"}.ez-icon-bell-inverted:before{content:\"\\ea14\"}.ez-icon-bell:before{content:\"\\ea15\"}.ez-icon-bold:before{content:\"\\ea16\"}.ez-icon-boleto:before{content:\"\\ea17\"}.ez-icon-boolean:before{content:\"\\ea18\"}.ez-icon-business-center:before{content:\"\\ea19\"}.ez-icon-calendar-clock:before{content:\"\\ea1a\"}.ez-icon-calendar:before{content:\"\\ea1b\"}.ez-icon-cart-history:before{content:\"\\ea1c\"}.ez-icon-cash-remove:before{content:\"\\ea1d\"}.ez-icon-check-circle-inverted:before{content:\"\\ea1e\"}.ez-icon-check-circle:before{content:\"\\ea1f\"}.ez-icon-check:before{content:\"\\ea20\"}.ez-icon-chevron-down:before{content:\"\\ea21\"}.ez-icon-chevron-left:before{content:\"\\ea22\"}.ez-icon-chevron-right:before{content:\"\\ea23\"}.ez-icon-chevron-up:before{content:\"\\ea24\"}.ez-icon-circle--medium:before{content:\"\\ea25\"}.ez-icon-circle:before{content:\"\\ea26\"}.ez-icon-clean-cart:before{content:\"\\ea27\"}.ez-icon-cleaning:before{content:\"\\ea28\"}.ez-icon-clipboard:before{content:\"\\ea29\"}.ez-icon-clock-rotate-left:before{content:\"\\ea2a\"}.ez-icon-close:before{content:\"\\ea2b\"}.ez-icon-cobrar:before{content:\"\\ea2c\"}.ez-icon-code:before{content:\"\\ea2d\"}.ez-icon-configuration:before{content:\"\\ea2e\"}.ez-icon-content-cut:before{content:\"\\ea2f\"}.ez-icon-copy:before{content:\"\\ea30\"}.ez-icon-credit_card:before{content:\"\\ea31\"}.ez-icon-crop:before{content:\"\\ea32\"}.ez-icon-custom:before{content:\"\\ea33\"}.ez-icon-delete-file:before{content:\"\\ea34\"}.ez-icon-delete:before{content:\"\\ea35\"}.ez-icon-description:before{content:\"\\ea36\"}.ez-icon-dividir:before{content:\"\\ea37\"}.ez-icon-docx:before{content:\"\\ea38\"}.ez-icon-dot-notification:before{content:\"\\ea39\"}.ez-icon-dots-horizontal:before{content:\"\\ea3a\"}.ez-icon-dots-vertical:before{content:\"\\ea3b\"}.ez-icon-drag-indicator:before{content:\"\\ea3c\"}.ez-icon-dual-chevron-down:before{content:\"\\ea3d\"}.ez-icon-dual-chevron-left:before{content:\"\\ea3e\"}.ez-icon-dual-chevron-right:before{content:\"\\ea3f\"}.ez-icon-dual-chevron-up:before{content:\"\\ea40\"}.ez-icon-edit-file:before{content:\"\\ea41\"}.ez-icon-edit-table:before{content:\"\\ea42\"}.ez-icon-edit-time:before{content:\"\\ea43\"}.ez-icon-edit-value:before{content:\"\\ea44\"}.ez-icon-edit:before{content:\"\\ea45\"}.ez-icon-email:before{content:\"\\ea46\"}.ez-icon-estorno:before{content:\"\\ea47\"}.ez-icon-exe:before{content:\"\\ea48\"}.ez-icon-expand:before{content:\"\\ea49\"}.ez-icon-expandir_card:before{content:\"\\ea4a\"}.ez-icon-extrato:before{content:\"\\ea4b\"}.ez-icon-eye-off:before{content:\"\\ea4c\"}.ez-icon-eye:before{content:\"\\ea4d\"}.ez-icon-favorite:before{content:\"\\ea4e\"}.ez-icon-figma:before{content:\"\\ea4f\"}.ez-icon-file-download:before{content:\"\\ea50\"}.ez-icon-file-upload:before{content:\"\\ea51\"}.ez-icon-filter:before{content:\"\\ea52\"}.ez-icon-find-file:before{content:\"\\ea53\"}.ez-icon-find-page:before{content:\"\\ea54\"}.ez-icon-format-color-fill:before{content:\"\\ea55\"}.ez-icon-generic:before{content:\"\\ea56\"}.ez-icon-gif:before{content:\"\\ea57\"}.ez-icon-graph_bar:before{content:\"\\ea58\"}.ez-icon-handshake:before{content:\"\\ea59\"}.ez-icon-help-inverted:before{content:\"\\ea5a\"}.ez-icon-help:before{content:\"\\ea5b\"}.ez-icon-hide-list:before{content:\"\\ea5c\"}.ez-icon-hide_menu:before{content:\"\\ea5d\"}.ez-icon-hierarchical-tree:before{content:\"\\ea5e\"}.ez-icon-home:before{content:\"\\ea5f\"}.ez-icon-icons104:before{content:\"\\ea60\"}.ez-icon-image-plus:before{content:\"\\ea61\"}.ez-icon-italic:before{content:\"\\ea62\"}.ez-icon-language:before{content:\"\\ea63\"}.ez-icon-launch:before{content:\"\\ea64\"}.ez-icon-lightbulb:before{content:\"\\ea65\"}.ez-icon-link:before{content:\"\\ea66\"}.ez-icon-list:before{content:\"\\ea67\"}.ez-icon-location:before{content:\"\\ea68\"}.ez-icon-lock-outline:before{content:\"\\ea69\"}.ez-icon-lock:before{content:\"\\ea6a\"}.ez-icon-menu:before{content:\"\\ea6b\"}.ez-icon-mid:before{content:\"\\ea6c\"}.ez-icon-minus:before{content:\"\\ea6d\"}.ez-icon-money-off:before{content:\"\\ea6e\"}.ez-icon-money:before{content:\"\\ea6f\"}.ez-icon-more:before{content:\"\\ea70\"}.ez-icon-mp3:before{content:\"\\ea71\"}.ez-icon-mp4:before{content:\"\\ea72\"}.ez-icon-multiple-files:before{content:\"\\ea73\"}.ez-icon-north-west:before{content:\"\\ea74\"}.ez-icon-number:before{content:\"\\ea75\"}.ez-icon-ordem-ascendente:before{content:\"\\ea76\"}.ez-icon-ordem-descendente:before{content:\"\\ea77\"}.ez-icon-parcelar:before{content:\"\\ea78\"}.ez-icon-pause:before{content:\"\\ea79\"}.ez-icon-payments:before{content:\"\\ea7a\"}.ez-icon-pdf:before{content:\"\\ea7b\"}.ez-icon-play:before{content:\"\\ea7c\"}.ez-icon-plus:before{content:\"\\ea7d\"}.ez-icon-png:before{content:\"\\ea7e\"}.ez-icon-power:before{content:\"\\ea7f\"}.ez-icon-pptx:before{content:\"\\ea80\"}.ez-icon-preview:before{content:\"\\ea81\"}.ez-icon-print:before{content:\"\\ea82\"}.ez-icon-push-pin:before{content:\"\\ea83\"}.ez-icon-rateio:before{content:\"\\ea84\"}.ez-icon-receipt:before{content:\"\\ea85\"}.ez-icon-recolher_card:before{content:\"\\ea86\"}.ez-icon-redo:before{content:\"\\ea87\"}.ez-icon-remove-from-cart:before{content:\"\\ea88\"}.ez-icon-restore:before{content:\"\\ea89\"}.ez-icon-return:before{content:\"\\ea8a\"}.ez-icon-sankhya-place:before{content:\"\\ea8b\"}.ez-icon-save:before{content:\"\\ea8c\"}.ez-icon-search:before{content:\"\\ea8d\"}.ez-icon-settings-inverted:before{content:\"\\ea8e\"}.ez-icon-settings:before{content:\"\\ea8f\"}.ez-icon-share:before{content:\"\\ea90\"}.ez-icon-shield:before{content:\"\\ea91\"}.ez-icon-show-list:before{content:\"\\ea92\"}.ez-icon-show_menu:before{content:\"\\ea93\"}.ez-icon-south-east:before{content:\"\\ea94\"}.ez-icon-sync:before{content:\"\\ea95\"}.ez-icon-table:before{content:\"\\ea96\"}.ez-icon-tag_code:before{content:\"\\ea97\"}.ez-icon-text:before{content:\"\\ea98\"}.ez-icon-timeline:before{content:\"\\ea99\"}.ez-icon-timer-outline:before{content:\"\\ea9a\"}.ez-icon-trending-up:before{content:\"\\ea9b\"}.ez-icon-tune:before{content:\"\\ea9c\"}.ez-icon-txt:before{content:\"\\ea9d\"}.ez-icon-un-pin:before{content:\"\\ea9e\"}.ez-icon-underline:before{content:\"\\ea9f\"}.ez-icon-undo:before{content:\"\\eaa0\"}.ez-icon-unfold_less:before{content:\"\\eaa1\"}.ez-icon-unfold_more:before{content:\"\\eaa2\"}.ez-icon-user-circle:before{content:\"\\eaa3\"}.ez-icon-warning-outline:before{content:\"\\eaa4\"}.ez-icon-warning_triangle:before{content:\"\\eaa5\"}.ez-icon-whatshot:before{content:\"\\eaa6\"}.ez-icon-xlsx:before{content:\"\\eaa7\"}.ez-icon-zip:before{content:\"\\eaa8\"}.x-small--font{font-size:12px}.small--font{font-size:16px}.medium--font{font-size:20px}.large--font{font-size:24px}.x-large--font{font-size:30px}";
|
|
9
9
|
|
|
10
10
|
const EzIcon = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-a7b0c73d.js');
|
|
6
|
+
const RichToolbarHelper = require('./RichToolbarHelper-438916fa.js');
|
|
7
|
+
|
|
8
|
+
const ezLinkBuilderCss = ".link-builder-container.sc-ez-link-builder{font-family:'Roboto';color:#2b3a54;display:flex;flex-direction:column;gap:10px;justify-content:space-between}.header.sc-ez-link-builder{display:flex;font-weight:500;font-size:16px}.actions.sc-ez-link-builder{display:flex;justify-content:flex-end;gap:12px;margin-top:12px;width:100%}";
|
|
9
|
+
|
|
10
|
+
const EzLinkBuilder = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
this.executeToolbarCommand = index.createEvent(this, "executeToolbarCommand", 7);
|
|
14
|
+
this.textToShow = undefined;
|
|
15
|
+
this.link = undefined;
|
|
16
|
+
this.openInNewGuide = false;
|
|
17
|
+
}
|
|
18
|
+
async show(text) {
|
|
19
|
+
this._popupElement.opened = true;
|
|
20
|
+
if (text) {
|
|
21
|
+
this.textToShow = text;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
async hide() {
|
|
25
|
+
this._popupElement.opened = false;
|
|
26
|
+
}
|
|
27
|
+
async handleCancel() {
|
|
28
|
+
this.clearValues();
|
|
29
|
+
this.executeToolbarCommand.emit({ command: RichToolbarHelper.RICH_TOOLBAR_COMMANDS.FOCUS });
|
|
30
|
+
await this.hide();
|
|
31
|
+
}
|
|
32
|
+
clearValues() {
|
|
33
|
+
this.link = '';
|
|
34
|
+
this.textToShow = '';
|
|
35
|
+
this.openInNewGuide = false;
|
|
36
|
+
}
|
|
37
|
+
async handleCreateLink() {
|
|
38
|
+
const tag = `<a href="${this.link}" ${this.openInNewGuide ? 'target="_blank" rel="noopener noreferrer"' : ''}>${this.textToShow ? this.textToShow : this.link}</a>`;
|
|
39
|
+
this.executeToolbarCommand.emit({ command: RichToolbarHelper.RICH_TOOLBAR_COMMANDS.FORMAT, value: tag });
|
|
40
|
+
this.clearValues();
|
|
41
|
+
await this.hide();
|
|
42
|
+
}
|
|
43
|
+
async handleActionPopup(event) {
|
|
44
|
+
if (event.detail === 'OK') {
|
|
45
|
+
await this.handleCreateLink();
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
if (event.detail === 'CANCEL' || event.detail === 'CLOSE') {
|
|
49
|
+
await this.handleCancel();
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
getOkButtonStatus() {
|
|
53
|
+
var _a;
|
|
54
|
+
return ((_a = this.link) === null || _a === void 0 ? void 0 : _a.trim()) ? 'ENABLED' : 'DISABLED';
|
|
55
|
+
}
|
|
56
|
+
render() {
|
|
57
|
+
return (index.h("ez-popup", { heightMode: 'auto', size: 'small', useHeader: false, ref: ref => this._popupElement = ref, onEzClosePopup: () => this.clearValues() }, index.h("div", null, index.h("ez-modal-container", { modalTitle: "Adicionar link", modalSubTitle: "Insira um link no texto para abrir novas p\u00E1ginas.", okButtonLabel: "Enviar", cancelButtonLabel: "Cancelar", onEzModalAction: this.handleActionPopup.bind(this), okButtonStatus: this.getOkButtonStatus() }, index.h("div", { class: 'link-builder-container' }, index.h("ez-text-input", { id: 'link_url_input', label: 'Insira a URL destino', value: this.link, onEzChange: (e) => this.link = e.detail }), index.h("ez-text-input", { id: 'link_text_input', label: 'Insira o texto a ser exibido', value: this.textToShow, onEzChange: (e) => this.textToShow = e.detail }), index.h("ez-check", { label: 'Abrir em uma nova página.', value: this.openInNewGuide, onEzChange: (e) => this.openInNewGuide = e.detail }))))));
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
EzLinkBuilder.style = ezLinkBuilderCss;
|
|
61
|
+
|
|
62
|
+
const ezRichToolbarCss = ".sc-ez-rich-toolbar-h{display:block;width:100%}.taskbar.sc-ez-rich-toolbar{display:flex;padding:8px;border-radius:4px 4px 0 0}.taskbar-group.sc-ez-rich-toolbar{display:flex;margin-right:15px;padding-right:15px;border-right:1px solid #ddd}.taskbar-group.sc-ez-rich-toolbar:last-child{border-right:none}.preview-btn.sc-ez-rich-toolbar{font-family:Roboto;font-size:14px;background:none;display:flex;align-items:center;padding:0 8px;border-radius:4px;cursor:pointer;color:var(--color--secondary, #383c45);transition:0.3s all ease-in-out;width:110px;justify-content:center}.preview-btn.sc-ez-rich-toolbar:hover{background-color:#f5f5f5}";
|
|
63
|
+
|
|
64
|
+
const EzRichToolbar = class {
|
|
65
|
+
constructor(hostRef) {
|
|
66
|
+
index.registerInstance(this, hostRef);
|
|
67
|
+
this.executeToolbarCommand = index.createEvent(this, "executeToolbarCommand", 7);
|
|
68
|
+
this.showPreview = true;
|
|
69
|
+
this.isPreviewMode = false;
|
|
70
|
+
this.showConfigs = true;
|
|
71
|
+
this.showTextFormat = true;
|
|
72
|
+
this.showUndoRedo = true;
|
|
73
|
+
}
|
|
74
|
+
handleActionTriggered(event) {
|
|
75
|
+
this.executeToolbarCommand.emit({ command: event.detail.command, value: event.detail.value });
|
|
76
|
+
}
|
|
77
|
+
handleClickPreview() {
|
|
78
|
+
this.executeToolbarCommand.emit({ command: RichToolbarHelper.RICH_TOOLBAR_COMMANDS.PREVIEW });
|
|
79
|
+
}
|
|
80
|
+
renderArrows() {
|
|
81
|
+
if (!this.showUndoRedo)
|
|
82
|
+
return;
|
|
83
|
+
return (index.h("div", { id: "rich-toolbar-undo-redo", class: "taskbar-group" }, index.h("ez-rich-toolbar-arrows", null)));
|
|
84
|
+
}
|
|
85
|
+
renderLetters() {
|
|
86
|
+
if (!this.showTextFormat)
|
|
87
|
+
return;
|
|
88
|
+
return (index.h("div", { id: "rich-toolbar-text-format", class: "taskbar-group" }, index.h("ez-rich-toolbar-letters", null)));
|
|
89
|
+
}
|
|
90
|
+
renderConfigs() {
|
|
91
|
+
if (!this.showConfigs)
|
|
92
|
+
return;
|
|
93
|
+
return (index.h("div", { id: "rich-toolbar-options-configs", class: "taskbar-group" }, index.h("ez-rich-toolbar-configs", null)));
|
|
94
|
+
}
|
|
95
|
+
renderPreview() {
|
|
96
|
+
if (!this.showPreview)
|
|
97
|
+
return;
|
|
98
|
+
return (index.h("div", { class: "taskbar-group" }, index.h("span", { id: 'rich-text-preview-btn', class: "preview-btn", title: this.getPreviewTitle(), onClick: this.handleClickPreview.bind(this) }, this.isPreviewMode ? 'Editar' : 'Pré-visualizar')));
|
|
99
|
+
}
|
|
100
|
+
getPreviewTitle() {
|
|
101
|
+
return this.isPreviewMode
|
|
102
|
+
? RichToolbarHelper.RICH_TOOLBAR_COMMAND_TITLE.EDIT
|
|
103
|
+
: RichToolbarHelper.RICH_TOOLBAR_COMMAND_TITLE.PREVIEW;
|
|
104
|
+
}
|
|
105
|
+
render() {
|
|
106
|
+
return (index.h(index.Host, null, index.h("div", { class: "taskbar" }, this.renderPreview(), this.renderArrows(), this.renderLetters(), this.renderConfigs())));
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
EzRichToolbar.style = ezRichToolbarCss;
|
|
110
|
+
|
|
111
|
+
const ezRichToolbarArrowsCss = ".sc-ez-rich-toolbar-arrows-h{display:flex;gap:5px}";
|
|
112
|
+
|
|
113
|
+
const EzRichToolbarArrows = class {
|
|
114
|
+
constructor(hostRef) {
|
|
115
|
+
index.registerInstance(this, hostRef);
|
|
116
|
+
}
|
|
117
|
+
render() {
|
|
118
|
+
return (index.h(index.Host, null, index.h("ez-rich-toolbar-item", { icon: RichToolbarHelper.RICH_TOOLBAR_COMMAND_ICON.UNDO, command: RichToolbarHelper.RICH_TOOLBAR_COMMANDS.UNDO, title: RichToolbarHelper.RICH_TOOLBAR_COMMAND_TITLE.UNDO }), index.h("ez-rich-toolbar-item", { icon: RichToolbarHelper.RICH_TOOLBAR_COMMAND_ICON.REDO, command: RichToolbarHelper.RICH_TOOLBAR_COMMANDS.REDO, title: RichToolbarHelper.RICH_TOOLBAR_COMMAND_TITLE.REDO })));
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
EzRichToolbarArrows.style = ezRichToolbarArrowsCss;
|
|
122
|
+
|
|
123
|
+
const ezRichToolbarConfigsCss = ".sc-ez-rich-toolbar-configs-h{display:flex;gap:5px}";
|
|
124
|
+
|
|
125
|
+
const EzRichToolbarConfigs = class {
|
|
126
|
+
constructor(hostRef) {
|
|
127
|
+
index.registerInstance(this, hostRef);
|
|
128
|
+
}
|
|
129
|
+
render() {
|
|
130
|
+
return (index.h(index.Host, null, index.h("ez-rich-toolbar-item", { icon: RichToolbarHelper.RICH_TOOLBAR_COMMAND_ICON.LIST, command: RichToolbarHelper.RICH_TOOLBAR_COMMANDS.FORMAT, value: RichToolbarHelper.RICH_TOOLBAR_FORMAT_TAGS.LIST, title: RichToolbarHelper.RICH_TOOLBAR_COMMAND_TITLE.LIST }), index.h("ez-rich-toolbar-item", { icon: RichToolbarHelper.RICH_TOOLBAR_COMMAND_ICON.IMAGE, command: RichToolbarHelper.RICH_TOOLBAR_COMMANDS.IMAGE, title: RichToolbarHelper.RICH_TOOLBAR_COMMAND_TITLE.IMAGE }), index.h("ez-rich-toolbar-item", { icon: RichToolbarHelper.RICH_TOOLBAR_COMMAND_ICON.LINK, command: RichToolbarHelper.RICH_TOOLBAR_COMMANDS.LINK, title: RichToolbarHelper.RICH_TOOLBAR_COMMAND_TITLE.LINK })));
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
EzRichToolbarConfigs.style = ezRichToolbarConfigsCss;
|
|
134
|
+
|
|
135
|
+
const ezRichToolbarLettersCss = ".sc-ez-rich-toolbar-letters-h{display:flex;gap:5px}";
|
|
136
|
+
|
|
137
|
+
const EzRichToolbarLetters = class {
|
|
138
|
+
constructor(hostRef) {
|
|
139
|
+
index.registerInstance(this, hostRef);
|
|
140
|
+
}
|
|
141
|
+
render() {
|
|
142
|
+
return (index.h(index.Host, null, index.h("ez-rich-toolbar-item", { icon: RichToolbarHelper.RICH_TOOLBAR_COMMAND_ICON.BOLD, command: RichToolbarHelper.RICH_TOOLBAR_COMMANDS.FORMAT, value: RichToolbarHelper.RICH_TOOLBAR_FORMAT_TAGS.BOLD, title: RichToolbarHelper.RICH_TOOLBAR_COMMAND_TITLE.BOLD }), index.h("ez-rich-toolbar-item", { icon: RichToolbarHelper.RICH_TOOLBAR_COMMAND_ICON.ITALIC, command: RichToolbarHelper.RICH_TOOLBAR_COMMANDS.FORMAT, value: RichToolbarHelper.RICH_TOOLBAR_FORMAT_TAGS.ITALIC, title: RichToolbarHelper.RICH_TOOLBAR_COMMAND_TITLE.ITALIC }), index.h("ez-rich-toolbar-item", { icon: RichToolbarHelper.RICH_TOOLBAR_COMMAND_ICON.UNDERLINE, command: RichToolbarHelper.RICH_TOOLBAR_COMMANDS.FORMAT, value: RichToolbarHelper.RICH_TOOLBAR_FORMAT_TAGS.UNDERLINE, title: RichToolbarHelper.RICH_TOOLBAR_COMMAND_TITLE.UNDERLINE })));
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
EzRichToolbarLetters.style = ezRichToolbarLettersCss;
|
|
146
|
+
|
|
147
|
+
function formatBytes(bytes, decimals = 1) {
|
|
148
|
+
if (bytes === 0) {
|
|
149
|
+
return "0 Bytes";
|
|
150
|
+
}
|
|
151
|
+
const k = 1024;
|
|
152
|
+
const dm = decimals < 0 ? 0 : decimals;
|
|
153
|
+
const sizes = ["Bytes", "Kilobytes", "Megabytes", "Gigabytes", "Terabytes", "Petabytes", "Exabytes", "Zettabytes", "Yottabytes"];
|
|
154
|
+
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
155
|
+
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + " " + sizes[i];
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
function fileToBase64(file) {
|
|
159
|
+
return new Promise((resolve, reject) => {
|
|
160
|
+
try {
|
|
161
|
+
const reader = new FileReader();
|
|
162
|
+
reader.onload = () => {
|
|
163
|
+
resolve(reader.result);
|
|
164
|
+
};
|
|
165
|
+
reader.readAsDataURL(file);
|
|
166
|
+
}
|
|
167
|
+
catch (error) {
|
|
168
|
+
reject(error);
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
const ezSimpleImageUploaderCss = ".image-uploader-container.sc-ez-simple-image-uploader{font-family:\"Roboto\";color:#2b3a54;display:flex;flex-direction:column;gap:var(--space--10, 10px);justify-content:space-between;align-items:center;padding-bottom:var(--space--8, 8px)}.header.sc-ez-simple-image-uploader{display:flex;font-weight:500;font-size:var(--font-size--medium, 16px)}.actions.sc-ez-simple-image-uploader{display:flex;justify-content:flex-end;gap:var(--space--12, 12px);margin-top:var(--space--12, 12px);width:100%}.drop-zone-section.sc-ez-simple-image-uploader{width:100%}.drop-zone.sc-ez-simple-image-uploader{display:flex;flex-wrap:wrap;background-color:var(--color--petroleum-70, #F4F6F9);padding:var(--space--6, 6px);width:100%;border-radius:var(--space--12, 12px);box-sizing:border-box;min-height:100px}.clickable.sc-ez-simple-image-uploader{cursor:pointer}.dragging.sc-ez-simple-image-uploader{background-color:var(--color--petroleum-100, #C8CCD3)}.drop-zone-container.sc-ez-simple-image-uploader{width:100%;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;border:2px dashed var(--color-strokes, #DCE0E8);border-radius:6px;box-sizing:border-box}.text-error.sc-ez-simple-image-uploader{font-family:var(--font--pattern, \"Roboto\");color:var(--color--red-600, #BD0025);font-size:var(--font-size--small, 12px)}.button-close.sc-ez-simple-image-uploader{border:none;background:none;cursor:pointer}";
|
|
174
|
+
|
|
175
|
+
const EzSimpleImageUploader = class {
|
|
176
|
+
constructor(hostRef) {
|
|
177
|
+
index.registerInstance(this, hostRef);
|
|
178
|
+
this.executeToolbarCommand = index.createEvent(this, "executeToolbarCommand", 7);
|
|
179
|
+
this.link = undefined;
|
|
180
|
+
this.base64 = undefined;
|
|
181
|
+
this.messageError = undefined;
|
|
182
|
+
this.selectedFile = undefined;
|
|
183
|
+
this.maxSize = 500;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Método responsável pela abertura do popup.
|
|
187
|
+
*/
|
|
188
|
+
async show() {
|
|
189
|
+
this._popupElement.opened = true;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Método responsável pelo fechamento do popup.
|
|
193
|
+
*/
|
|
194
|
+
async hide() {
|
|
195
|
+
this._popupElement.opened = false;
|
|
196
|
+
}
|
|
197
|
+
async handleCancel() {
|
|
198
|
+
this.removeSelectedFile();
|
|
199
|
+
this.executeToolbarCommand.emit({ command: RichToolbarHelper.RICH_TOOLBAR_COMMANDS.FOCUS });
|
|
200
|
+
await this.hide();
|
|
201
|
+
}
|
|
202
|
+
removeSelectedFile(event) {
|
|
203
|
+
event === null || event === void 0 ? void 0 : event.stopPropagation();
|
|
204
|
+
this.link = undefined;
|
|
205
|
+
this.base64 = undefined;
|
|
206
|
+
this.selectedFile = undefined;
|
|
207
|
+
this.messageError = undefined;
|
|
208
|
+
}
|
|
209
|
+
triggerFileSelect() {
|
|
210
|
+
if (!this.selectedFile) {
|
|
211
|
+
this._fileInput.click();
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
async handleImage(files) {
|
|
215
|
+
const file = files && files[0];
|
|
216
|
+
if (!file) {
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
if (file.size < (this.maxSize * 1000)) {
|
|
220
|
+
this.selectedFile = file;
|
|
221
|
+
this.base64 = await fileToBase64(file);
|
|
222
|
+
}
|
|
223
|
+
else {
|
|
224
|
+
this.messageError = `A imagem deve ter menos de ${formatBytes(this.maxSize)}.`;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
getFileList(event) {
|
|
228
|
+
if (event instanceof DragEvent) {
|
|
229
|
+
return Array.from(event.dataTransfer.files);
|
|
230
|
+
}
|
|
231
|
+
else {
|
|
232
|
+
const input = event.target;
|
|
233
|
+
return input.files;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
handleFileChange(event) {
|
|
237
|
+
event.preventDefault();
|
|
238
|
+
this.messageError = undefined;
|
|
239
|
+
this._dropZone.classList.remove("dragging");
|
|
240
|
+
const files = this.getFileList(event);
|
|
241
|
+
this.handleImage(files);
|
|
242
|
+
const input = event.target;
|
|
243
|
+
input.value = "";
|
|
244
|
+
}
|
|
245
|
+
handleDragOver(event) {
|
|
246
|
+
event.stopPropagation();
|
|
247
|
+
event.preventDefault();
|
|
248
|
+
}
|
|
249
|
+
handleDragEnter(event) {
|
|
250
|
+
event.preventDefault();
|
|
251
|
+
this._dropZone.classList.add("dragging");
|
|
252
|
+
}
|
|
253
|
+
handleDragLeave(event) {
|
|
254
|
+
event.preventDefault();
|
|
255
|
+
if (!this._dropZone.contains(event.relatedTarget)) {
|
|
256
|
+
this._dropZone.classList.remove("dragging");
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
async handleActionPopup(event) {
|
|
260
|
+
if (event.detail === "OK") {
|
|
261
|
+
await this.handleCreateImgTag();
|
|
262
|
+
}
|
|
263
|
+
else if (event.detail === "CANCEL" || event.detail === "CLOSE") {
|
|
264
|
+
await this.handleCancel();
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
async handleCreateImgTag() {
|
|
268
|
+
var _a;
|
|
269
|
+
const tag = `<img src="${(_a = this.base64) !== null && _a !== void 0 ? _a : this.link}" alt="Image" />`;
|
|
270
|
+
this.executeToolbarCommand.emit({ command: RichToolbarHelper.RICH_TOOLBAR_COMMANDS.FORMAT, value: tag });
|
|
271
|
+
this.removeSelectedFile();
|
|
272
|
+
await this.hide();
|
|
273
|
+
}
|
|
274
|
+
getOkButtonStatus() {
|
|
275
|
+
var _a;
|
|
276
|
+
return (!this.base64 && !((_a = this.link) === null || _a === void 0 ? void 0 : _a.trim())) ? 'DISABLED' : 'ENABLED';
|
|
277
|
+
}
|
|
278
|
+
render() {
|
|
279
|
+
return (index.h("ez-popup", { ref: ref => this._popupElement = ref, heightMode: "auto", size: "small", useHeader: false, onEzClosePopup: () => this.handleCancel() }, index.h("div", null, index.h("ez-modal-container", { modalTitle: "Upload de imagens", modalSubTitle: "Envie seus arquivos preenchendo apenas 1 campo por vez.", okButtonLabel: "Enviar", cancelButtonLabel: "Cancelar", onEzModalAction: this.handleActionPopup.bind(this), okButtonStatus: this.getOkButtonStatus() }, index.h("div", { class: "image-uploader-container" }, index.h("ez-tooltip", { message: "O arquivo selecionado abaixo ser\u00E1 priorizado!", active: !!this.selectedFile }, index.h("ez-text-input", { label: "Insira a URL da imagem", value: this.link, onEzChange: (e) => this.link = e.detail, enabled: !this.selectedFile })), index.h("span", null, "OU"), index.h("section", { class: "drop-zone-section" }, index.h("div", { ref: (ref) => this._dropZone = ref, class: "drop-zone", onDrop: (ev) => this.handleFileChange(ev), onDragOver: (ev) => this.handleDragOver(ev), onDragEnter: (ev) => this.handleDragEnter(ev), onDragLeave: (ev) => this.handleDragLeave(ev) }, index.h("div", { class: {
|
|
280
|
+
"drop-zone-container": true,
|
|
281
|
+
"clickable": !this.selectedFile,
|
|
282
|
+
}, onClick: () => this.triggerFileSelect() }, !!this.selectedFile ?
|
|
283
|
+
index.h(index.Fragment, null, index.h("span", { class: "ez-text ez-text--primary ez-text--medium" }, this.selectedFile.name, " (", formatBytes(this.selectedFile.size), ")"), index.h("button", { class: "button-close", onClick: (event) => this.removeSelectedFile(event), title: "Remover arquivo" }, index.h("ez-icon", { iconName: "close" })))
|
|
284
|
+
:
|
|
285
|
+
index.h(index.Fragment, null, index.h("ez-icon", { iconName: "anexo" }), index.h("span", { class: "ez-text ez-text--primary ez-text--medium" }, "Arraste e solte ou clique para adicionar arquivos"))), index.h("input", { ref: (el) => this._fileInput = el, type: "file", accept: "image/*", style: { display: "none" }, onChange: (ev) => this.handleFileChange(ev) })), !!this.messageError && index.h("span", { class: "text-error" }, this.messageError)))))));
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
EzSimpleImageUploader.style = ezSimpleImageUploaderCss;
|
|
289
|
+
|
|
290
|
+
exports.ez_link_builder = EzLinkBuilder;
|
|
291
|
+
exports.ez_rich_toolbar = EzRichToolbar;
|
|
292
|
+
exports.ez_rich_toolbar_arrows = EzRichToolbarArrows;
|
|
293
|
+
exports.ez_rich_toolbar_configs = EzRichToolbarConfigs;
|
|
294
|
+
exports.ez_rich_toolbar_letters = EzRichToolbarLetters;
|
|
295
|
+
exports.ez_simple_image_uploader = EzSimpleImageUploader;
|
|
@@ -22,7 +22,7 @@ var ModalButtonStatus;
|
|
|
22
22
|
})(ModalButtonStatus || (ModalButtonStatus = {}));
|
|
23
23
|
const ModalButtonStatus$1 = ModalButtonStatus;
|
|
24
24
|
|
|
25
|
-
const ezModalContainerCss = ".sc-ez-modal-container-h{--ez-modal-container-overflow-y:auto;--ez-modal-container-overflow-x:hidden;display:grid;grid-template-rows:0 auto 1fr auto 0;width:100%;height:100%}.ez-modal-container__header-container.sc-ez-modal-container{outline:none}.ez-modal-container__header.sc-ez-modal-container{display:flex;flex-wrap:nowrap;flex-direction:row;justify-content:space-between}.ez-modal-container__content.sc-ez-modal-container{overflow-y:var(--ez-modal-container-overflow-y);overflow-x:var(--ez-modal-container-overflow-x);outline:none}.ez-modal-container__content.sc-ez-modal-container::-webkit-scrollbar{width:var(--space--small);min-width:var(--space--small);max-width:var(--space--small)}.ez-modal-container__footer.sc-ez-modal-container{display:flex;flex-direction:row;justify-content:flex-end;gap:var(--space--medium);width:100%;padding-top:var(--space--small, 6px)}.ez-modal-container__title.sc-ez-modal-container{display:grid}.ez-modal-container__close-button.sc-ez-modal-container{cursor:pointer;background-color:transparent;border:none;outline:none}.ez-modal-container__close-icon.sc-ez-modal-container{--icon--color:var(--title--primary, #2B3A54)}.ez-modal-container__focus-ctrl.sc-ez-modal-container{height:0px;background-color:transparent;border:none}";
|
|
25
|
+
const ezModalContainerCss = ".sc-ez-modal-container-h{--ez-modal-container-overflow-y:auto;--ez-modal-container-overflow-x:hidden;display:grid;grid-template-rows:0 auto 1fr auto 0;width:100%;height:100%}.ez-modal-container__header-container.sc-ez-modal-container{outline:none}.ez-modal-container__header.sc-ez-modal-container{display:flex;flex-wrap:nowrap;flex-direction:row;justify-content:space-between;align-items:start}.ez-modal-container__content.sc-ez-modal-container{overflow-y:var(--ez-modal-container-overflow-y);overflow-x:var(--ez-modal-container-overflow-x);outline:none}.ez-modal-container__content.sc-ez-modal-container::-webkit-scrollbar{width:var(--space--small);min-width:var(--space--small);max-width:var(--space--small)}.ez-modal-container__footer.sc-ez-modal-container{display:flex;flex-direction:row;justify-content:flex-end;gap:var(--space--medium);width:100%;padding-top:var(--space--small, 6px)}.ez-modal-container__title.sc-ez-modal-container{display:grid}.ez-modal-container__close-button.sc-ez-modal-container{cursor:pointer;background-color:transparent;border:none;outline:none;padding:var(--space--6, 6px) 0px}.ez-modal-container__close-icon.sc-ez-modal-container{--icon--color:var(--title--primary, #2B3A54)}.ez-modal-container__focus-ctrl.sc-ez-modal-container{height:0px;background-color:transparent;border:none}";
|
|
26
26
|
|
|
27
27
|
const EzModalContainer = class {
|
|
28
28
|
constructor(hostRef) {
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-a7b0c73d.js');
|
|
6
|
+
|
|
7
|
+
const ezRichToolbarItemCss = "ez-icon.sc-ez-rich-toolbar-item{--ez-icon--color:var(--color--secondary, #383c45)}.rich-toolbar-item.sc-ez-rich-toolbar-item{display:flex;align-items:center;justify-content:center;width:32px;height:32px;background:none;border:none;border-radius:4px;cursor:pointer;transition:0.3s all ease-in-out}.rich-toolbar-item.sc-ez-rich-toolbar-item:hover{background-color:#f5f5f5}";
|
|
8
|
+
|
|
9
|
+
const EzRichToolbarItem = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
this.actionTriggered = index.createEvent(this, "actionTriggered", 7);
|
|
13
|
+
this.icon = undefined;
|
|
14
|
+
this.command = undefined;
|
|
15
|
+
this.title = undefined;
|
|
16
|
+
this.value = undefined;
|
|
17
|
+
}
|
|
18
|
+
async triggerAction() {
|
|
19
|
+
this.actionTriggered.emit({ command: this.command, value: this.value });
|
|
20
|
+
}
|
|
21
|
+
render() {
|
|
22
|
+
return (index.h("div", { id: `rich-toolbar-item-${this.icon}`, class: `rich-toolbar-item`, title: this.title, onClick: this.triggerAction.bind(this) }, index.h("ez-icon", { class: 'toolbar-item', iconName: this.icon })));
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
EzRichToolbarItem.style = ezRichToolbarItemCss;
|
|
26
|
+
|
|
27
|
+
exports.ez_rich_toolbar_item = EzRichToolbarItem;
|
|
@@ -3,129 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-a7b0c73d.js');
|
|
6
|
-
const core = require('@sankhyalabs/core');
|
|
7
|
-
const CSSVarsUtils = require('./CSSVarsUtils-f20973d1.js');
|
|
8
6
|
const floatingUi_dom_esm = require('./floating-ui.dom.esm-017acce4.js');
|
|
9
|
-
|
|
10
|
-
const ezFilterInputCss = ":host{display:block;width:100%}";
|
|
11
|
-
|
|
12
|
-
const EzFilterInput = class {
|
|
13
|
-
constructor(hostRef) {
|
|
14
|
-
index.registerInstance(this, hostRef);
|
|
15
|
-
this.ezChange = index.createEvent(this, "ezChange", 7);
|
|
16
|
-
this.ezSearching = index.createEvent(this, "ezSearching", 7);
|
|
17
|
-
this.ezFocusIn = index.createEvent(this, "ezFocusIn", 7);
|
|
18
|
-
this._searchingText = "";
|
|
19
|
-
this.handleFocus = () => {
|
|
20
|
-
if (this._searchingText === "") {
|
|
21
|
-
this._textInput.value = "";
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
this._textInput.value = this._searchingText;
|
|
25
|
-
}
|
|
26
|
-
this.ezFocusIn.emit();
|
|
27
|
-
};
|
|
28
|
-
this.label = undefined;
|
|
29
|
-
this.value = undefined;
|
|
30
|
-
this.enabled = true;
|
|
31
|
-
this.errorMessage = undefined;
|
|
32
|
-
this.restrict = undefined;
|
|
33
|
-
this.mode = "regular";
|
|
34
|
-
this.asyncSearch = false;
|
|
35
|
-
this.canShowError = true;
|
|
36
|
-
this.autoFocus = false;
|
|
37
|
-
}
|
|
38
|
-
observeLabel() {
|
|
39
|
-
if (this._textInput) {
|
|
40
|
-
this._textInput.label = this.label;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
observeErrorMessage() {
|
|
44
|
-
if (this._textInput) {
|
|
45
|
-
this._textInput.errorMessage = this.errorMessage;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
observeValue(newValue, oldValue) {
|
|
49
|
-
if (this._textInput && newValue != oldValue) {
|
|
50
|
-
this._textInput.value = newValue;
|
|
51
|
-
this.ezChange.emit(newValue);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Aplica o foco no campo.
|
|
56
|
-
*/
|
|
57
|
-
async setFocus(options) {
|
|
58
|
-
this._textInput.setFocus(options);
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Remove o foco do campo.
|
|
62
|
-
*/
|
|
63
|
-
async setBlur() {
|
|
64
|
-
this._textInput.setBlur();
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Retorna se o conteúdo é inválido.
|
|
68
|
-
*/
|
|
69
|
-
async isInvalid() {
|
|
70
|
-
return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Método responsável por setar um novo valor ao campo.
|
|
74
|
-
*/
|
|
75
|
-
async setValue(newValue) {
|
|
76
|
-
if (!this.asyncSearch || this._textInput == undefined) {
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
if (newValue !== this.value) {
|
|
80
|
-
this.value = newValue;
|
|
81
|
-
this._searchingText = "";
|
|
82
|
-
}
|
|
83
|
-
else {
|
|
84
|
-
this._textInput.value = newValue;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Método responsável por resetar o valor do campo para o ultimo valor inputado.
|
|
89
|
-
*/
|
|
90
|
-
async endSearch() {
|
|
91
|
-
if (!this.asyncSearch || this._textInput == undefined) {
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
if (this._textInput.value !== this.value) {
|
|
95
|
-
this._textInput.value = this.value;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
handleChange(evt) {
|
|
99
|
-
const newValue = evt.detail;
|
|
100
|
-
this.errorMessage = "";
|
|
101
|
-
if (this.asyncSearch) {
|
|
102
|
-
this._searchingText = newValue;
|
|
103
|
-
this.ezSearching.emit(newValue);
|
|
104
|
-
}
|
|
105
|
-
else if (newValue !== this.value) {
|
|
106
|
-
this.value = newValue;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
componentDidLoad() {
|
|
110
|
-
CSSVarsUtils.CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
111
|
-
if (this.autoFocus) {
|
|
112
|
-
requestAnimationFrame(() => {
|
|
113
|
-
this.setFocus({ selectText: true });
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
render() {
|
|
118
|
-
core.ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
119
|
-
return (index.h("ez-text-input", { "data-element-id": core.ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, label: this.label, onEzChange: evt => this.handleChange(evt), value: this.value, enabled: this.enabled, errorMessage: this.errorMessage, restrict: this.restrict, mode: this.mode, onFocusin: this.handleFocus, canShowError: this.canShowError }, index.h("ez-icon", { slot: "leftIcon", iconName: "search" })));
|
|
120
|
-
}
|
|
121
|
-
get _elem() { return index.getElement(this); }
|
|
122
|
-
static get watchers() { return {
|
|
123
|
-
"label": ["observeLabel"],
|
|
124
|
-
"errorMessage": ["observeErrorMessage"],
|
|
125
|
-
"value": ["observeValue"]
|
|
126
|
-
}; }
|
|
127
|
-
};
|
|
128
|
-
EzFilterInput.style = ezFilterInputCss;
|
|
7
|
+
const core = require('@sankhyalabs/core');
|
|
129
8
|
|
|
130
9
|
const ezTooltipCss = ":host{--triangle-size:8px;width:100%}.tooltip{position:absolute;z-index:var(--elevation--24);padding:var(--space--extra-small, 3px) var(--space--small, 6px);border-radius:var(--border--radius-small);box-sizing:border-box;font-family:var(--font-pattern\t, 'Roboto', sans-serif);font-size:var(--text--small, 12px);font-weight:var(--text-weight--medium, 400);text-align:center;width:max-content;display:none}.arrow{position:absolute;width:var(--triangle-size);height:var(--triangle-size);transform:rotate(45deg)}.default-tooltip{background:var(--title--primary, #2b3a54);color:var(--color--inverted)}.default-tooltip .arrow{background:var(--title--primary, #2b3a54)}.error-tooltip{background:var(--color-alert--error-800, #BD0025);color:var(--color--error-200, #F7E0E5)}.error-tooltip .arrow{background:var(--color-alert--error-800, #BD0025)}.success-tooltip{background:var(--color--success, #00cb94);color:var(--color--success-200, #EBFFFA)}.success-tooltip .arrow{background:var(--color--success, #00cb94)}.warning-tooltip{background:var(--color--warning, #f2d410);color:var(--color--warning-200, #FDF8D8)}.warning-tooltip .arrow{background:var(--color--warning, #f2d410)}";
|
|
131
10
|
|
|
@@ -253,5 +132,4 @@ const EzTooltip = class {
|
|
|
253
132
|
};
|
|
254
133
|
EzTooltip.style = ezTooltipCss;
|
|
255
134
|
|
|
256
|
-
exports.ez_filter_input = EzFilterInput;
|
|
257
135
|
exports.ez_tooltip = EzTooltip;
|