@sankhyalabs/ezui 0.0.0-bugfix-dev-KB-85772.0 → 0.0.0-bugfix-dev-KB-87769.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/{DataBinder-c2060474.js → DataBinder-b9973a19.js} +39 -11
- package/dist/cjs/ez-actions-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-alert-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-alert.cjs.entry.js +1 -1
- package/dist/cjs/ez-application.cjs.entry.js +1 -1
- package/dist/cjs/ez-badge.cjs.entry.js +1 -1
- package/dist/cjs/ez-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/ez-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-calendar.cjs.entry.js +1 -1
- package/dist/cjs/ez-card-item_2.cjs.entry.js +1 -1
- package/dist/cjs/ez-chart.cjs.entry.js +1 -1
- package/dist/cjs/ez-check.cjs.entry.js +19 -11
- package/dist/cjs/ez-chip.cjs.entry.js +1 -1
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +1 -1
- package/dist/cjs/ez-combo-box-list_3.cjs.entry.js +2 -2
- package/dist/cjs/ez-combo-box.cjs.entry.js +3 -2
- package/dist/cjs/ez-date-input.cjs.entry.js +3 -2
- package/dist/cjs/ez-date-time-input.cjs.entry.js +3 -2
- package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ez-double-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/ez-file-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-filter-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-form-view.cjs.entry.js +1 -1
- package/dist/cjs/ez-form.cjs.entry.js +2 -2
- package/dist/cjs/ez-grid.cjs.entry.js +53 -17
- package/dist/cjs/ez-guide-navigator.cjs.entry.js +1 -1
- package/dist/cjs/ez-icon.cjs.entry.js +1 -1
- package/dist/cjs/ez-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-loading-bar.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal-container.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal.cjs.entry.js +1 -1
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-number-input.cjs.entry.js +3 -2
- package/dist/cjs/ez-popover-plus_3.cjs.entry.js +1 -1
- package/dist/cjs/ez-popover.cjs.entry.js +1 -1
- package/dist/cjs/ez-popup.cjs.entry.js +1 -1
- package/dist/cjs/ez-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-scroller_2.cjs.entry.js +1 -1
- package/dist/cjs/ez-search-plus.cjs.entry.js +1 -1
- package/dist/cjs/ez-search-result-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-search.cjs.entry.js +3 -2
- package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +1 -1
- package/dist/cjs/ez-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/ez-split-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-split-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-split-panel.cjs.entry.js +1 -1
- package/dist/cjs/ez-tabselector.cjs.entry.js +1 -1
- package/dist/cjs/ez-text-area.cjs.entry.js +25 -4
- package/dist/cjs/ez-text-input.cjs.entry.js +28 -4
- package/dist/cjs/ez-time-input.cjs.entry.js +3 -2
- package/dist/cjs/ez-toast.cjs.entry.js +1 -1
- package/dist/cjs/ez-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/ez-tree.cjs.entry.js +1 -1
- package/dist/cjs/ez-upload.cjs.entry.js +1 -1
- package/dist/cjs/ez-view-stack.cjs.entry.js +1 -1
- package/dist/cjs/ezui.cjs.js +2 -2
- package/dist/cjs/filter-column.cjs.entry.js +15 -5
- package/dist/cjs/{index-9e5554cb.js → index-a7b0c73d.js} +0 -3
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/components/ez-check/ez-check.css +9 -0
- package/dist/collection/components/ez-check/ez-check.js +34 -9
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +19 -1
- package/dist/collection/components/ez-date-input/ez-date-input.js +19 -1
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +19 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +38 -8
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +4 -2
- package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +9 -5
- package/dist/collection/components/ez-grid/subcomponents/filter-column.js +14 -4
- package/dist/collection/components/ez-multi-selection-list/interfaces/IStaticOptionsFetchConfig.js +1 -0
- package/dist/collection/components/ez-number-input/ez-number-input.js +19 -1
- package/dist/collection/components/ez-search/ez-search.js +19 -1
- package/dist/collection/components/ez-search-plus/ez-search-plus.js +40 -16
- package/dist/collection/components/ez-text-area/ez-text-area.js +47 -2
- package/dist/collection/components/ez-text-input/ez-text-input.js +47 -3
- package/dist/collection/components/ez-time-input/ez-time-input.js +19 -1
- package/dist/collection/utils/form/DataBinder.js +40 -12
- package/dist/collection/utils/form/test/DataBinder.test.js +14 -0
- package/dist/custom-elements/index.js +194 -62
- package/dist/esm/{DataBinder-89946126.js → DataBinder-1035e36f.js} +40 -12
- package/dist/esm/ez-actions-button.entry.js +1 -1
- package/dist/esm/ez-alert-list.entry.js +1 -1
- package/dist/esm/ez-alert.entry.js +1 -1
- package/dist/esm/ez-application.entry.js +1 -1
- package/dist/esm/ez-badge.entry.js +1 -1
- package/dist/esm/ez-breadcrumb.entry.js +1 -1
- package/dist/esm/ez-button.entry.js +1 -1
- package/dist/esm/ez-calendar.entry.js +1 -1
- package/dist/esm/ez-card-item_2.entry.js +1 -1
- package/dist/esm/ez-chart.entry.js +1 -1
- package/dist/esm/ez-check.entry.js +19 -11
- package/dist/esm/ez-chip.entry.js +1 -1
- package/dist/esm/ez-collapsible-box.entry.js +1 -1
- package/dist/esm/ez-combo-box-list_3.entry.js +2 -2
- package/dist/esm/ez-combo-box.entry.js +3 -2
- package/dist/esm/ez-date-input.entry.js +3 -2
- package/dist/esm/ez-date-time-input.entry.js +3 -2
- package/dist/esm/ez-dialog.entry.js +1 -1
- package/dist/esm/ez-double-list.entry.js +1 -1
- package/dist/esm/ez-dropdown.entry.js +1 -1
- package/dist/esm/ez-file-item.entry.js +1 -1
- package/dist/esm/ez-filter-input.entry.js +1 -1
- package/dist/esm/ez-form-view.entry.js +1 -1
- package/dist/esm/ez-form.entry.js +2 -2
- package/dist/esm/ez-grid.entry.js +54 -18
- package/dist/esm/ez-guide-navigator.entry.js +1 -1
- package/dist/esm/ez-icon.entry.js +1 -1
- package/dist/esm/ez-list.entry.js +1 -1
- package/dist/esm/ez-loading-bar.entry.js +1 -1
- package/dist/esm/ez-modal-container.entry.js +1 -1
- package/dist/esm/ez-modal.entry.js +1 -1
- package/dist/esm/ez-multi-selection-list.entry.js +1 -1
- package/dist/esm/ez-number-input.entry.js +3 -2
- package/dist/esm/ez-popover-plus_3.entry.js +1 -1
- package/dist/esm/ez-popover.entry.js +1 -1
- package/dist/esm/ez-popup.entry.js +1 -1
- package/dist/esm/ez-radio-button.entry.js +1 -1
- package/dist/esm/ez-scroller_2.entry.js +1 -1
- package/dist/esm/ez-search-plus.entry.js +1 -1
- package/dist/esm/ez-search-result-list.entry.js +1 -1
- package/dist/esm/ez-search.entry.js +3 -2
- package/dist/esm/ez-sidebar-navigator.entry.js +1 -1
- package/dist/esm/ez-skeleton.entry.js +1 -1
- package/dist/esm/ez-split-button.entry.js +1 -1
- package/dist/esm/ez-split-item.entry.js +1 -1
- package/dist/esm/ez-split-panel.entry.js +1 -1
- package/dist/esm/ez-tabselector.entry.js +1 -1
- package/dist/esm/ez-text-area.entry.js +25 -4
- package/dist/esm/ez-text-input.entry.js +28 -4
- package/dist/esm/ez-time-input.entry.js +3 -2
- package/dist/esm/ez-toast.entry.js +1 -1
- package/dist/esm/ez-tooltip.entry.js +1 -1
- package/dist/esm/ez-tree.entry.js +1 -1
- package/dist/esm/ez-upload.entry.js +1 -1
- package/dist/esm/ez-view-stack.entry.js +1 -1
- package/dist/esm/ezui.js +3 -3
- package/dist/esm/filter-column.entry.js +15 -5
- package/dist/esm/{index-5a720e56.js → index-baa5e267.js} +1 -3
- package/dist/esm/loader.js +3 -3
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/{p-e6b38ade.entry.js → p-0306dff7.entry.js} +1 -1
- package/dist/ezui/{p-b8344ae8.entry.js → p-03c106f6.entry.js} +1 -1
- package/dist/ezui/{p-91ccae0c.entry.js → p-09de35a2.entry.js} +1 -1
- package/dist/ezui/{p-1f7241cd.entry.js → p-0bffeffc.entry.js} +1 -1
- package/dist/ezui/p-15ea0c98.js +1 -0
- package/dist/ezui/{p-81461d2f.entry.js → p-1e7a8633.entry.js} +1 -1
- package/dist/ezui/{p-6b51c9cc.entry.js → p-1f50fa05.entry.js} +1 -1
- package/dist/ezui/{p-cf33bc48.entry.js → p-20c024f7.entry.js} +1 -1
- package/dist/ezui/{p-e4c7eb39.js → p-23a36bb6.js} +2 -2
- package/dist/ezui/{p-8f49705f.entry.js → p-2872fd16.entry.js} +1 -1
- package/dist/ezui/{p-06f1b8e4.entry.js → p-288631d1.entry.js} +1 -1
- package/dist/ezui/{p-1fefb37a.entry.js → p-2b4df33d.entry.js} +1 -1
- package/dist/ezui/p-3ba9565c.entry.js +1 -0
- package/dist/ezui/{p-0378416a.entry.js → p-44caad9a.entry.js} +1 -1
- package/dist/ezui/p-496f7832.entry.js +1 -0
- package/dist/ezui/p-4bd6dd6a.entry.js +1 -0
- package/dist/ezui/{p-2f77f563.entry.js → p-4cf0aaeb.entry.js} +1 -1
- package/dist/ezui/{p-7567ccdd.entry.js → p-555c9018.entry.js} +1 -1
- package/dist/ezui/{p-9066b0b0.entry.js → p-56fe5341.entry.js} +1 -1
- package/dist/ezui/p-5a14f506.entry.js +1 -0
- package/dist/ezui/{p-0f658cfd.entry.js → p-5ec0ae79.entry.js} +1 -1
- package/dist/ezui/{p-6fc26622.entry.js → p-5ed81457.entry.js} +1 -1
- package/dist/ezui/p-629d15ed.entry.js +1 -0
- package/dist/ezui/{p-5b8639c0.entry.js → p-6754489a.entry.js} +1 -1
- package/dist/ezui/{p-b9255e16.entry.js → p-6825bdc7.entry.js} +1 -1
- package/dist/ezui/{p-bab2bb93.entry.js → p-6b39b79a.entry.js} +2 -2
- package/dist/ezui/{p-fc194825.entry.js → p-6e429cff.entry.js} +1 -1
- package/dist/ezui/p-6f4681f8.entry.js +1 -0
- package/dist/ezui/p-7019f782.entry.js +1 -0
- package/dist/ezui/{p-f6a88217.entry.js → p-7742802c.entry.js} +1 -1
- package/dist/ezui/{p-11bfeca3.entry.js → p-77a4bd35.entry.js} +1 -1
- package/dist/ezui/{p-2069c78a.entry.js → p-7e677b7b.entry.js} +1 -1
- package/dist/ezui/{p-82fa4b09.entry.js → p-8df1ca33.entry.js} +1 -1
- package/dist/ezui/{p-ed48a632.entry.js → p-9478b13b.entry.js} +1 -1
- package/dist/ezui/{p-ddb22a70.entry.js → p-9567b31a.entry.js} +1 -1
- package/dist/ezui/{p-18e71523.entry.js → p-9c5cd3b2.entry.js} +1 -1
- package/dist/ezui/{p-c2b20f78.entry.js → p-9f5fa3f9.entry.js} +1 -1
- package/dist/ezui/{p-0cfbbe82.entry.js → p-a4cee65d.entry.js} +1 -1
- package/dist/ezui/{p-dfca5946.entry.js → p-a80b1287.entry.js} +1 -1
- package/dist/ezui/p-b81881ac.entry.js +1 -0
- package/dist/ezui/{p-926a0bde.entry.js → p-bac0f920.entry.js} +1 -1
- package/dist/ezui/p-bc2f844e.entry.js +1 -0
- package/dist/ezui/{p-e18c7afe.entry.js → p-bf9dec89.entry.js} +1 -1
- package/dist/ezui/p-c00df4be.entry.js +1 -0
- package/dist/ezui/{p-92748142.entry.js → p-c0d9c4f8.entry.js} +1 -1
- package/dist/ezui/p-cb75eb46.entry.js +1 -0
- package/dist/ezui/{p-07594da0.entry.js → p-d47dabdf.entry.js} +1 -1
- package/dist/ezui/{p-708b196e.entry.js → p-da1b4a38.entry.js} +1 -1
- package/dist/ezui/{p-c7035d65.entry.js → p-dc73e1fe.entry.js} +1 -1
- package/dist/ezui/{p-2f351332.entry.js → p-e06a9886.entry.js} +1 -1
- package/dist/ezui/{p-9e95bfeb.entry.js → p-e6a9041d.entry.js} +1 -1
- package/dist/ezui/{p-000159dc.entry.js → p-e75c7a23.entry.js} +1 -1
- package/dist/ezui/p-ebd23857.entry.js +1 -0
- package/dist/ezui/{p-72731b9b.entry.js → p-ecaac11f.entry.js} +1 -1
- package/dist/ezui/{p-8d9ab0b0.entry.js → p-f4861c6a.entry.js} +1 -1
- package/dist/ezui/{p-3eaa0f67.entry.js → p-f5a30e35.entry.js} +1 -1
- package/dist/ezui/{p-bcffc6c5.entry.js → p-f6316720.entry.js} +1 -1
- package/dist/ezui/{p-44b39e81.entry.js → p-fa6732f2.entry.js} +1 -1
- package/dist/types/components/ez-check/ez-check.d.ts +7 -2
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +4 -0
- package/dist/types/components/ez-date-input/ez-date-input.d.ts +4 -0
- package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +4 -0
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +2 -0
- package/dist/types/components/ez-grid/subcomponents/filter-column.d.ts +1 -0
- package/dist/types/components/ez-multi-selection-list/interfaces/IMultiSelectionListDataSource.d.ts +2 -1
- package/dist/types/components/ez-multi-selection-list/interfaces/IStaticOptionsFetchConfig.d.ts +3 -0
- package/dist/types/components/ez-number-input/ez-number-input.d.ts +4 -0
- package/dist/types/components/ez-search/ez-search.d.ts +4 -0
- package/dist/types/components/ez-search-plus/ez-search-plus.d.ts +8 -8
- package/dist/types/components/ez-text-area/ez-text-area.d.ts +8 -0
- package/dist/types/components/ez-text-input/ez-text-input.d.ts +9 -0
- package/dist/types/components/ez-time-input/ez-time-input.d.ts +4 -0
- package/dist/types/components.d.ts +88 -16
- package/dist/types/utils/form/DataBinder.d.ts +4 -2
- package/package.json +1 -1
- package/dist/ezui/p-1bb62d6b.entry.js +0 -1
- package/dist/ezui/p-23dab72f.entry.js +0 -1
- package/dist/ezui/p-4818b8ce.entry.js +0 -1
- package/dist/ezui/p-6ec40dec.entry.js +0 -1
- package/dist/ezui/p-6ee27742.entry.js +0 -1
- package/dist/ezui/p-88c615f0.entry.js +0 -1
- package/dist/ezui/p-906015ee.entry.js +0 -1
- package/dist/ezui/p-a64cfcfc.js +0 -1
- package/dist/ezui/p-a79f3789.entry.js +0 -1
- package/dist/ezui/p-bbf086de.entry.js +0 -1
- package/dist/ezui/p-c2b1b592.entry.js +0 -1
- package/dist/ezui/p-c96fbbef.entry.js +0 -1
- package/dist/ezui/p-e18d9e6a.entry.js +0 -1
|
@@ -61,6 +61,10 @@ export declare class EzNumberInput {
|
|
|
61
61
|
* Se true o campo de texto receberá o foco ao ser renderizado.
|
|
62
62
|
*/
|
|
63
63
|
autoFocus: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Texto alternativo a ser apresentado como título do campo.
|
|
66
|
+
*/
|
|
67
|
+
alternativePlaceholder: string;
|
|
64
68
|
/**
|
|
65
69
|
* Aplica o foco no campo.
|
|
66
70
|
*/
|
|
@@ -115,6 +115,10 @@ export declare class EzSearch {
|
|
|
115
115
|
* Se true o campo de texto receberá o foco ao ser renderizado.
|
|
116
116
|
*/
|
|
117
117
|
autoFocus: boolean;
|
|
118
|
+
/**
|
|
119
|
+
* Texto alternativo a ser apresentado como título do campo.
|
|
120
|
+
*/
|
|
121
|
+
alternativePlaceholder: string;
|
|
118
122
|
observeErrorMessage(): void;
|
|
119
123
|
private getValue;
|
|
120
124
|
private validateNewValue;
|
|
@@ -78,35 +78,35 @@ export declare class EzSearchPlus {
|
|
|
78
78
|
*/
|
|
79
79
|
autoFocus: boolean;
|
|
80
80
|
/**
|
|
81
|
-
* Propriedade depreciada na nova versão do componente de pesquisa.
|
|
81
|
+
* @deprecated Propriedade depreciada na nova versão do componente de pesquisa.
|
|
82
82
|
*/
|
|
83
83
|
showSelectedValue: boolean;
|
|
84
84
|
/**
|
|
85
|
-
* Propriedade depreciada na nova versão do componente de pesquisa.
|
|
85
|
+
* @deprecated Propriedade depreciada na nova versão do componente de pesquisa.
|
|
86
86
|
*/
|
|
87
87
|
suppressEmptyOption: boolean;
|
|
88
88
|
/**
|
|
89
|
-
* Propriedade depreciada na nova versão do componente de pesquisa.
|
|
89
|
+
* @deprecated Propriedade depreciada na nova versão do componente de pesquisa.
|
|
90
90
|
*/
|
|
91
91
|
hideErrorOnFocusOut: boolean;
|
|
92
92
|
/**
|
|
93
|
-
* Propriedade depreciada na nova versão do componente de pesquisa.
|
|
93
|
+
* @deprecated Propriedade depreciada na nova versão do componente de pesquisa.
|
|
94
94
|
*/
|
|
95
95
|
listOptionsPosition: IEzCheckBoxListPosition;
|
|
96
96
|
/**
|
|
97
|
-
* Propriedade depreciada na nova versão do componente de pesquisa.
|
|
97
|
+
* @deprecated Propriedade depreciada na nova versão do componente de pesquisa.
|
|
98
98
|
*/
|
|
99
99
|
isTextSearch: boolean;
|
|
100
100
|
/**
|
|
101
|
-
* Propriedade depreciada na nova versão do componente de pesquisa.
|
|
101
|
+
* @deprecated Propriedade depreciada na nova versão do componente de pesquisa.
|
|
102
102
|
*/
|
|
103
103
|
ignoreLimitCharsToSearch: boolean;
|
|
104
104
|
/**
|
|
105
|
-
* Propriedade depreciada na nova versão do componente de pesquisa.
|
|
105
|
+
* @deprecated Propriedade depreciada na nova versão do componente de pesquisa.
|
|
106
106
|
*/
|
|
107
107
|
suppressSearch: boolean;
|
|
108
108
|
/**
|
|
109
|
-
* Propriedade depreciada na nova versão do componente de pesquisa.
|
|
109
|
+
* @deprecated Propriedade depreciada na nova versão do componente de pesquisa.
|
|
110
110
|
*/
|
|
111
111
|
suppressPreLoad: boolean;
|
|
112
112
|
/**
|
|
@@ -53,11 +53,17 @@ export declare class EzTextArea {
|
|
|
53
53
|
* Se true o campo de texto receberá o foco ao ser renderizado.
|
|
54
54
|
*/
|
|
55
55
|
autoFocus: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Texto alternativo a ser apresentado como título do campo.
|
|
58
|
+
*/
|
|
59
|
+
alternativePlaceholder: string;
|
|
60
|
+
forceLabelFloat: boolean;
|
|
56
61
|
observeErrorMessage(): void;
|
|
57
62
|
observeValue(newValue: string, oldValue: string): void;
|
|
58
63
|
observeMode(): void;
|
|
59
64
|
observeRows(): void;
|
|
60
65
|
observeAutoRows(): void;
|
|
66
|
+
observeAlternativePlaceholder(newValue: any): void;
|
|
61
67
|
/**
|
|
62
68
|
* Adiciona o argumento text no value do text area, seguindo as regras:
|
|
63
69
|
* - Se o cursor do mouse está posicionado em algum local do texto, o argumento será adicionado nesse local.
|
|
@@ -90,6 +96,8 @@ export declare class EzTextArea {
|
|
|
90
96
|
handleFocus(): void;
|
|
91
97
|
connectedCallback(): void;
|
|
92
98
|
disconnectedCallback(): void;
|
|
99
|
+
private buildPlaceholder;
|
|
100
|
+
private buildLabelClass;
|
|
93
101
|
componentDidLoad(): void;
|
|
94
102
|
render(): any;
|
|
95
103
|
}
|
|
@@ -19,6 +19,10 @@ export declare class EzTextInput {
|
|
|
19
19
|
* Texto a ser apresentado como título do campo.
|
|
20
20
|
*/
|
|
21
21
|
label: string;
|
|
22
|
+
/**
|
|
23
|
+
* Texto alternativo a ser apresentado como título do campo.
|
|
24
|
+
*/
|
|
25
|
+
alternativePlaceholder: string;
|
|
22
26
|
/**
|
|
23
27
|
* Define o valor do campo.
|
|
24
28
|
*/
|
|
@@ -71,9 +75,11 @@ export declare class EzTextInput {
|
|
|
71
75
|
* Reflete se o slot direito possui conteúdo.
|
|
72
76
|
*/
|
|
73
77
|
hasRightSlotContent: boolean;
|
|
78
|
+
forceLabelFloat: boolean;
|
|
74
79
|
observeHasInvalid(newValue: boolean | string, oldValue: boolean | string): void;
|
|
75
80
|
observeMask(): void;
|
|
76
81
|
observeValue(newValue: string, oldValue: string): void;
|
|
82
|
+
observeAlternativePlaceholder(newValue: any): void;
|
|
77
83
|
private validateErrors;
|
|
78
84
|
private handleValidateErrorMessage;
|
|
79
85
|
private updateClassError;
|
|
@@ -102,8 +108,11 @@ export declare class EzTextInput {
|
|
|
102
108
|
handleSlotChange(ev: Event): void;
|
|
103
109
|
doFocus(): void;
|
|
104
110
|
private getValue;
|
|
111
|
+
private buildLabelClass;
|
|
112
|
+
private buildPlaceholder;
|
|
105
113
|
private checkIsOverflowing;
|
|
106
114
|
componentWillLoad(): void;
|
|
107
115
|
componentDidLoad(): void;
|
|
116
|
+
componentDidRender(): void;
|
|
108
117
|
render(): any;
|
|
109
118
|
}
|
|
@@ -38,6 +38,10 @@ export declare class EzTimeInput {
|
|
|
38
38
|
* Se true o campo de texto receberá o foco ao ser renderizado.
|
|
39
39
|
*/
|
|
40
40
|
autoFocus: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Texto alternativo ser apresentado como título do campo.
|
|
43
|
+
*/
|
|
44
|
+
alternativePlaceholder: string;
|
|
41
45
|
/**
|
|
42
46
|
* Emitido quando acontece a alteração de valor do campo.
|
|
43
47
|
*/
|
|
@@ -301,6 +301,10 @@ export namespace Components {
|
|
|
301
301
|
"yAxis": ChartAxis | Array<ChartAxis>;
|
|
302
302
|
}
|
|
303
303
|
interface EzCheck {
|
|
304
|
+
/**
|
|
305
|
+
* Texto alternativo a ser apresentado como título do campo.
|
|
306
|
+
*/
|
|
307
|
+
"alternativePlaceholder": string;
|
|
304
308
|
/**
|
|
305
309
|
* Define o modo compacto com espaçamento menor entre label e o input
|
|
306
310
|
*/
|
|
@@ -423,6 +427,10 @@ export namespace Components {
|
|
|
423
427
|
"value": boolean;
|
|
424
428
|
}
|
|
425
429
|
interface EzComboBox {
|
|
430
|
+
/**
|
|
431
|
+
* Texto alternativo a ser apresentado como título do campo.
|
|
432
|
+
*/
|
|
433
|
+
"alternativePlaceholder": string;
|
|
426
434
|
/**
|
|
427
435
|
* Se true o campo de texto receberá o foco ao ser renderizado.
|
|
428
436
|
*/
|
|
@@ -614,6 +622,10 @@ export namespace Components {
|
|
|
614
622
|
"value": any;
|
|
615
623
|
}
|
|
616
624
|
interface EzDateInput {
|
|
625
|
+
/**
|
|
626
|
+
* Texto alternativo ser apresentado como título do campo.
|
|
627
|
+
*/
|
|
628
|
+
"alternativePlaceholder": string;
|
|
617
629
|
/**
|
|
618
630
|
* Se true o campo de texto receberá o foco ao ser renderizado.
|
|
619
631
|
*/
|
|
@@ -657,6 +669,10 @@ export namespace Components {
|
|
|
657
669
|
"value": Date;
|
|
658
670
|
}
|
|
659
671
|
interface EzDateTimeInput {
|
|
672
|
+
/**
|
|
673
|
+
* Texto alternativo ser apresentado como título do campo.
|
|
674
|
+
*/
|
|
675
|
+
"alternativePlaceholder": string;
|
|
660
676
|
/**
|
|
661
677
|
* Se true o campo de texto receberá o foco ao ser renderizado.
|
|
662
678
|
*/
|
|
@@ -1312,6 +1328,10 @@ export namespace Components {
|
|
|
1312
1328
|
* Se false, o input não aceitará números negativos.
|
|
1313
1329
|
*/
|
|
1314
1330
|
"allowNegative": boolean;
|
|
1331
|
+
/**
|
|
1332
|
+
* Texto alternativo a ser apresentado como título do campo.
|
|
1333
|
+
*/
|
|
1334
|
+
"alternativePlaceholder": string;
|
|
1315
1335
|
/**
|
|
1316
1336
|
* Se true o campo de texto receberá o foco ao ser renderizado.
|
|
1317
1337
|
*/
|
|
@@ -1579,6 +1599,10 @@ export namespace Components {
|
|
|
1579
1599
|
"locked": boolean;
|
|
1580
1600
|
}
|
|
1581
1601
|
interface EzSearch {
|
|
1602
|
+
/**
|
|
1603
|
+
* Texto alternativo a ser apresentado como título do campo.
|
|
1604
|
+
*/
|
|
1605
|
+
"alternativePlaceholder": string;
|
|
1582
1606
|
/**
|
|
1583
1607
|
* Se true o campo de texto receberá o foco ao ser renderizado.
|
|
1584
1608
|
*/
|
|
@@ -1731,11 +1755,11 @@ export namespace Components {
|
|
|
1731
1755
|
*/
|
|
1732
1756
|
"hideDescriptionInput": boolean;
|
|
1733
1757
|
/**
|
|
1734
|
-
* Propriedade depreciada na nova versão do componente de pesquisa.
|
|
1758
|
+
* @deprecated Propriedade depreciada na nova versão do componente de pesquisa.
|
|
1735
1759
|
*/
|
|
1736
1760
|
"hideErrorOnFocusOut": boolean;
|
|
1737
1761
|
/**
|
|
1738
|
-
* Propriedade depreciada na nova versão do componente de pesquisa.
|
|
1762
|
+
* @deprecated Propriedade depreciada na nova versão do componente de pesquisa.
|
|
1739
1763
|
*/
|
|
1740
1764
|
"ignoreLimitCharsToSearch": boolean;
|
|
1741
1765
|
/**
|
|
@@ -1743,7 +1767,7 @@ export namespace Components {
|
|
|
1743
1767
|
*/
|
|
1744
1768
|
"isInvalid": () => Promise<boolean>;
|
|
1745
1769
|
/**
|
|
1746
|
-
* Propriedade depreciada na nova versão do componente de pesquisa.
|
|
1770
|
+
* @deprecated Propriedade depreciada na nova versão do componente de pesquisa.
|
|
1747
1771
|
*/
|
|
1748
1772
|
"isTextSearch": boolean;
|
|
1749
1773
|
/**
|
|
@@ -1751,7 +1775,7 @@ export namespace Components {
|
|
|
1751
1775
|
*/
|
|
1752
1776
|
"label": string;
|
|
1753
1777
|
/**
|
|
1754
|
-
* Propriedade depreciada na nova versão do componente de pesquisa.
|
|
1778
|
+
* @deprecated Propriedade depreciada na nova versão do componente de pesquisa.
|
|
1755
1779
|
*/
|
|
1756
1780
|
"listOptionsPosition": IEzCheckBoxListPosition1;
|
|
1757
1781
|
/**
|
|
@@ -1775,7 +1799,7 @@ export namespace Components {
|
|
|
1775
1799
|
*/
|
|
1776
1800
|
"showOptionValue": boolean;
|
|
1777
1801
|
/**
|
|
1778
|
-
* Propriedade depreciada na nova versão do componente de pesquisa.
|
|
1802
|
+
* @deprecated Propriedade depreciada na nova versão do componente de pesquisa.
|
|
1779
1803
|
*/
|
|
1780
1804
|
"showSelectedValue": boolean;
|
|
1781
1805
|
/**
|
|
@@ -1783,15 +1807,15 @@ export namespace Components {
|
|
|
1783
1807
|
*/
|
|
1784
1808
|
"stopPropagateEnterKeyEvent": boolean;
|
|
1785
1809
|
/**
|
|
1786
|
-
* Propriedade depreciada na nova versão do componente de pesquisa.
|
|
1810
|
+
* @deprecated Propriedade depreciada na nova versão do componente de pesquisa.
|
|
1787
1811
|
*/
|
|
1788
1812
|
"suppressEmptyOption": boolean;
|
|
1789
1813
|
/**
|
|
1790
|
-
* Propriedade depreciada na nova versão do componente de pesquisa.
|
|
1814
|
+
* @deprecated Propriedade depreciada na nova versão do componente de pesquisa.
|
|
1791
1815
|
*/
|
|
1792
1816
|
"suppressPreLoad": boolean;
|
|
1793
1817
|
/**
|
|
1794
|
-
* Propriedade depreciada na nova versão do componente de pesquisa.
|
|
1818
|
+
* @deprecated Propriedade depreciada na nova versão do componente de pesquisa.
|
|
1795
1819
|
*/
|
|
1796
1820
|
"suppressSearch": boolean;
|
|
1797
1821
|
/**
|
|
@@ -1987,6 +2011,10 @@ export namespace Components {
|
|
|
1987
2011
|
"tabs": string | Array<Tab>;
|
|
1988
2012
|
}
|
|
1989
2013
|
interface EzTextArea {
|
|
2014
|
+
/**
|
|
2015
|
+
* Texto alternativo a ser apresentado como título do campo.
|
|
2016
|
+
*/
|
|
2017
|
+
"alternativePlaceholder": string;
|
|
1990
2018
|
/**
|
|
1991
2019
|
* Adiciona o argumento text no value do text area, seguindo as regras: - Se o cursor do mouse está posicionado em algum local do texto, o argumento será adicionado nesse local. - Se existir uma seleção no texto, o trecho selecionado deve ser substituído pelo argumento. - Se não existir seleção nem posicionamento do cursor do mouse, o argumento será adicionado no final do texto.
|
|
1992
2020
|
* @param text : texto que irá ser adicionado
|
|
@@ -2060,6 +2088,10 @@ export namespace Components {
|
|
|
2060
2088
|
"value": string;
|
|
2061
2089
|
}
|
|
2062
2090
|
interface EzTextInput {
|
|
2091
|
+
/**
|
|
2092
|
+
* Texto alternativo a ser apresentado como título do campo.
|
|
2093
|
+
*/
|
|
2094
|
+
"alternativePlaceholder": string;
|
|
2063
2095
|
/**
|
|
2064
2096
|
* Se true o campo receberá o foco ao ser renderizado.
|
|
2065
2097
|
*/
|
|
@@ -2126,6 +2158,10 @@ export namespace Components {
|
|
|
2126
2158
|
"value": string;
|
|
2127
2159
|
}
|
|
2128
2160
|
interface EzTimeInput {
|
|
2161
|
+
/**
|
|
2162
|
+
* Texto alternativo ser apresentado como título do campo.
|
|
2163
|
+
*/
|
|
2164
|
+
"alternativePlaceholder": string;
|
|
2129
2165
|
/**
|
|
2130
2166
|
* Se true o campo de texto receberá o foco ao ser renderizado.
|
|
2131
2167
|
*/
|
|
@@ -3257,6 +3293,10 @@ declare namespace LocalJSX {
|
|
|
3257
3293
|
"yAxis"?: ChartAxis | Array<ChartAxis>;
|
|
3258
3294
|
}
|
|
3259
3295
|
interface EzCheck {
|
|
3296
|
+
/**
|
|
3297
|
+
* Texto alternativo a ser apresentado como título do campo.
|
|
3298
|
+
*/
|
|
3299
|
+
"alternativePlaceholder"?: string;
|
|
3260
3300
|
/**
|
|
3261
3301
|
* Define o modo compacto com espaçamento menor entre label e o input
|
|
3262
3302
|
*/
|
|
@@ -3383,6 +3423,10 @@ declare namespace LocalJSX {
|
|
|
3383
3423
|
"value"?: boolean;
|
|
3384
3424
|
}
|
|
3385
3425
|
interface EzComboBox {
|
|
3426
|
+
/**
|
|
3427
|
+
* Texto alternativo a ser apresentado como título do campo.
|
|
3428
|
+
*/
|
|
3429
|
+
"alternativePlaceholder"?: string;
|
|
3386
3430
|
/**
|
|
3387
3431
|
* Se true o campo de texto receberá o foco ao ser renderizado.
|
|
3388
3432
|
*/
|
|
@@ -3537,6 +3581,10 @@ declare namespace LocalJSX {
|
|
|
3537
3581
|
"value"?: any;
|
|
3538
3582
|
}
|
|
3539
3583
|
interface EzDateInput {
|
|
3584
|
+
/**
|
|
3585
|
+
* Texto alternativo ser apresentado como título do campo.
|
|
3586
|
+
*/
|
|
3587
|
+
"alternativePlaceholder"?: string;
|
|
3540
3588
|
/**
|
|
3541
3589
|
* Se true o campo de texto receberá o foco ao ser renderizado.
|
|
3542
3590
|
*/
|
|
@@ -3579,6 +3627,10 @@ declare namespace LocalJSX {
|
|
|
3579
3627
|
"value"?: Date;
|
|
3580
3628
|
}
|
|
3581
3629
|
interface EzDateTimeInput {
|
|
3630
|
+
/**
|
|
3631
|
+
* Texto alternativo ser apresentado como título do campo.
|
|
3632
|
+
*/
|
|
3633
|
+
"alternativePlaceholder"?: string;
|
|
3582
3634
|
/**
|
|
3583
3635
|
* Se true o campo de texto receberá o foco ao ser renderizado.
|
|
3584
3636
|
*/
|
|
@@ -4181,6 +4233,10 @@ declare namespace LocalJSX {
|
|
|
4181
4233
|
* Se false, o input não aceitará números negativos.
|
|
4182
4234
|
*/
|
|
4183
4235
|
"allowNegative"?: boolean;
|
|
4236
|
+
/**
|
|
4237
|
+
* Texto alternativo a ser apresentado como título do campo.
|
|
4238
|
+
*/
|
|
4239
|
+
"alternativePlaceholder"?: string;
|
|
4184
4240
|
/**
|
|
4185
4241
|
* Se true o campo de texto receberá o foco ao ser renderizado.
|
|
4186
4242
|
*/
|
|
@@ -4407,6 +4463,10 @@ declare namespace LocalJSX {
|
|
|
4407
4463
|
"locked"?: boolean;
|
|
4408
4464
|
}
|
|
4409
4465
|
interface EzSearch {
|
|
4466
|
+
/**
|
|
4467
|
+
* Texto alternativo a ser apresentado como título do campo.
|
|
4468
|
+
*/
|
|
4469
|
+
"alternativePlaceholder"?: string;
|
|
4410
4470
|
/**
|
|
4411
4471
|
* Se true o campo de texto receberá o foco ao ser renderizado.
|
|
4412
4472
|
*/
|
|
@@ -4538,15 +4598,15 @@ declare namespace LocalJSX {
|
|
|
4538
4598
|
*/
|
|
4539
4599
|
"hideDescriptionInput"?: boolean;
|
|
4540
4600
|
/**
|
|
4541
|
-
* Propriedade depreciada na nova versão do componente de pesquisa.
|
|
4601
|
+
* @deprecated Propriedade depreciada na nova versão do componente de pesquisa.
|
|
4542
4602
|
*/
|
|
4543
4603
|
"hideErrorOnFocusOut"?: boolean;
|
|
4544
4604
|
/**
|
|
4545
|
-
* Propriedade depreciada na nova versão do componente de pesquisa.
|
|
4605
|
+
* @deprecated Propriedade depreciada na nova versão do componente de pesquisa.
|
|
4546
4606
|
*/
|
|
4547
4607
|
"ignoreLimitCharsToSearch"?: boolean;
|
|
4548
4608
|
/**
|
|
4549
|
-
* Propriedade depreciada na nova versão do componente de pesquisa.
|
|
4609
|
+
* @deprecated Propriedade depreciada na nova versão do componente de pesquisa.
|
|
4550
4610
|
*/
|
|
4551
4611
|
"isTextSearch"?: boolean;
|
|
4552
4612
|
/**
|
|
@@ -4554,7 +4614,7 @@ declare namespace LocalJSX {
|
|
|
4554
4614
|
*/
|
|
4555
4615
|
"label"?: string;
|
|
4556
4616
|
/**
|
|
4557
|
-
* Propriedade depreciada na nova versão do componente de pesquisa.
|
|
4617
|
+
* @deprecated Propriedade depreciada na nova versão do componente de pesquisa.
|
|
4558
4618
|
*/
|
|
4559
4619
|
"listOptionsPosition"?: IEzCheckBoxListPosition1;
|
|
4560
4620
|
/**
|
|
@@ -4574,7 +4634,7 @@ declare namespace LocalJSX {
|
|
|
4574
4634
|
*/
|
|
4575
4635
|
"showOptionValue"?: boolean;
|
|
4576
4636
|
/**
|
|
4577
|
-
* Propriedade depreciada na nova versão do componente de pesquisa.
|
|
4637
|
+
* @deprecated Propriedade depreciada na nova versão do componente de pesquisa.
|
|
4578
4638
|
*/
|
|
4579
4639
|
"showSelectedValue"?: boolean;
|
|
4580
4640
|
/**
|
|
@@ -4582,15 +4642,15 @@ declare namespace LocalJSX {
|
|
|
4582
4642
|
*/
|
|
4583
4643
|
"stopPropagateEnterKeyEvent"?: boolean;
|
|
4584
4644
|
/**
|
|
4585
|
-
* Propriedade depreciada na nova versão do componente de pesquisa.
|
|
4645
|
+
* @deprecated Propriedade depreciada na nova versão do componente de pesquisa.
|
|
4586
4646
|
*/
|
|
4587
4647
|
"suppressEmptyOption"?: boolean;
|
|
4588
4648
|
/**
|
|
4589
|
-
* Propriedade depreciada na nova versão do componente de pesquisa.
|
|
4649
|
+
* @deprecated Propriedade depreciada na nova versão do componente de pesquisa.
|
|
4590
4650
|
*/
|
|
4591
4651
|
"suppressPreLoad"?: boolean;
|
|
4592
4652
|
/**
|
|
4593
|
-
* Propriedade depreciada na nova versão do componente de pesquisa.
|
|
4653
|
+
* @deprecated Propriedade depreciada na nova versão do componente de pesquisa.
|
|
4594
4654
|
*/
|
|
4595
4655
|
"suppressSearch"?: boolean;
|
|
4596
4656
|
/**
|
|
@@ -4782,6 +4842,10 @@ declare namespace LocalJSX {
|
|
|
4782
4842
|
"tabs"?: string | Array<Tab>;
|
|
4783
4843
|
}
|
|
4784
4844
|
interface EzTextArea {
|
|
4845
|
+
/**
|
|
4846
|
+
* Texto alternativo a ser apresentado como título do campo.
|
|
4847
|
+
*/
|
|
4848
|
+
"alternativePlaceholder"?: string;
|
|
4785
4849
|
/**
|
|
4786
4850
|
* Se true o campo de texto receberá o foco ao ser renderizado.
|
|
4787
4851
|
*/
|
|
@@ -4846,6 +4910,10 @@ declare namespace LocalJSX {
|
|
|
4846
4910
|
"value"?: string;
|
|
4847
4911
|
}
|
|
4848
4912
|
interface EzTextInput {
|
|
4913
|
+
/**
|
|
4914
|
+
* Texto alternativo a ser apresentado como título do campo.
|
|
4915
|
+
*/
|
|
4916
|
+
"alternativePlaceholder"?: string;
|
|
4849
4917
|
/**
|
|
4850
4918
|
* Se true o campo receberá o foco ao ser renderizado.
|
|
4851
4919
|
*/
|
|
@@ -4904,6 +4972,10 @@ declare namespace LocalJSX {
|
|
|
4904
4972
|
"value"?: string;
|
|
4905
4973
|
}
|
|
4906
4974
|
interface EzTimeInput {
|
|
4975
|
+
/**
|
|
4976
|
+
* Texto alternativo ser apresentado como título do campo.
|
|
4977
|
+
*/
|
|
4978
|
+
"alternativePlaceholder"?: string;
|
|
4907
4979
|
/**
|
|
4908
4980
|
* Se true o campo de texto receberá o foco ao ser renderizado.
|
|
4909
4981
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataUnit, DataUnitAction, DUActionInterceptor } from
|
|
1
|
+
import { DataUnit, DataUnitAction, DUActionInterceptor } from '@sankhyalabs/core';
|
|
2
2
|
import { IInvalidField } from "./interfaces";
|
|
3
3
|
import { IRecordValidator } from "../../utils/form/interfaces";
|
|
4
4
|
import { FormMetadata } from "./FormMetadata";
|
|
@@ -21,7 +21,8 @@ export default class DataBinder implements DUActionInterceptor {
|
|
|
21
21
|
setFocus(fieldName: string): void;
|
|
22
22
|
private clearInvalid;
|
|
23
23
|
private clearFieldError;
|
|
24
|
-
private
|
|
24
|
+
private updateFieldValue;
|
|
25
|
+
private hasMultipleValuesBetweenRecords;
|
|
25
26
|
validate(): Promise<void>;
|
|
26
27
|
static validateByDataunit(dataUnit: DataUnit): Promise<boolean>;
|
|
27
28
|
static getDataBindersByDataUnit(dataUnit: DataUnit): Array<DataBinder>;
|
|
@@ -34,6 +35,7 @@ export default class DataBinder implements DUActionInterceptor {
|
|
|
34
35
|
private bindSearchOptionsLoader;
|
|
35
36
|
private applyEzUploadContext;
|
|
36
37
|
private onDataUnitEvent;
|
|
38
|
+
private updateAllFieldsValues;
|
|
37
39
|
interceptAction(action: DataUnitAction): DataUnitAction | Promise<DataUnitAction>;
|
|
38
40
|
private getDefaultValues;
|
|
39
41
|
}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,H as s,g as a}from"./p-e4c7eb39.js";import{DateUtils as n,ElementIDUtils as o}from"@sankhyalabs/core";import{C as r}from"./p-ec7db713.js";const h=class{constructor(i){t(this,i),this.ezChange=e(this,"ezChange",7),this.ezStartChange=e(this,"ezStartChange",7),this.ezCancelWaitingChange=e(this,"ezCancelWaitingChange",7),this._changePending=!1,this._focused=!1,this._valuePromiseCallbacks=[],this.label=void 0,this.value=void 0,this.enabled=!0,this.errorMessage=void 0,this.mode="regular",this.canShowError=!0,this.autoFocus=!1}observeLabel(){this._textInput&&(this._textInput.label=this.label)}observeErrorMessage(){var t;this._textInput&&(this._textInput.errorMessage=this.errorMessage,(null===(t=this.errorMessage)||void 0===t?void 0:t.trim())||this.setInputValue())}observeValue(t,e){if(this._textInput&&t!=e){const i=n.validateDate(t),s=n.validateDate(e);if((null==i?void 0:i.getTime())!==(null==s?void 0:s.getTime())){const t=this.getTextValue(i)||"";!n.strToDate(t)&&this._focused||(this._textInput.value||"")===t||(this._textInput.value=t,this._focused=!1,this.errorMessage=""),this.ezChange.emit(null===i?void 0:i)}}this._changePending=!1}async setFocus(t){this._textInput.setFocus(t)}async setBlur(){this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async getValueAsync(){return this._changePending?new Promise((t=>{this._valuePromiseCallbacks.push(t)})):Promise.resolve(this.value)}changeValue(t){const e=n.validateDate(this.value),i=n.validateDate(t);(null==e?void 0:e.getTime())!==(null==i?void 0:i.getTime())?this.value=i:this._changePending=!1}hideCalendar(){this.changeValue(this._calendar.value),this._popover.hide()}handleBlur(){if(this._changePending)try{const t=this._textInput.value,e=n.strToDate(t);if(e||!t){this.errorMessage="";const t=n.validateDate(this.value),i=n.validateDate(e);(null==t?void 0:t.getTime())===(null==i?void 0:i.getTime())?(i&&(this._textInput.value=this.getTextValue(i)||"",this._focused=!1),this.ezCancelWaitingChange.emit()):(this._focused=!1,this.changeValue(i))}else this.changeValue(void 0),this.ezCancelWaitingChange.emit(),this.errorMessage="O valor digitado não é uma data válida"}finally{for(const t of this._valuePromiseCallbacks)t(this.value);this._valuePromiseCallbacks=[]}}getTextValue(t){return t?n.formatDate(t):void 0}handleInput(t){const e=n.strToDate(this._textInput.value),i=n.validateDate(this.value),s=n.validateDate(e);(null==i?void 0:i.getTime())!==(null==s?void 0:s.getTime())&&(this._changePending=!0,this._focused=!0,this.ezStartChange.emit({waitmessage:"",blocking:!1})),"H"!==t.data&&"h"!==t.data||this.changeValue(new Date)}setInputValue(){const t=this.getTextValue(this.value)||"";(this._textInput.value||"")!==t&&(this._textInput.value=t)}disconnectedCallback(){this._popover.hide()}componentDidLoad(){r.applyVarsTextInput(this._elem,this._textInput),this.setInputValue(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})}))}render(){return o.addIDInfoIfNotExists(this._elem,"input"),i(s,null,i("ez-text-input",{"data-element-id":o.getInternalIDInfo("textInput"),ref:t=>this._textInput=t,"data-slave-mode":"true",label:this.label,onBlur:()=>this.handleBlur(),onInput:t=>this.handleInput(t),restrict:"0123456789/",enabled:this.enabled,errorMessage:this.errorMessage,mode:this.mode,canShowError:this.canShowError},i("button",{disabled:!this.enabled,tabindex:-1,class:"btn-open-cal",onClick:()=>{var t;return null===(t=this._popover)||void 0===t?void 0:t.showUnder(this._textInput)},slot:"leftIcon"})),i("ez-popover-plus",{ref:t=>this._popover=t,anchorElement:this._textInput,autoClose:!0,boxWidth:"fit-content",overlayType:"none"},i("ez-calendar",{ref:t=>this._calendar=t,"data-element-id":o.getInternalIDInfo("calendar"),onEzChange:t=>{this.hideCalendar(),t.stopPropagation()}})))}get _elem(){return a(this)}static get watchers(){return{label:["observeLabel"],errorMessage:["observeErrorMessage"],value:["observeValue"]}}};h.style=':host{display:block;width:100%;--ez-date-input__input--background-color:var(--background--medium, #e0e0e0);--ez-date-input__input--border-color:var(--ez-date-input__input--background-color);--ez-date-input__calendar-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="15px"><path d="M 3.171875,5.25 C 2.6485088,5.25 2.21875,5.6797588 2.21875,6.203125 2.21875,6.7264912 2.6485088,7.15625 3.171875,7.15625 3.6952412,7.15625 4.125,6.7264912 4.125,6.203125 4.125,5.6797588 3.6952412,5.25 3.171875,5.25 Z m 2.875,0 C 5.5235088,5.25 5.09375,5.6797588 5.09375,6.203125 5.09375,6.7264912 5.5235088,7.15625 6.046875,7.15625 6.5702412,7.15625 7,6.7264912 7,6.203125 7,5.6797588 6.5702412,5.25 6.046875,5.25 Z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.9511719,-0.4297588 0.9511719,-0.953125 C 9.8730469,5.6797588 9.4452412,5.25 8.921875,5.25 Z m 2.873047,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.953125 0.953125,0.953125 0.523366,0 0.953125,-0.4297588 0.953125,-0.953125 C 12.748047,5.6797588 12.318288,5.25 11.794922,5.25 Z M 3.171875,8.1230469 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 0.5233662,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 C 6.5702412,10.029297 7,9.5995381 7,9.0761719 7,8.5528057 6.5702412,8.1230469 6.046875,8.1230469 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297587,0.9531251 0.953125,0.9531251 0.5233661,0 0.9531249,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.9531251 0.953125,0.9531251 0.523367,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.171875,10.998047 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 C 6.5702412,12.904297 7,12.474538 7,11.951172 7,11.427806 6.5702412,10.998047 6.046875,10.998047 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297587,0.953125 0.953125,0.953125 0.5233661,0 0.9531249,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.429759,0.953125 0.953125,0.953125 0.523367,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.5,0 c -0.554,0 -1,0.446 -1,1 v 0.050781 C 1.0853217,1.2909766 0,2.5186658 0,4 v 9 c 0,1.652487 1.3475134,3 3,3 h 9 c 1.652487,0 3,-1.347513 3,-3 V 4 C 15,2.5186658 13.914678,1.2909766 12.5,1.0507812 V 1 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 C 4.5,0.446 4.054,0 3.5,0 Z m 1,2.0996094 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 v -0.640625 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 V 2.1738281 C 13.311725,2.3905225 13.900391,3.11278 13.900391,4 v 9 c 0,1.062113 -0.838278,1.900391 -1.900391,1.900391 H 3 C 1.9378864,14.900391 1.0996094,14.062113 1.0996094,13 V 4 C 1.0996094,3.11278 1.6882747,2.3905225 2.5,2.1738281 v 0.5664063 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 z"/></svg>\')}.btn-open-cal{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-cal:disabled{cursor:not-allowed}.btn-open-cal::after{content:\'\';display:flex;background-color:var(--text--primary, #008561);width:15px;height:16px;-webkit-mask-image:var(--ez-date-input__calendar-image);mask-image:var(--ez-date-input__calendar-image)}.btn-open-cal:disabled:after{background-color:var(--text--disable, #AFB6C0)}.btn-open-cal:enabled:hover::after{background-color:var(--color--primary, #4e4e4e)}ez-text-input{--text-input__input--background-color:var(--ez-date-input__input--background-color, #FFFFFF);--text-input__input--border-color:var(--ez-date-input__input--border-color, #DCE0E8)}';export{h as ez_date_input}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as a,h as e,H as r,g as o}from"./p-e4c7eb39.js";import{ElementIDUtils as i}from"@sankhyalabs/core";const s=class{constructor(e){t(this,e),this.ezChange=a(this,"ezChange",7),this.LINE_HEIGHT=24,this.HEIGHT_RATIO=1.4,this.label=void 0,this.value=void 0,this.enabled=!0,this.errorMessage=void 0,this.rows=4,this.canShowError=!0,this.mode="regular",this.enableResize=!0,this.autoRows=!1,this.autoFocus=!1}observeErrorMessage(){var t,a,e,r;"string"==typeof this.errorMessage&&""!==this.errorMessage?(null===(t=this._container)||void 0===t||t.classList.add("hasError"),null===(a=this._messageBoxElem)||void 0===a||a.classList.add("hasError")):(null===(e=this._container)||void 0===e||e.classList.remove("hasError"),null===(r=this._messageBoxElem)||void 0===r||r.classList.remove("hasError"))}observeValue(t,a){this._inputElem&&t!=a&&(this.canChangeValue()&&(this._inputElem.value=this.value||""),this.adjustFloatingLabel(),this.errorMessage="",this.ezChange.emit(this.value))}observeMode(){null==this._initialRows&&(this._initialRows=this.rows>0?this.rows:void 0);const t=this._initialRows>0?this._initialRows:"slim"!=this.mode?4:2;t!==this.rows&&(this.rows=t)}observeRows(){const t=this.rows>0?this.rows:"slim"!=this.mode?4:2;t!==this.rows&&this.updateRows(t)}observeAutoRows(){var t,a;this.autoRows?(null===(t=this._resizeObserver)||void 0===t||t.disconnect(),this.initializeResizeObserver()):null===(a=this._resizeObserver)||void 0===a||a.disconnect()}async appendTextToSelection(t){var a,e,r,o;const i=this._inputElem.selectionStart,s=this._inputElem.selectionEnd,l=null!==(e=null===(a=this.value)||void 0===a?void 0:a.substring(0,i))&&void 0!==e?e:"",n=null!==(o=null===(r=this.value)||void 0===r?void 0:r.substring(s))&&void 0!==o?o:"";this.value=`${l}${t}${n}`;const h=i+t.length;this._inputElem.setSelectionRange(i===s?h:i,h),await this.setFocus()}async setFocus(){this._inputElem.focus()}async setBlur(){this._inputElem.blur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}canChangeValue(){return this._inputElem&&(this.value||"")!==this._inputElem.value}adjustFloatingLabel(){if(this.label&&this._labelElem){const t=this.value&&this.value.toString().length>0,a=this._labelElem.classList.contains("textarea__label--floated");t||this.isFocused()?a||this._labelElem.classList.add("textarea__label--floated"):a&&this._labelElem.classList.remove("textarea__label--floated")}}isFocused(){return null!==this._hostElement.shadowRoot.activeElement}updateRows(t){this.rows=t,this._initialRows=t}calculateMaxRows(){const t=this._hostElement.parentElement;if(!t)return;const a=Math.max((null==t?void 0:t.clientHeight)||0,this.LINE_HEIGHT);if(a>0){const t=Math.floor(a/this.LINE_HEIGHT*this.HEIGHT_RATIO);t!==this.rows&&this.updateRows(t)}}initializeResizeObserver(){if(!this.autoRows)return;const t=this._hostElement.parentElement;if(t){try{null!=this._resizeObserver&&this._resizeObserver.unobserve(t),this._resizeObserver=new ResizeObserver(this.calculateMaxRows.bind(this)),this._resizeObserver.observe(t)}catch(t){console.warn(t)}this.calculateMaxRows()}}handleFocusout(){this.adjustFloatingLabel(),this._container&&this._container.classList.contains("textarea--focus")&&this._container.classList.remove("textarea--focus")}handleChange(){this.canChangeValue()&&(this.value=this._inputElem.value)}handleFocus(){this.label&&this._labelElem&&!this._labelElem.classList.contains("textarea__label--floated")&&this._labelElem.classList.add("textarea__label--floated"),this._container&&!this._container.classList.contains("textarea--focus")&&this._container.classList.add("textarea--focus")}connectedCallback(){this.initializeResizeObserver()}disconnectedCallback(){var t;null===(t=this._resizeObserver)||void 0===t||t.disconnect()}componentDidLoad(){this.observeErrorMessage(),this.adjustFloatingLabel(),this.observeMode(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus()}))}render(){return i.addIDInfoIfNotExists(this._hostElement,"input"),e(r,null,e("div",{class:"textarea "+(this.enabled?"":"textarea--disabled"),ref:t=>this._container=t},this.label&&"slim"!=this.mode?e("label",{ref:t=>this._labelElem=t,class:this.enabled?"textarea__label":"textarea__label textarea__label--disabled",onClick:()=>this._inputElem.focus(),title:this.label},this.label):null,e("textarea",{onFocus:()=>this.handleFocus(),"data-element-id":i.getInternalIDInfo("input"),ref:t=>this._inputElem=t,value:this.value,disabled:!this.enabled,class:{"textarea--slim":"slim"===this.mode,"textarea--resizable":this.enableResize},placeholder:"slim"===this.mode&&this.label?this.label:"",onInput:()=>{this.handleChange()},onFocusout:()=>{this.handleFocusout()},rows:this.rows})),this.canShowError&&"slim"!=this.mode&&e("span",{class:"message-box",ref:t=>this._messageBoxElem=t,title:this.errorMessage},this.errorMessage))}get _hostElement(){return o(this)}static get watchers(){return{errorMessage:["observeErrorMessage"],value:["observeValue"],mode:["observeMode"],rows:["observeRows"],autoRows:["observeAutoRows"]}}};s.style=":host{--text-area--width:100%;--text-area--border-radius:var(--border--radius-medium, 12px);--text-area--font-size:var(--text--medium, 14px);--text-area--font-family:var(--font-pattern, Arial);--text-area--font-weight:var(--text-weight--medium, 400);--text-area--color:var(--title--primary, #2B3A54);--text-area__input--background-color:var(--background--light, #FFFFFF);--text-area__input--border:var(--border--medium, 2px solid);--text-area__input--border-color:var(--color--strokes,#DCE0E8);--text-area__input--focus--border-color:var(--color--primary, #008561);--text-area__input--disabled--background-color:var(--background--medium, #F0F3F7);--text-area__input--disabled--color:var(--text--primary, #626E82);--text-area__input--disabled--border--color:var(--color--strokes,#DCE0E8);--text-area__input--error--border-color:var(--color-alert--error-800,#BD0025);--text-area__message_box--font-size:var(--text--small, 12px);--text-area__message_box--info--color:var(--color--success, #22085d);--text-area__message_box--error--color:var(--color-alert--error-800,#BD0025);--text-area__label--floating--top:6px;--text-area__label--padding-top:12px;--text-area__label--padding-left:14px;--text-area__label--padding-right:12px;--text-area__scrollbar--color-default:var(--scrollbar--default, #626e82);--text-area__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--text-area__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--text-area__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--text-area__scrollbar--border-radius:var(--border--radius-small, 6px);--text-area__scrollbar--width:var(--space--small, 6px);display:flex;flex-wrap:wrap;position:relative;width:var(--text-area--width)}textarea{box-sizing:border-box;border:none;resize:none;width:100%;padding:0;background:none;min-height:42px;font-weight:var(--text-area--font-weight);font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);color:var(--text-area--color);margin-top:calc(var(--space--medium, 12px) + 4px);scrollbar-width:thin;scrollbar-color:var(--text-area__scrollbar--color-clicked) var(--text-area__scrollbar--color-background)}textarea:focus{outline:none}textarea:disabled{background-color:transparent;color:var(--text-area__input--disabled--color);border:var(--text-area__input--disabled--border);cursor:not-allowed}textarea::-webkit-scrollbar{background-color:var(--text-area__scrollbar--color-background);width:var(--text-area__scrollbar--width);max-width:var(--text-area__scrollbar--width);min-width:var(--text-area__scrollbar--width)}textarea::-webkit-scrollbar-thumb{background-color:var(--text-area__scrollbar--color-default);border-radius:var(--text-area__scrollbar--border-radius)}textarea::-webkit-scrollbar-track{background-color:var(--text-area__scrollbar--color-background);border-radius:var(--text-area__scrollbar--border-radius)}textarea::-webkit-scrollbar-thumb:vertical:hover,textarea::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--text-area__scrollbar--color-hover)}textarea::-webkit-scrollbar-thumb:vertical:active,textarea::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--text-area__scrollbar--color-clicked)}.textarea{width:100%;min-height:42px;max-width:100%;box-sizing:border-box;padding-left:var(--space--medium);padding-right:var(--space--extra-small);border-radius:var(--text-area--border-radius);border:var(--text-area__input--border);border-color:var(--text-area__input--border-color);background-color:var(--text-area__input--background-color)}.textarea--disabled{border-radius:var(--text-area--border-radius);border:var(--text-area__input--border);border-color:var(--text-area__input--disabled--border--color);background-color:var(--text-area__input--disabled--background-color);cursor:not-allowed}.textarea--resizable{resize:vertical}.textarea--focus{border-color:var(--text-area__input--focus--border-color)}.textarea.hasError{color:var(--text-area--color);border-color:var(--text-area__input--error--border-color)}.message-box{min-height:16px;min-width:100%;margin-top:3px;line-height:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--text-area--font-family);font-size:var(--text-area__message_box--font-size);color:var(--text-area__message_box--info--color)}.hasError{color:var(--text-area__message_box--error--color)}.textarea__label{box-sizing:border-box;position:absolute;z-index:var(--visible);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-transition:font-size .05s, top .05s;transition:font-size .05s, top .05s;width:calc(100% - var(--text-area__label--padding-right));left:var(--text-area--space--medium);font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color);top:var(--text-area__label--padding-top);left:var(--text-area__label--padding-left);padding-right:var(--text-area__label--padding-right)}.textarea__label--floated{font-family:var(--text-area--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--text-area__label--floating--top)}.textarea__label--disabled{color:var(--text-area__input--disabled--color);cursor:not-allowed}.textarea--slim{margin-top:var(--space--small, 6px)}.textarea--slim::-webkit-input-placeholder{font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color)}.textarea--slim:-moz-placeholder{font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color)}.textarea--slim::-moz-placeholder{font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color)}.textarea--slim:-ms-input-placeholder{font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color)}.textarea--slim::placeholder{font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color)}.textarea--slim:disabled::-webkit-input-placeholder,.textarea--slim:disabled:-moz-placeholder,.textarea--slim:disabled::-moz-placeholder,.textarea--slim:disabled:-ms-input-placeholder,.textarea--slim:disabled::placeholder{color:var(--text-area__input--disabled--color);cursor:not-allowed}";export{s as ez_text_area}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as s,h as i,H as e,g as h}from"./p-e4c7eb39.js";import{TimeFormatter as r,MaskFormatter as o,NumberUtils as a,ElementIDUtils as n}from"@sankhyalabs/core";import{C as l}from"./p-ec7db713.js";const u=class{constructor(i){t(this,i),this.ezChange=s(this,"ezChange",7),this.ezStartChange=s(this,"ezStartChange",7),this.ezCancelWaitingChange=s(this,"ezCancelWaitingChange",7),this.label=void 0,this.value=void 0,this.enabled=!0,this.errorMessage=void 0,this.showSeconds=!1,this.mode="regular",this.canShowError=!0,this.autoFocus=!1}observeErrorMessage(){var t;this._textInput&&(this._textInput.errorMessage=this.errorMessage,(null===(t=this.errorMessage)||void 0===t?void 0:t.trim())||(this.prepareValue(this._viewValue),(this._textInput.value||"")!==this._viewValue&&(this._textInput.value=this._viewValue)))}observeShowSeconds(){this.prepareMask(this.showSeconds?"##:##:##":"##:##")}observeValue(t,s){if(this._textInput&&t!=s){let i=this.validateValue(t);i!=this.validateValue(s)&&(this._viewValue=null==i?"":i.toString(),this.prepareValue(this._viewValue),this._viewValue&&!r.validateTime(this._viewValue,this.showSeconds)?(this.setError("Favor inserir um horário válido."),i=void 0):this.setError(""),this.ezChange.emit(null===i?void 0:i))}}prepareMask(t){null==this._maskFormatter?this._maskFormatter=new o(t):this._maskFormatter.mask=t}validateValue(t){return isNaN(t)||void 0===t?null:t}setError(t){this.errorMessage=t,this._textInput&&(null==t?void 0:t.trim())&&this.ezCancelWaitingChange.emit()}getViewValue(){return this._viewValue}prepareValue(t){try{this._viewValue=r.prepareValue(t,this.showSeconds),this._textInput&&this._textInput.value!==this._viewValue&&(this._textInput.value=this._viewValue)}catch(t){this.setError(t.message)}}async setFocus({selectText:t}){this._textInput.setFocus({selectText:t})}async setBlur(){this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}handleBlur(){if(this._textInput){this._viewValue=this._textInput.value,this.prepareValue(this._viewValue);const t=a.stringToNumber(this._viewValue.replace(/\D/g,""));this.value=["string","number"].includes(typeof t)?t:null}}handleInput(){const t=this._textInput.value;["string","number"].includes(typeof t)&&a.stringToNumber(t.replace(/\D/g,""))!==this.value&&this.ezStartChange.emit({waitmessage:"",blocking:!1})}componentDidLoad(){l.applyVarsTextInput(this._elem,this._textInput),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})}))}componentWillLoad(){this.observeShowSeconds(),this.value?this.prepareValue(this.value.toString()):this._viewValue&&this.prepareValue(this._viewValue)}render(){return n.addIDInfoIfNotExists(this._elem,"input"),i(e,null,i("ez-text-input",{class:"time__input","data-element-id":n.getInternalIDInfo("textInput"),ref:t=>this._textInput=t,"data-slave-mode":"true",value:this._viewValue,enabled:this.enabled,label:this.label,restrict:"0123456789:",onBlur:()=>this.handleBlur(),onInput:()=>this.handleInput(),errorMessage:this.errorMessage,mode:this.mode,canShowError:this.canShowError},i("ez-icon",{slot:"leftIcon",iconName:"timer-outline"})))}static get assetsDirs(){return["../assets"]}get _elem(){return h(this)}static get watchers(){return{errorMessage:["observeErrorMessage"],showSeconds:["observeShowSeconds"],value:["observeValue"]}}};u.style=":host{display:flex;flex-wrap:wrap;position:relative;width:100%}.time__input{height:100%}";export{u as ez_time_input}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,c as t,h as i}from"./p-e4c7eb39.js";const s=class{constructor(i){o(this,i),this.applicationLoaded=t(this,"applicationLoaded",7)}componentWillLoad(){}componentDidLoad(){this.applicationLoaded.emit(!0)}render(){return i("div",null)}};s.style="";export{s as ez_application}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,H as o,g as e}from"./p-e4c7eb39.js";import{ObjectUtils as r,ElementIDUtils as h}from"@sankhyalabs/core";import"./p-2187f86c.js";import{C as n}from"./p-ec7db713.js";import"./p-ab574d59.js";import"./p-b853763b.js";import"./p-5895e687.js";import"./p-173f68ea.js";const l=class{constructor(s){t(this,s),this.ezChange=i(this,"ezChange",7),this._changeDeboucingTimeout=null,this._deboucingTime=300,this._maxWidthValue=0,this._tabPressed=!1,this._textEmptyList="Nenhum resultado encontrado",this._lookupMode=!1,this.isOpen=!1,this._preSelection=void 0,this._visibleOptions=void 0,this._startLoading=!1,this._showLoading=!0,this._criteria=void 0,this.limitCharsToSearch=3,this.value=void 0,this.label=void 0,this.enabled=!0,this.options=void 0,this.errorMessage=void 0,this.showSelectedValue=!1,this.showOptionValue=!1,this.suppressSearch=!1,this.optionLoader=void 0,this.suppressEmptyOption=!1,this.stopPropagateEnterKeyEvent=!0,this.canShowError=!0,this.mode="regular",this.hideErrorOnFocusOut=!0,this.listOptionsPosition=void 0,this.isTextSearch=!1,this.autoFocus=!1}observeErrorMessage(){var t;this._textInput&&(this._textInput.errorMessage=this.errorMessage,(null===(t=this.errorMessage)||void 0===t?void 0:t.trim())||this.setInputValue())}observeValue(t,i){if(this._textInput&&t!=i)try{if("string"==typeof t)return void this.setInputValue();const s=this.getSelectedOption(t),o=this.getSelectedOption(i),e=this.getSelectedOption(this.value);this.isDifferentValues(e,s)&&(this.value=s),this.isDifferentValues(s,o)&&(this.setInputValue(),this._lookupMode||this.ezChange.emit(null===s?void 0:s)),this.resetOptions()}finally{this._lookupMode=!1}}observeOptions(t,i){r.equals(t,i)||this.loadOptions(a.PRELOAD)}async getValueAsync(){return new Promise(this._showLoading?t=>{let i=setInterval((()=>{this._showLoading||(clearInterval(i),t(this.value))}),100)}:t=>t(this.value))}async setFocus(t){this._textInput&&this._textInput.setFocus(t)}async setBlur(){this._textInput&&this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async clearValue(){this.clearSearch()}isDifferentValues(t,i){return r.objectToString(t||{})!==r.objectToString(i||{})}getFormattedText(t){if(null!=t)return this.showSelectedValue&&null!=t.value?t.label?`${t.value} - ${t.label}`:t.value:t.label}getText(){const t=this.getSelectedOption(this.value),i=this.getFormattedText(t);if(null!=i)return String(i).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')}getSelectedOption(t){return"string"==typeof t||t instanceof String?this._visibleOptions.find((i=>i.value===t)):t}updateVisibleOptions(){let t=this._source||[];if(this._criteria){const i=this._criteria.toUpperCase();t=t.filter((t=>t.label.toLocaleUpperCase().indexOf(i)>-1))}this.hasToAddEmptyoption(t)&&(t=[{value:void 0,label:""}].concat(t)),this._visibleOptions=t,this._maxWidthValue=this.getMaxWidthValue()}hasToAddEmptyoption(t){return!this.suppressEmptyOption&&!t.filter((t=>!t.value)).length}getMaxWidthValue(){var t;if(this.showOptionValue){const i=[];return null===(t=this._visibleOptions)||void 0===t||t.forEach((t=>{const s=this.getWidthValue(t.value);i.includes(s)||i.push(s)})),i.length>1?Math.max(...i):0}return 0}getWidthValue(t){if(null!=this._itemValueBasis){const i=this._itemValueBasis;if(null!=t)return i.innerHTML=t,i.clientWidth>0?i.clientWidth+2:0;i.innerHTML=""}return 0}showOptions(){var t,i;if(!this.enabled)return;this.openPopover();const s=null!==(i=null===(t=this.value)||void 0===t?void 0:t.value)&&void 0!==i?i:this.value,o=this._visibleOptions.findIndex((t=>t.value===s));this._preSelection=-1===o?0:o,this._resizeObserver&&this._resizeObserver.observe(this._textInput),this.setFocus()}hideOptions(){var t;null===(t=this._popover)||void 0===t||t.hide(),this._resizeObserver&&this._resizeObserver.unobserve(this._textInput)}updateSource(t){this._startLoading=!1,t instanceof Promise?(this._showLoading=!0,t.then((t=>{this._showLoading=!1,this.updateSource(t)})).catch((()=>this._showLoading=!1)),this.updateVisibleOptions()):(this._showLoading=!1,Array.isArray(t)?(this._source=t,this.updateVisibleOptions(),this._tabPressed&&(this._tabPressed=!1)):this.selectOption(t))}selectOption(t,i=!0){var s,o,e;const r=this.getSelectedOption(this.value);(null===(s=null==r?void 0:r.value)||void 0===s?void 0:s.toString())!==(null===(o=null==t?void 0:t.value)||void 0===o?void 0:o.toString())||null==r&&null!=t&&"value"in t?(this.value=(null==t?void 0:t.value)?t:void 0,null===(e=this._popover)||void 0===e||e.hide()):this.resetOptions(),i&&setTimeout((()=>{this.setFocus()}),0)}loadOptions(t,i=""){this._criteria=i,this._startLoading=!0,this.updateSource(this.optionLoader?this.optionLoader({mode:t,argument:i}):this.options)}cancelPreselection(){!this._textInput.value&&this.value?this.selectOption(void 0):window.setTimeout((()=>{this.setInputValue(!1)}),this._deboucingTime)}setInputValue(t=!0){const i=this.getText();(this._textInput.value||"")!==i&&(this._textInput.value=i,t&&(this.errorMessage=null))}clearSearch(){this.value=null}resetOptions(){this.hideOptions(),this._criteria=void 0,this._preSelection=void 0,this.updateVisibleOptions()}componentWillLoad(){if(void 0===this.options){this.options=[];const t=this.el.querySelectorAll("option");t&&t.forEach((t=>{let i=t.innerText,s=t.getAttribute("value");s||(s=i),this.options.push({label:i,value:s}),t.hidden=!0}))}this.loadOptions(a.PRELOAD)}componentDidLoad(){n.applyVarsTextInput(this.el,this._textInput),this.setInputValue(!1),this._resizeObserver=new ResizeObserver((t=>{window.requestAnimationFrame((()=>{Array.isArray(t)&&t.length&&this._textInput&&this._comboBoxList&&(this._comboBoxList.width=this._textInput.clientWidth)}))})),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})}))}disconnectedCallback(){var t;null===(t=this._popover)||void 0===t||t.remove(),this._resizeObserver&&this._resizeObserver.disconnect()}handlerIconClick(){this.showOptions()}onTextInputChangeHandler(t){var i;if(this.clearDeboucingTimeout(),this._startLoading)return void(this._changeDeboucingTimeout=window.setTimeout((()=>{this.onTextInputChangeHandler(t)}),this._deboucingTime));const s=null===(i=t.target.value)||void 0===i?void 0:i.trim();this._criteria||(this._textInput.value=t.data||s),this._criteria=s,s?(this.updateVisibleOptions(),this.showOptions()):(this._preSelection=void 0,this.updateVisibleOptions())}clearDeboucingTimeout(){this._changeDeboucingTimeout&&(window.clearTimeout(this._changeDeboucingTimeout),this._changeDeboucingTimeout=null)}onTextInputClickHandler(){this.showOptions()}keyDownHandler(t){var i,s,o,e,r,h;if(t.ctrlKey&&("f"===t.key||"F"===t.key))return this.loadOptions(a.ADVANCED),t.preventDefault(),void t.stopPropagation();switch(t.key){case"ArrowDown":t.preventDefault(),this.canShowListOptions()&&(this.showOptions(),null===(i=this._comboBoxList)||void 0===i||i.nextOption());break;case"ArrowUp":t.preventDefault(),this.canShowListOptions()&&(this.showOptions(),null===(s=this._comboBoxList)||void 0===s||s.previousOption());break;case"Enter":this.isOpen&&(t.preventDefault(),null===(o=this._comboBoxList)||void 0===o||o.selectCurrentOption());break;case"Escape":this.isOpen&&(t.preventDefault(),null===(e=this._popover)||void 0===e||e.hide());break;case"Tab":this._tabPressed=!0,this.isOpen&&(null===(r=this._comboBoxList)||void 0===r||r.selectCurrentOption(),null===(h=this._popover)||void 0===h||h.hide())}}onTextInputFocusOutHandler(){this.hideErrorOnFocusOut&&this.cancelPreselection()}canShowListOptions(){return!this._showLoading&&this._visibleOptions.length>0}openPopover(){var t;this.isOpen=!0,null===(t=this._popover)||void 0===t||t.show()}render(){var t;return h.addIDInfoIfNotExists(this.el,"input"),s(o,null,s("ez-text-input",{"data-element-id":h.getInternalIDInfo("textInput"),class:"text-input-slot-container "+(this.suppressSearch?"suppressed-search-input":""),ref:t=>this._textInput=t,"data-slave-mode":"true",enabled:this.enabled&&!this.suppressSearch,onInput:t=>this.onTextInputChangeHandler(t),onClick:()=>this.onTextInputClickHandler(),onFocusout:()=>this.onTextInputFocusOutHandler(),onKeyDown:t=>this.keyDownHandler(t),label:this.label,canShowError:this.canShowError,errorMessage:this.errorMessage,mode:this.mode},s("button",{class:"btn",slot:"rightIcon",disabled:!this.enabled,tabindex:-1,onClick:()=>this.handlerIconClick()},s("ez-icon",{iconName:"chevron-down"}))),s("ez-popover-plus",{ref:t=>this._popover=t,anchorElement:this._textInput,autoClose:!0,boxWidth:"fit-content",overlayType:"none",onEzVisibilityChange:t=>this.isOpen=t.detail},s("ez-combo-box-list",{ref:t=>this._comboBoxList=t,showLoading:this._showLoading,visibleOptions:this._visibleOptions,textEmptyList:this._textEmptyList,showOptionValue:this.showOptionValue,preSelection:this._preSelection,maxWidth:this._maxWidthValue,width:null===(t=this._textInput)||void 0===t?void 0:t.clientWidth,onOptionSelect:t=>this.selectOption(t),onOptionHover:t=>this._preSelection=t})))}get el(){return e(this)}static get watchers(){return{errorMessage:["observeErrorMessage"],value:["observeValue"],options:["observeOptions"]}}};var a;!function(t){t.ADVANCED="ADVANCED",t.PRELOAD="PRELOAD",t.PREDICTIVE="PREDICTIVE"}(a||(a={})),l.style=":host{--ez-combo-box--height:42px;--ez-combo-box--width:100%;--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--font-size:var(--text--medium, 14px);--ez-combo-box--font-family:var(--font-pattern, Arial);--ez-combo-box--background-color--xlight:var(--background--xlight, #fff);--ez-combo-box__input--background-color:var(--background--medium, #e0e0e0);--ez-combo-box__input--border:var(--border--medium, 2px solid);--ez-combo-box__input--border-color:var(--ez-combo-box__input--background-color);--ez-combo-box__input--focus--border-color:var(--color--primary, #008561);--ez-combo-box__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-combo-box__input--disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__btn--color:var(--title--primary, #2B3A54);--ez-combo-box__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-hover--color:var(--color--primary, #4e4e4e);width:var(--ez-combo-box--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #2B3A54)}.btn{outline:none;border:none;background:none;cursor:pointer;padding:0px;color:var(--ez-combo-box__btn--color)}.btn:disabled{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:disabled:hover{cursor:not-allowed;color:var(--ez-combo-box__btn-disabled--color)}.btn:hover{color:var(--ez-combo-box__btn-hover--color)}.btn__close{visibility:hidden}ez-text-input:hover .btn__close,ez-text-input:focus .btn__close{visibility:visible}.text-input-slot-container{--ez-text-input__icon--width:32px;--ez-text-input__min-width:var(--ez-combo-box__min-width);--ez-text-input__max-width:var(--ez-combo-box__max-width)}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";export{l as ez_combo_box}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as e}from"./p-e4c7eb39.js";import{UserInterface as s}from"@sankhyalabs/core";const l=window,o=new CustomEvent("onSubmitFilter",{detail:{showToast:!0}}),n=class{constructor(e){t(this,e),this.applyFilterColumnOptions=i(this,"applyFilterColumnOptions",7),this.opened=!0,this.columnName=void 0,this.columnLabel=void 0,this.gridHeaderHidden=!1,this.noHeaderTaskBar=!1,this.dataSource=void 0,this.dataUnit=void 0,this.options=void 0,this.selectedItems=void 0,this.fieldDescriptor=void 0,this.useOptions=!1,this.isTextSearch=!1}async hide(){await this.ezPopoverElement.hide(),await this.clearConfigs()}async show(t){this.canShow(t)&&(await this.hide(),this.fieldDescriptor=this.dataUnit.getField(t.columnName),this.buildIsTextSearch(),this.columnName=t.columnName,this.columnLabel=t.columnLabel,await this.setOptions(t.filteredOptions),await this.ezPopoverElement.showUnder(`filter-column-${t.columnName}-${this.dataUnit.dataUnitId}`))}buildIsTextSearch(){var t,i;const e=null!==(i=null===(t=this.fieldDescriptor)||void 0===t?void 0:t.userInterface)&&void 0!==i?i:s.SHORTTEXT;this.isTextSearch=!(e===s.DECIMALNUMBER||e===s.INTEGERNUMBER)}async clearConfigs(){var t;await(null===(t=this.ezMultiSelectionList)||void 0===t?void 0:t.clearFilteredOptions()),this.options=null,this.columnName=null}canShow(t){return!this.ezPopoverElement.opened||t.columnName!==this.columnName}submit(){this.applyFilterColumnOptions.emit({field:this.columnName,values:this.selectedItems}),l.dispatchEvent(o),this.hide()}changeSelectedItems(t){this.selectedItems=t}hasToUseOptions(){return this.fieldDescriptor.userInterface===s.OPTIONSELECTOR||this.fieldDescriptor.userInterface===s.SWITCH||this.fieldDescriptor.userInterface===s.CHECKBOX}isCheckBoxOrSwitch(){return this.fieldDescriptor.userInterface===s.SWITCH||this.fieldDescriptor.userInterface===s.CHECKBOX}async setOptions(t){const i=this.hasToUseOptions();if(i)return this.useOptions=i,void(this.options=i?this.buildOptions(t):null!=t?t:null);const e=await this.dataSource.getStaticOptions(this.columnName);if(null!=e){const i=new Set((t||[]).filter((t=>t.check)).map((t=>t.label)));return this.useOptions=!0,void(this.options=0===i.size?e:e.map((t=>Object.assign(Object.assign({},t),{check:i.has(t.label)}))))}this.useOptions=!1,this.options=null}buildOptions(t){var i,e;if(t&&t.length>0)return t;if(this.isCheckBoxOrSwitch())return[{label:"Sim",value:"true",check:!0},{label:"Não",value:"false",check:!0}];const s=null===(e=null===(i=this.fieldDescriptor)||void 0===i?void 0:i.properties)||void 0===e?void 0:e.options;if(Array.isArray(s))return s.map((t=>({label:t.value,value:t.value,check:!0})));const l=JSON.parse(s);return Object.keys(l).map((t=>({label:l[t],value:t,check:!0})))}handleEzVisibilityChange(t){!1===t.detail&&this.clearConfigs()}render(){return e("ez-popover-plus",{ref:t=>this.ezPopoverElement=t,class:"filter-column__popover","overlay-type":"none",autoClose:!0,onEzVisibilityChange:this.handleEzVisibilityChange.bind(this)},e("section",{class:"filter-column"},e("header",{class:"filter-column__header"},e("span",{class:"ez-text ez-text--medium filter-column__header-title"},"Filtro da coluna ",this.columnLabel),e("ez-button",{mode:"icon","icon-name":"close",class:"ez-button--tertiary",onClick:()=>this.hide()})),e("ez-multi-selection-list",{id:"filter-column-selection-list",columnName:this.columnName,dataSource:this.dataSource,options:this.options,useOptions:this.useOptions,ref:t=>this.ezMultiSelectionList=t,onChangeFilteredOptions:t=>this.changeSelectedItems(t.detail),isTextSearch:this.isTextSearch}),e("footer",{class:"filter-column__footer"},e("ez-button",{label:"Aplicar",class:"ez-button--primary",onClick:this.submit.bind(this)}))))}};n.style=".filter-column{padding:var(--space--2xs, 8px);position:relative}.filter-column__header{margin-bottom:var(--space--2xs, 8px);display:flex;flex-direction:row;align-items:center;justify-content:space-between;height:var(--space--xl, 32px)}.filter-column__footer{position:relative;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;width:100%;bottom:0;left:0;padding-top:var(--space--2xs, 8px);border-top:var(--border--medium) var(--color--disable-secondary)}.filter-column__popover{position:absolute}.filter-column__header-title{margin-left:8px}#filter-column-selection-list{--ez-multi-selection-default-height:unset}";export{n as filter_column}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as e,H as r,g as o}from"./p-e4c7eb39.js";import{MaskFormatter as n,ElementIDUtils as a}from"@sankhyalabs/core";const s=class{constructor(e){t(this,e),this.ezChange=i(this,"ezChange",7),this._isOverflowing=!1,this.label=void 0,this.value=void 0,this.enabled=!0,this.errorMessage=void 0,this.hasInvalid=!1,this.mask=void 0,this.cleanValueMask=!1,this.canShowError=!0,this.restrict=void 0,this.mode="regular",this.noBorder=!1,this.password=!1,this.autoFocus=!1,this.hasRightSlotContent=!1}observeHasInvalid(t,i){t!==i&&this.validateErrors()}observeMask(){this.mask&&(null==this._maskFormatter?this._maskFormatter=new n(this.mask):this._maskFormatter.mask=this.mask)}observeValue(t,i){this._inputElem&&t!=i&&(this._inputElem.value=this.value||"",this.handleChange(),this.adjustFloatingLabel(),this.checkIsOverflowing(),this.isSlaveMode()||(this.errorMessage="",this.ezChange.emit(this.value)))}validateErrors(){const t=this.handleValidateErrorMessage(this.errorMessage);this.updateClassError(this.canShowError&&(t||this.hasInvalid))}handleValidateErrorMessage(t=this.errorMessage){return"string"==typeof t&&""!==t.trim()}updateClassError(t){this._inputElem&&(t?this._inputElem.classList.add("hasError"):this._inputElem.classList.remove("hasError"))}adjustFloatingLabel(){if(this.label&&this._labelElem){this._inputElem&&!this._inputElem.classList.contains("input--with--label")&&this._inputElem.classList.add("input--with--label");const t=this.value&&this.value.toString().length>0,i=this._labelElem.classList.contains("input__label--floated");t||this.isFocused()?i||this._labelElem.classList.add("input__label--floated"):i&&this._labelElem.classList.remove("input__label--floated")}}isFocused(){return null!==this._hostElement.shadowRoot.activeElement}isSlaveMode(){var t,i;return"true"===(null===(i=null===(t=this._hostElement)||void 0===t?void 0:t.dataset)||void 0===i?void 0:i.slaveMode)}adjustColorContentSlot(t=""){this._contentLeftSlot&&(this._contentLeftSlot.style.color=t)}adjustBorderInput(){this.noBorder&&this._inputElem.classList.add("input__slim--noborder")}async setFocus(t){const{selectText:i}=t||{};i&&this._inputElem.select(),this._inputElem.focus()}async setBlur(){this._inputElem.blur()}async isInvalid(){return this.handleValidateErrorMessage()}handleFocusout(){const t=this._inputElem.value;if(t&&this._maskFormatter)try{this.cleanValueMask?this.applyMask(t):this._inputElem.value=this._maskFormatter.format(t)}catch(t){this.errorMessage=t.message}this.controlChangeValue(),this.adjustFloatingLabel(),this.adjustColorContentSlot()}isValidValue(t){return!this.restrict||Array.from(t).reduce(((t,i)=>t&&this.restrict.indexOf(i)>-1),!0)}controlChangeValue(){this._inputElem&&(this.value||"")!==this._inputElem.value&&(this.value=this.cleanValueMask?this._maskFormatter.removeMask(this._inputElem.value):this._inputElem.value)}applyMask(t){if(!t||""===t)return t;if(this._maskFormatter)try{const i=this._maskFormatter.applyMask(this._maskFormatter.removeMask(t));return this._inputElem?(this._inputElem.value=i,this._inputElem.value):(this.value=i,this.value)}catch(t){this.errorMessage=t.message}return t}handleChange(){if(!this._inputElem)return;const t=this._inputElem.value;this.isValidValue(t)?this._lastValidValue=t:this._inputElem.value=null==this._lastValidValue?"":this._lastValidValue,this.controlChangeValue()}handleSlotChange(t){var i;const e=t.target,r=e.assignedElements()[0];this.hasRightSlotContent=!1,r&&(r.style.position="absolute",r.style.display="flex",r.style.alignItems="center",r.style.justifyContent="center",r.style.overflow="hidden",r.style.top="0px",r.style.width="var(--ez-text-input__icon--width)",r.style.height="slim"!=this.mode?"var(--ez-text-input--height)":"var(--ez-text-input--height--slim)","leftIcon"==e.name?(r.style.left="0px",r.style.borderRadius="var(--ez-text-input--border-radius) 0 0 var(--ez-text-input--border-radius)",this._inputElem.classList.add("icon--left"),this._labelElem&&this._labelElem.classList.add("input__label--left"),this._contentLeftSlot=r):"rightIcon"==e.name&&(r.style.right="0px",r.style.borderRadius="0 var(--ez-text-input--border-radius) var(--ez-text-input--border-radius) 0",this._inputElem.classList.add("icon--right"),this._labelElem&&this._labelElem.classList.add("input__label--right"),this._tooltipIconElem&&this._tooltipIconElem.classList.add("rightIconSlot"),this.hasRightSlotContent=(null===(i=r.children)||void 0===i?void 0:i.length)>0),e.name&&a.addIDInfo(r,e.name)),this.validateErrors()}doFocus(){this.label&&this._labelElem&&!this._labelElem.classList.contains("input__label--floated")&&this._labelElem.classList.add("input__label--floated"),this.adjustColorContentSlot("var(--ez-text-input__input--focus--icon-color)")}getValue(){return this.mask&&this.cleanValueMask?this.applyMask(this.value):this.value}checkIsOverflowing(){this._isOverflowing=!!this._inputElem&&this._inputElem.offsetWidth<this._inputElem.scrollWidth}componentWillLoad(){if(this.observeMask(),this.value){if(this._maskFormatter)try{this.cleanValueMask?this.applyMask(this.value):this.value=this._maskFormatter.format(this.value)}catch(t){this.errorMessage=t.message}this.isValidValue(this.value)||(this._lastValidValue="",this.value="")}}componentDidLoad(){var t;this.validateErrors(),this.observeMask(),this.adjustFloatingLabel(),this.adjustBorderInput(),this.checkIsOverflowing(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})})),null===(t=this._inputElem)||void 0===t||t.addEventListener("focus",(()=>{var t;this._inputElem.setSelectionRange(0,null===(t=this._inputElem)||void 0===t?void 0:t.value.length)}))}render(){return a.addIDInfoIfNotExists(this._hostElement,"input"),e(r,{style:this._hostElement.classList.contains("grid_editor")?{height:"100%"}:null},e("slot",{name:"leftIcon",onSlotchange:t=>{this.handleSlotChange(t)}}),this.label&&"slim"!=this.mode?e("label",{ref:t=>this._labelElem=t,class:`${this.enabled?"input__label":"input__label input__label--disabled"} ${this.errorMessage?"hasError":""}`,onClick:()=>this._inputElem.focus(),title:this.label},this.label):null,e("input",{"data-element-id":a.getInternalIDInfo("input"),onFocus:()=>this.doFocus(),ref:t=>this._inputElem=t,type:this.password?"password":"text",class:"slim"===this.mode?"input--slim":"",placeholder:"slim"===this.mode&&this.label?this.label:"",value:this.getValue(),disabled:!this.enabled,onInput:()=>{this.handleChange()},onFocusout:()=>{this.handleFocusout()}}),e("ez-tooltip",{anchoringElement:this._hostElement,message:this.getValue(),active:this._isOverflowing,useAnchorSize:!0}),this.canShowError&&"slim"!=this.mode&&this.errorMessage&&e("ez-tooltip",{type:"error",message:this.errorMessage},e("ez-icon",{class:`tooltip-icon ${this.errorMessage?"hasError":""} ${this.hasRightSlotContent?"rightIconSlot":""}`,"data-element-id":a.getInternalIDInfo("tooltip-icon"),ref:t=>this._tooltipIconElem=t,iconName:"alert-circle"})),e("slot",{name:"rightIcon",onSlotchange:t=>{this.handleSlotChange(t)}}," "))}get _hostElement(){return o(this)}static get watchers(){return{hasInvalid:["observeHasInvalid"],errorMessage:["observeHasInvalid"],canShowError:["observeHasInvalid"],mask:["observeMask"],value:["observeValue"]}}};s.style=":host{--ez-text-input--height:42px;--ez-text-input--width:100%;--ez-text-input__icon--width:30px;--ez-text-input--height--slim:32px;--ez-text-input__min-width:0px;--ez-text-input__max-width:100%;--ez-text-input--border-radius:var(--border--radius-medium, 12px);--ez-text-input--border-top-left-radius:var(--ez-text-input--border-radius);--ez-text-input--border-bottom-left-radius:var(--ez-text-input--border-radius);--ez-text-input--border-top-right-radius:var(--ez-text-input--border-radius);--ez-text-input--border-bottom-right-radius:var(--ez-text-input--border-radius);--ez-text-input--font-size:var(--text--medium, 14px);--ez-text-input--font-family:var(--font-pattern, Arial);--ez-text-input--font-weight:var(--text-weight--medium, 400);--ez-text-input--color:var(--title--primary, #2B3A54);--ez-text-input__margin-bottom:var(--space--small);--ez-text-input__input--background-color:var(--background--light, #ffffff);--ez-text-input__input--border:var(--border--small, 1px solid);--ez-text-input__input--border-color:var(--color--strokes,#DCE0E8);--ez-text-input__input--focus--border-color:var(--color--primary, #008561);--ez-text-input__input--disabled--background-color:var(--background--medium, #F0F3F7);--ez-text-input__input--disabled--color:var(--text--primary, #626E82);--ez-text-input__input--error--border-color:var(--color-alert--error-800,#BD0025);--ez-text-input__input--noborder-color:white;--ez-text-input__input--padding:var(--space--medium, 6px);--ez-text-input__placeholder--color:var(--text--secondary, #a2abb9);--ez-text-input__tooltip_icon--error--color:var(--color-alert--error-800,#BD0025);--ez-text-input__label--floating--top:6px;--ez-text-input__label--padding-top:12px;--ez-text-input__label--padding-left:14px;--ez-text-input__label--padding-right:12px;--ez-text-input__input--focus--icon-color:var(--title--primary, #2B3A54);--ez-text-input__input--disabled--focus--icon-color:var(--text--primary, #626E82);--ez-text-input__tooltip-icon--spacing:var(--space--large);--ez-text-input__tooltip-icon---width:var(--space--large);--ez-text-input__tooltip-icon---horizontal-margin:var(--space--medium, 12px);--ez-text-input__tooltip-icon---vertical-margin:10px;display:flex;flex-wrap:wrap;position:relative;width:var(--ez-text-input--width);min-width:var(--ez-text-input__min-width);max-width:var(--ez-text-input__max-width)}:host(.grid_editor){--ez-text-input--height--slim:25px}input{width:100%;box-sizing:border-box;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;height:var(--ez-text-input--height);border-top-left-radius:var(--ez-text-input--border-top-left-radius);border-bottom-left-radius:var(--ez-text-input--border-bottom-left-radius);border-top-right-radius:var(--ez-text-input--border-top-right-radius);border-bottom-right-radius:var(--ez-text-input--border-bottom-right-radius);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);border:var(--ez-text-input__input--border);border-color:var(--ez-text-input__input--border-color);background-color:var(--ez-text-input__input--background-color);color:var(--ez-text-input--color);font-weight:var(--ez-text-input--font-weight);padding:var(--ez-text-input__input--padding);margin-bottom:var(--ez-text-input__margin-bottom)}input.no--margin{--ez-text-input__margin-bottom:0}input:disabled{background-color:var(--ez-text-input__input--disabled--background-color);color:var(--ez-text-input__input--disabled--color);cursor:not-allowed}input:focus{outline:none;border:var(--border--medium, 2px solid);border-color:var(--ez-text-input__input--focus--border-color)}input.icon--left{padding-left:var(--ez-text-input__icon--width)}input.icon--left.hasError{padding-right:var(--ez-text-input__icon--width)}input.icon--right{padding-right:var(--ez-text-input__icon--width)}input.icon--right.hasError{padding-right:calc(var(--ez-text-input__icon--width) + var(--ez-text-input__tooltip-icon--spacing))}input.hasError{color:var(--ez-text-input--color);border:var(--border--medium, 2px solid);border-color:var(--ez-text-input__input--error--border-color);padding-right:calc(var(--ez-text-input__tooltip-icon---width) + (2*var(--ez-text-input__tooltip-icon---horizontal-margin)))}input:disabled.hasError{color:var(--ez-text-input__input--disabled--color)}input.text--right{text-align:right}input:disabled,input:read-only{cursor:not-allowed}.hasError{color:var(--ez-text-input__tooltip_icon--error--color)}.input__label{box-sizing:border-box;position:absolute;z-index:var(--visible);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-transition:font-size .05s, top .05s;transition:font-size .05s, top .05s;width:calc(100% - var(--ez-text-input__label--padding-right));left:var(--ez-text-input--space--medium);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color);top:var(--ez-text-input__label--padding-top);left:var(--ez-text-input__label--padding-left);padding-right:var(--ez-text-input__label--padding-right)}.input__label.hasError{width:calc(100% - 2*(var(--ez-text-input__tooltip-icon--spacing)))}.input__label--floated{font-family:var(--ez-text-input--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--ez-text-input__label--floating--top)}.input__label--disabled{color:var(--ez-text-input__input--disabled--color);cursor:not-allowed}.input__label--left{text-align:left;left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--left.hasError{width:calc(100% - var(--ez-text-input__icon--width) - var(--ez-text-input__tooltip-icon--spacing))}.input__label--right{right:var(--ez-text-input__icon--width);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--right.hasError{width:calc(100% - var(--ez-text-input__icon--width) - var(--ez-text-input__tooltip-icon--spacing))}.input__label--left.input__label--right{left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width) * 2)}.input--with--label{padding-bottom:0}.input--slim{padding-top:var(--space--small, 3px);padding-bottom:var(--space--small, 3px);height:var(--ez-text-input--height--slim)}.input__slim--title{font-size:16px;font-weight:bold}.input--slim::-webkit-input-placeholder,.input--slim:-moz-placeholder,.input--slim::-moz-placeholder,.input--slim:-ms-input-placeholder,.input--slim::placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input__placeholder--color)}.input--slim:disabled::-webkit-input-placeholder,.input--slim:disabled:-moz-placeholder,.input--slim:disabled::-moz-placeholder,.input--slim:disabled:-ms-input-placeholder,.input--slim:disabled::placeholder{color:var(--ez-text-input__input--disabled--color)}input.input__slim--noborder{box-shadow:0 0 0 0;border:0 none;outline:0;background:var(--ez-text-input__input--noborder-color)}ez-icon.tooltip-icon{position:absolute;display:flex;align-items:center;justify-content:center;overflow:hidden;width:var(--ez-text-input__tooltip-icon---width);height:22px;margin:var(--ez-text-input__tooltip-icon---vertical-margin) var(--ez-text-input__tooltip-icon---horizontal-margin);top:0;right:0;z-index:var(--elevation--4);border-radius:var(--ez-text-input--border-radius)}ez-icon.tooltip-icon.rightIconSlot{right:var(--ez-text-input__tooltip-icon--spacing)}ez-icon.tooltip-icon.hasError{--ez-icon--color:var(--ez-text-input__tooltip_icon--error--color)}";export{s as ez_text_input}
|