@sankhyalabs/ezui 0.0.0-bugfix-dev-KB-61161.0 → 0.0.0-bugfix-dev-KB-59008.0
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-chart.cjs.entry.js +433 -0
- package/dist/cjs/ez-custom-form-input_2.cjs.entry.js +0 -8
- package/dist/cjs/ez-form-view.cjs.entry.js +4 -3
- package/dist/cjs/ez-grid.cjs.entry.js +9 -12
- package/dist/cjs/ez-number-input.cjs.entry.js +26 -27
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/index-a7b0c73d.js +4 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/ez-chart/components/BarChart.js +27 -0
- package/dist/collection/components/ez-chart/components/ColumnChart.js +27 -0
- package/dist/collection/components/ez-chart/components/DonutChart.js +42 -0
- package/dist/collection/components/ez-chart/components/LineChart.js +27 -0
- package/dist/collection/components/ez-chart/components/PieChart.js +45 -0
- package/dist/collection/components/ez-chart/components/index.js +5 -0
- package/dist/collection/components/ez-chart/ez-chart.css +5 -0
- package/dist/collection/components/ez-chart/ez-chart.js +284 -0
- package/dist/collection/components/ez-chart/interfaces/ChartAxis.js +1 -0
- package/dist/collection/components/ez-chart/interfaces/ChartContext.js +14 -0
- package/dist/collection/components/ez-chart/interfaces/ChartOptions.js +1 -0
- package/dist/collection/components/ez-chart/interfaces/ChartSerie.js +1 -0
- package/dist/collection/components/ez-chart/interfaces/ChartStrategies.js +1 -0
- package/dist/collection/components/ez-chart/interfaces/ChartType.js +8 -0
- package/dist/collection/components/ez-chart/interfaces/index.js +5 -0
- package/dist/collection/components/ez-chart/test/mock-chart.js +137 -0
- package/dist/collection/components/ez-chart/types/BaseHighChartsRender.js +146 -0
- package/dist/collection/components/ez-form-view/custom-input/ez-custom-form-input.js +1 -9
- package/dist/collection/components/ez-form-view/ez-form-view.js +1 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/NumberInput.tpl.js +3 -2
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +1 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/NumberInput.tpl.js +3 -2
- package/dist/collection/components/ez-grid/ez-grid.js +5 -9
- package/dist/collection/components/ez-number-input/ez-number-input.js +31 -27
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +472 -53
- package/dist/esm/ez-chart.entry.js +429 -0
- package/dist/esm/ez-custom-form-input_2.entry.js +0 -8
- package/dist/esm/ez-form-view.entry.js +4 -3
- package/dist/esm/ez-grid.entry.js +9 -12
- package/dist/esm/ez-number-input.entry.js +26 -27
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/index-baa5e267.js +4 -0
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/{p-362c3c80.entry.js → p-065e735d.entry.js} +1 -1
- package/dist/ezui/p-3b9e5664.entry.js +1 -0
- package/dist/ezui/p-93a19a8c.entry.js +1 -0
- package/dist/ezui/p-e90dd4eb.entry.js +1 -0
- package/dist/ezui/p-ffef392d.entry.js +1 -0
- package/dist/types/components/ez-chart/components/BarChart.d.ts +9 -0
- package/dist/types/components/ez-chart/components/ColumnChart.d.ts +9 -0
- package/dist/types/components/ez-chart/components/DonutChart.d.ts +9 -0
- package/dist/types/components/ez-chart/components/LineChart.d.ts +9 -0
- package/dist/types/components/ez-chart/components/PieChart.d.ts +9 -0
- package/dist/types/components/ez-chart/components/index.d.ts +5 -0
- package/dist/types/components/ez-chart/ez-chart.d.ts +58 -0
- package/dist/types/components/ez-chart/interfaces/ChartAxis.d.ts +7 -0
- package/dist/types/components/ez-chart/interfaces/ChartContext.d.ts +11 -0
- package/dist/types/components/ez-chart/interfaces/ChartOptions.d.ts +10 -0
- package/dist/types/components/ez-chart/interfaces/ChartSerie.d.ts +20 -0
- package/dist/types/components/ez-chart/interfaces/ChartStrategies.d.ts +7 -0
- package/dist/types/components/ez-chart/interfaces/ChartType.d.ts +7 -0
- package/dist/types/components/ez-chart/interfaces/index.d.ts +5 -0
- package/dist/types/components/ez-chart/types/BaseHighChartsRender.d.ts +15 -0
- package/dist/types/components/ez-form-view/custom-input/ez-custom-form-input.d.ts +0 -2
- package/dist/types/components/ez-number-input/ez-number-input.d.ts +2 -0
- package/dist/types/components.d.ts +95 -0
- package/package.json +2 -1
- package/react/components.d.ts +1 -0
- package/react/components.js +1 -0
- package/react/components.js.map +1 -1
- package/dist/ezui/p-13727aec.entry.js +0 -1
- package/dist/ezui/p-1a35324b.entry.js +0 -1
- package/dist/ezui/p-99f46950.entry.js +0 -1
|
@@ -332,14 +332,10 @@ export class EzGrid {
|
|
|
332
332
|
(_a = this._gridApi) === null || _a === void 0 ? void 0 : _a.clearRangeSelection();
|
|
333
333
|
}
|
|
334
334
|
getPaginationControl() {
|
|
335
|
-
if (this._paginationInfo)
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
h("div", { id: "grid-pagination-tooltip", ref: (element) => (this._refPaginationLabelTooltip = element), class: "ez-flex ez-margin-right--medium" }, h("ez-button", { size: "small", class: "ez-margin-right--medium", iconName: "chevron-left", mode: "icon", enabled: currentPage > 0, onClick: () => this.previousPage(), label: "P\u00E1gina anterior" }), h("ez-button", { size: "small", iconName: "chevron-right", mode: "icon", enabled: hasMore, onClick: () => this.nextPage(), label: "Pr\u00F3xima P\u00E1gina" })),
|
|
340
|
-
];
|
|
341
|
-
}
|
|
342
|
-
return null;
|
|
335
|
+
if (!this._paginationInfo)
|
|
336
|
+
return null;
|
|
337
|
+
const { currentPage, hasMore } = this._paginationInfo;
|
|
338
|
+
return (h("div", { class: "grid-header__container grid-header__pagination", ref: ref => (this._refPaginationControl = ref) }, h("div", { class: "ez-text ez-text--primary ez-text--medium ez-margin-right--medium", ref: (element) => (this._refPaginationLabel = element) }, h("span", { class: "grid-header__pagination-label" }, h("strong", { class: "ez-text ez-text--primary ez-text--medium" }, this._getActualPageLabel()), this._getRemainingPageLabel())), h("div", { id: "grid-pagination-tooltip", ref: (element) => (this._refPaginationLabelTooltip = element), class: "ez-flex ez-margin-right--medium" }, h("ez-button", { size: "small", class: "ez-margin-right--medium", iconName: "chevron-left", mode: "icon", enabled: currentPage > 0, onClick: () => this.previousPage(), label: "P\u00E1gina anterior" }), h("ez-button", { size: "small", iconName: "chevron-right", mode: "icon", enabled: hasMore, onClick: () => this.nextPage(), label: "Pr\u00F3xima P\u00E1gina" }))));
|
|
343
339
|
}
|
|
344
340
|
componentDidLoad() {
|
|
345
341
|
this._gridController.initDatagrid(this._container, {
|
|
@@ -456,7 +452,7 @@ export class EzGrid {
|
|
|
456
452
|
}
|
|
457
453
|
render() {
|
|
458
454
|
var _a;
|
|
459
|
-
return (h(Host, { "no-header": this.hideHeader() }, h("div", { class: "grid__container ez-grid", ref: elem => (this._container = elem) }), h("div", { class: "ez-box ez-box--shadow ez-padding--medium grid-header" }, h("filter-column", { class: "grid-header__popover", noHeaderTaskBar: !this._hasLeftButtons, dataSource: this.getDataSource(), dataUnit: this.dataUnit, gridHeaderHidden: this.hideHeader(), ref: (element) => (this._filterColumn = element) }), h("div", { class: "grid-header__position" }, h("div", { class: "grid-header__container grid-header__left-container" }, h("slot", { name: "leftButtons" })),
|
|
455
|
+
return (h(Host, { "no-header": this.hideHeader() }, h("div", { class: "grid__container ez-grid", ref: elem => (this._container = elem) }), h("div", { class: "ez-box ez-box--shadow ez-padding--medium grid-header" }, h("filter-column", { class: "grid-header__popover", noHeaderTaskBar: !this._hasLeftButtons, dataSource: this.getDataSource(), dataUnit: this.dataUnit, gridHeaderHidden: this.hideHeader(), ref: (element) => (this._filterColumn = element) }), h("div", { class: "grid-header__position" }, h("div", { class: "grid-header__container grid-header__left-container" }, h("slot", { name: "leftButtons" })), this.getPaginationControl())), h("div", { ref: (ref) => (this._gridSelectionCounter = ref), class: `grid__selection-counter ez-elevation--4
|
|
460
456
|
${this._showSelectionCounter ? 'grid__selection-counter--opened' : ''}
|
|
461
457
|
` }, h(SelectionCounter, { selectionCount: this._selectionCount, currentPageSelected: this._currentPageSelected, paginationInfo: this._paginationInfo, canSelectAll: (_a = this.selectionToastConfig) === null || _a === void 0 ? void 0 : _a.canSelectAll, allRecordSelected: this._isAllSelection, onSelectAll: () => this.onSelectAllRecords(), onSelectPage: () => this.onSelectPageRecords(), onClearAll: () => this.onClearSelectedRecords(), onClose: () => (this._showSelectionCounter = false) })), h("div", { class: "grid__footer" }, h("slot", { name: "footer" }))));
|
|
462
458
|
}
|
|
@@ -6,6 +6,7 @@ export class EzNumberInput {
|
|
|
6
6
|
this._focused = false;
|
|
7
7
|
this._changePending = false;
|
|
8
8
|
this._valuePromiseCallbacks = [];
|
|
9
|
+
this._value = undefined;
|
|
9
10
|
this.label = undefined;
|
|
10
11
|
this.value = undefined;
|
|
11
12
|
this.enabled = true;
|
|
@@ -61,24 +62,7 @@ export class EzNumberInput {
|
|
|
61
62
|
}
|
|
62
63
|
observeValue(newValue, oldValue) {
|
|
63
64
|
if (this._textInput && newValue != oldValue) {
|
|
64
|
-
|
|
65
|
-
const oldValueValidated = this.validateValue(oldValue);
|
|
66
|
-
if (newValueValidated === null) {
|
|
67
|
-
this._textInput.value = '';
|
|
68
|
-
}
|
|
69
|
-
if (newValueValidated != oldValueValidated) {
|
|
70
|
-
const textValue = this.getTextValue(newValueValidated) || '';
|
|
71
|
-
if ((this._textInput.value || '') !== textValue) {
|
|
72
|
-
const parsedNumber = this.getParsedNumber(textValue);
|
|
73
|
-
if (parsedNumber !== undefined || !this._focused) {
|
|
74
|
-
this._textInput.value = textValue;
|
|
75
|
-
this._focused = false;
|
|
76
|
-
this.errorMessage = "";
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
const valueEmitted = newValueValidated === null ? undefined : newValueValidated;
|
|
80
|
-
this.ezChange.emit(valueEmitted);
|
|
81
|
-
}
|
|
65
|
+
this.handleNewValue(newValue, oldValue);
|
|
82
66
|
}
|
|
83
67
|
this._changePending = false;
|
|
84
68
|
}
|
|
@@ -87,12 +71,31 @@ export class EzNumberInput {
|
|
|
87
71
|
this.setInputValue();
|
|
88
72
|
}
|
|
89
73
|
}
|
|
74
|
+
handleNewValue(newValue, oldValue) {
|
|
75
|
+
const newValueValidated = this.validateValue(newValue);
|
|
76
|
+
const oldValueValidated = this.validateValue(oldValue);
|
|
77
|
+
if (newValueValidated === null) {
|
|
78
|
+
this._value = '';
|
|
79
|
+
}
|
|
80
|
+
if (newValueValidated === oldValueValidated) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
const textValue = this.getTextValue(newValueValidated) || '';
|
|
84
|
+
const parsedNumber = this.getParsedNumber(textValue);
|
|
85
|
+
if ((this._value || '') !== textValue && (parsedNumber !== undefined || !this._focused)) {
|
|
86
|
+
this._value = textValue;
|
|
87
|
+
this._focused = false;
|
|
88
|
+
this.errorMessage = "";
|
|
89
|
+
}
|
|
90
|
+
const valueEmitted = newValueValidated === null ? undefined : newValueValidated;
|
|
91
|
+
this.ezChange.emit(valueEmitted);
|
|
92
|
+
}
|
|
90
93
|
validateValue(value) {
|
|
91
94
|
return isNaN(value) || value === undefined ? null : value;
|
|
92
95
|
}
|
|
93
96
|
getTextValue(value) {
|
|
94
97
|
if (value != undefined) {
|
|
95
|
-
return this.precision
|
|
98
|
+
return this.precision >= 0 ? NumberUtils.format(value.toString(), Number(this.precision), Number(this.prettyPrecision)) : value.toString();
|
|
96
99
|
}
|
|
97
100
|
return undefined;
|
|
98
101
|
}
|
|
@@ -145,17 +148,13 @@ export class EzNumberInput {
|
|
|
145
148
|
this.ezStartChange.emit({ waitmessage: "", blocking: false });
|
|
146
149
|
}
|
|
147
150
|
}
|
|
148
|
-
getParsedNumber(value) {
|
|
149
|
-
var _a;
|
|
150
|
-
if (value === void 0) {
|
|
151
|
-
value = (_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value;
|
|
152
|
-
}
|
|
151
|
+
getParsedNumber(value = this._textInput.value) {
|
|
153
152
|
return (value === null || value === void 0 ? void 0 : value.trim()) ? NumberUtils.stringToNumber(value) : undefined;
|
|
154
153
|
}
|
|
155
154
|
setInputValue() {
|
|
156
155
|
const textValue = this.getTextValue(this.value) || '';
|
|
157
|
-
if ((this.
|
|
158
|
-
this.
|
|
156
|
+
if ((this._value || '') !== textValue) {
|
|
157
|
+
this._value = textValue;
|
|
159
158
|
}
|
|
160
159
|
}
|
|
161
160
|
componentDidLoad() {
|
|
@@ -164,7 +163,7 @@ export class EzNumberInput {
|
|
|
164
163
|
}
|
|
165
164
|
render() {
|
|
166
165
|
ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
167
|
-
return (h("ez-text-input", { class: "number__input", "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, "data-slave-mode": "true", label: this.label, onBlur: () => this.handleBlur(), onInput: () => this.handleInput(), restrict: this.precision > 0 ? "0123456789-,." : "0123456789-", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, canShowError: this.canShowError }));
|
|
166
|
+
return (h("ez-text-input", { class: "number__input", "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, "data-slave-mode": "true", label: this.label, onBlur: () => this.handleBlur(), onInput: () => this.handleInput(), restrict: this.precision > 0 ? "0123456789-,." : "0123456789-", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, canShowError: this.canShowError, value: this._value }));
|
|
168
167
|
}
|
|
169
168
|
static get is() { return "ez-number-input"; }
|
|
170
169
|
static get encapsulation() { return "shadow"; }
|
|
@@ -321,6 +320,11 @@ export class EzNumberInput {
|
|
|
321
320
|
}
|
|
322
321
|
};
|
|
323
322
|
}
|
|
323
|
+
static get states() {
|
|
324
|
+
return {
|
|
325
|
+
"_value": {}
|
|
326
|
+
};
|
|
327
|
+
}
|
|
324
328
|
static get events() {
|
|
325
329
|
return [{
|
|
326
330
|
"method": "ezChange",
|
|
@@ -56,6 +56,12 @@ export const EzCardItem: {
|
|
|
56
56
|
new (): EzCardItem;
|
|
57
57
|
};
|
|
58
58
|
|
|
59
|
+
interface EzChart extends Components.EzChart, HTMLElement {}
|
|
60
|
+
export const EzChart: {
|
|
61
|
+
prototype: EzChart;
|
|
62
|
+
new (): EzChart;
|
|
63
|
+
};
|
|
64
|
+
|
|
59
65
|
interface EzCheck extends Components.EzCheck, HTMLElement {}
|
|
60
66
|
export const EzCheck: {
|
|
61
67
|
prototype: EzCheck;
|