@sankhyalabs/ezui 0.0.0-bugfix-dev-KB-81596.0 → 0.0.0-bugfix-dev-KB-81596.1
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-e92314c2.js → DataBinder-c2060474.js} +3 -2
- package/dist/cjs/FormLayout-c2451c7f.js +7 -0
- package/dist/cjs/{constants-2714478b.js → constants-569271bc.js} +4 -0
- package/dist/cjs/ez-actions-button.cjs.entry.js +2 -1
- package/dist/cjs/ez-card-item_2.cjs.entry.js +3 -1217
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +2 -1
- package/dist/cjs/ez-combo-box-list_3.cjs.entry.js +3 -2
- package/dist/cjs/ez-combo-box.cjs.entry.js +2 -7
- package/dist/cjs/ez-date-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-date-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-form-view.cjs.entry.js +18 -10
- package/dist/cjs/ez-form.cjs.entry.js +29 -3
- package/dist/cjs/ez-grid.cjs.entry.js +165 -28
- package/dist/cjs/ez-list.cjs.entry.js +2 -2
- 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-popup.cjs.entry.js +1 -1
- package/dist/cjs/ez-search-plus.cjs.entry.js +369 -0
- package/dist/cjs/ez-search-result-list.cjs.entry.js +98 -0
- package/dist/cjs/ez-search.cjs.entry.js +3 -2
- package/dist/cjs/ez-split-item.cjs.entry.js +2 -1
- package/dist/cjs/ez-text-input.cjs.entry.js +20 -87
- package/dist/cjs/ez-tooltip.cjs.entry.js +104 -29
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/floating-ui.dom.esm-017acce4.js +1404 -0
- package/dist/cjs/index-a7b0c73d.js +8 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{ICustomRender-6fafffce.js → types-6a5df0c7.js} +8 -0
- package/dist/collection/collection-manifest.json +12 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +1 -8
- package/dist/collection/components/ez-date-input/ez-date-input.js +1 -1
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +1 -1
- package/dist/collection/components/ez-form/ez-form.js +31 -4
- package/dist/collection/components/ez-form-view/ez-form-view.css +8 -0
- package/dist/collection/components/ez-form-view/ez-form-view.js +21 -2
- package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js +3 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInputPlus.tpl.js +6 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +96 -16
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +21 -4
- package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +31 -7
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/EzCellEditor.js +2 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/SearchPlus.tpl.js +15 -0
- package/dist/collection/components/ez-list/ez-list.js +2 -2
- package/dist/collection/components/ez-modal/ez-modal.js +1 -1
- package/dist/collection/components/ez-modal-container/ez-modal-container.js +1 -1
- package/dist/collection/components/ez-popup/ez-popup.js +1 -1
- package/dist/collection/components/ez-search-plus/ez-search-plus.css +373 -0
- package/dist/collection/components/ez-search-plus/ez-search-plus.js +952 -0
- package/dist/collection/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.css +227 -0
- package/dist/collection/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.js +279 -0
- package/dist/collection/components/ez-text-input/ez-text-input.css +18 -2
- package/dist/collection/components/ez-text-input/ez-text-input.js +39 -60
- package/dist/collection/components/ez-tooltip/ez-tooltip.css +52 -12
- package/dist/collection/components/ez-tooltip/ez-tooltip.js +217 -46
- package/dist/collection/utils/constants.js +2 -0
- package/dist/collection/utils/form/DataBinder.js +3 -2
- package/dist/collection/utils/form/interfaces/FormLayout.js +5 -0
- package/dist/collection/utils/form/interfaces/index.js +1 -1
- package/dist/collection/utils/index.js +2 -0
- package/dist/collection/utils/search/types.js +7 -0
- package/dist/custom-elements/index.d.ts +12 -0
- package/dist/custom-elements/index.js +992 -170
- package/dist/esm/{DataBinder-9c877244.js → DataBinder-89946126.js} +3 -2
- package/dist/esm/FormLayout-54092963.js +7 -0
- package/dist/esm/constants-b036528f.js +7 -0
- package/dist/esm/ez-actions-button.entry.js +2 -1
- package/dist/esm/ez-card-item_2.entry.js +1 -1215
- package/dist/esm/ez-collapsible-box.entry.js +2 -1
- package/dist/esm/ez-combo-box-list_3.entry.js +2 -1
- package/dist/esm/ez-combo-box.entry.js +2 -7
- package/dist/esm/ez-date-input.entry.js +1 -1
- package/dist/esm/ez-date-time-input.entry.js +1 -1
- package/dist/esm/ez-form-view.entry.js +19 -11
- package/dist/esm/ez-form.entry.js +30 -4
- package/dist/esm/ez-grid.entry.js +164 -27
- package/dist/esm/ez-list.entry.js +2 -2
- package/dist/esm/ez-modal-container.entry.js +1 -1
- package/dist/esm/ez-modal.entry.js +1 -1
- package/dist/esm/ez-popup.entry.js +1 -1
- package/dist/esm/ez-search-plus.entry.js +365 -0
- package/dist/esm/ez-search-result-list.entry.js +94 -0
- package/dist/esm/ez-search.entry.js +3 -2
- package/dist/esm/ez-split-item.entry.js +2 -1
- package/dist/esm/ez-text-input.entry.js +20 -87
- package/dist/esm/ez-tooltip.entry.js +105 -30
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/floating-ui.dom.esm-5d3da819.js +1398 -0
- package/dist/esm/index-baa5e267.js +8 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{ICustomRender-875b5a40.js → types-6f6b2650.js} +9 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-0bffeffc.entry.js +1 -0
- package/dist/ezui/p-173f68ea.js +1 -0
- package/dist/ezui/p-1a060042.entry.js +1 -0
- package/dist/ezui/{p-cb5cd243.entry.js → p-1ec8bdd2.entry.js} +46 -46
- package/dist/ezui/p-248d4f54.entry.js +1 -0
- package/dist/ezui/p-3176a6ef.entry.js +1 -0
- package/dist/ezui/p-4e0628a7.entry.js +1 -0
- package/dist/ezui/p-5895e687.js +1 -0
- package/dist/ezui/p-5a14f506.entry.js +1 -0
- package/dist/ezui/p-5ec0ae79.entry.js +1 -0
- package/dist/ezui/p-5eea9886.js +1 -0
- package/dist/ezui/p-81145609.entry.js +1 -0
- package/dist/ezui/p-84b1c99e.entry.js +1 -0
- package/dist/ezui/p-8ac8093c.entry.js +1 -0
- package/dist/ezui/p-9142b27a.entry.js +1 -0
- package/dist/ezui/p-9567b31a.entry.js +1 -0
- package/dist/ezui/p-9f22e1dc.entry.js +1 -0
- package/dist/ezui/{p-acddfb2e.js → p-a64cfcfc.js} +1 -1
- package/dist/ezui/p-bf9dec89.entry.js +1 -0
- package/dist/ezui/p-c5df78be.entry.js +1 -0
- package/dist/ezui/p-cd07f8be.entry.js +1 -0
- package/dist/ezui/p-e07e4671.js +1 -0
- package/dist/ezui/p-e3544d23.entry.js +1 -0
- package/dist/ezui/p-ecaac11f.entry.js +1 -0
- package/dist/ezui/p-f4861c6a.entry.js +1 -0
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +0 -2
- package/dist/types/components/ez-form/ez-form.d.ts +5 -1
- package/dist/types/components/ez-form-view/ez-form-view.d.ts +4 -0
- package/dist/types/components/ez-form-view/fieldbuilder/templates/SearchInputPlus.tpl.d.ts +2 -0
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +4 -0
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +5 -2
- package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +1 -0
- package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +1 -0
- package/dist/types/components/ez-grid/controller/ag-grid/editor/templates/SearchPlus.tpl.d.ts +3 -0
- package/dist/types/components/ez-search-plus/ez-search-plus.d.ts +184 -0
- package/dist/types/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.d.ts +26 -0
- package/dist/types/components/ez-text-input/ez-text-input.d.ts +6 -9
- package/dist/types/components/ez-tooltip/ez-tooltip.d.ts +37 -5
- package/dist/types/components.d.ts +338 -12
- package/dist/types/utils/constants.d.ts +2 -0
- package/dist/types/utils/form/interfaces/FormLayout.d.ts +4 -0
- package/dist/types/utils/form/interfaces/index.d.ts +1 -0
- package/dist/types/utils/index.d.ts +2 -0
- package/dist/types/utils/search/types.d.ts +12 -0
- package/package.json +3 -3
- package/react/components.d.ts +62 -60
- package/react/components.js +2 -0
- package/react/components.js.map +1 -1
- package/react/react-component-lib/createComponent.d.ts +1 -1
- package/react/react-component-lib/createComponent.js.map +1 -1
- package/react/react-component-lib/createOverlayComponent.js.map +1 -1
- package/react/react-component-lib/interfaces.js +1 -0
- package/react/react-component-lib/utils/attachProps.d.ts +1 -1
- package/react/react-component-lib/utils/attachProps.js.map +1 -1
- package/react/react-component-lib/utils/dev.js.map +1 -1
- package/react/react-component-lib/utils/index.d.ts +2 -2
- package/react/react-component-lib/utils/index.js.map +1 -1
- package/dist/collection/utils/ResponsiveInputUtils.js +0 -26
- package/dist/esm/constants-4e0d35b7.js +0 -5
- package/dist/ezui/p-05e1f4e7.js +0 -1
- package/dist/ezui/p-17eabf46.entry.js +0 -1
- package/dist/ezui/p-1ad6c61b.entry.js +0 -1
- package/dist/ezui/p-20cb13fa.entry.js +0 -1
- package/dist/ezui/p-23b6128c.entry.js +0 -1
- package/dist/ezui/p-3195a7a7.entry.js +0 -1
- package/dist/ezui/p-4607fb89.js +0 -1
- package/dist/ezui/p-556468d9.entry.js +0 -1
- package/dist/ezui/p-6cdd3e0a.entry.js +0 -1
- package/dist/ezui/p-788467fe.entry.js +0 -1
- package/dist/ezui/p-af1a478e.entry.js +0 -1
- package/dist/ezui/p-bbdc3996.entry.js +0 -1
- package/dist/ezui/p-c297aa52.entry.js +0 -1
- package/dist/ezui/p-cb1535f7.entry.js +0 -1
- package/dist/ezui/p-cf87aacb.entry.js +0 -1
- package/dist/ezui/p-dcf3c8e5.entry.js +0 -1
- package/dist/ezui/p-e347df9c.entry.js +0 -1
- package/dist/ezui/p-f5931caa.entry.js +0 -1
- package/dist/ezui/p-fd0a19d6.entry.js +0 -1
- package/dist/types/utils/ResponsiveInputUtils.d.ts +0 -6
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
/* list */
|
|
3
|
+
/*@doc Define a cor do texto da lista de opções.*/
|
|
4
|
+
--ez-search__list-title--primary: var(--title--primary, #2B3A54);
|
|
5
|
+
/*@doc Define a cor do texto do value da lista de opções.*/
|
|
6
|
+
--ez-search__list-text--primary: var(--text--primary, #626e82);
|
|
7
|
+
/*@doc Define a altura do box da lista de opções.*/
|
|
8
|
+
--ez-search__list-height: calc(var(--ez-search--font-size) + var(--ez-search--space--medium) + 4px);
|
|
9
|
+
/*@doc Define a largura mínima da lista de opções.*/
|
|
10
|
+
--ez-search__list-min-width: 64px;
|
|
11
|
+
|
|
12
|
+
/* scrollbar */
|
|
13
|
+
/*@doc Define a cor da barra de rolagem do componente.*/
|
|
14
|
+
--ez-search__scrollbar--color-default: var(--scrollbar--default, #626e82);
|
|
15
|
+
/*@doc Define a cor de fundo da barra de rolagem do componente.*/
|
|
16
|
+
--ez-search__scrollbar--color-background: var(--scrollbar--background, #E5EAF0);
|
|
17
|
+
/*@doc Define a cor do hover na barra de rolagem do componente.*/
|
|
18
|
+
--ez-search__scrollbar--color-hover: var(--scrollbar--hover, #2B3A54);
|
|
19
|
+
/*@doc Define a cor do active na barra de rolagem do componente.*/
|
|
20
|
+
--ez-search__scrollbar--color-clicked: var(--scrollbar--clicked, #a2abb9);
|
|
21
|
+
/*@doc Define o raio da borda da barra de rolagem do componente.*/
|
|
22
|
+
--ez-search__scrollbar--border-radius: var(--border--radius-small, 6px);
|
|
23
|
+
/*@doc Define a largura da barra de rolagem do componente.*/
|
|
24
|
+
--ez-search__scrollbar--width: var(--space--small, 6px);
|
|
25
|
+
|
|
26
|
+
/* general */
|
|
27
|
+
/*@doc Define o raio da borda do input quando pequeno.*/
|
|
28
|
+
--ez-search--border-radius-small: var(--border--radius-small, 6px);
|
|
29
|
+
/*@doc Define o tamanho da fonte dentro do input.*/
|
|
30
|
+
--ez-search--font-size: var(--text--medium, 14px);
|
|
31
|
+
/*@doc Define a família da fonte dentro do input.*/
|
|
32
|
+
--ez-search--font-family: var(--font-pattern, Arial);
|
|
33
|
+
/*@doc Define o peso da fonte dentro do input quando pesada.*/
|
|
34
|
+
--ez-search--font-weight--large: var(--text-weight--large, 500);
|
|
35
|
+
/*@doc Define o peso da fonte dentro do input quando média.*/
|
|
36
|
+
--ez-search--font-weight--medium: var(--text-weight--medium, 400);
|
|
37
|
+
/*@doc Define a cor de fundo dos itens da lista de opções.*/
|
|
38
|
+
--ez-search--background-medium: var(--background--medium, #f0f3f7);
|
|
39
|
+
/*@doc Define a altura da linha do texto dentro do input.*/
|
|
40
|
+
--ez-search--line-height: calc(var(--text--medium, 14px) + 4px);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.list-options {
|
|
44
|
+
position: relative;
|
|
45
|
+
z-index: var(--more-visible, 2);
|
|
46
|
+
margin: var(--space--small) 0px;
|
|
47
|
+
padding: 0px;
|
|
48
|
+
padding-inline-start: 0px;
|
|
49
|
+
box-sizing: border-box;
|
|
50
|
+
width: 100%;
|
|
51
|
+
height: 100%;
|
|
52
|
+
max-height: 350px;
|
|
53
|
+
min-width: 150px;
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-direction: column;
|
|
56
|
+
scroll-behavior: smooth;
|
|
57
|
+
overflow-y: auto;
|
|
58
|
+
overflow-x: hidden;
|
|
59
|
+
scrollbar-width: thin;
|
|
60
|
+
|
|
61
|
+
/*public*/
|
|
62
|
+
scrollbar-color: var(--ez-search__scrollbar--color-clicked) var(--ez-search__scrollbar--color-background);
|
|
63
|
+
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.list-options::-webkit-scrollbar {
|
|
67
|
+
/*public*/
|
|
68
|
+
background-color: var(--scrollbar--background);
|
|
69
|
+
width: var(--space--small);
|
|
70
|
+
max-width: var(--space--small);
|
|
71
|
+
min-width: var(--space--small);
|
|
72
|
+
height: var(--space--small);
|
|
73
|
+
max-height: var(--space--small);
|
|
74
|
+
min-height: var(--space--small);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.list-options::-webkit-scrollbar-track {
|
|
78
|
+
/*public*/
|
|
79
|
+
background-color: var(--ez-search__scrollbar--color-background);
|
|
80
|
+
border-radius: var(--ez-search__scrollbar--border-radius);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.list-options::-webkit-scrollbar-thumb {
|
|
84
|
+
/*public*/
|
|
85
|
+
background-color: var(--ez-search__scrollbar--color-default);
|
|
86
|
+
border-radius: var(--ez-search__scrollbar--border-radius);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.list-options::-webkit-scrollbar-thumb:vertical:hover,
|
|
90
|
+
.list-options::-webkit-scrollbar-thumb:horizontal:hover {
|
|
91
|
+
/*public*/
|
|
92
|
+
background-color: var(--ez-search__scrollbar--color-hover);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.list-options::-webkit-scrollbar-thumb:vertical:active,
|
|
96
|
+
.list-options::-webkit-scrollbar-thumb:horizontal:active {
|
|
97
|
+
/*public*/
|
|
98
|
+
background-color: var(--ez-search__scrollbar--color-clicked);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.message {
|
|
102
|
+
text-align: center;
|
|
103
|
+
display: flex;
|
|
104
|
+
justify-content: center;
|
|
105
|
+
align-items: center;
|
|
106
|
+
list-style-type: none;
|
|
107
|
+
margin: var(--space--medium) 0px;
|
|
108
|
+
|
|
109
|
+
/*public*/
|
|
110
|
+
min-height: var(--ez-search__list-height);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.message__no-result {
|
|
114
|
+
/*public*/
|
|
115
|
+
color: var(--ez-search__list-title--primary);
|
|
116
|
+
font-family: var(--ez-search--font-family);
|
|
117
|
+
font-size: var(--ez-search--font-size);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.message__loading {
|
|
121
|
+
border-radius: 50%;
|
|
122
|
+
width: 14px;
|
|
123
|
+
height: 14px;
|
|
124
|
+
-webkit-animation: spin 1s linear infinite;
|
|
125
|
+
animation: spin 1s linear infinite;
|
|
126
|
+
|
|
127
|
+
/*public*/
|
|
128
|
+
border: 3px solid var(--ez-search__list-title--primary);
|
|
129
|
+
border-top: 3px solid transparent;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.item__value,
|
|
133
|
+
.item__label {
|
|
134
|
+
flex-basis: auto;
|
|
135
|
+
white-space: nowrap;
|
|
136
|
+
overflow: hidden;
|
|
137
|
+
text-overflow: ellipsis;
|
|
138
|
+
|
|
139
|
+
/*public*/
|
|
140
|
+
color: var(--ez-search__list-title--primary);
|
|
141
|
+
font-family: var(--ez-search--font-family);
|
|
142
|
+
font-size: var(--ez-search--font-size);
|
|
143
|
+
line-height: var(--ez-search--line-height);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.item__label {
|
|
147
|
+
/*public*/
|
|
148
|
+
font-weight: var(--ez-search--font-weight--medium);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.item__label--bold {
|
|
152
|
+
/*public*/
|
|
153
|
+
font-weight: var(--ez-search--font-weight--large);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.item__value {
|
|
157
|
+
text-align: center;
|
|
158
|
+
|
|
159
|
+
/*public*/
|
|
160
|
+
color: var(--ez-search__list-text--primary);
|
|
161
|
+
font-weight: var(--ez-search--font-weight--large);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.item__value--hidden {
|
|
165
|
+
visibility: hidden;
|
|
166
|
+
position: absolute;
|
|
167
|
+
white-space: nowrap;
|
|
168
|
+
z-index: -1;
|
|
169
|
+
top: 0;
|
|
170
|
+
left: 0;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.item__label {
|
|
174
|
+
text-align: left;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.item__list>li:hover {
|
|
178
|
+
/*public*/
|
|
179
|
+
background-color: var(--ez-search--background-medium);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.item {
|
|
183
|
+
display: flex;
|
|
184
|
+
align-items: center;
|
|
185
|
+
width: 100%;
|
|
186
|
+
box-sizing: border-box;
|
|
187
|
+
list-style-type: none;
|
|
188
|
+
cursor: pointer;
|
|
189
|
+
|
|
190
|
+
/*public*/
|
|
191
|
+
border-radius: var(--ez-search--border-radius-small);
|
|
192
|
+
gap: var(--space--small, 6px);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.preselected {
|
|
196
|
+
/*public*/
|
|
197
|
+
background-color: var(--background--medium);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
@-webkit-keyframes spin {
|
|
201
|
+
0% {
|
|
202
|
+
-webkit-transform: rotate(0deg);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
100% {
|
|
206
|
+
-webkit-transform: rotate(360deg);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
@keyframes spin {
|
|
211
|
+
0% {
|
|
212
|
+
transform: rotate(0deg);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
100% {
|
|
216
|
+
transform: rotate(360deg);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
@supports not (scrollbar-width: thin) {
|
|
221
|
+
|
|
222
|
+
/* Estilos para navegadores que NÃO suportam scrollbar-width */
|
|
223
|
+
.item {
|
|
224
|
+
/* Estilos alternativos, por exemplo, para navegadores que não suportam scrollbar-width */
|
|
225
|
+
padding-right: 8px;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
import { Host, h } from '@stencil/core';
|
|
2
|
+
import { StringUtils } from '@sankhyalabs/core';
|
|
3
|
+
export class EzSearchResultList {
|
|
4
|
+
constructor() {
|
|
5
|
+
this._textEmptyList = "Nenhum resultado encontrado";
|
|
6
|
+
this._startHighlightTag = "<span class='card-item__highlight'>";
|
|
7
|
+
this._endHighlightTag = "</span>";
|
|
8
|
+
this.showLoading = undefined;
|
|
9
|
+
this.visibleOptions = [];
|
|
10
|
+
this.value = undefined;
|
|
11
|
+
this.showOptionValue = true;
|
|
12
|
+
this._preSelection = undefined;
|
|
13
|
+
}
|
|
14
|
+
async nextOption() {
|
|
15
|
+
const newPreSelection = this._preSelection === undefined ? 0 : Math.min(this._preSelection + 1, this.visibleOptions.length - 1);
|
|
16
|
+
this.preSelectItemByIndex(newPreSelection);
|
|
17
|
+
}
|
|
18
|
+
async previousOption() {
|
|
19
|
+
const newPreSelection = this._preSelection === undefined ? 0 : Math.max(this._preSelection - 1, 0);
|
|
20
|
+
this.preSelectItemByIndex(newPreSelection);
|
|
21
|
+
}
|
|
22
|
+
preSelectItemByIndex(newIndex) {
|
|
23
|
+
this._preSelection = newIndex;
|
|
24
|
+
const option = this.visibleOptions[newIndex];
|
|
25
|
+
this.scrollToOption(option);
|
|
26
|
+
}
|
|
27
|
+
selectOption(newOption) {
|
|
28
|
+
const newOptionsReplaced = Object.assign(Object.assign({}, newOption), { value: newOption === null || newOption === void 0 ? void 0 : newOption.value, label: newOption === null || newOption === void 0 ? void 0 : newOption.label });
|
|
29
|
+
const newOptionsFormatted = Object.assign(Object.assign({}, newOptionsReplaced), { value: newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.value, label: newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.label });
|
|
30
|
+
this.changeValue.emit(newOptionsFormatted);
|
|
31
|
+
}
|
|
32
|
+
createAndSelectOption(detail) {
|
|
33
|
+
let { key, title } = detail;
|
|
34
|
+
key = String(key !== null && key !== void 0 ? key : "");
|
|
35
|
+
const startHighlight = new RegExp(this._startHighlightTag, 'g');
|
|
36
|
+
const endHighlight = new RegExp(this._endHighlightTag, 'g');
|
|
37
|
+
title = StringUtils.decodeHtmlEntities(title);
|
|
38
|
+
const option = {
|
|
39
|
+
value: key === null || key === void 0 ? void 0 : key.replace(startHighlight, '').replace(endHighlight, ''),
|
|
40
|
+
label: title === null || title === void 0 ? void 0 : title.replace(startHighlight, '').replace(endHighlight, '')
|
|
41
|
+
};
|
|
42
|
+
this.selectOption(option);
|
|
43
|
+
}
|
|
44
|
+
scrollToOption(opt) {
|
|
45
|
+
if (!(opt === null || opt === void 0 ? void 0 : opt.value) || !this._optionsList)
|
|
46
|
+
return;
|
|
47
|
+
window.requestAnimationFrame(() => {
|
|
48
|
+
var _a;
|
|
49
|
+
const currentValue = String((_a = opt === null || opt === void 0 ? void 0 : opt.value) !== null && _a !== void 0 ? _a : "");
|
|
50
|
+
const liElem = currentValue
|
|
51
|
+
? this._optionsList.querySelector(`div#item_${currentValue.replace(/([ #;&,.+*~':"!^$[\]()=<>|/\\])/g, '\\$1')}`)
|
|
52
|
+
: undefined;
|
|
53
|
+
if (liElem) {
|
|
54
|
+
liElem.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
buildItem(opt, index) {
|
|
59
|
+
var _a;
|
|
60
|
+
opt.label = opt.label || opt.value;
|
|
61
|
+
const card = {
|
|
62
|
+
key: String((_a = opt.presentationValue) !== null && _a !== void 0 ? _a : ""),
|
|
63
|
+
title: opt.presentationLabel,
|
|
64
|
+
details: opt.details
|
|
65
|
+
};
|
|
66
|
+
return h("div", { style: { "height": "100%" }, class: index === this._preSelection ? "item preselected" : "item", id: `item_${opt.value}`, onMouseDown: () => this.createAndSelectOption(card), onMouseOver: () => { this._preSelection = index; } }, h("ez-card-item", { item: card, compacted: true, enableKey: this.showOptionValue }));
|
|
67
|
+
}
|
|
68
|
+
async selectCurrentItem() {
|
|
69
|
+
this.selectOption(this.visibleOptions[this._preSelection]);
|
|
70
|
+
}
|
|
71
|
+
async cancelSelection() {
|
|
72
|
+
this.cancelPreselection();
|
|
73
|
+
}
|
|
74
|
+
cancelPreselection() {
|
|
75
|
+
this._preSelection = undefined;
|
|
76
|
+
}
|
|
77
|
+
canShowListOptions() {
|
|
78
|
+
return !this.showLoading && this.visibleOptions.length > 0;
|
|
79
|
+
}
|
|
80
|
+
render() {
|
|
81
|
+
return (h(Host, null, h("ul", { class: "list-options", ref: elem => this._optionsList = elem }, !this.showLoading
|
|
82
|
+
&& this.visibleOptions.length === 0
|
|
83
|
+
&& h("div", { class: "message" }, h("span", { class: "message__no-result" }, this._textEmptyList)), this.showLoading
|
|
84
|
+
&& h("div", { class: "message" }, h("div", { class: "message__loading" })), this.canShowListOptions() && this.visibleOptions.map((opt, index) => this.buildItem(opt, index)))));
|
|
85
|
+
}
|
|
86
|
+
static get is() { return "ez-search-result-list"; }
|
|
87
|
+
static get encapsulation() { return "shadow"; }
|
|
88
|
+
static get originalStyleUrls() {
|
|
89
|
+
return {
|
|
90
|
+
"$": ["ez-search-result-list.css"]
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
static get styleUrls() {
|
|
94
|
+
return {
|
|
95
|
+
"$": ["ez-search-result-list.css"]
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
static get properties() {
|
|
99
|
+
return {
|
|
100
|
+
"showLoading": {
|
|
101
|
+
"type": "boolean",
|
|
102
|
+
"mutable": false,
|
|
103
|
+
"complexType": {
|
|
104
|
+
"original": "boolean",
|
|
105
|
+
"resolved": "boolean",
|
|
106
|
+
"references": {}
|
|
107
|
+
},
|
|
108
|
+
"required": false,
|
|
109
|
+
"optional": false,
|
|
110
|
+
"docs": {
|
|
111
|
+
"tags": [],
|
|
112
|
+
"text": ""
|
|
113
|
+
},
|
|
114
|
+
"attribute": "show-loading",
|
|
115
|
+
"reflect": false
|
|
116
|
+
},
|
|
117
|
+
"visibleOptions": {
|
|
118
|
+
"type": "unknown",
|
|
119
|
+
"mutable": false,
|
|
120
|
+
"complexType": {
|
|
121
|
+
"original": "Array<IOption>",
|
|
122
|
+
"resolved": "IOption[]",
|
|
123
|
+
"references": {
|
|
124
|
+
"Array": {
|
|
125
|
+
"location": "global"
|
|
126
|
+
},
|
|
127
|
+
"IOption": {
|
|
128
|
+
"location": "import",
|
|
129
|
+
"path": "../../ez-search-plus"
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"required": false,
|
|
134
|
+
"optional": false,
|
|
135
|
+
"docs": {
|
|
136
|
+
"tags": [],
|
|
137
|
+
"text": ""
|
|
138
|
+
},
|
|
139
|
+
"defaultValue": "[]"
|
|
140
|
+
},
|
|
141
|
+
"value": {
|
|
142
|
+
"type": "string",
|
|
143
|
+
"mutable": false,
|
|
144
|
+
"complexType": {
|
|
145
|
+
"original": "IOption | string",
|
|
146
|
+
"resolved": "IOption | string",
|
|
147
|
+
"references": {
|
|
148
|
+
"IOption": {
|
|
149
|
+
"location": "import",
|
|
150
|
+
"path": "../../ez-search-plus"
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"required": false,
|
|
155
|
+
"optional": false,
|
|
156
|
+
"docs": {
|
|
157
|
+
"tags": [],
|
|
158
|
+
"text": ""
|
|
159
|
+
},
|
|
160
|
+
"attribute": "value",
|
|
161
|
+
"reflect": false
|
|
162
|
+
},
|
|
163
|
+
"showOptionValue": {
|
|
164
|
+
"type": "boolean",
|
|
165
|
+
"mutable": false,
|
|
166
|
+
"complexType": {
|
|
167
|
+
"original": "boolean",
|
|
168
|
+
"resolved": "boolean",
|
|
169
|
+
"references": {}
|
|
170
|
+
},
|
|
171
|
+
"required": false,
|
|
172
|
+
"optional": false,
|
|
173
|
+
"docs": {
|
|
174
|
+
"tags": [],
|
|
175
|
+
"text": ""
|
|
176
|
+
},
|
|
177
|
+
"attribute": "show-option-value",
|
|
178
|
+
"reflect": false,
|
|
179
|
+
"defaultValue": "true"
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
static get states() {
|
|
184
|
+
return {
|
|
185
|
+
"_preSelection": {}
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
static get events() {
|
|
189
|
+
return [{
|
|
190
|
+
"method": "changeValue",
|
|
191
|
+
"name": "changeValue",
|
|
192
|
+
"bubbles": true,
|
|
193
|
+
"cancelable": true,
|
|
194
|
+
"composed": true,
|
|
195
|
+
"docs": {
|
|
196
|
+
"tags": [],
|
|
197
|
+
"text": ""
|
|
198
|
+
},
|
|
199
|
+
"complexType": {
|
|
200
|
+
"original": "IOption",
|
|
201
|
+
"resolved": "IOption",
|
|
202
|
+
"references": {
|
|
203
|
+
"IOption": {
|
|
204
|
+
"location": "import",
|
|
205
|
+
"path": "../../ez-search-plus"
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}];
|
|
210
|
+
}
|
|
211
|
+
static get methods() {
|
|
212
|
+
return {
|
|
213
|
+
"nextOption": {
|
|
214
|
+
"complexType": {
|
|
215
|
+
"signature": "() => Promise<void>",
|
|
216
|
+
"parameters": [],
|
|
217
|
+
"references": {
|
|
218
|
+
"Promise": {
|
|
219
|
+
"location": "global"
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
"return": "Promise<void>"
|
|
223
|
+
},
|
|
224
|
+
"docs": {
|
|
225
|
+
"text": "",
|
|
226
|
+
"tags": []
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
"previousOption": {
|
|
230
|
+
"complexType": {
|
|
231
|
+
"signature": "() => Promise<void>",
|
|
232
|
+
"parameters": [],
|
|
233
|
+
"references": {
|
|
234
|
+
"Promise": {
|
|
235
|
+
"location": "global"
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
"return": "Promise<void>"
|
|
239
|
+
},
|
|
240
|
+
"docs": {
|
|
241
|
+
"text": "",
|
|
242
|
+
"tags": []
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
"selectCurrentItem": {
|
|
246
|
+
"complexType": {
|
|
247
|
+
"signature": "() => Promise<void>",
|
|
248
|
+
"parameters": [],
|
|
249
|
+
"references": {
|
|
250
|
+
"Promise": {
|
|
251
|
+
"location": "global"
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
"return": "Promise<void>"
|
|
255
|
+
},
|
|
256
|
+
"docs": {
|
|
257
|
+
"text": "",
|
|
258
|
+
"tags": []
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
"cancelSelection": {
|
|
262
|
+
"complexType": {
|
|
263
|
+
"signature": "() => Promise<void>",
|
|
264
|
+
"parameters": [],
|
|
265
|
+
"references": {
|
|
266
|
+
"Promise": {
|
|
267
|
+
"location": "global"
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
"return": "Promise<void>"
|
|
271
|
+
},
|
|
272
|
+
"docs": {
|
|
273
|
+
"text": "",
|
|
274
|
+
"tags": []
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/*@doc Define a largura do componente.*/
|
|
6
6
|
--ez-text-input--width: 100%;
|
|
7
7
|
/*@doc Define a largura do slot que contém o ícone.*/
|
|
8
|
-
--ez-text-input__icon--width:
|
|
8
|
+
--ez-text-input__icon--width: 30px;
|
|
9
9
|
/*@doc Define a altura do componente em modo "slim".*/
|
|
10
10
|
--ez-text-input--height--slim: 32px;
|
|
11
11
|
/*@doc Define a largura maxima do componente.*/
|
|
@@ -16,6 +16,16 @@
|
|
|
16
16
|
/* general */
|
|
17
17
|
/*@doc Define o raio da borda do input do componente.*/
|
|
18
18
|
--ez-text-input--border-radius: var(--border--radius-medium, 12px);
|
|
19
|
+
|
|
20
|
+
/*@doc Define o raio da borda no top esquerdo do componente.*/
|
|
21
|
+
--ez-text-input--border-top-left-radius: var(--ez-text-input--border-radius);
|
|
22
|
+
/*@doc Define o raio da borda inferior esquerda do componente.*/
|
|
23
|
+
--ez-text-input--border-bottom-left-radius: var(--ez-text-input--border-radius);
|
|
24
|
+
/*@doc Define o raio da borda no top direito do componente.*/
|
|
25
|
+
--ez-text-input--border-top-right-radius: var(--ez-text-input--border-radius);
|
|
26
|
+
/*@doc Define o raio da borda inferior direita do componente.*/
|
|
27
|
+
--ez-text-input--border-bottom-right-radius: var(--ez-text-input--border-radius);
|
|
28
|
+
|
|
19
29
|
/*@doc Define o tamanho da fonte do input e label do componente.*/
|
|
20
30
|
--ez-text-input--font-size: var(--text--medium, 14px);
|
|
21
31
|
/*@doc Define a família da fonte do input, label e caixa de mensagem do componente.*/
|
|
@@ -108,10 +118,16 @@ input {
|
|
|
108
118
|
/*private*/
|
|
109
119
|
width: 100%;
|
|
110
120
|
box-sizing: border-box;
|
|
121
|
+
text-overflow: ellipsis;
|
|
122
|
+
overflow: hidden;
|
|
123
|
+
white-space: nowrap;
|
|
111
124
|
|
|
112
125
|
/*public*/
|
|
113
126
|
height: var(--ez-text-input--height);
|
|
114
|
-
border-radius: var(--ez-text-input--border-radius);
|
|
127
|
+
border-top-left-radius: var(--ez-text-input--border-top-left-radius);
|
|
128
|
+
border-bottom-left-radius: var(--ez-text-input--border-bottom-left-radius);
|
|
129
|
+
border-top-right-radius: var(--ez-text-input--border-top-right-radius);
|
|
130
|
+
border-bottom-right-radius: var(--ez-text-input--border-bottom-right-radius);
|
|
115
131
|
font-family: var(--ez-text-input--font-family);
|
|
116
132
|
font-size: var(--ez-text-input--font-size);
|
|
117
133
|
border: var(--ez-text-input__input--border);
|