@sankhyalabs/ezui 1.1.141 → 1.1.144
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-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-card-item.cjs.entry.js +44 -0
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +3 -2
- package/dist/cjs/ez-combo-box.cjs.entry.js +41 -20
- package/dist/cjs/ez-date-input.cjs.entry.js +16 -5
- package/dist/cjs/ez-date-time-input.cjs.entry.js +7 -1
- package/dist/cjs/ez-form.cjs.entry.js +74 -21
- package/dist/cjs/ez-grid.cjs.entry.js +2 -0
- package/dist/cjs/ez-number-input.cjs.entry.js +8 -1
- package/dist/cjs/ez-text-area.cjs.entry.js +35 -22
- package/dist/cjs/ez-text-input.cjs.entry.js +11 -9
- package/dist/cjs/ez-time-input.cjs.entry.js +5 -0
- package/dist/cjs/ez-upload.cjs.entry.js +28 -9
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/ez-button/ez-button.css +6 -0
- package/dist/collection/components/ez-card-item/ez-card-item.css +115 -0
- package/dist/collection/components/ez-card-item/ez-card-item.js +86 -0
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +4 -0
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.js +2 -1
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +43 -21
- package/dist/collection/components/ez-date-input/ez-date-input.js +49 -5
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +40 -1
- package/dist/collection/components/ez-form/DataBinder.js +54 -8
- package/dist/collection/components/ez-form/ez-form.js +14 -7
- package/dist/collection/components/ez-form/structure/FormSheetMetadata.js +7 -7
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +2 -0
- package/dist/collection/components/ez-number-input/ez-number-input.js +41 -1
- package/dist/collection/components/ez-text-area/ez-text-area.js +35 -22
- package/dist/collection/components/ez-text-input/ez-text-input.js +11 -9
- package/dist/collection/components/ez-time-input/ez-time-input.js +38 -0
- package/dist/collection/components/ez-upload/RemoteFile.js +6 -1
- package/dist/collection/components/ez-upload/ez-upload.js +36 -8
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +275 -94
- package/dist/esm/ez-button.entry.js +1 -1
- package/dist/esm/ez-card-item.entry.js +40 -0
- package/dist/esm/ez-collapsible-box.entry.js +3 -2
- package/dist/esm/ez-combo-box.entry.js +41 -20
- package/dist/esm/ez-date-input.entry.js +16 -5
- package/dist/esm/ez-date-time-input.entry.js +7 -1
- package/dist/esm/ez-form.entry.js +75 -22
- package/dist/esm/ez-grid.entry.js +2 -0
- package/dist/esm/ez-number-input.entry.js +8 -1
- package/dist/esm/ez-text-area.entry.js +35 -22
- package/dist/esm/ez-text-input.entry.js +11 -9
- package/dist/esm/ez-time-input.entry.js +5 -0
- package/dist/esm/ez-upload.entry.js +28 -9
- 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-024df41e.entry.js +1 -0
- package/dist/ezui/p-140f7085.entry.js +1 -0
- package/dist/ezui/p-24e98dc1.entry.js +1 -0
- package/dist/ezui/p-49fdfa4b.entry.js +1 -0
- package/dist/ezui/p-4fdceb7d.entry.js +1 -0
- package/dist/ezui/p-5a05f1ea.entry.js +1 -0
- package/dist/ezui/p-6395ed55.entry.js +1 -0
- package/dist/ezui/{p-1b2bf15d.entry.js → p-6816c9ee.entry.js} +1 -1
- package/dist/ezui/p-7746460e.entry.js +1 -0
- package/dist/ezui/p-b524dfca.entry.js +1 -0
- package/dist/ezui/{p-8cb2c629.entry.js → p-c15d4d6f.entry.js} +1 -1
- package/dist/ezui/p-c77c0022.entry.js +1 -0
- package/dist/ezui/p-ec21ecce.entry.js +1 -0
- package/dist/types/components/ez-card-item/ez-card-item.d.ts +23 -0
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +5 -1
- package/dist/types/components/ez-date-input/ez-date-input.d.ts +12 -1
- package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +11 -0
- package/dist/types/components/ez-form/DataBinder.d.ts +1 -0
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +1 -0
- package/dist/types/components/ez-number-input/ez-number-input.d.ts +11 -0
- package/dist/types/components/ez-text-area/ez-text-area.d.ts +4 -3
- package/dist/types/components/ez-text-input/ez-text-input.d.ts +1 -1
- package/dist/types/components/ez-time-input/ez-time-input.d.ts +10 -0
- package/dist/types/components/ez-upload/ez-upload.d.ts +5 -0
- package/dist/types/components.d.ts +53 -0
- package/package.json +2 -2
- package/react/components.d.ts +1 -0
- package/react/components.js +1 -0
- package/react/components.js.map +1 -1
- package/dist/ezui/p-248361f5.entry.js +0 -1
- package/dist/ezui/p-347b145b.entry.js +0 -1
- package/dist/ezui/p-9b82c2fe.entry.js +0 -1
- package/dist/ezui/p-b8d64970.entry.js +0 -1
- package/dist/ezui/p-c620258b.entry.js +0 -1
- package/dist/ezui/p-cabe3671.entry.js +0 -1
- package/dist/ezui/p-cb73bee7.entry.js +0 -1
- package/dist/ezui/p-db0981c1.entry.js +0 -1
- package/dist/ezui/p-dd6f4872.entry.js +0 -1
- package/dist/ezui/p-ec8419f1.entry.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLElement as HTMLElement$1, createEvent, h, forceUpdate, Host, proxyCustomElement } from '@stencil/core/internal/client';
|
|
2
2
|
export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
|
|
3
|
-
import { FloatingManager, DateUtils, TimeFormatter, UserInterface, Action, ApplicationContext, DataUnitAction, DataUnit, NumberUtils, DataType, StringUtils, MaskFormatter } from '@sankhyalabs/core';
|
|
3
|
+
import { FloatingManager, DateUtils, TimeFormatter, UserInterface, Action, WaitingChangeException, ApplicationContext, DataUnitAction, DataUnit, NumberUtils, DataType, StringUtils, MaskFormatter } from '@sankhyalabs/core';
|
|
4
4
|
import { UserInterface as UserInterface$1, SortMode } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
5
5
|
|
|
6
6
|
const ezApplicationCss = "";
|
|
@@ -23,7 +23,7 @@ let EzApplication$1 = class extends HTMLElement$1 {
|
|
|
23
23
|
static get style() { return ezApplicationCss; }
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
-
const ezButtonCss = ":host{--ez-button--min-width:100px;--ez-button--height:42px;--ez-button__icon--width:18px;--ez-button__inline__icon--padding:12px;--ez-button--padding-top:var(--space--medium, 12px);--ez-button--padding-bottom:var(--space--medium, 12px);--ez-button--padding-right:var(--space--large, 24px);--ez-button--padding-left:var(--space--large, 24px);--ez-button--color:var(--title--primary, #FFF);--ez-button--font-size:var(--text--medium, 14px);--ez-button--font-family:var(--font-pattern, Arial);--ez-button--font-weight:var(--text-weight--large);--ez-button--background-color:var(--background--medium, #c0c0c0);--ez-button--border-radius:var(--border--radius-large, 12px);--ez-button--border:none;--ez-button--hover-color:var(--color--primary-600);--ez-button--hover--background-color:var(--background--medium, var(--ez-button--background-color));--ez-button--disabled-color:var(--text--disable);--ez-button--disabled--background-color:var(--color--disable-secondary);--ez-button--focus--border:var(--border--xlarge, 4px solid) var(--color--primary-300);--ez-button--focus--box-shadow:none;--ez-button--active-color:var(--color--primary-700);--ez-button--active--background-color:var(--background--strong);--ez-button--link-color:var(--color--primary, '#008561');--ez-button--link--hover-color:var(--color--primary-700, '#1C1D22');--ez-button--link--small--font-size:var(--text--small, 12px);--ez-button--link--medium--font-size:var(--text--medium, 14px);--ez-button--link--large--font-size:var(--text--large, 16px)}ez-icon{--ez-icon--color:inherit}button{display:flex;align-items:center;justify-content:center;margin:0;cursor:pointer;transition:background-color 0.2s linear;min-width:var(--ez-button--min-width);height:var(--ez-button--height);font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);padding:var(--ez-button--padding-top) var(--ez-button--padding-right) var(--ez-button--padding-bottom) var(--ez-button--padding-left);border-radius:var(--ez-button--border-radius);background-color:var(--ez-button--background-color);color:var(--ez-button--color);fill:var(--ez-button--color);border:var(--ez-button--border)}button:focus{outline:var(--ez-button--focus--border);box-shadow:var(--ez-button--focus--box-shadow)}button:hover{outline:none;background-color:var(--ez-button--hover--background-color);color:var(--ez-button--hover-color);fill:var(--ez-button--hover-color);--ez-icon--color:var(--ez-button--hover-color)}button:active{outline:none;box-shadow:none;background-color:var(--ez-button--active--background-color);color:var(--ez-button--active-color);fill:var(--ez-button--active-color);--ez-icon--color:var(--ez-button--active-color)}button:disabled{background-color:var(--ez-button--disabled--background-color);color:var(--ez-button--disabled-color);fill:var(--ez-button--disabled-color);border:none;--ez-icon--color:var(--ez-button--disabled-color);cursor:no-drop}.small{height:32px;--ez-button--font-size:var(--text--small, 12px)}.medium{height:42px}.large{height:46px}.btn-icon{padding:0px}.btn-icon--medium{width:42px;min-width:42px;height:42px}.btn-icon--small{width:32px;min-width:32px;height:32px}.btn-icon--large{width:46px;min-width:46px;height:46px}.label-icon{display:flex;flex-direction:column;align-items:center;color:var(--ez-button--color)}.label-icon:hover{color:var(--ez-button--hover-color);fill:var(--ez-button--hover-color);--ez-icon--color:var(--ez-button--hover-color)}.label-icon:active{color:var(--ez-button--active-color);fill:var(--ez-button--active-color);--ez-icon--color:var(--ez-button--active-color)}.label-icon label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);user-select:none}button:disabled+label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);color:var(--ez-button--disabled-color);cursor:no-drop}div.label-icon{cursor:pointer}div.label-icon,button:disabled{cursor:no-drop}a{font-family:var(--ez-button--font-family);font-weight:var(--ez-button--font-weight);color:var(--ez-button--link-color);cursor:pointer;display:flex;align-items:center;justify-content:center;}a:hover{color:var(--ez-button--link--hover-color)}a.small{font-size:var(--ez-button--link--small--font-size);line-height:var(--ez-button--link--small--font-size)}a.medium{font-size:var(--ez-button--link--medium--font-size);line-height:var(--ez-button--link--medium--font-size)}a.large{font-size:var(--ez-button--link--large--font-size);line-height:var(--ez-button--link--large--font-size)}";
|
|
26
|
+
const ezButtonCss = ":host{--ez-button--min-width:100px;--ez-button--height:42px;--ez-button__icon--width:18px;--ez-button__inline__icon--padding:12px;--ez-button--padding-top:var(--space--medium, 12px);--ez-button--padding-bottom:var(--space--medium, 12px);--ez-button--padding-right:var(--space--large, 24px);--ez-button--padding-left:var(--space--large, 24px);--ez-button--color:var(--title--primary, #FFF);--ez-button--font-size:var(--text--medium, 14px);--ez-button--font-family:var(--font-pattern, Arial);--ez-button--font-weight:var(--text-weight--large);--ez-button--background-color:var(--background--medium, #c0c0c0);--ez-button--border-radius:var(--border--radius-large, 12px);--ez-button--border:none;--ez-button--hover-color:var(--color--primary-600);--ez-button--hover--background-color:var(--background--medium, var(--ez-button--background-color));--ez-button--disabled-color:var(--text--disable);--ez-button--disabled--background-color:var(--color--disable-secondary);--ez-button--focus--border:var(--border--xlarge, 4px solid) var(--color--primary-300);--ez-button--focus--box-shadow:none;--ez-button--active-color:var(--color--primary-700);--ez-button--active--background-color:var(--background--strong);--ez-button--link-color:var(--color--primary, '#008561');--ez-button--link--hover-color:var(--color--primary-700, '#1C1D22');--ez-button--link--small--font-size:var(--text--small, 12px);--ez-button--link--medium--font-size:var(--text--medium, 14px);--ez-button--link--large--font-size:var(--text--large, 16px)}ez-icon{--ez-icon--color:inherit}button{display:flex;align-items:center;justify-content:center;margin:0;cursor:pointer;transition:background-color 0.2s linear;min-width:var(--ez-button--min-width);height:var(--ez-button--height);font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);padding:var(--ez-button--padding-top) var(--ez-button--padding-right) var(--ez-button--padding-bottom) var(--ez-button--padding-left);border-radius:var(--ez-button--border-radius);background-color:var(--ez-button--background-color);color:var(--ez-button--color);fill:var(--ez-button--color);border:var(--ez-button--border)}button:focus{outline:var(--ez-button--focus--border);box-shadow:var(--ez-button--focus--box-shadow)}button:hover{outline:none;background-color:var(--ez-button--hover--background-color);color:var(--ez-button--hover-color);fill:var(--ez-button--hover-color);--ez-icon--color:var(--ez-button--hover-color)}button:focus{outline:none;outline:var(--ez-button--focus--border);box-shadow:var(--ez-button--focus--box-shadow)}button:active{outline:none;box-shadow:none;background-color:var(--ez-button--active--background-color);color:var(--ez-button--active-color);fill:var(--ez-button--active-color);--ez-icon--color:var(--ez-button--active-color)}button:disabled{background-color:var(--ez-button--disabled--background-color);color:var(--ez-button--disabled-color);fill:var(--ez-button--disabled-color);border:none;--ez-icon--color:var(--ez-button--disabled-color);cursor:no-drop}.small{height:32px;--ez-button--font-size:var(--text--small, 12px)}.medium{height:42px}.large{height:46px}.btn-icon{padding:0px}.btn-icon--medium{width:42px;min-width:42px;height:42px}.btn-icon--small{width:32px;min-width:32px;height:32px}.btn-icon--large{width:46px;min-width:46px;height:46px}.label-icon{display:flex;flex-direction:column;align-items:center;color:var(--ez-button--color)}.label-icon:hover{color:var(--ez-button--hover-color);fill:var(--ez-button--hover-color);--ez-icon--color:var(--ez-button--hover-color)}.label-icon:active{color:var(--ez-button--active-color);fill:var(--ez-button--active-color);--ez-icon--color:var(--ez-button--active-color)}.label-icon label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);user-select:none}button:disabled+label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);color:var(--ez-button--disabled-color);cursor:no-drop}div.label-icon{cursor:pointer}div.label-icon,button:disabled{cursor:no-drop}a{font-family:var(--ez-button--font-family);font-weight:var(--ez-button--font-weight);color:var(--ez-button--link-color);cursor:pointer;display:flex;align-items:center;justify-content:center;}a:hover{color:var(--ez-button--link--hover-color)}a.small{font-size:var(--ez-button--link--small--font-size);line-height:var(--ez-button--link--small--font-size)}a.medium{font-size:var(--ez-button--link--medium--font-size);line-height:var(--ez-button--link--medium--font-size)}a.large{font-size:var(--ez-button--link--large--font-size);line-height:var(--ez-button--link--large--font-size)}";
|
|
27
27
|
|
|
28
28
|
let EzButton$1 = class extends HTMLElement$1 {
|
|
29
29
|
constructor() {
|
|
@@ -312,6 +312,45 @@ let EzCalendar$1 = class extends HTMLElement$1 {
|
|
|
312
312
|
static get style() { return ezCalendarCss; }
|
|
313
313
|
};
|
|
314
314
|
|
|
315
|
+
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, #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{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)}.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)}";
|
|
316
|
+
|
|
317
|
+
let EzCardItem$1 = class extends HTMLElement$1 {
|
|
318
|
+
constructor() {
|
|
319
|
+
super();
|
|
320
|
+
this.__registerHost();
|
|
321
|
+
this.__attachShadow();
|
|
322
|
+
this.ezClick = createEvent(this, "ezClick", 7);
|
|
323
|
+
}
|
|
324
|
+
componentWillRender() {
|
|
325
|
+
this.createDetailList();
|
|
326
|
+
}
|
|
327
|
+
createDetailList() {
|
|
328
|
+
var _a, _b, _c;
|
|
329
|
+
this._details = { detailsLeft: [], detailsRight: [] };
|
|
330
|
+
let cont = 0;
|
|
331
|
+
if ((_a = this.item) === null || _a === void 0 ? void 0 : _a.details) {
|
|
332
|
+
for (const attribute in this.item.details) {
|
|
333
|
+
cont < 3 ?
|
|
334
|
+
this._details.detailsLeft.push({ label: attribute, value: (_b = this.item.details[attribute]) === null || _b === void 0 ? void 0 : _b.toString() }) :
|
|
335
|
+
this._details.detailsRight.push({ label: attribute, value: (_c = this.item.details[attribute]) === null || _c === void 0 ? void 0 : _c.toString() });
|
|
336
|
+
cont++;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
buildDetailContent(detail) {
|
|
341
|
+
return h("div", { class: "card-item__detail" }, h("label", { class: "card-item__detail-label" }, detail.label), ": ", h("label", { class: "card-item__detail-value", innerHTML: detail.value }));
|
|
342
|
+
}
|
|
343
|
+
render() {
|
|
344
|
+
return (h(Host, null, this.item &&
|
|
345
|
+
h("div", { class: "card-item", onClick: () => { this.ezClick.emit(this.item); } }, h("label", { class: "card-item__title", innerHTML: this.item.key + ' - ' + this.item.title }), h("div", { class: "card-item__details" }, h("div", { class: "card-item__details-left" }, this._details.detailsLeft.map(detail => {
|
|
346
|
+
return this.buildDetailContent(detail);
|
|
347
|
+
})), h("div", { class: "card-item__details-right" }, this._details.detailsRight.map(detail => {
|
|
348
|
+
return this.buildDetailContent(detail);
|
|
349
|
+
}))))));
|
|
350
|
+
}
|
|
351
|
+
static get style() { return ezCardItemCss; }
|
|
352
|
+
};
|
|
353
|
+
|
|
315
354
|
const ezCheckCss = ":host{--ez-check--box--width:18px;--ez-check--box--height:18px;--ez-check--width:calc(var(--ez-check--box--width) + 14px);--ez-check--height:calc(var(--ez-check--box--width) + 14px);--ez-check--border-radius:var(--border--radius-small);--ez-check--checked--background-color:var(--color--primary-200);--ez-check--focus--background-color:var(--color--strokes, #FFFFFF);--ez-check--hover--background-color:var(--background--medium);--ez-check--checked--disabled--background-color:var(--color--disable-secondary);--ez-check--border:var(--border--medium) var(--title--primary);--ez-check--disabled--border:var(--border--medium) var(--color--strokes);--ez-check--checked--border:var(--border--medium) var(--color--primary);--ez-check--checked--hover--background-color:var(--color--primary-200);--ez-check--checked--focus--background-color:var(--color--primary-300, #FFFFFF);--ez-check--check--image:url('data:image/svg+xml;utf8,<svg width=\"8\" height=\"7\" viewBox=\"0 0 8 7\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M7.70002 0.398999L7.48502 0.207997C7.31524 0.0598858 7.09376 -0.0150438 6.86894 -0.000430025C6.64411 0.0141838 6.43419 0.117153 6.28502 0.285997L2.70002 4.332L1.61802 3.384C1.44837 3.23576 1.22697 3.16067 1.00214 3.17509C0.77732 3.18952 0.567332 3.2923 0.418019 3.461L0.229019 3.674C0.0752361 3.84797 -0.00437434 4.07521 0.00721192 4.30713C0.0187982 4.53904 0.120661 4.75722 0.291019 4.915L2.27402 6.762C2.35832 6.8432 2.45842 6.90618 2.56811 6.94702C2.67779 6.98787 2.79471 7.00571 2.91159 6.99942C3.02846 6.99314 3.14279 6.96287 3.24747 6.91049C3.35214 6.85812 3.44492 6.78477 3.52002 6.695L7.79102 1.638C7.94063 1.46048 8.01486 1.23149 7.99786 0.999963C7.98085 0.768436 7.87396 0.552749 7.70002 0.398999Z\"/></svg>');--ez-check--check--background-color:var(--color--primary);--ez-check--check--disabled--background-color:var(--color--strokes);--ez-switch--slider--width:34px;--ez-switch--slider--height:14px;--ez-switch--pin--width:19px;--ez-switch--pin--height:19px;--ez-switch--focus--width:32px;--ez-switch--focus--height:32px;--ez-switch--background-color:var(--color--strokes);--ez-switch--disabled--background-color:var(--color--disable-secondary);--ez-switch--disabled--checked--background-color:var(--color--primary-300);--ez-switch--checked--background-color:var(--color--primary);--ez-switch--pin--background-color:var(--background--xlight);--ez-switch--pin--disabled--background-color:var(--color--disable-primary);--ez-switch--pin--checked--background-color:var(--background--xlight);--ez-switch--pin--checked--disabled--background-color:#E8F7F4;--ez-switch--pin--focus--background-color:var(--text--disable);--ez-switch--pin--checked--focus--background-color:var(--color--primary);--ez-switch--pin--border-color:var(--text--primary);--ez-switch--pin--disabled--border-color:var(--text--secondary);--ez-check--label--font-size:var(--text--medium, 14px);--ez-check--label--font-family:var(--font-pattern, Arial);--ez-check--label--color:var(--title--primary, #000);--ez-check--label--disabled--color:var(--text--disable, #AFB6C0);display:flex;width:100%;align-items:center;margin:0}input.regularMode{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;box-sizing:border-box;-webkit-appearance:none;appearance:none;cursor:pointer;border-radius:50%;position:relative;width:var(--ez-check--width);height:var(--ez-check--height)}input.regularMode:enabled:hover{background-color:var(--ez-check--hover--background-color)}input.regularMode:enabled:focus{outline:none;background-color:var(--ez-check--focus--background-color)}input.regularMode:disabled{cursor:auto;background:none}input.regularMode::before{box-sizing:border-box;content:\"\";display:block;width:var(--ez-check--box--width);height:var(--ez-check--box--height);border-radius:var(--ez-check--border-radius);border:var(--ez-check--border)}input.regularMode:disabled::before{border:var(--ez-check--disabled--border)}input.regularMode:checked:enabled:hover{background-color:var(--ez-check--checked--hover--background-color)}input.regularMode:checked:enabled:focus{background-color:var(--ez-check--checked--focus--background-color)}input.regularMode:checked::before{border:var(--ez-check--checked--border);background-color:var(--ez-check--checked--background-color)}input.regularMode:checked:disabled:before{border:var(--ez-check--disabled--border);background-color:var(--ez-check--checked--disabled--background-color)}input.regularMode:checked::after{display:flex;position:absolute;content:\"\";background-color:var(--ez-check--check--background-color);width:8px;height:7px;-webkit-mask-image:var(--ez-check--check--image);mask-image:var(--ez-check--check--image)}input.regularMode:checked:disabled::after{background-color:var(--ez-check--check--disabled--background-color)}input.switchMode{flex-shrink:0;-webkit-appearance:none;appearance:none;position:relative;outline:none;cursor:pointer;border-radius:20px;border:var(--border--small, 1px solid) var(--ez-switch--pin--border-color, #626e82);transition:background-color var(--transition);width:var(--ez-switch--slider--width);height:var(--ez-switch--slider--height);background-color:var(--ez-switch--background-color)}input.switchMode:disabled{background-color:var(--ez-switch--disabled--background-color);border:var(--border--small, 1px solid) var(--ez-switch--pin--disabled--border-color, #a2abb9)}input.switchMode:checked:disabled{background-color:var(--ez-switch--disabled--checked--background-color)}input.switchMode::after{content:\"\";display:block;position:absolute;box-shadow:var(--shadow);transition:transform var(--transition);transition:background-color var(--transition);transition:border-color var(--transition);transform:translateX(-2px) translateY(-4px);border-radius:50%;border:var(--border--small, 1px solid) var(--ez-switch--pin--border-color, #626e82);width:var(--ez-switch--pin--width);height:var(--ez-switch--pin--height);background-color:var(--ez-switch--pin--background-color)}input.switchMode:disabled::after{background-color:var(--ez-switch--pin--disabled--background-color);border:var(--border--small, 1px solid) var(--ez-switch--pin--disabled--border-color, #a2abb9)}input.switchMode:checked{transition:background-color var(--transition), border var(--transition);background-color:var(--ez-switch--checked--background-color);border:var(--border--small, 1px solid) var(--color--primary, #008561)}input.switchMode::before{display:block;content:\"\";display:block;position:absolute;border-radius:50%;opacity:0;width:var(--ez-switch--focus--width);height:var(--ez-switch--focus--height);top:calc((var(--ez-switch--slider--height) - var(--ez-switch--focus--height)) / 2);left:calc((var(--ez-switch--pin--width) - var(--ez-switch--focus--width) - 2px) / 2);background-color:var(--ez-switch--pin--focus--background-color)}input.switchMode:focus::before{opacity:0.24;transition:opacity var(--transition)}input.switchMode:checked:focus::before{background-color:var(--ez-switch--pin--checked--focus--background-color);transform:translateX(calc(var(--ez-switch--slider--width) - var(--ez-switch--pin--width) + 2px))}input.switchMode:checked::after{transition:transform var(--transition);transition:background-color var(--transition);transition:border-color var(--transition);transform:translateX(calc(var(--ez-switch--slider--width) - var(--ez-switch--pin--width))) translateY(-4px);box-shadow:var(--shadow);background-color:var(--ez-switch--pin--checked--background-color);border:var(--border--small, 1px solid) var(--color--primary, #008561)}input.switchMode:checked:disabled::after{background-color:var(--ez-switch--pin--checked--disabled--background-color)}.label{flex-shrink:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-check--label--color);text-shadow:var(--text-shadow);font-size:var(--ez-check--label--font-size);font-family:var(--ez-check--label--font-family);cursor:default;padding-left:var(--space--small)}.label--disabled{color:var(--ez-check--label--disabled--color)}";
|
|
316
355
|
|
|
317
356
|
let EzCheck$1 = class extends HTMLElement$1 {
|
|
@@ -479,7 +518,7 @@ let EzChip$1 = class extends HTMLElement$1 {
|
|
|
479
518
|
static get style() { return ezChipCss; }
|
|
480
519
|
};
|
|
481
520
|
|
|
482
|
-
const ezCollapsibleBoxCss = ":host{--ez-collapsible-box--font-size:var(--title--medium, 14px);--ez-collapsible-box--font-family:var(--font-pattern, Arial);--ez-collapsible-box--font-weight:var(--text-weight--large, 600);--ez-collapsible-box--color:var(--title--primary);--ez-collapsible-box--focus--color:var(--color--primary-600);--ez-collapsible-box__icon--color:var(--ez-collapsible-box--color);--ez-collapsible-box__header--padding-top:0px;--ez-collapsible-box__header--padding-bottom:0px;--ez-collapsible-box__header--padding-right:0px;--ez-collapsible-box__header--padding-left:0px;display:flex;flex-wrap:wrap;width:100%}ez-icon{--ez-icon--color:inherit}.collapsible-box{display:flex;flex-direction:column;width:100%}.collapsible-box__header{display:flex;box-sizing:border-box;padding-top:var(--ez-collapsible-box__header--padding-top);padding-bottom:var(--ez-collapsible-box__header--padding-bottom);padding-right:var(--ez-collapsible-box__header--padding-right);padding-left:var(--ez-collapsible-box__header--padding-left)}.collapsible-box__title{position:relative;width:auto;display:flex;box-sizing:border-box;align-items:center;outline:none;border:none;background-color:unset;cursor:pointer;padding:0px;text-align:left;color:var(--ez-collapsible-box--color);--ez-icon--color:var(--ez-collapsible-box__icon--color);margin-bottom:var(--space--medium, 12px)}.collapsible-box__title:focus{color:var(--ez-collapsible-box--focus--color);--ez-icon--color:var(--ez-collapsible-box--focus--color)}.collapsible-box__label{white-space:nowrap;overflow:hidden;cursor:pointer;text-overflow:ellipsis;box-sizing:border-box;margin-left:6px;font-family:var(--ez-collapsible-box--font-family);font-size:var(--ez-collapsible-box--font-size);font-weight:var(--ez-collapsible-box--font-weight)}.collapsible-box__icon{transform:rotate(90deg) translate(0px, 14%);transition:transform var(--transition)}.collapsible-box__icon--collapsed{transform:rotate(0deg) translate(-14%, 0px)}.collapsible-box__title--icon-right{flex-direction:row-reverse}.collapsible-box__title--icon-right .collapsible-box__icon{transform:rotate(90deg) translate(0px, -14%)}.collapsible-box__title--icon-right .collapsible-box__icon--collapsed{transform:rotate(0deg) translate(14%, 0px)}.collapsible-box__title--icon-right .collapsible-box__label{margin-left:0px;margin-right:6px}.collapsible-box__title--stretched{width:100%;justify-content:space-between}.collapsible-box__content{display:flex;flex-wrap:wrap;width:100%;height:0px;max-height:0px;opacity:0;overflow:hidden;transition:all var(--transition, 0.5s)}.collapsible-box__content--show{height:100%;max-height:none;opacity:1;overflow:visible;transition:all var(--transition, 0.5s)}.font--x-small{font-size:10px}.font--small{font-size:12px}.font--medium{font-size:14px}.font--large{font-size:16px}.font--x-large{font-size:20px}";
|
|
521
|
+
const ezCollapsibleBoxCss = ":host{--ez-collapsible-box--font-size:var(--title--medium, 14px);--ez-collapsible-box--font-family:var(--font-pattern, Arial);--ez-collapsible-box--font-weight:var(--text-weight--large, 600);--ez-collapsible-box--color:var(--title--primary);--ez-collapsible-box--focus--color:var(--color--primary-600);--ez-collapsible-box__icon--color:var(--ez-collapsible-box--color);--ez-collapsible-box__header--padding-top:0px;--ez-collapsible-box__header--padding-bottom:0px;--ez-collapsible-box__header--padding-right:0px;--ez-collapsible-box__header--padding-left:0px;display:flex;flex-wrap:wrap;width:100%}ez-icon{--ez-icon--color:inherit}.collapsible-box{display:flex;flex-direction:column;width:100%}.collapsible-box__header{display:flex;box-sizing:border-box;padding-top:var(--ez-collapsible-box__header--padding-top);padding-bottom:var(--ez-collapsible-box__header--padding-bottom);padding-right:var(--ez-collapsible-box__header--padding-right);padding-left:var(--ez-collapsible-box__header--padding-left)}.collapsible-box__title{position:relative;width:auto;display:flex;box-sizing:border-box;align-items:center;outline:none;border:none;background-color:unset;cursor:pointer;padding:0px;text-align:left;color:var(--ez-collapsible-box--color);--ez-icon--color:var(--ez-collapsible-box__icon--color);margin-bottom:var(--space--medium, 12px)}.collapsible-box__title:focus{color:var(--ez-collapsible-box--focus--color);--ez-icon--color:var(--ez-collapsible-box--focus--color)}.collapsible-box__label{white-space:nowrap;overflow:hidden;cursor:pointer;text-overflow:ellipsis;box-sizing:border-box;margin-left:6px;font-family:var(--ez-collapsible-box--font-family);font-size:var(--ez-collapsible-box--font-size);font-weight:var(--ez-collapsible-box--font-weight)}.collapsible-box__icon{transform:rotate(90deg) translate(0px, 14%);transition:transform var(--transition)}.collapsible-box__icon--collapsed{transform:rotate(0deg) translate(-14%, 0px)}.collapsible-box__title--icon-right{flex-direction:row-reverse}.collapsible-box__title--icon-right .collapsible-box__icon{transform:rotate(90deg) translate(0px, -14%)}.collapsible-box__title--icon-right .collapsible-box__icon--collapsed{transform:rotate(0deg) translate(14%, 0px)}.collapsible-box__title--icon-right .collapsible-box__label{margin-left:0px;margin-right:6px}.collapsible-box__title--stretched{width:100%;justify-content:space-between}.collapsible-box__title--no-margin{margin-bottom:0}.collapsible-box__content{display:flex;flex-wrap:wrap;width:100%;height:0px;max-height:0px;opacity:0;overflow:hidden;transition:all var(--transition, 0.5s)}.collapsible-box__content--show{height:100%;max-height:none;opacity:1;overflow:visible;transition:all var(--transition, 0.5s)}.font--x-small{font-size:10px}.font--small{font-size:12px}.font--medium{font-size:14px}.font--large{font-size:16px}.font--x-large{font-size:20px}";
|
|
483
522
|
|
|
484
523
|
let EzCollapsibleBox$1 = class extends HTMLElement$1 {
|
|
485
524
|
constructor() {
|
|
@@ -526,7 +565,8 @@ let EzCollapsibleBox$1 = class extends HTMLElement$1 {
|
|
|
526
565
|
render() {
|
|
527
566
|
return (h("div", { class: "collapsible-box" }, h("div", { class: "collapsible-box__header" }, h("button", { onClick: () => this.showHide(), class: "collapsible-box__title" +
|
|
528
567
|
(this.iconPlacement === "right" ? " collapsible-box__title--icon-right" : "") +
|
|
529
|
-
(this.stretchTitle ? " collapsible-box__title--stretched" : "")
|
|
568
|
+
(this.stretchTitle ? " collapsible-box__title--stretched" : "") +
|
|
569
|
+
(this.value ? " collapsible-box__title--no-margin" : "") }, h("ez-icon", { slot: "icon", "icon-name": "chevron-right", size: this.getHeaderSize(), class: "collapsible-box__icon collapsible-box__icon--" + this.getHeaderSize() + (this.value ? " collapsible-box__icon--collapsed" : "") }), h("label", { class: "collapsible-box__label font--" + this.getHeaderSize(), title: this.label }, this.label))), h("div", { class: "collapsible-box__content" + (this.value ? "" : " collapsible-box__content--show") }, h("slot", null))));
|
|
530
570
|
}
|
|
531
571
|
static get watchers() { return {
|
|
532
572
|
"value": ["observeCollapsedValue"]
|
|
@@ -560,6 +600,9 @@ let EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
560
600
|
this.__registerHost();
|
|
561
601
|
this.__attachShadow();
|
|
562
602
|
this.ezChange = createEvent(this, "ezChange", 7);
|
|
603
|
+
this._limitCharsToSearch = 3;
|
|
604
|
+
this._deboucingTime = 300;
|
|
605
|
+
this._startLoading = false;
|
|
563
606
|
/**
|
|
564
607
|
* Deixa o campo disponível ou não para interação com usuário.
|
|
565
608
|
*/
|
|
@@ -696,19 +739,8 @@ let EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
696
739
|
this._preSelection = undefined;
|
|
697
740
|
}
|
|
698
741
|
}
|
|
699
|
-
selectOption(opt) {
|
|
700
|
-
const currentOpt = this.getSelectedOption();
|
|
701
|
-
if (currentOpt !== opt) {
|
|
702
|
-
const adjustedOpt = !(opt === null || opt === void 0 ? void 0 : opt.value) ? undefined : opt;
|
|
703
|
-
this.value = adjustedOpt;
|
|
704
|
-
this.errorMessage = "";
|
|
705
|
-
this.ezChange.emit(adjustedOpt);
|
|
706
|
-
}
|
|
707
|
-
else {
|
|
708
|
-
this.observeValue();
|
|
709
|
-
}
|
|
710
|
-
}
|
|
711
742
|
updateSource(source) {
|
|
743
|
+
this._startLoading = false;
|
|
712
744
|
if (source instanceof Promise) {
|
|
713
745
|
source.then(result => this.updateSource(result));
|
|
714
746
|
this.updateVisibleOptions();
|
|
@@ -719,12 +751,26 @@ let EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
719
751
|
this.updateVisibleOptions();
|
|
720
752
|
}
|
|
721
753
|
else {
|
|
722
|
-
this.
|
|
754
|
+
this.selectOption(source);
|
|
723
755
|
}
|
|
724
756
|
}
|
|
725
757
|
}
|
|
758
|
+
selectOption(newOption) {
|
|
759
|
+
var _a, _b;
|
|
760
|
+
const currentOpt = this.getSelectedOption();
|
|
761
|
+
if (((_a = currentOpt === null || currentOpt === void 0 ? void 0 : currentOpt.value) === null || _a === void 0 ? void 0 : _a.toString()) !== ((_b = newOption === null || newOption === void 0 ? void 0 : newOption.value) === null || _b === void 0 ? void 0 : _b.toString())) {
|
|
762
|
+
const adjustedOpt = !(newOption === null || newOption === void 0 ? void 0 : newOption.value) ? undefined : newOption;
|
|
763
|
+
this.value = adjustedOpt;
|
|
764
|
+
this.errorMessage = "";
|
|
765
|
+
this.ezChange.emit(this.value);
|
|
766
|
+
}
|
|
767
|
+
else {
|
|
768
|
+
this.observeValue();
|
|
769
|
+
}
|
|
770
|
+
}
|
|
726
771
|
loadOptions(mode, argument = "") {
|
|
727
772
|
this._criteria = argument;
|
|
773
|
+
this._startLoading = true;
|
|
728
774
|
if (this.optionLoader) {
|
|
729
775
|
this.updateSource(this.optionLoader({ mode, argument }));
|
|
730
776
|
}
|
|
@@ -781,25 +827,40 @@ let EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
781
827
|
this.searchMode ? this.loadOptions("ADVANCED") : this.showOptions();
|
|
782
828
|
}
|
|
783
829
|
onTextInputChangeHandler(event) {
|
|
830
|
+
var _a;
|
|
831
|
+
this.clearDeboucingTimeout();
|
|
832
|
+
if (this._startLoading) {
|
|
833
|
+
this._changeDeboucingTimeout = window.setTimeout(() => {
|
|
834
|
+
this.onTextInputChangeHandler(event);
|
|
835
|
+
}, this._deboucingTime);
|
|
836
|
+
return;
|
|
837
|
+
}
|
|
784
838
|
if (!this._criteria) {
|
|
785
839
|
this._inputElement.value = event.data;
|
|
786
840
|
}
|
|
787
|
-
const argument = event.target.value;
|
|
841
|
+
const argument = (_a = event.target.value) === null || _a === void 0 ? void 0 : _a.trim();
|
|
842
|
+
const argumentNumber = Number(argument || undefined);
|
|
788
843
|
this._criteria = argument;
|
|
789
|
-
if (this.
|
|
844
|
+
if (argument && (!isNaN(argumentNumber) || argument.length >= this._limitCharsToSearch)) {
|
|
790
845
|
if (this.searchMode) {
|
|
791
|
-
if (this._changeDeboucingTimeout) {
|
|
792
|
-
window.clearTimeout(this._changeDeboucingTimeout);
|
|
793
|
-
}
|
|
794
846
|
this._changeDeboucingTimeout = window.setTimeout(() => {
|
|
795
|
-
this.loadOptions("PREDICTIVE", argument);
|
|
796
|
-
},
|
|
847
|
+
this.loadOptions("PREDICTIVE", isNaN(argumentNumber) ? argument : argumentNumber.toString());
|
|
848
|
+
}, this._deboucingTime);
|
|
797
849
|
}
|
|
798
850
|
else {
|
|
799
851
|
this.updateVisibleOptions();
|
|
800
852
|
}
|
|
801
853
|
this.showOptions();
|
|
802
854
|
}
|
|
855
|
+
else {
|
|
856
|
+
this.hideOptions();
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
clearDeboucingTimeout() {
|
|
860
|
+
if (this._changeDeboucingTimeout) {
|
|
861
|
+
window.clearTimeout(this._changeDeboucingTimeout);
|
|
862
|
+
this._changeDeboucingTimeout = undefined;
|
|
863
|
+
}
|
|
803
864
|
}
|
|
804
865
|
onTextInputClickHandler() {
|
|
805
866
|
if (!this.searchMode) {
|
|
@@ -844,6 +905,8 @@ let EzDateInput$1 = class extends HTMLElement$1 {
|
|
|
844
905
|
this.__registerHost();
|
|
845
906
|
this.__attachShadow();
|
|
846
907
|
this.ezChange = createEvent(this, "ezChange", 7);
|
|
908
|
+
this.ezStartChange = createEvent(this, "ezStartChange", 7);
|
|
909
|
+
this.ezCancelWaitingChange = createEvent(this, "ezCancelWaitingChange", 7);
|
|
847
910
|
/**
|
|
848
911
|
* Deixa o campo disponível ou não para uso.
|
|
849
912
|
*/
|
|
@@ -857,11 +920,16 @@ let EzDateInput$1 = class extends HTMLElement$1 {
|
|
|
857
920
|
this._textInput.label = this.label;
|
|
858
921
|
}
|
|
859
922
|
observeErrorMessage() {
|
|
860
|
-
this._textInput.errorMessage = this.errorMessage;
|
|
861
|
-
}
|
|
862
|
-
observeValue() {
|
|
863
923
|
if (this._textInput) {
|
|
864
|
-
this._textInput.
|
|
924
|
+
this._textInput.errorMessage = this.errorMessage;
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
observeValue(newValue, oldValue) {
|
|
928
|
+
if (newValue != oldValue) {
|
|
929
|
+
if (this._textInput) {
|
|
930
|
+
this.errorMessage = "";
|
|
931
|
+
this._textInput.value = this.getTextValue(this.value);
|
|
932
|
+
}
|
|
865
933
|
}
|
|
866
934
|
}
|
|
867
935
|
/**
|
|
@@ -911,12 +979,16 @@ let EzDateInput$1 = class extends HTMLElement$1 {
|
|
|
911
979
|
}
|
|
912
980
|
}
|
|
913
981
|
else {
|
|
982
|
+
this.ezCancelWaitingChange.emit();
|
|
914
983
|
this._textInput.errorMessage = "O valor digitado não é uma data válida";
|
|
915
984
|
}
|
|
916
985
|
}
|
|
917
986
|
getTextValue(d) {
|
|
918
987
|
return d ? new Intl.DateTimeFormat("pt-BR").format(d) : undefined;
|
|
919
988
|
}
|
|
989
|
+
startChange() {
|
|
990
|
+
this.ezStartChange.emit({ waitmessage: "", blocking: false });
|
|
991
|
+
}
|
|
920
992
|
componentDidLoad() {
|
|
921
993
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
922
994
|
}
|
|
@@ -924,7 +996,7 @@ let EzDateInput$1 = class extends HTMLElement$1 {
|
|
|
924
996
|
return (h(Host, null, h("ez-text-input", { ref: elem => this._textInput = elem, onBlur: () => this.parseDate(), onKeyDown: event => {
|
|
925
997
|
if (event.key === "H" || event.key === "h")
|
|
926
998
|
this.changeValue(new Date());
|
|
927
|
-
}, label: this.label, value: this.getTextValue(this.value), restrict: "0123456789/", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, slaveMode: true }, h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })), h("ez-calendar", { onEzChange: (event) => { this.hideCalendar(); event.stopPropagation(); }, floating: true, ref: elem => this._calendar = elem })));
|
|
999
|
+
}, label: this.label, value: this.getTextValue(this.value), onInput: () => this.startChange(), restrict: "0123456789/", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, slaveMode: true }, h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })), h("ez-calendar", { onEzChange: (event) => { this.hideCalendar(); event.stopPropagation(); }, floating: true, ref: elem => this._calendar = elem })));
|
|
928
1000
|
}
|
|
929
1001
|
get _elem() { return this; }
|
|
930
1002
|
static get watchers() { return {
|
|
@@ -943,6 +1015,8 @@ let EzDateTimeInput$1 = class extends HTMLElement$1 {
|
|
|
943
1015
|
this.__registerHost();
|
|
944
1016
|
this.__attachShadow();
|
|
945
1017
|
this.ezChange = createEvent(this, "ezChange", 7);
|
|
1018
|
+
this.ezStartChange = createEvent(this, "ezStartChange", 7);
|
|
1019
|
+
this.ezCancelWaitingChange = createEvent(this, "ezCancelWaitingChange", 7);
|
|
946
1020
|
/**
|
|
947
1021
|
* Deixa o campo disponível ou não para uso.
|
|
948
1022
|
*/
|
|
@@ -1048,6 +1122,7 @@ let EzDateTimeInput$1 = class extends HTMLElement$1 {
|
|
|
1048
1122
|
}
|
|
1049
1123
|
}
|
|
1050
1124
|
else {
|
|
1125
|
+
this.ezCancelWaitingChange.emit();
|
|
1051
1126
|
this._textInput.errorMessage = "O valor digitado não é uma data válida";
|
|
1052
1127
|
}
|
|
1053
1128
|
}
|
|
@@ -1062,11 +1137,14 @@ let EzDateTimeInput$1 = class extends HTMLElement$1 {
|
|
|
1062
1137
|
};
|
|
1063
1138
|
return d ? (new Intl.DateTimeFormat('pt-BR', this.showSeconds ? optionsSecond : options).format(d)) : undefined;
|
|
1064
1139
|
}
|
|
1140
|
+
startChange() {
|
|
1141
|
+
this.ezStartChange.emit({ waitmessage: "", blocking: false });
|
|
1142
|
+
}
|
|
1065
1143
|
componentDidLoad() {
|
|
1066
1144
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
1067
1145
|
}
|
|
1068
1146
|
render() {
|
|
1069
|
-
return (h(Host, null, h("ez-text-input", { ref: elem => this._textInput = elem, onBlur: () => this.parseDate(), onKeyDown: event => { this.onChangeKeyDown(event); }, label: this.label, value: this.getTextValue(this.value), restrict: "0123456789/: ", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, onFocus: () => this.onFocused(), onClick: () => this.onClicked(), slaveMode: true }, h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })), h("ez-calendar", { onEzChange: (event) => { this.changeValue(this._calendar.value); event.stopPropagation(); }, floating: true, ref: elem => this._calendar = elem, time: true, showSeconds: this.showSeconds })));
|
|
1147
|
+
return (h(Host, null, h("ez-text-input", { ref: elem => this._textInput = elem, onBlur: () => this.parseDate(), onKeyDown: event => { this.onChangeKeyDown(event); }, label: this.label, value: this.getTextValue(this.value), restrict: "0123456789/: ", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, onInput: () => this.startChange(), onFocus: () => this.onFocused(), onClick: () => this.onClicked(), slaveMode: true }, h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })), h("ez-calendar", { onEzChange: (event) => { this.changeValue(this._calendar.value); event.stopPropagation(); }, floating: true, ref: elem => this._calendar = elem, time: true, showSeconds: this.showSeconds })));
|
|
1070
1148
|
}
|
|
1071
1149
|
get _elem() { return this; }
|
|
1072
1150
|
static get watchers() { return {
|
|
@@ -1407,7 +1485,7 @@ const buildFromDataUnit = (dataUnit) => {
|
|
|
1407
1485
|
.filter(descriptor => descriptor.required)
|
|
1408
1486
|
.map(descriptor => descriptor.name),
|
|
1409
1487
|
cleanOnCopyFields: visibleFields
|
|
1410
|
-
.filter(descriptor => { var _a; return (_a = descriptor.properties) === null || _a === void 0 ? void 0 : _a.cleanOnCopy; })
|
|
1488
|
+
.filter(descriptor => { var _a, _b; return ((_a = descriptor.properties) === null || _a === void 0 ? void 0 : _a.cleanOnCopy) || ((_b = descriptor.properties) === null || _b === void 0 ? void 0 : _b.autoNum); })
|
|
1411
1489
|
.map(descriptor => descriptor.name),
|
|
1412
1490
|
defaultValues
|
|
1413
1491
|
});
|
|
@@ -1419,7 +1497,7 @@ function getTabConfig(tab, sheets) {
|
|
|
1419
1497
|
return tabConfig || { label: tab, visible: true };
|
|
1420
1498
|
}
|
|
1421
1499
|
function sortTabs(a, b) {
|
|
1422
|
-
return a[0].label == '
|
|
1500
|
+
return a[0].label == '__main' ? -1 : (a[0].order || 10000) - (b[0].order || 10000);
|
|
1423
1501
|
}
|
|
1424
1502
|
const buildFromConfig = (fields, dataUnit) => {
|
|
1425
1503
|
const sheets = new Map();
|
|
@@ -1427,9 +1505,9 @@ const buildFromConfig = (fields, dataUnit) => {
|
|
|
1427
1505
|
const cleanOnCopyFields = [];
|
|
1428
1506
|
const defaultValues = {};
|
|
1429
1507
|
fields.forEach(config => {
|
|
1430
|
-
var _a, _b;
|
|
1508
|
+
var _a, _b, _c;
|
|
1431
1509
|
if (config.visible !== false) {
|
|
1432
|
-
const tabConfig = getTabConfig(config.tab || "
|
|
1510
|
+
const tabConfig = getTabConfig(config.tab || "__main", sheets);
|
|
1433
1511
|
const descriptor = dataUnit.getField(config.name);
|
|
1434
1512
|
if (descriptor && tabConfig.visible) {
|
|
1435
1513
|
if (!sheets.has(tabConfig)) {
|
|
@@ -1440,11 +1518,11 @@ const buildFromConfig = (fields, dataUnit) => {
|
|
|
1440
1518
|
if (isRequired) {
|
|
1441
1519
|
requiredFields.push(config.name);
|
|
1442
1520
|
}
|
|
1443
|
-
const clearOnCopy = config.cleanOnCopy === undefined ? (_a = descriptor.properties) === null || _a === void 0 ? void 0 : _a.cleanOnCopy : config.cleanOnCopy;
|
|
1521
|
+
const clearOnCopy = config.cleanOnCopy === undefined ? (((_a = descriptor.properties) === null || _a === void 0 ? void 0 : _a.cleanOnCopy) || ((_b = descriptor.properties) === null || _b === void 0 ? void 0 : _b.autoNum)) : config.cleanOnCopy;
|
|
1444
1522
|
if (clearOnCopy) {
|
|
1445
1523
|
cleanOnCopyFields.push(config.name);
|
|
1446
1524
|
}
|
|
1447
|
-
const defaultValue = config.defaultValue === undefined ? (
|
|
1525
|
+
const defaultValue = config.defaultValue === undefined ? (_c = descriptor.properties) === null || _c === void 0 ? void 0 : _c.defaultValue : config.defaultValue;
|
|
1448
1526
|
if (defaultValue) {
|
|
1449
1527
|
defaultValues[config.name] = config.defaultValue;
|
|
1450
1528
|
}
|
|
@@ -1470,7 +1548,7 @@ const buildFromConfig = (fields, dataUnit) => {
|
|
|
1470
1548
|
.sort(sortTabs)
|
|
1471
1549
|
.forEach(([key, value]) => {
|
|
1472
1550
|
metadata.addSheet({
|
|
1473
|
-
label: key.label,
|
|
1551
|
+
label: (key.label === "__main") ? "Principal" : key.label,
|
|
1474
1552
|
name: key.label,
|
|
1475
1553
|
items: Array.from(value.values()),
|
|
1476
1554
|
requiredFields,
|
|
@@ -1880,11 +1958,7 @@ class DataBinder {
|
|
|
1880
1958
|
this._dataUnit.unsubscribe(this.onDataUnitEvent);
|
|
1881
1959
|
}
|
|
1882
1960
|
updateValue(fieldName, field) {
|
|
1883
|
-
|
|
1884
|
-
const newValue = this._dataUnit.getFieldValue(fieldName);
|
|
1885
|
-
if (oldValue != newValue) {
|
|
1886
|
-
field["value"] = newValue;
|
|
1887
|
-
}
|
|
1961
|
+
field["value"] = this._dataUnit.getFieldValue(fieldName);
|
|
1888
1962
|
}
|
|
1889
1963
|
updateBind(fieldName, field) {
|
|
1890
1964
|
const oldBind = this._fields.get(fieldName);
|
|
@@ -1892,21 +1966,53 @@ class DataBinder {
|
|
|
1892
1966
|
oldBind.destroy();
|
|
1893
1967
|
}
|
|
1894
1968
|
field["value"] = this._dataUnit.getFieldValue(fieldName);
|
|
1895
|
-
this._fields.set(fieldName, Bind.create(fieldName, field, (fieldName, waitingChange) => this.changeStarted(fieldName, waitingChange), (fieldName, newValue) => this.setFieldValue(fieldName, newValue)));
|
|
1969
|
+
this._fields.set(fieldName, Bind.create(fieldName, field, (fieldName, waitingChange) => this.changeStarted(fieldName, waitingChange), (fieldName) => this.cancelWaitingChange(fieldName), (fieldName, newValue) => this.setFieldValue(fieldName, newValue)));
|
|
1896
1970
|
this.bindSearchOptionsLoader(fieldName, field);
|
|
1897
1971
|
this.applyEzUploadContext(fieldName, field);
|
|
1898
1972
|
}
|
|
1899
1973
|
changeStarted(fieldName, waitingChange) {
|
|
1974
|
+
/**
|
|
1975
|
+
* se o waitingChange não é blocante, add um event listener pra
|
|
1976
|
+
* fazer o accept da promise
|
|
1977
|
+
*
|
|
1978
|
+
* se não tiver promise no waitingChange, eu crio uma e resolvo no bind
|
|
1979
|
+
*
|
|
1980
|
+
*
|
|
1981
|
+
*/
|
|
1900
1982
|
if (this._dataUnit.records.length === 0) {
|
|
1901
1983
|
this._dataUnit.addRecord();
|
|
1902
1984
|
}
|
|
1985
|
+
if (!waitingChange.blocking && waitingChange.promise == undefined) {
|
|
1986
|
+
const bind = this._fields.get(fieldName);
|
|
1987
|
+
if (bind) {
|
|
1988
|
+
waitingChange.promise = new Promise((resolve, reject) => {
|
|
1989
|
+
bind.waitingChangePromiseResolve = resolve;
|
|
1990
|
+
bind.waitingChangePromiseReject = reject;
|
|
1991
|
+
});
|
|
1992
|
+
}
|
|
1993
|
+
}
|
|
1903
1994
|
this._dataUnit.startChange(fieldName, waitingChange);
|
|
1904
1995
|
}
|
|
1996
|
+
cancelWaitingChange(fieldName) {
|
|
1997
|
+
if (this._dataUnit.waitingForChange(fieldName)) {
|
|
1998
|
+
this._dataUnit.cancelWaitingChange(fieldName);
|
|
1999
|
+
const bind = this._fields.get(fieldName);
|
|
2000
|
+
if (bind) {
|
|
2001
|
+
bind.rejectWaitingChange(new WaitingChangeException("Change canceled", fieldName));
|
|
2002
|
+
}
|
|
2003
|
+
}
|
|
2004
|
+
}
|
|
1905
2005
|
setFieldValue(fieldName, newValue) {
|
|
1906
2006
|
if (this._dataUnit.records.length === 0) {
|
|
1907
2007
|
this._dataUnit.addRecord();
|
|
1908
2008
|
}
|
|
1909
2009
|
this._dataUnit.setFieldValue(fieldName, newValue);
|
|
2010
|
+
if (this._dataUnit.waitingForChange(fieldName)) {
|
|
2011
|
+
const bind = this._fields.get(fieldName);
|
|
2012
|
+
if (bind) {
|
|
2013
|
+
bind.acceptWaitingChange();
|
|
2014
|
+
}
|
|
2015
|
+
}
|
|
1910
2016
|
}
|
|
1911
2017
|
bindSearchOptionsLoader(fieldName, field) {
|
|
1912
2018
|
if (field.nodeName === "EZ-SEARCH" && field["optionLoader"] == undefined) {
|
|
@@ -1935,18 +2041,36 @@ class DataBinder {
|
|
|
1935
2041
|
class Bind {
|
|
1936
2042
|
constructor() {
|
|
1937
2043
|
this.startChangeEventName = "ezStartChange";
|
|
2044
|
+
this.cancelWaitingChangeEventName = "ezCancelWaitingChange";
|
|
1938
2045
|
this.changeEventName = "ezChange";
|
|
1939
2046
|
}
|
|
1940
2047
|
destroy() {
|
|
1941
2048
|
this.field.removeEventListener(this.startChangeEventName, this.startChangeListener);
|
|
2049
|
+
this.field.removeEventListener(this.cancelWaitingChangeEventName, this.cancelWaitingChangeListener);
|
|
1942
2050
|
this.field.removeEventListener(this.changeEventName, this.changeListener);
|
|
1943
2051
|
}
|
|
1944
|
-
|
|
2052
|
+
acceptWaitingChange() {
|
|
2053
|
+
if (this.waitingChangePromiseResolve) {
|
|
2054
|
+
this.waitingChangePromiseResolve();
|
|
2055
|
+
this.waitingChangePromiseReject = undefined;
|
|
2056
|
+
this.waitingChangePromiseResolve = undefined;
|
|
2057
|
+
}
|
|
2058
|
+
}
|
|
2059
|
+
rejectWaitingChange(reason) {
|
|
2060
|
+
if (this.waitingChangePromiseReject) {
|
|
2061
|
+
this.waitingChangePromiseReject(reason);
|
|
2062
|
+
this.waitingChangePromiseReject = undefined;
|
|
2063
|
+
this.waitingChangePromiseResolve = undefined;
|
|
2064
|
+
}
|
|
2065
|
+
}
|
|
2066
|
+
static create(fieldName, field, startChangeCallback, cancelWaitingChangeCallback, changeCallback) {
|
|
1945
2067
|
const b = new Bind();
|
|
1946
2068
|
b.field = field;
|
|
1947
2069
|
b.fieldName = fieldName;
|
|
1948
2070
|
b.startChangeListener = (evt) => { startChangeCallback(fieldName, evt.detail); };
|
|
1949
2071
|
b.field.addEventListener(b.startChangeEventName, b.startChangeListener);
|
|
2072
|
+
b.cancelWaitingChangeListener = () => { cancelWaitingChangeCallback(fieldName); };
|
|
2073
|
+
b.field.addEventListener(b.cancelWaitingChangeEventName, b.cancelWaitingChangeListener);
|
|
1950
2074
|
b.changeListener = (evt) => { changeCallback(fieldName, evt.detail); };
|
|
1951
2075
|
b.field.addEventListener(b.changeEventName, b.changeListener);
|
|
1952
2076
|
return b;
|
|
@@ -2036,12 +2160,20 @@ let EzForm$1 = class extends HTMLElement$1 {
|
|
|
2036
2160
|
requiredFields.forEach(field => {
|
|
2037
2161
|
const value = record[field];
|
|
2038
2162
|
const fieldElem = this._element.querySelector(`[data-field-name=${field}]`);
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2163
|
+
/**
|
|
2164
|
+
* TODO: fieldElem vai ser vazio quando o campo está em uma aba que
|
|
2165
|
+
* está escondida.
|
|
2166
|
+
* Temos que tratar esse caso para apresentar a mensagem de erro
|
|
2167
|
+
* na aba, isso será tratado no card: https://sankhya.atlassian.net/browse/SKA-44182
|
|
2168
|
+
*/
|
|
2169
|
+
if (fieldElem) {
|
|
2170
|
+
if (value === null || value === undefined || value === "") {
|
|
2171
|
+
invalidFields.push(field);
|
|
2172
|
+
fieldElem["errorMessage"] = "Essa informação é obrigatória";
|
|
2173
|
+
}
|
|
2174
|
+
else {
|
|
2175
|
+
fieldElem["errorMessage"] = "";
|
|
2176
|
+
}
|
|
2045
2177
|
}
|
|
2046
2178
|
});
|
|
2047
2179
|
const isValid = invalidFields.length === 0;
|
|
@@ -2091,7 +2223,6 @@ let EzForm$1 = class extends HTMLElement$1 {
|
|
|
2091
2223
|
}
|
|
2092
2224
|
}
|
|
2093
2225
|
if (action.type === Action.RECORDS_ADDED) {
|
|
2094
|
-
debugger;
|
|
2095
2226
|
const metadata = selectFormMetadata(this._store.getState());
|
|
2096
2227
|
const defaultValues = metadata.getDefaultValues();
|
|
2097
2228
|
if (defaultValues) {
|
|
@@ -112198,6 +112329,7 @@ class AgGridController {
|
|
|
112198
112329
|
this.DEFAULT_ROW_HEIGHT = 25;
|
|
112199
112330
|
this.CHECK_BOX_COL_ID = "checkBoxColumn";
|
|
112200
112331
|
this.RECORD_ARCHIVE_COL_ID = "__RECORD_ARCHIVE__";
|
|
112332
|
+
this.BLOCK_LOAD_DEBOUNCE = 400;
|
|
112201
112333
|
this._menuItems = [];
|
|
112202
112334
|
this._idAttribName = "__record__id__";
|
|
112203
112335
|
this._isFirstRecordOfPage = true;
|
|
@@ -112241,6 +112373,7 @@ class AgGridController {
|
|
|
112241
112373
|
rowSelection: this._multipleSelection ? "multiple" : "single",
|
|
112242
112374
|
serverSideDatasource: this._dataSource,
|
|
112243
112375
|
sortingOrder: ['desc', 'asc', null],
|
|
112376
|
+
blockLoadDebounceMillis: this.BLOCK_LOAD_DEBOUNCE,
|
|
112244
112377
|
getRowNodeId: this._dataUnit ? (params) => typeof params === "string" ? params : params[this._idAttribName] : undefined,
|
|
112245
112378
|
getMainMenuItems: (params) => {
|
|
112246
112379
|
const column = params.column;
|
|
@@ -113638,6 +113771,8 @@ let EzNumberInput$1 = class extends HTMLElement$1 {
|
|
|
113638
113771
|
this.__registerHost();
|
|
113639
113772
|
this.__attachShadow();
|
|
113640
113773
|
this.ezChange = createEvent(this, "ezChange", 7);
|
|
113774
|
+
this.ezStartChange = createEvent(this, "ezStartChange", 7);
|
|
113775
|
+
this.ezCancelWaitingChange = createEvent(this, "ezCancelWaitingChange", 7);
|
|
113641
113776
|
/**
|
|
113642
113777
|
* Deixa o campo disponível ou não para uso.
|
|
113643
113778
|
*/
|
|
@@ -113687,6 +113822,7 @@ let EzNumberInput$1 = class extends HTMLElement$1 {
|
|
|
113687
113822
|
parseNumber() {
|
|
113688
113823
|
const parsedNumber = this._textInput.value ? NumberUtils.stringToNumber(this._textInput.value) : undefined;
|
|
113689
113824
|
if (parsedNumber !== undefined && isNaN(parsedNumber)) {
|
|
113825
|
+
this.ezCancelWaitingChange.emit();
|
|
113690
113826
|
this.errorMessage = "O valor digitado não é um número válido";
|
|
113691
113827
|
}
|
|
113692
113828
|
else {
|
|
@@ -113694,6 +113830,7 @@ let EzNumberInput$1 = class extends HTMLElement$1 {
|
|
|
113694
113830
|
this.changeValue(parsedNumber);
|
|
113695
113831
|
}
|
|
113696
113832
|
catch (e) {
|
|
113833
|
+
this.ezCancelWaitingChange.emit();
|
|
113697
113834
|
this.errorMessage = e.message;
|
|
113698
113835
|
return;
|
|
113699
113836
|
}
|
|
@@ -113705,11 +113842,14 @@ let EzNumberInput$1 = class extends HTMLElement$1 {
|
|
|
113705
113842
|
}
|
|
113706
113843
|
return undefined;
|
|
113707
113844
|
}
|
|
113845
|
+
startChange() {
|
|
113846
|
+
this.ezStartChange.emit({ waitmessage: "", blocking: false });
|
|
113847
|
+
}
|
|
113708
113848
|
componentDidLoad() {
|
|
113709
113849
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
113710
113850
|
}
|
|
113711
113851
|
render() {
|
|
113712
|
-
return (h("ez-text-input", { ref: elem => this._textInput = elem, onBlur: () => this.parseNumber(), label: this.label, value: this.getTextValue(this.value), restrict: this.precision > 0 ? "0123456789-,." : "0123456789-", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, slaveMode: true }));
|
|
113852
|
+
return (h("ez-text-input", { ref: elem => this._textInput = elem, onBlur: () => this.parseNumber(), label: this.label, onInput: () => this.startChange(), value: this.getTextValue(this.value), restrict: this.precision > 0 ? "0123456789-,." : "0123456789-", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, slaveMode: true }));
|
|
113713
113853
|
}
|
|
113714
113854
|
get _elem() { return this; }
|
|
113715
113855
|
static get watchers() { return {
|
|
@@ -114192,11 +114332,17 @@ let EzTextArea$1 = class extends HTMLElement$1 {
|
|
|
114192
114332
|
(_b = this._messageBoxElem) === null || _b === void 0 ? void 0 : _b.classList.remove('hasError');
|
|
114193
114333
|
}
|
|
114194
114334
|
}
|
|
114195
|
-
observeValue() {
|
|
114196
|
-
this._inputElem
|
|
114197
|
-
|
|
114198
|
-
|
|
114199
|
-
|
|
114335
|
+
observeValue(newValue, oldValue) {
|
|
114336
|
+
if (this._inputElem) {
|
|
114337
|
+
if (newValue != oldValue) {
|
|
114338
|
+
if (this.canChangeValue()) {
|
|
114339
|
+
this._inputElem.value = this.value || "";
|
|
114340
|
+
}
|
|
114341
|
+
this.adjustFloatingLabel();
|
|
114342
|
+
this.errorMessage = "";
|
|
114343
|
+
this.ezChange.emit(this.value);
|
|
114344
|
+
}
|
|
114345
|
+
}
|
|
114200
114346
|
}
|
|
114201
114347
|
observeMode() {
|
|
114202
114348
|
if (this._initialRows == undefined) {
|
|
@@ -114214,6 +114360,27 @@ let EzTextArea$1 = class extends HTMLElement$1 {
|
|
|
114214
114360
|
this._initialRows = rows;
|
|
114215
114361
|
}
|
|
114216
114362
|
}
|
|
114363
|
+
//---------------------------------------------
|
|
114364
|
+
// Public methods
|
|
114365
|
+
//---------------------------------------------
|
|
114366
|
+
/**
|
|
114367
|
+
* Faz o foco no componente de input
|
|
114368
|
+
*/
|
|
114369
|
+
async setFocus() {
|
|
114370
|
+
this._inputElem.focus();
|
|
114371
|
+
}
|
|
114372
|
+
/**
|
|
114373
|
+
* Remove o foco no componente de input
|
|
114374
|
+
*/
|
|
114375
|
+
async setBlur() {
|
|
114376
|
+
this._inputElem.blur();
|
|
114377
|
+
}
|
|
114378
|
+
//---------------------------------------------
|
|
114379
|
+
// Private methods
|
|
114380
|
+
//---------------------------------------------
|
|
114381
|
+
canChangeValue() {
|
|
114382
|
+
return this._inputElem && (this.value || "") !== this._inputElem.value;
|
|
114383
|
+
}
|
|
114217
114384
|
adjustFloatingLabel() {
|
|
114218
114385
|
if (this.label && this._labelElem) {
|
|
114219
114386
|
const hasValue = this.value && this.value.toString().length > 0;
|
|
@@ -114234,21 +114401,6 @@ let EzTextArea$1 = class extends HTMLElement$1 {
|
|
|
114234
114401
|
return this._hostElement.shadowRoot.activeElement !== null;
|
|
114235
114402
|
}
|
|
114236
114403
|
//---------------------------------------------
|
|
114237
|
-
// Public methods
|
|
114238
|
-
//---------------------------------------------
|
|
114239
|
-
/**
|
|
114240
|
-
* Faz o foco no componente de input
|
|
114241
|
-
*/
|
|
114242
|
-
async setFocus() {
|
|
114243
|
-
this._inputElem.focus();
|
|
114244
|
-
}
|
|
114245
|
-
/**
|
|
114246
|
-
* Remove o foco no componente de input
|
|
114247
|
-
*/
|
|
114248
|
-
async setBlur() {
|
|
114249
|
-
this._inputElem.blur();
|
|
114250
|
-
}
|
|
114251
|
-
//---------------------------------------------
|
|
114252
114404
|
// Event handlers
|
|
114253
114405
|
//---------------------------------------------
|
|
114254
114406
|
handleFocusout() {
|
|
@@ -114258,8 +114410,9 @@ let EzTextArea$1 = class extends HTMLElement$1 {
|
|
|
114258
114410
|
}
|
|
114259
114411
|
}
|
|
114260
114412
|
handleChange() {
|
|
114261
|
-
this.
|
|
114262
|
-
|
|
114413
|
+
if (this.canChangeValue()) {
|
|
114414
|
+
this.value = this._inputElem.value;
|
|
114415
|
+
}
|
|
114263
114416
|
}
|
|
114264
114417
|
handleFocus() {
|
|
114265
114418
|
if (this.label && this._labelElem && !this._labelElem.classList.contains("textarea__label--floated")) {
|
|
@@ -114342,17 +114495,19 @@ let EzTextInput$1 = class extends HTMLElement$1 {
|
|
|
114342
114495
|
}
|
|
114343
114496
|
}
|
|
114344
114497
|
}
|
|
114345
|
-
observeValue() {
|
|
114498
|
+
observeValue(newValue, oldValue) {
|
|
114346
114499
|
if (this._inputElem) {
|
|
114347
|
-
|
|
114348
|
-
|
|
114349
|
-
|
|
114350
|
-
|
|
114351
|
-
|
|
114352
|
-
|
|
114500
|
+
if (newValue != oldValue) {
|
|
114501
|
+
this._inputElem.value = this.value || "";
|
|
114502
|
+
this.handleChange();
|
|
114503
|
+
this.adjustFloatingLabel();
|
|
114504
|
+
if (this.slaveMode) {
|
|
114505
|
+
return;
|
|
114506
|
+
}
|
|
114507
|
+
this.errorMessage = "";
|
|
114508
|
+
this.ezChange.emit(this.value);
|
|
114509
|
+
}
|
|
114353
114510
|
}
|
|
114354
|
-
this.errorMessage = "";
|
|
114355
|
-
this.ezChange.emit(this.value);
|
|
114356
114511
|
}
|
|
114357
114512
|
adjustFloatingLabel() {
|
|
114358
114513
|
if (this.label && this._labelElem) {
|
|
@@ -114515,6 +114670,8 @@ let EzTimeInput$1 = class extends HTMLElement$1 {
|
|
|
114515
114670
|
this.__registerHost();
|
|
114516
114671
|
this.__attachShadow();
|
|
114517
114672
|
this.ezChange = createEvent(this, "ezChange", 7);
|
|
114673
|
+
this.ezStartChange = createEvent(this, "ezStartChange", 7);
|
|
114674
|
+
this.ezCancelWaitingChange = createEvent(this, "ezCancelWaitingChange", 7);
|
|
114518
114675
|
/**
|
|
114519
114676
|
* Deixa o campo disponível ou não para digitação.
|
|
114520
114677
|
*/
|
|
@@ -114575,10 +114732,12 @@ let EzTimeInput$1 = class extends HTMLElement$1 {
|
|
|
114575
114732
|
this.prepareValue(this.viewValue);
|
|
114576
114733
|
if (this.viewValue && !TimeFormatter.validateTime(this.viewValue, this.showSeconds)) {
|
|
114577
114734
|
this._oldViewValue = this.viewValue;
|
|
114735
|
+
this.ezCancelWaitingChange.emit();
|
|
114578
114736
|
this.errorMessage = "Favor inserir um horário válido.";
|
|
114579
114737
|
}
|
|
114580
114738
|
else {
|
|
114581
114739
|
if (this.viewValue === this._oldViewValue) {
|
|
114740
|
+
this.ezCancelWaitingChange.emit();
|
|
114582
114741
|
return;
|
|
114583
114742
|
}
|
|
114584
114743
|
this._oldViewValue = this.viewValue;
|
|
@@ -114597,6 +114756,7 @@ let EzTimeInput$1 = class extends HTMLElement$1 {
|
|
|
114597
114756
|
}
|
|
114598
114757
|
}
|
|
114599
114758
|
handleChange() {
|
|
114759
|
+
this.ezStartChange.emit({ waitmessage: "", blocking: false });
|
|
114600
114760
|
this.viewValue = this._inputElem.value;
|
|
114601
114761
|
this.value = NumberUtils.stringToNumber(this.viewValue.replace(/\D/g, ""));
|
|
114602
114762
|
}
|
|
@@ -114756,7 +114916,12 @@ class RemoteFile {
|
|
|
114756
114916
|
}
|
|
114757
114917
|
const response = xhr.response;
|
|
114758
114918
|
if (response) {
|
|
114759
|
-
|
|
114919
|
+
try {
|
|
114920
|
+
resolve(JSON.parse(response));
|
|
114921
|
+
}
|
|
114922
|
+
catch (error) {
|
|
114923
|
+
reject(`Servidor não retornou um objeto válido: ${response}.\n${error}`);
|
|
114924
|
+
}
|
|
114760
114925
|
}
|
|
114761
114926
|
}
|
|
114762
114927
|
};
|
|
@@ -114810,6 +114975,7 @@ let EzUpload$1 = class extends HTMLElement$1 {
|
|
|
114810
114975
|
this.__attachShadow();
|
|
114811
114976
|
this.ezChange = createEvent(this, "ezChange", 7);
|
|
114812
114977
|
this.ezStartChange = createEvent(this, "ezStartChange", 7);
|
|
114978
|
+
this.ezCancelWaitingChange = createEvent(this, "ezCancelWaitingChange", 7);
|
|
114813
114979
|
this._filePointers = new Map();
|
|
114814
114980
|
/**
|
|
114815
114981
|
* Deixa o campo disponível ou não para digitação.
|
|
@@ -114898,14 +115064,27 @@ let EzUpload$1 = class extends HTMLElement$1 {
|
|
|
114898
115064
|
}
|
|
114899
115065
|
}
|
|
114900
115066
|
async doAddFile(file) {
|
|
114901
|
-
|
|
114902
|
-
this.
|
|
114903
|
-
|
|
114904
|
-
|
|
114905
|
-
|
|
114906
|
-
|
|
114907
|
-
|
|
114908
|
-
|
|
115067
|
+
try {
|
|
115068
|
+
if (this.validateFile(file)) {
|
|
115069
|
+
this.ezStartChange.emit({ waitmessage: "Há arquivos sendo enviados. Por favor aguarde a conclusão ou cancele o envio.", blocking: true });
|
|
115070
|
+
const uploadingFile = new RemoteFile(file);
|
|
115071
|
+
const oldPointer = this._filePointers.get(file.name);
|
|
115072
|
+
if (oldPointer && this.isRemoteFile(oldPointer)) {
|
|
115073
|
+
oldPointer.abortUpload();
|
|
115074
|
+
}
|
|
115075
|
+
this._filePointers.set(file.name, uploadingFile);
|
|
115076
|
+
uploadingFile.upload(this.urlUpload, this._requestHeaders, (file) => this.updateFeedback(file))
|
|
115077
|
+
.then((files) => files.forEach(ezFile => this.finishUpload(ezFile)))
|
|
115078
|
+
.catch(msg => {
|
|
115079
|
+
this.ezCancelWaitingChange.emit();
|
|
115080
|
+
this.showError(msg);
|
|
115081
|
+
});
|
|
115082
|
+
forceUpdate(this);
|
|
115083
|
+
}
|
|
115084
|
+
}
|
|
115085
|
+
catch (error) {
|
|
115086
|
+
this.ezCancelWaitingChange.emit();
|
|
115087
|
+
throw error;
|
|
114909
115088
|
}
|
|
114910
115089
|
}
|
|
114911
115090
|
finishUpload(ezFile) {
|
|
@@ -115674,10 +115853,11 @@ let TestDu$1 = class extends HTMLElement$1 {
|
|
|
115674
115853
|
const EzApplication = /*@__PURE__*/proxyCustomElement(EzApplication$1, [0,"ez-application"]);
|
|
115675
115854
|
const EzButton = /*@__PURE__*/proxyCustomElement(EzButton$1, [1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513]}]);
|
|
115676
115855
|
const EzCalendar = /*@__PURE__*/proxyCustomElement(EzCalendar$1, [1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"]}]);
|
|
115856
|
+
const EzCardItem = /*@__PURE__*/proxyCustomElement(EzCardItem$1, [1,"ez-card-item",{"item":[16]}]);
|
|
115677
115857
|
const EzCheck = /*@__PURE__*/proxyCustomElement(EzCheck$1, [1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"mode":[513]}]);
|
|
115678
115858
|
const EzChip = /*@__PURE__*/proxyCustomElement(EzChip$1, [1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540]}]);
|
|
115679
115859
|
const EzCollapsibleBox = /*@__PURE__*/proxyCustomElement(EzCollapsibleBox$1, [1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"stretchTitle":[516,"stretch-title"]}]);
|
|
115680
|
-
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],"_preSelection":[32],"_visibleOptions":[32]}]);
|
|
115860
|
+
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],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32]}]);
|
|
115681
115861
|
const EzDateInput = /*@__PURE__*/proxyCustomElement(EzDateInput$1, [1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513]}]);
|
|
115682
115862
|
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]}]);
|
|
115683
115863
|
const EzDialog = /*@__PURE__*/proxyCustomElement(EzDialog$1, [1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"]}]);
|
|
@@ -115708,6 +115888,7 @@ const defineCustomElements = (opts) => {
|
|
|
115708
115888
|
EzApplication,
|
|
115709
115889
|
EzButton,
|
|
115710
115890
|
EzCalendar,
|
|
115891
|
+
EzCardItem,
|
|
115711
115892
|
EzCheck,
|
|
115712
115893
|
EzChip,
|
|
115713
115894
|
EzCollapsibleBox,
|
|
@@ -115744,4 +115925,4 @@ const defineCustomElements = (opts) => {
|
|
|
115744
115925
|
}
|
|
115745
115926
|
};
|
|
115746
115927
|
|
|
115747
|
-
export { EzApplication, EzButton, EzCalendar, EzCheck, EzChip, EzCollapsibleBox, EzComboBox, EzDateInput, EzDateTimeInput, EzDialog, EzFilterInput, EzForm, EzGrid, EzIcon, EzList, EzLoadingBar, EzModal, EzNumberInput, EzPopover, EzPopup, EzSearch, EzTabselector, EzTextArea, EzTextInput, EzTimeInput, EzToast, EzUpload, EzViewStack, GridConfig, SelectBox, TestDu, defineCustomElements };
|
|
115928
|
+
export { EzApplication, EzButton, EzCalendar, EzCardItem, EzCheck, EzChip, EzCollapsibleBox, EzComboBox, EzDateInput, EzDateTimeInput, EzDialog, EzFilterInput, EzForm, EzGrid, EzIcon, EzList, EzLoadingBar, EzModal, EzNumberInput, EzPopover, EzPopup, EzSearch, EzTabselector, EzTextArea, EzTextInput, EzTimeInput, EzToast, EzUpload, EzViewStack, GridConfig, SelectBox, TestDu, defineCustomElements };
|