@sankhyalabs/ezui 2.0.3 → 2.0.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.
Files changed (46) hide show
  1. package/dist/cjs/ez-combo-box.cjs.entry.js +4 -3
  2. package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
  3. package/dist/cjs/ez-form.cjs.entry.js +26 -17
  4. package/dist/cjs/ez-grid.cjs.entry.js +1 -11
  5. package/dist/cjs/ezui.cjs.js +1 -1
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/collection/collection-manifest.json +0 -2
  8. package/dist/collection/components/ez-combo-box/ez-combo-box.js +4 -3
  9. package/dist/collection/components/ez-dialog/ez-dialog.css +2 -2
  10. package/dist/collection/components/ez-form/ez-form.js +1 -1
  11. package/dist/collection/components/ez-form/structure/FormSheetMetadata.js +25 -16
  12. package/dist/collection/components/ez-grid/ez-grid.js +2 -47
  13. package/dist/custom-elements/index.d.ts +0 -12
  14. package/dist/custom-elements/index.js +34 -482
  15. package/dist/esm/ez-combo-box.entry.js +4 -3
  16. package/dist/esm/ez-dialog.entry.js +1 -1
  17. package/dist/esm/ez-form.entry.js +26 -17
  18. package/dist/esm/ez-grid.entry.js +1 -11
  19. package/dist/esm/ezui.js +1 -1
  20. package/dist/esm/loader.js +1 -1
  21. package/dist/ezui/ezui.esm.js +1 -1
  22. package/dist/ezui/p-45d8634a.entry.js +1 -0
  23. package/dist/ezui/{p-e120b25a.entry.js → p-a7733cb4.entry.js} +1 -1
  24. package/dist/ezui/p-e0aa9cb1.entry.js +1 -0
  25. package/dist/ezui/p-f6afdc4d.entry.js +1 -0
  26. package/dist/types/components/ez-grid/ez-grid.d.ts +0 -4
  27. package/dist/types/components.d.ts +0 -39
  28. package/package.json +1 -1
  29. package/react/components.d.ts +0 -2
  30. package/react/components.js +0 -2
  31. package/react/components.js.map +1 -1
  32. package/dist/cjs/ez-grid-config.cjs.entry.js +0 -436
  33. package/dist/cjs/ez-select-box.cjs.entry.js +0 -22
  34. package/dist/collection/components/ez-grid/subcomponents/ez-grid-config/ez-grid-config.css +0 -166
  35. package/dist/collection/components/ez-grid/subcomponents/ez-grid-config/ez-grid-config.js +0 -551
  36. package/dist/collection/components/ez-grid/subcomponents/ez-select-box/ez-select-box.css +0 -9
  37. package/dist/collection/components/ez-grid/subcomponents/ez-select-box/ez-select-box.js +0 -62
  38. package/dist/esm/ez-grid-config.entry.js +0 -432
  39. package/dist/esm/ez-select-box.entry.js +0 -18
  40. package/dist/ezui/p-2c6398b3.entry.js +0 -1
  41. package/dist/ezui/p-3987f8d8.entry.js +0 -1
  42. package/dist/ezui/p-6608b9a5.entry.js +0 -1
  43. package/dist/ezui/p-9b1700f7.entry.js +0 -1
  44. package/dist/ezui/p-9fc50d9a.entry.js +0 -1
  45. package/dist/types/components/ez-grid/subcomponents/ez-grid-config/ez-grid-config.d.ts +0 -38
  46. package/dist/types/components/ez-grid/subcomponents/ez-select-box/ez-select-box.d.ts +0 -7
