@sankhyalabs/ezui 1.1.4 → 1.1.8

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 (186) hide show
  1. package/README.md +72 -72
  2. package/dist/{ezui/DataUnit-285bec19.js → cjs/DataUnit-28b290cb.js} +382 -369
  3. package/dist/{ezui/index-919090de.js → cjs/RequestMetadata-2cd01e8a.js} +4 -383
  4. package/dist/cjs/ez-action-chip.cjs.entry.js +52 -0
  5. package/dist/cjs/ez-button_14.cjs.entry.js +3341 -0
  6. package/dist/cjs/ez-label-chip.cjs.entry.js +131 -0
  7. package/dist/cjs/ez-modal.cjs.entry.js +115 -0
  8. package/dist/cjs/ez-number-input.cjs.entry.js +248 -0
  9. package/dist/cjs/ez-time-input.cjs.entry.js +180 -0
  10. package/dist/cjs/ezui.cjs.js +19 -0
  11. package/dist/cjs/form-metadata.cjs.entry.js +74 -0
  12. package/dist/cjs/index-9403fe8f.js +1322 -0
  13. package/dist/cjs/index.cjs.js +2 -0
  14. package/dist/cjs/loader.cjs.js +21 -0
  15. package/dist/collection/collection-manifest.json +31 -0
  16. package/dist/collection/components/ez-action-chip/ez-action-chip.css +82 -0
  17. package/dist/collection/components/ez-action-chip/ez-action-chip.js +109 -0
  18. package/dist/collection/components/ez-button/ez-button.css +94 -0
  19. package/dist/collection/components/ez-button/ez-button.js +125 -0
  20. package/dist/collection/components/ez-calendar/ez-calendar.css +210 -0
  21. package/dist/collection/components/ez-calendar/ez-calendar.js +215 -0
  22. package/dist/collection/components/ez-check/ez-check.css +266 -0
  23. package/dist/collection/components/ez-check/ez-check.js +168 -0
  24. package/dist/collection/components/ez-collapsable-box/ez-collapsable-box.css +68 -0
  25. package/dist/collection/components/ez-collapsable-box/ez-collapsable-box.js +108 -0
  26. package/dist/collection/components/ez-combo-box/ez-combo-box-interfaces.js +2 -0
  27. package/dist/collection/components/ez-combo-box/ez-combo-box.css +167 -0
  28. package/dist/collection/components/ez-combo-box/ez-combo-box.js +363 -0
  29. package/dist/collection/components/ez-date-input/ez-date-input.css +39 -0
  30. package/dist/collection/components/ez-date-input/ez-date-input.js +172 -0
  31. package/dist/collection/components/ez-form/ez-form.css +19 -0
  32. package/dist/collection/components/ez-form/ez-form.js +368 -0
  33. package/dist/collection/components/ez-form/store/Form.actions.js +132 -0
  34. package/dist/collection/components/ez-form/store/Form.reducer.js +194 -0
  35. package/dist/collection/components/ez-form/store/Form.selectors.js +44 -0
  36. package/dist/collection/components/ez-form/subcomponents/DataUnit.js +207 -0
  37. package/dist/collection/components/ez-form/subcomponents/FormMetadata.js +16 -0
  38. package/dist/collection/components/ez-form/subcomponents/css/place-holder.css +24 -0
  39. package/dist/collection/components/ez-form/subcomponents/form-metadata.js +173 -0
  40. package/dist/collection/components/ez-form/subcomponents/place-holder.js +14 -0
  41. package/dist/collection/components/ez-form/subcomponents/structure/Field.js +71 -0
  42. package/dist/collection/components/ez-form/subcomponents/structure/FieldSet.js +27 -0
  43. package/dist/collection/components/ez-form/subcomponents/structure/FormSheet.js +40 -0
  44. package/dist/collection/components/ez-form/subcomponents/structure/NavigationBar.js +27 -0
  45. package/dist/collection/components/ez-icon/ez-icon.css +37 -0
  46. package/dist/collection/components/ez-icon/ez-icon.js +56 -0
  47. package/dist/collection/components/ez-label-chip/ez-label-chip.css +117 -0
  48. package/dist/collection/components/ez-label-chip/ez-label-chip.js +276 -0
  49. package/dist/collection/components/ez-modal/ez-modal.css +87 -0
  50. package/dist/collection/components/ez-modal/ez-modal.js +224 -0
  51. package/dist/collection/components/ez-number-input/ez-number-input.css +144 -0
  52. package/dist/collection/components/ez-number-input/ez-number-input.js +465 -0
  53. package/dist/collection/components/ez-popover/ez-popover.css +39 -0
  54. package/dist/collection/components/ez-popover/ez-popover.js +323 -0
  55. package/dist/collection/components/ez-search/ez-search.css +296 -0
  56. package/dist/{ezui/ez-search.entry.js → collection/components/ez-search/ez-search.js} +527 -334
  57. package/dist/collection/components/ez-tabselector/ez-tabselector.css +126 -0
  58. package/dist/{ezui/ez-tabselector.entry.js → collection/components/ez-tabselector/ez-tabselector.js} +283 -209
  59. package/dist/collection/components/ez-text-area/ez-text-area.css +140 -0
  60. package/dist/collection/components/ez-text-area/ez-text-area.js +267 -0
  61. package/dist/collection/components/ez-text-input/ez-text-input.css +170 -0
  62. package/dist/collection/components/ez-text-input/ez-text-input.js +395 -0
  63. package/dist/collection/components/ez-time-input/ez-time-input.css +155 -0
  64. package/dist/collection/components/ez-time-input/ez-time-input.js +326 -0
  65. package/dist/collection/index.js +1 -0
  66. package/dist/collection/servidor.js +101 -0
  67. package/dist/collection/utils/FloatingManager.js +16 -0
  68. package/dist/collection/utils/utils.js +6 -0
  69. package/dist/custom-elements/index.js +5071 -0
  70. package/dist/esm/DataUnit-69e518fa.js +378 -0
  71. package/dist/esm/RequestMetadata-c265c9d5.js +527 -0
  72. package/dist/{ezui → esm}/ez-action-chip.entry.js +42 -42
  73. package/dist/esm/ez-button_14.entry.js +3324 -0
  74. package/dist/{ezui → esm}/ez-label-chip.entry.js +121 -121
  75. package/dist/{ezui → esm}/ez-modal.entry.js +105 -96
  76. package/dist/{ezui → esm}/ez-number-input.entry.js +238 -238
  77. package/dist/{ezui → esm}/ez-time-input.entry.js +170 -170
  78. package/dist/esm/ezui.js +17 -0
  79. package/dist/{ezui → esm}/form-metadata.entry.js +66 -66
  80. package/dist/esm/index-95bb3fd9.js +1293 -0
  81. package/dist/esm/index.js +1 -0
  82. package/dist/esm/loader.js +17 -0
  83. package/dist/esm/polyfills/core-js.js +11 -0
  84. package/dist/esm/polyfills/css-shim.js +1 -0
  85. package/dist/esm/polyfills/dom.js +79 -0
  86. package/dist/esm/polyfills/es5-html-element.js +1 -0
  87. package/dist/esm/polyfills/index.js +34 -0
  88. package/dist/esm/polyfills/system.js +6 -0
  89. package/dist/ezui/ezui.esm.js +1 -122
  90. package/dist/ezui/index.esm.js +0 -1
  91. package/dist/ezui/p-10ef58b3.js +1 -0
  92. package/dist/ezui/p-185c57f4.js +1 -0
  93. package/dist/ezui/p-22b82efb.entry.js +1 -0
  94. package/dist/ezui/p-77fdb4fd.entry.js +1 -0
  95. package/dist/ezui/p-9dfccb16.js +1 -0
  96. package/dist/ezui/p-b0974f4f.entry.js +1 -0
  97. package/dist/ezui/p-db11c600.entry.js +1 -0
  98. package/dist/ezui/p-dd4331b7.entry.js +1 -0
  99. package/dist/ezui/p-f6fd31ab.entry.js +1 -0
  100. package/dist/ezui/p-fa260f22.entry.js +1 -0
  101. package/dist/index.cjs.js +1 -0
  102. package/dist/index.js +1 -0
  103. package/dist/types/components/ez-action-chip/ez-action-chip.d.ts +16 -16
  104. package/dist/types/components/ez-button/ez-button.d.ts +20 -20
  105. package/dist/types/components/ez-calendar/ez-calendar.d.ts +42 -42
  106. package/dist/types/components/ez-check/ez-check.d.ts +32 -32
  107. package/dist/types/components/ez-collapsable-box/ez-collapsable-box.d.ts +18 -18
  108. package/dist/types/components/ez-combo-box/ez-combo-box-interfaces.d.ts +4 -4
  109. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +68 -68
  110. package/dist/types/components/ez-date-input/ez-date-input.d.ts +31 -31
  111. package/dist/types/components/ez-form/ez-form.d.ts +31 -27
  112. package/dist/types/components/ez-form/store/Form.actions.d.ts +111 -104
  113. package/dist/types/components/ez-form/store/Form.reducer.d.ts +20 -11
  114. package/dist/types/components/ez-form/store/Form.selectors.d.ts +14 -13
  115. package/dist/types/components/ez-form/subcomponents/DataUnit.d.ts +55 -48
  116. package/dist/types/components/ez-form/subcomponents/FormMetadata.d.ts +41 -41
  117. package/dist/types/components/ez-form/subcomponents/form-metadata.d.ts +15 -15
  118. package/dist/types/components/ez-form/subcomponents/place-holder.d.ts +3 -3
  119. package/dist/types/components/ez-form/subcomponents/structure/Field.d.ts +10 -10
  120. package/dist/types/components/ez-form/subcomponents/structure/FieldSet.d.ts +12 -12
  121. package/dist/types/components/ez-form/subcomponents/structure/FormSheet.d.ts +13 -13
  122. package/dist/types/components/ez-form/subcomponents/structure/NavigationBar.d.ts +17 -7
  123. package/dist/types/components/ez-icon/ez-icon.d.ts +5 -5
  124. package/dist/types/components/ez-label-chip/ez-label-chip.d.ts +40 -40
  125. package/dist/types/components/ez-modal/ez-modal.d.ts +32 -26
  126. package/dist/types/components/ez-number-input/ez-number-input.d.ts +73 -73
  127. package/dist/types/components/ez-popover/ez-popover.d.ts +52 -52
  128. package/dist/types/components/ez-search/ez-search.d.ts +95 -95
  129. package/dist/types/components/ez-tabselector/ez-tabselector.d.ts +31 -31
  130. package/dist/types/components/ez-text-area/ez-text-area.d.ts +49 -49
  131. package/dist/types/components/ez-text-input/ez-text-input.d.ts +64 -64
  132. package/dist/types/components/ez-time-input/ez-time-input.d.ts +53 -53
  133. package/dist/types/components.d.ts +8 -0
  134. package/dist/types/index.d.ts +1 -1
  135. package/dist/types/utils/utils.d.ts +2 -2
  136. package/loader/cdn.js +3 -0
  137. package/loader/index.cjs.js +3 -0
  138. package/loader/index.d.ts +13 -0
  139. package/loader/index.es2017.js +3 -0
  140. package/loader/index.js +4 -0
  141. package/loader/package.json +10 -0
  142. package/package.json +114 -114
  143. package/react/components.d.ts +22 -0
  144. package/react/components.js +25 -0
  145. package/react/components.js.map +1 -0
  146. package/react/react-component-lib/createComponent.d.ts +10 -0
  147. package/react/react-component-lib/createComponent.js +59 -0
  148. package/react/react-component-lib/createComponent.js.map +1 -0
  149. package/react/react-component-lib/createOverlayComponent.d.ts +20 -0
  150. package/react/react-component-lib/createOverlayComponent.js +89 -0
  151. package/react/react-component-lib/createOverlayComponent.js.map +1 -0
  152. package/react/react-component-lib/index.d.ts +2 -0
  153. package/react/react-component-lib/index.js +3 -0
  154. package/react/react-component-lib/index.js.map +1 -0
  155. package/react/react-component-lib/interfaces.d.ts +29 -0
  156. package/react/react-component-lib/interfaces.js +1 -0
  157. package/react/react-component-lib/interfaces.js.map +1 -0
  158. package/react/react-component-lib/utils/attachProps.d.ts +12 -0
  159. package/react/react-component-lib/utils/attachProps.js +96 -0
  160. package/react/react-component-lib/utils/attachProps.js.map +1 -0
  161. package/react/react-component-lib/utils/case.d.ts +2 -0
  162. package/react/react-component-lib/utils/case.js +7 -0
  163. package/react/react-component-lib/utils/case.js.map +1 -0
  164. package/react/react-component-lib/utils/dev.d.ts +2 -0
  165. package/react/react-component-lib/utils/dev.js +13 -0
  166. package/react/react-component-lib/utils/dev.js.map +1 -0
  167. package/react/react-component-lib/utils/index.d.ts +7 -0
  168. package/react/react-component-lib/utils/index.js +21 -0
  169. package/react/react-component-lib/utils/index.js.map +1 -0
  170. package/dist/ezui/app-globals-0f993ce5.js +0 -3
  171. package/dist/ezui/css-shim-003e9264.js +0 -4
  172. package/dist/ezui/dom-1b195079.js +0 -73
  173. package/dist/ezui/ez-button.entry.js +0 -47
  174. package/dist/ezui/ez-calendar.entry.js +0 -102
  175. package/dist/ezui/ez-check.entry.js +0 -62
  176. package/dist/ezui/ez-collapsable-box.entry.js +0 -32
  177. package/dist/ezui/ez-combo-box.entry.js +0 -181
  178. package/dist/ezui/ez-date-input.entry.js +0 -77
  179. package/dist/ezui/ez-form.entry.js +0 -1907
  180. package/dist/ezui/ez-icon.entry.js +0 -17
  181. package/dist/ezui/ez-popover.entry.js +0 -112
  182. package/dist/ezui/ez-text-area.entry.js +0 -105
  183. package/dist/ezui/ez-text-input.entry.js +0 -202
  184. package/dist/ezui/index-39044be2.js +0 -2832
  185. package/dist/ezui/place-holder.entry.js +0 -15
  186. package/dist/ezui/shadow-css-c1ad5fdc.js +0 -383
