@sankhyalabs/ezui 0.0.0-bugfix-dev-KB-6165.0 → 0.0.0-bugfix-dev-KB-17130.0
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/README.md +8 -10
- package/dist/cjs/{ApplicationUtils-2e444734.js → ApplicationUtils-c9d1205c.js} +56 -6
- package/dist/cjs/{RecordValidationProcessor-edd23705.js → RecordValidationProcessor-4c893e04.js} +1 -1
- package/dist/cjs/{constants-3a1d64fb.js → constants-2714478b.js} +2 -0
- package/dist/cjs/ez-actions-button.cjs.entry.js +56 -28
- package/dist/cjs/ez-alert-list.cjs.entry.js +148 -0
- package/dist/cjs/ez-alert.cjs.entry.js +1 -1
- package/dist/cjs/ez-application.cjs.entry.js +1 -1
- package/dist/cjs/ez-badge.cjs.entry.js +1 -1
- package/dist/cjs/ez-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/ez-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-calendar.cjs.entry.js +1 -1
- package/dist/cjs/ez-card-item_3.cjs.entry.js +182 -0
- package/dist/cjs/ez-check.cjs.entry.js +1 -1
- package/dist/cjs/ez-chip.cjs.entry.js +1 -1
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +3 -4
- package/dist/cjs/ez-combo-box.cjs.entry.js +17 -152
- package/dist/cjs/ez-date-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-date-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-dialog.cjs.entry.js +31 -5
- package/dist/cjs/ez-dropdown.cjs.entry.js +12 -6
- package/dist/cjs/ez-file-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-form-view.cjs.entry.js +44 -3
- package/dist/cjs/ez-form.cjs.entry.js +36 -4
- package/dist/cjs/ez-grid.cjs.entry.js +246 -64
- package/dist/cjs/ez-guide-navigator.cjs.entry.js +7 -1
- package/dist/cjs/ez-icon.cjs.entry.js +2 -2
- package/dist/cjs/ez-list.cjs.entry.js +5 -3
- package/dist/cjs/ez-loading-bar.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal-container.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal.cjs.entry.js +2 -2
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js +23 -10
- package/dist/cjs/ez-number-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-popover.cjs.entry.js +1 -1
- package/dist/cjs/ez-popup.cjs.entry.js +2 -2
- package/dist/cjs/ez-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-scroller_3.cjs.entry.js +8 -6
- package/dist/cjs/ez-search.cjs.entry.js +615 -32
- package/dist/cjs/ez-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/ez-split-item.cjs.entry.js +19 -0
- package/dist/cjs/ez-split-panel.cjs.entry.js +776 -0
- package/dist/cjs/ez-tabselector.cjs.entry.js +1 -1
- package/dist/cjs/ez-text-area.cjs.entry.js +1 -1
- package/dist/cjs/ez-text-edit.cjs.entry.js +2 -2
- package/dist/cjs/ez-text-input.cjs.entry.js +3 -2
- package/dist/cjs/ez-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-toast.cjs.entry.js +1 -1
- package/dist/cjs/ez-upload.cjs.entry.js +2 -2
- package/dist/cjs/ez-view-stack.cjs.entry.js +1 -1
- package/dist/cjs/ezui.cjs.js +2 -2
- package/dist/cjs/filter-column.cjs.entry.js +47 -12
- package/dist/cjs/{index-1064511f.js → index-a7b0c73d.js} +16 -6
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +6 -3
- package/dist/collection/components/ez-actions-button/ez-actions-button.css +17 -3
- package/dist/collection/components/ez-actions-button/ez-actions-button.js +105 -27
- package/dist/collection/components/ez-alert-list/ez-alert-list.css +87 -0
- package/dist/collection/components/ez-alert-list/ez-alert-list.js +268 -0
- package/dist/collection/components/ez-card-item/ez-card-item.css +17 -0
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +1 -1
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.js +0 -1
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +71 -169
- package/dist/collection/components/ez-dialog/ez-dialog.css +1 -1
- package/dist/collection/components/ez-dialog/ez-dialog.js +39 -4
- package/dist/collection/components/ez-dropdown/ez-dropdown.css +4 -3
- package/dist/collection/components/ez-dropdown/ez-dropdown.js +33 -4
- package/dist/collection/components/ez-form/ez-form.js +93 -0
- package/dist/collection/components/ez-form-view/ez-form-view.js +23 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js +4 -1
- package/dist/collection/components/ez-form-view/structure/index.js +34 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +21 -9
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +23 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.js +1 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/components/cellRendererStatus.js +1 -1
- package/dist/collection/components/ez-grid/ez-grid.css +1 -4
- package/dist/collection/components/ez-grid/ez-grid.js +91 -51
- package/dist/collection/components/ez-grid/interfaces/IColumnFilter.js +1 -0
- package/dist/collection/components/ez-grid/interfaces/index.js +1 -0
- package/dist/collection/components/ez-grid/subcomponents/filter-column.js +66 -12
- package/dist/collection/components/ez-grid/utils/ColumnFilterManager.js +62 -0
- package/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource.js +94 -0
- package/dist/collection/components/ez-grid/utils/index.js +1 -0
- package/dist/collection/components/ez-guide-navigator/ez-guide-navigator.js +22 -0
- package/dist/collection/components/ez-icon/ez-icon.css +148 -139
- package/dist/collection/components/ez-list/ez-list.css +12 -7
- package/dist/collection/components/ez-list/ez-list.js +3 -1
- package/dist/collection/components/ez-modal/ez-modal.css +1 -1
- package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.js +41 -10
- package/dist/collection/components/ez-popup/ez-popup.css +2 -2
- package/dist/collection/components/ez-search/ez-search.css +330 -0
- package/dist/collection/components/ez-search/ez-search.js +746 -55
- package/dist/collection/components/ez-split-panel/ez-split-panel.css +8 -0
- package/dist/collection/components/ez-split-panel/ez-split-panel.js +122 -0
- package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.css +12 -0
- package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.js +17 -0
- package/dist/collection/components/ez-text-input/ez-text-input.js +20 -1
- package/dist/collection/components/ez-tree/ez-tree.css +33 -0
- package/dist/collection/components/ez-tree/subcomponents/TreeItem.js +3 -3
- package/dist/collection/utils/ApplicationUtils.js +56 -6
- package/dist/collection/utils/constants.js +1 -0
- package/dist/collection/utils/form/DataBinder.js +12 -1
- package/dist/collection/utils/interfaces/IAction.js +1 -0
- package/dist/custom-elements/index.d.ts +18 -0
- package/dist/custom-elements/index.js +2138 -339
- package/dist/esm/{ApplicationUtils-d9a34a16.js → ApplicationUtils-eaf91331.js} +56 -6
- package/dist/esm/{RecordValidationProcessor-abc814af.js → RecordValidationProcessor-b00b8b77.js} +1 -1
- package/dist/esm/constants-4e0d35b7.js +5 -0
- package/dist/esm/ez-actions-button.entry.js +56 -28
- package/dist/esm/ez-alert-list.entry.js +144 -0
- package/dist/esm/ez-alert.entry.js +1 -1
- package/dist/esm/ez-application.entry.js +1 -1
- package/dist/esm/ez-badge.entry.js +1 -1
- package/dist/esm/ez-breadcrumb.entry.js +1 -1
- package/dist/esm/ez-button.entry.js +1 -1
- package/dist/esm/ez-calendar.entry.js +1 -1
- package/dist/esm/ez-card-item_3.entry.js +176 -0
- package/dist/esm/ez-check.entry.js +1 -1
- package/dist/esm/ez-chip.entry.js +1 -1
- package/dist/esm/ez-collapsible-box.entry.js +3 -4
- package/dist/esm/ez-combo-box.entry.js +18 -153
- package/dist/esm/ez-date-input.entry.js +1 -1
- package/dist/esm/ez-date-time-input.entry.js +1 -1
- package/dist/esm/ez-dialog.entry.js +31 -5
- package/dist/esm/ez-dropdown.entry.js +12 -6
- package/dist/esm/ez-file-item.entry.js +1 -1
- package/dist/esm/ez-form-view.entry.js +44 -3
- package/dist/esm/ez-form.entry.js +36 -4
- package/dist/esm/ez-grid.entry.js +247 -65
- package/dist/esm/ez-guide-navigator.entry.js +7 -1
- package/dist/esm/ez-icon.entry.js +2 -2
- package/dist/esm/ez-list.entry.js +5 -3
- package/dist/esm/ez-loading-bar.entry.js +1 -1
- package/dist/esm/ez-modal-container.entry.js +1 -1
- package/dist/esm/ez-modal.entry.js +2 -2
- package/dist/esm/ez-multi-selection-list.entry.js +23 -10
- package/dist/esm/ez-number-input.entry.js +1 -1
- package/dist/esm/ez-popover.entry.js +1 -1
- package/dist/esm/ez-popup.entry.js +2 -2
- package/dist/esm/ez-radio-button.entry.js +1 -1
- package/dist/esm/ez-scroller_3.entry.js +8 -6
- package/dist/esm/ez-search.entry.js +616 -33
- package/dist/esm/ez-skeleton.entry.js +1 -1
- package/dist/esm/ez-split-item.entry.js +15 -0
- package/dist/esm/ez-split-panel.entry.js +772 -0
- package/dist/esm/ez-tabselector.entry.js +1 -1
- package/dist/esm/ez-text-area.entry.js +1 -1
- package/dist/esm/ez-text-edit.entry.js +2 -2
- package/dist/esm/ez-text-input.entry.js +3 -2
- package/dist/esm/ez-time-input.entry.js +1 -1
- package/dist/esm/ez-toast.entry.js +1 -1
- package/dist/esm/ez-upload.entry.js +2 -2
- package/dist/esm/ez-view-stack.entry.js +1 -1
- package/dist/esm/ezui.js +3 -3
- package/dist/esm/filter-column.entry.js +47 -12
- package/dist/esm/{index-296b8458.js → index-baa5e267.js} +16 -6
- package/dist/esm/loader.js +3 -3
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/{p-5cef0264.entry.js → p-0306dff7.entry.js} +1 -1
- package/dist/ezui/p-0447d17c.entry.js +1 -0
- package/dist/ezui/{p-86a2036d.js → p-04f24913.js} +1 -1
- package/dist/ezui/p-05e1f4e7.js +1 -0
- package/dist/ezui/p-072e6347.entry.js +1 -0
- package/dist/ezui/p-133fae4a.entry.js +1 -0
- package/dist/ezui/{p-f4208819.entry.js → p-17be134a.entry.js} +1 -1
- package/dist/ezui/{p-cd19a6f8.entry.js → p-1e7a8633.entry.js} +1 -1
- package/dist/ezui/{p-60ba28ea.entry.js → p-1f50fa05.entry.js} +1 -1
- package/dist/ezui/{p-a5e09759.entry.js → p-20ec22c0.entry.js} +1 -1
- package/dist/ezui/p-2187f86c.js +1 -0
- package/dist/ezui/{p-e318d280.js → p-23a36bb6.js} +1 -1
- package/dist/ezui/{p-ce035beb.entry.js → p-24d3fede.entry.js} +1 -1
- package/dist/ezui/p-2a1a0e04.entry.js +1 -0
- package/dist/ezui/p-40f72de4.entry.js +1 -0
- package/dist/ezui/p-43b03119.entry.js +1 -0
- package/dist/ezui/{p-9b347f04.entry.js → p-44caad9a.entry.js} +1 -1
- package/dist/ezui/p-49456b34.entry.js +1 -0
- package/dist/ezui/p-4a7f113d.entry.js +1 -0
- package/dist/ezui/p-51c5e071.entry.js +1 -0
- package/dist/ezui/{p-ccb4ccd9.entry.js → p-555c9018.entry.js} +1 -1
- package/dist/ezui/{p-d43b22f3.entry.js → p-596634e9.entry.js} +1 -1
- package/dist/ezui/p-5bd5e68f.entry.js +1 -0
- package/dist/ezui/{p-a01068e1.entry.js → p-5d692ed1.entry.js} +1 -1
- package/dist/ezui/{p-95426f93.entry.js → p-5d86cca9.entry.js} +1 -1
- package/dist/ezui/p-5e1d036e.entry.js +1 -0
- package/dist/ezui/{p-7525e604.entry.js → p-5ed81457.entry.js} +1 -1
- package/dist/ezui/{p-c49dbf23.entry.js → p-650e4b6d.entry.js} +1 -1
- package/dist/ezui/{p-fd54b5b4.entry.js → p-6e2f8e6b.entry.js} +2 -2
- package/dist/ezui/p-6e429cff.entry.js +1 -0
- package/dist/ezui/p-76ba9d67.entry.js +1 -0
- package/dist/ezui/{p-37673563.entry.js → p-77a4bd35.entry.js} +1 -1
- package/dist/ezui/p-796c1a88.entry.js +1 -0
- package/dist/ezui/{p-5d6f2550.entry.js → p-85c8baae.entry.js} +1 -1
- package/dist/ezui/{p-fa571a4e.entry.js → p-8becebf8.entry.js} +1 -1
- package/dist/ezui/p-8defa6d3.entry.js +1 -0
- package/dist/ezui/{p-391de0e4.entry.js → p-9050d2cd.entry.js} +1 -1
- package/dist/ezui/{p-028f264f.entry.js → p-9cad9b6e.entry.js} +1 -1
- package/dist/ezui/{p-b11f035c.entry.js → p-9f5fa3f9.entry.js} +1 -1
- package/dist/ezui/p-a08b309b.entry.js +1 -0
- package/dist/ezui/{p-2da09f70.entry.js → p-a80b1287.entry.js} +1 -1
- package/dist/ezui/p-af15c277.entry.js +1 -0
- package/dist/ezui/{p-32b4163f.entry.js → p-b041333c.entry.js} +1 -1
- package/dist/ezui/p-ba875f37.entry.js +1 -0
- package/dist/ezui/p-bc2f844e.entry.js +1 -0
- package/dist/ezui/{p-e2dfd935.entry.js → p-c0f1715f.entry.js} +1 -1
- package/dist/ezui/{p-83885b21.entry.js → p-cc2dc4f4.entry.js} +1 -1
- package/dist/ezui/p-d6ffe679.entry.js +1 -0
- package/dist/ezui/p-eb36f072.entry.js +1 -0
- package/dist/ezui/p-f56dd1da.entry.js +1 -0
- package/dist/types/components/ez-actions-button/ez-actions-button.d.ts +15 -7
- package/dist/types/components/ez-alert-list/ez-alert-list.d.ts +76 -0
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +12 -15
- package/dist/types/components/ez-dialog/ez-dialog.d.ts +8 -2
- package/dist/types/components/ez-dropdown/ez-dropdown.d.ts +5 -0
- package/dist/types/components/ez-form/ez-form.d.ts +19 -1
- package/dist/types/components/ez-form-view/ez-form-view.d.ts +5 -0
- package/dist/types/components/ez-form-view/structure/index.d.ts +15 -0
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +9 -6
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +2 -3
- package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +1 -0
- package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.d.ts +1 -1
- package/dist/types/components/ez-grid/ez-grid.d.ts +13 -5
- package/dist/types/components/ez-grid/interfaces/IColumnFilter.d.ts +4 -0
- package/dist/types/components/ez-grid/interfaces/index.d.ts +1 -0
- package/dist/types/components/ez-grid/subcomponents/filter-column.d.ts +8 -0
- package/dist/types/components/ez-grid/utils/ColumnFilterManager.d.ts +9 -0
- package/dist/types/components/ez-grid/utils/InMemoryFilterColumnDataSource.d.ts +19 -0
- package/dist/types/components/ez-grid/utils/index.d.ts +1 -0
- package/dist/types/components/ez-guide-navigator/ez-guide-navigator.d.ts +4 -0
- package/dist/types/components/ez-guide-navigator/interfaces/IGuideItem.d.ts +1 -0
- package/dist/types/components/ez-multi-selection-list/ez-multi-selection-list.d.ts +4 -0
- package/dist/types/components/ez-multi-selection-list/interfaces/IMultiSelectionListDataSource.d.ts +2 -0
- package/dist/types/components/ez-search/ez-search.d.ts +112 -10
- package/dist/types/components/ez-split-panel/structure/item/ez-split-item.d.ts +3 -0
- package/dist/types/components/ez-text-input/ez-text-input.d.ts +4 -0
- package/dist/types/components/ez-tree/interfaces/ITreeItem.d.ts +1 -0
- package/dist/types/components/ez-tree/subcomponents/TreeItem.d.ts +1 -0
- package/dist/types/components.d.ts +236 -17
- package/dist/types/utils/ApplicationUtils.d.ts +24 -0
- package/dist/types/utils/constants.d.ts +1 -0
- package/dist/types/utils/form/DataBinder.d.ts +1 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/interfaces/AbstractFieldMetadata.d.ts +2 -1
- package/dist/types/utils/interfaces/IAction.d.ts +7 -0
- package/package.json +4 -3
- package/react/components.d.ts +3 -0
- package/react/components.js +3 -0
- package/react/components.js.map +1 -1
- package/dist/cjs/ez-card-item.cjs.entry.js +0 -52
- package/dist/cjs/ez-filter-input_2.cjs.entry.js +0 -137
- package/dist/esm/constants-6dab64f7.js +0 -4
- package/dist/esm/ez-card-item.entry.js +0 -48
- package/dist/esm/ez-filter-input_2.entry.js +0 -132
- package/dist/ezui/p-050247dc.entry.js +0 -1
- package/dist/ezui/p-1e7c4986.entry.js +0 -1
- package/dist/ezui/p-244dfe8a.entry.js +0 -1
- package/dist/ezui/p-27a01a26.js +0 -1
- package/dist/ezui/p-2a0e1679.entry.js +0 -1
- package/dist/ezui/p-4535da17.entry.js +0 -1
- package/dist/ezui/p-4c8b029b.entry.js +0 -1
- package/dist/ezui/p-4e31b69b.entry.js +0 -1
- package/dist/ezui/p-5495fa45.entry.js +0 -1
- package/dist/ezui/p-5ce6548c.entry.js +0 -1
- package/dist/ezui/p-68352e41.entry.js +0 -1
- package/dist/ezui/p-87e85160.entry.js +0 -1
- package/dist/ezui/p-8bd3903b.entry.js +0 -1
- package/dist/ezui/p-90fa4cb3.entry.js +0 -1
- package/dist/ezui/p-9285b53e.entry.js +0 -1
- package/dist/ezui/p-a510a4c5.entry.js +0 -1
- package/dist/ezui/p-d51aa09b.entry.js +0 -1
- package/dist/ezui/p-db528b31.entry.js +0 -1
- package/dist/ezui/p-e67d0bd5.entry.js +0 -1
- package/dist/ezui/p-e7fa0ad6.entry.js +0 -1
- package/dist/ezui/p-f15ec3bb.js +0 -1
- package/dist/ezui/p-ff82b176.entry.js +0 -1
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
import Split from 'split-grid';
|
|
3
|
+
import { StringUtils } from "@sankhyalabs/core";
|
|
4
|
+
export class SplitPanel {
|
|
5
|
+
constructor() {
|
|
6
|
+
this._items = [];
|
|
7
|
+
this.direction = 'column';
|
|
8
|
+
}
|
|
9
|
+
componentDidLoad() {
|
|
10
|
+
this._panelID = StringUtils.generateUUID();
|
|
11
|
+
this._element.dataset.panelId = this._panelID;
|
|
12
|
+
let itemsElements = Array.from(this._element.children);
|
|
13
|
+
this._items = itemsElements.filter(child => { var _a; return ((_a = child.tagName) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === 'EZ-SPLIT-ITEM'; });
|
|
14
|
+
let trackCount = 1;
|
|
15
|
+
this._items.forEach((item, index) => {
|
|
16
|
+
item.dataset.trackNumber = trackCount.toString();
|
|
17
|
+
if (this._items.length > 1 && index != this._items.length - 1) {
|
|
18
|
+
this.addItemGutter(item);
|
|
19
|
+
}
|
|
20
|
+
trackCount += 2;
|
|
21
|
+
});
|
|
22
|
+
this.initSplit();
|
|
23
|
+
}
|
|
24
|
+
initSplit() {
|
|
25
|
+
if (!this._items.length) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
this._element.style[this.direction == 'row' ? 'grid-template-rows' : 'grid-template-columns'] = this.getGridTemplate();
|
|
29
|
+
Split(this.getGutters());
|
|
30
|
+
}
|
|
31
|
+
getGutters() {
|
|
32
|
+
const gutters = {
|
|
33
|
+
columnGutters: [],
|
|
34
|
+
rowGutters: []
|
|
35
|
+
};
|
|
36
|
+
if (!this._items.length) {
|
|
37
|
+
return gutters;
|
|
38
|
+
}
|
|
39
|
+
const proToChange = this.direction == 'row' ? 'rowGutters' : 'columnGutters';
|
|
40
|
+
this._items.forEach((item, index) => {
|
|
41
|
+
if (index == this._items.length - 1)
|
|
42
|
+
return;
|
|
43
|
+
let gutterTrack = item.dataset.trackNumber;
|
|
44
|
+
if (index === (this._items.length - 1)) {
|
|
45
|
+
gutterTrack = this._items.length.toString();
|
|
46
|
+
}
|
|
47
|
+
gutters[proToChange].push({
|
|
48
|
+
track: Number(gutterTrack),
|
|
49
|
+
element: this._element.querySelector(`ez-split-panel[data-panel-id="${this._panelID}"] > [data-item-track="${item.dataset.trackNumber}"]`)
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
return gutters;
|
|
53
|
+
}
|
|
54
|
+
addItemGutter(item) {
|
|
55
|
+
const gutter = document.createElement('div');
|
|
56
|
+
gutter.classList.add("ez-split-gutter");
|
|
57
|
+
gutter.classList.add(this.direction);
|
|
58
|
+
gutter.dataset.itemTrack = `${item.dataset.trackNumber}`;
|
|
59
|
+
gutter.dataset.trackNumber = (Number(item.dataset.trackNumber) + 1).toString();
|
|
60
|
+
item.parentNode.insertBefore(gutter, item.nextSibling);
|
|
61
|
+
}
|
|
62
|
+
getElementStyle() {
|
|
63
|
+
const style = {
|
|
64
|
+
'display': "grid",
|
|
65
|
+
'height': '100%',
|
|
66
|
+
'width': '100%'
|
|
67
|
+
};
|
|
68
|
+
return style;
|
|
69
|
+
}
|
|
70
|
+
getGridTemplate() {
|
|
71
|
+
let template = '';
|
|
72
|
+
this._items.forEach((_col, index) => {
|
|
73
|
+
if (index === this._items.length - 1) {
|
|
74
|
+
template += ` 1fr`;
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
if (index === 0) {
|
|
78
|
+
template += `1fr 5px`;
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
template += ` 1fr 5px`;
|
|
82
|
+
});
|
|
83
|
+
return template;
|
|
84
|
+
}
|
|
85
|
+
render() {
|
|
86
|
+
return (h(Host, { style: this.getElementStyle() }));
|
|
87
|
+
}
|
|
88
|
+
static get is() { return "ez-split-panel"; }
|
|
89
|
+
static get originalStyleUrls() {
|
|
90
|
+
return {
|
|
91
|
+
"$": ["ez-split-panel.css"]
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
static get styleUrls() {
|
|
95
|
+
return {
|
|
96
|
+
"$": ["ez-split-panel.css"]
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
static get properties() {
|
|
100
|
+
return {
|
|
101
|
+
"direction": {
|
|
102
|
+
"type": "string",
|
|
103
|
+
"mutable": false,
|
|
104
|
+
"complexType": {
|
|
105
|
+
"original": "'row' | 'column'",
|
|
106
|
+
"resolved": "\"column\" | \"row\"",
|
|
107
|
+
"references": {}
|
|
108
|
+
},
|
|
109
|
+
"required": false,
|
|
110
|
+
"optional": false,
|
|
111
|
+
"docs": {
|
|
112
|
+
"tags": [],
|
|
113
|
+
"text": ""
|
|
114
|
+
},
|
|
115
|
+
"attribute": "direction",
|
|
116
|
+
"reflect": false,
|
|
117
|
+
"defaultValue": "'column'"
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
static get elementRef() { return "_element"; }
|
|
122
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
export class SplitItem {
|
|
3
|
+
render() {
|
|
4
|
+
return (h(Host, { class: 'box_split-item' }));
|
|
5
|
+
}
|
|
6
|
+
static get is() { return "ez-split-item"; }
|
|
7
|
+
static get originalStyleUrls() {
|
|
8
|
+
return {
|
|
9
|
+
"$": ["ez-split-item.css"]
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
static get styleUrls() {
|
|
13
|
+
return {
|
|
14
|
+
"$": ["ez-split-item.css"]
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -11,6 +11,7 @@ export class EzTextInput {
|
|
|
11
11
|
this.restrict = undefined;
|
|
12
12
|
this.mode = "regular";
|
|
13
13
|
this.noBorder = false;
|
|
14
|
+
this.password = false;
|
|
14
15
|
}
|
|
15
16
|
observeErrorMessage() {
|
|
16
17
|
if (this._inputElem) {
|
|
@@ -223,7 +224,7 @@ export class EzTextInput {
|
|
|
223
224
|
ElementIDUtils.addIDInfoIfNotExists(this._hostElement, 'input');
|
|
224
225
|
return (h(Host, { style: this._hostElement.classList.contains("grid_editor") ? { "height": "100%" } : null }, h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label && this.mode != "slim" ?
|
|
225
226
|
h("label", { ref: (el) => this._labelElem = el, class: this.enabled ? "input__label" : "input__label input__label--disabled", onClick: () => this._inputElem.focus(), title: this.label }, this.label)
|
|
226
|
-
: null, h("input", { "data-element-id": ElementIDUtils.getInternalIDInfo("input"), onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: "text", class: this.mode === "slim" ? "input--slim" : "", placeholder: this.mode === "slim" && this.label ? this.label : "", value: this.value, disabled: !this.enabled, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); } }), h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.canShowError && this.mode != "slim" &&
|
|
227
|
+
: null, h("input", { "data-element-id": ElementIDUtils.getInternalIDInfo("input"), onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: this.password ? "password" : "text", class: this.mode === "slim" ? "input--slim" : "", placeholder: this.mode === "slim" && this.label ? this.label : "", value: this.value, disabled: !this.enabled, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); } }), h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.canShowError && this.mode != "slim" &&
|
|
227
228
|
h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage, "data-element-id": ElementIDUtils.getInternalIDInfo("message_box") }, this.errorMessage)));
|
|
228
229
|
}
|
|
229
230
|
static get is() { return "ez-text-input"; }
|
|
@@ -396,6 +397,24 @@ export class EzTextInput {
|
|
|
396
397
|
"attribute": "no-border",
|
|
397
398
|
"reflect": true,
|
|
398
399
|
"defaultValue": "false"
|
|
400
|
+
},
|
|
401
|
+
"password": {
|
|
402
|
+
"type": "boolean",
|
|
403
|
+
"mutable": false,
|
|
404
|
+
"complexType": {
|
|
405
|
+
"original": "boolean",
|
|
406
|
+
"resolved": "boolean",
|
|
407
|
+
"references": {}
|
|
408
|
+
},
|
|
409
|
+
"required": false,
|
|
410
|
+
"optional": false,
|
|
411
|
+
"docs": {
|
|
412
|
+
"tags": [],
|
|
413
|
+
"text": "Se true o campo n\u00E3o ter\u00E1 bordas."
|
|
414
|
+
},
|
|
415
|
+
"attribute": "password",
|
|
416
|
+
"reflect": false,
|
|
417
|
+
"defaultValue": "false"
|
|
399
418
|
}
|
|
400
419
|
};
|
|
401
420
|
}
|
|
@@ -70,6 +70,38 @@ ul.first-level {
|
|
|
70
70
|
padding-inline-start: 0;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
.tree-item-badge {
|
|
74
|
+
width: 16px;
|
|
75
|
+
height: 16px;
|
|
76
|
+
background: transparent;
|
|
77
|
+
border-radius: 50%;
|
|
78
|
+
transition: all 300ms ease-in-out;
|
|
79
|
+
display: flex;
|
|
80
|
+
align-items: center;
|
|
81
|
+
justify-content: center;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.tree-item-badge-error-icon{
|
|
85
|
+
--ez-icon--color: white;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.tree-item-badge.error{
|
|
89
|
+
background: var(--color--error);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.tree-item-badge.warning{
|
|
93
|
+
background: var(--color--warning);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.tree-item-badge.success{
|
|
97
|
+
background: var(--color--success);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.item-label-container {
|
|
101
|
+
display: flex;
|
|
102
|
+
align-items: center;
|
|
103
|
+
}
|
|
104
|
+
|
|
73
105
|
.tree-item {
|
|
74
106
|
/*private*/
|
|
75
107
|
display: flex;
|
|
@@ -81,6 +113,7 @@ ul.first-level {
|
|
|
81
113
|
border-radius: var(--ez-tree--border-radius);
|
|
82
114
|
height: var(--ez-tree__tree-item--height);
|
|
83
115
|
padding: var(--ez-tree__tree-item--padding);
|
|
116
|
+
justify-content: space-between;
|
|
84
117
|
}
|
|
85
118
|
|
|
86
119
|
.tree-item[selected] {
|
|
@@ -14,11 +14,11 @@ export const TreeItem = (props) => {
|
|
|
14
14
|
if (available) {
|
|
15
15
|
itemsList.push(treeItem);
|
|
16
16
|
}
|
|
17
|
-
return (h("ul", { class: level === 1 ? "first-level" : undefined }, h("li", Object.assign({ title: tooltipResolver(treeItem, !disabled, level), class:
|
|
17
|
+
return (h("ul", { class: level === 1 ? "first-level" : undefined }, h("li", Object.assign({ title: tooltipResolver(treeItem, !disabled, level), class: `tree-item ${treeItem.id !== selectedId ? 'tree-item-error' : ""}`, onClick: () => available && itemClick(treeItem) }, {
|
|
18
18
|
disabled,
|
|
19
19
|
selected: treeItem.id === selectedId,
|
|
20
20
|
[ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`ezTreeItem_${treeItem.id}`)
|
|
21
|
-
}), h("div", { class: "item-icon-box" }, expandable &&
|
|
22
|
-
h("ez-icon", { id: treeItem.id, class: "item-icon", size: "small", iconName: iconResolver(treeItem, expanded, level), onClick: () => available && iconClick(treeItem) })), h("label", { class: "item-label" }, treeItem.label)), expanded
|
|
21
|
+
}), h("div", { class: "item-label-container" }, h("div", { class: "item-icon-box" }, expandable &&
|
|
22
|
+
h("ez-icon", { id: treeItem.id, class: "item-icon", size: "small", iconName: iconResolver(treeItem, expanded, level), onClick: () => available && iconClick(treeItem) })), h("label", { class: "item-label" }, treeItem.label)), h("div", { class: `tree-item-badge ${(treeItem.id !== selectedId) ? treeItem.badge : null}` }, treeItem.badge === 'error' ? (h("ez-icon", { id: `${treeItem.id}-badge-error`, class: "tree-item-badge-error-icon", size: "x-small", style: { color: 'white' }, iconName: "alert-circle" })) : null)), expanded
|
|
23
23
|
&& node.getChildren().map(child => h(TreeItem, { selectedId: selectedId, node: child, itemClick: itemClick, iconClick: iconClick, level: level + 1, iconResolver: iconResolver, tooltipResolver: tooltipResolver, itemsList: itemsList }))));
|
|
24
24
|
};
|
|
@@ -6,12 +6,13 @@ export default class ApplicationUtils {
|
|
|
6
6
|
options = Object.assign(Object.assign({}, ApplicationUtils.defaultMessageOptions), options);
|
|
7
7
|
}
|
|
8
8
|
return new Promise(resolve => {
|
|
9
|
-
let dialog = document.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
let dialog = document.createElement("ez-dialog");
|
|
10
|
+
window.document.body.appendChild(dialog);
|
|
11
|
+
dialog.show(title, message, dialogType, confirm, icon, options.labelCancel, options.labelConfirm, options.btnConfirmDanger, options.beforeClose)
|
|
12
|
+
.then(ok => {
|
|
13
|
+
dialog.remove();
|
|
14
|
+
return resolve(ok);
|
|
15
|
+
});
|
|
15
16
|
});
|
|
16
17
|
}
|
|
17
18
|
static async alert(title, message, icon = null, options = ApplicationUtils.defaultMessageOptions) {
|
|
@@ -56,6 +57,33 @@ export default class ApplicationUtils {
|
|
|
56
57
|
}
|
|
57
58
|
toast.show(message, 5000, useIcon, options.canClose);
|
|
58
59
|
}
|
|
60
|
+
static isModalContent(content) {
|
|
61
|
+
return content instanceof HTMLElement && content.tagName === 'EZ-MODAL-CONTAINER';
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Exibe um popup configurado com os parâmetros informados e retorna um callBack
|
|
65
|
+
* para removêlo da DOM quando necessário.
|
|
66
|
+
*
|
|
67
|
+
* @param popupProps
|
|
68
|
+
*/
|
|
69
|
+
static async showPopup(popupProps) {
|
|
70
|
+
var _a, _b;
|
|
71
|
+
const popup = document.createElement("ez-popup");
|
|
72
|
+
window.document.body.appendChild(popup);
|
|
73
|
+
const { content } = popupProps;
|
|
74
|
+
popup.setAttribute('id', uuid());
|
|
75
|
+
popup.heightMode = (_a = popupProps.size) !== null && _a !== void 0 ? _a : "auto";
|
|
76
|
+
popup.opened = true;
|
|
77
|
+
if (ApplicationUtils.isModalContent(content)) {
|
|
78
|
+
popup.appendChild(content);
|
|
79
|
+
popup.useHeader = false;
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
popup.ezTitle = (_b = popupProps.title) !== null && _b !== void 0 ? _b : "";
|
|
83
|
+
popup.innerHTML = content;
|
|
84
|
+
}
|
|
85
|
+
return () => popup.remove();
|
|
86
|
+
}
|
|
59
87
|
static async showModal(modalProps) {
|
|
60
88
|
modalProps = Object.assign(Object.assign({}, ApplicationUtils.defaultModalProps), modalProps);
|
|
61
89
|
const modal = document.createElement("ez-modal");
|
|
@@ -76,6 +104,21 @@ export default class ApplicationUtils {
|
|
|
76
104
|
modal.opened = true;
|
|
77
105
|
return () => modal.remove();
|
|
78
106
|
}
|
|
107
|
+
static showAlerts(props) {
|
|
108
|
+
const alertListId = 'EzAlertList';
|
|
109
|
+
let alertList = document.getElementById(alertListId);
|
|
110
|
+
if (!alertList) {
|
|
111
|
+
alertList = document.createElement('ez-alert-list');
|
|
112
|
+
alertList.setAttribute("id", alertListId);
|
|
113
|
+
window.document.body.appendChild(alertList);
|
|
114
|
+
}
|
|
115
|
+
props = Object.assign(Object.assign({}, ApplicationUtils.defaultAlertListProps), props);
|
|
116
|
+
alertList.itemRightSlotBuilder = props.itemRightSlotBuilder;
|
|
117
|
+
alertList.enableDragAndDrop = props.enableDragAndDrop;
|
|
118
|
+
alertList.enableExpand = props.enableExpand;
|
|
119
|
+
alertList.opened = props.opened;
|
|
120
|
+
alertList.alerts = props.alerts;
|
|
121
|
+
}
|
|
79
122
|
}
|
|
80
123
|
ApplicationUtils.defaultMessageOptions = {
|
|
81
124
|
canClose: true,
|
|
@@ -91,4 +134,11 @@ ApplicationUtils.defaultModalProps = {
|
|
|
91
134
|
closeOutsideClick: true,
|
|
92
135
|
closeEsc: true
|
|
93
136
|
};
|
|
137
|
+
ApplicationUtils.defaultAlertListProps = {
|
|
138
|
+
alerts: [],
|
|
139
|
+
enableDragAndDrop: true,
|
|
140
|
+
enableExpand: true,
|
|
141
|
+
itemRightSlotBuilder: null,
|
|
142
|
+
opened: true
|
|
143
|
+
};
|
|
94
144
|
;
|
|
@@ -75,6 +75,16 @@ export default class DataBinder {
|
|
|
75
75
|
this.updateErrorMessage(field.name, fieldElement, field.message);
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
+
setFocus(fieldName) {
|
|
79
|
+
if (!this._fields.has(fieldName)) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
const fieldElement = this._fields.get(fieldName).field;
|
|
83
|
+
if (typeof fieldElement["setFocus"] != "function") {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
fieldElement["setFocus"]();
|
|
87
|
+
}
|
|
78
88
|
clearInvalid(recordId) {
|
|
79
89
|
this._dataUnit.clearInvalid(recordId);
|
|
80
90
|
this._fields.forEach(fieldBinder => {
|
|
@@ -163,7 +173,8 @@ export default class DataBinder {
|
|
|
163
173
|
this._dataUnit.addRecord();
|
|
164
174
|
}
|
|
165
175
|
this._dataUnit.clearInvalid(this.getCurrentRecordId(), fieldName);
|
|
166
|
-
this._dataUnit.
|
|
176
|
+
const record = this._dataUnit.getSelectedRecord();
|
|
177
|
+
this._dataUnit.setFieldValue(fieldName, newValue, record ? [record.__record__id__] : undefined);
|
|
167
178
|
if (this._dataUnit.waitingForChange(fieldName)) {
|
|
168
179
|
const bind = this._fields.get(fieldName);
|
|
169
180
|
if (bind) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -14,6 +14,12 @@ export const EzAlert: {
|
|
|
14
14
|
new (): EzAlert;
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
+
interface EzAlertList extends Components.EzAlertList, HTMLElement {}
|
|
18
|
+
export const EzAlertList: {
|
|
19
|
+
prototype: EzAlertList;
|
|
20
|
+
new (): EzAlertList;
|
|
21
|
+
};
|
|
22
|
+
|
|
17
23
|
interface EzApplication extends Components.EzApplication, HTMLElement {}
|
|
18
24
|
export const EzApplication: {
|
|
19
25
|
prototype: EzApplication;
|
|
@@ -218,6 +224,18 @@ export const EzSkeleton: {
|
|
|
218
224
|
new (): EzSkeleton;
|
|
219
225
|
};
|
|
220
226
|
|
|
227
|
+
interface EzSplitItem extends Components.EzSplitItem, HTMLElement {}
|
|
228
|
+
export const EzSplitItem: {
|
|
229
|
+
prototype: EzSplitItem;
|
|
230
|
+
new (): EzSplitItem;
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
interface EzSplitPanel extends Components.EzSplitPanel, HTMLElement {}
|
|
234
|
+
export const EzSplitPanel: {
|
|
235
|
+
prototype: EzSplitPanel;
|
|
236
|
+
new (): EzSplitPanel;
|
|
237
|
+
};
|
|
238
|
+
|
|
221
239
|
interface EzTabselector extends Components.EzTabselector, HTMLElement {}
|
|
222
240
|
export const EzTabselector: {
|
|
223
241
|
prototype: EzTabselector;
|