@sankhyalabs/ezui 6.1.0-dev.3 → 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/_commonjsHelpers-537d719a.js +20 -0
- package/dist/cjs/ez-chart.cjs.entry.js +3 -18
- 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 +24 -0
- 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-grid/controller/ag-grid/AgGridController.js +24 -1
- 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 +2009 -4
- package/dist/esm/RichToolbarHelper-fd6427df.js +41 -0
- package/dist/esm/_commonjsHelpers-9943807e.js +17 -0
- package/dist/esm/ez-chart.entry.js +1 -16
- 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 +24 -0
- 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-112455b1.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-4c01e506.entry.js → p-5f1e98da.entry.js} +46 -46
- package/dist/ezui/p-6369a0cd.entry.js +1 -0
- 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-grid/controller/ag-grid/AgGridController.d.ts +1 -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 +2 -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
- package/dist/ezui/p-d47dabdf.entry.js +0 -1
|
@@ -48,6 +48,14 @@
|
|
|
48
48
|
"./components/ez-popover-plus/ez-popover-plus.js",
|
|
49
49
|
"./components/ez-popover-plus/subcomponent/ez-popover-core.js",
|
|
50
50
|
"./components/ez-popup/ez-popup.js",
|
|
51
|
+
"./components/ez-rich-text/ez-rich-text.js",
|
|
52
|
+
"./components/ez-rich-text/ez-link-builder/ez-link-builder.js",
|
|
53
|
+
"./components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar.js",
|
|
54
|
+
"./components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-arrows/ez-rich-toolbar-arrows.js",
|
|
55
|
+
"./components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-configs/ez-rich-toolbar-configs.js",
|
|
56
|
+
"./components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-item/ez-rich-toolbar-item.js",
|
|
57
|
+
"./components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-letters/ez-rich-toolbar-letters.js",
|
|
58
|
+
"./components/ez-rich-text/ez-simple-image-uploader/ez-simple-image-uploader.js",
|
|
51
59
|
"./components/ez-scroller/ez-scroller.js",
|
|
52
60
|
"./components/ez-search/subcomponent/search-list/search-list.js",
|
|
53
61
|
"./components/ez-search-plus/ez-search-plus.js",
|
|
@@ -9,6 +9,7 @@ import { buildTextArea } from "./templates/TextArea.tpl";
|
|
|
9
9
|
import { buildTextInput } from "./templates/TextInput.tpl";
|
|
10
10
|
import { buildSearchPlus } from "./templates/SearchInputPlus.tpl";
|
|
11
11
|
import { buildSearch } from "./templates/SearchInput.tpl";
|
|
12
|
+
import { buildRichText } from "./templates/RichText.tpl";
|
|
12
13
|
const uiBuilders = new Map();
|
|
13
14
|
uiBuilders.set(UserInterface.CHECKBOX, buildCheckBox);
|
|
14
15
|
uiBuilders.set(UserInterface.SWITCH, buildSwitch);
|
|
@@ -23,6 +24,7 @@ uiBuilders.set(UserInterface.INTEGERNUMBER, buildInteger);
|
|
|
23
24
|
uiBuilders.set(UserInterface.SEARCH, buildSearch);
|
|
24
25
|
uiBuilders.set(UserInterface.SEARCHPLUS, buildSearchPlus);
|
|
25
26
|
uiBuilders.set(UserInterface.LONGTEXT, buildTextArea);
|
|
27
|
+
uiBuilders.set(UserInterface.HTML, buildRichText);
|
|
26
28
|
export const fieldBuilder = (field) => {
|
|
27
29
|
const builder = uiBuilders.get(field.userInterface) || buildTextInput;
|
|
28
30
|
const label = field.required ? `${field.label}${REQUIRED_INFO}` : field.label;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApplicationContext, DataType, LockManager, LockManagerOperation, MaskFormatter, NumberUtils, SortMode, StringUtils, UserInterface, } from '@sankhyalabs/core';
|
|
2
|
-
import { Grid } from "@ag-grid-community/core";
|
|
2
|
+
import { Grid, } from "@ag-grid-community/core";
|
|
3
3
|
import { LicenseManager } from '@ag-grid-enterprise/core';
|
|
4
4
|
import DataSource from './DataSource';
|
|
5
5
|
import { EzGridCustomHeader } from './components/EzGridCustomHeader';
|
|
@@ -14,6 +14,7 @@ import { RangeSelectionModule } from '@ag-grid-enterprise/range-selection';
|
|
|
14
14
|
import { ServerSideRowModelModule } from '@ag-grid-enterprise/server-side-row-model';
|
|
15
15
|
import { ClipboardModule } from '@ag-grid-enterprise/clipboard';
|
|
16
16
|
import { MenuModule } from '@ag-grid-enterprise/menu';
|
|
17
|
+
import DOMPurify from 'dompurify';
|
|
17
18
|
export default class AgGridController {
|
|
18
19
|
configFilterColumn(filterColumn) {
|
|
19
20
|
this._filterColumn = filterColumn;
|
|
@@ -959,6 +960,10 @@ export default class AgGridController {
|
|
|
959
960
|
if (params.value instanceof Promise) {
|
|
960
961
|
return "Carregando...";
|
|
961
962
|
}
|
|
963
|
+
if (source.userInterface === UserInterface.HTML) {
|
|
964
|
+
this.setHTMLRender(params, source);
|
|
965
|
+
return "";
|
|
966
|
+
}
|
|
962
967
|
const customFormatter = this._customFormatters.get(source.name);
|
|
963
968
|
if (customFormatter) {
|
|
964
969
|
const formattedValue = customFormatter.format(params.value, source, params.data.__record__id__);
|
|
@@ -975,6 +980,24 @@ export default class AgGridController {
|
|
|
975
980
|
editable: !((_e = source.props) === null || _e === void 0 ? void 0 : _e.has(PRESENTATION_FROM_COL_PROP_NAME))
|
|
976
981
|
});
|
|
977
982
|
}
|
|
983
|
+
setHTMLRender(params, source) {
|
|
984
|
+
const htmlSanitized = DOMPurify.sanitize(params.value);
|
|
985
|
+
params.colDef.cellRenderer = (cellParams) => {
|
|
986
|
+
if (cellParams.node.rowIndex === params.node.rowIndex) {
|
|
987
|
+
const element = document.createElement('span');
|
|
988
|
+
element.innerHTML = htmlSanitized;
|
|
989
|
+
return element.firstChild;
|
|
990
|
+
}
|
|
991
|
+
return cellParams.value;
|
|
992
|
+
};
|
|
993
|
+
params.colDef.cellStyle = (cellParams) => {
|
|
994
|
+
const defaultStyle = this.getStyleByColumn(source);
|
|
995
|
+
if (cellParams.node.rowIndex === params.node.rowIndex) {
|
|
996
|
+
return Object.assign(defaultStyle, { padding: 0 });
|
|
997
|
+
}
|
|
998
|
+
return defaultStyle;
|
|
999
|
+
};
|
|
1000
|
+
}
|
|
978
1001
|
setCustomFormatters(customFormatters) {
|
|
979
1002
|
this._customFormatters = customFormatters;
|
|
980
1003
|
}
|
|
@@ -76,146 +76,153 @@ svg {
|
|
|
76
76
|
.ez-icon-balance:before { content: "\ea13"; }
|
|
77
77
|
.ez-icon-bell-inverted:before { content: "\ea14"; }
|
|
78
78
|
.ez-icon-bell:before { content: "\ea15"; }
|
|
79
|
-
.ez-icon-
|
|
80
|
-
.ez-icon-
|
|
81
|
-
.ez-icon-
|
|
82
|
-
.ez-icon-
|
|
83
|
-
.ez-icon-calendar:before { content: "\ea1a"; }
|
|
84
|
-
.ez-icon-
|
|
85
|
-
.ez-icon-
|
|
86
|
-
.ez-icon-
|
|
87
|
-
.ez-icon-check-circle:before { content: "\ea1e"; }
|
|
88
|
-
.ez-icon-check:before { content: "\ea1f"; }
|
|
89
|
-
.ez-icon-
|
|
90
|
-
.ez-icon-chevron-
|
|
91
|
-
.ez-icon-chevron-
|
|
92
|
-
.ez-icon-chevron-
|
|
93
|
-
.ez-icon-
|
|
94
|
-
.ez-icon-circle:before { content: "\ea25"; }
|
|
95
|
-
.ez-icon-
|
|
96
|
-
.ez-icon-
|
|
97
|
-
.ez-icon-
|
|
98
|
-
.ez-icon-
|
|
99
|
-
.ez-icon-
|
|
100
|
-
.ez-icon-
|
|
101
|
-
.ez-icon-
|
|
102
|
-
.ez-icon-
|
|
103
|
-
.ez-icon-
|
|
104
|
-
.ez-icon-
|
|
105
|
-
.ez-icon-
|
|
106
|
-
.ez-icon-
|
|
107
|
-
.ez-icon-
|
|
108
|
-
.ez-icon-
|
|
109
|
-
.ez-icon-delete:before { content: "\ea34"; }
|
|
110
|
-
.ez-icon-
|
|
111
|
-
.ez-icon-
|
|
112
|
-
.ez-icon-
|
|
113
|
-
.ez-icon-
|
|
114
|
-
.ez-icon-
|
|
115
|
-
.ez-icon-dots-
|
|
116
|
-
.ez-icon-
|
|
117
|
-
.ez-icon-
|
|
118
|
-
.ez-icon-dual-chevron-
|
|
119
|
-
.ez-icon-dual-chevron-
|
|
120
|
-
.ez-icon-dual-chevron-
|
|
121
|
-
.ez-icon-
|
|
122
|
-
.ez-icon-edit-
|
|
123
|
-
.ez-icon-edit-
|
|
124
|
-
.ez-icon-edit-
|
|
125
|
-
.ez-icon-edit:before { content: "\ea44"; }
|
|
126
|
-
.ez-icon-
|
|
127
|
-
.ez-icon-
|
|
128
|
-
.ez-icon-
|
|
129
|
-
.ez-icon-
|
|
130
|
-
.ez-icon-
|
|
131
|
-
.ez-icon-
|
|
132
|
-
.ez-icon-
|
|
133
|
-
.ez-icon-eye:before { content: "\ea4c"; }
|
|
134
|
-
.ez-icon-
|
|
135
|
-
.ez-icon-
|
|
136
|
-
.ez-icon-
|
|
137
|
-
.ez-icon-file-
|
|
138
|
-
.ez-icon-
|
|
139
|
-
.ez-icon-
|
|
140
|
-
.ez-icon-find-
|
|
141
|
-
.ez-icon-
|
|
142
|
-
.ez-icon-
|
|
143
|
-
.ez-icon-
|
|
144
|
-
.ez-icon-
|
|
145
|
-
.ez-icon-
|
|
146
|
-
.ez-icon-
|
|
147
|
-
.ez-icon-help:before { content: "\ea5a"; }
|
|
148
|
-
.ez-icon-
|
|
149
|
-
.ez-icon-
|
|
150
|
-
.ez-icon-
|
|
151
|
-
.ez-icon-
|
|
152
|
-
.ez-icon-
|
|
153
|
-
.ez-icon-
|
|
154
|
-
.ez-icon-
|
|
155
|
-
.ez-icon-
|
|
156
|
-
.ez-icon-
|
|
157
|
-
.ez-icon-
|
|
158
|
-
.ez-icon-
|
|
159
|
-
.ez-icon-
|
|
160
|
-
.ez-icon-
|
|
161
|
-
.ez-icon-
|
|
162
|
-
.ez-icon-
|
|
163
|
-
.ez-icon-
|
|
164
|
-
.ez-icon-
|
|
165
|
-
.ez-icon-
|
|
166
|
-
.ez-icon-
|
|
167
|
-
.ez-icon-
|
|
168
|
-
.ez-icon-
|
|
169
|
-
.ez-icon-
|
|
170
|
-
.ez-icon-
|
|
171
|
-
.ez-icon-
|
|
172
|
-
.ez-icon-
|
|
173
|
-
.ez-icon-
|
|
174
|
-
.ez-icon-
|
|
175
|
-
.ez-icon-
|
|
176
|
-
.ez-icon-
|
|
177
|
-
.ez-icon-
|
|
178
|
-
.ez-icon-
|
|
179
|
-
.ez-icon-
|
|
180
|
-
.ez-icon-
|
|
181
|
-
.ez-icon-
|
|
182
|
-
.ez-icon-
|
|
183
|
-
.ez-icon-
|
|
184
|
-
.ez-icon-
|
|
185
|
-
.ez-icon-
|
|
186
|
-
.ez-icon-
|
|
187
|
-
.ez-icon-
|
|
188
|
-
.ez-icon-
|
|
189
|
-
.ez-icon-
|
|
190
|
-
.ez-icon-
|
|
191
|
-
.ez-icon-
|
|
192
|
-
.ez-icon-
|
|
193
|
-
.ez-icon-
|
|
194
|
-
.ez-icon-
|
|
195
|
-
.ez-icon-
|
|
196
|
-
.ez-icon-
|
|
197
|
-
.ez-icon-
|
|
198
|
-
.ez-icon-
|
|
199
|
-
.ez-icon-
|
|
200
|
-
.ez-icon-
|
|
201
|
-
.ez-icon-
|
|
202
|
-
.ez-icon-
|
|
203
|
-
.ez-icon-
|
|
204
|
-
.ez-icon-
|
|
205
|
-
.ez-icon-
|
|
206
|
-
.ez-icon-
|
|
207
|
-
.ez-icon-
|
|
208
|
-
.ez-icon-
|
|
209
|
-
.ez-icon-
|
|
210
|
-
.ez-icon-
|
|
211
|
-
.ez-icon-
|
|
212
|
-
.ez-icon-
|
|
213
|
-
.ez-icon-
|
|
214
|
-
.ez-icon-
|
|
215
|
-
.ez-icon-
|
|
216
|
-
.ez-icon-
|
|
217
|
-
.ez-icon-
|
|
218
|
-
.ez-icon-
|
|
79
|
+
.ez-icon-bold:before { content: "\ea16"; }
|
|
80
|
+
.ez-icon-boleto:before { content: "\ea17"; }
|
|
81
|
+
.ez-icon-boolean:before { content: "\ea18"; }
|
|
82
|
+
.ez-icon-business-center:before { content: "\ea19"; }
|
|
83
|
+
.ez-icon-calendar-clock:before { content: "\ea1a"; }
|
|
84
|
+
.ez-icon-calendar:before { content: "\ea1b"; }
|
|
85
|
+
.ez-icon-cart-history:before { content: "\ea1c"; }
|
|
86
|
+
.ez-icon-cash-remove:before { content: "\ea1d"; }
|
|
87
|
+
.ez-icon-check-circle-inverted:before { content: "\ea1e"; }
|
|
88
|
+
.ez-icon-check-circle:before { content: "\ea1f"; }
|
|
89
|
+
.ez-icon-check:before { content: "\ea20"; }
|
|
90
|
+
.ez-icon-chevron-down:before { content: "\ea21"; }
|
|
91
|
+
.ez-icon-chevron-left:before { content: "\ea22"; }
|
|
92
|
+
.ez-icon-chevron-right:before { content: "\ea23"; }
|
|
93
|
+
.ez-icon-chevron-up:before { content: "\ea24"; }
|
|
94
|
+
.ez-icon-circle--medium:before { content: "\ea25"; }
|
|
95
|
+
.ez-icon-circle:before { content: "\ea26"; }
|
|
96
|
+
.ez-icon-clean-cart:before { content: "\ea27"; }
|
|
97
|
+
.ez-icon-cleaning:before { content: "\ea28"; }
|
|
98
|
+
.ez-icon-clipboard:before { content: "\ea29"; }
|
|
99
|
+
.ez-icon-clock-rotate-left:before { content: "\ea2a"; }
|
|
100
|
+
.ez-icon-close:before { content: "\ea2b"; }
|
|
101
|
+
.ez-icon-cobrar:before { content: "\ea2c"; }
|
|
102
|
+
.ez-icon-code:before { content: "\ea2d"; }
|
|
103
|
+
.ez-icon-configuration:before { content: "\ea2e"; }
|
|
104
|
+
.ez-icon-content-cut:before { content: "\ea2f"; }
|
|
105
|
+
.ez-icon-copy:before { content: "\ea30"; }
|
|
106
|
+
.ez-icon-credit_card:before { content: "\ea31"; }
|
|
107
|
+
.ez-icon-crop:before { content: "\ea32"; }
|
|
108
|
+
.ez-icon-custom:before { content: "\ea33"; }
|
|
109
|
+
.ez-icon-delete-file:before { content: "\ea34"; }
|
|
110
|
+
.ez-icon-delete:before { content: "\ea35"; }
|
|
111
|
+
.ez-icon-description:before { content: "\ea36"; }
|
|
112
|
+
.ez-icon-dividir:before { content: "\ea37"; }
|
|
113
|
+
.ez-icon-docx:before { content: "\ea38"; }
|
|
114
|
+
.ez-icon-dot-notification:before { content: "\ea39"; }
|
|
115
|
+
.ez-icon-dots-horizontal:before { content: "\ea3a"; }
|
|
116
|
+
.ez-icon-dots-vertical:before { content: "\ea3b"; }
|
|
117
|
+
.ez-icon-drag-indicator:before { content: "\ea3c"; }
|
|
118
|
+
.ez-icon-dual-chevron-down:before { content: "\ea3d"; }
|
|
119
|
+
.ez-icon-dual-chevron-left:before { content: "\ea3e"; }
|
|
120
|
+
.ez-icon-dual-chevron-right:before { content: "\ea3f"; }
|
|
121
|
+
.ez-icon-dual-chevron-up:before { content: "\ea40"; }
|
|
122
|
+
.ez-icon-edit-file:before { content: "\ea41"; }
|
|
123
|
+
.ez-icon-edit-table:before { content: "\ea42"; }
|
|
124
|
+
.ez-icon-edit-time:before { content: "\ea43"; }
|
|
125
|
+
.ez-icon-edit-value:before { content: "\ea44"; }
|
|
126
|
+
.ez-icon-edit:before { content: "\ea45"; }
|
|
127
|
+
.ez-icon-email:before { content: "\ea46"; }
|
|
128
|
+
.ez-icon-estorno:before { content: "\ea47"; }
|
|
129
|
+
.ez-icon-exe:before { content: "\ea48"; }
|
|
130
|
+
.ez-icon-expand:before { content: "\ea49"; }
|
|
131
|
+
.ez-icon-expandir_card:before { content: "\ea4a"; }
|
|
132
|
+
.ez-icon-extrato:before { content: "\ea4b"; }
|
|
133
|
+
.ez-icon-eye-off:before { content: "\ea4c"; }
|
|
134
|
+
.ez-icon-eye:before { content: "\ea4d"; }
|
|
135
|
+
.ez-icon-favorite:before { content: "\ea4e"; }
|
|
136
|
+
.ez-icon-figma:before { content: "\ea4f"; }
|
|
137
|
+
.ez-icon-file-download:before { content: "\ea50"; }
|
|
138
|
+
.ez-icon-file-upload:before { content: "\ea51"; }
|
|
139
|
+
.ez-icon-filter:before { content: "\ea52"; }
|
|
140
|
+
.ez-icon-find-file:before { content: "\ea53"; }
|
|
141
|
+
.ez-icon-find-page:before { content: "\ea54"; }
|
|
142
|
+
.ez-icon-format-color-fill:before { content: "\ea55"; }
|
|
143
|
+
.ez-icon-generic:before { content: "\ea56"; }
|
|
144
|
+
.ez-icon-gif:before { content: "\ea57"; }
|
|
145
|
+
.ez-icon-graph_bar:before { content: "\ea58"; }
|
|
146
|
+
.ez-icon-handshake:before { content: "\ea59"; }
|
|
147
|
+
.ez-icon-help-inverted:before { content: "\ea5a"; }
|
|
148
|
+
.ez-icon-help:before { content: "\ea5b"; }
|
|
149
|
+
.ez-icon-hide-list:before { content: "\ea5c"; }
|
|
150
|
+
.ez-icon-hide_menu:before { content: "\ea5d"; }
|
|
151
|
+
.ez-icon-hierarchical-tree:before { content: "\ea5e"; }
|
|
152
|
+
.ez-icon-home:before { content: "\ea5f"; }
|
|
153
|
+
.ez-icon-icons104:before { content: "\ea60"; }
|
|
154
|
+
.ez-icon-image-plus:before { content: "\ea61"; }
|
|
155
|
+
.ez-icon-italic:before { content: "\ea62"; }
|
|
156
|
+
.ez-icon-language:before { content: "\ea63"; }
|
|
157
|
+
.ez-icon-launch:before { content: "\ea64"; }
|
|
158
|
+
.ez-icon-lightbulb:before { content: "\ea65"; }
|
|
159
|
+
.ez-icon-link:before { content: "\ea66"; }
|
|
160
|
+
.ez-icon-list:before { content: "\ea67"; }
|
|
161
|
+
.ez-icon-location:before { content: "\ea68"; }
|
|
162
|
+
.ez-icon-lock-outline:before { content: "\ea69"; }
|
|
163
|
+
.ez-icon-lock:before { content: "\ea6a"; }
|
|
164
|
+
.ez-icon-menu:before { content: "\ea6b"; }
|
|
165
|
+
.ez-icon-mid:before { content: "\ea6c"; }
|
|
166
|
+
.ez-icon-minus:before { content: "\ea6d"; }
|
|
167
|
+
.ez-icon-money-off:before { content: "\ea6e"; }
|
|
168
|
+
.ez-icon-money:before { content: "\ea6f"; }
|
|
169
|
+
.ez-icon-more:before { content: "\ea70"; }
|
|
170
|
+
.ez-icon-mp3:before { content: "\ea71"; }
|
|
171
|
+
.ez-icon-mp4:before { content: "\ea72"; }
|
|
172
|
+
.ez-icon-multiple-files:before { content: "\ea73"; }
|
|
173
|
+
.ez-icon-north-west:before { content: "\ea74"; }
|
|
174
|
+
.ez-icon-number:before { content: "\ea75"; }
|
|
175
|
+
.ez-icon-ordem-ascendente:before { content: "\ea76"; }
|
|
176
|
+
.ez-icon-ordem-descendente:before { content: "\ea77"; }
|
|
177
|
+
.ez-icon-parcelar:before { content: "\ea78"; }
|
|
178
|
+
.ez-icon-pause:before { content: "\ea79"; }
|
|
179
|
+
.ez-icon-payments:before { content: "\ea7a"; }
|
|
180
|
+
.ez-icon-pdf:before { content: "\ea7b"; }
|
|
181
|
+
.ez-icon-play:before { content: "\ea7c"; }
|
|
182
|
+
.ez-icon-plus:before { content: "\ea7d"; }
|
|
183
|
+
.ez-icon-png:before { content: "\ea7e"; }
|
|
184
|
+
.ez-icon-power:before { content: "\ea7f"; }
|
|
185
|
+
.ez-icon-pptx:before { content: "\ea80"; }
|
|
186
|
+
.ez-icon-preview:before { content: "\ea81"; }
|
|
187
|
+
.ez-icon-print:before { content: "\ea82"; }
|
|
188
|
+
.ez-icon-push-pin:before { content: "\ea83"; }
|
|
189
|
+
.ez-icon-rateio:before { content: "\ea84"; }
|
|
190
|
+
.ez-icon-receipt:before { content: "\ea85"; }
|
|
191
|
+
.ez-icon-recolher_card:before { content: "\ea86"; }
|
|
192
|
+
.ez-icon-redo:before { content: "\ea87"; }
|
|
193
|
+
.ez-icon-remove-from-cart:before { content: "\ea88"; }
|
|
194
|
+
.ez-icon-restore:before { content: "\ea89"; }
|
|
195
|
+
.ez-icon-return:before { content: "\ea8a"; }
|
|
196
|
+
.ez-icon-sankhya-place:before { content: "\ea8b"; }
|
|
197
|
+
.ez-icon-save:before { content: "\ea8c"; }
|
|
198
|
+
.ez-icon-search:before { content: "\ea8d"; }
|
|
199
|
+
.ez-icon-settings-inverted:before { content: "\ea8e"; }
|
|
200
|
+
.ez-icon-settings:before { content: "\ea8f"; }
|
|
201
|
+
.ez-icon-share:before { content: "\ea90"; }
|
|
202
|
+
.ez-icon-shield:before { content: "\ea91"; }
|
|
203
|
+
.ez-icon-show-list:before { content: "\ea92"; }
|
|
204
|
+
.ez-icon-show_menu:before { content: "\ea93"; }
|
|
205
|
+
.ez-icon-south-east:before { content: "\ea94"; }
|
|
206
|
+
.ez-icon-sync:before { content: "\ea95"; }
|
|
207
|
+
.ez-icon-table:before { content: "\ea96"; }
|
|
208
|
+
.ez-icon-tag_code:before { content: "\ea97"; }
|
|
209
|
+
.ez-icon-text:before { content: "\ea98"; }
|
|
210
|
+
.ez-icon-timeline:before { content: "\ea99"; }
|
|
211
|
+
.ez-icon-timer-outline:before { content: "\ea9a"; }
|
|
212
|
+
.ez-icon-trending-up:before { content: "\ea9b"; }
|
|
213
|
+
.ez-icon-tune:before { content: "\ea9c"; }
|
|
214
|
+
.ez-icon-txt:before { content: "\ea9d"; }
|
|
215
|
+
.ez-icon-un-pin:before { content: "\ea9e"; }
|
|
216
|
+
.ez-icon-underline:before { content: "\ea9f"; }
|
|
217
|
+
.ez-icon-undo:before { content: "\eaa0"; }
|
|
218
|
+
.ez-icon-unfold_less:before { content: "\eaa1"; }
|
|
219
|
+
.ez-icon-unfold_more:before { content: "\eaa2"; }
|
|
220
|
+
.ez-icon-user-circle:before { content: "\eaa3"; }
|
|
221
|
+
.ez-icon-warning-outline:before { content: "\eaa4"; }
|
|
222
|
+
.ez-icon-warning_triangle:before { content: "\eaa5"; }
|
|
223
|
+
.ez-icon-whatshot:before { content: "\eaa6"; }
|
|
224
|
+
.ez-icon-xlsx:before { content: "\eaa7"; }
|
|
225
|
+
.ez-icon-zip:before { content: "\eaa8"; }
|
|
219
226
|
/*
|
|
220
227
|
END CSS GENERATED BY EZ-DESIGN ICONS
|
|
221
228
|
*/
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
flex-wrap: nowrap;
|
|
17
17
|
flex-direction: row;
|
|
18
18
|
justify-content: space-between;
|
|
19
|
+
align-items: start;
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
.ez-modal-container__content {
|
|
@@ -48,6 +49,7 @@
|
|
|
48
49
|
background-color: transparent;
|
|
49
50
|
border: none;
|
|
50
51
|
outline: none;
|
|
52
|
+
padding: var(--space--6, 6px) 0px;
|
|
51
53
|
}
|
|
52
54
|
|
|
53
55
|
.ez-modal-container__close-icon {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
.link-builder-container {
|
|
2
|
+
font-family: 'Roboto';
|
|
3
|
+
color: #2b3a54;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
gap: 10px;
|
|
7
|
+
justify-content: space-between;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.header {
|
|
11
|
+
display: flex;
|
|
12
|
+
font-weight: 500;
|
|
13
|
+
font-size: 16px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.actions {
|
|
17
|
+
display: flex;
|
|
18
|
+
justify-content: flex-end;
|
|
19
|
+
gap: 12px;
|
|
20
|
+
margin-top: 12px;
|
|
21
|
+
width: 100%;
|
|
22
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { h } from '@stencil/core';
|
|
2
|
+
import { RICH_TOOLBAR_COMMANDS } from '../ez-rich-toolbar/RichToolbarHelper';
|
|
3
|
+
export class EzLinkBuilder {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.textToShow = undefined;
|
|
6
|
+
this.link = undefined;
|
|
7
|
+
this.openInNewGuide = false;
|
|
8
|
+
}
|
|
9
|
+
async show(text) {
|
|
10
|
+
this._popupElement.opened = true;
|
|
11
|
+
if (text) {
|
|
12
|
+
this.textToShow = text;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
async hide() {
|
|
16
|
+
this._popupElement.opened = false;
|
|
17
|
+
}
|
|
18
|
+
async handleCancel() {
|
|
19
|
+
this.clearValues();
|
|
20
|
+
this.executeToolbarCommand.emit({ command: RICH_TOOLBAR_COMMANDS.FOCUS });
|
|
21
|
+
await this.hide();
|
|
22
|
+
}
|
|
23
|
+
clearValues() {
|
|
24
|
+
this.link = '';
|
|
25
|
+
this.textToShow = '';
|
|
26
|
+
this.openInNewGuide = false;
|
|
27
|
+
}
|
|
28
|
+
async handleCreateLink() {
|
|
29
|
+
const tag = `<a href="${this.link}" ${this.openInNewGuide ? 'target="_blank" rel="noopener noreferrer"' : ''}>${this.textToShow ? this.textToShow : this.link}</a>`;
|
|
30
|
+
this.executeToolbarCommand.emit({ command: RICH_TOOLBAR_COMMANDS.FORMAT, value: tag });
|
|
31
|
+
this.clearValues();
|
|
32
|
+
await this.hide();
|
|
33
|
+
}
|
|
34
|
+
async handleActionPopup(event) {
|
|
35
|
+
if (event.detail === 'OK') {
|
|
36
|
+
await this.handleCreateLink();
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
if (event.detail === 'CANCEL' || event.detail === 'CLOSE') {
|
|
40
|
+
await this.handleCancel();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
getOkButtonStatus() {
|
|
44
|
+
var _a;
|
|
45
|
+
return ((_a = this.link) === null || _a === void 0 ? void 0 : _a.trim()) ? 'ENABLED' : 'DISABLED';
|
|
46
|
+
}
|
|
47
|
+
render() {
|
|
48
|
+
return (h("ez-popup", { heightMode: 'auto', size: 'small', useHeader: false, ref: ref => this._popupElement = ref, onEzClosePopup: () => this.clearValues() }, h("div", null, 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() }, h("div", { class: 'link-builder-container' }, h("ez-text-input", { id: 'link_url_input', label: 'Insira a URL destino', value: this.link, onEzChange: (e) => this.link = e.detail }), h("ez-text-input", { id: 'link_text_input', label: 'Insira o texto a ser exibido', value: this.textToShow, onEzChange: (e) => this.textToShow = e.detail }), h("ez-check", { label: 'Abrir em uma nova página.', value: this.openInNewGuide, onEzChange: (e) => this.openInNewGuide = e.detail }))))));
|
|
49
|
+
}
|
|
50
|
+
static get is() { return "ez-link-builder"; }
|
|
51
|
+
static get encapsulation() { return "scoped"; }
|
|
52
|
+
static get originalStyleUrls() {
|
|
53
|
+
return {
|
|
54
|
+
"$": ["ez-link-builder.css"]
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
static get styleUrls() {
|
|
58
|
+
return {
|
|
59
|
+
"$": ["ez-link-builder.css"]
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
static get states() {
|
|
63
|
+
return {
|
|
64
|
+
"textToShow": {},
|
|
65
|
+
"link": {},
|
|
66
|
+
"openInNewGuide": {}
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
static get events() {
|
|
70
|
+
return [{
|
|
71
|
+
"method": "executeToolbarCommand",
|
|
72
|
+
"name": "executeToolbarCommand",
|
|
73
|
+
"bubbles": true,
|
|
74
|
+
"cancelable": true,
|
|
75
|
+
"composed": true,
|
|
76
|
+
"docs": {
|
|
77
|
+
"tags": [],
|
|
78
|
+
"text": ""
|
|
79
|
+
},
|
|
80
|
+
"complexType": {
|
|
81
|
+
"original": "RichToolbarCommand",
|
|
82
|
+
"resolved": "RichToolbarCommand",
|
|
83
|
+
"references": {
|
|
84
|
+
"RichToolbarCommand": {
|
|
85
|
+
"location": "import",
|
|
86
|
+
"path": "../ez-rich-toolbar/RichToolbarHelper"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}];
|
|
91
|
+
}
|
|
92
|
+
static get methods() {
|
|
93
|
+
return {
|
|
94
|
+
"show": {
|
|
95
|
+
"complexType": {
|
|
96
|
+
"signature": "(text?: string) => Promise<void>",
|
|
97
|
+
"parameters": [{
|
|
98
|
+
"tags": [],
|
|
99
|
+
"text": ""
|
|
100
|
+
}],
|
|
101
|
+
"references": {
|
|
102
|
+
"Promise": {
|
|
103
|
+
"location": "global"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"return": "Promise<void>"
|
|
107
|
+
},
|
|
108
|
+
"docs": {
|
|
109
|
+
"text": "",
|
|
110
|
+
"tags": []
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"hide": {
|
|
114
|
+
"complexType": {
|
|
115
|
+
"signature": "() => Promise<void>",
|
|
116
|
+
"parameters": [],
|
|
117
|
+
"references": {
|
|
118
|
+
"Promise": {
|
|
119
|
+
"location": "global"
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"return": "Promise<void>"
|
|
123
|
+
},
|
|
124
|
+
"docs": {
|
|
125
|
+
"text": "",
|
|
126
|
+
"tags": []
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
width: 100%;
|
|
4
|
+
font-family: Roboto;
|
|
5
|
+
|
|
6
|
+
/*@doc Define a sombra do header.*/
|
|
7
|
+
--ez-rich-text--box-shadow: 0 0 3px 0 #DCE0E8;
|
|
8
|
+
/*@doc Define o outline usado como borda do header.*/
|
|
9
|
+
--ez-rich-text--shadow--outline: var(--shadow--outline) var(--color--strokes);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.editor-container.bordered {
|
|
13
|
+
border-radius: 12px;
|
|
14
|
+
border: 1px solid #DCE0E8;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
.editor-container {
|
|
19
|
+
width: 100%;
|
|
20
|
+
border-radius: 12px;
|
|
21
|
+
overflow: hidden;
|
|
22
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
ez-text-area{
|
|
26
|
+
--text-area__input--border: 1px solid;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.preview{
|
|
30
|
+
min-height: 20px;
|
|
31
|
+
padding: 12px;
|
|
32
|
+
resize: both;
|
|
33
|
+
overflow: auto;
|
|
34
|
+
max-width: 100%;
|
|
35
|
+
}
|