@@ -1,334 +1,527 @@
1
- import { r as registerInstance, e as createEvent, h, i as Host, g as getElement } from './index-39044be2.js';
2
-
3
- const ezSearchCss = ":host{--srch--height:42px;--srch--width:100%;--srch__icon--width:48px;--srch--border-radius:var(--border--radius-medium, 12px);--srch--border-radius-small:var(--border--radius-small, 6px);--srch--font-size:var(--text--medium, 14px);--srch--font-family:var(--font-pattern, Arial);--srch--font-weight--large:var(--text-weight--large, 500);--srch--font-weight--medium:var(--text-weight--medium, 400);--srch--space--medium:var(--space--medium, 12px);--srch--space--small:var(--space--small, 6px);--srch--shadow:var(--shadow, 0px 0px 16px 0px rgba(0, 38, 111, .12));--srch--background-color--xlight:var(--background--xlight,#fff);--srch__list-z-index:var(--more-visible, 1);--srch__input--background-color:var(--background--medium, #e0e0e0);--srch__input--border:var(--border--medium, 2px solid);--srch__input--border-color:var(--srch__input--background-color);--srch__input--focus--border-color:var(--color--primary, #008561);--srch__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--srch__input--disabled--color:var(--text--disable, #AFB6C0);--srch__input--error--border-color:#CC2936;--srch__label--color:var(--title--primary, #919191);--srch__message_box--font-size:var(--text--small, 12px);--srch__message_box--info--color:var(--color--success, #22085d);--srch__message_box--error--color:var(--color--error, #FF0000);--srch__list-text--primary:var(--text--primary,#626e82);--srch__list-text--secondary:var(--text--secondary,#a2abb9);--srch__list-height:calc(4px + var(--srch--font-size) + var(--srch--space--medium));display:flex;flex-wrap:wrap;position:relative;width:var(--srch--width)}ez-text-input{--it__input--background-color:var(--srch__input--background-color, #FFFFFF);--it__input--border-color:var(--srch__input--border-color, #DCE0E8)}input{width:100%;box-sizing:border-box;padding:var(--space--medium);height:var(--srch--height);border-radius:var(--srch--border-radius);font-family:var(--srch--font-family);font-size:var(--srch--font-size);border:var(--srch__input--border);border-color:var(--srch__input--border-color);background-color:var(--srch__input--background-color);font-weight:var(--text-weight--large)}input:disabled{background-color:var(--srch__input--disabled--background-color);color:var(--srch__input--disabled--color)}input:focus{outline:none;border-color:var(--srch__input--focus--border-color)}input.icon--left{padding-left:var(--srch__icon--width)}input.icon--right{padding-right:var(--srch__icon--width)}input::placeholder{color:var(--srch__placeholder--color);font-weight:var(--srch__placeholder--font-weight)}input:disabled::placeholder{color:var(--srch__placeholder--disabled--color)}input.hasError{color:inherit;border-color:var(--srch__input--error--border-color)}input.text--right{text-align:right}ez-text-input{--it__input--background-color:var(--srch__input--background-color, #FFFFFF);--it__input--border-color:var(--srch__input--border-color, #DCE0E8)}.message-box{min-height:0;min-width:100%;margin-top:2px;line-height:12px;font-family:var(--srch--font-family);font-size:var(--srch__message_box--font-size);color:var(--srch__message_box--info--color)}.hasError{min-height:16px;color:var(--srch__message_box--error--color)}.input__label{font-size:var(--text--medium);font-weight:var(--text-weight--large);left:var(--space--medium);position:absolute;color:var(--title--primary);top:var(--space--medium);font-family:var(--srch--font-family);-webkit-transition:font-size .3s, top .3s;transition:font-size .3s, top .3s;z-index:var(--visible)}.input__label--floated{font-family:var(--srch--font-family);font-size:var(--text--extra-small);top:var(--space--small);color:var(--text--primary)}.input__label--left{left:var(--srch__icon--width)}.input--with--label{padding-bottom:0}.message-box{min-height:16px;min-width:100%;margin-top:2px;line-height:12px;font-family:var(--srch--font-family);font-size:var(--srch__message_box--font-size);color:var(--srch__message_box--info--color)}.hasError{color:var(--srch__message_box--error--color)}.list-container{z-index:var(--srch__list-z-index);padding:var(--srch--space--small);background:var(--srch--background-color--xlight);border-radius:var(--srch--border-radius);width:100%;overflow:auto;box-sizing:border-box;max-height:calc(4*var(--srch__list-height) + 2*var(--srch--space--small))}li{list-style-type:none;border-radius:var(--srch--border-radius-small);padding:0 var(--srch--space--small);display:flex;justify-content:space-between;align-items:center}li:hover{background-color:var(--background--medium)}.--li__spanlabel{color:var(--srch__list-text--primary);border-radius:var(--srch--border-radius-small);padding:0 var(--srch--space--small);height:var(--srch__list-height);font-weight:var(--srch--font-weight--large);font-family:var(--srch--font-family);line-height:var(--srch__list-height);vertical-align:middle;text-overflow:ellipsis;width:80%;min-width:30px;overflow-x:hidden;text-align:left}.--li__spanlabel--full-width{color:var(--srch__list-text--primary);border-radius:var(--srch--border-radius-small);padding:0 var(--srch--space--small);height:var(--srch__list-height);font-weight:var(--srch--font-weight--large);font-family:var(--srch--font-family);line-height:var(--srch__list-height);vertical-align:middle;text-overflow:ellipsis;width:100%;min-width:30px;overflow-x:hidden;text-align:left}.--li__spanvalue{color:var(--srch__list-text--secondary);border-radius:var(--srch--border-radius-small);padding:0 var(--srch--space--small);height:var(--srch__list-height);font-weight:var(--srch--font-weight--medium);font-family:var(--srch--font-family);line-height:var(--srch__list-height);vertical-align:middle;text-overflow:ellipsis;width:20%;min-width:20px;overflow-x:hidden;text-align:right}.btn-open-search{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-search:disabled{cursor:unset}.btn-open-search::after{content:'';display:flex;background-color:var(--text--primary, #008561);width:22px;height:22px;clip-path:path(\"m 9.4,2.3 c 4.1,0 7.4,3.2 7.4,7.2 0,1.8 -0.7,3.4 -1.8,4.7 l 0.3,0.3 h 0.9 l 5.7,5.6 -1.7,1.7 -5.7,-5.6 V 15.3 L 14.3,15 C 13,16.1 11.3,16.7 9.5,16.7 5.3,16.7 2,13.5 2,9.5 2,5.5 5.3,2.3 9.4,2.3 m 0,2.2 c -2.9,0 -5.1,2.2 -5.1,5 0,2.8 2.3,5 5.1,5 2.8,0 5.1,-2.2 5.1,-5 0,-2.8 -2.2,-5 -5.1,-5 z\")}.btn-open-search:disabled:after{background-color:var(--text--disable, #AFB6C0)}.btn-open-search:enabled:hover::after{background-color:var(--color--primary, #4e4e4e)}.--li--preselected{background-color:var(--background--strong)}";
4
-
5
- ;
6
- ;
7
- const EzSearch = class {
8
- constructor(hostRef) {
9
- registerInstance(this, hostRef);
10
- this.ezChange = createEvent(this, "ezChange", 7);
11
- this._options = [];
12
- this._classSelect = 'list-container--4row';
13
- /**
14
- * Deixa o campo disponível ou não para digitação.
15
- */
16
- this.enabled = true;
17
- /**
18
- * Quantidade máxima de itens guardados no localstorage
19
- */
20
- this.qtdHotItems = 6;
21
- /**
22
- * Ajusta a opção de mostrar o "value" para cada "label". Como default "value" não está presente (showvalue = false)
23
- */
24
- this.showvalue = false;
25
- ///// HOTSEARCH /////
26
- this.buildId = () => {
27
- return btoa(`${this.hotsearchid}:${location.pathname}`);
28
- };
29
- this.getStorageItems = (key) => {
30
- let storageValueStr = localStorage.getItem('hotSearch-ez-search:' + key);
31
- let storageItems = [];
32
- if (storageValueStr !== null) {
33
- storageItems = JSON.parse(storageValueStr);
34
- }
35
- return storageItems;
36
- };
37
- this.orderHotList = (list) => {
38
- return list.sort((a, b) => {
39
- let time1 = new Date(a.dtRecent).getTime();
40
- let time2 = new Date(b.dtRecent).getTime();
41
- let qtd1 = a.qtd;
42
- let qtd2 = b.qtd;
43
- if (time1 < time2)
44
- return -1;
45
- if (time1 > time2)
46
- return 1;
47
- if (qtd1 > qtd2)
48
- return -1;
49
- if (qtd1 < qtd2)
50
- return 1;
51
- return 0;
52
- });
53
- };
54
- this.saveStorageItem = (key, value) => {
55
- if (value == '' || value == undefined)
56
- return;
57
- let storageItem = this.getStorageItems(key);
58
- let element = this.getElement(storageItem, value);
59
- if (element) {
60
- element.qtd++;
61
- element.dtRecent = this.getOnlyDate();
62
- }
63
- else {
64
- if (storageItem.length >= this.qtdHotItems) {
65
- storageItem = this.orderHotList(storageItem);
66
- storageItem.splice(-1, 1);
67
- }
68
- storageItem.push({
69
- description: value,
70
- qtd: 1,
71
- dtRecent: this.getOnlyDate()
72
- });
73
- }
74
- localStorage.setItem('hotSearch-ez-search:' + key, JSON.stringify(storageItem));
75
- return storageItem;
76
- };
77
- this.adjustOptions = (arrayOptions) => {
78
- let optionsTemp = [];
79
- arrayOptions.map(el => {
80
- optionsTemp.push({
81
- value: el.value,
82
- label: el.label,
83
- ajustedValue: el.value === null || el.value === undefined || el.value === '' ? el.label : el.value,
84
- });
85
- });
86
- return optionsTemp;
87
- };
88
- this.sortArrayOptions = (array, propname) => {
89
- const sortedArray = array.sort(function (a, b) {
90
- if (a[propname] < b[propname]) {
91
- return -1;
92
- }
93
- if (a[propname] > b[propname]) {
94
- return 1;
95
- }
96
- return 0;
97
- });
98
- return sortedArray;
99
- };
100
- }
101
- valueChanged() {
102
- var _a;
103
- if (this.value) {
104
- this.ezChange.emit({ value: this.value, label: (_a = this._inputElem) === null || _a === void 0 ? void 0 : _a.value });
105
- let key = this.buildId();
106
- this.saveStorageItem(key, this.value);
107
- }
108
- }
109
- //ajustar ao fim do teste
110
- onInputTeste() {
111
- if (this._inputElem) {
112
- this.handleChange();
113
- }
114
- }
115
- getElement(storageItem, value) {
116
- return storageItem.find(e => e.description === value);
117
- }
118
- getOnlyDate() {
119
- let dt = new Date();
120
- dt.setHours(0);
121
- dt.setMinutes(0);
122
- dt.setSeconds(0);
123
- dt.setUTCMilliseconds(0);
124
- return dt.toString();
125
- }
126
- onInputChange(ev) {
127
- const el = ev.target;
128
- let key = this.buildId();
129
- this.saveStorageItem(key, el.value);
130
- }
131
- buildDataList() {
132
- try {
133
- if (this.hotsearchid === undefined) {
134
- return;
135
- }
136
- let key = this.buildId();
137
- let optionsArray = [];
138
- this._options = [];
139
- if (this.getStorageItems(key).length > 0) {
140
- this.orderHotList(this.getStorageItems(key))
141
- .forEach((el) => {
142
- optionsArray.push({
143
- value: el.description,
144
- label: el.description,
145
- });
146
- });
147
- this._options = [{ value: '', label: '' }].concat(optionsArray);
148
- this.buildOptions();
149
- }
150
- }
151
- catch (err) {
152
- this.errormessage = err;
153
- }
154
- }
155
- ///// EVENT HANDLERS
156
- buildItem(opt, index) {
157
- const className = index === this._preSelection ? "--li--preselected" : "";
158
- return h("li", { class: className, key: opt.ajustedValue, accessKey: opt.label.toString(), id: 'item_' + opt.ajustedValue, onMouseDown: (ev) => this.handleSetValueByOption(ev) }, this.highlightMatch(opt.label), this.showvalue ? h("span", { title: opt.ajustedValue, class: '--li__spanvalue' }, opt.ajustedValue) : null);
159
- }
160
- highlightMatch(label) {
161
- var _a;
162
- const spanClassName = this.showvalue ? '--li__spanlabel' : '--li__spanlabel--full-width';
163
- if ((_a = this._inputElem) === null || _a === void 0 ? void 0 : _a.value) {
164
- const criteriaLength = this._inputElem.value.length;
165
- const matchStart = label.toUpperCase().indexOf(this._inputElem.value);
166
- if (matchStart > -1) {
167
- const strLabelStart = label.substr(0, matchStart);
168
- const strLabelEnd = label.substr(matchStart + criteriaLength);
169
- const strMatch = label.substr(matchStart, criteriaLength);
170
- return (h("span", { class: spanClassName }, strLabelStart, h("strong", null, strMatch), strLabelEnd));
171
- }
172
- }
173
- return (h("span", { class: spanClassName }, label));
174
- }
175
- showOptions() {
176
- if (this.enabled) {
177
- const top = this._inputElem.errormessage ? '0px' : '-17px';
178
- this._popover.show(top);
179
- }
180
- }
181
- nextOption() {
182
- this.showOptions();
183
- this._preSelection = this._preSelection === undefined ? 0 : Math.min(this._preSelection + 1, this._visibleOptions.length - 1);
184
- this.scrollToOption(this._visibleOptions[this._preSelection]);
185
- }
186
- previousOption() {
187
- this._preSelection = this._preSelection === undefined ? 0 : Math.max(this._preSelection - 1, 0);
188
- this.scrollToOption(this._visibleOptions[this._preSelection]);
189
- }
190
- scrollToOption(opt) {
191
- const liElem = this.el.shadowRoot.querySelector(`li#item_${opt.value}`);
192
- if (liElem) {
193
- const parent = liElem.parentElement;
194
- const parentRect = parent.getBoundingClientRect();
195
- const itemRect = liElem.getBoundingClientRect();
196
- if (itemRect.bottom > parentRect.bottom || itemRect.top < parentRect.top) {
197
- liElem.scrollIntoView();
198
- }
199
- }
200
- }
201
- selectCurrentOption() {
202
- if (this._preSelection !== undefined) {
203
- this.selectOption(this._visibleOptions[this._preSelection]);
204
- this._preSelection = undefined;
205
- }
206
- }
207
- selectOption(opt) {
208
- this._popover.hide();
209
- this.value = opt === null || opt === void 0 ? void 0 : opt.ajustedValue;
210
- this._inputElem.value = opt.value;
211
- //Definir com a equipe de design se vai ser utilizado dessa forma.
212
- // this._inputElem.value = opt.value? opt.value + " - "+ opt?.label: '';
213
- }
214
- keyDownHandler(event) {
215
- switch (event.key) {
216
- case "ArrowDown":
217
- this.nextOption();
218
- break;
219
- case "ArrowUp":
220
- this.previousOption();
221
- break;
222
- case "Enter":
223
- this.selectCurrentOption();
224
- break;
225
- }
226
- event.stopPropagation();
227
- }
228
- handleSetValueByOption(ev) {
229
- this._popover.hide();
230
- const spanEl = ev.target;
231
- const sourceElement = ev.composedPath()[0];
232
- let li;
233
- if (sourceElement.tagName === 'SPAN') {
234
- li = spanEl.parentNode;
235
- }
236
- else {
237
- li = spanEl.parentNode.parentNode;
238
- }
239
- this.value = li.id.split('_')[1];
240
- this._inputElem.value = li.accessKey;
241
- this.ezChange.emit();
242
- }
243
- handleChange() {
244
- if (this._changeDeboucing) {
245
- window.clearTimeout(this._changeDeboucing);
246
- }
247
- this._changeDeboucing = window.setTimeout(() => {
248
- var _a, _b;
249
- if (((_b = (_a = this._inputElem) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.length) <= 0) {
250
- return;
251
- }
252
- /* save tip on localStorage */
253
- let key = this.buildId();
254
- this.saveStorageItem(key, this._inputElem.value);
255
- /* load data */
256
- if (this.loadexecutor) {
257
- this._loadDataFunction(this._inputElem.value, (serverData) => { this.populateOptions(serverData); });
258
- }
259
- }, 200);
260
- }
261
- normalizeResult(data) {
262
- let options = [];
263
- if (data instanceof Array) {
264
- options = data;
265
- }
266
- else {
267
- if (data instanceof Object) {
268
- for (var key in data) {
269
- let newOption = { value: '', label: '' };
270
- newOption.value = key;
271
- newOption.label = data[key];
272
- options.push(newOption);
273
- }
274
- }
275
- }
276
- this._options = [{ value: '', label: '' }].concat(options);
277
- this.buildOptions();
278
- }
279
- populateOptions(serverData) {
280
- if (serverData instanceof Promise) {
281
- serverData.then(this.normalizeResult);
282
- }
283
- else {
284
- this.normalizeResult(serverData);
285
- }
286
- }
287
- buildOptions() {
288
- var _a;
289
- this._visibleOptions = [];
290
- this._visibleOptions = this.adjustOptions(this._options);
291
- this._visibleOptions = this.sortArrayOptions(this._visibleOptions, 'label');
292
- if (this._visibleOptions.length > 0) {
293
- (_a = this._divElem) === null || _a === void 0 ? void 0 : _a.classList.add(this._classSelect);
294
- this.showOptions();
295
- }
296
- }
297
- setClassForSpanLabel() {
298
- if (!this.showvalue) {
299
- return '--li__spanlabel--full-width';
300
- }
301
- else {
302
- return '--li__spanlabel';
303
- }
304
- }
305
- handleFocus() {
306
- if (this._inputElem && (!this._inputElem.value || this._inputElem.value.length === 0)) {
307
- this.buildDataList();
308
- }
309
- }
310
- parseExecutor(executor) {
311
- if (executor) {
312
- return executor instanceof Function ? executor : eval(executor);
313
- }
314
- return null;
315
- }
316
- componentDidLoad() {
317
- if (this.value && this.value.length > 0) {
318
- this._inputElem.value = this.value;
319
- }
320
- this._loadDataFunction = this.parseExecutor(this.loadexecutor);
321
- }
322
- render() {
323
- var _a;
324
- return (h(Host, null, h("ez-text-input", { ref: (el) => { this._inputElem = el; }, label: this.label, enabled: this.enabled, onFocus: () => { this.handleFocus(); }, onInput: () => { this.handleChange(); }, onKeyDown: event => this.keyDownHandler(event), errormessage: this.errormessage }, h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-search", onClick: () => { alert("Esta ação irá abrir o PopUp!"); }, slot: "leftIcon" })), h("ez-popover", { boxwidth: '100%', ref: el => this._popover = el }, h("div", { class: 'list-container', ref: (el) => this._divElem = el }, (_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.map((opt, index) => this.buildItem(opt, index))))));
325
- }
326
- ;
327
- get el() { return getElement(this); }
328
- static get watchers() { return {
329
- "value": ["valueChanged"]
330
- }; }
331
- };
332
- EzSearch.style = ezSearchCss;
333
-
334
- export { EzSearch as ez_search };
1
+ import { Component, Element, Event, h, Host, Method, Prop, State, Watch } from '@stencil/core';
2
+ ;
3
+ ;
4
+ export class EzSearch {
5
+ constructor() {
6
+ this._options = [];
7
+ this._classSelect = 'list-container--4row';
8
+ /**
9
+ * Deixa o campo disponível ou não para digitação.
10
+ */
11
+ this.enabled = true;
12
+ /**
13
+ * Quantidade máxima de itens guardados no localstorage
14
+ */
15
+ this.qtdHotItems = 6;
16
+ /**
17
+ * Ajusta a opção de mostrar o "value" para cada "label". Como default "value" não está presente (showvalue = false)
18
+ */
19
+ this.showvalue = false;
20
+ ///// HOTSEARCH /////
21
+ this.buildId = () => {
22
+ return btoa(`${this.hotsearchid}:${location.pathname}`);
23
+ };
24
+ this.getStorageItems = (key) => {
25
+ let storageValueStr = localStorage.getItem('hotSearch-ez-search:' + key);
26
+ let storageItems = [];
27
+ if (storageValueStr !== null) {
28
+ storageItems = JSON.parse(storageValueStr);
29
+ }
30
+ return storageItems;
31
+ };
32
+ this.orderHotList = (list) => {
33
+ return list.sort((a, b) => {
34
+ let time1 = new Date(a.dtRecent).getTime();
35
+ let time2 = new Date(b.dtRecent).getTime();
36
+ let qtd1 = a.qtd;
37
+ let qtd2 = b.qtd;
38
+ if (time1 < time2)
39
+ return -1;
40
+ if (time1 > time2)
41
+ return 1;
42
+ if (qtd1 > qtd2)
43
+ return -1;
44
+ if (qtd1 < qtd2)
45
+ return 1;
46
+ return 0;
47
+ });
48
+ };
49
+ this.saveStorageItem = (key, value) => {
50
+ if (value == '' || value == undefined)
51
+ return;
52
+ let storageItem = this.getStorageItems(key);
53
+ let element = this.getElement(storageItem, value);
54
+ if (element) {
55
+ element.qtd++;
56
+ element.dtRecent = this.getOnlyDate();
57
+ }
58
+ else {
59
+ if (storageItem.length >= this.qtdHotItems) {
60
+ storageItem = this.orderHotList(storageItem);
61
+ storageItem.splice(-1, 1);
62
+ }
63
+ storageItem.push({
64
+ description: value,
65
+ qtd: 1,
66
+ dtRecent: this.getOnlyDate()
67
+ });
68
+ }
69
+ localStorage.setItem('hotSearch-ez-search:' + key, JSON.stringify(storageItem));
70
+ return storageItem;
71
+ };
72
+ this.adjustOptions = (arrayOptions) => {
73
+ let optionsTemp = [];
74
+ arrayOptions.map(el => {
75
+ optionsTemp.push({
76
+ value: el.value,
77
+ label: el.label,
78
+ ajustedValue: el.value === null || el.value === undefined || el.value === '' ? el.label : el.value,
79
+ });
80
+ });
81
+ return optionsTemp;
82
+ };
83
+ this.sortArrayOptions = (array, propname) => {
84
+ const sortedArray = array.sort(function (a, b) {
85
+ if (a[propname] < b[propname]) {
86
+ return -1;
87
+ }
88
+ if (a[propname] > b[propname]) {
89
+ return 1;
90
+ }
91
+ return 0;
92
+ });
93
+ return sortedArray;
94
+ };
95
+ }
96
+ valueChanged() {
97
+ var _a;
98
+ if (this.value) {
99
+ this.ezChange.emit({ value: this.value, label: (_a = this._inputElem) === null || _a === void 0 ? void 0 : _a.value });
100
+ let key = this.buildId();
101
+ this.saveStorageItem(key, this.value);
102
+ }
103
+ }
104
+ //ajustar ao fim do teste
105
+ onInputTeste() {
106
+ if (this._inputElem) {
107
+ this.handleChange();
108
+ }
109
+ }
110
+ getElement(storageItem, value) {
111
+ return storageItem.find(e => e.description === value);
112
+ }
113
+ getOnlyDate() {
114
+ let dt = new Date();
115
+ dt.setHours(0);
116
+ dt.setMinutes(0);
117
+ dt.setSeconds(0);
118
+ dt.setUTCMilliseconds(0);
119
+ return dt.toString();
120
+ }
121
+ onInputChange(ev) {
122
+ const el = ev.target;
123
+ let key = this.buildId();
124
+ this.saveStorageItem(key, el.value);
125
+ }
126
+ buildDataList() {
127
+ try {
128
+ if (this.hotsearchid === undefined) {
129
+ return;
130
+ }
131
+ let key = this.buildId();
132
+ let optionsArray = [];
133
+ this._options = [];
134
+ if (this.getStorageItems(key).length > 0) {
135
+ this.orderHotList(this.getStorageItems(key))
136
+ .forEach((el) => {
137
+ optionsArray.push({
138
+ value: el.description,
139
+ label: el.description,
140
+ });
141
+ });
142
+ this._options = [{ value: '', label: '' }].concat(optionsArray);
143
+ this.buildOptions();
144
+ }
145
+ }
146
+ catch (err) {
147
+ this.errormessage = err;
148
+ }
149
+ }
150
+ ///// EVENT HANDLERS
151
+ buildItem(opt, index) {
152
+ const className = index === this._preSelection ? "--li--preselected" : "";
153
+ return h("li", { class: className, key: opt.ajustedValue, accessKey: opt.label.toString(), id: 'item_' + opt.ajustedValue, onMouseDown: (ev) => this.handleSetValueByOption(ev) },
154
+ this.highlightMatch(opt.label),
155
+ this.showvalue ? h("span", { title: opt.ajustedValue, class: '--li__spanvalue' }, opt.ajustedValue) : null);
156
+ }
157
+ highlightMatch(label) {
158
+ var _a;
159
+ const spanClassName = this.showvalue ? '--li__spanlabel' : '--li__spanlabel--full-width';
160
+ if ((_a = this._inputElem) === null || _a === void 0 ? void 0 : _a.value) {
161
+ const criteriaLength = this._inputElem.value.length;
162
+ const matchStart = label.toUpperCase().indexOf(this._inputElem.value);
163
+ if (matchStart > -1) {
164
+ const strLabelStart = label.substr(0, matchStart);
165
+ const strLabelEnd = label.substr(matchStart + criteriaLength);
166
+ const strMatch = label.substr(matchStart, criteriaLength);
167
+ return (h("span", { class: spanClassName },
168
+ strLabelStart,
169
+ h("strong", null, strMatch),
170
+ strLabelEnd));
171
+ }
172
+ }
173
+ return (h("span", { class: spanClassName }, label));
174
+ }
175
+ showOptions() {
176
+ if (this.enabled) {
177
+ const top = this._inputElem.errormessage ? '0px' : '-17px';
178
+ this._popover.show(top);
179
+ }
180
+ }
181
+ nextOption() {
182
+ this.showOptions();
183
+ this._preSelection = this._preSelection === undefined ? 0 : Math.min(this._preSelection + 1, this._visibleOptions.length - 1);
184
+ this.scrollToOption(this._visibleOptions[this._preSelection]);
185
+ }
186
+ previousOption() {
187
+ this._preSelection = this._preSelection === undefined ? 0 : Math.max(this._preSelection - 1, 0);
188
+ this.scrollToOption(this._visibleOptions[this._preSelection]);
189
+ }
190
+ scrollToOption(opt) {
191
+ const liElem = this.el.shadowRoot.querySelector(`li#item_${opt.value}`);
192
+ if (liElem) {
193
+ const parent = liElem.parentElement;
194
+ const parentRect = parent.getBoundingClientRect();
195
+ const itemRect = liElem.getBoundingClientRect();
196
+ if (itemRect.bottom > parentRect.bottom || itemRect.top < parentRect.top) {
197
+ liElem.scrollIntoView();
198
+ }
199
+ }
200
+ }
201
+ selectCurrentOption() {
202
+ if (this._preSelection !== undefined) {
203
+ this.selectOption(this._visibleOptions[this._preSelection]);
204
+ this._preSelection = undefined;
205
+ }
206
+ }
207
+ selectOption(opt) {
208
+ this._popover.hide();
209
+ this.value = opt === null || opt === void 0 ? void 0 : opt.ajustedValue;
210
+ this._inputElem.value = opt.value;
211
+ //Definir com a equipe de design se vai ser utilizado dessa forma.
212
+ // this._inputElem.value = opt.value? opt.value + " - "+ opt?.label: '';
213
+ }
214
+ keyDownHandler(event) {
215
+ switch (event.key) {
216
+ case "ArrowDown":
217
+ this.nextOption();
218
+ break;
219
+ case "ArrowUp":
220
+ this.previousOption();
221
+ break;
222
+ case "Enter":
223
+ this.selectCurrentOption();
224
+ break;
225
+ }
226
+ event.stopPropagation();
227
+ }
228
+ handleSetValueByOption(ev) {
229
+ this._popover.hide();
230
+ const spanEl = ev.target;
231
+ const sourceElement = ev.composedPath()[0];
232
+ let li;
233
+ if (sourceElement.tagName === 'SPAN') {
234
+ li = spanEl.parentNode;
235
+ }
236
+ else {
237
+ li = spanEl.parentNode.parentNode;
238
+ }
239
+ this.value = li.id.split('_')[1];
240
+ this._inputElem.value = li.accessKey;
241
+ this.ezChange.emit();
242
+ }
243
+ handleChange() {
244
+ if (this._changeDeboucing) {
245
+ window.clearTimeout(this._changeDeboucing);
246
+ }
247
+ this._changeDeboucing = window.setTimeout(() => {
248
+ var _a, _b;
249
+ if (((_b = (_a = this._inputElem) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.length) <= 0) {
250
+ return;
251
+ }
252
+ /* save tip on localStorage */
253
+ let key = this.buildId();
254
+ this.saveStorageItem(key, this._inputElem.value);
255
+ /* load data */
256
+ if (this.loadexecutor) {
257
+ this._loadDataFunction(this._inputElem.value, (serverData) => { this.populateOptions(serverData); });
258
+ }
259
+ }, 200);
260
+ }
261
+ normalizeResult(data) {
262
+ let options = [];
263
+ if (data instanceof Array) {
264
+ options = data;
265
+ }
266
+ else {
267
+ if (data instanceof Object) {
268
+ for (var key in data) {
269
+ let newOption = { value: '', label: '' };
270
+ newOption.value = key;
271
+ newOption.label = data[key];
272
+ options.push(newOption);
273
+ }
274
+ }
275
+ }
276
+ this._options = [{ value: '', label: '' }].concat(options);
277
+ this.buildOptions();
278
+ }
279
+ populateOptions(serverData) {
280
+ if (serverData instanceof Promise) {
281
+ serverData.then(this.normalizeResult);
282
+ }
283
+ else {
284
+ this.normalizeResult(serverData);
285
+ }
286
+ }
287
+ buildOptions() {
288
+ var _a;
289
+ this._visibleOptions = [];
290
+ this._visibleOptions = this.adjustOptions(this._options);
291
+ this._visibleOptions = this.sortArrayOptions(this._visibleOptions, 'label');
292
+ if (this._visibleOptions.length > 0) {
293
+ (_a = this._divElem) === null || _a === void 0 ? void 0 : _a.classList.add(this._classSelect);
294
+ this.showOptions();
295
+ }
296
+ }
297
+ setClassForSpanLabel() {
298
+ if (!this.showvalue) {
299
+ return '--li__spanlabel--full-width';
300
+ }
301
+ else {
302
+ return '--li__spanlabel';
303
+ }
304
+ }
305
+ handleFocus() {
306
+ if (this._inputElem && (!this._inputElem.value || this._inputElem.value.length === 0)) {
307
+ this.buildDataList();
308
+ }
309
+ }
310
+ parseExecutor(executor) {
311
+ if (executor) {
312
+ return executor instanceof Function ? executor : eval(executor);
313
+ }
314
+ return null;
315
+ }
316
+ componentDidLoad() {
317
+ if (this.value && this.value.length > 0) {
318
+ this._inputElem.value = this.value;
319
+ }
320
+ this._loadDataFunction = this.parseExecutor(this.loadexecutor);
321
+ }
322
+ render() {
323
+ var _a;
324
+ return (h(Host, null,
325
+ h("ez-text-input", { ref: (el) => { this._inputElem = el; }, label: this.label, enabled: this.enabled, onFocus: () => { this.handleFocus(); }, onInput: () => { this.handleChange(); }, onKeyDown: event => this.keyDownHandler(event), errormessage: this.errormessage },
326
+ h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-search", onClick: () => { alert("Esta ação irá abrir o PopUp!"); }, slot: "leftIcon" })),
327
+ h("ez-popover", { boxwidth: '100%', ref: el => this._popover = el },
328
+ h("div", { class: 'list-container', ref: (el) => this._divElem = el }, (_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.map((opt, index) => this.buildItem(opt, index))))));
329
+ }
330
+ ;
331
+ static get is() { return "ez-search"; }
332
+ static get encapsulation() { return "shadow"; }
333
+ static get originalStyleUrls() { return {
334
+ "$": ["ez-search.css"]
335
+ }; }
336
+ static get styleUrls() { return {
337
+ "$": ["ez-search.css"]
338
+ }; }
339
+ static get properties() { return {
340
+ "value": {
341
+ "type": "string",
342
+ "mutable": true,
343
+ "complexType": {
344
+ "original": "string",
345
+ "resolved": "string",
346
+ "references": {}
347
+ },
348
+ "required": false,
349
+ "optional": false,
350
+ "docs": {
351
+ "tags": [],
352
+ "text": "C\u00F3digo do registro selecionado"
353
+ },
354
+ "attribute": "value",
355
+ "reflect": true
356
+ },
357
+ "label": {
358
+ "type": "string",
359
+ "mutable": true,
360
+ "complexType": {
361
+ "original": "string",
362
+ "resolved": "string",
363
+ "references": {}
364
+ },
365
+ "required": false,
366
+ "optional": false,
367
+ "docs": {
368
+ "tags": [],
369
+ "text": "Label \u00E9 o t\u00EDtulo do campo"
370
+ },
371
+ "attribute": "label",
372
+ "reflect": true
373
+ },
374
+ "enabled": {
375
+ "type": "boolean",
376
+ "mutable": true,
377
+ "complexType": {
378
+ "original": "boolean",
379
+ "resolved": "boolean",
380
+ "references": {}
381
+ },
382
+ "required": false,
383
+ "optional": false,
384
+ "docs": {
385
+ "tags": [],
386
+ "text": "Deixa o campo dispon\u00EDvel ou n\u00E3o para digita\u00E7\u00E3o."
387
+ },
388
+ "attribute": "enabled",
389
+ "reflect": true,
390
+ "defaultValue": "true"
391
+ },
392
+ "qtdHotItems": {
393
+ "type": "number",
394
+ "mutable": false,
395
+ "complexType": {
396
+ "original": "number",
397
+ "resolved": "number",
398
+ "references": {}
399
+ },
400
+ "required": false,
401
+ "optional": false,
402
+ "docs": {
403
+ "tags": [],
404
+ "text": "Quantidade m\u00E1xima de itens guardados no localstorage"
405
+ },
406
+ "attribute": "qtd-hot-items",
407
+ "reflect": true,
408
+ "defaultValue": "6"
409
+ },
410
+ "showvalue": {
411
+ "type": "boolean",
412
+ "mutable": false,
413
+ "complexType": {
414
+ "original": "boolean",
415
+ "resolved": "boolean",
416
+ "references": {}
417
+ },
418
+ "required": false,
419
+ "optional": false,
420
+ "docs": {
421
+ "tags": [],
422
+ "text": "Ajusta a op\u00E7\u00E3o de mostrar o \"value\" para cada \"label\". Como default \"value\" n\u00E3o est\u00E1 presente (showvalue = false)"
423
+ },
424
+ "attribute": "showvalue",
425
+ "reflect": true,
426
+ "defaultValue": "false"
427
+ },
428
+ "errormessage": {
429
+ "type": "string",
430
+ "mutable": true,
431
+ "complexType": {
432
+ "original": "string",
433
+ "resolved": "string",
434
+ "references": {}
435
+ },
436
+ "required": false,
437
+ "optional": false,
438
+ "docs": {
439
+ "tags": [],
440
+ "text": "Quando h\u00E1 um problema de valida\u00E7\u00E3o, serve como orienta\u00E7\u00E3o ao usu\u00E1rio"
441
+ },
442
+ "attribute": "errormessage",
443
+ "reflect": true
444
+ },
445
+ "loadexecutor": {
446
+ "type": "string",
447
+ "mutable": false,
448
+ "complexType": {
449
+ "original": "string | Function",
450
+ "resolved": "Function | string",
451
+ "references": {
452
+ "Function": {
453
+ "location": "global"
454
+ }
455
+ }
456
+ },
457
+ "required": false,
458
+ "optional": false,
459
+ "docs": {
460
+ "tags": [],
461
+ "text": "Quando h\u00E1 um problema de valida\u00E7\u00E3o, serve como orienta\u00E7\u00E3o ao usu\u00E1rio"
462
+ },
463
+ "attribute": "loadexecutor",
464
+ "reflect": false
465
+ },
466
+ "hotsearchid": {
467
+ "type": "string",
468
+ "mutable": false,
469
+ "complexType": {
470
+ "original": "string",
471
+ "resolved": "string",
472
+ "references": {}
473
+ },
474
+ "required": false,
475
+ "optional": false,
476
+ "docs": {
477
+ "tags": [],
478
+ "text": "Define o identificador \u00FAnico do hotSearch, caso esta propriedade n\u00E3o seja preenchida, o hotSearch n\u00E3o funcionar\u00E1."
479
+ },
480
+ "attribute": "hotsearchid",
481
+ "reflect": false
482
+ }
483
+ }; }
484
+ static get states() { return {
485
+ "_preSelection": {},
486
+ "_visibleOptions": {}
487
+ }; }
488
+ static get events() { return [{
489
+ "method": "ezChange",
490
+ "name": "ezChange",
491
+ "bubbles": true,
492
+ "cancelable": true,
493
+ "composed": true,
494
+ "docs": {
495
+ "tags": [],
496
+ "text": "Este evento emite o c\u00F3digo do registro selecionado"
497
+ },
498
+ "complexType": {
499
+ "original": "OptionsPesquisa",
500
+ "resolved": "OptionsPesquisa",
501
+ "references": {
502
+ "OptionsPesquisa": {
503
+ "location": "local"
504
+ }
505
+ }
506
+ }
507
+ }]; }
508
+ static get methods() { return {
509
+ "onInputTeste": {
510
+ "complexType": {
511
+ "signature": "() => Promise<void>",
512
+ "parameters": [],
513
+ "references": {},
514
+ "return": "Promise<void>"
515
+ },
516
+ "docs": {
517
+ "text": "",
518
+ "tags": []
519
+ }
520
+ }
521
+ }; }
522
+ static get elementRef() { return "el"; }
523
+ static get watchers() { return [{
524
+ "propName": "value",
525
+ "methodName": "valueChanged"
526
+ }]; }
527
+ }