@sankhyalabs/ezui 5.22.0-dev.96 → 5.22.0-dev.97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/ez-card-item_2.cjs.entry.js +1416 -7
- package/dist/cjs/ez-chip.cjs.entry.js +1 -1
- package/dist/cjs/ez-popover-plus_3.cjs.entry.js +198 -0
- package/dist/cjs/ez-scroller_2.cjs.entry.js +1 -1
- package/dist/cjs/ez-search.cjs.entry.js +28 -158
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/index-a7b0c73d.js +4 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/searchFormatters-b7e1ed1e.js +23 -0
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/ez-card-item/ez-card-item.css +1 -3
- package/dist/collection/components/ez-chip/ez-chip.css +5 -1
- package/dist/collection/components/ez-popover-plus/ez-popover-plus.js +49 -2
- package/dist/collection/components/ez-popover-plus/subcomponent/ez-popover-core.css +2 -2
- package/dist/collection/components/ez-popover-plus/subcomponent/ez-popover-core.js +72 -12
- package/dist/collection/components/ez-scroller/ez-scroller.css +3 -0
- package/dist/collection/components/ez-search/ez-search.css +0 -219
- package/dist/collection/components/ez-search/ez-search.js +28 -167
- package/dist/collection/components/ez-search/subcomponent/search-list/search-list.css +227 -0
- package/dist/collection/components/ez-search/subcomponent/search-list/search-list.js +289 -0
- package/dist/collection/components/ez-search/utils/searchFormatters.js +18 -0
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +169 -177
- package/dist/esm/ez-card-item_2.entry.js +1416 -7
- package/dist/esm/ez-chip.entry.js +1 -1
- package/dist/esm/ez-popover-plus_3.entry.js +192 -0
- package/dist/esm/ez-scroller_2.entry.js +1 -1
- package/dist/esm/ez-search.entry.js +29 -159
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/index-baa5e267.js +4 -4
- package/dist/esm/loader.js +1 -1
- package/dist/esm/searchFormatters-8229207e.js +20 -0
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-288631d1.entry.js +1 -0
- package/dist/ezui/p-31da1b57.entry.js +1 -0
- package/dist/ezui/p-40a60148.js +1 -0
- package/dist/ezui/p-5aca7386.entry.js +1 -0
- package/dist/ezui/p-b7706b43.entry.js +1 -0
- package/dist/ezui/{p-17be134a.entry.js → p-e06a9886.entry.js} +1 -1
- package/dist/types/components/ez-popover-plus/ez-popover-plus.d.ts +9 -1
- package/dist/types/components/ez-popover-plus/subcomponent/ez-popover-core.d.ts +12 -2
- package/dist/types/components/ez-search/ez-search.d.ts +3 -13
- package/dist/types/components/ez-search/subcomponent/search-list/search-list.d.ts +23 -0
- package/dist/types/components/ez-search/utils/searchFormatters.d.ts +2 -0
- package/dist/types/components.d.ts +72 -4
- package/package.json +1 -1
- package/react/components.d.ts +1 -0
- package/react/components.js +1 -0
- package/react/components.js.map +1 -1
- package/dist/cjs/ez-popover-core_2.cjs.entry.js +0 -1504
- package/dist/esm/ez-popover-core_2.entry.js +0 -1499
- package/dist/ezui/p-58783dcf.entry.js +0 -1
- package/dist/ezui/p-65f471bc.entry.js +0 -1
- package/dist/ezui/p-7bd15498.entry.js +0 -1
- package/dist/ezui/p-990b4318.entry.js +0 -1
|
@@ -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,289 @@
|
|
|
1
|
+
import { Host, h } from '@stencil/core';
|
|
2
|
+
import { StringUtils } from '@sankhyalabs/core';
|
|
3
|
+
import { replaceHighlight, replaceQuotes } from '../../utils/searchFormatters';
|
|
4
|
+
export class SearchList {
|
|
5
|
+
constructor() {
|
|
6
|
+
this._startHighlightTag = "<span class='card-item__highlight'>";
|
|
7
|
+
this._endHighlightTag = "</span>";
|
|
8
|
+
this.showLoading = undefined;
|
|
9
|
+
this.visibleOptions = [];
|
|
10
|
+
this.textEmptyList = undefined;
|
|
11
|
+
this.canShowListOptions = undefined;
|
|
12
|
+
this.value = undefined;
|
|
13
|
+
this.showOptionValue = true;
|
|
14
|
+
this.preSelection = undefined;
|
|
15
|
+
}
|
|
16
|
+
async nextOption() {
|
|
17
|
+
const newPreSelection = this.preSelection === undefined ? 0 : Math.min(this.preSelection + 1, this.visibleOptions.length - 1);
|
|
18
|
+
this.changePreSelection.emit(newPreSelection);
|
|
19
|
+
this.scrollToOption(this.visibleOptions[newPreSelection]);
|
|
20
|
+
}
|
|
21
|
+
async previousOption() {
|
|
22
|
+
const newPreSelection = this.preSelection === undefined ? 0 : Math.max(this.preSelection - 1, 0);
|
|
23
|
+
this.changePreSelection.emit(newPreSelection);
|
|
24
|
+
this.scrollToOption(this.visibleOptions[newPreSelection]);
|
|
25
|
+
}
|
|
26
|
+
selectOption(newOption) {
|
|
27
|
+
const newOptionsReplaced = Object.assign(Object.assign({}, newOption), { value: replaceHighlight(newOption === null || newOption === void 0 ? void 0 : newOption.value), label: replaceHighlight(newOption === null || newOption === void 0 ? void 0 : newOption.label) });
|
|
28
|
+
const newOptionsFormatted = Object.assign(Object.assign({}, newOptionsReplaced), { value: replaceQuotes(newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.value), label: replaceQuotes(newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.label) });
|
|
29
|
+
this.changeValue.emit(newOptionsFormatted);
|
|
30
|
+
}
|
|
31
|
+
createOption(detail) {
|
|
32
|
+
let { key, title } = detail;
|
|
33
|
+
const startHighlight = new RegExp(this._startHighlightTag, 'g');
|
|
34
|
+
const endHighlight = new RegExp(this._endHighlightTag, 'g');
|
|
35
|
+
title = StringUtils.decodeHtmlEntities(title);
|
|
36
|
+
const option = {
|
|
37
|
+
value: key === null || key === void 0 ? void 0 : key.replace(startHighlight, '').replace(endHighlight, ''),
|
|
38
|
+
label: title === null || title === void 0 ? void 0 : title.replace(startHighlight, '').replace(endHighlight, '')
|
|
39
|
+
};
|
|
40
|
+
this.selectOption(option);
|
|
41
|
+
}
|
|
42
|
+
scrollToOption(opt) {
|
|
43
|
+
window.requestAnimationFrame(() => {
|
|
44
|
+
const liElem = (opt === null || opt === void 0 ? void 0 : opt.value)
|
|
45
|
+
? this._optionsList.querySelector(`div#item_${opt.value.replace(/([ #;&,.+*~':"!^$[\]()=<>|/\\])/g, '\\$1')}`)
|
|
46
|
+
: undefined;
|
|
47
|
+
if (liElem) {
|
|
48
|
+
liElem.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
buildItem(opt, index) {
|
|
53
|
+
opt.label = opt.label || opt.value;
|
|
54
|
+
const card = {
|
|
55
|
+
key: opt.value,
|
|
56
|
+
title: opt.label,
|
|
57
|
+
details: opt.details
|
|
58
|
+
};
|
|
59
|
+
return h("div", { style: { "height": "100%" }, class: index === this.preSelection ? "item preselected" : "item", id: `item_${opt.value}`, onMouseDown: () => this.createOption(card), onMouseOver: () => this.changePreSelection.emit(index) }, h("ez-card-item", { item: card, compacted: true, enableKey: this.showOptionValue }));
|
|
60
|
+
}
|
|
61
|
+
render() {
|
|
62
|
+
return (h(Host, null, h("ul", { class: "list-options", ref: elem => this._optionsList = elem }, !this.showLoading
|
|
63
|
+
&& this.visibleOptions.length === 0
|
|
64
|
+
&& h("div", { class: "message" }, h("span", { class: "message__no-result" }, this.textEmptyList)), this.showLoading
|
|
65
|
+
&& h("div", { class: "message" }, h("div", { class: "message__loading" })), this.canShowListOptions && this.visibleOptions.map((opt, index) => this.buildItem(opt, index)))));
|
|
66
|
+
}
|
|
67
|
+
static get is() { return "search-list"; }
|
|
68
|
+
static get encapsulation() { return "shadow"; }
|
|
69
|
+
static get originalStyleUrls() {
|
|
70
|
+
return {
|
|
71
|
+
"$": ["search-list.css"]
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
static get styleUrls() {
|
|
75
|
+
return {
|
|
76
|
+
"$": ["search-list.css"]
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
static get properties() {
|
|
80
|
+
return {
|
|
81
|
+
"showLoading": {
|
|
82
|
+
"type": "boolean",
|
|
83
|
+
"mutable": false,
|
|
84
|
+
"complexType": {
|
|
85
|
+
"original": "boolean",
|
|
86
|
+
"resolved": "boolean",
|
|
87
|
+
"references": {}
|
|
88
|
+
},
|
|
89
|
+
"required": false,
|
|
90
|
+
"optional": false,
|
|
91
|
+
"docs": {
|
|
92
|
+
"tags": [],
|
|
93
|
+
"text": ""
|
|
94
|
+
},
|
|
95
|
+
"attribute": "show-loading",
|
|
96
|
+
"reflect": false
|
|
97
|
+
},
|
|
98
|
+
"visibleOptions": {
|
|
99
|
+
"type": "unknown",
|
|
100
|
+
"mutable": false,
|
|
101
|
+
"complexType": {
|
|
102
|
+
"original": "Array<IOption>",
|
|
103
|
+
"resolved": "IOption[]",
|
|
104
|
+
"references": {
|
|
105
|
+
"Array": {
|
|
106
|
+
"location": "global"
|
|
107
|
+
},
|
|
108
|
+
"IOption": {
|
|
109
|
+
"location": "import",
|
|
110
|
+
"path": "../../ez-search"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"required": false,
|
|
115
|
+
"optional": false,
|
|
116
|
+
"docs": {
|
|
117
|
+
"tags": [],
|
|
118
|
+
"text": ""
|
|
119
|
+
},
|
|
120
|
+
"defaultValue": "[]"
|
|
121
|
+
},
|
|
122
|
+
"textEmptyList": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"mutable": false,
|
|
125
|
+
"complexType": {
|
|
126
|
+
"original": "string",
|
|
127
|
+
"resolved": "string",
|
|
128
|
+
"references": {}
|
|
129
|
+
},
|
|
130
|
+
"required": false,
|
|
131
|
+
"optional": false,
|
|
132
|
+
"docs": {
|
|
133
|
+
"tags": [],
|
|
134
|
+
"text": ""
|
|
135
|
+
},
|
|
136
|
+
"attribute": "text-empty-list",
|
|
137
|
+
"reflect": false
|
|
138
|
+
},
|
|
139
|
+
"canShowListOptions": {
|
|
140
|
+
"type": "boolean",
|
|
141
|
+
"mutable": false,
|
|
142
|
+
"complexType": {
|
|
143
|
+
"original": "boolean",
|
|
144
|
+
"resolved": "boolean",
|
|
145
|
+
"references": {}
|
|
146
|
+
},
|
|
147
|
+
"required": false,
|
|
148
|
+
"optional": false,
|
|
149
|
+
"docs": {
|
|
150
|
+
"tags": [],
|
|
151
|
+
"text": ""
|
|
152
|
+
},
|
|
153
|
+
"attribute": "can-show-list-options",
|
|
154
|
+
"reflect": false
|
|
155
|
+
},
|
|
156
|
+
"value": {
|
|
157
|
+
"type": "string",
|
|
158
|
+
"mutable": false,
|
|
159
|
+
"complexType": {
|
|
160
|
+
"original": "IOption | string",
|
|
161
|
+
"resolved": "IOption | string",
|
|
162
|
+
"references": {
|
|
163
|
+
"IOption": {
|
|
164
|
+
"location": "import",
|
|
165
|
+
"path": "../../ez-search"
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"required": false,
|
|
170
|
+
"optional": false,
|
|
171
|
+
"docs": {
|
|
172
|
+
"tags": [],
|
|
173
|
+
"text": ""
|
|
174
|
+
},
|
|
175
|
+
"attribute": "value",
|
|
176
|
+
"reflect": false
|
|
177
|
+
},
|
|
178
|
+
"showOptionValue": {
|
|
179
|
+
"type": "boolean",
|
|
180
|
+
"mutable": false,
|
|
181
|
+
"complexType": {
|
|
182
|
+
"original": "boolean",
|
|
183
|
+
"resolved": "boolean",
|
|
184
|
+
"references": {}
|
|
185
|
+
},
|
|
186
|
+
"required": false,
|
|
187
|
+
"optional": false,
|
|
188
|
+
"docs": {
|
|
189
|
+
"tags": [],
|
|
190
|
+
"text": ""
|
|
191
|
+
},
|
|
192
|
+
"attribute": "show-option-value",
|
|
193
|
+
"reflect": false,
|
|
194
|
+
"defaultValue": "true"
|
|
195
|
+
},
|
|
196
|
+
"preSelection": {
|
|
197
|
+
"type": "number",
|
|
198
|
+
"mutable": false,
|
|
199
|
+
"complexType": {
|
|
200
|
+
"original": "number",
|
|
201
|
+
"resolved": "number",
|
|
202
|
+
"references": {}
|
|
203
|
+
},
|
|
204
|
+
"required": false,
|
|
205
|
+
"optional": false,
|
|
206
|
+
"docs": {
|
|
207
|
+
"tags": [],
|
|
208
|
+
"text": ""
|
|
209
|
+
},
|
|
210
|
+
"attribute": "pre-selection",
|
|
211
|
+
"reflect": false
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
static get events() {
|
|
216
|
+
return [{
|
|
217
|
+
"method": "changeValue",
|
|
218
|
+
"name": "changeValue",
|
|
219
|
+
"bubbles": true,
|
|
220
|
+
"cancelable": true,
|
|
221
|
+
"composed": true,
|
|
222
|
+
"docs": {
|
|
223
|
+
"tags": [],
|
|
224
|
+
"text": ""
|
|
225
|
+
},
|
|
226
|
+
"complexType": {
|
|
227
|
+
"original": "IOption",
|
|
228
|
+
"resolved": "IOption",
|
|
229
|
+
"references": {
|
|
230
|
+
"IOption": {
|
|
231
|
+
"location": "import",
|
|
232
|
+
"path": "../../ez-search"
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}, {
|
|
237
|
+
"method": "changePreSelection",
|
|
238
|
+
"name": "changePreSelection",
|
|
239
|
+
"bubbles": true,
|
|
240
|
+
"cancelable": true,
|
|
241
|
+
"composed": true,
|
|
242
|
+
"docs": {
|
|
243
|
+
"tags": [],
|
|
244
|
+
"text": ""
|
|
245
|
+
},
|
|
246
|
+
"complexType": {
|
|
247
|
+
"original": "number",
|
|
248
|
+
"resolved": "number",
|
|
249
|
+
"references": {}
|
|
250
|
+
}
|
|
251
|
+
}];
|
|
252
|
+
}
|
|
253
|
+
static get methods() {
|
|
254
|
+
return {
|
|
255
|
+
"nextOption": {
|
|
256
|
+
"complexType": {
|
|
257
|
+
"signature": "() => Promise<void>",
|
|
258
|
+
"parameters": [],
|
|
259
|
+
"references": {
|
|
260
|
+
"Promise": {
|
|
261
|
+
"location": "global"
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
"return": "Promise<void>"
|
|
265
|
+
},
|
|
266
|
+
"docs": {
|
|
267
|
+
"text": "",
|
|
268
|
+
"tags": []
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
"previousOption": {
|
|
272
|
+
"complexType": {
|
|
273
|
+
"signature": "() => Promise<void>",
|
|
274
|
+
"parameters": [],
|
|
275
|
+
"references": {
|
|
276
|
+
"Promise": {
|
|
277
|
+
"location": "global"
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
"return": "Promise<void>"
|
|
281
|
+
},
|
|
282
|
+
"docs": {
|
|
283
|
+
"text": "",
|
|
284
|
+
"tags": []
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const START_HIGH_LIGHT_TAG = "<span class='card-item__highlight'>";
|
|
2
|
+
const END_HIGH_LIGHT_TAG = "</span>";
|
|
3
|
+
export function replaceHighlight(value) {
|
|
4
|
+
const startHighlight = new RegExp(START_HIGH_LIGHT_TAG, 'g');
|
|
5
|
+
const endHighlight = new RegExp(END_HIGH_LIGHT_TAG, 'g');
|
|
6
|
+
const newValue = String(value !== null && value !== void 0 ? value : "").replace(startHighlight, '').replace(endHighlight, '');
|
|
7
|
+
return replaceQuotes(newValue);
|
|
8
|
+
}
|
|
9
|
+
export function replaceQuotes(text) {
|
|
10
|
+
if (text == undefined) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
return String(text)
|
|
14
|
+
.replace(/&/g, '&')
|
|
15
|
+
.replace(/</g, '<')
|
|
16
|
+
.replace(/>/g, '>')
|
|
17
|
+
.replace(/"/g, '"');
|
|
18
|
+
}
|
|
@@ -356,6 +356,12 @@ export const MultiSelectionBoxMessage: {
|
|
|
356
356
|
new (): MultiSelectionBoxMessage;
|
|
357
357
|
};
|
|
358
358
|
|
|
359
|
+
interface SearchList extends Components.SearchList, HTMLElement {}
|
|
360
|
+
export const SearchList: {
|
|
361
|
+
prototype: SearchList;
|
|
362
|
+
new (): SearchList;
|
|
363
|
+
};
|
|
364
|
+
|
|
359
365
|
/**
|
|
360
366
|
* Utility to define all custom elements within this package using the tag name provided in the component's source.
|
|
361
367
|
* When defining each custom element, it will also check it's safe to define by:
|