@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-KB-76362.0 → 0.0.0-bugfix-dev-KB-74224.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.
Files changed (185) hide show
  1. package/dist/cjs/{ConfigStorage-f079f5fd.js → ConfigStorage-ecc0ed20.js} +2 -2
  2. package/dist/cjs/{ContinuousInsertUtils-64e47516.js → ContinuousInsertUtils-29b65619.js} +20 -29
  3. package/dist/cjs/{DataFetcher-e059eb72.js → DataFetcher-cadeef8e.js} +5 -7
  4. package/dist/cjs/{SnkFormConfigManager-63369164.js → SnkFormConfigManager-f1c92f79.js} +2 -2
  5. package/dist/cjs/{SnkMessageBuilder-7691a2c1.js → SnkMessageBuilder-bae64d0d.js} +0 -10
  6. package/dist/cjs/{auth-fetcher-4f853233.js → auth-fetcher-d68841bc.js} +1 -1
  7. package/dist/cjs/{dataunit-fetcher-228016f4.js → dataunit-fetcher-f89461c1.js} +3 -3
  8. package/dist/cjs/{form-config-fetcher-39397ac5.js → form-config-fetcher-ed497282.js} +1 -1
  9. package/dist/cjs/index-f9e81701.js +28 -16
  10. package/dist/cjs/loader.cjs.js +1 -1
  11. package/dist/cjs/{pesquisa-fetcher-a9bfeb22.js → pesquisa-fetcher-ca89181c.js} +2 -7
  12. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  13. package/dist/cjs/snk-actions-button_4.cjs.entry.js +30 -27
  14. package/dist/cjs/snk-application.cjs.entry.js +60 -102
  15. package/dist/cjs/snk-attach.cjs.entry.js +5 -5
  16. package/dist/cjs/snk-config-options.cjs.entry.js +239 -0
  17. package/dist/cjs/snk-crud.cjs.entry.js +5 -5
  18. package/dist/cjs/snk-data-exporter.cjs.entry.js +6 -6
  19. package/dist/cjs/{snk-data-unit-7dbdad0e.js → snk-data-unit-668dc5e8.js} +2 -2
  20. package/dist/cjs/snk-data-unit.cjs.entry.js +4 -4
  21. package/dist/cjs/snk-detail-view.cjs.entry.js +8 -8
  22. package/dist/cjs/{snk-filter-bar_4.cjs.entry.js → snk-filter-bar.cjs.entry.js} +3 -688
  23. package/dist/cjs/snk-filter-item.cjs.entry.js +312 -0
  24. package/dist/cjs/snk-filter-list.cjs.entry.js +152 -0
  25. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
  26. package/dist/cjs/snk-filter-modal.cjs.entry.js +249 -0
  27. package/dist/cjs/{snk-config-options_3.cjs.entry.js → snk-form-config.cjs.entry.js} +3 -365
  28. package/dist/cjs/snk-form.cjs.entry.js +144 -0
  29. package/dist/cjs/snk-grid.cjs.entry.js +6 -6
  30. package/dist/cjs/{snk-guides-viewer-eee43c8b.js → snk-guides-viewer-4236cb9d.js} +5 -8
  31. package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -7
  32. package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
  33. package/dist/cjs/snk-simple-crud.cjs.entry.js +14 -14
  34. package/dist/collection/collection-manifest.json +31 -14
  35. package/dist/collection/components/snk-actions-button/snk-actions-button.js +27 -26
  36. package/dist/collection/components/snk-application/snk-application.js +53 -3
  37. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +0 -3
  38. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +7 -7
  39. package/dist/collection/lib/http/data-fetcher/DataFetcher.js +6 -8
  40. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.js +2 -2
  41. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +1 -6
  42. package/dist/collection/lib/message/SnkMessageBuilder.js +0 -2
  43. package/dist/collection/lib/utils/CrudUtils.js +16 -25
  44. package/dist/components/ContinuousInsertUtils.js +16 -25
  45. package/dist/components/DataFetcher.js +5 -7
  46. package/dist/components/SnkMessageBuilder.js +0 -10
  47. package/dist/components/dataunit-fetcher.js +2 -2
  48. package/dist/components/index.d.ts +0 -3
  49. package/dist/components/index.js +0 -3
  50. package/dist/components/pesquisa-fetcher.js +1 -6
  51. package/dist/components/snk-actions-button2.js +27 -26
  52. package/dist/components/snk-application2.js +53 -95
  53. package/dist/components/snk-detail-view2.js +0 -3
  54. package/dist/components/snk-simple-crud2.js +7 -7
  55. package/dist/esm/{ConfigStorage-6514d66e.js → ConfigStorage-7b36d041.js} +2 -2
  56. package/dist/esm/{ContinuousInsertUtils-b62906f9.js → ContinuousInsertUtils-30caa626.js} +20 -29
  57. package/dist/esm/{DataFetcher-5034df59.js → DataFetcher-a9c598f2.js} +5 -7
  58. package/dist/esm/{SnkFormConfigManager-b409c745.js → SnkFormConfigManager-139f09fa.js} +3 -3
  59. package/dist/esm/{SnkMessageBuilder-7ace6803.js → SnkMessageBuilder-6fff4a4c.js} +0 -10
  60. package/dist/esm/{auth-fetcher-ca5d3a49.js → auth-fetcher-749d880f.js} +1 -1
  61. package/dist/esm/{constants-7302ee87.js → constants-8457af36.js} +1 -1
  62. package/dist/esm/{dataunit-fetcher-56cb648b.js → dataunit-fetcher-c24c76c6.js} +3 -3
  63. package/dist/esm/{form-config-fetcher-a7d3e277.js → form-config-fetcher-adbe5d34.js} +1 -1
  64. package/dist/esm/index-a7d3d3f1.js +28 -16
  65. package/dist/esm/loader.js +1 -1
  66. package/dist/esm/{pesquisa-fetcher-6bc2e41a.js → pesquisa-fetcher-8edaa8cd.js} +2 -7
  67. package/dist/esm/sankhyablocks.js +1 -1
  68. package/dist/esm/snk-actions-button_4.entry.js +32 -29
  69. package/dist/esm/snk-application.entry.js +60 -102
  70. package/dist/esm/snk-attach.entry.js +6 -6
  71. package/dist/esm/snk-config-options.entry.js +235 -0
  72. package/dist/esm/snk-configurator.entry.js +1 -1
  73. package/dist/esm/snk-crud.entry.js +6 -6
  74. package/dist/esm/snk-data-exporter.entry.js +7 -7
  75. package/dist/esm/{snk-data-unit-7a579dbd.js → snk-data-unit-0fdfb6c2.js} +2 -2
  76. package/dist/esm/snk-data-unit.entry.js +4 -4
  77. package/dist/esm/snk-detail-view.entry.js +9 -9
  78. package/dist/esm/snk-field-config.entry.js +1 -1
  79. package/dist/esm/{snk-filter-bar_4.entry.js → snk-filter-bar.entry.js} +5 -687
  80. package/dist/esm/snk-filter-item.entry.js +308 -0
  81. package/dist/esm/snk-filter-list.entry.js +148 -0
  82. package/dist/esm/snk-filter-modal-item.entry.js +3 -3
  83. package/dist/esm/snk-filter-modal.entry.js +245 -0
  84. package/dist/esm/{snk-config-options_3.entry.js → snk-form-config.entry.js} +6 -366
  85. package/dist/esm/snk-form.entry.js +140 -0
  86. package/dist/esm/snk-grid.entry.js +6 -6
  87. package/dist/esm/{snk-guides-viewer-e8ca764a.js → snk-guides-viewer-8934c537.js} +6 -9
  88. package/dist/esm/snk-guides-viewer.entry.js +8 -8
  89. package/dist/esm/snk-personalized-filter.entry.js +3 -3
  90. package/dist/esm/snk-simple-crud.entry.js +15 -15
  91. package/dist/esm/snk-tab-config.entry.js +1 -1
  92. package/dist/sankhyablocks/p-01086ff7.entry.js +1 -0
  93. package/dist/sankhyablocks/{p-126c58ea.js → p-06421fdb.js} +1 -1
  94. package/dist/sankhyablocks/{p-e3a285a2.js → p-16869f77.js} +1 -1
  95. package/dist/sankhyablocks/p-17425c72.js +1 -0
  96. package/dist/sankhyablocks/{p-341465ce.js → p-1bf06cd3.js} +2 -2
  97. package/dist/sankhyablocks/{p-aa003d4e.entry.js → p-212213d9.entry.js} +1 -1
  98. package/dist/sankhyablocks/p-2923c1b5.js +1 -0
  99. package/dist/sankhyablocks/p-3b60db06.entry.js +1 -0
  100. package/dist/sankhyablocks/{p-00f9fe5c.entry.js → p-430e4d3c.entry.js} +1 -1
  101. package/dist/sankhyablocks/{p-9ffd9fc7.js → p-4d9549cf.js} +1 -1
  102. package/dist/sankhyablocks/p-4f35399c.entry.js +1 -0
  103. package/dist/sankhyablocks/{p-c75fae8e.js → p-5dd8cf4f.js} +1 -1
  104. package/dist/sankhyablocks/p-60b29483.entry.js +1 -0
  105. package/dist/sankhyablocks/p-70a4af56.entry.js +1 -0
  106. package/dist/sankhyablocks/{p-41793e17.entry.js → p-7663f597.entry.js} +1 -1
  107. package/dist/sankhyablocks/{p-47d24ac8.js → p-7ac7932c.js} +2 -2
  108. package/dist/sankhyablocks/{p-2d3f9482.entry.js → p-8eb67fa4.entry.js} +1 -1
  109. package/dist/sankhyablocks/{p-f0aaad2b.entry.js → p-92eadb1c.entry.js} +1 -1
  110. package/dist/sankhyablocks/{p-8b4fc28f.entry.js → p-95df461f.entry.js} +1 -1
  111. package/dist/sankhyablocks/p-a42e7a1e.entry.js +11 -0
  112. package/dist/sankhyablocks/p-a724e798.entry.js +1 -0
  113. package/dist/sankhyablocks/{p-1dbd5c18.entry.js → p-a75d242d.entry.js} +1 -1
  114. package/dist/sankhyablocks/{p-0e206e62.js → p-afbb070d.js} +1 -1
  115. package/dist/sankhyablocks/{p-95ce311a.js → p-b0ef4383.js} +1 -1
  116. package/dist/sankhyablocks/p-b9679243.entry.js +1 -0
  117. package/dist/sankhyablocks/{p-f4e221b2.entry.js → p-b9c67e45.entry.js} +1 -1
  118. package/dist/sankhyablocks/{p-b389ed49.entry.js → p-be5d8fcb.entry.js} +1 -1
  119. package/dist/sankhyablocks/p-ca5ec380.js +1 -0
  120. package/dist/sankhyablocks/p-d3f53df2.entry.js +1 -0
  121. package/dist/sankhyablocks/{p-a2c790ac.entry.js → p-dcead955.entry.js} +1 -1
  122. package/dist/sankhyablocks/p-e8763234.entry.js +1 -0
  123. package/dist/sankhyablocks/{p-00278e07.js → p-f3434fc4.js} +1 -1
  124. package/dist/sankhyablocks/{p-fca0e5cc.entry.js → p-fb34e0cf.entry.js} +1 -1
  125. package/dist/sankhyablocks/p-feba9d4b.entry.js +1 -0
  126. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  127. package/dist/types/components/snk-actions-button/interfaces/index.d.ts +3 -0
  128. package/dist/types/components/snk-actions-button/snk-actions-button.d.ts +3 -2
  129. package/dist/types/components/snk-application/snk-application.d.ts +12 -3
  130. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +1 -0
  131. package/dist/types/components.d.ts +1 -393
  132. package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +0 -1
  133. package/dist/types/lib/utils/CrudUtils.d.ts +0 -1
  134. package/package.json +2 -3
  135. package/react/components.d.ts +0 -3
  136. package/react/components.js +0 -3
  137. package/react/components.js.map +1 -1
  138. package/dist/cjs/input-distinct-search_2.cjs.entry.js +0 -471
  139. package/dist/cjs/snk-distinct-search.cjs.entry.js +0 -123
  140. package/dist/collection/components/snk-application/request-listener/DebouncedRequestListener.js +0 -28
  141. package/dist/collection/components/snk-application/request-listener/RequestListenerFactory.js +0 -16
  142. package/dist/collection/components/snk-application/request-listener/RequestListenerLoadingBar.js +0 -52
  143. package/dist/collection/components/snk-distinct-search/snk-distinct-search.css +0 -4
  144. package/dist/collection/components/snk-distinct-search/snk-distinct-search.js +0 -372
  145. package/dist/collection/components/snk-distinct-search/subcomponents/input-distinct-search/input-distinct-search.css +0 -110
  146. package/dist/collection/components/snk-distinct-search/subcomponents/input-distinct-search/input-distinct-search.js +0 -544
  147. package/dist/collection/components/snk-distinct-search/subcomponents/search-modal/search-modal.css +0 -28
  148. package/dist/collection/components/snk-distinct-search/subcomponents/search-modal/search-modal.js +0 -593
  149. package/dist/collection/components/snk-distinct-search/utils/filter-distinct-search.js +0 -15
  150. package/dist/collection/lib/http/data-fetcher/fetchers/distinct-search-fetcher.js +0 -25
  151. package/dist/collection/lib/message/resources/snk-distinct-search.msg.js +0 -9
  152. package/dist/collection/sw.js +0 -46
  153. package/dist/components/filter-distinct-search.js +0 -17
  154. package/dist/components/input-distinct-search.d.ts +0 -11
  155. package/dist/components/input-distinct-search.js +0 -6
  156. package/dist/components/input-distinct-search2.js +0 -264
  157. package/dist/components/search-modal.d.ts +0 -11
  158. package/dist/components/search-modal.js +0 -6
  159. package/dist/components/search-modal2.js +0 -264
  160. package/dist/components/snk-distinct-search.d.ts +0 -11
  161. package/dist/components/snk-distinct-search.js +0 -163
  162. package/dist/esm/input-distinct-search_2.entry.js +0 -466
  163. package/dist/esm/snk-distinct-search.entry.js +0 -119
  164. package/dist/sankhyablocks/p-0e250436.entry.js +0 -1
  165. package/dist/sankhyablocks/p-154aa2a6.entry.js +0 -11
  166. package/dist/sankhyablocks/p-18cb1acb.entry.js +0 -1
  167. package/dist/sankhyablocks/p-30ebcbe0.entry.js +0 -1
  168. package/dist/sankhyablocks/p-3755b46f.entry.js +0 -1
  169. package/dist/sankhyablocks/p-3858a2e4.entry.js +0 -1
  170. package/dist/sankhyablocks/p-42130213.entry.js +0 -1
  171. package/dist/sankhyablocks/p-563b7c28.entry.js +0 -1
  172. package/dist/sankhyablocks/p-aaf94476.js +0 -1
  173. package/dist/sankhyablocks/p-d8665750.js +0 -1
  174. package/dist/sankhyablocks/p-e4391e16.js +0 -1
  175. package/dist/types/components/snk-application/request-listener/DebouncedRequestListener.d.ts +0 -11
  176. package/dist/types/components/snk-application/request-listener/RequestListenerFactory.d.ts +0 -12
  177. package/dist/types/components/snk-application/request-listener/RequestListenerLoadingBar.d.ts +0 -13
  178. package/dist/types/components/snk-distinct-search/snk-distinct-search.d.ts +0 -83
  179. package/dist/types/components/snk-distinct-search/subcomponents/input-distinct-search/input-distinct-search.d.ts +0 -105
  180. package/dist/types/components/snk-distinct-search/subcomponents/search-modal/search-modal.d.ts +0 -127
  181. package/dist/types/components/snk-distinct-search/types/index.d.ts +0 -12
  182. package/dist/types/components/snk-distinct-search/utils/filter-distinct-search.d.ts +0 -4
  183. package/dist/types/lib/http/data-fetcher/fetchers/distinct-search-fetcher.d.ts +0 -6
  184. package/dist/types/lib/message/resources/snk-distinct-search.msg.d.ts +0 -2
  185. /package/dist/collection/components/{snk-distinct-search/types → snk-actions-button/interfaces}/index.js +0 -0