@@ -1,551 +0,0 @@
1
- import { StringUtils } from '@sankhyalabs/core';
2
- import { Component, Event, h, Host, Prop } from '@stencil/core';
3
- import ApplicationUtils from '../../../../utils/ApplicationUtils';
4
- import { DialogType } from '../../../ez-dialog/DialogType';
5
- export class EzGridConfig {
6
- constructor() {
7
- this._orderListItems = [];
8
- this._orderPriorityList = [];
9
- this._columListItems = [];
10
- this._selectedIndex = -1;
11
- this._dataChanged = false;
12
- this._componenteInternalKey = Date.now();
13
- this.selectedTab = "Colunas";
14
- }
15
- /* Creation Methods */
16
- createOrderList() {
17
- let newList = [];
18
- this.columns.filter(col => { var _a; return StringUtils.getBooleanValue((_a = col === null || col === void 0 ? void 0 : col.props) === null || _a === void 0 ? void 0 : _a.get("sortable"), true); }).forEach(column => {
19
- var _a;
20
- let configItem = (_a = this.config) === null || _a === void 0 ? void 0 : _a.columns.find(item => item.name === column.name);
21
- let item = { name: column.name, label: column.label };
22
- if (configItem) {
23
- item['orderIndex'] = configItem.orderIndex;
24
- item['ascending'] = configItem.ascending;
25
- }
26
- if (!column.hidden) {
27
- newList.push(item);
28
- }
29
- });
30
- newList.sort((a, b) => {
31
- //OS dois tem order index 0 e pelo menos um deles tem orientação de ordenação.
32
- if (a.orderIndex == 0 && b.orderIndex == 0 && (a.ascending != undefined || b.ascending != undefined)) {
33
- if (a.ascending != undefined)
34
- return -1;
35
- if (b.ascending != undefined)
36
- return 1;
37
- return 0;
38
- //Pelo menos um deles tem order index diferente de 0 e os dois tem orientação de ordenação.
39
- }
40
- else if (a.ascending != undefined && b.ascending != undefined) {
41
- return (a.orderIndex - b.orderIndex);
42
- //Pelo menos um deles tem order index diferente de 0 e pelo menos um deles tem orientação de ordenação.
43
- }
44
- else if (a.ascending != undefined || b.ascending != undefined) {
45
- if (a.ascending != undefined)
46
- return -1;
47
- if (b.ascending != undefined)
48
- return 1;
49
- return 0;
50
- }
51
- return (a.orderIndex - b.orderIndex);
52
- });
53
- this._orderListItems = newList;
54
- }
55
- createColumnList() {
56
- let visibleGroup = {
57
- group: 'Visíveis',
58
- items: [],
59
- };
60
- let hiddenGroup = {
61
- group: 'Ocultas',
62
- items: [],
63
- sort: 'ASC'
64
- };
65
- this.columns.forEach(column => {
66
- let item = { label: column.label };
67
- if (column.hidden) {
68
- hiddenGroup.items.push(item);
69
- }
70
- else {
71
- visibleGroup.items.push(item);
72
- }
73
- });
74
- this._columListItems = [visibleGroup, hiddenGroup];
75
- }
76
- buildColumnListSlot(item, group) {
77
- return (h("div", null,
78
- h("ez-check", { mode: 'switch', id: 'switch' + ((item === null || item === void 0 ? void 0 : item.label) || '') + ((group === null || group === void 0 ? void 0 : group.group) || ''), value: group.group === "Visíveis", onEzChange: (ev) => { this.switchColumnGroup(ev, item); } })));
79
- }
80
- buildOrderListSlot(item) {
81
- let selectedOption = "na";
82
- if ((item === null || item === void 0 ? void 0 : item.ascending) != undefined) {
83
- selectedOption = item.ascending == true ? 'asc' : 'desc';
84
- }
85
- return (h("div", null,
86
- h("ez-select-box", { selectedOption: selectedOption, key: 'ez-select-box-' + this._componenteInternalKey + '-' + item, onEzChange: (ev) => { ev.stopPropagation(); this.updateOrder(ev.detail, item.label); } })));
87
- }
88
- updateOrder(sortOrder, updatedItemLabel) {
89
- var _a;
90
- this._dataChanged = true;
91
- let newList = [...this.columns];
92
- let newItem = newList.find(item => item.label === updatedItemLabel);
93
- if (newItem) {
94
- newItem.sort = sortOrder.value === "na" ? undefined : sortOrder.value;
95
- }
96
- let orderArray;
97
- if (((_a = this._orderPriorityList) === null || _a === void 0 ? void 0 : _a.length) > 0) {
98
- this._orderPriorityList.find(item => item.label === newItem.label).sort = sortOrder;
99
- this._orderPriorityList.filter(item => item.sort).map((item, index) => {
100
- if (item.label === newItem.label) {
101
- newItem.sortIndex = index;
102
- }
103
- });
104
- }
105
- else {
106
- orderArray = newList.filter(item => item.sort && item.hidden !== true).map((item, index) => {
107
- return { label: item.label, orderIndex: index };
108
- });
109
- orderArray.forEach(element => {
110
- newList.find(item => item.label === element.label).sortIndex = element.orderIndex;
111
- });
112
- }
113
- this.columns = newList;
114
- }
115
- /* Actions Methods */
116
- switchColumnGroup(ev, switchedItem) {
117
- ev.stopPropagation();
118
- let newList = [...this._columListItems];
119
- this._dataChanged = true;
120
- if (ev.detail === true) {
121
- let hiddenGroup = newList.find(group => group.group === "Ocultas");
122
- let index = hiddenGroup.items.findIndex(item => item.label === switchedItem.label);
123
- if (index >= 0) {
124
- hiddenGroup.items.splice(index, 1);
125
- }
126
- let visibleGroup = newList.find(group => group.group === "Visíveis");
127
- visibleGroup.items.push(switchedItem);
128
- this._columListItems = newList;
129
- this.createOrderList();
130
- }
131
- else if (ev.detail === false) {
132
- let visibleGroup = newList.find(group => group.group === "Visíveis");
133
- let index = visibleGroup.items.findIndex(item => item.label === switchedItem.label);
134
- if (index >= 0) {
135
- visibleGroup.items.splice(index, 1);
136
- }
137
- let hiddenGroup = newList.find(group => group.group === "Ocultas");
138
- hiddenGroup.items.push(switchedItem);
139
- this._columListItems = newList;
140
- this.createOrderList();
141
- }
142
- }
143
- finish() {
144
- let newColumnList = [];
145
- this._columListItems.forEach(group => {
146
- group.items.forEach(item => {
147
- const baseColumn = this.columns.find(column => column.label === item.label);
148
- let newColumnItem = Object.assign({}, baseColumn);
149
- if (group.group === "Ocultas") {
150
- newColumnItem.hidden = true;
151
- }
152
- else {
153
- newColumnItem.hidden = false;
154
- }
155
- newColumnList.push(newColumnItem);
156
- });
157
- });
158
- this.columns = newColumnList;
159
- this._dataChanged = false;
160
- this.closeConfig();
161
- this.save();
162
- }
163
- save() {
164
- var _a;
165
- let _newConfig;
166
- if (this.config) {
167
- _newConfig = this.config;
168
- }
169
- else {
170
- _newConfig = this.createConfigFromState(this.columns);
171
- }
172
- let _newColumnConfigList = [];
173
- let orderArray;
174
- if (((_a = this._orderPriorityList) === null || _a === void 0 ? void 0 : _a.length) > 0) {
175
- orderArray = this.columns.filter(item => item.sort && item.hidden !== true).map((item) => {
176
- return { label: item.label, orderIndex: 0 };
177
- });
178
- let indexCount = 0;
179
- let newOrderArray = [];
180
- this._orderPriorityList.forEach((orderPriorityItem) => {
181
- let item = orderArray.find(column => column.label === orderPriorityItem.label);
182
- if (item) {
183
- item.orderIndex = indexCount;
184
- newOrderArray.push(item);
185
- indexCount++;
186
- }
187
- });
188
- if (newOrderArray.length > 0) {
189
- orderArray = newOrderArray;
190
- }
191
- }
192
- for (let i = 0; i < this.columns.length; i++) {
193
- const column = this.columns[i];
194
- let _newColumnConfig = _newConfig.columns.find(_newColumnConfig => column.name === _newColumnConfig.name);
195
- if (column.hidden === true && _newColumnConfig) {
196
- continue;
197
- }
198
- if (_newColumnConfig) {
199
- _newColumnConfig.width = column.width;
200
- }
201
- else if (column.hidden === false) {
202
- _newColumnConfig = { name: column.name, width: column.width, orderIndex: 0 };
203
- }
204
- if (_newColumnConfig) {
205
- if (column.sort) {
206
- _newColumnConfig.ascending = column.sort.toUpperCase() === "ASC" ? true : false;
207
- if (orderArray) {
208
- adjustPriorityOrder(column, _newColumnConfig);
209
- }
210
- else {
211
- _newColumnConfig.orderIndex = column.sortIndex;
212
- }
213
- }
214
- else {
215
- delete _newColumnConfig.ascending;
216
- _newColumnConfig.orderIndex = 0;
217
- }
218
- _newColumnConfigList.push(_newColumnConfig);
219
- }
220
- }
221
- _newConfig.columns = _newColumnConfigList;
222
- this.configFinish.emit(_newConfig);
223
- this._orderList.clearHistory();
224
- function adjustPriorityOrder(column, _newColumnConfig) {
225
- if (orderArray) {
226
- let orderItem = orderArray.find(item => item.label === column.label);
227
- if (orderItem) {
228
- _newColumnConfig.orderIndex = orderItem.orderIndex;
229
- }
230
- }
231
- }
232
- }
233
- createConfigFromState(state) {
234
- let newConfig = { columns: [] };
235
- state.forEach(columnState => {
236
- if (!columnState.hidden) {
237
- let newConfigColumn = { name: columnState.name };
238
- if (columnState.width) {
239
- newConfigColumn['width'] = columnState.width;
240
- }
241
- if (columnState.sort) {
242
- newConfigColumn['ascending'] = (columnState.sort.toUpperCase() === 'ASC');
243
- newConfigColumn['orderIndex'] = columnState.sortIndex;
244
- }
245
- else {
246
- newConfigColumn['orderIndex'] = 0;
247
- }
248
- if (newConfigColumn) {
249
- newConfig.columns.push(newConfigColumn);
250
- }
251
- }
252
- });
253
- return newConfig;
254
- }
255
- async locateColumn(evt, searchingText) {
256
- var _a;
257
- const hitEnter = evt.key === "Enter";
258
- if (!searchingText) {
259
- searchingText = (_a = evt.currentTarget) === null || _a === void 0 ? void 0 : _a.value;
260
- }
261
- let newSelected = -1;
262
- if (this.selectedTab === "Ordenação das linhas") {
263
- if (searchingText) {
264
- const matchedIndexes = [];
265
- let orderListDatasource;
266
- await this._orderList.getList().then(listGroup => {
267
- orderListDatasource = listGroup;
268
- orderListDatasource.forEach((column, index) => {
269
- if (this.compareWords(column, searchingText)) {
270
- matchedIndexes.push(index);
271
- }
272
- });
273
- });
274
- if (matchedIndexes.length > 0) {
275
- if (hitEnter) {
276
- for (let j = 0; j < matchedIndexes.length; j++) {
277
- if (matchedIndexes[j] > this._selectedIndex) {
278
- newSelected = matchedIndexes[j];
279
- break;
280
- }
281
- }
282
- }
283
- if (newSelected === -1) {
284
- newSelected = matchedIndexes[0];
285
- }
286
- }
287
- this._selectedIndex = newSelected;
288
- let selectedColumn;
289
- selectedColumn = orderListDatasource[newSelected];
290
- if (selectedColumn) {
291
- this._orderList.setSelection({ label: selectedColumn.label }, true);
292
- }
293
- else {
294
- this._orderList.setSelection(undefined);
295
- }
296
- }
297
- else {
298
- this._orderList.setSelection(undefined);
299
- }
300
- }
301
- else {
302
- if (searchingText) {
303
- const matchedIndexes = [];
304
- this.columns.forEach((column, index) => {
305
- if (this.compareWords(column, searchingText)) {
306
- matchedIndexes.push(index);
307
- }
308
- });
309
- if (matchedIndexes.length > 0) {
310
- if (hitEnter) {
311
- for (let j = 0; j < matchedIndexes.length; j++) {
312
- if (matchedIndexes[j] > this._selectedIndex) {
313
- newSelected = matchedIndexes[j];
314
- break;
315
- }
316
- }
317
- }
318
- if (newSelected === -1) {
319
- newSelected = matchedIndexes[0];
320
- }
321
- }
322
- this._selectedIndex = newSelected;
323
- let selectedColumn = this.columns[newSelected];
324
- if (selectedColumn) {
325
- this._columnList.setSelection({ label: selectedColumn.label }, true);
326
- }
327
- else {
328
- this._columnList.setSelection(undefined);
329
- }
330
- }
331
- else {
332
- this._columnList.setSelection(undefined);
333
- }
334
- }
335
- }
336
- compareWords(column, searchingText) {
337
- if (StringUtils.replaceAccentuatedChars(column.label).indexOf(StringUtils.replaceAccentuatedChars(searchingText)) > -1) {
338
- return true;
339
- }
340
- return false;
341
- }
342
- closeConfig() {
343
- this._orderList.scrollToTop();
344
- this._columnList.scrollToTop();
345
- this._searchElement.value = "";
346
- if (this._dataChanged) {
347
- let options = {
348
- canClose: false,
349
- labelCancel: "Descartar",
350
- labelConfirm: "Salvar",
351
- btnConfirmDanger: false
352
- };
353
- ApplicationUtils.confirm("Aviso", "As alterações realizadas serão descartadas. Gostaria de salvar antes de sair?", null, DialogType.WARN, options)
354
- .then(response => {
355
- if (!response) {
356
- this._dataChanged = false;
357
- this.configCancel.emit();
358
- this._orderList.clearHistory();
359
- this._componenteInternalKey = Date.now();
360
- }
361
- else {
362
- this.finish();
363
- }
364
- });
365
- }
366
- else {
367
- this.configCancel.emit();
368
- this._orderList.clearHistory();
369
- }
370
- }
371
- /* Handlers */
372
- handleTabChange(ev) {
373
- var _a;
374
- if ((_a = ev === null || ev === void 0 ? void 0 : ev.target) === null || _a === void 0 ? void 0 : _a.selectedTab) {
375
- if (this.selectedTab !== ev.target.selectedTab) {
376
- if (ev.target.selectedTab === "Colunas") {
377
- this._orderList.scrollToTop();
378
- }
379
- else if (ev.target.selectedTab === "Ordenação das linhas") {
380
- this._columnList.scrollToTop();
381
- }
382
- this._searchElement.value = "";
383
- }
384
- if (ev.target.selectedTab === "Ordenação das linhas") {
385
- this.createOrderList();
386
- }
387
- this.selectedTab = ev.target.selectedTab;
388
- }
389
- }
390
- handleColumnListChange(ev) {
391
- var _a;
392
- if (ev.detail) {
393
- let visibleItems = (_a = ev.detail.find(group => group.group === "Visíveis")) === null || _a === void 0 ? void 0 : _a.items;
394
- if (visibleItems) {
395
- this._dataChanged = true;
396
- this._orderListItems = visibleItems;
397
- }
398
- }
399
- }
400
- handleOrderListChange(ev) {
401
- if (ev.detail) {
402
- let orderPriorityList = ev.detail;
403
- if (orderPriorityList) {
404
- this._dataChanged = true;
405
- this._orderPriorityList = orderPriorityList;
406
- }
407
- }
408
- }
409
- componentWillRender() {
410
- var _a;
411
- if (((_a = this.columns) === null || _a === void 0 ? void 0 : _a.length) > 0) {
412
- this.createColumnList();
413
- }
414
- }
415
- componentDidRender() {
416
- var _a;
417
- if (((_a = this.columns) === null || _a === void 0 ? void 0 : _a.length) > 0) {
418
- this.locateColumn(new KeyboardEvent("arrow-right", { key: "ArrowRight" }), this._searchElement.value);
419
- }
420
- }
421
- render() {
422
- return (h(Host, null,
423
- h("div", { class: "grid-config__header" },
424
- h("div", { class: "title-container" },
425
- h("div", { class: "" },
426
- h("label", { class: "title" }, "Configura\u00E7\u00E3o da Grade"),
427
- h("label", { class: "subtitle" }, "Defina visibilidade e ordem das colunas.")),
428
- h("div", { class: "button-close" },
429
- h("ez-button", { mode: 'icon', iconName: "close", size: 'medium', onClick: () => this.closeConfig() }))),
430
- h("div", { class: "tabselector-container" },
431
- h("ez-tabselector", { selectedTab: this.selectedTab, selectedIndex: 0, onEzChange: (ev) => { this.handleTabChange(ev); }, tabs: 'Colunas, Ordena\u00E7\u00E3o das linhas' })),
432
- h("div", null,
433
- h("ez-text-input", { ref: (el) => this._searchElement = el, label: "Localizar coluna", onKeyUp: evt => this.locateColumn(evt) },
434
- h("ez-icon", { slot: "leftIcon", size: "medium", iconName: "search" })))),
435
- h("div", { class: "grid-config__main" },
436
- h("ez-list", { ref: (el) => this._columnList = el, class: this.selectedTab === "Colunas" ? "" : "hidden", dataSource: this._columListItems, onEzChange: ev => this.handleColumnListChange(ev), ezDraggable: true, ezSelectable: true, itemSlotBuilder: (item, group) => this.buildColumnListSlot(item, group), useGroups: true }),
437
- h("div", { class: this.selectedTab === "Ordenação das linhas" ? "group-name" : "hidden" }, "Sequ\u00EAncia da ordena\u00E7\u00E3o"),
438
- h("ez-list", { ref: (el) => this._orderList = el, class: this.selectedTab === "Ordenação das linhas" ? "height-calc" : "hidden", dataSource: this._orderListItems, ezSelectable: true, onEzChange: ev => this.handleOrderListChange(ev), ezDraggable: true, itemSlotBuilder: (item) => this.buildOrderListSlot(item) })),
439
- h("div", { class: "grid-config__footer" },
440
- h("ez-button", { class: "padding-right--medium", label: "Cancelar", onClick: () => this.closeConfig() }),
441
- h("ez-button", { label: "Concluir", class: "ez-button--primary", onClick: () => this.finish() }))));
442
- }
443
- static get is() { return "ez-grid-config"; }
444
- static get encapsulation() { return "scoped"; }
445
- static get originalStyleUrls() { return {
446
- "$": ["ez-grid-config.css"]
447
- }; }
448
- static get styleUrls() { return {
449
- "$": ["ez-grid-config.css"]
450
- }; }
451
- static get assetsDirs() { return ["../assets"]; }
452
- static get properties() { return {
453
- "selectedTab": {
454
- "type": "string",
455
- "mutable": true,
456
- "complexType": {
457
- "original": "string",
458
- "resolved": "string",
459
- "references": {}
460
- },
461
- "required": false,
462
- "optional": false,
463
- "docs": {
464
- "tags": [],
465
- "text": ""
466
- },
467
- "attribute": "selected-tab",
468
- "reflect": false,
469
- "defaultValue": "\"Colunas\""
470
- },
471
- "columns": {
472
- "type": "unknown",
473
- "mutable": true,
474
- "complexType": {
475
- "original": "Array<EzGridColumn>",
476
- "resolved": "EzGridColumn[]",
477
- "references": {
478
- "Array": {
479
- "location": "global"
480
- },
481
- "EzGridColumn": {
482
- "location": "import",
483
- "path": "../../controller/EzGridController"
484
- }
485
- }
486
- },
487
- "required": false,
488
- "optional": false,
489
- "docs": {
490
- "tags": [],
491
- "text": ""
492
- }
493
- },
494
- "config": {
495
- "type": "unknown",
496
- "mutable": true,
497
- "complexType": {
498
- "original": "IGridConfig",
499
- "resolved": "IGridConfig",
500
- "references": {
501
- "IGridConfig": {
502
- "location": "import",
503
- "path": "../../controller/EzGridController"
504
- }
505
- }
506
- },
507
- "required": false,
508
- "optional": false,
509
- "docs": {
510
- "tags": [],
511
- "text": ""
512
- }
513
- }
514
- }; }
515
- static get events() { return [{
516
- "method": "configFinish",
517
- "name": "configFinish",
518
- "bubbles": true,
519
- "cancelable": true,
520
- "composed": true,
521
- "docs": {
522
- "tags": [],
523
- "text": ""
524
- },
525
- "complexType": {
526
- "original": "IGridConfig",
527
- "resolved": "IGridConfig",
528
- "references": {
529
- "IGridConfig": {
530
- "location": "import",
531
- "path": "../../controller/EzGridController"
532
- }
533
- }
534
- }
535
- }, {
536
- "method": "configCancel",
537
- "name": "configCancel",
538
- "bubbles": true,
539
- "cancelable": true,
540
- "composed": true,
541
- "docs": {
542
- "tags": [],
543
- "text": ""
544
- },
545
- "complexType": {
546
- "original": "void",
547
- "resolved": "void",
548
- "references": {}
549
- }
550
- }]; }
551
- }
@@ -1,9 +0,0 @@
1
- ez-combo-box {
2
- width: 100px;
3
- }
4
-
5
- .grid-config-combo {
6
- --ez-text-input--height: 28px;
7
- --ez-text-input__input--background-color: #fff;
8
- --ez-text-input__input--border-color: #dce0e8;
9
- }
@@ -1,62 +0,0 @@
1
- import { Component, Event, h, Prop } from '@stencil/core';
2
- export class SelectBox {
3
- constructor() {
4
- this.selectedOption = { value: "na", label: "N/A" };
5
- }
6
- render() {
7
- return (h("ez-combo-box", { class: "grid-config-combo ez-input--inverted", label: "", suppressSearch: true, value: this.selectedOption, enabled: true, canShowError: false, suppressEmptyOption: true },
8
- h("option", { value: "na" }, "N/A"),
9
- h("option", { value: "asc" }, "A-Z"),
10
- h("option", { value: "desc" }, "Z-A")));
11
- }
12
- static get is() { return "ez-select-box"; }
13
- static get encapsulation() { return "shadow"; }
14
- static get originalStyleUrls() { return {
15
- "$": ["ez-select-box.css"]
16
- }; }
17
- static get styleUrls() { return {
18
- "$": ["ez-select-box.css"]
19
- }; }
20
- static get assetsDirs() { return ["../assets"]; }
21
- static get properties() { return {
22
- "selectedOption": {
23
- "type": "string",
24
- "mutable": false,
25
- "complexType": {
26
- "original": "IOption | string",
27
- "resolved": "IOption | string",
28
- "references": {
29
- "IOption": {
30
- "location": "import",
31
- "path": "../../../ez-combo-box/ez-combo-box"
32
- }
33
- }
34
- },
35
- "required": false,
36
- "optional": false,
37
- "docs": {
38
- "tags": [],
39
- "text": ""
40
- },
41
- "attribute": "selected-option",
42
- "reflect": false,
43
- "defaultValue": "{ value: \"na\", label: \"N/A\" }"
44
- }
45
- }; }
46
- static get events() { return [{
47
- "method": "ezChange",
48
- "name": "ezChange",
49
- "bubbles": true,
50
- "cancelable": true,
51
- "composed": true,
52
- "docs": {
53
- "tags": [],
54
- "text": ""
55
- },
56
- "complexType": {
57
- "original": "string",
58
- "resolved": "string",
59
- "references": {}
60
- }
61
- }]; }
62
- }