@sankhyalabs/ezui 3.0.0 → 3.0.2
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/ez-actions-button.cjs.entry.js +12 -26
- package/dist/cjs/ez-alert.cjs.entry.js +2 -5
- package/dist/cjs/ez-application.cjs.entry.js +2 -2
- package/dist/cjs/ez-breadcrumb.cjs.entry.js +2 -5
- package/dist/cjs/ez-button.cjs.entry.js +6 -8
- package/dist/cjs/ez-calendar.cjs.entry.js +2 -14
- package/dist/cjs/ez-card-item.cjs.entry.js +3 -2
- package/dist/cjs/ez-check.cjs.entry.js +5 -8
- package/dist/cjs/ez-chip.cjs.entry.js +8 -11
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +4 -20
- package/dist/cjs/ez-combo-box.cjs.entry.js +11 -23
- package/dist/cjs/ez-date-input.cjs.entry.js +5 -8
- package/dist/cjs/ez-date-time-input.cjs.entry.js +5 -11
- package/dist/cjs/ez-dialog.cjs.entry.js +7 -9
- package/dist/cjs/ez-dropdown.cjs.entry.js +4 -5
- package/dist/cjs/ez-file-item.cjs.entry.js +5 -8
- package/dist/cjs/ez-filter-input_4.cjs.entry.js +14 -23
- package/dist/cjs/ez-form-view.cjs.entry.js +3 -2
- package/dist/cjs/ez-form.cjs.entry.js +26 -20
- package/dist/cjs/ez-grid.cjs.entry.js +11131 -6779
- package/dist/cjs/ez-guide-navigator.cjs.entry.js +3 -11
- package/dist/cjs/ez-icon.cjs.entry.js +4 -5
- package/dist/cjs/ez-list.cjs.entry.js +4 -15
- package/dist/cjs/ez-loading-bar.cjs.entry.js +2 -2
- package/dist/cjs/ez-modal-container.cjs.entry.js +8 -5
- package/dist/cjs/ez-modal.cjs.entry.js +7 -14
- package/dist/cjs/ez-number-input.cjs.entry.js +7 -8
- package/dist/cjs/ez-popover.cjs.entry.js +11 -30
- package/dist/cjs/ez-popup.cjs.entry.js +3 -14
- package/dist/cjs/ez-radio-button.cjs.entry.js +4 -11
- package/dist/cjs/ez-search.cjs.entry.js +6 -17
- package/dist/cjs/ez-tabselector.cjs.entry.js +6 -2
- package/dist/cjs/ez-text-area.cjs.entry.js +5 -14
- package/dist/cjs/ez-text-edit.cjs.entry.js +5 -2
- package/dist/cjs/ez-text-input.cjs.entry.js +7 -14
- package/dist/cjs/ez-time-input.cjs.entry.js +5 -11
- package/dist/cjs/ez-toast.cjs.entry.js +3 -11
- package/dist/cjs/ez-upload.cjs.entry.js +9 -5
- package/dist/cjs/ez-view-stack.cjs.entry.js +2 -2
- package/dist/cjs/ezui.cjs.js +6 -2
- package/dist/cjs/{index-5e208fa5.js → index-892780f1.js} +588 -248
- package/dist/cjs/loader.cjs.js +3 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/ez-actions-button/ez-actions-button.js +248 -256
- package/dist/collection/components/ez-alert/ez-alert.js +34 -36
- package/dist/collection/components/ez-application/ez-application.js +29 -23
- package/dist/collection/components/ez-breadcrumb/ez-breadcrumb.js +61 -60
- package/dist/collection/components/ez-button/ez-button.js +159 -159
- package/dist/collection/components/ez-calendar/ez-calendar.js +214 -244
- package/dist/collection/components/ez-card-item/ez-card-item.js +60 -58
- package/dist/collection/components/ez-check/ez-check.js +164 -157
- package/dist/collection/components/ez-chip/ez-chip.css +4 -0
- package/dist/collection/components/ez-chip/ez-chip.js +192 -188
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.js +282 -293
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +348 -361
- package/dist/collection/components/ez-date-input/ez-date-input.js +213 -207
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +233 -228
- package/dist/collection/components/ez-dialog/ez-dialog.js +203 -209
- package/dist/collection/components/ez-dropdown/ez-dropdown.js +128 -127
- package/dist/collection/components/ez-dropdown/structure/DropdownItem.js +1 -4
- package/dist/collection/components/ez-file-item/ez-file-item.js +144 -142
- package/dist/collection/components/ez-filter-input/ez-filter-input.js +197 -188
- package/dist/collection/components/ez-form/DataBinder.js +12 -6
- package/dist/collection/components/ez-form/ez-form.js +191 -177
- package/dist/collection/components/ez-form-view/ez-form-view.js +38 -29
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/CheckBox.tpl.js +1 -2
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/ComboBox.tpl.js +1 -2
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.js +3 -6
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/FileInput.tpl.js +1 -2
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/NumberInput.tpl.js +1 -2
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.js +1 -2
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextArea.tpl.js +1 -2
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.js +1 -2
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +20 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/mock/Server.js +1 -1
- package/dist/collection/components/ez-grid/ez-grid.js +366 -352
- package/dist/collection/components/ez-guide-navigator/ez-guide-navigator.js +120 -125
- package/dist/collection/components/ez-icon/ez-icon.js +68 -64
- package/dist/collection/components/ez-list/ez-list.js +246 -266
- package/dist/collection/components/ez-loading-bar/ez-loading-bar.js +49 -42
- package/dist/collection/components/ez-modal/ez-modal.js +143 -143
- package/dist/collection/components/ez-modal-container/ez-modal-container.js +153 -155
- package/dist/collection/components/ez-number-input/ez-number-input.js +246 -233
- package/dist/collection/components/ez-popover/ez-popover.js +273 -283
- package/dist/collection/components/ez-popup/ez-popup.js +121 -133
- package/dist/collection/components/ez-radio-button/ez-radio-button.js +123 -126
- package/dist/collection/components/ez-scroller/ez-scroller.js +104 -100
- package/dist/collection/components/ez-search/ez-search.js +260 -259
- package/dist/collection/components/ez-sidebar-button/ez-sidebar-button.js +30 -25
- package/dist/collection/components/ez-tabselector/ez-tabselector.js +115 -106
- package/dist/collection/components/ez-text-area/ez-text-area.js +217 -218
- package/dist/collection/components/ez-text-edit/ez-text-edit.js +109 -96
- package/dist/collection/components/ez-text-input/ez-text-input.js +248 -248
- package/dist/collection/components/ez-time-input/ez-time-input.js +227 -223
- package/dist/collection/components/ez-toast/ez-toast.js +117 -121
- package/dist/collection/components/ez-tree/ez-tree.js +289 -275
- package/dist/collection/components/ez-tree/subcomponents/TreeItem.js +7 -11
- package/dist/collection/components/ez-upload/ez-upload.js +283 -281
- package/dist/collection/components/ez-view-stack/ez-view-stack.js +46 -40
- package/dist/custom-elements/index.js +11121 -6945
- package/dist/esm/ez-actions-button.entry.js +12 -26
- package/dist/esm/ez-alert.entry.js +2 -5
- package/dist/esm/ez-application.entry.js +2 -2
- package/dist/esm/ez-breadcrumb.entry.js +2 -5
- package/dist/esm/ez-button.entry.js +6 -8
- package/dist/esm/ez-calendar.entry.js +2 -14
- package/dist/esm/ez-card-item.entry.js +3 -2
- package/dist/esm/ez-check.entry.js +5 -8
- package/dist/esm/ez-chip.entry.js +8 -11
- package/dist/esm/ez-collapsible-box.entry.js +4 -20
- package/dist/esm/ez-combo-box.entry.js +11 -23
- package/dist/esm/ez-date-input.entry.js +5 -8
- package/dist/esm/ez-date-time-input.entry.js +5 -11
- package/dist/esm/ez-dialog.entry.js +7 -9
- package/dist/esm/ez-dropdown.entry.js +4 -5
- package/dist/esm/ez-file-item.entry.js +5 -8
- package/dist/esm/ez-filter-input_4.entry.js +14 -23
- package/dist/esm/ez-form-view.entry.js +3 -2
- package/dist/esm/ez-form.entry.js +26 -20
- package/dist/esm/ez-grid.entry.js +11131 -6779
- package/dist/esm/ez-guide-navigator.entry.js +3 -11
- package/dist/esm/ez-icon.entry.js +4 -5
- package/dist/esm/ez-list.entry.js +4 -15
- package/dist/esm/ez-loading-bar.entry.js +2 -2
- package/dist/esm/ez-modal-container.entry.js +8 -5
- package/dist/esm/ez-modal.entry.js +7 -14
- package/dist/esm/ez-number-input.entry.js +7 -8
- package/dist/esm/ez-popover.entry.js +11 -30
- package/dist/esm/ez-popup.entry.js +3 -14
- package/dist/esm/ez-radio-button.entry.js +4 -11
- package/dist/esm/ez-search.entry.js +6 -17
- package/dist/esm/ez-tabselector.entry.js +6 -2
- package/dist/esm/ez-text-area.entry.js +5 -14
- package/dist/esm/ez-text-edit.entry.js +5 -2
- package/dist/esm/ez-text-input.entry.js +7 -14
- package/dist/esm/ez-time-input.entry.js +5 -11
- package/dist/esm/ez-toast.entry.js +3 -11
- package/dist/esm/ez-upload.entry.js +9 -5
- package/dist/esm/ez-view-stack.entry.js +2 -2
- package/dist/esm/ezui.js +3 -2
- package/dist/esm/{index-c5203f95.js → index-de655f48.js} +588 -249
- package/dist/esm/loader.js +3 -2
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-06b3e801.entry.js +1 -0
- package/dist/ezui/p-07b99b94.entry.js +1 -0
- package/dist/ezui/p-0c7e81fe.entry.js +1 -0
- package/dist/ezui/p-1581fece.entry.js +1 -0
- package/dist/ezui/p-1b95836f.entry.js +1 -0
- package/dist/ezui/p-36f7ec68.entry.js +1 -0
- package/dist/ezui/p-37b4bf04.entry.js +1 -0
- package/dist/ezui/p-493e2af4.entry.js +1 -0
- package/dist/ezui/p-4bfed869.entry.js +1 -0
- package/dist/ezui/p-600f1732.entry.js +1 -0
- package/dist/ezui/p-62481744.entry.js +1 -0
- package/dist/ezui/p-6818dd0a.entry.js +1 -0
- package/dist/ezui/p-695facd0.entry.js +1 -0
- package/dist/ezui/p-7ffd12e7.js +2 -0
- package/dist/ezui/p-82db6de7.entry.js +1 -0
- package/dist/ezui/p-86d29565.entry.js +1 -0
- package/dist/ezui/p-8ca4750d.entry.js +1 -0
- package/dist/ezui/p-9613fae6.entry.js +1 -0
- package/dist/ezui/{p-fc97f773.entry.js → p-a323b415.entry.js} +1 -1
- package/dist/ezui/p-a4b281ca.entry.js +1 -0
- package/dist/ezui/p-a67e056f.entry.js +1 -0
- package/dist/ezui/p-a8c7355e.entry.js +1 -0
- package/dist/ezui/p-ada6e6b0.entry.js +1 -0
- package/dist/ezui/p-b1e4ccf4.entry.js +1 -0
- package/dist/ezui/p-b3c7b243.entry.js +1 -0
- package/dist/ezui/p-b405d9b6.entry.js +304 -0
- package/dist/ezui/p-b941aeee.entry.js +1 -0
- package/dist/ezui/p-c0184982.entry.js +1 -0
- package/dist/ezui/p-c1300e84.entry.js +1 -0
- package/dist/ezui/p-c98e571a.entry.js +1 -0
- package/dist/ezui/p-cc40fcb3.entry.js +1 -0
- package/dist/ezui/p-cc5cfcb7.entry.js +1 -0
- package/dist/ezui/p-d6dd32b2.entry.js +1 -0
- package/dist/ezui/p-db131605.entry.js +1 -0
- package/dist/ezui/{p-ba03ac61.entry.js → p-e0d756d9.entry.js} +1 -1
- package/dist/ezui/p-eceb9382.entry.js +1 -0
- package/dist/ezui/p-f18d39e6.entry.js +1 -0
- package/dist/ezui/p-f670bd32.entry.js +1 -0
- package/dist/ezui/p-fcf6cf57.entry.js +1 -0
- package/dist/ezui/p-fd87638e.entry.js +1 -0
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +5 -1
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +4 -0
- package/dist/types/components.d.ts +195 -63
- package/dist/types/stencil-public-runtime.d.ts +79 -7
- package/loader/index.d.ts +9 -0
- package/loader/package.json +1 -0
- package/package.json +4 -4
- package/react/components.d.ts +0 -1
- package/dist/ezui/p-0cd0545d.entry.js +0 -1
- package/dist/ezui/p-1a27bb9f.entry.js +0 -1
- package/dist/ezui/p-1b94b9dc.entry.js +0 -1
- package/dist/ezui/p-20c01161.entry.js +0 -1
- package/dist/ezui/p-24717f87.entry.js +0 -1
- package/dist/ezui/p-3320768e.entry.js +0 -1
- package/dist/ezui/p-368037b9.entry.js +0 -1
- package/dist/ezui/p-47bcc678.entry.js +0 -1
- package/dist/ezui/p-47ca5e09.entry.js +0 -1
- package/dist/ezui/p-4c444816.entry.js +0 -1
- package/dist/ezui/p-608d13e8.entry.js +0 -1
- package/dist/ezui/p-626b8940.entry.js +0 -1
- package/dist/ezui/p-6414e7cb.entry.js +0 -1
- package/dist/ezui/p-6630eca2.entry.js +0 -1
- package/dist/ezui/p-67b9a2cb.entry.js +0 -1
- package/dist/ezui/p-6f9aba86.entry.js +0 -1
- package/dist/ezui/p-7b80df03.js +0 -1
- package/dist/ezui/p-7d42065a.entry.js +0 -1
- package/dist/ezui/p-97d2d2f6.entry.js +0 -1
- package/dist/ezui/p-99aea44b.entry.js +0 -1
- package/dist/ezui/p-a4b4645d.entry.js +0 -1
- package/dist/ezui/p-ab5eee38.entry.js +0 -1
- package/dist/ezui/p-ad7151e0.entry.js +0 -1
- package/dist/ezui/p-ad8b7412.entry.js +0 -1
- package/dist/ezui/p-ae168e45.entry.js +0 -1
- package/dist/ezui/p-b2e861cb.entry.js +0 -1
- package/dist/ezui/p-b2efb22c.entry.js +0 -1
- package/dist/ezui/p-b5557d33.entry.js +0 -1
- package/dist/ezui/p-bc324ee8.entry.js +0 -304
- package/dist/ezui/p-bd9792e2.entry.js +0 -1
- package/dist/ezui/p-bf8a633d.entry.js +0 -1
- package/dist/ezui/p-c071db26.entry.js +0 -1
- package/dist/ezui/p-c3529df3.entry.js +0 -1
- package/dist/ezui/p-c53b2db8.entry.js +0 -1
- package/dist/ezui/p-ca7435a6.entry.js +0 -1
- package/dist/ezui/p-cc038b32.entry.js +0 -1
- package/dist/ezui/p-e203c89f.entry.js +0 -1
- package/dist/ezui/p-f08de60b.entry.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ElementIDUtils, ObjectUtils } from '@sankhyalabs/core';
|
|
2
|
-
import {
|
|
2
|
+
import { h, Host } from '@stencil/core';
|
|
3
3
|
import { DropdownItem } from './structure/DropdownItem';
|
|
4
4
|
import { SubmenuControl } from './structure/SubmenuControl';
|
|
5
5
|
export class EzDropdown {
|
|
@@ -12,10 +12,9 @@ export class EzDropdown {
|
|
|
12
12
|
* Valor 0, null ou undefined desativa o limitador.
|
|
13
13
|
*/
|
|
14
14
|
this._levelLimits = 3;
|
|
15
|
-
/**
|
|
16
|
-
* Lista de itens que vão ser apresentados no dropdown.
|
|
17
|
-
*/
|
|
18
15
|
this.items = [];
|
|
16
|
+
this.value = undefined;
|
|
17
|
+
this.itemBuilder = undefined;
|
|
19
18
|
}
|
|
20
19
|
//---------------------------------------------
|
|
21
20
|
// Private methods
|
|
@@ -121,14 +120,12 @@ export class EzDropdown {
|
|
|
121
120
|
return groupItems.map((item) => {
|
|
122
121
|
var _a;
|
|
123
122
|
return (item.type !== "divider"
|
|
124
|
-
? h("div", Object.assign({ ref: (ref) => this._itemList[item.id] = ref, class: "ez-dropdown__item", "data-level": level }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`${item.id}_ezDropdownItem`) }),
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
hasChildren &&
|
|
131
|
-
h("div", { ref: (ref) => this._submenuList.push(ref), class: "ez-dropdown__submenu ez-dropdown__submenu--hide" }, this.renderDropdown(item.children, counterLevel)))
|
|
123
|
+
? h("div", Object.assign({ ref: (ref) => this._itemList[item.id] = ref, class: "ez-dropdown__item", "data-level": level }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`${item.id}_ezDropdownItem`) }), h("div", { class: "ez-dropdown__item-content", onClick: (evt) => this.onItemClick(evt, item), onMouseOver: (evt) => this.onShowSubmenu(evt, item) }, this.itemBuilder
|
|
124
|
+
? this.getContainerItemBuilder(item, level)
|
|
125
|
+
: this.defaultItemBuilder(item, isLockedLevels, hasIcon, hasChildren)), ((_a = item.children) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
|
|
126
|
+
!isLockedLevels &&
|
|
127
|
+
hasChildren &&
|
|
128
|
+
h("div", { ref: (ref) => this._submenuList.push(ref), class: "ez-dropdown__submenu ez-dropdown__submenu--hide" }, this.renderDropdown(item.children, counterLevel)))
|
|
132
129
|
: h("hr", Object.assign({ class: "ez-dropdown__divider" }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`${item.id}_ezDropdownDivider`) })));
|
|
133
130
|
});
|
|
134
131
|
}
|
|
@@ -140,17 +137,13 @@ export class EzDropdown {
|
|
|
140
137
|
const hasGroup = this.hasGroup(branchItems);
|
|
141
138
|
const hasIcon = this.hasIcon(branchItems);
|
|
142
139
|
const hasChildren = this.hasChildren(branchItems);
|
|
143
|
-
return (h("div", { class: "ez-dropdown", "data-level": level },
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
groupLabel === "noGroup" &&
|
|
151
|
-
h("hr", Object.assign({ class: "ez-dropdown__divider" }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`${groupLabel}_ezDropdownDivider`) })),
|
|
152
|
-
this.getItemsRender(itemsByGroup[groupLabel].items, level, hasIcon, hasChildren)));
|
|
153
|
-
}))));
|
|
140
|
+
return (h("div", { class: "ez-dropdown", "data-level": level }, h("div", { class: "ez-dropdown__container" }, Object.keys(itemsByGroup)
|
|
141
|
+
.map((groupLabel) => {
|
|
142
|
+
return (h("div", Object.assign({ class: "ez-dropdown__group" }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`${groupLabel}_ezDropdownGroup`) }), groupLabel !== "noGroup" &&
|
|
143
|
+
h("label", { class: "ez-dropdown__group-label", title: groupLabel }, groupLabel), hasGroup &&
|
|
144
|
+
groupLabel === "noGroup" &&
|
|
145
|
+
h("hr", Object.assign({ class: "ez-dropdown__divider" }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`${groupLabel}_ezDropdownDivider`) })), this.getItemsRender(itemsByGroup[groupLabel].items, level, hasIcon, hasChildren)));
|
|
146
|
+
}))));
|
|
154
147
|
}
|
|
155
148
|
hasOpenedSubmenu(level) {
|
|
156
149
|
const openedLevels = Object.keys(this._openedMenuList);
|
|
@@ -235,121 +228,129 @@ export class EzDropdown {
|
|
|
235
228
|
}
|
|
236
229
|
static get is() { return "ez-dropdown"; }
|
|
237
230
|
static get encapsulation() { return "shadow"; }
|
|
238
|
-
static get originalStyleUrls() {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
"
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
"
|
|
256
|
-
|
|
257
|
-
"
|
|
231
|
+
static get originalStyleUrls() {
|
|
232
|
+
return {
|
|
233
|
+
"$": ["ez-dropdown.css"]
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
static get styleUrls() {
|
|
237
|
+
return {
|
|
238
|
+
"$": ["ez-dropdown.css"]
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
static get properties() {
|
|
242
|
+
return {
|
|
243
|
+
"items": {
|
|
244
|
+
"type": "unknown",
|
|
245
|
+
"mutable": true,
|
|
246
|
+
"complexType": {
|
|
247
|
+
"original": "Array<IDropdownItem>",
|
|
248
|
+
"resolved": "IDropdownItem[]",
|
|
249
|
+
"references": {
|
|
250
|
+
"Array": {
|
|
251
|
+
"location": "global"
|
|
252
|
+
},
|
|
253
|
+
"IDropdownItem": {
|
|
254
|
+
"location": "import",
|
|
255
|
+
"path": "./structure/DropdownItem"
|
|
256
|
+
}
|
|
258
257
|
}
|
|
259
|
-
}
|
|
258
|
+
},
|
|
259
|
+
"required": false,
|
|
260
|
+
"optional": false,
|
|
261
|
+
"docs": {
|
|
262
|
+
"tags": [],
|
|
263
|
+
"text": "Lista de itens que v\u00E3o ser apresentados no dropdown."
|
|
264
|
+
},
|
|
265
|
+
"defaultValue": "[]"
|
|
260
266
|
},
|
|
261
|
-
"
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
"
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
"complexType": {
|
|
273
|
-
"original": "IDropdownItem",
|
|
274
|
-
"resolved": "IDropdownItem",
|
|
275
|
-
"references": {
|
|
276
|
-
"IDropdownItem": {
|
|
277
|
-
"location": "import",
|
|
278
|
-
"path": "./structure/DropdownItem"
|
|
267
|
+
"value": {
|
|
268
|
+
"type": "unknown",
|
|
269
|
+
"mutable": true,
|
|
270
|
+
"complexType": {
|
|
271
|
+
"original": "IDropdownItem",
|
|
272
|
+
"resolved": "IDropdownItem",
|
|
273
|
+
"references": {
|
|
274
|
+
"IDropdownItem": {
|
|
275
|
+
"location": "import",
|
|
276
|
+
"path": "./structure/DropdownItem"
|
|
277
|
+
}
|
|
279
278
|
}
|
|
279
|
+
},
|
|
280
|
+
"required": false,
|
|
281
|
+
"optional": false,
|
|
282
|
+
"docs": {
|
|
283
|
+
"tags": [],
|
|
284
|
+
"text": "\u00DAltimo item que recebeu o click."
|
|
280
285
|
}
|
|
281
286
|
},
|
|
282
|
-
"
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
"
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
"IDropdownItem": {
|
|
297
|
-
"location": "import",
|
|
298
|
-
"path": "./structure/DropdownItem"
|
|
299
|
-
},
|
|
300
|
-
"HTMLElement": {
|
|
301
|
-
"location": "global"
|
|
287
|
+
"itemBuilder": {
|
|
288
|
+
"type": "unknown",
|
|
289
|
+
"mutable": false,
|
|
290
|
+
"complexType": {
|
|
291
|
+
"original": "(item: IDropdownItem, level: number) => HTMLElement | string",
|
|
292
|
+
"resolved": "(item: IDropdownItem, level: number) => string | HTMLElement",
|
|
293
|
+
"references": {
|
|
294
|
+
"IDropdownItem": {
|
|
295
|
+
"location": "import",
|
|
296
|
+
"path": "./structure/DropdownItem"
|
|
297
|
+
},
|
|
298
|
+
"HTMLElement": {
|
|
299
|
+
"location": "global"
|
|
300
|
+
}
|
|
302
301
|
}
|
|
302
|
+
},
|
|
303
|
+
"required": false,
|
|
304
|
+
"optional": false,
|
|
305
|
+
"docs": {
|
|
306
|
+
"tags": [],
|
|
307
|
+
"text": "Fun\u00E7\u00E3o builder que possibilita alterar como o item da lista vai ser apresentado.\nObserva\u00E7\u00E3o: No react ele se transforma em VNode e n\u00E3o como HTMLElement."
|
|
303
308
|
}
|
|
304
|
-
},
|
|
305
|
-
"required": false,
|
|
306
|
-
"optional": false,
|
|
307
|
-
"docs": {
|
|
308
|
-
"tags": [],
|
|
309
|
-
"text": "Fun\u00E7\u00E3o builder que possibilita alterar como o item da lista vai ser apresentado.\nObserva\u00E7\u00E3o: No react ele se transforma em VNode e n\u00E3o como HTMLElement."
|
|
310
309
|
}
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
static get events() {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
"
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
"
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
"
|
|
328
|
-
"
|
|
329
|
-
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
static get events() {
|
|
313
|
+
return [{
|
|
314
|
+
"method": "ezClick",
|
|
315
|
+
"name": "ezClick",
|
|
316
|
+
"bubbles": true,
|
|
317
|
+
"cancelable": true,
|
|
318
|
+
"composed": true,
|
|
319
|
+
"docs": {
|
|
320
|
+
"tags": [],
|
|
321
|
+
"text": "Emitido quando ocorrer um click em um item da lista,\no IDropdownItem que recebeu o click deve ser enviado como data do evento."
|
|
322
|
+
},
|
|
323
|
+
"complexType": {
|
|
324
|
+
"original": "IDropdownItem",
|
|
325
|
+
"resolved": "IDropdownItem",
|
|
326
|
+
"references": {
|
|
327
|
+
"IDropdownItem": {
|
|
328
|
+
"location": "import",
|
|
329
|
+
"path": "./structure/DropdownItem"
|
|
330
|
+
}
|
|
330
331
|
}
|
|
331
332
|
}
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
333
|
+
}, {
|
|
334
|
+
"method": "ezSubActionClick",
|
|
335
|
+
"name": "ezSubActionClick",
|
|
336
|
+
"bubbles": true,
|
|
337
|
+
"cancelable": true,
|
|
338
|
+
"composed": true,
|
|
339
|
+
"docs": {
|
|
340
|
+
"tags": [],
|
|
341
|
+
"text": "Emitido quando ocorrer um click em uma a\u00E7\u00E3o secundaria do item, \no IDropdownSubAction deve ser enviado como data do evento."
|
|
342
|
+
},
|
|
343
|
+
"complexType": {
|
|
344
|
+
"original": "IDropdownSubAction",
|
|
345
|
+
"resolved": "IDropdownSubAction",
|
|
346
|
+
"references": {
|
|
347
|
+
"IDropdownSubAction": {
|
|
348
|
+
"location": "import",
|
|
349
|
+
"path": "./structure/DropdownItem"
|
|
350
|
+
}
|
|
350
351
|
}
|
|
351
352
|
}
|
|
352
|
-
}
|
|
353
|
-
|
|
353
|
+
}];
|
|
354
|
+
}
|
|
354
355
|
static get elementRef() { return "_element"; }
|
|
355
356
|
}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { ElementIDUtils } from "@sankhyalabs/core";
|
|
2
2
|
import { h } from "@stencil/core";
|
|
3
3
|
export const DropdownItem = ({ item, hasIcon, hasChildren, isLockedLevels, onSubActionClick }) => {
|
|
4
|
-
return (h("div", { class: "ez-dropdown__item-wrapper", title: item.label },
|
|
5
|
-
getContentLeft(item, hasIcon),
|
|
6
|
-
h("span", { class: "ez-dropdown__item-label" }, item.label),
|
|
7
|
-
getContentRight(item, hasChildren, isLockedLevels, onSubActionClick)));
|
|
4
|
+
return (h("div", { class: "ez-dropdown__item-wrapper", title: item.label }, getContentLeft(item, hasIcon), h("span", { class: "ez-dropdown__item-label" }, item.label), getContentRight(item, hasChildren, isLockedLevels, onSubActionClick)));
|
|
8
5
|
};
|
|
9
6
|
const getContentLeft = (item, hasIcon) => {
|
|
10
7
|
if (item == undefined || !hasIcon) {
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { ElementIDUtils, StringUtils } from "@sankhyalabs/core";
|
|
2
|
-
import {
|
|
2
|
+
import { h } from "@stencil/core";
|
|
3
3
|
export class EzFileItem {
|
|
4
4
|
constructor() {
|
|
5
|
-
/**
|
|
6
|
-
* Define se o usuário pode remover o arquivo que está sendo apresentado.
|
|
7
|
-
*/
|
|
8
5
|
this.canRemove = true;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
this.fileName = undefined;
|
|
7
|
+
this.iconName = undefined;
|
|
8
|
+
this.fileSize = undefined;
|
|
12
9
|
this.progress = 100;
|
|
13
10
|
}
|
|
14
11
|
observeProgress(newProgress) {
|
|
@@ -37,150 +34,155 @@ export class EzFileItem {
|
|
|
37
34
|
render() {
|
|
38
35
|
this._element.title = `${this.fileName} ${this.getFileSize()}`;
|
|
39
36
|
ElementIDUtils.addIDInfoIfNotExists(this._element, 'ezFileIcon');
|
|
40
|
-
return (h("div", { class: "box", onClick: () => this.ezClick.emit(this.fileName) },
|
|
41
|
-
h("
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
this.canRemove ?
|
|
46
|
-
h("ez-icon", { "data-element-id": ElementIDUtils.getInternalIDInfo("remove"), class: "btn-remove", size: "medium", "icon-name": "close", onClick: evt => {
|
|
47
|
-
this.ezRemove.emit(this.fileName);
|
|
48
|
-
evt.stopPropagation();
|
|
49
|
-
} }) : undefined));
|
|
37
|
+
return (h("div", { class: "box", onClick: () => this.ezClick.emit(this.fileName) }, h("div", { class: "content" }, h("ez-icon", { "data-element-id": ElementIDUtils.getInternalIDInfo("fileIcon"), class: "file-type-icon", size: "medium", "icon-name": this.getIconName() }), h("label", { class: "file-name" }, this.fileName), h("label", { class: "file-size" }, this.getFileSize())), this.canRemove ?
|
|
38
|
+
h("ez-icon", { "data-element-id": ElementIDUtils.getInternalIDInfo("remove"), class: "btn-remove", size: "medium", "icon-name": "close", onClick: evt => {
|
|
39
|
+
this.ezRemove.emit(this.fileName);
|
|
40
|
+
evt.stopPropagation();
|
|
41
|
+
} }) : undefined));
|
|
50
42
|
}
|
|
51
43
|
static get is() { return "ez-file-item"; }
|
|
52
44
|
static get encapsulation() { return "shadow"; }
|
|
53
|
-
static get originalStyleUrls() {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
"original": "string",
|
|
83
|
-
"resolved": "string",
|
|
84
|
-
"references": {}
|
|
85
|
-
},
|
|
86
|
-
"required": false,
|
|
87
|
-
"optional": false,
|
|
88
|
-
"docs": {
|
|
89
|
-
"tags": [],
|
|
90
|
-
"text": "Define o nome do arquivo, com extens\u00E3o."
|
|
91
|
-
},
|
|
92
|
-
"attribute": "file-name",
|
|
93
|
-
"reflect": false
|
|
94
|
-
},
|
|
95
|
-
"iconName": {
|
|
96
|
-
"type": "string",
|
|
97
|
-
"mutable": false,
|
|
98
|
-
"complexType": {
|
|
99
|
-
"original": "string",
|
|
100
|
-
"resolved": "string",
|
|
101
|
-
"references": {}
|
|
102
|
-
},
|
|
103
|
-
"required": false,
|
|
104
|
-
"optional": false,
|
|
105
|
-
"docs": {
|
|
106
|
-
"tags": [],
|
|
107
|
-
"text": "Define qual \u00EDcone que representa o arquivo."
|
|
108
|
-
},
|
|
109
|
-
"attribute": "icon-name",
|
|
110
|
-
"reflect": false
|
|
111
|
-
},
|
|
112
|
-
"fileSize": {
|
|
113
|
-
"type": "number",
|
|
114
|
-
"mutable": false,
|
|
115
|
-
"complexType": {
|
|
116
|
-
"original": "number",
|
|
117
|
-
"resolved": "number",
|
|
118
|
-
"references": {}
|
|
119
|
-
},
|
|
120
|
-
"required": false,
|
|
121
|
-
"optional": false,
|
|
122
|
-
"docs": {
|
|
123
|
-
"tags": [],
|
|
124
|
-
"text": "Tamanho do arquivo (em bytes)."
|
|
125
|
-
},
|
|
126
|
-
"attribute": "file-size",
|
|
127
|
-
"reflect": false
|
|
128
|
-
},
|
|
129
|
-
"progress": {
|
|
130
|
-
"type": "number",
|
|
131
|
-
"mutable": false,
|
|
132
|
-
"complexType": {
|
|
133
|
-
"original": "number",
|
|
134
|
-
"resolved": "number",
|
|
135
|
-
"references": {}
|
|
45
|
+
static get originalStyleUrls() {
|
|
46
|
+
return {
|
|
47
|
+
"$": ["ez-file-item.css"]
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
static get styleUrls() {
|
|
51
|
+
return {
|
|
52
|
+
"$": ["ez-file-item.css"]
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
static get properties() {
|
|
56
|
+
return {
|
|
57
|
+
"canRemove": {
|
|
58
|
+
"type": "boolean",
|
|
59
|
+
"mutable": false,
|
|
60
|
+
"complexType": {
|
|
61
|
+
"original": "boolean",
|
|
62
|
+
"resolved": "boolean",
|
|
63
|
+
"references": {}
|
|
64
|
+
},
|
|
65
|
+
"required": false,
|
|
66
|
+
"optional": false,
|
|
67
|
+
"docs": {
|
|
68
|
+
"tags": [],
|
|
69
|
+
"text": "Define se o usu\u00E1rio pode remover o arquivo que est\u00E1 sendo apresentado."
|
|
70
|
+
},
|
|
71
|
+
"attribute": "can-remove",
|
|
72
|
+
"reflect": false,
|
|
73
|
+
"defaultValue": "true"
|
|
136
74
|
},
|
|
137
|
-
"
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
"
|
|
141
|
-
|
|
75
|
+
"fileName": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"mutable": false,
|
|
78
|
+
"complexType": {
|
|
79
|
+
"original": "string",
|
|
80
|
+
"resolved": "string",
|
|
81
|
+
"references": {}
|
|
82
|
+
},
|
|
83
|
+
"required": false,
|
|
84
|
+
"optional": false,
|
|
85
|
+
"docs": {
|
|
86
|
+
"tags": [],
|
|
87
|
+
"text": "Define o nome do arquivo, com extens\u00E3o."
|
|
88
|
+
},
|
|
89
|
+
"attribute": "file-name",
|
|
90
|
+
"reflect": false
|
|
142
91
|
},
|
|
143
|
-
"
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
92
|
+
"iconName": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"mutable": false,
|
|
95
|
+
"complexType": {
|
|
96
|
+
"original": "string",
|
|
97
|
+
"resolved": "string",
|
|
98
|
+
"references": {}
|
|
99
|
+
},
|
|
100
|
+
"required": false,
|
|
101
|
+
"optional": false,
|
|
102
|
+
"docs": {
|
|
103
|
+
"tags": [],
|
|
104
|
+
"text": "Define qual \u00EDcone que representa o arquivo."
|
|
105
|
+
},
|
|
106
|
+
"attribute": "icon-name",
|
|
107
|
+
"reflect": false
|
|
157
108
|
},
|
|
158
|
-
"
|
|
159
|
-
"
|
|
160
|
-
"
|
|
161
|
-
"
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
109
|
+
"fileSize": {
|
|
110
|
+
"type": "number",
|
|
111
|
+
"mutable": false,
|
|
112
|
+
"complexType": {
|
|
113
|
+
"original": "number",
|
|
114
|
+
"resolved": "number",
|
|
115
|
+
"references": {}
|
|
116
|
+
},
|
|
117
|
+
"required": false,
|
|
118
|
+
"optional": false,
|
|
119
|
+
"docs": {
|
|
120
|
+
"tags": [],
|
|
121
|
+
"text": "Tamanho do arquivo (em bytes)."
|
|
122
|
+
},
|
|
123
|
+
"attribute": "file-size",
|
|
124
|
+
"reflect": false
|
|
172
125
|
},
|
|
173
|
-
"
|
|
174
|
-
"
|
|
175
|
-
"
|
|
176
|
-
"
|
|
126
|
+
"progress": {
|
|
127
|
+
"type": "number",
|
|
128
|
+
"mutable": false,
|
|
129
|
+
"complexType": {
|
|
130
|
+
"original": "number",
|
|
131
|
+
"resolved": "number",
|
|
132
|
+
"references": {}
|
|
133
|
+
},
|
|
134
|
+
"required": false,
|
|
135
|
+
"optional": false,
|
|
136
|
+
"docs": {
|
|
137
|
+
"tags": [],
|
|
138
|
+
"text": "Percentual de carregamento do arquivo para o servidor."
|
|
139
|
+
},
|
|
140
|
+
"attribute": "progress",
|
|
141
|
+
"reflect": false,
|
|
142
|
+
"defaultValue": "100"
|
|
177
143
|
}
|
|
178
|
-
}
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
static get events() {
|
|
147
|
+
return [{
|
|
148
|
+
"method": "ezClick",
|
|
149
|
+
"name": "ezClick",
|
|
150
|
+
"bubbles": true,
|
|
151
|
+
"cancelable": true,
|
|
152
|
+
"composed": true,
|
|
153
|
+
"docs": {
|
|
154
|
+
"tags": [],
|
|
155
|
+
"text": "Emitido ao clicar no ez-file-input (exceto no bot\u00E3o de remover)."
|
|
156
|
+
},
|
|
157
|
+
"complexType": {
|
|
158
|
+
"original": "string",
|
|
159
|
+
"resolved": "string",
|
|
160
|
+
"references": {}
|
|
161
|
+
}
|
|
162
|
+
}, {
|
|
163
|
+
"method": "ezRemove",
|
|
164
|
+
"name": "ezRemove",
|
|
165
|
+
"bubbles": true,
|
|
166
|
+
"cancelable": true,
|
|
167
|
+
"composed": true,
|
|
168
|
+
"docs": {
|
|
169
|
+
"tags": [],
|
|
170
|
+
"text": "Emitido ao clicar no bot\u00E3o de remover."
|
|
171
|
+
},
|
|
172
|
+
"complexType": {
|
|
173
|
+
"original": "string",
|
|
174
|
+
"resolved": "string",
|
|
175
|
+
"references": {}
|
|
176
|
+
}
|
|
177
|
+
}];
|
|
178
|
+
}
|
|
179
179
|
static get elementRef() { return "_element"; }
|
|
180
|
-
static get watchers() {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
180
|
+
static get watchers() {
|
|
181
|
+
return [{
|
|
182
|
+
"propName": "progress",
|
|
183
|
+
"methodName": "observeProgress"
|
|
184
|
+
}];
|
|
185
|
+
}
|
|
184
186
|
}
|
|
185
187
|
const FILE_TYPE_ICONS = {
|
|
186
188
|
".exe": "exe",
|