@@ -1,544 +0,0 @@
1
- import { KeyboardManager } from "@sankhyalabs/core";
2
- import { Fragment, h, Host } from '@stencil/core';
3
- import { filterItems, getMatchOption, normalizeString } from "../../utils/filter-distinct-search";
4
- export class InputDistinctSearch {
5
- constructor() {
6
- this.textValue = "";
7
- this.isNewItem = false;
8
- this.filteredItems = [];
9
- this.isNewItemSelected = false;
10
- this.application = undefined;
11
- this.distinctItems = [];
12
- this.label = "";
13
- this.value = "";
14
- this.maxItems = 100;
15
- this.debounceTime = 300;
16
- this.canShowError = false;
17
- this.mode = 'regular';
18
- this.restrict = undefined;
19
- this.errorMessage = undefined;
20
- }
21
- async observerValue(newValue) {
22
- await this.selectedNewItem(newValue, true);
23
- }
24
- /**
25
- * Seleciona um item
26
- */
27
- async selectValue(value, isNewItem = false) {
28
- this.isNewItem = isNewItem;
29
- this.textValue = value;
30
- await this._refFilterInput.setValue(value);
31
- }
32
- /**
33
- * Método para limpa o campo de entrada de pesquisa
34
- */
35
- clearInput() {
36
- this._refFilterInput.setValue("");
37
- }
38
- /**
39
- * Retorna se o conteúdo é inválido.
40
- */
41
- isInvalid() {
42
- return this._refFilterInput.isInvalid();
43
- }
44
- /**
45
- * Remove o foco do campo
46
- */
47
- setBlur() {
48
- this._refFilterInput.setBlur();
49
- }
50
- /**
51
- * Aplica o foco do campo
52
- */
53
- setFocus() {
54
- this._refFilterInput.setFocus();
55
- }
56
- getMessage(key) {
57
- return this.application.messagesBuilder.getMessage(key, null);
58
- }
59
- async optionLoader(searchArgument) {
60
- return new Promise((resolve) => {
61
- if (this._debounceTimeout) {
62
- clearTimeout(this._debounceTimeout);
63
- }
64
- ;
65
- this._debounceTimeout = setTimeout(() => {
66
- const { items } = filterItems(searchArgument, this.distinctItems, this.maxItems);
67
- this.filteredItems = items;
68
- resolve();
69
- }, this.debounceTime);
70
- });
71
- }
72
- async openPopOver() {
73
- var _a;
74
- await ((_a = this._refPopOver) === null || _a === void 0 ? void 0 : _a.showUnder(this._refFilterInput));
75
- }
76
- async closePopOver() {
77
- var _a;
78
- this.isNewItemSelected = false;
79
- await ((_a = this._refPopOver) === null || _a === void 0 ? void 0 : _a.hide());
80
- await this._refList.removeSelection();
81
- }
82
- async onTextChange(event) {
83
- this.textValue = event.detail;
84
- await this.optionLoader(event.detail);
85
- await this.selectFirstItem();
86
- }
87
- onIconClick() {
88
- this.iconClick.emit();
89
- }
90
- buidItems() {
91
- var _a;
92
- const items = (_a = this.filteredItems) === null || _a === void 0 ? void 0 : _a.map((item) => ({
93
- label: item,
94
- id: normalizeString(item),
95
- }));
96
- return items;
97
- }
98
- async setValue(value, isNewItem = false, preventEventEmit = false) {
99
- this.isNewItem = isNewItem;
100
- this.textValue = value;
101
- await this._refFilterInput.setValue(value);
102
- await this.closePopOver();
103
- if (!preventEventEmit) {
104
- this.changeValue.emit({
105
- value,
106
- isNewItem,
107
- });
108
- }
109
- }
110
- async selectedNewItem(value, preventEventEmit = false) {
111
- if (!this.textValue && !value) {
112
- await this.setValue("", false, preventEventEmit);
113
- return;
114
- }
115
- const item = getMatchOption(value !== null && value !== void 0 ? value : this.textValue, this.distinctItems);
116
- if (item) {
117
- await this.setValue(item, false, preventEventEmit);
118
- return;
119
- }
120
- await this.setValue(this.textValue || value, true, preventEventEmit);
121
- }
122
- async setSelectedValue() {
123
- const selectedValue = await this._refList.getSelection();
124
- await this.selectedNewItem((selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.label) || this.textValue, true);
125
- await this._refFilterInput.setBlur();
126
- this._element.focus();
127
- }
128
- async selectNextItem() {
129
- if (this.isNewItemSelected) {
130
- return;
131
- }
132
- const itemSelected = await this._refList.getSelection();
133
- const itemsAmount = this.filteredItems.length;
134
- const indexSelected = this.filteredItems.findIndex((item) => item === (itemSelected === null || itemSelected === void 0 ? void 0 : itemSelected.label));
135
- const isLastItemSelected = indexSelected === (itemsAmount - 1);
136
- const optionNewItemIsAvailable = !!this.textValue;
137
- if (!isLastItemSelected || !optionNewItemIsAvailable) {
138
- this.isNewItemSelected = false;
139
- await this._refList.selectNextItem();
140
- return;
141
- }
142
- this.isNewItemSelected = true;
143
- await this._refList.removeSelection();
144
- }
145
- async selectPreviousItem() {
146
- const itemsAmount = this.filteredItems.length;
147
- const lastItem = this.filteredItems[itemsAmount - 1];
148
- if (this.isNewItemSelected && lastItem) {
149
- this.isNewItemSelected = false;
150
- await this._refList.setSelection({
151
- id: normalizeString(lastItem),
152
- label: lastItem
153
- });
154
- return;
155
- }
156
- await this._refList.selectPreviousItem();
157
- }
158
- bindKeyboardManager() {
159
- this._keyboardManager = new KeyboardManager({ propagate: false, element: this._element });
160
- this._keyboardManager
161
- .bind("ArrowDown", () => { this.selectNextItem(); })
162
- .bind("ArrowUp", () => { this.selectPreviousItem(); })
163
- .bind("Enter", () => { this.setSelectedValue(); })
164
- .bind("Tab", () => { this.setSelectedValue(); });
165
- }
166
- unbindKeyboardManager() {
167
- this._keyboardManager
168
- .unbind("ArrowDown")
169
- .unbind("ArrowUp")
170
- .unbind("Enter")
171
- .unbind("Tab");
172
- }
173
- async selectFirstItem() {
174
- if (!this.filteredItems.length) {
175
- await this._refList.removeSelection();
176
- this.isNewItemSelected = true;
177
- return;
178
- }
179
- const firstItem = this.filteredItems[0];
180
- this.isNewItemSelected = false;
181
- await this._refList.setSelection({
182
- id: normalizeString(firstItem),
183
- label: firstItem,
184
- });
185
- }
186
- initializeComponent() {
187
- const { items } = filterItems("", this.distinctItems, this.maxItems);
188
- this.filteredItems = items;
189
- }
190
- componentWillLoad() {
191
- this.initializeComponent();
192
- }
193
- async componentDidLoad() {
194
- this.bindKeyboardManager();
195
- this.selectFirstItem();
196
- await this.selectedNewItem(this.value, true);
197
- }
198
- disconnectedCallback() {
199
- this.unbindKeyboardManager();
200
- }
201
- buildNewItemOption() {
202
- if (!this.textValue) {
203
- return;
204
- }
205
- return (h(Fragment, null, !!this.filteredItems.length &&
206
- h("hr", { class: "divider" }), h("button", { slot: "bottomSlot", class: {
207
- "new-value": true,
208
- "new-value-selected": this.isNewItemSelected,
209
- }, title: `${this.getMessage("snkDistinctSearch.titleAdd")} '${this.textValue}'`, onClick: () => this.selectedNewItem.bind(this)(undefined, true) }, this.getMessage("snkDistinctSearch.titleAdd"), " '", this.textValue, "'")));
210
- }
211
- render() {
212
- return (h(Host, { onBlur: () => this.selectedNewItem.bind(this)() }, h("ez-filter-input", { ref: (ref) => this._refFilterInput = ref, label: this.label, value: this.textValue, onEzChange: this.onTextChange.bind(this), onEzIconClick: this.onIconClick.bind(this), onEzFocusIn: this.openPopOver.bind(this), canShowError: this.canShowError, mode: this.mode, restrict: this.restrict, errorMessage: this.errorMessage, enabledIconClick: true }, this.isNewItem &&
213
- h("ez-badge", { slot: "right", label: this.getMessage("snkDistinctSearch.titleBadgeNew"), size: "small-medium", class: "badge-primary" })), h("ez-popover", { ref: (ref) => this._refPopOver = ref, boxWidth: "full-width", autoClose: false, overlayType: "none", class: {
214
- 'space-error': this.canShowError,
215
- } }, h("div", { class: "popover-content" }, h("section", { class: "list-container" }, h("ez-list", { ref: (ref) => this._refList = ref, dataSource: this.buidItems(), onEzClickItem: ({ detail }) => this.setValue.bind(this)(detail.label, false, true), ezSelectable: true, hoverFeedback: true, disableShortcuts: true })), this.buildNewItemOption()))));
216
- }
217
- static get is() { return "input-distinct-search"; }
218
- static get encapsulation() { return "shadow"; }
219
- static get originalStyleUrls() {
220
- return {
221
- "$": ["input-distinct-search.css"]
222
- };
223
- }
224
- static get styleUrls() {
225
- return {
226
- "$": ["input-distinct-search.css"]
227
- };
228
- }
229
- static get properties() {
230
- return {
231
- "application": {
232
- "type": "unknown",
233
- "mutable": false,
234
- "complexType": {
235
- "original": "SnkApplication",
236
- "resolved": "SnkApplication",
237
- "references": {
238
- "SnkApplication": {
239
- "location": "import",
240
- "path": "../../../snk-application/snk-application"
241
- }
242
- }
243
- },
244
- "required": false,
245
- "optional": false,
246
- "docs": {
247
- "tags": [],
248
- "text": "SnkApplication"
249
- }
250
- },
251
- "distinctItems": {
252
- "type": "unknown",
253
- "mutable": false,
254
- "complexType": {
255
- "original": "string[]",
256
- "resolved": "string[]",
257
- "references": {}
258
- },
259
- "required": false,
260
- "optional": false,
261
- "docs": {
262
- "tags": [],
263
- "text": "Lista completa de items distintos."
264
- },
265
- "defaultValue": "[]"
266
- },
267
- "label": {
268
- "type": "string",
269
- "mutable": false,
270
- "complexType": {
271
- "original": "string",
272
- "resolved": "string",
273
- "references": {}
274
- },
275
- "required": false,
276
- "optional": false,
277
- "docs": {
278
- "tags": [],
279
- "text": "Label apresentada no input."
280
- },
281
- "attribute": "label",
282
- "reflect": false,
283
- "defaultValue": "\"\""
284
- },
285
- "value": {
286
- "type": "string",
287
- "mutable": false,
288
- "complexType": {
289
- "original": "string",
290
- "resolved": "string",
291
- "references": {}
292
- },
293
- "required": false,
294
- "optional": false,
295
- "docs": {
296
- "tags": [],
297
- "text": "Valor inicial do campo."
298
- },
299
- "attribute": "value",
300
- "reflect": false,
301
- "defaultValue": "\"\""
302
- },
303
- "maxItems": {
304
- "type": "number",
305
- "mutable": false,
306
- "complexType": {
307
- "original": "number",
308
- "resolved": "number",
309
- "references": {}
310
- },
311
- "required": false,
312
- "optional": false,
313
- "docs": {
314
- "tags": [],
315
- "text": "N\u00FAmero m\u00E1ximo de itens na lista."
316
- },
317
- "attribute": "max-items",
318
- "reflect": false,
319
- "defaultValue": "100"
320
- },
321
- "debounceTime": {
322
- "type": "number",
323
- "mutable": false,
324
- "complexType": {
325
- "original": "number",
326
- "resolved": "number",
327
- "references": {}
328
- },
329
- "required": false,
330
- "optional": false,
331
- "docs": {
332
- "tags": [],
333
- "text": "Tempo em milissegundos para debouncing das chamadas de busca de sugest\u00F5es."
334
- },
335
- "attribute": "debounce-time",
336
- "reflect": false,
337
- "defaultValue": "300"
338
- },
339
- "canShowError": {
340
- "type": "boolean",
341
- "mutable": false,
342
- "complexType": {
343
- "original": "boolean",
344
- "resolved": "boolean",
345
- "references": {}
346
- },
347
- "required": false,
348
- "optional": false,
349
- "docs": {
350
- "tags": [],
351
- "text": "Se false deixa de exibir a mensagem de erro dentro do campo."
352
- },
353
- "attribute": "can-show-error",
354
- "reflect": false,
355
- "defaultValue": "false"
356
- },
357
- "mode": {
358
- "type": "string",
359
- "mutable": false,
360
- "complexType": {
361
- "original": "'slim' | 'regular'",
362
- "resolved": "\"regular\" | \"slim\"",
363
- "references": {}
364
- },
365
- "required": false,
366
- "optional": false,
367
- "docs": {
368
- "tags": [],
369
- "text": "Define o tamanho do campo."
370
- },
371
- "attribute": "mode",
372
- "reflect": false,
373
- "defaultValue": "'regular'"
374
- },
375
- "restrict": {
376
- "type": "string",
377
- "mutable": false,
378
- "complexType": {
379
- "original": "string",
380
- "resolved": "string",
381
- "references": {}
382
- },
383
- "required": false,
384
- "optional": false,
385
- "docs": {
386
- "tags": [],
387
- "text": "Express\u00E3o que define os caracteres permitidos na entrada."
388
- },
389
- "attribute": "restrict",
390
- "reflect": false,
391
- "defaultValue": "undefined"
392
- },
393
- "errorMessage": {
394
- "type": "string",
395
- "mutable": false,
396
- "complexType": {
397
- "original": "string",
398
- "resolved": "string",
399
- "references": {}
400
- },
401
- "required": false,
402
- "optional": false,
403
- "docs": {
404
- "tags": [],
405
- "text": "Define uma mensagem de orienta\u00E7\u00E3o ao usu\u00E1rio, colocando o campo em modo inv\u00E1lido."
406
- },
407
- "attribute": "error-message",
408
- "reflect": false,
409
- "defaultValue": "undefined"
410
- }
411
- };
412
- }
413
- static get states() {
414
- return {
415
- "textValue": {},
416
- "isNewItem": {},
417
- "filteredItems": {},
418
- "isNewItemSelected": {}
419
- };
420
- }
421
- static get events() {
422
- return [{
423
- "method": "changeValue",
424
- "name": "changeValue",
425
- "bubbles": true,
426
- "cancelable": true,
427
- "composed": true,
428
- "docs": {
429
- "tags": [],
430
- "text": "Emitido quando h\u00E1 uma altera\u00E7\u00E3o no valor do campo."
431
- },
432
- "complexType": {
433
- "original": "IDistinctValue",
434
- "resolved": "IDistinctValue",
435
- "references": {
436
- "IDistinctValue": {
437
- "location": "import",
438
- "path": "../../types"
439
- }
440
- }
441
- }
442
- }, {
443
- "method": "iconClick",
444
- "name": "iconClick",
445
- "bubbles": true,
446
- "cancelable": true,
447
- "composed": true,
448
- "docs": {
449
- "tags": [],
450
- "text": "Emitido quando o icone de pesquisa \u00E9 clicado."
451
- },
452
- "complexType": {
453
- "original": "void",
454
- "resolved": "void",
455
- "references": {}
456
- }
457
- }];
458
- }
459
- static get methods() {
460
- return {
461
- "selectValue": {
462
- "complexType": {
463
- "signature": "(value: string, isNewItem?: boolean) => Promise<void>",
464
- "parameters": [{
465
- "tags": [],
466
- "text": ""
467
- }, {
468
- "tags": [],
469
- "text": ""
470
- }],
471
- "references": {
472
- "Promise": {
473
- "location": "global"
474
- }
475
- },
476
- "return": "Promise<void>"
477
- },
478
- "docs": {
479
- "text": "Seleciona um item",
480
- "tags": []
481
- }
482
- },
483
- "clearInput": {
484
- "complexType": {
485
- "signature": "() => Promise<void>",
486
- "parameters": [],
487
- "references": {},
488
- "return": "Promise<void>"
489
- },
490
- "docs": {
491
- "text": "M\u00E9todo para limpa o campo de entrada de pesquisa",
492
- "tags": []
493
- }
494
- },
495
- "isInvalid": {
496
- "complexType": {
497
- "signature": "() => Promise<boolean>",
498
- "parameters": [],
499
- "references": {
500
- "Promise": {
501
- "location": "global"
502
- }
503
- },
504
- "return": "Promise<boolean>"
505
- },
506
- "docs": {
507
- "text": "Retorna se o conte\u00FAdo \u00E9 inv\u00E1lido.",
508
- "tags": []
509
- }
510
- },
511
- "setBlur": {
512
- "complexType": {
513
- "signature": "() => Promise<void>",
514
- "parameters": [],
515
- "references": {},
516
- "return": "Promise<void>"
517
- },
518
- "docs": {
519
- "text": "Remove o foco do campo",
520
- "tags": []
521
- }
522
- },
523
- "setFocus": {
524
- "complexType": {
525
- "signature": "() => Promise<void>",
526
- "parameters": [],
527
- "references": {},
528
- "return": "Promise<void>"
529
- },
530
- "docs": {
531
- "text": "Aplica o foco do campo",
532
- "tags": []
533
- }
534
- }
535
- };
536
- }
537
- static get elementRef() { return "_element"; }
538
- static get watchers() {
539
- return [{
540
- "propName": "value",
541
- "methodName": "observerValue"
542
- }];
543
- }
544
- }
@@ -1,28 +0,0 @@
1
- :host {
2
- display: block;
3
- }
4
-
5
- ez-popup {
6
- --ez-popup__title--font-size: var(--title--large, 20px);
7
- --ez-popup__container--height: 380px;
8
- }
9
-
10
- .search-modal-scroller {
11
- height: 174px;
12
- }
13
-
14
- .search-modal-text {
15
- font-family: var(--font-pattern);
16
- color: var(--text--primary);
17
- font-size: var(--text--medium);
18
- }
19
-
20
- ez-filter-input > input {
21
- text-overflow: ellipsis;
22
- }
23
- .ez-content {
24
- height: 190px;
25
- display: flex;
26
- align-items: center;
27
- justify-content: center;
28
- }