@sankhyalabs/ezui 5.11.0-dev.1 → 5.11.0-dev.11
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-88d75775.js} +7 -6
- package/dist/cjs/{RecordValidationProcessor-edd23705.js → RecordValidationProcessor-059f2d03.js} +1 -1
- package/dist/cjs/ez-actions-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-card-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +1 -1
- package/dist/cjs/ez-combo-box.cjs.entry.js +12 -4
- package/dist/cjs/ez-form-view.cjs.entry.js +42 -1
- package/dist/cjs/ez-form.cjs.entry.js +4 -3
- package/dist/cjs/ez-grid.cjs.entry.js +89 -40
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js +3 -1
- package/dist/cjs/ez-search.cjs.entry.js +3 -1
- package/dist/cjs/ez-text-edit.cjs.entry.js +1 -1
- package/dist/cjs/ez-upload.cjs.entry.js +1 -1
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/filter-column.cjs.entry.js +30 -7
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ez-card-item/ez-card-item.css +1 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +47 -3
- package/dist/collection/components/ez-form/ez-form.js +20 -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 +1 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.js +1 -1
- package/dist/collection/components/ez-grid/ez-grid.js +11 -39
- package/dist/collection/components/ez-grid/subcomponents/filter-column.js +50 -8
- package/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource.js +78 -0
- package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.js +21 -1
- package/dist/collection/components/ez-search/ez-search.js +39 -1
- package/dist/collection/utils/ApplicationUtils.js +7 -6
- package/dist/collection/utils/form/DataBinder.js +1 -1
- package/dist/custom-elements/index.js +191 -64
- package/dist/esm/{ApplicationUtils-d9a34a16.js → ApplicationUtils-ae588c9c.js} +7 -6
- package/dist/esm/{RecordValidationProcessor-abc814af.js → RecordValidationProcessor-0c6f41a1.js} +1 -1
- package/dist/esm/ez-actions-button.entry.js +1 -1
- package/dist/esm/ez-card-item.entry.js +1 -1
- package/dist/esm/ez-collapsible-box.entry.js +1 -1
- package/dist/esm/ez-combo-box.entry.js +12 -4
- package/dist/esm/ez-form-view.entry.js +42 -1
- package/dist/esm/ez-form.entry.js +4 -3
- package/dist/esm/ez-grid.entry.js +90 -41
- package/dist/esm/ez-multi-selection-list.entry.js +3 -1
- package/dist/esm/ez-search.entry.js +3 -1
- package/dist/esm/ez-text-edit.entry.js +1 -1
- package/dist/esm/ez-upload.entry.js +1 -1
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/filter-column.entry.js +30 -7
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-061f4d73.entry.js +1 -0
- package/dist/ezui/p-3078d25c.entry.js +1 -0
- package/dist/ezui/{p-37673563.entry.js → p-3e00263f.entry.js} +1 -1
- package/dist/ezui/{p-68352e41.entry.js → p-47afb974.entry.js} +1 -1
- package/dist/ezui/p-5e55a42b.entry.js +1 -0
- package/dist/ezui/{p-fd54b5b4.entry.js → p-6511add4.entry.js} +2 -2
- package/dist/ezui/p-67ecaeb4.entry.js +1 -0
- package/dist/ezui/p-6fbe368e.entry.js +1 -0
- package/dist/ezui/p-7526f2b6.entry.js +1 -0
- package/dist/ezui/{p-86a2036d.js → p-7bcb062d.js} +1 -1
- package/dist/ezui/{p-ff82b176.entry.js → p-bc4e0389.entry.js} +1 -1
- package/dist/ezui/{p-8bd3903b.entry.js → p-c6c645b0.entry.js} +1 -1
- package/dist/ezui/p-ca9aa20c.js +1 -0
- package/dist/ezui/{p-a5e09759.entry.js → p-f9fd8446.entry.js} +1 -1
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +9 -0
- package/dist/types/components/ez-form/ez-form.d.ts +5 -0
- 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/ag-grid/components/EzGridCustomHeader.d.ts +1 -1
- package/dist/types/components/ez-grid/ez-grid.d.ts +3 -5
- package/dist/types/components/ez-grid/subcomponents/filter-column.d.ts +8 -0
- package/dist/types/components/ez-grid/utils/InMemoryFilterColumnDataSource.d.ts +16 -0
- package/dist/types/components/ez-multi-selection-list/ez-multi-selection-list.d.ts +4 -0
- package/dist/types/components/ez-search/ez-search.d.ts +8 -0
- package/dist/types/components.d.ts +51 -0
- package/package.json +7 -9
- 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-90fa4cb3.entry.js +0 -1
- package/dist/ezui/p-9f41b414.entry.js +0 -1
- package/dist/ezui/p-f15ec3bb.js +0 -1
|
@@ -82,12 +82,13 @@ class ApplicationUtils {
|
|
|
82
82
|
options = Object.assign(Object.assign({}, ApplicationUtils.defaultMessageOptions), options);
|
|
83
83
|
}
|
|
84
84
|
return new Promise(resolve => {
|
|
85
|
-
let dialog = document.
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
85
|
+
let dialog = document.createElement("ez-dialog");
|
|
86
|
+
window.document.body.appendChild(dialog);
|
|
87
|
+
dialog.show(title, message, dialogType, confirm, icon, options.labelCancel, options.labelConfirm, options.btnConfirmDanger, options.beforeClose)
|
|
88
|
+
.then(ok => {
|
|
89
|
+
dialog.remove();
|
|
90
|
+
return resolve(ok);
|
|
91
|
+
});
|
|
91
92
|
});
|
|
92
93
|
}
|
|
93
94
|
static async alert(title, message, icon = null, options = ApplicationUtils.defaultMessageOptions) {
|
|
@@ -681,7 +682,7 @@ class DataBinder {
|
|
|
681
682
|
this._dataUnit.addRecord();
|
|
682
683
|
}
|
|
683
684
|
this._dataUnit.clearInvalid(this.getCurrentRecordId(), fieldName);
|
|
684
|
-
this._dataUnit.setFieldValue(fieldName, newValue);
|
|
685
|
+
this._dataUnit.setFieldValue(fieldName, newValue, [this.getCurrentRecordId()]);
|
|
685
686
|
if (this._dataUnit.waitingForChange(fieldName)) {
|
|
686
687
|
const bind = this._fields.get(fieldName);
|
|
687
688
|
if (bind) {
|
|
@@ -1750,7 +1751,7 @@ const EzCalendar$1 = class extends HTMLElement$1 {
|
|
|
1750
1751
|
static get style() { return ezCalendarCss; }
|
|
1751
1752
|
};
|
|
1752
1753
|
|
|
1753
|
-
const ezCardItemCss = ":host{--ez-card-item--font-size:var(--text--medium, 14px);--ez-card-item--font-family:var(--font-pattern, Arial);--ez-card-item--font-weight:var(--text-weight--medium, 400);--ez-card-item--font-weight-large:var(--text-weight--large, 600);--ez-card-item--color:var(--title--primary, #2B3A54);--ez-card-item__key--color:var(--text--primary, #626e82);--ez-card-item__detail-label--color:var(--text--secondary, #A2ABB9);--ez-card-item__detail--padding-bottom:var(--space--extra-small, 3px);--ez-card-item__title--padding-bottom:var(--space--extra-small, 3px);--ez-card-item__highlight--color:var(--color--primary-300, #E2F4EF);width:100%;display:flex;cursor:pointer}.card-item{display:flex;flex-direction:column;width:100%;cursor:pointer;padding:12px;z-index:0;position:relative}.card-item:hover{background:#F0F3F7;border-radius:12px}.card-item__title{display:flex;align-items:center;line-height:18px;cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight-large);color:var(--ez-card-item--color);padding-bottom:var(--ez-card-item__title--padding-bottom);gap:var(--space--small, 6px)}.card-item__key{color:var(--ez-card-item__key--color)}.card-item__details{display:flex;cursor:pointer;justify-content:space-between;gap:var(--space--small, 6px)}.card-item__details-left{cursor:pointer;width:50%}.card-item__details-right{width:50%;cursor:pointer}.card-item__detail:not(:last-child){cursor:pointer;padding-bottom:var(--ez-card-item__detail--padding-bottom)}.card-item__detail-label{cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight);color:var(--ez-card-item__detail-label--color)}.card-item__detail-value{cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight);color:var(--ez-card-item--color)}.card-item__highlight{position:relative;border-radius:8px;z-index:-1;background-color:var(--ez-card-item__highlight--color);outline:2px solid var(--ez-card-item__highlight--color);box-shadow:-4px 0px 0px 0px var(--ez-card-item__highlight--color), \n 4px 0px 0px 0px var(--ez-card-item__highlight--color)}";
|
|
1754
|
+
const ezCardItemCss = ":host{--ez-card-item--font-size:var(--text--medium, 14px);--ez-card-item--font-family:var(--font-pattern, Arial);--ez-card-item--font-weight:var(--text-weight--medium, 400);--ez-card-item--font-weight-large:var(--text-weight--large, 600);--ez-card-item--color:var(--title--primary, #2B3A54);--ez-card-item__key--color:var(--text--primary, #626e82);--ez-card-item__detail-label--color:var(--text--secondary, #A2ABB9);--ez-card-item__detail--padding-bottom:var(--space--extra-small, 3px);--ez-card-item__title--padding-bottom:var(--space--extra-small, 3px);--ez-card-item__highlight--color:var(--color--primary-300, #E2F4EF);width:100%;display:flex;cursor:pointer}.card-item{display:flex;flex-direction:column;width:100%;cursor:pointer;padding:12px;z-index:0;position:relative}.card-item:hover{background:#F0F3F7;border-radius:12px}.card-item__title{display:flex;align-items:center;line-height:18px;cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight-large);color:var(--ez-card-item--color);padding-bottom:var(--ez-card-item__title--padding-bottom);gap:var(--space--small, 6px)}.card-item__key{color:var(--ez-card-item__key--color)}.card-item__details{display:flex;cursor:pointer;justify-content:space-between;gap:var(--space--small, 6px)}.card-item__details-left{cursor:pointer;width:50%}.card-item__details-right{width:50%;cursor:pointer}.card-item__detail:not(:last-child){cursor:pointer;padding-bottom:var(--ez-card-item__detail--padding-bottom)}.card-item__detail-label{cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight);color:var(--ez-card-item__detail-label--color)}.card-item__detail-value{cursor:pointer;line-break:anywhere;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight);color:var(--ez-card-item--color)}.card-item__highlight{position:relative;border-radius:8px;z-index:-1;background-color:var(--ez-card-item__highlight--color);outline:2px solid var(--ez-card-item__highlight--color);box-shadow:-4px 0px 0px 0px var(--ez-card-item__highlight--color), \n 4px 0px 0px 0px var(--ez-card-item__highlight--color)}";
|
|
1754
1755
|
|
|
1755
1756
|
const EzCardItem$1 = class extends HTMLElement$1 {
|
|
1756
1757
|
constructor() {
|
|
@@ -2155,7 +2156,9 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2155
2156
|
this.suppressEmptyOption = false;
|
|
2156
2157
|
this.canShowError = true;
|
|
2157
2158
|
this.mode = "regular";
|
|
2159
|
+
this.hideErrorOnFocusOut = true;
|
|
2158
2160
|
this.listOptionsPosition = undefined;
|
|
2161
|
+
this.isTextSearch = false;
|
|
2159
2162
|
}
|
|
2160
2163
|
observeErrorMessage() {
|
|
2161
2164
|
var _a;
|
|
@@ -2478,7 +2481,6 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2478
2481
|
this._visibleOptions = [];
|
|
2479
2482
|
this.clearSource();
|
|
2480
2483
|
}
|
|
2481
|
-
this.setFocus();
|
|
2482
2484
|
}
|
|
2483
2485
|
loadOptions(mode, argument = "") {
|
|
2484
2486
|
this._criteria = argument;
|
|
@@ -2663,6 +2665,12 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2663
2665
|
handlerIconClick() {
|
|
2664
2666
|
this.searchMode ? this.loadOptions(SearchMode.ADVANCED) : this.showOptions();
|
|
2665
2667
|
}
|
|
2668
|
+
buildNumberArgument(argument) {
|
|
2669
|
+
if (this.isTextSearch) {
|
|
2670
|
+
return NaN;
|
|
2671
|
+
}
|
|
2672
|
+
return Number(argument || undefined);
|
|
2673
|
+
}
|
|
2666
2674
|
onTextInputChangeHandler(event) {
|
|
2667
2675
|
var _a;
|
|
2668
2676
|
this.clearDeboucingTimeout();
|
|
@@ -2673,7 +2681,7 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2673
2681
|
return;
|
|
2674
2682
|
}
|
|
2675
2683
|
const argument = (_a = event.target.value) === null || _a === void 0 ? void 0 : _a.trim();
|
|
2676
|
-
const argumentNumber =
|
|
2684
|
+
const argumentNumber = this.buildNumberArgument(argument);
|
|
2677
2685
|
if (!this._criteria) {
|
|
2678
2686
|
this._textInput.value = event.data || argument;
|
|
2679
2687
|
}
|
|
@@ -2760,7 +2768,8 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2760
2768
|
//event.stopPropagation();
|
|
2761
2769
|
}
|
|
2762
2770
|
onTextInputFocusOutHandler() {
|
|
2763
|
-
this.
|
|
2771
|
+
if (this.hideErrorOnFocusOut)
|
|
2772
|
+
this.cancelPreselection();
|
|
2764
2773
|
}
|
|
2765
2774
|
canShowListOptions() {
|
|
2766
2775
|
return !this._showLoading && this._visibleOptions.length > 0;
|
|
@@ -4447,6 +4456,7 @@ const EzForm$1 = class extends HTMLElement$1 {
|
|
|
4447
4456
|
super();
|
|
4448
4457
|
this.__registerHost();
|
|
4449
4458
|
this.ezReady = createEvent(this, "ezReady", 7);
|
|
4459
|
+
this.formItemsReady = createEvent(this, "formItemsReady", 7);
|
|
4450
4460
|
this.onDataUnitAction = (action) => {
|
|
4451
4461
|
if (action.type === Action.METADATA_LOADED) {
|
|
4452
4462
|
this.processMetadata();
|
|
@@ -4633,9 +4643,47 @@ uiBuilders$1.set(UserInterface.LONGTEXT, buildTextArea);
|
|
|
4633
4643
|
const fieldBuilder = (field) => {
|
|
4634
4644
|
const builder = uiBuilders$1.get(field.userInterface) || buildTextInput$1;
|
|
4635
4645
|
const label = field.required ? `${field.label}${REQUIRED_INFO}` : field.label;
|
|
4636
|
-
|
|
4646
|
+
const builtElement = builder(Object.assign(Object.assign({}, field), { label }));
|
|
4647
|
+
//@ts-ignore
|
|
4648
|
+
builtElement.$attrs$['data-form-item'] = field.name;
|
|
4649
|
+
return builtElement;
|
|
4637
4650
|
};
|
|
4638
4651
|
|
|
4652
|
+
class FormItem {
|
|
4653
|
+
constructor(elem) {
|
|
4654
|
+
this.elem = elem;
|
|
4655
|
+
}
|
|
4656
|
+
addRightElement(el) {
|
|
4657
|
+
this.removeRightElement();
|
|
4658
|
+
el.classList.add('ez-padding-left--small');
|
|
4659
|
+
el.setAttribute('data-custom-item', 'true');
|
|
4660
|
+
this.elem.classList.add('ez-col--nowrap');
|
|
4661
|
+
this.elem.appendChild(el);
|
|
4662
|
+
}
|
|
4663
|
+
removeRightElement() {
|
|
4664
|
+
Array.from(this.elem.querySelectorAll('[data-custom-item="true"]')).forEach(item => item.remove());
|
|
4665
|
+
}
|
|
4666
|
+
get fieldName() {
|
|
4667
|
+
return this.elem.getAttribute('data-form-item');
|
|
4668
|
+
}
|
|
4669
|
+
}
|
|
4670
|
+
class FormItems {
|
|
4671
|
+
constructor(items, formId) {
|
|
4672
|
+
this.items = new Map();
|
|
4673
|
+
this.formId = formId;
|
|
4674
|
+
items.forEach(item => {
|
|
4675
|
+
const formItem = new FormItem(item);
|
|
4676
|
+
this.items.set(formItem.fieldName, formItem);
|
|
4677
|
+
});
|
|
4678
|
+
}
|
|
4679
|
+
getItem(name) {
|
|
4680
|
+
return this.items.get(name);
|
|
4681
|
+
}
|
|
4682
|
+
get formName() {
|
|
4683
|
+
return this.formId;
|
|
4684
|
+
}
|
|
4685
|
+
}
|
|
4686
|
+
|
|
4639
4687
|
const ezFormViewCss = ".sc-ez-form-view-h{display:flex;flex-direction:row;flex-wrap:wrap;width:100%}";
|
|
4640
4688
|
|
|
4641
4689
|
const EzFormView$1 = class extends HTMLElement$1 {
|
|
@@ -4643,6 +4691,7 @@ const EzFormView$1 = class extends HTMLElement$1 {
|
|
|
4643
4691
|
super();
|
|
4644
4692
|
this.__registerHost();
|
|
4645
4693
|
this.ezContentReady = createEvent(this, "ezContentReady", 7);
|
|
4694
|
+
this.formItemsReady = createEvent(this, "formItemsReady", 7);
|
|
4646
4695
|
this.fields = undefined;
|
|
4647
4696
|
}
|
|
4648
4697
|
async showUp() {
|
|
@@ -4668,6 +4717,8 @@ const EzFormView$1 = class extends HTMLElement$1 {
|
|
|
4668
4717
|
}
|
|
4669
4718
|
componentDidRender() {
|
|
4670
4719
|
this.ezContentReady.emit(Array.from(this._element.querySelectorAll("[data-field-name]")));
|
|
4720
|
+
const formItems = new FormItems(Array.from(this._element.querySelectorAll("[data-form-item]")));
|
|
4721
|
+
this.formItemsReady.emit(formItems);
|
|
4671
4722
|
}
|
|
4672
4723
|
render() {
|
|
4673
4724
|
ElementIDUtils.addIDInfoIfNotExists(this._element, 'ezFormView');
|
|
@@ -123654,7 +123705,7 @@ class EzGridCustomHeader {
|
|
|
123654
123705
|
onClickFilter() {
|
|
123655
123706
|
var _a;
|
|
123656
123707
|
const iconLeft = (_a = this.filterButton) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().left;
|
|
123657
|
-
this.params.showColumnFilter(`${calcFilterColumnLeftPosition(iconLeft)}px
|
|
123708
|
+
this.params.showColumnFilter(`${calcFilterColumnLeftPosition(iconLeft)}px`, true);
|
|
123658
123709
|
}
|
|
123659
123710
|
configSortIcon() {
|
|
123660
123711
|
this.sortDownIcon.style.display = this.params.column.isSortDescending() ? 'flex' : 'none';
|
|
@@ -124896,7 +124947,7 @@ class AgGridController {
|
|
|
124896
124947
|
tooltip: tooltip,
|
|
124897
124948
|
isSortable: propSortable,
|
|
124898
124949
|
hasFilter: () => this.hasFilterColumn(source.name),
|
|
124899
|
-
showColumnFilter: (leftPosition) => this.showFilterColumn({ columnName: source.name, columnLabel: source.label, leftPosition, filteredOptions: this._filteredColumns.get(source.name) }),
|
|
124950
|
+
showColumnFilter: (leftPosition, fromIcon) => this.showFilterColumn({ columnName: source.name, columnLabel: source.label, leftPosition, filteredOptions: this._filteredColumns.get(source.name), fromIcon }),
|
|
124900
124951
|
},
|
|
124901
124952
|
valueFormatter: params => {
|
|
124902
124953
|
if (params.value == undefined) {
|
|
@@ -125119,6 +125170,84 @@ function getElementID(sufix) {
|
|
|
125119
125170
|
};
|
|
125120
125171
|
}
|
|
125121
125172
|
|
|
125173
|
+
class InMemoryFilterColumnDataSource {
|
|
125174
|
+
constructor(dataUnit) {
|
|
125175
|
+
var _a;
|
|
125176
|
+
this.onDataUnitAction = (action) => {
|
|
125177
|
+
if (action.type === Action.DATA_SAVED || action.type === Action.RECORDS_REMOVED) {
|
|
125178
|
+
this.originalRecords = this.dataUnit.records;
|
|
125179
|
+
}
|
|
125180
|
+
};
|
|
125181
|
+
this.dataUnit = dataUnit;
|
|
125182
|
+
this.originalRecords = (_a = this.dataUnit.records) !== null && _a !== void 0 ? _a : [];
|
|
125183
|
+
this.dataUnit.subscribe(this.onDataUnitAction);
|
|
125184
|
+
}
|
|
125185
|
+
fetchData(filterTerm, fieldName) {
|
|
125186
|
+
return new Promise(resolve => {
|
|
125187
|
+
const filteredRecords = this.originalRecords.filter(record => this.includesSearchTerm(record, fieldName, filterTerm));
|
|
125188
|
+
const options = filteredRecords.map(item => this.buildFieldOption(item, fieldName));
|
|
125189
|
+
resolve(this.removeDuplicatedOptions(options));
|
|
125190
|
+
});
|
|
125191
|
+
}
|
|
125192
|
+
buildFieldOption(item, fieldName) {
|
|
125193
|
+
return {
|
|
125194
|
+
value: this.buildValue(item, fieldName),
|
|
125195
|
+
label: this.formatLabel(fieldName, item[fieldName]),
|
|
125196
|
+
check: true,
|
|
125197
|
+
};
|
|
125198
|
+
}
|
|
125199
|
+
buildValue(item, fieldName) {
|
|
125200
|
+
var _a;
|
|
125201
|
+
let value = item[fieldName];
|
|
125202
|
+
if (((_a = this.dataUnit.getField(fieldName)) === null || _a === void 0 ? void 0 : _a.dataType) === DataType.OBJECT) {
|
|
125203
|
+
value = value.value;
|
|
125204
|
+
}
|
|
125205
|
+
return value === null || value === void 0 ? void 0 : value.toString();
|
|
125206
|
+
}
|
|
125207
|
+
removeDuplicatedOptions(options) {
|
|
125208
|
+
const noDuplicatedOptions = [];
|
|
125209
|
+
options.forEach(option => {
|
|
125210
|
+
if (!noDuplicatedOptions.find(({ label }) => label === option.label)) {
|
|
125211
|
+
noDuplicatedOptions.push(option);
|
|
125212
|
+
}
|
|
125213
|
+
});
|
|
125214
|
+
return noDuplicatedOptions;
|
|
125215
|
+
}
|
|
125216
|
+
includesSearchTerm(record, fieldName, filterTerm) {
|
|
125217
|
+
let label = this.buildLabel(fieldName, record[fieldName]);
|
|
125218
|
+
return label.toLowerCase().includes(filterTerm.toLowerCase());
|
|
125219
|
+
}
|
|
125220
|
+
buildLabel(fieldName, value) {
|
|
125221
|
+
var _a;
|
|
125222
|
+
const { dataType } = this.dataUnit.getField(fieldName);
|
|
125223
|
+
if (dataType === DataType.NUMBER) {
|
|
125224
|
+
return value === null || value === void 0 ? void 0 : value.toString().replace('.', ',');
|
|
125225
|
+
}
|
|
125226
|
+
if (dataType === DataType.DATE) {
|
|
125227
|
+
return (typeof value === 'object')
|
|
125228
|
+
? (_a = DateUtils$1.formatDate(this.dataUnit.valueFromString(fieldName, value))) === null || _a === void 0 ? void 0 : _a.toString()
|
|
125229
|
+
: value === null || value === void 0 ? void 0 : value.toString();
|
|
125230
|
+
}
|
|
125231
|
+
if (dataType === DataType.OBJECT) {
|
|
125232
|
+
return `${value === null || value === void 0 ? void 0 : value.value} - ${value === null || value === void 0 ? void 0 : value.label}`;
|
|
125233
|
+
}
|
|
125234
|
+
return value === null || value === void 0 ? void 0 : value.toString();
|
|
125235
|
+
}
|
|
125236
|
+
formatLabel(fieldName, value) {
|
|
125237
|
+
var _a, _b;
|
|
125238
|
+
const { userInterface, dataType } = this.dataUnit.getField(fieldName);
|
|
125239
|
+
if (dataType === DataType.DATE) {
|
|
125240
|
+
return (typeof value === 'object')
|
|
125241
|
+
? DateUtils$1.formatDate(this.dataUnit.valueFromString(fieldName, value))
|
|
125242
|
+
: value === null || value === void 0 ? void 0 : value.toString();
|
|
125243
|
+
}
|
|
125244
|
+
if (dataType === DataType.NUMBER && userInterface !== UserInterface.DECIMALNUMBER) {
|
|
125245
|
+
return (_a = parseInt(this.dataUnit.getFormattedValue(fieldName, value))) === null || _a === void 0 ? void 0 : _a.toString();
|
|
125246
|
+
}
|
|
125247
|
+
return (_b = this.dataUnit.getFormattedValue(fieldName, value)) === null || _b === void 0 ? void 0 : _b.toString();
|
|
125248
|
+
}
|
|
125249
|
+
}
|
|
125250
|
+
|
|
125122
125251
|
const ezGridCss = ".sc-ez-grid-h{display:grid;grid-template-rows:auto 1fr auto;height:100%;width:100%;--ez-grid__header--background-color:var(--background--xlight, #FFF);--ez-grid__selection-counter--z-index:var(--visible, 1);--ez-grid__container--shadow:0 0 16px 0 rgb(0 38 111 / 12%)}.grid-header.sc-ez-grid{display:grid;justify-content:space-between;align-items:center;grid-template-columns:1fr;background-color:var(--ez-grid__header--background-color, #FFF);z-index:var(--more-visible, 2)}.grid__container.sc-ez-grid{padding-top:15px;margin-top:-12px;box-shadow:var(--ez-grid__container--shadow);background-color:var(--ez-grid__header--background-color)}.grid-header__popover.sc-ez-grid{position:relative;top:var(--space--sm, 16px)}.grid-header__container.sc-ez-grid{display:flex;align-items:center}.grid-header__position.sc-ez-grid{display:flex;align-items:center;justify-content:space-between}.grid__selection-counter.sc-ez-grid{position:fixed;white-space:nowrap;transform:translate(-50%, 0px);left:50%;opacity:0;bottom:-100%;transition:opacity 0.1s, bottom 0.5s;z-index:var(--ez-grid__selection-counter--z-index)}.grid__selection-counter--opened.sc-ez-grid{opacity:1;bottom:0px}.grid__btn-close.sc-ez-grid{display:flex;align-items:center;justify-content:center;padding:0;outline:none;width:20px;height:20px;border:none;background-color:unset;cursor:pointer}.grid__btn-clear.sc-ez-grid{--ez-button--link-color:var(--color--alert-warning-900, #8C6B00);--ez-button--link--hover-color:var(--color--alert-warning-900, #8C6B00)}[no-header].sc-ez-grid-h .grid-header.sc-ez-grid{height:0;padding:0}";
|
|
125123
125252
|
|
|
125124
125253
|
const windowInstace$1 = window;
|
|
@@ -125133,18 +125262,13 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
125133
125262
|
this.componentReady = createEvent(this, "componentReady", 7);
|
|
125134
125263
|
this._gridController = new AgGridController(false);
|
|
125135
125264
|
this._messageFilterAppliedSuccess = 'Filtro de coluna aplicado com sucesso!';
|
|
125136
|
-
this.onDataUnitAction = (action) => {
|
|
125137
|
-
if (action.type === Action.DATA_SAVED || action.type === Action.RECORDS_REMOVED) {
|
|
125138
|
-
this._originalRecords = this.dataUnit.records;
|
|
125139
|
-
}
|
|
125140
|
-
};
|
|
125141
125265
|
this._paginationInfo = undefined;
|
|
125142
125266
|
this._paginationChangedByKeyboard = true;
|
|
125143
125267
|
this._showSelectionCounter = false;
|
|
125144
125268
|
this._isAllSelection = false;
|
|
125145
125269
|
this._currentPageSelected = undefined;
|
|
125146
125270
|
this._selectionCount = undefined;
|
|
125147
|
-
this.
|
|
125271
|
+
this._hasLeftButtons = false;
|
|
125148
125272
|
this.multipleSelection = undefined;
|
|
125149
125273
|
this.config = undefined;
|
|
125150
125274
|
this.selectionToastConfig = undefined;
|
|
@@ -125414,44 +125538,20 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
125414
125538
|
});
|
|
125415
125539
|
}
|
|
125416
125540
|
componentWillLoad() {
|
|
125541
|
+
this._hasLeftButtons = !!this._element.querySelector('[slot="leftButtons"]');
|
|
125417
125542
|
if (!this.dataUnit.name.includes("InMemoryDataUnit"))
|
|
125418
125543
|
return;
|
|
125419
|
-
this.dataUnit.subscribe(this.onDataUnitAction);
|
|
125420
125544
|
}
|
|
125421
125545
|
getDataSource() {
|
|
125422
|
-
|
|
125423
|
-
|
|
125424
|
-
buildDefaultDataSource() {
|
|
125425
|
-
var _a, _b;
|
|
125426
|
-
if (this._originalRecords.length === 0) {
|
|
125427
|
-
this._originalRecords = (_b = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.records) !== null && _b !== void 0 ? _b : [];
|
|
125428
|
-
}
|
|
125429
|
-
return {
|
|
125430
|
-
fetchData: (filterTerm, fieldName) => {
|
|
125431
|
-
return new Promise(resolve => {
|
|
125432
|
-
const filteredRecords = this._originalRecords.filter(record => {
|
|
125433
|
-
var _a, _b;
|
|
125434
|
-
const label = typeof record[fieldName] === "object" ? `${(_a = record[fieldName]) === null || _a === void 0 ? void 0 : _a.value} - ${(_b = record[fieldName]) === null || _b === void 0 ? void 0 : _b.label}` : record[fieldName];
|
|
125435
|
-
return label === null || label === void 0 ? void 0 : label.toString().toLowerCase().includes(filterTerm.toLowerCase());
|
|
125436
|
-
});
|
|
125437
|
-
const options = filteredRecords.map(item => {
|
|
125438
|
-
return { value: item[fieldName].toString(), label: this.formatLabel(fieldName, item[fieldName]), check: true };
|
|
125439
|
-
});
|
|
125440
|
-
resolve(options);
|
|
125441
|
-
});
|
|
125442
|
-
}
|
|
125443
|
-
};
|
|
125546
|
+
var _a;
|
|
125547
|
+
return (_a = this.columnfilterDataSource) !== null && _a !== void 0 ? _a : new InMemoryFilterColumnDataSource(this.dataUnit);
|
|
125444
125548
|
}
|
|
125445
|
-
|
|
125446
|
-
|
|
125447
|
-
if (userInterface === UserInterface.DATETIME) {
|
|
125448
|
-
return DateUtils$1.formatDate(this.dataUnit.valueFromString(fieldName, value));
|
|
125449
|
-
}
|
|
125450
|
-
return String(this.dataUnit.getFormattedValue(fieldName, value));
|
|
125549
|
+
hideHeader() {
|
|
125550
|
+
return (!!this._element.getAttribute("no-header") && !this._paginationInfo);
|
|
125451
125551
|
}
|
|
125452
125552
|
render() {
|
|
125453
125553
|
var _a;
|
|
125454
|
-
return (h(Host,
|
|
125554
|
+
return (h(Host, { "no-header": this.hideHeader() }, h("div", { class: "ez-box ez-box--shadow ez-padding--medium grid-header" }, h("filter-column", { class: "grid-header__popover", noHeaderTaskBar: !this._hasLeftButtons, dataSource: this.getDataSource(), dataUnit: this.dataUnit, gridHeaderHidden: this.hideHeader(), ref: (element) => (this._filterColumn = element) }), h("div", { class: "grid-header__position" }, h("div", { class: "grid-header__container" }, h("slot", { name: "leftButtons" })), h("div", { class: "grid-header__container", ref: ref => (this._refPaginationControl = ref) }, this.getPaginationControl()))), h("div", { ref: (ref) => (this._gridSelectionCounter = ref), class: `grid__selection-counter
|
|
125455
125555
|
${this._showSelectionCounter ? 'grid__selection-counter--opened' : ''}
|
|
125456
125556
|
` }, h(SelectionCounter, { selectionCount: this._selectionCount, currentPageSelected: this._currentPageSelected, paginationInfo: this._paginationInfo, canSelectAll: (_a = this.selectionToastConfig) === null || _a === void 0 ? void 0 : _a.canSelectAll, allRecordSelected: this._isAllSelection, onSelectAll: () => this.onSelectAllRecords(), onSelectPage: () => this.onSelectPageRecords(), onClearAll: () => this.onClearSelectedRecords(), onClose: () => (this._showSelectionCounter = false) })), h("div", { class: "grid__container ez-grid", ref: elem => (this._container = elem) }), h("div", { class: "grid__footer" }, h("slot", { name: "footer" }))));
|
|
125457
125557
|
}
|
|
@@ -126319,6 +126419,7 @@ const EzMuiltiSelectionList = class extends HTMLElement$1 {
|
|
|
126319
126419
|
this.dataSource = undefined;
|
|
126320
126420
|
this.useOptions = false;
|
|
126321
126421
|
this.options = undefined;
|
|
126422
|
+
this.isTextSearch = false;
|
|
126322
126423
|
this.filteredOptions = undefined;
|
|
126323
126424
|
this.displayOptions = undefined;
|
|
126324
126425
|
this.viewScenario = undefined;
|
|
@@ -126401,6 +126502,7 @@ const EzMuiltiSelectionList = class extends HTMLElement$1 {
|
|
|
126401
126502
|
this.filteredOptions = this.ordenationByCheckStateAndAlphabetically([...optionsToSort, event.detail]);
|
|
126402
126503
|
}
|
|
126403
126504
|
this.viewScenario = ViewScenarios.DATASOURCE_RESULTS;
|
|
126505
|
+
this.searchInput.value = "";
|
|
126404
126506
|
}
|
|
126405
126507
|
handleRemoveItemFromOptions(item) {
|
|
126406
126508
|
this.filteredOptions = this.ordenationByCheckStateAndAlphabetically(this.filteredOptions.filter(i => i.value !== item.value));
|
|
@@ -126464,7 +126566,7 @@ const EzMuiltiSelectionList = class extends HTMLElement$1 {
|
|
|
126464
126566
|
return scenarios[view];
|
|
126465
126567
|
}
|
|
126466
126568
|
render() {
|
|
126467
|
-
return (h(Host, null, h("div", { class: "multi-selection" }, this.useOptions ? (h("ez-filter-input", { ref: (element) => (this.filterInput = element), label: `Buscar..`, onEzChange: this.handleSearchOnOption.bind(this) })) : (h("ez-search", { class: "multi-selection__input", label: `Buscar...`, ref: (element) => (this.searchInput = element), suppressEmptyOption: true, showOptionValue: false, showSelectedValue: false, optionLoader: (search) => this.searchWithDataSource(search, this.columnName), onEzChange: this.handleSearchOnDataSource.bind(this) })), h("ez-scroll", { class: "multi-selection__content-options" }, this.scenarioToDisplay(this.viewScenario)))));
|
|
126569
|
+
return (h(Host, null, h("div", { class: "multi-selection" }, this.useOptions ? (h("ez-filter-input", { ref: (element) => (this.filterInput = element), label: `Buscar..`, onEzChange: this.handleSearchOnOption.bind(this) })) : (h("ez-search", { class: "multi-selection__input", label: `Buscar...`, ref: (element) => (this.searchInput = element), suppressEmptyOption: true, showOptionValue: false, showSelectedValue: false, optionLoader: (search) => this.searchWithDataSource(search, this.columnName), onEzChange: this.handleSearchOnDataSource.bind(this), isTextSearch: this.isTextSearch })), h("ez-scroll", { class: "multi-selection__content-options" }, this.scenarioToDisplay(this.viewScenario)))));
|
|
126468
126570
|
}
|
|
126469
126571
|
static get watchers() { return {
|
|
126470
126572
|
"useOptions": ["onChangeUseOptions"],
|
|
@@ -127109,7 +127211,9 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
127109
127211
|
this.suppressEmptyOption = false;
|
|
127110
127212
|
this.mode = "regular";
|
|
127111
127213
|
this.canShowError = true;
|
|
127214
|
+
this.hideErrorOnFocusOut = true;
|
|
127112
127215
|
this.listOptionsPosition = undefined;
|
|
127216
|
+
this.isTextSearch = false;
|
|
127113
127217
|
}
|
|
127114
127218
|
observeErrorMessage() {
|
|
127115
127219
|
if (this._comboElement) {
|
|
@@ -127167,7 +127271,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
127167
127271
|
}
|
|
127168
127272
|
render() {
|
|
127169
127273
|
ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
127170
|
-
return (h("ez-combo-box", { "data-element-id": ElementIDUtils.getInternalIDInfo("combo"), ref: elem => this._comboElement = elem, value: this.value, label: this.label, enabled: this.enabled, errorMessage: this.errorMessage, optionLoader: this.optionLoader, searchMode: true, onEzChange: event => this.onComboChange(event), showSelectedValue: this.showSelectedValue, showOptionValue: this.showOptionValue, suppressEmptyOption: this.suppressEmptyOption, mode: this.mode, canShowError: this.canShowError, listOptionsPosition: this.listOptionsPosition }));
|
|
127274
|
+
return (h("ez-combo-box", { "data-element-id": ElementIDUtils.getInternalIDInfo("combo"), ref: elem => this._comboElement = elem, value: this.value, label: this.label, enabled: this.enabled, errorMessage: this.errorMessage, hideErrorOnFocusOut: this.hideErrorOnFocusOut, optionLoader: this.optionLoader, searchMode: true, onEzChange: event => this.onComboChange(event), showSelectedValue: this.showSelectedValue, showOptionValue: this.showOptionValue, suppressEmptyOption: this.suppressEmptyOption, mode: this.mode, canShowError: this.canShowError, listOptionsPosition: this.listOptionsPosition, isTextSearch: this.isTextSearch }));
|
|
127171
127275
|
}
|
|
127172
127276
|
;
|
|
127173
127277
|
get _elem() { return this; }
|
|
@@ -129304,19 +129408,23 @@ const FilterColumn$1 = class extends HTMLElement$1 {
|
|
|
129304
129408
|
super();
|
|
129305
129409
|
this.__registerHost();
|
|
129306
129410
|
this.applyFilterColumnOptions = createEvent(this, "applyFilterColumnOptions", 7);
|
|
129307
|
-
this.TOP_POSITION = '
|
|
129411
|
+
this.TOP_POSITION = '65';
|
|
129308
129412
|
this.TOP_POSITION_HEADER_HIDDEN = '18';
|
|
129413
|
+
this.TOP_POSITION_NO_TASKBAR = '32';
|
|
129414
|
+
this.TOP_POSITION_NO_TASKBAR_HEADER_HIDDEN = '20';
|
|
129309
129415
|
this.DEFAULT_HEIGHT = 430;
|
|
129310
129416
|
this.opened = true;
|
|
129311
129417
|
this.columnName = undefined;
|
|
129312
129418
|
this.columnLabel = undefined;
|
|
129313
129419
|
this.gridHeaderHidden = false;
|
|
129420
|
+
this.noHeaderTaskBar = false;
|
|
129314
129421
|
this.dataSource = undefined;
|
|
129315
129422
|
this.dataUnit = undefined;
|
|
129316
129423
|
this.options = undefined;
|
|
129317
129424
|
this.selectedItems = undefined;
|
|
129318
129425
|
this.fieldDescriptor = undefined;
|
|
129319
129426
|
this.useOptions = false;
|
|
129427
|
+
this.isTextSearch = false;
|
|
129320
129428
|
}
|
|
129321
129429
|
async hide() {
|
|
129322
129430
|
await this.ezPopoverElement.hide();
|
|
@@ -129330,26 +129438,45 @@ const FilterColumn$1 = class extends HTMLElement$1 {
|
|
|
129330
129438
|
if (this.canShow(configs)) {
|
|
129331
129439
|
await this.hide();
|
|
129332
129440
|
this.fieldDescriptor = this.dataUnit.getField(configs.columnName);
|
|
129441
|
+
this.buildIsTextSearch();
|
|
129333
129442
|
this.setOptions(configs.filteredOptions);
|
|
129334
129443
|
this.columnName = configs.columnName;
|
|
129335
129444
|
this.columnLabel = configs.columnLabel;
|
|
129336
|
-
await this.ezPopoverElement.show(this.calcTopPosition(), configs
|
|
129445
|
+
await this.ezPopoverElement.show(this.calcTopPosition(), this.calculateLeftPosition(configs));
|
|
129446
|
+
}
|
|
129447
|
+
}
|
|
129448
|
+
calculateLeftPosition(configs) {
|
|
129449
|
+
if (!configs.fromIcon) {
|
|
129450
|
+
return configs.leftPosition;
|
|
129337
129451
|
}
|
|
129452
|
+
const difference = this.ezPopoverElement.getBoundingClientRect().left;
|
|
129453
|
+
const leftReference = parseInt(configs.leftPosition.replace('px', ''));
|
|
129454
|
+
const leftResolved = (leftReference + 16) - difference;
|
|
129455
|
+
return `${(leftResolved > 0 ? leftResolved : 0)}px`;
|
|
129456
|
+
}
|
|
129457
|
+
buildIsTextSearch() {
|
|
129458
|
+
var _a, _b;
|
|
129459
|
+
const userInterface = (_b = (_a = this.fieldDescriptor) === null || _a === void 0 ? void 0 : _a.userInterface) !== null && _b !== void 0 ? _b : UserInterface.SHORTTEXT;
|
|
129460
|
+
this.isTextSearch = !(userInterface === UserInterface.DECIMALNUMBER || userInterface === UserInterface.INTEGERNUMBER);
|
|
129338
129461
|
}
|
|
129339
129462
|
calcTopPosition() {
|
|
129340
|
-
const referencePosition = this.
|
|
129341
|
-
? this.TOP_POSITION_HEADER_HIDDEN
|
|
129342
|
-
: this.TOP_POSITION.replace('px', '');
|
|
129463
|
+
const referencePosition = this.buildReferenceTopPosition();
|
|
129343
129464
|
const totalPopoverHeight = parseInt(referencePosition) + this.DEFAULT_HEIGHT;
|
|
129344
129465
|
const popoverPosition = Math.round(this.ezPopoverElement.getBoundingClientRect().top);
|
|
129345
129466
|
const popoverBottomPosition = popoverPosition + totalPopoverHeight;
|
|
129346
129467
|
const windowHeight = window.innerHeight;
|
|
129347
129468
|
if (windowHeight > popoverBottomPosition) {
|
|
129348
|
-
return referencePosition
|
|
129469
|
+
return `${referencePosition}px`;
|
|
129349
129470
|
}
|
|
129350
129471
|
const differenceBetween = windowHeight - popoverBottomPosition;
|
|
129351
129472
|
return `${differenceBetween}px`;
|
|
129352
129473
|
}
|
|
129474
|
+
buildReferenceTopPosition() {
|
|
129475
|
+
if (this.noHeaderTaskBar) {
|
|
129476
|
+
return this.gridHeaderHidden ? this.TOP_POSITION_NO_TASKBAR_HEADER_HIDDEN : this.TOP_POSITION_NO_TASKBAR;
|
|
129477
|
+
}
|
|
129478
|
+
return this.gridHeaderHidden ? this.TOP_POSITION_HEADER_HIDDEN : this.TOP_POSITION;
|
|
129479
|
+
}
|
|
129353
129480
|
async clearConfigs() {
|
|
129354
129481
|
var _a;
|
|
129355
129482
|
await ((_a = this.ezMultiSelectionList) === null || _a === void 0 ? void 0 : _a.clearFilteredOptions());
|
|
@@ -129407,7 +129534,7 @@ const FilterColumn$1 = class extends HTMLElement$1 {
|
|
|
129407
129534
|
}
|
|
129408
129535
|
}
|
|
129409
129536
|
render() {
|
|
129410
|
-
return (h("ez-popover", { class: 'filter-column__popover', "overlay-type": 'none', ref: (element) => (this.ezPopoverElement = element), autoClose: true, onEzVisibilityChange: this.handleEzVisibilityChange.bind(this) }, h("section", { class: 'filter-column' }, h("header", { class: 'filter-column__header' }, h("span", { class: 'ez-text ez-text--medium filter-column__header-title' }, "Filtro da coluna ", this.columnLabel), h("ez-button", { mode: 'icon', "icon-name": 'close', class: 'ez-button--tertiary', onClick: () => this.hide() })), h("ez-multi-selection-list", { columnName: this.columnName, dataSource: this.dataSource, options: this.options, useOptions: this.useOptions, ref: (element) => (this.ezMultiSelectionList = element), onChangeFilteredOptions: (event) => this.changeSelectedItems(event.detail) }), h("footer", { class: 'filter-column__footer' }, h("ez-button", { label: 'Aplicar', class: 'ez-button--primary', onClick: this.submit.bind(this) })))));
|
|
129537
|
+
return (h("ez-popover", { class: 'filter-column__popover', "overlay-type": 'none', ref: (element) => (this.ezPopoverElement = element), autoClose: true, onEzVisibilityChange: this.handleEzVisibilityChange.bind(this) }, h("section", { class: 'filter-column' }, h("header", { class: 'filter-column__header' }, h("span", { class: 'ez-text ez-text--medium filter-column__header-title' }, "Filtro da coluna ", this.columnLabel), h("ez-button", { mode: 'icon', "icon-name": 'close', class: 'ez-button--tertiary', onClick: () => this.hide() })), h("ez-multi-selection-list", { columnName: this.columnName, dataSource: this.dataSource, options: this.options, useOptions: this.useOptions, ref: (element) => (this.ezMultiSelectionList = element), onChangeFilteredOptions: (event) => this.changeSelectedItems(event.detail), isTextSearch: this.isTextSearch }), h("footer", { class: 'filter-column__footer' }, h("ez-button", { label: 'Aplicar', class: 'ez-button--primary', onClick: this.submit.bind(this) })))));
|
|
129411
129538
|
}
|
|
129412
129539
|
static get style() { return filterColumnCss; }
|
|
129413
129540
|
};
|
|
@@ -129437,7 +129564,7 @@ const EzCardItem = /*@__PURE__*/proxyCustomElement(EzCardItem$1, [1,"ez-card-ite
|
|
|
129437
129564
|
const EzCheck = /*@__PURE__*/proxyCustomElement(EzCheck$1, [1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"indeterminate":[1540],"mode":[513],"compact":[4]}]);
|
|
129438
129565
|
const EzChip = /*@__PURE__*/proxyCustomElement(EzChip$1, [1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"showNativeTooltip":[4,"show-native-tooltip"]}]);
|
|
129439
129566
|
const EzCollapsibleBox = /*@__PURE__*/proxyCustomElement(EzCollapsibleBox$1, [1,"ez-collapsible-box",{"value":[1540],"boxBordered":[4,"box-bordered"],"label":[513],"subtitle":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"headerAlign":[513,"header-align"],"removable":[516],"editable":[516],"conditionalSave":[16],"_activeEditText":[32]}]);
|
|
129440
|
-
const EzComboBox = /*@__PURE__*/proxyCustomElement(EzComboBox$1, [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],"listOptionsPosition":[16],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32]},[[11,"scroll","scrollListener"]]]);
|
|
129567
|
+
const EzComboBox = /*@__PURE__*/proxyCustomElement(EzComboBox$1, [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],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32]},[[11,"scroll","scrollListener"]]]);
|
|
129441
129568
|
const EzDateInput = /*@__PURE__*/proxyCustomElement(EzDateInput$1, [1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"canShowError":[516,"can-show-error"]}]);
|
|
129442
129569
|
const EzDateTimeInput = /*@__PURE__*/proxyCustomElement(EzDateTimeInput$1, [1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"canShowError":[516,"can-show-error"]}]);
|
|
129443
129570
|
const EzDialog = /*@__PURE__*/proxyCustomElement(EzDialog$1, [1,"ez-dialog",{"confirm":[1028],"dialogType":[1025,"dialog-type"],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"beforeClose":[1040]}]);
|
|
@@ -129446,20 +129573,20 @@ const EzFileItem = /*@__PURE__*/proxyCustomElement(EzFileItem$1, [1,"ez-file-ite
|
|
|
129446
129573
|
const EzFilterInput = /*@__PURE__*/proxyCustomElement(EzFilterInput$1, [1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"asyncSearch":[516,"async-search"],"canShowError":[516,"can-show-error"]}]);
|
|
129447
129574
|
const EzForm = /*@__PURE__*/proxyCustomElement(EzForm$1, [2,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16]}]);
|
|
129448
129575
|
const EzFormView = /*@__PURE__*/proxyCustomElement(EzFormView$1, [2,"ez-form-view",{"fields":[16]}]);
|
|
129449
|
-
const EzGrid = /*@__PURE__*/proxyCustomElement(EzGrid$1, [6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"selectionToastConfig":[16],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"columnfilterDataSource":[16],"useEnterLikeTab":[4,"use-enter-like-tab"],"recordsValidator":[16],"canEdit":[4,"can-edit"],"_paginationInfo":[32],"_paginationChangedByKeyboard":[32],"_showSelectionCounter":[32],"_isAllSelection":[32],"_currentPageSelected":[32],"_selectionCount":[32],"
|
|
129576
|
+
const EzGrid = /*@__PURE__*/proxyCustomElement(EzGrid$1, [6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"selectionToastConfig":[16],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"columnfilterDataSource":[16],"useEnterLikeTab":[4,"use-enter-like-tab"],"recordsValidator":[16],"canEdit":[4,"can-edit"],"_paginationInfo":[32],"_paginationChangedByKeyboard":[32],"_showSelectionCounter":[32],"_isAllSelection":[32],"_currentPageSelected":[32],"_selectionCount":[32],"_hasLeftButtons":[32]},[[0,"ezSelectionChange","onSelectionChange"]]]);
|
|
129450
129577
|
const EzGuideNavigator = /*@__PURE__*/proxyCustomElement(EzGuideNavigator$1, [1,"ez-guide-navigator",{"open":[1540],"selectedId":[1537,"selected-id"],"items":[16],"tooltipResolver":[16],"filterText":[32]}]);
|
|
129451
129578
|
const EzIcon = /*@__PURE__*/proxyCustomElement(EzIcon$1, [1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]);
|
|
129452
129579
|
const EzList = /*@__PURE__*/proxyCustomElement(EzList$1, [1,"ez-list",{"dataSource":[1040],"listMode":[1,"list-mode"],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"itemLeftSlotBuilder":[1040],"hoverFeedback":[1028,"hover-feedback"],"_listItems":[32],"_listGroupItems":[32]}]);
|
|
129453
129580
|
const EzLoadingBar = /*@__PURE__*/proxyCustomElement(EzLoadingBar$1, [1,"ez-loading-bar",{"_showLoading":[32]}]);
|
|
129454
129581
|
const EzModal = /*@__PURE__*/proxyCustomElement(EzModal$1, [1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"heightMode":[1,"height-mode"],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"],"scrim":[1]}]);
|
|
129455
129582
|
const EzModalContainer = /*@__PURE__*/proxyCustomElement(EzModalContainer$1, [6,"ez-modal-container",{"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"showTitleBar":[4,"show-title-bar"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"cancelButtonStatus":[1,"cancel-button-status"],"okButtonStatus":[1,"ok-button-status"]}]);
|
|
129456
|
-
const EzMultiSelectionList = /*@__PURE__*/proxyCustomElement(EzMuiltiSelectionList, [2,"ez-multi-selection-list",{"columnName":[1,"column-name"],"dataSource":[16],"useOptions":[1028,"use-options"],"options":[16],"filteredOptions":[32],"displayOptions":[32],"viewScenario":[32],"displayOptionToCheckAllItems":[32]}]);
|
|
129583
|
+
const EzMultiSelectionList = /*@__PURE__*/proxyCustomElement(EzMuiltiSelectionList, [2,"ez-multi-selection-list",{"columnName":[1,"column-name"],"dataSource":[16],"useOptions":[1028,"use-options"],"options":[16],"isTextSearch":[4,"is-text-search"],"filteredOptions":[32],"displayOptions":[32],"viewScenario":[32],"displayOptionToCheckAllItems":[32]}]);
|
|
129457
129584
|
const EzNumberInput = /*@__PURE__*/proxyCustomElement(EzNumberInput$1, [1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"canShowError":[516,"can-show-error"],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513]}]);
|
|
129458
129585
|
const EzPopover = /*@__PURE__*/proxyCustomElement(EzPopover$1, [1,"ez-popover",{"autoClose":[516,"auto-close"],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"overlayType":[513,"overlay-type"]}]);
|
|
129459
129586
|
const EzPopup = /*@__PURE__*/proxyCustomElement(EzPopup$1, [1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[516,"use-header"],"heightMode":[513,"height-mode"],"ezTitle":[1,"ez-title"]}]);
|
|
129460
129587
|
const EzRadioButton = /*@__PURE__*/proxyCustomElement(EzRadioButton$1, [1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]);
|
|
129461
129588
|
const EzScroller = /*@__PURE__*/proxyCustomElement(EzScroller$1, [1,"ez-scroller",{"direction":[1],"locked":[4],"activeShadow":[4,"active-shadow"],"isActive":[32]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]]);
|
|
129462
|
-
const EzSearch = /*@__PURE__*/proxyCustomElement(EzSearch$1, [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],"canShowError":[516,"can-show-error"],"listOptionsPosition":[16]}]);
|
|
129589
|
+
const EzSearch = /*@__PURE__*/proxyCustomElement(EzSearch$1, [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],"canShowError":[516,"can-show-error"],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"]}]);
|
|
129463
129590
|
const EzSidebarButton = /*@__PURE__*/proxyCustomElement(EzSidebarButton$1, [1,"ez-sidebar-button"]);
|
|
129464
129591
|
const EzSkeleton = /*@__PURE__*/proxyCustomElement(EzSkeleton$1, [0,"ez-skeleton",{"count":[2],"variant":[1],"width":[1],"height":[1],"marginBottom":[1,"margin-bottom"],"animation":[1]}]);
|
|
129465
129592
|
const EzTabselector = /*@__PURE__*/proxyCustomElement(EzTabselector$1, [1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32]}]);
|
|
@@ -129471,7 +129598,7 @@ const EzToast = /*@__PURE__*/proxyCustomElement(EzToast$1, [1,"ez-toast",{"messa
|
|
|
129471
129598
|
const EzTree = /*@__PURE__*/proxyCustomElement(EzTree$1, [1,"ez-tree",{"items":[1040],"value":[1040],"selectedId":[1537,"selected-id"],"iconResolver":[16],"tooltipResolver":[16],"_tree":[32],"_waintingForLoad":[32]},[[2,"keydown","onKeyDownListener"]]]);
|
|
129472
129599
|
const EzUpload = /*@__PURE__*/proxyCustomElement(EzUpload$1, [1,"ez-upload",{"label":[1],"subtitle":[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]}]);
|
|
129473
129600
|
const EzViewStack = /*@__PURE__*/proxyCustomElement(EzViewStack$1, [0,"ez-view-stack"]);
|
|
129474
|
-
const FilterColumn = /*@__PURE__*/proxyCustomElement(FilterColumn$1, [0,"filter-column",{"opened":[4],"columnName":[1,"column-name"],"columnLabel":[1,"column-label"],"gridHeaderHidden":[4,"grid-header-hidden"],"dataSource":[16],"dataUnit":[16],"options":[1040],"selectedItems":[32],"fieldDescriptor":[32],"useOptions":[32]}]);
|
|
129601
|
+
const FilterColumn = /*@__PURE__*/proxyCustomElement(FilterColumn$1, [0,"filter-column",{"opened":[4],"columnName":[1,"column-name"],"columnLabel":[1,"column-label"],"gridHeaderHidden":[4,"grid-header-hidden"],"noHeaderTaskBar":[1028,"no-header-task-bar"],"dataSource":[16],"dataUnit":[16],"options":[1040],"selectedItems":[32],"fieldDescriptor":[32],"useOptions":[32],"isTextSearch":[32]}]);
|
|
129475
129602
|
const MultiSelectionBoxMessage = /*@__PURE__*/proxyCustomElement(MultiSelectionBoxMessage$1, [0,"multi-selection-box-message",{"message":[1]}]);
|
|
129476
129603
|
const defineCustomElements = (opts) => {
|
|
129477
129604
|
if (typeof customElements !== 'undefined') {
|
|
@@ -71,12 +71,13 @@ class ApplicationUtils {
|
|
|
71
71
|
options = Object.assign(Object.assign({}, ApplicationUtils.defaultMessageOptions), options);
|
|
72
72
|
}
|
|
73
73
|
return new Promise(resolve => {
|
|
74
|
-
let dialog = document.
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
74
|
+
let dialog = document.createElement("ez-dialog");
|
|
75
|
+
window.document.body.appendChild(dialog);
|
|
76
|
+
dialog.show(title, message, dialogType, confirm, icon, options.labelCancel, options.labelConfirm, options.btnConfirmDanger, options.beforeClose)
|
|
77
|
+
.then(ok => {
|
|
78
|
+
dialog.remove();
|
|
79
|
+
return resolve(ok);
|
|
80
|
+
});
|
|
80
81
|
});
|
|
81
82
|
}
|
|
82
83
|
static async alert(title, message, icon = null, options = ApplicationUtils.defaultMessageOptions) {
|
package/dist/esm/{RecordValidationProcessor-abc814af.js → RecordValidationProcessor-0c6f41a1.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UserInterface } from '@sankhyalabs/core';
|
|
2
|
-
import { A as ApplicationUtils } from './ApplicationUtils-
|
|
2
|
+
import { A as ApplicationUtils } from './ApplicationUtils-ae588c9c.js';
|
|
3
3
|
|
|
4
4
|
const buildFieldMetadata = (descriptor, config) => {
|
|
5
5
|
let { name, label, group } = Object.assign({}, config);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-296b8458.js';
|
|
2
2
|
import { FloatingManager, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
|
-
import './ApplicationUtils-
|
|
3
|
+
import './ApplicationUtils-ae588c9c.js';
|
|
4
4
|
import { C as CSSVarsUtils } from './CSSVarsUtils-a97cfa29.js';
|
|
5
5
|
import './DialogType-54a62731.js';
|
|
6
6
|
import './CheckMode-bdb2ec19.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-296b8458.js';
|
|
2
2
|
import { StringUtils, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
|
|
4
|
-
const ezCardItemCss = ":host{--ez-card-item--font-size:var(--text--medium, 14px);--ez-card-item--font-family:var(--font-pattern, Arial);--ez-card-item--font-weight:var(--text-weight--medium, 400);--ez-card-item--font-weight-large:var(--text-weight--large, 600);--ez-card-item--color:var(--title--primary, #2B3A54);--ez-card-item__key--color:var(--text--primary, #626e82);--ez-card-item__detail-label--color:var(--text--secondary, #A2ABB9);--ez-card-item__detail--padding-bottom:var(--space--extra-small, 3px);--ez-card-item__title--padding-bottom:var(--space--extra-small, 3px);--ez-card-item__highlight--color:var(--color--primary-300, #E2F4EF);width:100%;display:flex;cursor:pointer}.card-item{display:flex;flex-direction:column;width:100%;cursor:pointer;padding:12px;z-index:0;position:relative}.card-item:hover{background:#F0F3F7;border-radius:12px}.card-item__title{display:flex;align-items:center;line-height:18px;cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight-large);color:var(--ez-card-item--color);padding-bottom:var(--ez-card-item__title--padding-bottom);gap:var(--space--small, 6px)}.card-item__key{color:var(--ez-card-item__key--color)}.card-item__details{display:flex;cursor:pointer;justify-content:space-between;gap:var(--space--small, 6px)}.card-item__details-left{cursor:pointer;width:50%}.card-item__details-right{width:50%;cursor:pointer}.card-item__detail:not(:last-child){cursor:pointer;padding-bottom:var(--ez-card-item__detail--padding-bottom)}.card-item__detail-label{cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight);color:var(--ez-card-item__detail-label--color)}.card-item__detail-value{cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight);color:var(--ez-card-item--color)}.card-item__highlight{position:relative;border-radius:8px;z-index:-1;background-color:var(--ez-card-item__highlight--color);outline:2px solid var(--ez-card-item__highlight--color);box-shadow:-4px 0px 0px 0px var(--ez-card-item__highlight--color), \n 4px 0px 0px 0px var(--ez-card-item__highlight--color)}";
|
|
4
|
+
const ezCardItemCss = ":host{--ez-card-item--font-size:var(--text--medium, 14px);--ez-card-item--font-family:var(--font-pattern, Arial);--ez-card-item--font-weight:var(--text-weight--medium, 400);--ez-card-item--font-weight-large:var(--text-weight--large, 600);--ez-card-item--color:var(--title--primary, #2B3A54);--ez-card-item__key--color:var(--text--primary, #626e82);--ez-card-item__detail-label--color:var(--text--secondary, #A2ABB9);--ez-card-item__detail--padding-bottom:var(--space--extra-small, 3px);--ez-card-item__title--padding-bottom:var(--space--extra-small, 3px);--ez-card-item__highlight--color:var(--color--primary-300, #E2F4EF);width:100%;display:flex;cursor:pointer}.card-item{display:flex;flex-direction:column;width:100%;cursor:pointer;padding:12px;z-index:0;position:relative}.card-item:hover{background:#F0F3F7;border-radius:12px}.card-item__title{display:flex;align-items:center;line-height:18px;cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight-large);color:var(--ez-card-item--color);padding-bottom:var(--ez-card-item__title--padding-bottom);gap:var(--space--small, 6px)}.card-item__key{color:var(--ez-card-item__key--color)}.card-item__details{display:flex;cursor:pointer;justify-content:space-between;gap:var(--space--small, 6px)}.card-item__details-left{cursor:pointer;width:50%}.card-item__details-right{width:50%;cursor:pointer}.card-item__detail:not(:last-child){cursor:pointer;padding-bottom:var(--ez-card-item__detail--padding-bottom)}.card-item__detail-label{cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight);color:var(--ez-card-item__detail-label--color)}.card-item__detail-value{cursor:pointer;line-break:anywhere;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight);color:var(--ez-card-item--color)}.card-item__highlight{position:relative;border-radius:8px;z-index:-1;background-color:var(--ez-card-item__highlight--color);outline:2px solid var(--ez-card-item__highlight--color);box-shadow:-4px 0px 0px 0px var(--ez-card-item__highlight--color), \n 4px 0px 0px 0px var(--ez-card-item__highlight--color)}";
|
|
5
5
|
|
|
6
6
|
const EzCardItem = class {
|
|
7
7
|
constructor(hostRef) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-296b8458.js';
|
|
2
2
|
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
3
|
-
import { A as ApplicationUtils } from './ApplicationUtils-
|
|
3
|
+
import { A as ApplicationUtils } from './ApplicationUtils-ae588c9c.js';
|
|
4
4
|
import './DialogType-54a62731.js';
|
|
5
5
|
import './CheckMode-bdb2ec19.js';
|
|
6
6
|
|