@sankhyalabs/ezui 1.1.106 → 1.1.109
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/AssetsUtils-4909c6de.js +24 -0
- package/dist/cjs/ez-calendar_16.cjs.entry.js +52 -107
- package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ez-grid.cjs.entry.js +9 -8
- package/dist/cjs/ez-modal_2.cjs.entry.js +3 -3
- package/dist/cjs/ez-popover.cjs.entry.js +4 -5
- package/dist/collection/components/ez-dialog/ez-dialog.css +1 -1
- package/dist/collection/components/ez-form/ez-form.js +8 -1
- package/dist/custom-elements/index.js +10 -1578
- package/dist/esm/AssetsUtils-9b1329a3.js +22 -0
- package/dist/esm/ez-calendar_16.entry.js +8 -63
- package/dist/esm/ez-dialog.entry.js +1 -1
- package/dist/esm/ez-grid.entry.js +2 -1
- package/dist/esm/ez-modal_2.entry.js +2 -2
- package/dist/esm/ez-popover.entry.js +1 -2
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-080045a0.entry.js +1 -0
- package/dist/ezui/{p-e06e47f1.entry.js → p-24ff7d92.entry.js} +1 -1
- package/dist/ezui/p-477bb703.js +1 -0
- package/dist/ezui/{p-48e18427.entry.js → p-a038e7a5.entry.js} +28 -28
- package/dist/ezui/p-ae7c92b7.entry.js +1 -0
- package/dist/ezui/p-eaeaea64.entry.js +1 -0
- package/dist/types/components/ez-form/ez-form.d.ts +1 -0
- package/package.json +19 -18
- package/dist/cjs/AssetsUtils-69356e76.js +0 -79
- package/dist/cjs/FloatingManager-6cfeb947.js +0 -126
- package/dist/cjs/UnitMetadata-4b90ead3.js +0 -1346
- package/dist/esm/AssetsUtils-0e207bec.js +0 -76
- package/dist/esm/FloatingManager-bb90ef41.js +0 -124
- package/dist/esm/UnitMetadata-8951d803.js +0 -1340
- package/dist/ezui/p-18c00d88.entry.js +0 -1
- package/dist/ezui/p-42ae1620.entry.js +0 -1
- package/dist/ezui/p-7294c815.entry.js +0 -1
- package/dist/ezui/p-c6760545.js +0 -1
- package/dist/ezui/p-ddd0ef12.js +0 -1
- package/dist/ezui/p-ec7c1b86.js +0 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index-88286449.js');
|
|
4
|
+
|
|
5
|
+
const getSpritePath = (sprite) => `${getContextAssetsPath("../assets/actions-sprite.svg")}#${sprite}`;
|
|
6
|
+
let ctxLoaded = false;
|
|
7
|
+
function getContextAssetsPath(resource) {
|
|
8
|
+
if (!ctxLoaded) {
|
|
9
|
+
const scriptElem = document.querySelector("script[data-ezui-assets-url]");
|
|
10
|
+
if (scriptElem) {
|
|
11
|
+
let assetsPath = scriptElem.dataset.ezuiAssetsUrl;
|
|
12
|
+
if (assetsPath) {
|
|
13
|
+
if (assetsPath.startsWith('/')) {
|
|
14
|
+
assetsPath = window.location.origin + assetsPath;
|
|
15
|
+
}
|
|
16
|
+
index.setAssetPath(assetsPath);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
ctxLoaded = true;
|
|
20
|
+
}
|
|
21
|
+
return index.getAssetPath(resource);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
exports.getSpritePath = getSpritePath;
|
|
@@ -3,69 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-88286449.js');
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const AssetsUtils = require('./AssetsUtils-69356e76.js');
|
|
9
|
-
|
|
10
|
-
class DateUtils {
|
|
11
|
-
static clearTime(date, adjustDayLightSavingTime = true) {
|
|
12
|
-
const newDate = new Date(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0, 0);
|
|
13
|
-
return adjustDayLightSavingTime ? DateUtils.adjustDLST(newDate) : newDate;
|
|
14
|
-
}
|
|
15
|
-
static strToDate(strValue, adjustDayLightSavingTime = true, monthYearMode = false) {
|
|
16
|
-
/** monthYearMode é um booleano para usar o formato MM/YYYY.
|
|
17
|
-
* Quando ativado, é retornado o primeiro dia do mês apenas para construir a data.
|
|
18
|
-
* Não há necessidade de verificar o horário de verão quando utilizado esse modo. */
|
|
19
|
-
let parts;
|
|
20
|
-
if (monthYearMode) {
|
|
21
|
-
parts = /^(1[0-2]|0[1-9]|[1-9])[^\d]?(\d{2}|\d{4})(?:\s(\d{1,2}):(\d{1,2}):?(\d{0,2}))?$/.exec(strValue);
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
parts = /^(3[01]|[1-2]\d|0[1-9]|[1-9])[^\d]?(1[0-2]|0[1-9]|[1-9])[^\d]?(\d{2}|\d{4})(?:\s(\d{1,2}):(\d{1,2}):?(\d{0,2}))?$/.exec(strValue);
|
|
25
|
-
}
|
|
26
|
-
if (!parts) {
|
|
27
|
-
return undefined;
|
|
28
|
-
}
|
|
29
|
-
var day = monthYearMode ? 1 : Number(parts[1]);
|
|
30
|
-
var month = Number(parts[(monthYearMode ? 1 : 2)]);
|
|
31
|
-
var year = Number(parts[(monthYearMode ? 2 : 3)]);
|
|
32
|
-
var hour = Number(parts[(monthYearMode ? 3 : 4)] || 0);
|
|
33
|
-
var min = Number(parts[(monthYearMode ? 4 : 5)] || 0);
|
|
34
|
-
var sec = Number(parts[(monthYearMode ? 5 : 6)] || 0);
|
|
35
|
-
if (year < 100) {
|
|
36
|
-
year += year < 30 ? 2000 : 1900;
|
|
37
|
-
}
|
|
38
|
-
let date = new Date(year, month - 1, day, hour, min, sec, 0);
|
|
39
|
-
if (adjustDayLightSavingTime === true && !monthYearMode && hour == 0) {
|
|
40
|
-
date = DateUtils.adjustDLST(date);
|
|
41
|
-
}
|
|
42
|
-
return date;
|
|
43
|
-
}
|
|
44
|
-
static adjustDLST(date) {
|
|
45
|
-
//Work around para corrigir o Bug do horário de verão.
|
|
46
|
-
if (date.getHours() == 23) {
|
|
47
|
-
return new Date(date.getFullYear(), date.getMonth(), date.getDate() + 1, 1, 0, 0, 0);
|
|
48
|
-
}
|
|
49
|
-
return date;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
class ApplicationContext {
|
|
54
|
-
static getContextValue(key) {
|
|
55
|
-
return ApplicationContext.getCtx()[key];
|
|
56
|
-
}
|
|
57
|
-
static setContextValue(key, value) {
|
|
58
|
-
ApplicationContext.getCtx()[key] = value;
|
|
59
|
-
}
|
|
60
|
-
static getCtx() {
|
|
61
|
-
let ctx = window.___snkcore___ctx___;
|
|
62
|
-
if (!ctx) {
|
|
63
|
-
ctx = {};
|
|
64
|
-
window.___snkcore___ctx___ = ctx;
|
|
65
|
-
}
|
|
66
|
-
return ctx;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
6
|
+
const core = require('@sankhyalabs/core');
|
|
7
|
+
const AssetsUtils = require('./AssetsUtils-4909c6de.js');
|
|
69
8
|
|
|
70
9
|
const ezCalendarCss = ":host{--ez-calendar--font-family:var(--font-pattern, Arial);--ez-calendar--color:var(--title--primary, #626e82);--ez-calendar--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--ez-calendar__body--background-color:var(--background--xlight, #FFF);--ez-calendar__time--background-color:var(--background--xlight, #FAFAFA);--ez-calendar__body--padding:var(--space--medium, 12px) var(--space--small, 6px);--ez-calendar__body--border-radius:var(--border--radius-medium, 12px);--ez-calendar__body--shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-container--z-index:var(--more-visible, 2);--ez-calendar__header-line--stroke:1px;--ez-calendar__header-line--color:var(--color--strokes, #C0C0C0);--ez-calendar__nav-btn--fill:var(--text--primary, #008561);--ez-calendar__nav-btn--hover--fill:var(--color--primary, #350404);--ez-calendar__nav-btn--width:10px;--ez-calendar__nav-btn--height:16px;--ez-calendar__nav-btn--previous-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 9.7808475,13.860393 3.9204526,8.0000004 9.7808475,2.0624965 7.9301965,0.28895552 0.21915255,8.0000004 7.9301965,15.711044 Z\"/></svg>');--ez-calendar__nav-btn--next-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z\"/></svg>');--ez-calendar__cell--margin:0px 1.5px;--ez-calendar__cell--width:var(--space--large, 24px);--ez-calendar__cell--padding:1.5px 0px;--ez-calendar__cell--border-radius:var(--border--radius-small, 6px);--ez-calendar__cell--over--background-color:var(--color--primary, #E2F4EF);--ez-calendar__cell--over--color:var(--color--primary-300, #008561);--ez-calendar__cell--outset--color:var(--color--disable-primary, #E5EAF0);--ez-calendar__cell--selected--background-color:var(--color--primary, #008561);--ez-calendar__cell--selected--color:var(--color--inverted, #FFF);--ez-calendar__btn-today--color:var(--color--primary);--ez-calendar__btn-today--hover--background-color:var(--color--primary-300, #E2F4EF);--ez-calendar__btn-today--border-radius:var(--border--radius-small, 6px);position:relative;display:flex;user-select:none}.calendar__container{display:flex;z-index:var(--more-visible, 2)}.calendar{z-index:var(--more-visible, 2);display:flex;flex-direction:column;background-color:var(--ez-calendar__body--background-color);padding:var(--ez-calendar__body--padding);border-radius:var(--ez-calendar__body--border-radius);box-shadow:var(--ez-calendar__body--shadow)}.calendar__header{display:flex;justify-content:space-between;padding-bottom:var(--space--small, 6px);margin:0px var(--space--, 12px) var(--space--small, 6px) var(--space--, 12px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);border-bottom:solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color)}.calendar__btn-next,.calendar__btn-previous{outline:none;border:none;background-color:unset;cursor:pointer;padding:0px}.calendar__btn-next::after,.calendar__btn-previous::after{content:'';display:flex;background-color:var(--ez-calendar__nav-btn--fill);width:var(--ez-calendar__nav-btn--width);height:var(--ez-calendar__nav-btn--height)}.calendar__btn-previous::after{-webkit-mask-image:var(--ez-calendar__nav-btn--previous-image);mask-image:var(--ez-calendar__nav-btn--previous-image)}.calendar__btn-next::after{-webkit-mask-image:var(--ez-calendar__nav-btn--next-image);mask-image:var(--ez-calendar__nav-btn--next-image)}.calendar__btn-next:hover::after,.calendar__btn-previous:hover::after{background-color:var(--ez-calendar__nav-btn--hover--fill)}.calendar__lbl-month{font-weight:var(--text-weight--extra-large, 700);font-size:var(--title--small, 14px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__line{display:flex;padding:0px;margin:0px}.calendar__cell{display:flex;justify-content:center;align-content:center;cursor:pointer;font-size:var(--text--extra-small, 10px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);padding:var(--ez-calendar__cell--padding);margin:var(--ez-calendar__cell--margin);min-width:var(--ez-calendar__cell--width);border-radius:var(--ez-calendar__cell--border-radius)}.calendar__cell:hover{background-color:var(--ez-calendar__cell--over--background-color);color:var(--ez-calendar__cell--over--color)}.calendar__cell--secondary{color:var(--ez-calendar__cell--outset--color)}.calendar__cell--unselectable:hover{background-color:unset;border-radius:unset;cursor:unset}.calendar__cell--unselectable{font-weight:var(--text-weight--large, 600);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__cell--selected,.calendar__cell--selected:hover{background-color:var(--ez-calendar__cell--selected--background-color);color:var(--ez-calendar__cell--selected--color)}.calendar__footer{display:flex;flex-direction:column}.calendar__btn-today{border:none;background-color:unset;cursor:pointer;font-weight:var(--text-weight--large, 600);font-size:var(--title--extra-small, 12px);padding:0px;font-family:var(--ez-calendar--font-family);text-shadow:var(--ez-calendar--text-shadow);color:var(--ez-calendar__btn-today--color);border-radius:var(--ez-calendar__btn-today--border-radius)}.calendar__btn-today:hover{background-color:var(--ez-calendar__btn-today--hover--background-color)}section{display:flex}.calendar-time{margin-left:-10px;display:flex;flex-direction:column;padding:12px 0px 0px 10px;background-color:var(--ez-calendar__time--background-color);border-top-right-radius:var(--ez-calendar__body--border-radius);border-bottom-right-radius:var(--ez-calendar__body--border-radius);box-shadow:var(--ez-calendar__body--shadow)}.calendar__column{height:136px;padding:0px;margin:0px;overflow:auto}.calendar__column::-webkit-scrollbar{width:0px;max-width:0px;min-width:0px}.calendar-time__header{padding-left:var(--space--small, 6px);padding-right:var(--space--small, 6px);display:flex;justify-content:space-between;padding-bottom:var(--space--small, 6px);margin:0px var(--space--, 12px) var(--space--small, 6px) var(--space--, 12px);font-weight:var(--text-weight--extra-large, 700);font-size:var(--title--small, 14px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);border-bottom:solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.separatorTime{color:#A2ABB9;padding:0px 1px;line-height:16px;font-size:17px;font-weight:normal}.endHidden{-webkit-mask-image:linear-gradient(180deg, #000 calc(100% - 48px), transparent 100%)}.calendar__column .calendar__cell{margin:0px;padding:1.5px 1.5px}";
|
|
71
10
|
|
|
@@ -105,7 +44,7 @@ let EzCalendar = class {
|
|
|
105
44
|
*/
|
|
106
45
|
async show(top, left, bottom, right) {
|
|
107
46
|
if (this.floating) {
|
|
108
|
-
this._floatingID =
|
|
47
|
+
this._floatingID = core.FloatingManager.float(this._box, this._container, { autoClose: true, top, left, bottom, right });
|
|
109
48
|
window.requestAnimationFrame(() => {
|
|
110
49
|
this._box.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
|
|
111
50
|
});
|
|
@@ -130,7 +69,7 @@ let EzCalendar = class {
|
|
|
130
69
|
*/
|
|
131
70
|
async hide() {
|
|
132
71
|
if (this._floatingID !== undefined) {
|
|
133
|
-
|
|
72
|
+
core.FloatingManager.close(this._floatingID);
|
|
134
73
|
this._floatingID = undefined;
|
|
135
74
|
}
|
|
136
75
|
}
|
|
@@ -493,19 +432,19 @@ let EzComboBox = class {
|
|
|
493
432
|
//posição errada no futuro. Preferi fazer simples no começo,
|
|
494
433
|
//porque não quis onerar o text input com essa funcionalidade...
|
|
495
434
|
const top = (this.errorMessage || !this.canShowError) ? "0px" : "-17px";
|
|
496
|
-
this._floatingID =
|
|
435
|
+
this._floatingID = core.FloatingManager.float(this._optionsList, this._listContainer, { autoClose: true, top });
|
|
497
436
|
window.requestAnimationFrame(() => {
|
|
498
437
|
this._optionsList.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
|
|
499
438
|
});
|
|
500
439
|
}
|
|
501
440
|
hideOptions() {
|
|
502
441
|
if (this._floatingID !== undefined) {
|
|
503
|
-
|
|
442
|
+
core.FloatingManager.close(this._floatingID);
|
|
504
443
|
}
|
|
505
444
|
this._floatingID = undefined;
|
|
506
445
|
}
|
|
507
446
|
isOptionsVisible() {
|
|
508
|
-
return this._floatingID !== undefined &&
|
|
447
|
+
return this._floatingID !== undefined && core.FloatingManager.isFloating(this._floatingID);
|
|
509
448
|
}
|
|
510
449
|
nextOption() {
|
|
511
450
|
if (this.searchMode && !this.isOptionsVisible()) {
|
|
@@ -712,8 +651,8 @@ let EzDateInput = class {
|
|
|
712
651
|
}
|
|
713
652
|
changeValue(newValue) {
|
|
714
653
|
var _a;
|
|
715
|
-
newValue = newValue instanceof Date ? DateUtils.clearTime(newValue) : null;
|
|
716
|
-
this.value = this.value instanceof Date ? DateUtils.clearTime(this.value) : null;
|
|
654
|
+
newValue = newValue instanceof Date ? core.DateUtils.clearTime(newValue) : null;
|
|
655
|
+
this.value = this.value instanceof Date ? core.DateUtils.clearTime(this.value) : null;
|
|
717
656
|
this._textInput.errorMessage = "";
|
|
718
657
|
if ((newValue === null || newValue === void 0 ? void 0 : newValue.toString()) !== ((_a = this.value) === null || _a === void 0 ? void 0 : _a.toString())) {
|
|
719
658
|
this.value = newValue;
|
|
@@ -735,7 +674,7 @@ let EzDateInput = class {
|
|
|
735
674
|
}
|
|
736
675
|
parseDate() {
|
|
737
676
|
const strValue = this._textInput.value;
|
|
738
|
-
const parsedDate = DateUtils.strToDate(strValue);
|
|
677
|
+
const parsedDate = core.DateUtils.strToDate(strValue);
|
|
739
678
|
if (parsedDate || !strValue) {
|
|
740
679
|
if (this.value === parsedDate) {
|
|
741
680
|
this.changeValue(this.value);
|
|
@@ -864,9 +803,9 @@ let EzDateTimeInput = class {
|
|
|
864
803
|
const partsDateTime = (strValue && strValue.length > 0) ? strValue.split(" ") : [];
|
|
865
804
|
const onlyDate = partsDateTime.length > 0 ? partsDateTime[0] : strValue;
|
|
866
805
|
const onlyTime = partsDateTime[1] ? partsDateTime[1] : "";
|
|
867
|
-
const parsedTime =
|
|
806
|
+
const parsedTime = core.TimeFormatter.prepareValue(onlyTime, this.showSeconds);
|
|
868
807
|
const strDateTime = onlyDate + (parsedTime && " " + parsedTime);
|
|
869
|
-
const parsedDate = DateUtils.strToDate(strDateTime);
|
|
808
|
+
const parsedDate = core.DateUtils.strToDate(strDateTime);
|
|
870
809
|
if (parsedDate || !strValue) {
|
|
871
810
|
if (this.value === parsedDate) {
|
|
872
811
|
this.changeValue(this.value);
|
|
@@ -977,17 +916,17 @@ function buildNumeric(fieldName, fieldLabel, readOnly, precision, prettyPrecisio
|
|
|
977
916
|
}
|
|
978
917
|
|
|
979
918
|
const uiBuilders = new Map();
|
|
980
|
-
uiBuilders.set(
|
|
981
|
-
uiBuilders.set(
|
|
982
|
-
uiBuilders.set(
|
|
983
|
-
uiBuilders.set(
|
|
984
|
-
uiBuilders.set(
|
|
985
|
-
uiBuilders.set(
|
|
986
|
-
uiBuilders.set(
|
|
987
|
-
uiBuilders.set(
|
|
988
|
-
uiBuilders.set(
|
|
989
|
-
uiBuilders.set(
|
|
990
|
-
uiBuilders.set(
|
|
919
|
+
uiBuilders.set(core.UserInterface.LONGTEXT, buildTextArea);
|
|
920
|
+
uiBuilders.set(core.UserInterface.CHECKBOX, buildCheckBox);
|
|
921
|
+
uiBuilders.set(core.UserInterface.SWITCH, buildSwitch);
|
|
922
|
+
uiBuilders.set(core.UserInterface.OPTIONSELECTOR, buildComboBox);
|
|
923
|
+
uiBuilders.set(core.UserInterface.SEARCH, buildSearch);
|
|
924
|
+
uiBuilders.set(core.UserInterface.FILE, buildFile);
|
|
925
|
+
uiBuilders.set(core.UserInterface.DATE, buildDate);
|
|
926
|
+
uiBuilders.set(core.UserInterface.TIME, buildTime);
|
|
927
|
+
uiBuilders.set(core.UserInterface.DATETIME, buildTimeDate);
|
|
928
|
+
uiBuilders.set(core.UserInterface.DECIMALNUMBER, buildDecimal);
|
|
929
|
+
uiBuilders.set(core.UserInterface.INTEGERNUMBER, buildInteger);
|
|
991
930
|
const buildField = (field) => {
|
|
992
931
|
const descriptor = field.descriptor;
|
|
993
932
|
const config = Object.assign({}, field.config);
|
|
@@ -1534,7 +1473,7 @@ class DataBinder {
|
|
|
1534
1473
|
}
|
|
1535
1474
|
bindSearchOptionsLoader(fieldName, field) {
|
|
1536
1475
|
if (field.nodeName === "EZ-SEARCH" && field["optionLoader"] === undefined) {
|
|
1537
|
-
const loader = ApplicationContext.getContextValue("__EZUI__SEARCH__OPTION__LOADER__");
|
|
1476
|
+
const loader = core.ApplicationContext.getContextValue("__EZUI__SEARCH__OPTION__LOADER__");
|
|
1538
1477
|
if (loader) {
|
|
1539
1478
|
field["optionLoader"] = (arg) => {
|
|
1540
1479
|
return loader(arg, fieldName, this._dataUnit);
|
|
@@ -1624,6 +1563,9 @@ let EzForm = class {
|
|
|
1624
1563
|
accept();
|
|
1625
1564
|
});
|
|
1626
1565
|
}
|
|
1566
|
+
configChanged() {
|
|
1567
|
+
this.processMetadata();
|
|
1568
|
+
}
|
|
1627
1569
|
validateRequired(requiredFields, record) {
|
|
1628
1570
|
const invalidFields = [];
|
|
1629
1571
|
requiredFields.forEach(field => {
|
|
@@ -1671,12 +1613,12 @@ let EzForm = class {
|
|
|
1671
1613
|
return ((_a = this._staticFields) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
1672
1614
|
}
|
|
1673
1615
|
interceptAction(action) {
|
|
1674
|
-
if (action.type ===
|
|
1616
|
+
if (action.type === core.Action.RECORDS_COPIED) {
|
|
1675
1617
|
const metadata = selectFormMetadata(this._store.getState());
|
|
1676
1618
|
const cleanFields = metadata.getCleanOnCopyFields();
|
|
1677
1619
|
if (cleanFields) {
|
|
1678
1620
|
const records = action.payload;
|
|
1679
|
-
return new
|
|
1621
|
+
return new core.DataUnitAction(core.Action.RECORDS_COPIED, records.map(record => {
|
|
1680
1622
|
const newRecord = Object.assign({}, record);
|
|
1681
1623
|
cleanFields.forEach(fieldName => delete newRecord[fieldName]);
|
|
1682
1624
|
return newRecord;
|
|
@@ -1687,11 +1629,11 @@ let EzForm = class {
|
|
|
1687
1629
|
}
|
|
1688
1630
|
componentWillLoad() {
|
|
1689
1631
|
if (this.dataUnit === undefined) {
|
|
1690
|
-
this.dataUnit = new
|
|
1632
|
+
this.dataUnit = new core.DataUnit("ez-form");
|
|
1691
1633
|
}
|
|
1692
1634
|
this.dataUnit.addInterceptor(this);
|
|
1693
1635
|
this.dataUnit.subscribe(action => {
|
|
1694
|
-
if (action.type ===
|
|
1636
|
+
if (action.type === core.Action.METADATA_LOADED) {
|
|
1695
1637
|
this.processMetadata();
|
|
1696
1638
|
}
|
|
1697
1639
|
});
|
|
@@ -1708,6 +1650,9 @@ let EzForm = class {
|
|
|
1708
1650
|
return (index.h(index.Host, null, this.isStatic() ? null : this.getDynamicContent()));
|
|
1709
1651
|
}
|
|
1710
1652
|
get _element() { return index.getElement(this); }
|
|
1653
|
+
static get watchers() { return {
|
|
1654
|
+
"config": ["configChanged"]
|
|
1655
|
+
}; }
|
|
1711
1656
|
};
|
|
1712
1657
|
EzForm.style = ezFormCss;
|
|
1713
1658
|
|
|
@@ -1731,7 +1676,7 @@ let EzIcon = class {
|
|
|
1731
1676
|
if (this.isSprite()) {
|
|
1732
1677
|
return index.h("svg", { class: this.size, role: "img" }, index.h("use", { xlinkHref: this.href }));
|
|
1733
1678
|
}
|
|
1734
|
-
else if (!
|
|
1679
|
+
else if (!core.StringUtils.isEmpty(this.iconName)) {
|
|
1735
1680
|
return index.h("span", { class: `icon-content ${this.getIconClassName()} ${this.size}--font` });
|
|
1736
1681
|
}
|
|
1737
1682
|
else {
|
|
@@ -1786,7 +1731,7 @@ let EzNumberInput = class {
|
|
|
1786
1731
|
}
|
|
1787
1732
|
}
|
|
1788
1733
|
parseNumber() {
|
|
1789
|
-
const parsedNumber = this._textInput.value ?
|
|
1734
|
+
const parsedNumber = this._textInput.value ? core.NumberUtils.stringToNumber(this._textInput.value) : null;
|
|
1790
1735
|
if (parsedNumber != null && isNaN(parsedNumber)) {
|
|
1791
1736
|
this.errorMessage = "O valor digitado não é um número válido";
|
|
1792
1737
|
}
|
|
@@ -1802,7 +1747,7 @@ let EzNumberInput = class {
|
|
|
1802
1747
|
}
|
|
1803
1748
|
getTextValue(value) {
|
|
1804
1749
|
if (value) {
|
|
1805
|
-
return this.precision > 0 ?
|
|
1750
|
+
return this.precision > 0 ? core.NumberUtils.format(value.toString(), Number(this.precision), Number(this.prettyPrecision)) : value.toString();
|
|
1806
1751
|
}
|
|
1807
1752
|
return null;
|
|
1808
1753
|
}
|
|
@@ -2204,7 +2149,7 @@ let EzTextInput = class {
|
|
|
2204
2149
|
prepareMask() {
|
|
2205
2150
|
if (this.mask) {
|
|
2206
2151
|
if (this._maskFormatter == undefined) {
|
|
2207
|
-
this._maskFormatter = new
|
|
2152
|
+
this._maskFormatter = new core.MaskFormatter(this.mask);
|
|
2208
2153
|
}
|
|
2209
2154
|
else {
|
|
2210
2155
|
this._maskFormatter.mask = this.mask;
|
|
@@ -2385,7 +2330,7 @@ let EzTimeInput = class {
|
|
|
2385
2330
|
prepareMask() {
|
|
2386
2331
|
if (this.showSeconds) {
|
|
2387
2332
|
if (this._maskFormatter == undefined) {
|
|
2388
|
-
this._maskFormatter = new
|
|
2333
|
+
this._maskFormatter = new core.MaskFormatter("##:##:##");
|
|
2389
2334
|
}
|
|
2390
2335
|
else {
|
|
2391
2336
|
this._maskFormatter.mask = "##:##:##";
|
|
@@ -2393,7 +2338,7 @@ let EzTimeInput = class {
|
|
|
2393
2338
|
}
|
|
2394
2339
|
else {
|
|
2395
2340
|
if (this._maskFormatter == undefined) {
|
|
2396
|
-
this._maskFormatter = new
|
|
2341
|
+
this._maskFormatter = new core.MaskFormatter("##:##");
|
|
2397
2342
|
}
|
|
2398
2343
|
else {
|
|
2399
2344
|
this._maskFormatter.mask = "##:##";
|
|
@@ -2427,14 +2372,14 @@ let EzTimeInput = class {
|
|
|
2427
2372
|
handleFocusout() {
|
|
2428
2373
|
this.errorMessage = "";
|
|
2429
2374
|
this.prepareValue(this.viewValue);
|
|
2430
|
-
if (!
|
|
2375
|
+
if (!core.TimeFormatter.validateTime(this.viewValue, this.showSeconds)) {
|
|
2431
2376
|
this.clearField();
|
|
2432
2377
|
this.errorMessage = "Favor inserir um horário válido.";
|
|
2433
2378
|
}
|
|
2434
2379
|
}
|
|
2435
2380
|
prepareValue(value) {
|
|
2436
2381
|
try {
|
|
2437
|
-
this.viewValue =
|
|
2382
|
+
this.viewValue = core.TimeFormatter.prepareValue(value, this.showSeconds);
|
|
2438
2383
|
}
|
|
2439
2384
|
catch (e) {
|
|
2440
2385
|
this.clearField();
|
|
@@ -2446,7 +2391,7 @@ let EzTimeInput = class {
|
|
|
2446
2391
|
}
|
|
2447
2392
|
handleChange() {
|
|
2448
2393
|
this.viewValue = this._inputElem.value;
|
|
2449
|
-
this.value =
|
|
2394
|
+
this.value = core.NumberUtils.stringToNumber(this.viewValue.replace(/\D/g, ""));
|
|
2450
2395
|
}
|
|
2451
2396
|
//---------------------------------------------
|
|
2452
2397
|
// Lifecycle web component
|
|
@@ -2838,7 +2783,7 @@ let TestDu = class {
|
|
|
2838
2783
|
private _ezSearch// : HTMLEzSearch
|
|
2839
2784
|
private _ezUpload// : HTMLEzUpload*/
|
|
2840
2785
|
componentWillLoad() {
|
|
2841
|
-
this.dataUnit = new
|
|
2786
|
+
this.dataUnit = new core.DataUnit("testes_com_formulario");
|
|
2842
2787
|
this.dataUnit.metadata = {
|
|
2843
2788
|
name: "dd://br.com.sankhya.fin.cad.movimentacaoFinanceira/Financeiro",
|
|
2844
2789
|
label: "Parceiro",
|
|
@@ -2846,31 +2791,31 @@ let TestDu = class {
|
|
|
2846
2791
|
{
|
|
2847
2792
|
name: "CODPARC",
|
|
2848
2793
|
label: "Parceiro",
|
|
2849
|
-
dataType:
|
|
2850
|
-
userInterface:
|
|
2794
|
+
dataType: core.DataType.NUMBER,
|
|
2795
|
+
userInterface: core.UserInterface.SEARCH,
|
|
2851
2796
|
required: true,
|
|
2852
2797
|
properties: {}
|
|
2853
2798
|
},
|
|
2854
2799
|
{
|
|
2855
2800
|
name: "RECDESP",
|
|
2856
2801
|
label: "Receita/Despesa",
|
|
2857
|
-
dataType:
|
|
2858
|
-
userInterface:
|
|
2802
|
+
dataType: core.DataType.TEXT,
|
|
2803
|
+
userInterface: core.UserInterface.OPTIONSELECTOR,
|
|
2859
2804
|
required: true,
|
|
2860
2805
|
properties: { options: `{"-1": "Despesa", "1": "Receita"}` }
|
|
2861
2806
|
},
|
|
2862
2807
|
{
|
|
2863
2808
|
name: "P",
|
|
2864
2809
|
label: "pera",
|
|
2865
|
-
dataType:
|
|
2866
|
-
userInterface:
|
|
2810
|
+
dataType: core.DataType.TEXT,
|
|
2811
|
+
userInterface: core.UserInterface.OPTIONSELECTOR,
|
|
2867
2812
|
properties: { options: `{"M": "Madura", "V": "Verde", "P": "Passada"}` }
|
|
2868
2813
|
},
|
|
2869
2814
|
{
|
|
2870
2815
|
name: "ME",
|
|
2871
2816
|
label: "ME",
|
|
2872
|
-
dataType:
|
|
2873
|
-
userInterface:
|
|
2817
|
+
dataType: core.DataType.NUMBER,
|
|
2818
|
+
userInterface: core.UserInterface.DECIMALNUMBER,
|
|
2874
2819
|
properties: { precision: 4, prettyPrecision: 1 }
|
|
2875
2820
|
}
|
|
2876
2821
|
]
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-88286449.js');
|
|
6
6
|
|
|
7
|
-
const ezDialogCss = ":host{--dialog__container-padding:var(--space--large, 24px);--dialog__btn__close--background-color:var(--title--primary, #2b3a54);--dialog__btn__no--padding-right:var(--space--large, 24px);--dialog__btn__close__image:url('data:image/svg+xml;utf8,<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg%22%3E<path d=\"M 7.0060773,5.995511 11.461972,1.5397722 c 0.132856,-0.1328413 0.207547,-0.3130253 0.207547,-0.5009046 0,-0.18786999 -0.07469,-0.3680541 -0.207547,-0.5009048 -0.132857,-0.13284126 -0.31302,-0.20748126 -0.500927,-0.20748126 -0.187812,0 -0.36807,0.07464 -0.500926,0.20748126 L 6.0042244,4.9937015 1.5482921,0.5379628 C 1.4154357,0.40512154 1.2352533,0.33048154 1.0473657,0.33048154 c -0.18787813,0 -0.36807,0.07464 -0.50092647,0.20748126 -0.13285646,0.1328507 -0.20749026,0.31303481 -0.20749026,0.5009048 0,0.1878793 0.0746338,0.3680633 0.20749026,0.5009046 L 5.0023715,5.995511 0.54643923,10.452213 c -0.0676086,0.06534 -0.12151598,0.14352 -0.15859681,0.229916 -0.0370714,0.08639 -0.0565645,0.1794 -0.0573369,0.27335 -7.724e-4,0.09404 0.0171873,0.187331 0.0528423,0.274293 0.0356455,0.08705 0.0882688,0.166087 0.15479148,0.23256 0.0665321,0.06648 0.14562277,0.11897 0.2326735,0.154567 0.0870507,0.0356 0.18031463,0.05344 0.2743433,0.05259 0.094029,-8.5e-4 0.1869528,-0.02049 0.2733331,-0.0576 0.08639,-0.0372 0.1645078,-0.09121 0.2298029,-0.158817 L 6.0042244,6.9973204 10.460119,11.453078 c 0.132856,0.132851 0.313114,0.207444 0.500926,0.207444 0.187907,0 0.36807,-0.07459 0.500927,-0.207444 0.132856,-0.13285 0.207547,-0.313006 0.207547,-0.500904 0,-0.187898 -0.07469,-0.368054 -0.207547,-0.500905 z\"/></svg>');--dialog__title--font-pattern:var(--font-pattern, \"'Sora', 'Algerian'\");--dialog__title--padding-left:var(--space--small, 6px);--dialog__title__container--padding-bottom:var(--space--medium, 12px);--dialog__title--weight--large:var(--text-weight--large, 600);--dialog__body--font-pattern:var(--font-pattern, \"'Sora', 'Algerian'\");--dialog__body--text-shadow:var(--text-shadow, \"0 0 0 #353535, 0 0 1px transparent\");--dialog__body--text-weight--medium:var(--text-weight--medium, 400);--dialog__body--padding-bottom:var(--space--large, 24px);--dialog__body--font-size:var(--text--medium, 14px);--dialog__body--color:var(--text--primary, #626e82);--dialog__icon--color:var(--text--inverted, #fff);--dialog__critical--background-color:var(--color--alert-error-800, #BD0025);--dialog__warning--background-color:var(--color--alert-warning-500, #EFB103);--dialog-z-index:var(--most-visible, 3);--dialog--warning__image:url('data: image/svg+xml;utf8,<svg width=\"15\" height=\"15\" viewBox=\"0 0 15 15\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 7.5,0 0,13 h 15 z m 0,2.73684 5.1341,8.89476 H 2.36591 Z M 6.81818,5.47368 V 8.21053 H 8.18182 V 5.47368 Z m 0,4.10527 V 10.9474 H 8.18182 V 9.57895\"/></svg>');--dialog--critical__image:url('data: image/svg+xml;utf8,<svg width=\"13\" height=\"13\" viewBox=\"0 0 13 13\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 7.6534493,6.4948538 12.762051,1.3864299 C 12.914368,1.2341297 13,1.027552 13,0.81215179 13,0.59676225 12.914369,0.39018443 12.762051,0.23787352 12.609733,0.08557341 12.40318,0 12.187747,0 11.972425,0 11.765762,0.08557341 11.613445,0.23787352 L 6.5048431,5.3462975 1.3961977,0.23787352 C 1.2438802,0.08557341 1.0373043,0 0.82189458,0 0.60649572,0 0.39990901,0.08557341 0.24759147,0.23787352 0.09527396,0.39018443 0.00970766,0.59676225 0.00970766,0.81215179 c 0,0.21540021 0.0855663,0.42197791 0.23788381,0.57427811 L 5.3562369,6.4948538 0.24759147,11.604381 c -0.0775121,0.07492 -0.13931586,0.164543 -0.18182835,0.263595 -0.04250169,0.09905 -0.064850182,0.205678 -0.0657357237,0.313391 -8.8554258e-4,0.107813 0.0197049337,0.214771 0.0605827337,0.314472 0.04086693,0.0998 0.10119858,0.190415 0.17746563,0.266625 0.0762779,0.07622 0.16695386,0.136398 0.26675594,0.177208 0.099802,0.04082 0.20672745,0.06127 0.31452961,0.06029 0.1078025,-9.53e-4 0.21433799,-0.0235 0.31337139,-0.06604 0.099045,-0.04265 0.1886052,-0.104571 0.263465,-0.182081 L 6.5048431,7.6434102 11.613445,12.751855 c 0.152317,0.152312 0.35898,0.237831 0.574302,0.237831 0.215433,0 0.421986,-0.08552 0.574304,-0.237831 C 12.914368,12.599545 13,12.393 13,12.177578 13,11.962157 12.91437,11.75561 12.762051,11.603299 Z\"/></svg>')}h2{margin-block-start:0;margin-block-end:0;margin-inline-start:0px;margin-inline-end:0px}.overlay{position:fixed;display:flex;top:0px;z-index:var(--dialog-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.dialog{display:flex;width:80%;position:absolute;top:50%;left:50%;margin-right:-50%;box-sizing:border-box;transform:translate(-50%, -50%);box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122)}@media screen and (min-width: 768px){.dialog{width:50%}}@media screen and (min-width: 992px){.dialog{width:33.33333%}}.dialog__container{width:100%;background:#FFFF;border-radius:0px 6px 6px 0px;box-sizing:border-box;padding:var(--dialog__container-padding)}.dialog__critical--indicator{box-sizing:border-box;width:12px;border-radius:6px 0px 0px 6px;background-color:var(--dialog__critical--background-color)}.dialog__warning--indicator{width:12px;border-radius:6px 0px 0px 6px;box-sizing:border-box;background-color:var(--dialog__warning--background-color)}.message{font-size:var(--dialog__body--font-size);font-weight:var(--dialog__body--text-weight--medium);font-family:var(--dialog__body--font-pattern);text-shadow:var(--dialog__body--text-shadow);padding-bottom:var(--dialog__body--padding-bottom);color:var(--dialog__body--color);max-height:30vh;content-visibility:auto;margin-bottom:24px;overflow-y:auto}.changeable__icon{background:var(--dialog__warning--background-color)
|
|
7
|
+
const ezDialogCss = ":host{--dialog__container-padding:var(--space--large, 24px);--dialog__btn__close--background-color:var(--title--primary, #2b3a54);--dialog__btn__no--padding-right:var(--space--large, 24px);--dialog__btn__close__image:url('data:image/svg+xml;utf8,<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg%22%3E<path d=\"M 7.0060773,5.995511 11.461972,1.5397722 c 0.132856,-0.1328413 0.207547,-0.3130253 0.207547,-0.5009046 0,-0.18786999 -0.07469,-0.3680541 -0.207547,-0.5009048 -0.132857,-0.13284126 -0.31302,-0.20748126 -0.500927,-0.20748126 -0.187812,0 -0.36807,0.07464 -0.500926,0.20748126 L 6.0042244,4.9937015 1.5482921,0.5379628 C 1.4154357,0.40512154 1.2352533,0.33048154 1.0473657,0.33048154 c -0.18787813,0 -0.36807,0.07464 -0.50092647,0.20748126 -0.13285646,0.1328507 -0.20749026,0.31303481 -0.20749026,0.5009048 0,0.1878793 0.0746338,0.3680633 0.20749026,0.5009046 L 5.0023715,5.995511 0.54643923,10.452213 c -0.0676086,0.06534 -0.12151598,0.14352 -0.15859681,0.229916 -0.0370714,0.08639 -0.0565645,0.1794 -0.0573369,0.27335 -7.724e-4,0.09404 0.0171873,0.187331 0.0528423,0.274293 0.0356455,0.08705 0.0882688,0.166087 0.15479148,0.23256 0.0665321,0.06648 0.14562277,0.11897 0.2326735,0.154567 0.0870507,0.0356 0.18031463,0.05344 0.2743433,0.05259 0.094029,-8.5e-4 0.1869528,-0.02049 0.2733331,-0.0576 0.08639,-0.0372 0.1645078,-0.09121 0.2298029,-0.158817 L 6.0042244,6.9973204 10.460119,11.453078 c 0.132856,0.132851 0.313114,0.207444 0.500926,0.207444 0.187907,0 0.36807,-0.07459 0.500927,-0.207444 0.132856,-0.13285 0.207547,-0.313006 0.207547,-0.500904 0,-0.187898 -0.07469,-0.368054 -0.207547,-0.500905 z\"/></svg>');--dialog__title--font-pattern:var(--font-pattern, \"'Sora', 'Algerian'\");--dialog__title--padding-left:var(--space--small, 6px);--dialog__title__container--padding-bottom:var(--space--medium, 12px);--dialog__title--weight--large:var(--text-weight--large, 600);--dialog__body--font-pattern:var(--font-pattern, \"'Sora', 'Algerian'\");--dialog__body--text-shadow:var(--text-shadow, \"0 0 0 #353535, 0 0 1px transparent\");--dialog__body--text-weight--medium:var(--text-weight--medium, 400);--dialog__body--padding-bottom:var(--space--large, 24px);--dialog__body--font-size:var(--text--medium, 14px);--dialog__body--color:var(--text--primary, #626e82);--dialog__icon--color:var(--text--inverted, #fff);--dialog__critical--background-color:var(--color--alert-error-800, #BD0025);--dialog__warning--background-color:var(--color--alert-warning-500, #EFB103);--dialog-z-index:var(--most-visible, 3);--dialog--warning__image:url('data: image/svg+xml;utf8,<svg width=\"15\" height=\"15\" viewBox=\"0 0 15 15\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 7.5,0 0,13 h 15 z m 0,2.73684 5.1341,8.89476 H 2.36591 Z M 6.81818,5.47368 V 8.21053 H 8.18182 V 5.47368 Z m 0,4.10527 V 10.9474 H 8.18182 V 9.57895\"/></svg>');--dialog--critical__image:url('data: image/svg+xml;utf8,<svg width=\"13\" height=\"13\" viewBox=\"0 0 13 13\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 7.6534493,6.4948538 12.762051,1.3864299 C 12.914368,1.2341297 13,1.027552 13,0.81215179 13,0.59676225 12.914369,0.39018443 12.762051,0.23787352 12.609733,0.08557341 12.40318,0 12.187747,0 11.972425,0 11.765762,0.08557341 11.613445,0.23787352 L 6.5048431,5.3462975 1.3961977,0.23787352 C 1.2438802,0.08557341 1.0373043,0 0.82189458,0 0.60649572,0 0.39990901,0.08557341 0.24759147,0.23787352 0.09527396,0.39018443 0.00970766,0.59676225 0.00970766,0.81215179 c 0,0.21540021 0.0855663,0.42197791 0.23788381,0.57427811 L 5.3562369,6.4948538 0.24759147,11.604381 c -0.0775121,0.07492 -0.13931586,0.164543 -0.18182835,0.263595 -0.04250169,0.09905 -0.064850182,0.205678 -0.0657357237,0.313391 -8.8554258e-4,0.107813 0.0197049337,0.214771 0.0605827337,0.314472 0.04086693,0.0998 0.10119858,0.190415 0.17746563,0.266625 0.0762779,0.07622 0.16695386,0.136398 0.26675594,0.177208 0.099802,0.04082 0.20672745,0.06127 0.31452961,0.06029 0.1078025,-9.53e-4 0.21433799,-0.0235 0.31337139,-0.06604 0.099045,-0.04265 0.1886052,-0.104571 0.263465,-0.182081 L 6.5048431,7.6434102 11.613445,12.751855 c 0.152317,0.152312 0.35898,0.237831 0.574302,0.237831 0.215433,0 0.421986,-0.08552 0.574304,-0.237831 C 12.914368,12.599545 13,12.393 13,12.177578 13,11.962157 12.91437,11.75561 12.762051,11.603299 Z\"/></svg>')}h2{margin-block-start:0;margin-block-end:0;margin-inline-start:0px;margin-inline-end:0px}.overlay{position:fixed;display:flex;top:0px;z-index:var(--dialog-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.dialog{display:flex;width:80%;position:absolute;top:50%;left:50%;margin-right:-50%;box-sizing:border-box;transform:translate(-50%, -50%);box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122)}@media screen and (min-width: 768px){.dialog{width:50%}}@media screen and (min-width: 992px){.dialog{width:33.33333%}}.dialog__container{width:100%;background:#FFFF;border-radius:0px 6px 6px 0px;box-sizing:border-box;padding:var(--dialog__container-padding)}.dialog__critical--indicator{box-sizing:border-box;width:12px;border-radius:6px 0px 0px 6px;background-color:var(--dialog__critical--background-color)}.dialog__warning--indicator{width:12px;border-radius:6px 0px 0px 6px;box-sizing:border-box;background-color:var(--dialog__warning--background-color)}.message{font-size:var(--dialog__body--font-size);font-weight:var(--dialog__body--text-weight--medium);font-family:var(--dialog__body--font-pattern);text-shadow:var(--dialog__body--text-shadow);padding-bottom:var(--dialog__body--padding-bottom);color:var(--dialog__body--color);max-height:30vh;content-visibility:auto;margin-bottom:24px;overflow-y:auto}.changeable__icon{background:var(--dialog__warning--background-color);--ez-icon--color:var(--dialog__icon--color);display:grid;place-items:center;width:26px;height:26px;border-radius:50%}.changeable__icon.critical{background:var(--dialog__critical--background-color)}.title{display:flex;font-family:var(--dialog__title--font-pattern);margin:0;font-weight:var(--dialog__title--weight--large);line-height:1.3}.title__container{display:flex;padding-bottom:var(--dialog__title__container--padding-bottom)}.title__box{display:flex;width:100%;align-items:center;align-self:center}.title--label{padding-left:var(--dialog__title--padding-left)}.title-icon{outline:none;border:none;background-color:var(--dialog__warning--background-color);width:26px;height:26px;border-radius:100%;padding:0;display:flex;justify-content:center;align-items:center}.title-icon--critical{background-color:var(--dialog__critical--background-color)}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;width:10%;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:var(--dialog__btn__close--background-color);width:12px;height:12px;-webkit-mask-image:var(--dialog__btn__close__image);mask-image:var(--dialog__btn__close__image)}.title-icon::after{content:'';display:flex;background-color:#FFFF;width:15px;height:15px;-webkit-mask-image:var(--dialog--warning__image);mask-image:var(--dialog--warning__image)}.title-icon--critical::after{content:'';display:flex;background-color:#FFFF;width:13px;height:13px;-webkit-mask-image:var(--dialog--critical__image);mask-image:var(--dialog--critical__image)}.button-yes-no__container{display:flex;box-sizing:border-box;align-self:center;align-items:center;justify-content:flex-end}.button__no{padding-right:var(--dialog__btn__no--padding-right)}.button__ok--container{display:flex;justify-content:flex-end}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
|
|
8
8
|
|
|
9
9
|
class Message {
|
|
10
10
|
constructor(title, message, critical, confirm, icon, callBack) {
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-88286449.js');
|
|
6
|
-
const
|
|
6
|
+
const core = require('@sankhyalabs/core');
|
|
7
|
+
const UnitMetadata = require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
7
8
|
|
|
8
9
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
9
10
|
|
|
@@ -110068,7 +110069,7 @@ class AgGridController {
|
|
|
110068
110069
|
if (sort) {
|
|
110069
110070
|
const field = this._dataUnit.getField(colId);
|
|
110070
110071
|
const mode = sort === "asc" ? UnitMetadata.SortMode.ASC : UnitMetadata.SortMode.DESC;
|
|
110071
|
-
const sortField = field ? { field: field.name, dataType: field.dataType, mode } : { field: colId, dataType:
|
|
110072
|
+
const sortField = field ? { field: field.name, dataType: field.dataType, mode } : { field: colId, dataType: core.DataType.TEXT, mode };
|
|
110072
110073
|
sortedColumns.push(sortField);
|
|
110073
110074
|
}
|
|
110074
110075
|
});
|
|
@@ -110353,14 +110354,14 @@ class DataUnitBridge {
|
|
|
110353
110354
|
}
|
|
110354
110355
|
processAction(action) {
|
|
110355
110356
|
switch (action.type) {
|
|
110356
|
-
case
|
|
110357
|
+
case core.Action.METADATA_LOADED:
|
|
110357
110358
|
this._gridController.setColumnsDef(this.buildColumnDefs(), true);
|
|
110358
110359
|
break;
|
|
110359
|
-
case
|
|
110360
|
-
case
|
|
110361
|
-
case
|
|
110362
|
-
case
|
|
110363
|
-
case
|
|
110360
|
+
case core.Action.RECORDS_REMOVED:
|
|
110361
|
+
case core.Action.EDITION_CANCELED:
|
|
110362
|
+
case core.Action.RECORDS_ADDED:
|
|
110363
|
+
case core.Action.RECORDS_COPIED:
|
|
110364
|
+
case core.Action.DATA_SAVED:
|
|
110364
110365
|
this._gridController.refresh();
|
|
110365
110366
|
break;
|
|
110366
110367
|
}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-88286449.js');
|
|
6
|
-
const AssetsUtils = require('./AssetsUtils-
|
|
7
|
-
require('
|
|
6
|
+
const AssetsUtils = require('./AssetsUtils-4909c6de.js');
|
|
7
|
+
const core = require('@sankhyalabs/core');
|
|
8
8
|
|
|
9
9
|
const ezModalCss = ":host{--ez-modal-z-index:var(--most-visible, 3);--ez-modal-vertical-padding:var(--space--large, 24px);display:block}.modal{position:fixed;padding:var(--ez-modal-vertical-padding) 0;display:flex;top:0px;z-index:var(--ez-modal-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}@keyframes expand-modal--left{from{transform:translate(-100%)}}@keyframes expand-modal--right{from{transform:translate(100%)}}.modal__container{display:flex;flex-wrap:wrap;height:100%;box-sizing:border-box;width:100%;align-items:flex-start}.modal__container--right{animation:expand-modal--right .2s ease-in-out 1;justify-content:flex-end}.modal__container--left{animation:expand-modal--left .2s ease-in-out 1;justify-content:flex-start}.modal__content{display:flex;flex-wrap:wrap;max-height:calc(100% - 48px);height:100%;overflow-y:auto;background-color:rgb(255, 255, 255);padding:24px;border-radius:12px 0px 0px 12px;box-shadow:rgb(0 38 111 / 12%) 0px 0px 16px 0px}.modal__content--right{border-radius:12px 0px 0px 12px}.modal__content--left{border-radius:0px 12px 12px 0px}.modal__box__container{display:flex;flex-wrap:wrap;background-color:#fff;width:100%;border-radius:12px}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
|
|
10
10
|
|
|
@@ -263,7 +263,7 @@ let GridConfig = class {
|
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
265
|
compareWords(column, searchingText) {
|
|
266
|
-
if (
|
|
266
|
+
if (core.StringUtils.replaceAccentuatedChars(column.label).indexOf(core.StringUtils.replaceAccentuatedChars(searchingText)) > -1) {
|
|
267
267
|
return true;
|
|
268
268
|
}
|
|
269
269
|
return false;
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-88286449.js');
|
|
6
|
-
require('
|
|
7
|
-
const FloatingManager = require('./FloatingManager-6cfeb947.js');
|
|
6
|
+
const core = require('@sankhyalabs/core');
|
|
8
7
|
|
|
9
8
|
const ezPopoverCss = ":host{--ez-popover__box--border-radius:var(--border--radius-medium, 12px);--ez-popover__box--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-popover__box--background-color:var(--background--xlight, #fff);--ez-popover__box--z-index:var(--more-visible, 1);position:relative;display:flex;user-select:none;width:100%}.box{z-index:var(--ez-popover__box--z-index);display:flex;flex-direction:column;height:fit-content;background-color:var(--ez-popover__box--background-color);border-radius:var(--ez-popover__box--border-radius);box-shadow:var(--ez-popover__box--box-shadow)}.box--fit-content{width:fit-content}.box--full-width{width:100%}";
|
|
10
9
|
|
|
@@ -66,7 +65,7 @@ let EzPopover = class {
|
|
|
66
65
|
return !_container.lastElementChild.shadowRoot ? _container.contains(node) : _container.lastElementChild.shadowRoot.contains(node);
|
|
67
66
|
}
|
|
68
67
|
};
|
|
69
|
-
|
|
68
|
+
core.FloatingManager.updateFloatPosition(this._box, this._container, floatingOptions);
|
|
70
69
|
}
|
|
71
70
|
/**
|
|
72
71
|
* Faz com que o popover seja renderizado na DOM.
|
|
@@ -89,7 +88,7 @@ let EzPopover = class {
|
|
|
89
88
|
return !_container.lastElementChild.shadowRoot ? _container.contains(node) : _container.lastElementChild.shadowRoot.contains(node);
|
|
90
89
|
}
|
|
91
90
|
};
|
|
92
|
-
this._floatingID =
|
|
91
|
+
this._floatingID = core.FloatingManager.float(this._box, this._container, floatingOptions);
|
|
93
92
|
this.opened = true;
|
|
94
93
|
}
|
|
95
94
|
/**
|
|
@@ -97,7 +96,7 @@ let EzPopover = class {
|
|
|
97
96
|
*/
|
|
98
97
|
async hide() {
|
|
99
98
|
if (this._floatingID !== undefined) {
|
|
100
|
-
|
|
99
|
+
core.FloatingManager.close(this._floatingID);
|
|
101
100
|
this._floatingID = undefined;
|
|
102
101
|
this.opened = false;
|
|
103
102
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, h, Host, Prop, Element, forceUpdate, Method } from "@stencil/core";
|
|
1
|
+
import { Component, h, Host, Prop, Element, forceUpdate, Method, Watch } from "@stencil/core";
|
|
2
2
|
import { DataUnit, Action, DataUnitAction } from "@sankhyalabs/core";
|
|
3
3
|
import { FormSheet } from "./structure/FormSheet";
|
|
4
4
|
import { buildFromConfig, buildFromDataUnit } from "./structure/FormSheetMetadata";
|
|
@@ -30,6 +30,9 @@ export class EzForm {
|
|
|
30
30
|
accept();
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
+
configChanged() {
|
|
34
|
+
this.processMetadata();
|
|
35
|
+
}
|
|
33
36
|
validateRequired(requiredFields, record) {
|
|
34
37
|
const invalidFields = [];
|
|
35
38
|
requiredFields.forEach(field => {
|
|
@@ -222,4 +225,8 @@ export class EzForm {
|
|
|
222
225
|
}
|
|
223
226
|
}; }
|
|
224
227
|
static get elementRef() { return "_element"; }
|
|
228
|
+
static get watchers() { return [{
|
|
229
|
+
"propName": "config",
|
|
230
|
+
"methodName": "configChanged"
|
|
231
|
+
}]; }
|
|
225
232
|
}
|