@sankhyalabs/ezui 1.1.137 → 1.1.140
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-form.cjs.entry.js +3 -14
- package/dist/cjs/ez-grid.cjs.entry.js +10 -5
- package/dist/cjs/ez-loading-bar.cjs.entry.js +28 -0
- package/dist/cjs/ez-text-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-view-stack.cjs.entry.js +71 -0
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/ez-form/DataBinder.js +3 -14
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +7 -2
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +3 -3
- package/dist/collection/components/ez-loading-bar/ez-loading-bar.css +85 -0
- package/dist/collection/components/ez-loading-bar/ez-loading-bar.js +63 -0
- package/dist/collection/components/ez-text-input/ez-text-input.js +1 -1
- package/dist/collection/components/ez-view-stack/ez-view-stack.css +9 -0
- package/dist/collection/components/ez-view-stack/ez-view-stack.js +87 -0
- package/dist/custom-elements/index.d.ts +12 -0
- package/dist/custom-elements/index.js +107 -21
- package/dist/esm/ez-form.entry.js +3 -14
- package/dist/esm/ez-grid.entry.js +10 -5
- package/dist/esm/ez-loading-bar.entry.js +24 -0
- package/dist/esm/ez-text-input.entry.js +1 -1
- package/dist/esm/ez-view-stack.entry.js +67 -0
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-347b145b.entry.js +1 -0
- package/dist/ezui/p-517d7759.entry.js +1 -0
- package/dist/ezui/p-6287fc90.entry.js +1 -0
- package/dist/ezui/p-9b82c2fe.entry.js +1 -0
- package/dist/ezui/{p-51cdfa9e.entry.js → p-9ce93746.entry.js} +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +2 -0
- package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +2 -2
- package/dist/types/components/ez-loading-bar/ez-loading-bar.d.ts +6 -0
- package/dist/types/components/ez-view-stack/ez-view-stack.d.ts +16 -0
- package/dist/types/components.d.ts +32 -0
- package/package.json +1 -1
- package/react/components.d.ts +2 -0
- package/react/components.js +2 -0
- package/react/components.js.map +1 -1
- package/dist/ezui/p-30e3793f.entry.js +0 -1
- package/dist/ezui/p-659df655.entry.js +0 -1
|
@@ -657,12 +657,7 @@ class DataBinder {
|
|
|
657
657
|
const oldValue = field["value"];
|
|
658
658
|
const newValue = this._dataUnit.getFieldValue(fieldName);
|
|
659
659
|
if (oldValue != newValue) {
|
|
660
|
-
|
|
661
|
-
field.removeAttribute("value");
|
|
662
|
-
}
|
|
663
|
-
else {
|
|
664
|
-
field["value"] = newValue;
|
|
665
|
-
}
|
|
660
|
+
field["value"] = newValue;
|
|
666
661
|
}
|
|
667
662
|
}
|
|
668
663
|
updateBind(fieldName, field) {
|
|
@@ -670,13 +665,7 @@ class DataBinder {
|
|
|
670
665
|
if (oldBind) {
|
|
671
666
|
oldBind.destroy();
|
|
672
667
|
}
|
|
673
|
-
|
|
674
|
-
if (value === undefined) {
|
|
675
|
-
field.removeAttribute("value");
|
|
676
|
-
}
|
|
677
|
-
else {
|
|
678
|
-
field["value"] = value;
|
|
679
|
-
}
|
|
668
|
+
field["value"] = this._dataUnit.getFieldValue(fieldName);
|
|
680
669
|
this._fields.set(fieldName, Bind.create(fieldName, field, (fieldName, waitingChange) => this.changeStarted(fieldName, waitingChange), (fieldName, newValue) => this.setFieldValue(fieldName, newValue)));
|
|
681
670
|
this.bindSearchOptionsLoader(fieldName, field);
|
|
682
671
|
this.applyEzUploadContext(fieldName, field);
|
|
@@ -694,7 +683,7 @@ class DataBinder {
|
|
|
694
683
|
this._dataUnit.setFieldValue(fieldName, newValue);
|
|
695
684
|
}
|
|
696
685
|
bindSearchOptionsLoader(fieldName, field) {
|
|
697
|
-
if (field.nodeName === "EZ-SEARCH" && field["optionLoader"]
|
|
686
|
+
if (field.nodeName === "EZ-SEARCH" && field["optionLoader"] == undefined) {
|
|
698
687
|
const loader = core.ApplicationContext.getContextValue("__EZUI__SEARCH__OPTION__LOADER__");
|
|
699
688
|
if (loader) {
|
|
700
689
|
field["optionLoader"] = (arg) => {
|
|
@@ -110037,7 +110037,7 @@ class DataSource {
|
|
|
110037
110037
|
}
|
|
110038
110038
|
}
|
|
110039
110039
|
else {
|
|
110040
|
-
this.loadData({ limit: params.api.paginationGetPageSize(), offset: params.request.startRow, quickFilter: this.
|
|
110040
|
+
this.loadData({ limit: params.api.paginationGetPageSize(), offset: params.request.startRow, quickFilter: this._quickFilter })
|
|
110041
110041
|
.then(data => params.success(data))
|
|
110042
110042
|
.catch(() => params.fail());
|
|
110043
110043
|
}
|
|
@@ -110056,14 +110056,16 @@ class DataSource {
|
|
|
110056
110056
|
}
|
|
110057
110057
|
});
|
|
110058
110058
|
}
|
|
110059
|
-
setQuickFilter(term) {
|
|
110060
|
-
this.
|
|
110059
|
+
setQuickFilter(term, fields) {
|
|
110060
|
+
this._quickFilter = { term, fields };
|
|
110061
110061
|
}
|
|
110062
110062
|
}
|
|
110063
110063
|
|
|
110064
110064
|
class AgGridController {
|
|
110065
110065
|
constructor(enterprise) {
|
|
110066
110066
|
this.DEFAULT_ROW_HEIGHT = 25;
|
|
110067
|
+
this.CHECK_BOX_COL_ID = "checkBoxColumn";
|
|
110068
|
+
this.RECORD_ARCHIVE_COL_ID = "__RECORD_ARCHIVE__";
|
|
110067
110069
|
this._menuItems = [];
|
|
110068
110070
|
this._idAttribName = "__record__id__";
|
|
110069
110071
|
this._isFirstRecordOfPage = true;
|
|
@@ -110232,7 +110234,7 @@ class AgGridController {
|
|
|
110232
110234
|
const colDefs = [];
|
|
110233
110235
|
if (showCheckSelection) {
|
|
110234
110236
|
colDefs.push({
|
|
110235
|
-
colId:
|
|
110237
|
+
colId: this.CHECK_BOX_COL_ID,
|
|
110236
110238
|
headerName: "",
|
|
110237
110239
|
checkboxSelection: true,
|
|
110238
110240
|
headerCheckboxSelection: false,
|
|
@@ -110323,7 +110325,10 @@ class AgGridController {
|
|
|
110323
110325
|
this._gridOptions.api.paginationGoToPage(page);
|
|
110324
110326
|
}
|
|
110325
110327
|
quickFilter(term) {
|
|
110326
|
-
this._dataSource.setQuickFilter(term
|
|
110328
|
+
this._dataSource.setQuickFilter(term, this._gridOptions.columnApi
|
|
110329
|
+
.getAllColumns()
|
|
110330
|
+
.filter(col => col.isVisible() && ![this.CHECK_BOX_COL_ID, this.RECORD_ARCHIVE_COL_ID].includes(col.getColId()))
|
|
110331
|
+
.map(col => col.getColId()));
|
|
110327
110332
|
this.goToPage(0);
|
|
110328
110333
|
this._gridOptions.api.refreshServerSideStore({ purge: true });
|
|
110329
110334
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-c15a9551.js');
|
|
6
|
+
|
|
7
|
+
const ezLoadingBarCss = ":host{position:fixed;top:0px;width:100%}.loading-bar{width:100%;margin:0 auto;position:absolute;background-color:var(--color--primary-300, #e2f4ef);height:5px}.loading-bar:before{content:'';position:absolute}.loading-bar__container{position:absolute;top:0;right:100%;bottom:0;left:0;background-color:var(--color--primary, #008561);width:0;animation:loading 2s linear infinite}@keyframes loading{0%{left:0%;right:100%;width:0%}25%{left:0%;right:75%;width:25%}50%{left:0%;right:50%;width:90%}70%{right:0%;left:75%;width:25%}100%{left:100%;right:0%;width:0%}}@-webkit-keyframes loading{0%{left:0%;right:100%;width:0%}25%{left:0%;right:75%;width:25%}50%{left:0%;right:50%;width:90%}70%{right:0%;left:75%;width:25%}100%{left:100%;right:0%;width:0%}}";
|
|
8
|
+
|
|
9
|
+
let EzLoadingBar = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
this._showLoading = true;
|
|
13
|
+
}
|
|
14
|
+
hide() {
|
|
15
|
+
this._showLoading = false;
|
|
16
|
+
return Promise.resolve();
|
|
17
|
+
}
|
|
18
|
+
show() {
|
|
19
|
+
this._showLoading = true;
|
|
20
|
+
return Promise.resolve();
|
|
21
|
+
}
|
|
22
|
+
render() {
|
|
23
|
+
return (index.h(index.Host, null, this._showLoading && index.h("div", { class: "loading-bar" }, index.h("div", { class: "loading-bar__container" }))));
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
EzLoadingBar.style = ezLoadingBarCss;
|
|
27
|
+
|
|
28
|
+
exports.ez_loading_bar = EzLoadingBar;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-c15a9551.js');
|
|
6
|
+
|
|
7
|
+
const ezViewStackCss = ":host{width:100%;height:100%}.ez-view-stack__container{width:100%;height:100%}";
|
|
8
|
+
|
|
9
|
+
let EzViewStack = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Exibe a aba desejada de acordo com o index passado na tela fazendo com a ativa atual seja removida ou oculta dependendo da hidePolicy.
|
|
15
|
+
*/
|
|
16
|
+
async show(index) {
|
|
17
|
+
if (index !== this._focusedIndex && 0 <= index && index < this._totalStackItems) {
|
|
18
|
+
this.policyHideRemove();
|
|
19
|
+
this.policyShowAppend(index);
|
|
20
|
+
this._focusedIndex = index;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
policyHideRemove() {
|
|
24
|
+
let element = this._hostElem.querySelector(`#el_${this._focusedIndex}`);
|
|
25
|
+
this.checkElementVisibility(element);
|
|
26
|
+
}
|
|
27
|
+
policyShowAppend(index) {
|
|
28
|
+
let selectedElement = this._hostElem.querySelector(`#el_${index}`);
|
|
29
|
+
if (selectedElement) {
|
|
30
|
+
selectedElement.removeAttribute("style");
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
this._hostElem.append(this._elemList[index]);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
checkElementVisibility(element) {
|
|
37
|
+
if (element.getAttribute("hidePolicy") === "hide" || !element.getAttribute("hidePolicy")) {
|
|
38
|
+
element.setAttribute("style", "display: none");
|
|
39
|
+
}
|
|
40
|
+
else if (element.getAttribute("hidePolicy") === "remove") {
|
|
41
|
+
element.remove();
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
componentWillRender() {
|
|
45
|
+
if (!this._elemList) {
|
|
46
|
+
this._elemList = [];
|
|
47
|
+
this._focusedIndex = 0;
|
|
48
|
+
this._totalStackItems = 0;
|
|
49
|
+
this._hostElem.classList.add("ez-view-stack__container");
|
|
50
|
+
this._hostElem.querySelectorAll("stack-item").forEach((element, index) => {
|
|
51
|
+
element.setAttribute("id", `el_${index}`);
|
|
52
|
+
if (index !== 0) {
|
|
53
|
+
this.checkElementVisibility(element);
|
|
54
|
+
}
|
|
55
|
+
this._totalStackItems++;
|
|
56
|
+
this._elemList.push(element);
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
disconectCallback() {
|
|
61
|
+
this._hostElem = null;
|
|
62
|
+
this._elemList = null;
|
|
63
|
+
}
|
|
64
|
+
render() {
|
|
65
|
+
return (index.h(index.Host, null));
|
|
66
|
+
}
|
|
67
|
+
get _hostElem() { return index.getElement(this); }
|
|
68
|
+
};
|
|
69
|
+
EzViewStack.style = ezViewStackCss;
|
|
70
|
+
|
|
71
|
+
exports.ez_view_stack = EzViewStack;
|
package/dist/cjs/ezui.cjs.js
CHANGED
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["ez-filter-input.cjs",[[1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"loading":[516],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-application.cjs",[[0,"ez-application"]]],["ez-popover.cjs",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["ez-modal.cjs",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["ez-collapsible-box.cjs",[[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"stretchTitle":[516,"stretch-title"],"showHide":[64]}]]],["ez-list.cjs",[[1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32],"clearHistory":[64],"scrollToTop":[64],"setSelection":[64],"getSelection":[64],"getList":[64]}]]],["ez-button.cjs",[[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-grid.cjs",[[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"pageSize":[2,"page-size"],"serverUrl":[1,"server-url"],"dataUnit":[16],"_navigationHasPrevious":[32],"_navigationHasNext":[32],"_navigationFirstRow":[32],"_navigationLastRow":[32],"_navigationTotalRows":[32],"_popUpGridConfig":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64],"refresh":[64],"quickFilter":[64],"nextPage":[64],"previousPage":[64],"hasNextPage":[64],"hasPreviousPage":[64],"isLastOfPage":[64],"isFirstOfPage":[64],"nextRecord":[64],"previousRecord":[64],"hasNextRecord":[64],"hasPreviousRecord":[64],"openGridConfig":[64]}]]],["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-chip.cjs",[[1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-popup.cjs",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"ezTitle":[1,"ez-title"]}]]],["ez-text-input.cjs",[[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"mode":[513],"slaveMode":[516,"slave-mode"],"setFocus":[64],"setBlur":[64]}]]],["grid-config.cjs",[[2,"grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040],"config":[1040]}]]],["ez-search.cjs",[[1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["
|
|
18
|
+
return index.bootstrapLazy([["ez-filter-input.cjs",[[1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"loading":[516],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-application.cjs",[[0,"ez-application"]]],["ez-loading-bar.cjs",[[1,"ez-loading-bar",{"_showLoading":[32],"hide":[64],"show":[64]}]]],["ez-popover.cjs",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["ez-view-stack.cjs",[[0,"ez-view-stack",{"show":[64]}]]],["ez-modal.cjs",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["select-box.cjs",[[1,"select-box",{"selectedOption":[1,"selected-option"]}]]],["ez-collapsible-box.cjs",[[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"stretchTitle":[516,"stretch-title"],"showHide":[64]}]]],["ez-list.cjs",[[1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32],"clearHistory":[64],"scrollToTop":[64],"setSelection":[64],"getSelection":[64],"getList":[64]}]]],["ez-button.cjs",[[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-grid.cjs",[[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"pageSize":[2,"page-size"],"serverUrl":[1,"server-url"],"dataUnit":[16],"_navigationHasPrevious":[32],"_navigationHasNext":[32],"_navigationFirstRow":[32],"_navigationLastRow":[32],"_navigationTotalRows":[32],"_popUpGridConfig":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64],"refresh":[64],"quickFilter":[64],"nextPage":[64],"previousPage":[64],"hasNextPage":[64],"hasPreviousPage":[64],"isLastOfPage":[64],"isFirstOfPage":[64],"nextRecord":[64],"previousRecord":[64],"hasNextRecord":[64],"hasPreviousRecord":[64],"openGridConfig":[64]}]]],["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-chip.cjs",[[1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-popup.cjs",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"ezTitle":[1,"ez-title"]}]]],["ez-text-input.cjs",[[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"mode":[513],"slaveMode":[516,"slave-mode"],"setFocus":[64],"setBlur":[64]}]]],["grid-config.cjs",[[2,"grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040],"config":[1040]}]]],["ez-search.cjs",[[1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-calendar.cjs",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"hide":[64]}]]],["ez-date-input.cjs",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-date-time-input.cjs",[[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-time-input.cjs",[[1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-number-input.cjs",[[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-text-area.cjs",[[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-upload.cjs",[[1,"ez-upload",{"label":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040],"addFiles":[64],"setFocus":[64],"setBlur":[64]}]]],["ez-check.cjs",[[1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"mode":[513],"getMode":[64],"setFocus":[64]}]]],["ez-tabselector.cjs",[[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1]}]]],["ez-icon.cjs",[[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]]],["ez-combo-box.cjs",[[1,"ez-combo-box",{"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"searchMode":[4,"search-mode"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressSearch":[4,"suppress-search"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"canShowError":[516,"can-show-error"],"mode":[513],"_preSelection":[32],"_visibleOptions":[32],"setFocus":[64],"setBlur":[64]}]]],["ez-form.cjs",[[0,"ez-form",{"dataUnit":[1040],"config":[16],"submit":[64],"cancel":[64],"validate":[64]}]]],["test-du.cjs",[[0,"test-du",{"isDirty":[32]}]]]], options);
|
|
19
19
|
});
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["ez-filter-input.cjs",[[1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"loading":[516],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-application.cjs",[[0,"ez-application"]]],["ez-popover.cjs",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["ez-modal.cjs",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["ez-collapsible-box.cjs",[[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"stretchTitle":[516,"stretch-title"],"showHide":[64]}]]],["ez-list.cjs",[[1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32],"clearHistory":[64],"scrollToTop":[64],"setSelection":[64],"getSelection":[64],"getList":[64]}]]],["ez-button.cjs",[[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-grid.cjs",[[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"pageSize":[2,"page-size"],"serverUrl":[1,"server-url"],"dataUnit":[16],"_navigationHasPrevious":[32],"_navigationHasNext":[32],"_navigationFirstRow":[32],"_navigationLastRow":[32],"_navigationTotalRows":[32],"_popUpGridConfig":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64],"refresh":[64],"quickFilter":[64],"nextPage":[64],"previousPage":[64],"hasNextPage":[64],"hasPreviousPage":[64],"isLastOfPage":[64],"isFirstOfPage":[64],"nextRecord":[64],"previousRecord":[64],"hasNextRecord":[64],"hasPreviousRecord":[64],"openGridConfig":[64]}]]],["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-chip.cjs",[[1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-popup.cjs",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"ezTitle":[1,"ez-title"]}]]],["ez-text-input.cjs",[[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"mode":[513],"slaveMode":[516,"slave-mode"],"setFocus":[64],"setBlur":[64]}]]],["grid-config.cjs",[[2,"grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040],"config":[1040]}]]],["ez-search.cjs",[[1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["
|
|
17
|
+
return index.bootstrapLazy([["ez-filter-input.cjs",[[1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"loading":[516],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-application.cjs",[[0,"ez-application"]]],["ez-loading-bar.cjs",[[1,"ez-loading-bar",{"_showLoading":[32],"hide":[64],"show":[64]}]]],["ez-popover.cjs",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["ez-view-stack.cjs",[[0,"ez-view-stack",{"show":[64]}]]],["ez-modal.cjs",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["select-box.cjs",[[1,"select-box",{"selectedOption":[1,"selected-option"]}]]],["ez-collapsible-box.cjs",[[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"stretchTitle":[516,"stretch-title"],"showHide":[64]}]]],["ez-list.cjs",[[1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32],"clearHistory":[64],"scrollToTop":[64],"setSelection":[64],"getSelection":[64],"getList":[64]}]]],["ez-button.cjs",[[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-grid.cjs",[[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"pageSize":[2,"page-size"],"serverUrl":[1,"server-url"],"dataUnit":[16],"_navigationHasPrevious":[32],"_navigationHasNext":[32],"_navigationFirstRow":[32],"_navigationLastRow":[32],"_navigationTotalRows":[32],"_popUpGridConfig":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64],"refresh":[64],"quickFilter":[64],"nextPage":[64],"previousPage":[64],"hasNextPage":[64],"hasPreviousPage":[64],"isLastOfPage":[64],"isFirstOfPage":[64],"nextRecord":[64],"previousRecord":[64],"hasNextRecord":[64],"hasPreviousRecord":[64],"openGridConfig":[64]}]]],["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-chip.cjs",[[1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-popup.cjs",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"ezTitle":[1,"ez-title"]}]]],["ez-text-input.cjs",[[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"mode":[513],"slaveMode":[516,"slave-mode"],"setFocus":[64],"setBlur":[64]}]]],["grid-config.cjs",[[2,"grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040],"config":[1040]}]]],["ez-search.cjs",[[1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-calendar.cjs",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"hide":[64]}]]],["ez-date-input.cjs",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-date-time-input.cjs",[[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-time-input.cjs",[[1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-number-input.cjs",[[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-text-area.cjs",[[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-upload.cjs",[[1,"ez-upload",{"label":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040],"addFiles":[64],"setFocus":[64],"setBlur":[64]}]]],["ez-check.cjs",[[1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"mode":[513],"getMode":[64],"setFocus":[64]}]]],["ez-tabselector.cjs",[[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1]}]]],["ez-icon.cjs",[[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]]],["ez-combo-box.cjs",[[1,"ez-combo-box",{"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"searchMode":[4,"search-mode"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressSearch":[4,"suppress-search"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"canShowError":[516,"can-show-error"],"mode":[513],"_preSelection":[32],"_visibleOptions":[32],"setFocus":[64],"setBlur":[64]}]]],["ez-form.cjs",[[0,"ez-form",{"dataUnit":[1040],"config":[16],"submit":[64],"cancel":[64],"validate":[64]}]]],["test-du.cjs",[[0,"test-du",{"isDirty":[32]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"./components/ez-grid/subcomponents/gridconfig/grid-config.js",
|
|
20
20
|
"./components/ez-grid/subcomponents/select-box/select-box.js",
|
|
21
21
|
"./components/ez-icon/ez-icon.js",
|
|
22
|
+
"./components/ez-loading-bar/ez-loading-bar.js",
|
|
22
23
|
"./components/ez-modal/ez-modal.js",
|
|
23
24
|
"./components/ez-number-input/ez-number-input.js",
|
|
24
25
|
"./components/ez-popover/ez-popover.js",
|
|
@@ -28,6 +29,7 @@
|
|
|
28
29
|
"./components/ez-text-input/ez-text-input.js",
|
|
29
30
|
"./components/ez-time-input/ez-time-input.js",
|
|
30
31
|
"./components/ez-toast/ez-toast.js",
|
|
32
|
+
"./components/ez-view-stack/ez-view-stack.js",
|
|
31
33
|
"./components/test-du/test-du.js"
|
|
32
34
|
],
|
|
33
35
|
"compiler": {
|
|
@@ -39,12 +39,7 @@ export default class DataBinder {
|
|
|
39
39
|
const oldValue = field["value"];
|
|
40
40
|
const newValue = this._dataUnit.getFieldValue(fieldName);
|
|
41
41
|
if (oldValue != newValue) {
|
|
42
|
-
|
|
43
|
-
field.removeAttribute("value");
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
field["value"] = newValue;
|
|
47
|
-
}
|
|
42
|
+
field["value"] = newValue;
|
|
48
43
|
}
|
|
49
44
|
}
|
|
50
45
|
updateBind(fieldName, field) {
|
|
@@ -52,13 +47,7 @@ export default class DataBinder {
|
|
|
52
47
|
if (oldBind) {
|
|
53
48
|
oldBind.destroy();
|
|
54
49
|
}
|
|
55
|
-
|
|
56
|
-
if (value === undefined) {
|
|
57
|
-
field.removeAttribute("value");
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
field["value"] = value;
|
|
61
|
-
}
|
|
50
|
+
field["value"] = this._dataUnit.getFieldValue(fieldName);
|
|
62
51
|
this._fields.set(fieldName, Bind.create(fieldName, field, (fieldName, waitingChange) => this.changeStarted(fieldName, waitingChange), (fieldName, newValue) => this.setFieldValue(fieldName, newValue)));
|
|
63
52
|
this.bindSearchOptionsLoader(fieldName, field);
|
|
64
53
|
this.applyEzUploadContext(fieldName, field);
|
|
@@ -76,7 +65,7 @@ export default class DataBinder {
|
|
|
76
65
|
this._dataUnit.setFieldValue(fieldName, newValue);
|
|
77
66
|
}
|
|
78
67
|
bindSearchOptionsLoader(fieldName, field) {
|
|
79
|
-
if (field.nodeName === "EZ-SEARCH" && field["optionLoader"]
|
|
68
|
+
if (field.nodeName === "EZ-SEARCH" && field["optionLoader"] == undefined) {
|
|
80
69
|
const loader = ApplicationContext.getContextValue("__EZUI__SEARCH__OPTION__LOADER__");
|
|
81
70
|
if (loader) {
|
|
82
71
|
field["optionLoader"] = (arg) => {
|
|
@@ -9,6 +9,8 @@ import { NumberUtils } from "@sankhyalabs/core";
|
|
|
9
9
|
export default class AgGridController {
|
|
10
10
|
constructor(enterprise) {
|
|
11
11
|
this.DEFAULT_ROW_HEIGHT = 25;
|
|
12
|
+
this.CHECK_BOX_COL_ID = "checkBoxColumn";
|
|
13
|
+
this.RECORD_ARCHIVE_COL_ID = "__RECORD_ARCHIVE__";
|
|
12
14
|
this._menuItems = [];
|
|
13
15
|
this._idAttribName = "__record__id__";
|
|
14
16
|
this._isFirstRecordOfPage = true;
|
|
@@ -177,7 +179,7 @@ export default class AgGridController {
|
|
|
177
179
|
const colDefs = [];
|
|
178
180
|
if (showCheckSelection) {
|
|
179
181
|
colDefs.push({
|
|
180
|
-
colId:
|
|
182
|
+
colId: this.CHECK_BOX_COL_ID,
|
|
181
183
|
headerName: "",
|
|
182
184
|
checkboxSelection: true,
|
|
183
185
|
headerCheckboxSelection: false,
|
|
@@ -268,7 +270,10 @@ export default class AgGridController {
|
|
|
268
270
|
this._gridOptions.api.paginationGoToPage(page);
|
|
269
271
|
}
|
|
270
272
|
quickFilter(term) {
|
|
271
|
-
this._dataSource.setQuickFilter(term
|
|
273
|
+
this._dataSource.setQuickFilter(term, this._gridOptions.columnApi
|
|
274
|
+
.getAllColumns()
|
|
275
|
+
.filter(col => col.isVisible() && ![this.CHECK_BOX_COL_ID, this.RECORD_ARCHIVE_COL_ID].includes(col.getColId()))
|
|
276
|
+
.map(col => col.getColId()));
|
|
272
277
|
this.goToPage(0);
|
|
273
278
|
this._gridOptions.api.refreshServerSideStore({ purge: true });
|
|
274
279
|
}
|
|
@@ -19,7 +19,7 @@ export default class DataSource {
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
else {
|
|
22
|
-
this.loadData({ limit: params.api.paginationGetPageSize(), offset: params.request.startRow, quickFilter: this.
|
|
22
|
+
this.loadData({ limit: params.api.paginationGetPageSize(), offset: params.request.startRow, quickFilter: this._quickFilter })
|
|
23
23
|
.then(data => params.success(data))
|
|
24
24
|
.catch(() => params.fail());
|
|
25
25
|
}
|
|
@@ -38,7 +38,7 @@ export default class DataSource {
|
|
|
38
38
|
}
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
-
setQuickFilter(term) {
|
|
42
|
-
this.
|
|
41
|
+
setQuickFilter(term, fields) {
|
|
42
|
+
this._quickFilter = { term, fields };
|
|
43
43
|
}
|
|
44
44
|
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
position: fixed;
|
|
3
|
+
top: 0px;
|
|
4
|
+
width: 100%;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.loading-bar {
|
|
8
|
+
width:100%;
|
|
9
|
+
margin:0 auto;
|
|
10
|
+
position: absolute;
|
|
11
|
+
background-color: var(--color--primary-300, #e2f4ef);
|
|
12
|
+
height: 5px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.loading-bar:before {
|
|
16
|
+
content:'';
|
|
17
|
+
position:absolute;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.loading-bar__container {
|
|
21
|
+
position:absolute;
|
|
22
|
+
top:0;
|
|
23
|
+
right:100%;
|
|
24
|
+
bottom:0;
|
|
25
|
+
left:0;
|
|
26
|
+
background-color: var(--color--primary, #008561);
|
|
27
|
+
width:0;
|
|
28
|
+
animation: loading 2s linear infinite;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@keyframes loading {
|
|
32
|
+
0% {
|
|
33
|
+
left:0%;
|
|
34
|
+
right:100%;
|
|
35
|
+
width:0%;
|
|
36
|
+
}
|
|
37
|
+
25% {
|
|
38
|
+
left:0%;
|
|
39
|
+
right:75%;
|
|
40
|
+
width:25%;
|
|
41
|
+
}
|
|
42
|
+
50% {
|
|
43
|
+
left:0%;
|
|
44
|
+
right:50%;
|
|
45
|
+
width:90%;
|
|
46
|
+
}
|
|
47
|
+
70% {
|
|
48
|
+
right:0%;
|
|
49
|
+
left:75%;
|
|
50
|
+
width:25%;
|
|
51
|
+
}
|
|
52
|
+
100% {
|
|
53
|
+
left:100%;
|
|
54
|
+
right:0%;
|
|
55
|
+
width:0%;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@-webkit-keyframes loading {
|
|
60
|
+
0% {
|
|
61
|
+
left:0%;
|
|
62
|
+
right:100%;
|
|
63
|
+
width:0%;
|
|
64
|
+
}
|
|
65
|
+
25% {
|
|
66
|
+
left:0%;
|
|
67
|
+
right:75%;
|
|
68
|
+
width:25%;
|
|
69
|
+
}
|
|
70
|
+
50% {
|
|
71
|
+
left:0%;
|
|
72
|
+
right:50%;
|
|
73
|
+
width:90%;
|
|
74
|
+
}
|
|
75
|
+
70% {
|
|
76
|
+
right:0%;
|
|
77
|
+
left:75%;
|
|
78
|
+
width:25%;
|
|
79
|
+
}
|
|
80
|
+
100% {
|
|
81
|
+
left:100%;
|
|
82
|
+
right:0%;
|
|
83
|
+
width:0%;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Component, h, Host, State, Method } from '@stencil/core';
|
|
2
|
+
export class EzLoadingBar {
|
|
3
|
+
constructor() {
|
|
4
|
+
this._showLoading = true;
|
|
5
|
+
}
|
|
6
|
+
hide() {
|
|
7
|
+
this._showLoading = false;
|
|
8
|
+
return Promise.resolve();
|
|
9
|
+
}
|
|
10
|
+
show() {
|
|
11
|
+
this._showLoading = true;
|
|
12
|
+
return Promise.resolve();
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
return (h(Host, null, this._showLoading && h("div", { class: "loading-bar" },
|
|
16
|
+
h("div", { class: "loading-bar__container" }))));
|
|
17
|
+
}
|
|
18
|
+
static get is() { return "ez-loading-bar"; }
|
|
19
|
+
static get encapsulation() { return "shadow"; }
|
|
20
|
+
static get originalStyleUrls() { return {
|
|
21
|
+
"$": ["ez-loading-bar.css"]
|
|
22
|
+
}; }
|
|
23
|
+
static get styleUrls() { return {
|
|
24
|
+
"$": ["ez-loading-bar.css"]
|
|
25
|
+
}; }
|
|
26
|
+
static get states() { return {
|
|
27
|
+
"_showLoading": {}
|
|
28
|
+
}; }
|
|
29
|
+
static get methods() { return {
|
|
30
|
+
"hide": {
|
|
31
|
+
"complexType": {
|
|
32
|
+
"signature": "() => Promise<void>",
|
|
33
|
+
"parameters": [],
|
|
34
|
+
"references": {
|
|
35
|
+
"Promise": {
|
|
36
|
+
"location": "global"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"return": "Promise<void>"
|
|
40
|
+
},
|
|
41
|
+
"docs": {
|
|
42
|
+
"text": "",
|
|
43
|
+
"tags": []
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"show": {
|
|
47
|
+
"complexType": {
|
|
48
|
+
"signature": "() => Promise<void>",
|
|
49
|
+
"parameters": [],
|
|
50
|
+
"references": {
|
|
51
|
+
"Promise": {
|
|
52
|
+
"location": "global"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"return": "Promise<void>"
|
|
56
|
+
},
|
|
57
|
+
"docs": {
|
|
58
|
+
"text": "",
|
|
59
|
+
"tags": []
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}; }
|
|
63
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { Component, h, Host, Element, Method } from '@stencil/core';
|
|
2
|
+
export class EzViewStack {
|
|
3
|
+
/**
|
|
4
|
+
* Exibe a aba desejada de acordo com o index passado na tela fazendo com a ativa atual seja removida ou oculta dependendo da hidePolicy.
|
|
5
|
+
*/
|
|
6
|
+
async show(index) {
|
|
7
|
+
if (index !== this._focusedIndex && 0 <= index && index < this._totalStackItems) {
|
|
8
|
+
this.policyHideRemove();
|
|
9
|
+
this.policyShowAppend(index);
|
|
10
|
+
this._focusedIndex = index;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
policyHideRemove() {
|
|
14
|
+
let element = this._hostElem.querySelector(`#el_${this._focusedIndex}`);
|
|
15
|
+
this.checkElementVisibility(element);
|
|
16
|
+
}
|
|
17
|
+
policyShowAppend(index) {
|
|
18
|
+
let selectedElement = this._hostElem.querySelector(`#el_${index}`);
|
|
19
|
+
if (selectedElement) {
|
|
20
|
+
selectedElement.removeAttribute("style");
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
this._hostElem.append(this._elemList[index]);
|
|
24
|
+
}
|
|
25
|
+
;
|
|
26
|
+
}
|
|
27
|
+
checkElementVisibility(element) {
|
|
28
|
+
if (element.getAttribute("hidePolicy") === "hide" || !element.getAttribute("hidePolicy")) {
|
|
29
|
+
element.setAttribute("style", "display: none");
|
|
30
|
+
}
|
|
31
|
+
else if (element.getAttribute("hidePolicy") === "remove") {
|
|
32
|
+
element.remove();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
componentWillRender() {
|
|
36
|
+
if (!this._elemList) {
|
|
37
|
+
this._elemList = [];
|
|
38
|
+
this._focusedIndex = 0;
|
|
39
|
+
this._totalStackItems = 0;
|
|
40
|
+
this._hostElem.classList.add("ez-view-stack__container");
|
|
41
|
+
this._hostElem.querySelectorAll("stack-item").forEach((element, index) => {
|
|
42
|
+
element.setAttribute("id", `el_${index}`);
|
|
43
|
+
if (index !== 0) {
|
|
44
|
+
this.checkElementVisibility(element);
|
|
45
|
+
}
|
|
46
|
+
this._totalStackItems++;
|
|
47
|
+
this._elemList.push(element);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
disconectCallback() {
|
|
52
|
+
this._hostElem = null;
|
|
53
|
+
this._elemList = null;
|
|
54
|
+
}
|
|
55
|
+
render() {
|
|
56
|
+
return (h(Host, null));
|
|
57
|
+
}
|
|
58
|
+
static get is() { return "ez-view-stack"; }
|
|
59
|
+
static get originalStyleUrls() { return {
|
|
60
|
+
"$": ["ez-view-stack.css"]
|
|
61
|
+
}; }
|
|
62
|
+
static get styleUrls() { return {
|
|
63
|
+
"$": ["ez-view-stack.css"]
|
|
64
|
+
}; }
|
|
65
|
+
static get methods() { return {
|
|
66
|
+
"show": {
|
|
67
|
+
"complexType": {
|
|
68
|
+
"signature": "(index: number) => Promise<void>",
|
|
69
|
+
"parameters": [{
|
|
70
|
+
"tags": [],
|
|
71
|
+
"text": ""
|
|
72
|
+
}],
|
|
73
|
+
"references": {
|
|
74
|
+
"Promise": {
|
|
75
|
+
"location": "global"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"return": "Promise<void>"
|
|
79
|
+
},
|
|
80
|
+
"docs": {
|
|
81
|
+
"text": "Exibe a aba desejada de acordo com o index passado na tela fazendo com a ativa atual seja removida ou oculta dependendo da hidePolicy.",
|
|
82
|
+
"tags": []
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}; }
|
|
86
|
+
static get elementRef() { return "_hostElem"; }
|
|
87
|
+
}
|