bromcom-ui 2.10.1-rc.1 → 2.10.1-rc.10

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 (245) hide show
  1. package/dist/bromcom-ui/bromcom-ui.css +1 -1
  2. package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
  3. package/dist/bromcom-ui/p-000670b6.js +5 -0
  4. package/dist/bromcom-ui/{p-5ca4aa84.entry.js → p-073d177e.entry.js} +1 -1
  5. package/dist/bromcom-ui/{p-39a40a6e.entry.js → p-07e9b5e7.entry.js} +1 -1
  6. package/dist/bromcom-ui/p-0fc73cca.entry.js +5 -0
  7. package/dist/bromcom-ui/{p-09699c4d.entry.js → p-16450a8b.entry.js} +1 -1
  8. package/dist/bromcom-ui/{p-be434461.entry.js → p-175eb1c7.entry.js} +1 -1
  9. package/dist/bromcom-ui/{p-0b820f78.entry.js → p-17c0a72a.entry.js} +1 -1
  10. package/dist/bromcom-ui/{p-0325e8a4.entry.js → p-17eb0140.entry.js} +1 -1
  11. package/dist/bromcom-ui/{p-3f39982f.entry.js → p-18d28737.entry.js} +1 -1
  12. package/dist/bromcom-ui/{p-a42cc789.entry.js → p-1f5ca41b.entry.js} +1 -1
  13. package/dist/bromcom-ui/{p-a839a0e5.entry.js → p-21cb3cfe.entry.js} +1 -1
  14. package/dist/bromcom-ui/{p-0b316c6f.entry.js → p-23eb79ac.entry.js} +1 -1
  15. package/dist/bromcom-ui/{p-b013cff9.entry.js → p-2d965b60.entry.js} +1 -1
  16. package/dist/bromcom-ui/p-32d93221.entry.js +21 -0
  17. package/dist/bromcom-ui/{p-fb597d84.entry.js → p-33513345.entry.js} +1 -1
  18. package/dist/bromcom-ui/{p-0fe106fc.entry.js → p-3b5c36e8.entry.js} +1 -1
  19. package/dist/bromcom-ui/{p-7f09901d.entry.js → p-3f127ea5.entry.js} +1 -1
  20. package/dist/bromcom-ui/{p-3756f541.entry.js → p-424b7562.entry.js} +1 -1
  21. package/dist/bromcom-ui/{p-483b4ba8.entry.js → p-43a1f84c.entry.js} +1 -1
  22. package/dist/bromcom-ui/{p-0973538a.entry.js → p-4e436468.entry.js} +1 -1
  23. package/dist/bromcom-ui/{p-ea2ce157.js → p-52b7fc24.js} +1 -1
  24. package/dist/bromcom-ui/{p-d89b7e22.entry.js → p-56187d14.entry.js} +1 -1
  25. package/dist/bromcom-ui/{p-bec8a936.entry.js → p-58d5775f.entry.js} +1 -1
  26. package/dist/bromcom-ui/{p-f1dbd96d.entry.js → p-594953e7.entry.js} +1 -1
  27. package/dist/bromcom-ui/{p-62d178e3.entry.js → p-5b96272e.entry.js} +1 -1
  28. package/dist/bromcom-ui/{p-14c32a34.entry.js → p-5bf620b2.entry.js} +1 -1
  29. package/dist/bromcom-ui/{p-e38c4c3a.entry.js → p-5fc49f6f.entry.js} +1 -1
  30. package/dist/bromcom-ui/{p-3b41df22.entry.js → p-60a12878.entry.js} +1 -1
  31. package/dist/bromcom-ui/{p-d06f5291.js → p-61314a43.js} +1 -1
  32. package/dist/bromcom-ui/{p-1708a5ec.entry.js → p-6153f889.entry.js} +1 -1
  33. package/dist/bromcom-ui/{p-551058cd.entry.js → p-643a09b4.entry.js} +1 -1
  34. package/dist/bromcom-ui/p-64999c43.entry.js +5 -0
  35. package/dist/bromcom-ui/{p-015d19dd.entry.js → p-79712823.entry.js} +1 -1
  36. package/dist/bromcom-ui/{p-646cf63c.entry.js → p-7e2da99e.entry.js} +1 -1
  37. package/dist/bromcom-ui/{p-a04aab3c.entry.js → p-841f2b60.entry.js} +1 -1
  38. package/dist/bromcom-ui/{p-8d43aa14.entry.js → p-8c3a6509.entry.js} +1 -1
  39. package/dist/bromcom-ui/p-8c610886.js +5 -0
  40. package/dist/bromcom-ui/{p-d7538ba4.entry.js → p-8e772077.entry.js} +1 -1
  41. package/dist/bromcom-ui/{p-795d2f76.entry.js → p-8fbdb72f.entry.js} +1 -1
  42. package/dist/bromcom-ui/{p-b3b59bc3.entry.js → p-910c935f.entry.js} +1 -1
  43. package/dist/bromcom-ui/{p-55291cc5.entry.js → p-9ac757e9.entry.js} +1 -1
  44. package/dist/bromcom-ui/{p-77eb2287.entry.js → p-9da1d897.entry.js} +1 -1
  45. package/dist/bromcom-ui/{p-c566b3a0.entry.js → p-9f1e6daa.entry.js} +1 -1
  46. package/dist/bromcom-ui/{p-c1b167a3.js → p-a1477028.js} +1 -1
  47. package/dist/bromcom-ui/{p-9a41b688.js → p-a58b2664.js} +1 -1
  48. package/dist/bromcom-ui/{p-56f7477e.entry.js → p-a835bff0.entry.js} +1 -1
  49. package/dist/bromcom-ui/{p-9889a4ed.entry.js → p-a889681e.entry.js} +1 -1
  50. package/dist/bromcom-ui/{p-dac3117a.entry.js → p-aab72ea1.entry.js} +1 -1
  51. package/dist/bromcom-ui/p-abc44b58.entry.js +5 -0
  52. package/dist/bromcom-ui/{p-16848643.entry.js → p-afde516e.entry.js} +1 -1
  53. package/dist/bromcom-ui/{p-571dca86.entry.js → p-c977ed98.entry.js} +1 -1
  54. package/dist/bromcom-ui/{p-a1f9e7d4.entry.js → p-cfd52d5f.entry.js} +1 -1
  55. package/dist/bromcom-ui/{p-e11ab4ed.entry.js → p-da5fdda2.entry.js} +1 -1
  56. package/dist/bromcom-ui/{p-3d142f76.entry.js → p-e19a8e73.entry.js} +1 -1
  57. package/dist/bromcom-ui/{p-e131b27f.js → p-e2aaaece.js} +1 -1
  58. package/dist/bromcom-ui/{p-29614b49.entry.js → p-e6faa2bb.entry.js} +1 -1
  59. package/dist/bromcom-ui/{p-673f7ee8.entry.js → p-ec36f5a0.entry.js} +1 -1
  60. package/dist/bromcom-ui/{p-cf0c0700.entry.js → p-ec992ac3.entry.js} +1 -1
  61. package/dist/bromcom-ui/{p-cd04678a.entry.js → p-ecd8d70f.entry.js} +1 -1
  62. package/dist/bromcom-ui/{p-cf171578.js → p-edbdd7dd.js} +1 -1
  63. package/dist/bromcom-ui/{p-24710a65.entry.js → p-f077a1d7.entry.js} +1 -1
  64. package/dist/bromcom-ui/{p-2da72d6a.entry.js → p-f2776268.entry.js} +1 -1
  65. package/dist/bromcom-ui/{p-813ec92d.js → p-f83b3048.js} +1 -1
  66. package/dist/bromcom-ui/{p-f3431dc8.js → p-fed84581.js} +1 -1
  67. package/dist/cjs/bcm-accordion.cjs.entry.js +2 -2
  68. package/dist/cjs/bcm-alert.cjs.entry.js +2 -2
  69. package/dist/cjs/bcm-attendance.cjs.entry.js +2 -2
  70. package/dist/cjs/bcm-avatar_2.cjs.entry.js +4 -4
  71. package/dist/cjs/bcm-breadcrumb.cjs.entry.js +2 -2
  72. package/dist/cjs/bcm-button-group.cjs.entry.js +2 -2
  73. package/dist/cjs/{bcm-button_10.cjs.entry.js → bcm-button_15.cjs.entry.js} +5751 -828
  74. package/dist/cjs/bcm-caption.cjs.entry.js +5 -5
  75. package/dist/cjs/bcm-card.cjs.entry.js +2 -2
  76. package/dist/cjs/bcm-checkbox-group.cjs.entry.js +3 -3
  77. package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +2 -2
  78. package/dist/cjs/bcm-chip-group.cjs.entry.js +5 -5
  79. package/dist/cjs/bcm-chip.cjs.entry.js +2 -2
  80. package/dist/cjs/bcm-collapse.cjs.entry.js +2 -2
  81. package/dist/cjs/bcm-color-input.cjs.entry.js +4 -4
  82. package/dist/cjs/bcm-date-picker.cjs.entry.js +2 -2
  83. package/dist/cjs/bcm-datetime-picker.cjs.entry.js +3 -3
  84. package/dist/cjs/bcm-default.cjs.entry.js +2 -2
  85. package/dist/cjs/bcm-drawer.cjs.entry.js +4 -4
  86. package/dist/cjs/bcm-dropdown.cjs.entry.js +3 -3
  87. package/dist/cjs/bcm-expansion-panel.cjs.entry.js +2 -2
  88. package/dist/cjs/bcm-form-2.cjs.entry.js +2 -2
  89. package/dist/cjs/bcm-input-custom.cjs.entry.js +2 -2
  90. package/dist/cjs/bcm-input-dropdown.cjs.entry.js +6 -6
  91. package/dist/cjs/bcm-item.cjs.entry.js +2 -2
  92. package/dist/cjs/bcm-items.cjs.entry.js +2 -2
  93. package/dist/cjs/bcm-menu.cjs.entry.js +5 -5
  94. package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +4 -4
  95. package/dist/cjs/bcm-modal-2-header.cjs.entry.js +4 -4
  96. package/dist/cjs/bcm-modal-2.cjs.entry.js +4 -4
  97. package/dist/cjs/bcm-modal.cjs.entry.js +2 -2
  98. package/dist/cjs/bcm-number-input.cjs.entry.js +109 -0
  99. package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +2 -2
  100. package/dist/cjs/bcm-popconfirm.cjs.entry.js +2 -2
  101. package/dist/cjs/bcm-popover.cjs.entry.js +4 -4
  102. package/dist/cjs/bcm-progress.cjs.entry.js +2 -2
  103. package/dist/cjs/bcm-radio-group.cjs.entry.js +4 -4
  104. package/dist/cjs/bcm-radio.cjs.entry.js +4 -4
  105. package/dist/cjs/bcm-range.cjs.entry.js +2 -2
  106. package/dist/cjs/bcm-shortcut.cjs.entry.js +4 -4
  107. package/dist/cjs/bcm-skeleton.cjs.entry.js +4 -4
  108. package/dist/cjs/bcm-step.cjs.entry.js +3 -3
  109. package/dist/cjs/bcm-stepper.cjs.entry.js +5 -5
  110. package/dist/cjs/bcm-tab-group.cjs.entry.js +4 -4
  111. package/dist/cjs/bcm-tab-item-header.cjs.entry.js +4 -4
  112. package/dist/cjs/bcm-tab-item.cjs.entry.js +4 -4
  113. package/dist/cjs/bcm-table.cjs.entry.js +4 -4
  114. package/dist/cjs/bcm-tag.cjs.entry.js +3 -3
  115. package/dist/cjs/bcm-textarea.cjs.entry.js +3 -3
  116. package/dist/cjs/bcm-time-picker.cjs.entry.js +2 -2
  117. package/dist/cjs/bcm-toast.cjs.entry.js +2 -2
  118. package/dist/cjs/bcm-typography.cjs.entry.js +21 -0
  119. package/dist/cjs/bromcom-ui.cjs.js +3 -3
  120. package/dist/cjs/{generate-e79347af.js → generate-c3a6c8c7.js} +15 -1
  121. package/dist/cjs/{global-9bb1902a.js → global-9e8b5009.js} +1 -1
  122. package/dist/cjs/{input-template-3d21aacb.js → input-template-8eeb94e7.js} +1 -1
  123. package/dist/cjs/{json-parse-decarator-4d7afa63.js → json-parse-decarator-0932bec0.js} +1 -1
  124. package/dist/cjs/{label-template-8dc10d0a.js → label-template-a6f51ef2.js} +6 -3
  125. package/dist/cjs/loader.cjs.js +3 -3
  126. package/dist/cjs/{number-helper-2f971fd8.js → number-helper-4e902d31.js} +1 -1
  127. package/dist/cjs/old-bcm-popover-box.cjs.entry.js +3 -3
  128. package/dist/cjs/old-bcm-popover.cjs.entry.js +2 -2
  129. package/dist/cjs/{package-47b7b998.js → package-b23f7b7f.js} +1 -1
  130. package/dist/cjs/{stepper-states-a5699b31.js → stepper-states-cb2339c3.js} +1 -1
  131. package/dist/cjs/{tooltip-helper-7d5d1cb5.js → tooltip-helper-4ddec3b4.js} +3 -3
  132. package/dist/cjs/{validators-507307b9.js → validators-e2155072.js} +1 -1
  133. package/dist/collection/collection-manifest.json +1 -0
  134. package/dist/collection/components/atoms/label/label.js +1 -1
  135. package/dist/collection/components/molecules/input-dropdown/input-dropdown.js +1 -1
  136. package/dist/collection/components/molecules/input-dropdown/input-dropdown.style.js +1 -1
  137. package/dist/collection/components/molecules/number-input/number-input.css +137 -0
  138. package/dist/collection/components/molecules/number-input/number-input.js +425 -0
  139. package/dist/collection/components/molecules/number-input/number-input.style.js +45 -0
  140. package/dist/collection/components/molecules/switch/switch.css +1 -0
  141. package/dist/collection/components/organism/list/list.css +2 -0
  142. package/dist/collection/components/organism/list/list.js +38 -9
  143. package/dist/collection/helper/generate.js +14 -0
  144. package/dist/collection/templates/label-template.js +6 -6
  145. package/dist/collection/templates/list-item-template.js +3 -2
  146. package/dist/components/bcm-caption.js +2 -2
  147. package/dist/components/bcm-input-dropdown.js +2 -2
  148. package/dist/components/bcm-number-input.d.ts +11 -0
  149. package/dist/components/bcm-number-input.js +157 -0
  150. package/dist/components/bcm-switch.js +1 -1
  151. package/dist/components/generate.js +15 -1
  152. package/dist/components/index.d.ts +1 -0
  153. package/dist/components/index.js +1 -0
  154. package/dist/components/label.js +7 -4
  155. package/dist/components/list.js +19 -10
  156. package/dist/esm/bcm-accordion.entry.js +2 -2
  157. package/dist/esm/bcm-alert.entry.js +2 -2
  158. package/dist/esm/bcm-attendance.entry.js +2 -2
  159. package/dist/esm/bcm-avatar_2.entry.js +4 -4
  160. package/dist/esm/bcm-breadcrumb.entry.js +2 -2
  161. package/dist/esm/bcm-button-group.entry.js +2 -2
  162. package/dist/esm/{bcm-button_10.entry.js → bcm-button_15.entry.js} +5283 -365
  163. package/dist/esm/bcm-caption.entry.js +5 -5
  164. package/dist/esm/bcm-card.entry.js +2 -2
  165. package/dist/esm/bcm-checkbox-group.entry.js +3 -3
  166. package/dist/esm/bcm-checkbox-lite_9.entry.js +2 -2
  167. package/dist/esm/bcm-chip-group.entry.js +5 -5
  168. package/dist/esm/bcm-chip.entry.js +2 -2
  169. package/dist/esm/bcm-collapse.entry.js +2 -2
  170. package/dist/esm/bcm-color-input.entry.js +4 -4
  171. package/dist/esm/bcm-date-picker.entry.js +2 -2
  172. package/dist/esm/bcm-datetime-picker.entry.js +3 -3
  173. package/dist/esm/bcm-default.entry.js +2 -2
  174. package/dist/esm/bcm-drawer.entry.js +4 -4
  175. package/dist/esm/bcm-dropdown.entry.js +3 -3
  176. package/dist/esm/bcm-expansion-panel.entry.js +2 -2
  177. package/dist/esm/bcm-form-2.entry.js +2 -2
  178. package/dist/esm/bcm-input-custom.entry.js +2 -2
  179. package/dist/esm/bcm-input-dropdown.entry.js +6 -6
  180. package/dist/esm/bcm-item.entry.js +2 -2
  181. package/dist/esm/bcm-items.entry.js +2 -2
  182. package/dist/esm/bcm-menu.entry.js +5 -5
  183. package/dist/esm/bcm-modal-2-footer.entry.js +4 -4
  184. package/dist/esm/bcm-modal-2-header.entry.js +4 -4
  185. package/dist/esm/bcm-modal-2.entry.js +4 -4
  186. package/dist/esm/bcm-modal.entry.js +2 -2
  187. package/dist/esm/bcm-number-input.entry.js +105 -0
  188. package/dist/esm/bcm-popconfirm-box.entry.js +2 -2
  189. package/dist/esm/bcm-popconfirm.entry.js +2 -2
  190. package/dist/esm/bcm-popover.entry.js +4 -4
  191. package/dist/esm/bcm-progress.entry.js +2 -2
  192. package/dist/esm/bcm-radio-group.entry.js +4 -4
  193. package/dist/esm/bcm-radio.entry.js +4 -4
  194. package/dist/esm/bcm-range.entry.js +2 -2
  195. package/dist/esm/bcm-shortcut.entry.js +4 -4
  196. package/dist/esm/bcm-skeleton.entry.js +4 -4
  197. package/dist/esm/bcm-step.entry.js +3 -3
  198. package/dist/esm/bcm-stepper.entry.js +5 -5
  199. package/dist/esm/bcm-tab-group.entry.js +4 -4
  200. package/dist/esm/bcm-tab-item-header.entry.js +4 -4
  201. package/dist/esm/bcm-tab-item.entry.js +4 -4
  202. package/dist/esm/bcm-table.entry.js +4 -4
  203. package/dist/esm/bcm-tag.entry.js +3 -3
  204. package/dist/esm/bcm-textarea.entry.js +3 -3
  205. package/dist/esm/bcm-time-picker.entry.js +2 -2
  206. package/dist/esm/bcm-toast.entry.js +2 -2
  207. package/dist/esm/bcm-typography.entry.js +17 -0
  208. package/dist/esm/bromcom-ui.js +3 -3
  209. package/dist/esm/{generate-b9c6f412.js → generate-80f589b2.js} +15 -1
  210. package/dist/esm/{global-114427da.js → global-9afe304c.js} +1 -1
  211. package/dist/esm/{input-template-dc94e47f.js → input-template-a5d07ba6.js} +1 -1
  212. package/dist/esm/{json-parse-decarator-fca2dc09.js → json-parse-decarator-5195f510.js} +1 -1
  213. package/dist/esm/{label-template-989d1700.js → label-template-ad2e8119.js} +6 -3
  214. package/dist/esm/loader.js +3 -3
  215. package/dist/esm/{number-helper-70be3621.js → number-helper-aeb5881f.js} +1 -1
  216. package/dist/esm/old-bcm-popover-box.entry.js +3 -3
  217. package/dist/esm/old-bcm-popover.entry.js +2 -2
  218. package/dist/esm/{package-6f4c9f8c.js → package-5e39e390.js} +1 -1
  219. package/dist/esm/{stepper-states-291a682f.js → stepper-states-97a648ff.js} +1 -1
  220. package/dist/esm/{tooltip-helper-089735b1.js → tooltip-helper-d339c58a.js} +3 -3
  221. package/dist/esm/{validators-c1fe8b4b.js → validators-b5e106d5.js} +1 -1
  222. package/dist/types/components/molecules/number-input/number-input.d.ts +29 -0
  223. package/dist/types/components/molecules/number-input/number-input.style.d.ts +200 -0
  224. package/dist/types/components/organism/list/list.d.ts +3 -1
  225. package/dist/types/components.d.ts +55 -1
  226. package/dist/types/helper/generate.d.ts +3 -0
  227. package/dist/types/models/bcm.d.ts +3 -0
  228. package/dist/types/templates/label-template.d.ts +2 -1
  229. package/package.json +1 -1
  230. package/dist/bromcom-ui/p-140f3478.js +0 -5
  231. package/dist/bromcom-ui/p-3432a82d.js +0 -19
  232. package/dist/bromcom-ui/p-5ff3c68f.entry.js +0 -5
  233. package/dist/bromcom-ui/p-71b9ea64.entry.js +0 -7
  234. package/dist/bromcom-ui/p-8b202d9e.js +0 -5
  235. package/dist/bromcom-ui/p-93b8a3ff.entry.js +0 -5
  236. package/dist/bromcom-ui/p-a00170b7.entry.js +0 -5
  237. package/dist/bromcom-ui/p-f7549b1f.entry.js +0 -5
  238. package/dist/cjs/bcm-checkbox_2.cjs.entry.js +0 -194
  239. package/dist/cjs/bcm-list_3.cjs.entry.js +0 -2536
  240. package/dist/cjs/bcm-switch.cjs.entry.js +0 -151
  241. package/dist/cjs/index-7eed931f.js +0 -2146
  242. package/dist/esm/bcm-checkbox_2.entry.js +0 -189
  243. package/dist/esm/bcm-list_3.entry.js +0 -2530
  244. package/dist/esm/bcm-switch.entry.js +0 -147
  245. package/dist/esm/index-e4b6a4ce.js +0 -2127
@@ -0,0 +1,425 @@
1
+ /*!
2
+ * Built with Stencil
3
+ * Copyright (c) Bromcom.
4
+ */
5
+ import { Generate } from "@bcm/helpers";
6
+ import { Host, h } from "@stencil/core";
7
+ import { Bcm } from "@bcm/model";
8
+ import { CaptionTemplate } from "@bcm/template";
9
+ import { numberInputStyle } from "./number-input.style";
10
+ export class NumberInput {
11
+ constructor() {
12
+ this.blockInvalidChar = e => {
13
+ return ["e", "E", "+", "-"].includes(e.key) && e.preventDefault();
14
+ };
15
+ this._id = Generate.UID();
16
+ this.size = Bcm.Size.medium;
17
+ this.min = 0;
18
+ this.max = 100;
19
+ this.step = 1;
20
+ this.placeholder = undefined;
21
+ this.label = undefined;
22
+ this.tooltip = undefined;
23
+ this.value = 0;
24
+ this.disabled = false;
25
+ this.readonly = false;
26
+ this.required = false;
27
+ this.pattern = undefined;
28
+ this.caption = undefined;
29
+ this.noCaption = false;
30
+ this.captionType = Bcm.Status.default;
31
+ this.captionError = undefined;
32
+ this.customErrorMessage = undefined;
33
+ this.prefixIcon = undefined;
34
+ this.suffixIcon = undefined;
35
+ this.isFocus = false;
36
+ this.isError = false;
37
+ }
38
+ render() {
39
+ const { _id, value, min, max, step, tooltip, disabled, size, label, caption, captionType, required, noCaption, captionError, customErrorMessage, prefixIcon, suffixIcon, pattern } = this;
40
+ const { host, input, container, inputContainer, caretContainer, caretIcon, slotIcon } = numberInputStyle({ size, focus: this.isFocus });
41
+ return (h(Host, { class: host(), onClick: () => !disabled && this.nativeInput.focus() }, label && h("bcm-label", { tooltip: tooltip, "no-margin": true, type: captionType, value: label, required: required, htmlFor: _id }), h("div", { class: container() }, h("div", { class: inputContainer() }, prefixIcon && (h("span", { class: slotIcon() }, h("i", { class: prefixIcon }))), h("input", { type: "number", class: input(), min: min, max: max, step: step, value: value, inputmode: "numeric", pattern: pattern, ref: input => (this.nativeInput = input), onKeyPress: this.blockInvalidChar, onFocus: () => (this.isFocus = true), onBlur: () => (this.isFocus = false), onError: e => console.log(e), onErrorCapture: e => console.log(e) }), suffixIcon && (h("span", { class: slotIcon() }, h("i", { class: suffixIcon })))), h("div", { class: caretContainer() }, h("span", { class: caretIcon() }, h("i", { class: "fas fa-caret-up" })), h("span", { class: caretIcon() }, h("i", { class: "fas fa-caret-down" })))), h(CaptionTemplate, { noCaption: noCaption, captionType: captionType, captionError: captionError, caption: caption, customErrorMessage: customErrorMessage })));
42
+ }
43
+ static get is() { return "bcm-number-input"; }
44
+ static get originalStyleUrls() {
45
+ return {
46
+ "$": ["number-input.scss"]
47
+ };
48
+ }
49
+ static get styleUrls() {
50
+ return {
51
+ "$": ["number-input.css"]
52
+ };
53
+ }
54
+ static get properties() {
55
+ return {
56
+ "_id": {
57
+ "type": "string",
58
+ "mutable": false,
59
+ "complexType": {
60
+ "original": "string",
61
+ "resolved": "string",
62
+ "references": {}
63
+ },
64
+ "required": false,
65
+ "optional": false,
66
+ "docs": {
67
+ "tags": [],
68
+ "text": ""
69
+ },
70
+ "attribute": "id",
71
+ "reflect": true,
72
+ "defaultValue": "Generate.UID()"
73
+ },
74
+ "size": {
75
+ "type": "string",
76
+ "mutable": false,
77
+ "complexType": {
78
+ "original": "SizeTypes",
79
+ "resolved": "\"large\" | \"medium\" | \"small\"",
80
+ "references": {
81
+ "SizeTypes": {
82
+ "location": "import",
83
+ "path": "@bcm/model"
84
+ }
85
+ }
86
+ },
87
+ "required": false,
88
+ "optional": false,
89
+ "docs": {
90
+ "tags": [],
91
+ "text": ""
92
+ },
93
+ "attribute": "size",
94
+ "reflect": false,
95
+ "defaultValue": "Bcm.Size.medium"
96
+ },
97
+ "min": {
98
+ "type": "number",
99
+ "mutable": false,
100
+ "complexType": {
101
+ "original": "number",
102
+ "resolved": "number",
103
+ "references": {}
104
+ },
105
+ "required": false,
106
+ "optional": false,
107
+ "docs": {
108
+ "tags": [],
109
+ "text": ""
110
+ },
111
+ "attribute": "min",
112
+ "reflect": false,
113
+ "defaultValue": "0"
114
+ },
115
+ "max": {
116
+ "type": "number",
117
+ "mutable": false,
118
+ "complexType": {
119
+ "original": "number",
120
+ "resolved": "number",
121
+ "references": {}
122
+ },
123
+ "required": false,
124
+ "optional": false,
125
+ "docs": {
126
+ "tags": [],
127
+ "text": ""
128
+ },
129
+ "attribute": "max",
130
+ "reflect": false,
131
+ "defaultValue": "100"
132
+ },
133
+ "step": {
134
+ "type": "number",
135
+ "mutable": false,
136
+ "complexType": {
137
+ "original": "number",
138
+ "resolved": "number",
139
+ "references": {}
140
+ },
141
+ "required": false,
142
+ "optional": false,
143
+ "docs": {
144
+ "tags": [],
145
+ "text": ""
146
+ },
147
+ "attribute": "step",
148
+ "reflect": false,
149
+ "defaultValue": "1"
150
+ },
151
+ "placeholder": {
152
+ "type": "string",
153
+ "mutable": false,
154
+ "complexType": {
155
+ "original": "string",
156
+ "resolved": "string",
157
+ "references": {}
158
+ },
159
+ "required": false,
160
+ "optional": false,
161
+ "docs": {
162
+ "tags": [],
163
+ "text": ""
164
+ },
165
+ "attribute": "placeholder",
166
+ "reflect": false
167
+ },
168
+ "label": {
169
+ "type": "string",
170
+ "mutable": false,
171
+ "complexType": {
172
+ "original": "string",
173
+ "resolved": "string",
174
+ "references": {}
175
+ },
176
+ "required": false,
177
+ "optional": false,
178
+ "docs": {
179
+ "tags": [],
180
+ "text": ""
181
+ },
182
+ "attribute": "label",
183
+ "reflect": false
184
+ },
185
+ "tooltip": {
186
+ "type": "string",
187
+ "mutable": true,
188
+ "complexType": {
189
+ "original": "string",
190
+ "resolved": "string",
191
+ "references": {}
192
+ },
193
+ "required": false,
194
+ "optional": false,
195
+ "docs": {
196
+ "tags": [],
197
+ "text": ""
198
+ },
199
+ "attribute": "tooltip",
200
+ "reflect": false
201
+ },
202
+ "value": {
203
+ "type": "number",
204
+ "mutable": true,
205
+ "complexType": {
206
+ "original": "number",
207
+ "resolved": "number",
208
+ "references": {}
209
+ },
210
+ "required": false,
211
+ "optional": false,
212
+ "docs": {
213
+ "tags": [],
214
+ "text": ""
215
+ },
216
+ "attribute": "value",
217
+ "reflect": false,
218
+ "defaultValue": "0"
219
+ },
220
+ "disabled": {
221
+ "type": "boolean",
222
+ "mutable": false,
223
+ "complexType": {
224
+ "original": "boolean",
225
+ "resolved": "boolean",
226
+ "references": {}
227
+ },
228
+ "required": false,
229
+ "optional": false,
230
+ "docs": {
231
+ "tags": [],
232
+ "text": ""
233
+ },
234
+ "attribute": "disabled",
235
+ "reflect": false,
236
+ "defaultValue": "false"
237
+ },
238
+ "readonly": {
239
+ "type": "boolean",
240
+ "mutable": false,
241
+ "complexType": {
242
+ "original": "boolean",
243
+ "resolved": "boolean",
244
+ "references": {}
245
+ },
246
+ "required": false,
247
+ "optional": false,
248
+ "docs": {
249
+ "tags": [],
250
+ "text": ""
251
+ },
252
+ "attribute": "readonly",
253
+ "reflect": false,
254
+ "defaultValue": "false"
255
+ },
256
+ "required": {
257
+ "type": "boolean",
258
+ "mutable": false,
259
+ "complexType": {
260
+ "original": "boolean",
261
+ "resolved": "boolean",
262
+ "references": {}
263
+ },
264
+ "required": false,
265
+ "optional": false,
266
+ "docs": {
267
+ "tags": [],
268
+ "text": ""
269
+ },
270
+ "attribute": "required",
271
+ "reflect": false,
272
+ "defaultValue": "false"
273
+ },
274
+ "pattern": {
275
+ "type": "string",
276
+ "mutable": true,
277
+ "complexType": {
278
+ "original": "string",
279
+ "resolved": "string",
280
+ "references": {}
281
+ },
282
+ "required": false,
283
+ "optional": false,
284
+ "docs": {
285
+ "tags": [],
286
+ "text": ""
287
+ },
288
+ "attribute": "pattern",
289
+ "reflect": false
290
+ },
291
+ "caption": {
292
+ "type": "string",
293
+ "mutable": true,
294
+ "complexType": {
295
+ "original": "string",
296
+ "resolved": "string",
297
+ "references": {}
298
+ },
299
+ "required": false,
300
+ "optional": false,
301
+ "docs": {
302
+ "tags": [],
303
+ "text": ""
304
+ },
305
+ "attribute": "caption",
306
+ "reflect": false
307
+ },
308
+ "noCaption": {
309
+ "type": "boolean",
310
+ "mutable": true,
311
+ "complexType": {
312
+ "original": "boolean",
313
+ "resolved": "boolean",
314
+ "references": {}
315
+ },
316
+ "required": false,
317
+ "optional": false,
318
+ "docs": {
319
+ "tags": [],
320
+ "text": ""
321
+ },
322
+ "attribute": "no-caption",
323
+ "reflect": false,
324
+ "defaultValue": "false"
325
+ },
326
+ "captionType": {
327
+ "type": "string",
328
+ "mutable": true,
329
+ "complexType": {
330
+ "original": "StatusTypes",
331
+ "resolved": "\"default\" | \"error\" | \"info\" | \"success\" | \"warning\"",
332
+ "references": {
333
+ "StatusTypes": {
334
+ "location": "import",
335
+ "path": "@bcm/model"
336
+ }
337
+ }
338
+ },
339
+ "required": false,
340
+ "optional": false,
341
+ "docs": {
342
+ "tags": [],
343
+ "text": ""
344
+ },
345
+ "attribute": "caption-type",
346
+ "reflect": false,
347
+ "defaultValue": "Bcm.Status.default"
348
+ },
349
+ "captionError": {
350
+ "type": "string",
351
+ "mutable": true,
352
+ "complexType": {
353
+ "original": "string",
354
+ "resolved": "string",
355
+ "references": {}
356
+ },
357
+ "required": false,
358
+ "optional": false,
359
+ "docs": {
360
+ "tags": [],
361
+ "text": ""
362
+ },
363
+ "attribute": "caption-error",
364
+ "reflect": false
365
+ },
366
+ "customErrorMessage": {
367
+ "type": "string",
368
+ "mutable": true,
369
+ "complexType": {
370
+ "original": "string",
371
+ "resolved": "string",
372
+ "references": {}
373
+ },
374
+ "required": false,
375
+ "optional": false,
376
+ "docs": {
377
+ "tags": [],
378
+ "text": ""
379
+ },
380
+ "attribute": "custom-error-message",
381
+ "reflect": false
382
+ },
383
+ "prefixIcon": {
384
+ "type": "string",
385
+ "mutable": true,
386
+ "complexType": {
387
+ "original": "string",
388
+ "resolved": "string",
389
+ "references": {}
390
+ },
391
+ "required": false,
392
+ "optional": false,
393
+ "docs": {
394
+ "tags": [],
395
+ "text": ""
396
+ },
397
+ "attribute": "prefix-icon",
398
+ "reflect": false
399
+ },
400
+ "suffixIcon": {
401
+ "type": "string",
402
+ "mutable": true,
403
+ "complexType": {
404
+ "original": "string",
405
+ "resolved": "string",
406
+ "references": {}
407
+ },
408
+ "required": false,
409
+ "optional": false,
410
+ "docs": {
411
+ "tags": [],
412
+ "text": ""
413
+ },
414
+ "attribute": "suffix-icon",
415
+ "reflect": false
416
+ }
417
+ };
418
+ }
419
+ static get states() {
420
+ return {
421
+ "isFocus": {},
422
+ "isError": {}
423
+ };
424
+ }
425
+ }
@@ -0,0 +1,45 @@
1
+ /*!
2
+ * Built with Stencil
3
+ * Copyright (c) Bromcom.
4
+ */
5
+ import { tv } from "tailwind-variants";
6
+ export const numberInputStyle = tv({
7
+ slots: {
8
+ host: "bcm-number-input bcm-ui-element tw-flex tw-flex-col tw-items-start tw-justify-start tw-max-w-[256px] tw-w-full",
9
+ container: "tw-flex tw-flex-row tw-items-center tw-justify-between tw-rounded tw-border tw-border-solid tw-border-slate-300 tw-w-full tw-min-h-full hover:tw-bg-slate-50",
10
+ inputContainer: "tw-flex tw-min-h-fit tw-w-full tw-flex-row tw-items-center tw-justify-center tw-gap-2 tw-px-3",
11
+ input: "tw-outline-none tw-appearance-none tw-flex-1 tw-bg-transparent tw-text-slate-400 tw-text-inherit tw-font-normal",
12
+ caretContainer: "tw-flex tw-flex-col tw-min-h-full tw-border-l tw-items-stretch tw-self-stretch tw-justify-center tw-border-l-slate-300 tw-select-none tw-w-[30px]",
13
+ caretIcon: "tw-flex tw-items-center tw-text-slate-500 tw-justify-center tw-h-full tw-cursor-pointer active:tw-bg-slate-400 last:tw-border-t last:tw-border-t-slate-300",
14
+ slotIcon: "tw-text-slate-500",
15
+ },
16
+ variants: {
17
+ size: {
18
+ small: {
19
+ host: "tw-gap-0.5 tw-text-xs",
20
+ slotIcon: "tw-text-[10px]",
21
+ inputContainer: "tw-py-[2px]",
22
+ caretIcon: "tw-text-[10px]",
23
+ },
24
+ medium: {
25
+ host: "tw-gap-1 tw-text-base",
26
+ slotIcon: "tw-text-xs",
27
+ inputContainer: "tw-py-[5px]",
28
+ },
29
+ large: {
30
+ host: "tw-gap-2 tw-text-base",
31
+ slotIcon: "tw-text-[14px]",
32
+ inputContainer: "tw-py-2",
33
+ },
34
+ },
35
+ focus: {
36
+ true: {
37
+ container: "tw-ring-1 tw-ring-blue-600",
38
+ input: "tw-text-slate-700",
39
+ },
40
+ },
41
+ },
42
+ defaultVariants: {
43
+ size: "medium",
44
+ },
45
+ });
@@ -202,6 +202,7 @@
202
202
  flex-direction: column;
203
203
  align-items: flex-start;
204
204
  justify-content: flex-start;
205
+ gap: 4px;
205
206
  }
206
207
  .bcm-switch__container--left, .bcm-switch__container--right {
207
208
  align-items: center;
@@ -561,6 +561,7 @@
561
561
  width: 100%;
562
562
  }
563
563
  .bcm-list__container.bcm-list__type-linked-component, .bcm-list__container.bcm-list__type-select, .bcm-list__container.bcm-list__type-autocomplete {
564
+ display: none;
564
565
  opacity: 0;
565
566
  visibility: hidden;
566
567
  position: absolute;
@@ -576,6 +577,7 @@
576
577
  transform: translateY(-10%);
577
578
  }
578
579
  .bcm-list__container.bcm-list__type-linked-component.is-open, .bcm-list__container.bcm-list__type-select.is-open, .bcm-list__container.bcm-list__type-autocomplete.is-open {
580
+ display: flex;
579
581
  opacity: 1;
580
582
  transform: translateY(0);
581
583
  visibility: visible;
@@ -98,6 +98,7 @@ export class BcmList {
98
98
  status: Bcm.Status.default,
99
99
  indeterminate: "uncheck",
100
100
  };
101
+ this.shouldTriggerChange = undefined;
101
102
  this.placement = Bcm.Placement["bottom-start"];
102
103
  this.disableChangeEvent = false;
103
104
  this.data = [];
@@ -140,7 +141,7 @@ export class BcmList {
140
141
  return (_a = this.value) === null || _a === void 0 ? void 0 : _a.map(item => ({
141
142
  value: item.id,
142
143
  label: StringHelper.textLimitter(item.text, 7),
143
- text: item.tooltipMessage || item.tagTitle || item.text,
144
+ text: item.tooltipMessage || item.tagTitle || Generate.domParser(item.text),
144
145
  }));
145
146
  }, []);
146
147
  }
@@ -149,7 +150,7 @@ export class BcmList {
149
150
  // if (this.type == "select" || this.type == "autocomplete" || this.linkedComponent) {
150
151
  // const list = this.el.querySelector(`#bcm-list-${this._id}`);
151
152
  // if (list) {
152
- // document.body.appendChild(list);
153
+ // document.body.appendChild(list);
153
154
  // }
154
155
  // }
155
156
  }
@@ -180,12 +181,13 @@ export class BcmList {
180
181
  if (this.checkboxes) {
181
182
  if (!Validators.compareTwoArrayIsSame(newVal, oldVal)) {
182
183
  this.bcmChecklist.emit(this.value);
183
- !this.disableChangeEvent && this.change.emit(this.value);
184
+ !this.disableChangeEvent && this.change.emit([...this.value, { shouldTriggerChange: this.shouldTriggerChange }]);
184
185
  }
185
186
  }
186
187
  else {
187
188
  if ((newVal === null || newVal === void 0 ? void 0 : newVal.id) != (oldVal === null || oldVal === void 0 ? void 0 : oldVal.id)) {
188
- !this.disableChangeEvent && this.change.emit(this.value);
189
+ !this.disableChangeEvent &&
190
+ this.change.emit(Object.assign(Object.assign({}, this.value), { shouldTriggerChange: this.shouldTriggerChange }));
189
191
  }
190
192
  }
191
193
  }
@@ -431,8 +433,9 @@ export class BcmList {
431
433
  }
432
434
  }
433
435
  }
434
- async set(data) {
436
+ async set(data, trigger = true) {
435
437
  if (data) {
438
+ this.shouldTriggerChange = trigger;
436
439
  if (Array.isArray(data)) {
437
440
  this.addChecked(data);
438
441
  }
@@ -457,6 +460,9 @@ export class BcmList {
457
460
  async getValue() {
458
461
  return Promise.resolve(this.value);
459
462
  }
463
+ async triggerChange(action) {
464
+ this.shouldTriggerChange = action;
465
+ }
460
466
  async addChecked(ids = [], save = false, emit = true) {
461
467
  if (ids && ids.length > 0) {
462
468
  if (!save) {
@@ -575,7 +581,7 @@ export class BcmList {
575
581
  this.totalRootData = totalRoots;
576
582
  this.value = this.checkboxes ? (await this.getCheckedList()).checkedList : listState.selectedItem(this._id) ? listState.selectedItem(this._id)[0] : null;
577
583
  if (!this.checkboxes) {
578
- this.inputText = ((_a = this.value) === null || _a === void 0 ? void 0 : _a.text) || null;
584
+ this.inputText = Generate.domParser((_a = this.value) === null || _a === void 0 ? void 0 : _a.text) || null;
579
585
  }
580
586
  // checkli olan subparentların indeterminate kontrolü için
581
587
  if (this.checkboxes && ((_b = this.value) === null || _b === void 0 ? void 0 : _b.length) > 0) {
@@ -630,7 +636,7 @@ export class BcmList {
630
636
  var _a;
631
637
  if (!this.checkboxes) {
632
638
  this.value = listState.selectedItem(this._id, itemId) ? listState.selectedItem(this._id, itemId)[0] : null;
633
- this.inputText = ((_a = this.value) === null || _a === void 0 ? void 0 : _a.text) || null;
639
+ this.inputText = Generate.domParser((_a = this.value) === null || _a === void 0 ? void 0 : _a.text) || null;
634
640
  this.isOpen = false;
635
641
  this.markForCheck();
636
642
  if (this.type == "autocomplete" && this.value) {
@@ -1638,7 +1644,8 @@ export class BcmList {
1638
1644
  "returnOtherData": {},
1639
1645
  "options": {},
1640
1646
  "tagContainerWidth": {},
1641
- "selectAllItem": {}
1647
+ "selectAllItem": {},
1648
+ "shouldTriggerChange": {}
1642
1649
  };
1643
1650
  }
1644
1651
  static get events() {
@@ -1753,10 +1760,13 @@ export class BcmList {
1753
1760
  return {
1754
1761
  "set": {
1755
1762
  "complexType": {
1756
- "signature": "(data: any) => Promise<void>",
1763
+ "signature": "(data: any, trigger?: boolean) => Promise<void>",
1757
1764
  "parameters": [{
1758
1765
  "tags": [],
1759
1766
  "text": ""
1767
+ }, {
1768
+ "tags": [],
1769
+ "text": ""
1760
1770
  }],
1761
1771
  "references": {
1762
1772
  "Promise": {
@@ -1834,6 +1844,25 @@ export class BcmList {
1834
1844
  "tags": []
1835
1845
  }
1836
1846
  },
1847
+ "triggerChange": {
1848
+ "complexType": {
1849
+ "signature": "(action: boolean) => Promise<void>",
1850
+ "parameters": [{
1851
+ "tags": [],
1852
+ "text": ""
1853
+ }],
1854
+ "references": {
1855
+ "Promise": {
1856
+ "location": "global"
1857
+ }
1858
+ },
1859
+ "return": "Promise<void>"
1860
+ },
1861
+ "docs": {
1862
+ "text": "",
1863
+ "tags": []
1864
+ }
1865
+ },
1837
1866
  "addChecked": {
1838
1867
  "complexType": {
1839
1868
  "signature": "(ids?: any[], save?: boolean, emit?: boolean) => Promise<any>",
@@ -33,6 +33,15 @@ if (isAllowedDomain()) {
33
33
  }
34
34
  })();
35
35
  export class Generate {
36
+ static prettify(input) {
37
+ const prettifiedObject = {};
38
+ for (const key in input) {
39
+ if (input.hasOwnProperty(key)) {
40
+ prettifiedObject[key] = input[key];
41
+ }
42
+ }
43
+ return prettifiedObject;
44
+ }
36
45
  /**
37
46
  const dc = Generate.getTwColor({
38
47
  color: "blue",
@@ -110,6 +119,11 @@ Generate.getIconAttrWithStatusType = (status, loading = false) => {
110
119
  return { icon: "far fa-check-circle" };
111
120
  }
112
121
  };
122
+ Generate.domParser = (html) => {
123
+ const parser = new DOMParser();
124
+ const doc = parser.parseFromString(html, "text/html");
125
+ return doc.body.innerText;
126
+ };
113
127
  Generate.createComponent = (el, props, area = "append-area") => {
114
128
  let container = area ? document.querySelector(area) : document.body;
115
129
  if (area && !container) {
@@ -2,15 +2,15 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import { h } from '@stencil/core';
6
- import cs from 'classnames';
7
- import Bcm from '../models/bcm';
8
- export const LabelTemplate = ({ required, value, size, form, htmlFor, type }) => {
5
+ import { h } from "@stencil/core";
6
+ import cs from "classnames";
7
+ import Bcm from "../models/bcm";
8
+ export const LabelTemplate = ({ required, value, size, form, htmlFor, type, tooltip }) => {
9
9
  size = size || "medium";
10
10
  type = type || Bcm.Status.default;
11
- return (h("label", { form: form, htmlFor: htmlFor, class: cs("bcm-ui-element bcm-ui-feedback bcm-label bcm-label__text tw-mb-1 tw-text-slate-600 tw-font-medium ", {
11
+ return (h("label", { form: form, htmlFor: htmlFor, class: cs("bcm-ui-element bcm-ui-feedback bcm-label bcm-label__text tw-mb-1 tw-font-medium tw-text-slate-600 ", {
12
12
  "tw-text-1": size == "small",
13
13
  "tw-text-2": size == "medium",
14
14
  "tw-text-3": size == "large",
15
- }) }, value, " ", required && ('*')));
15
+ }) }, value, " ", required && "*", tooltip && (h("span", { class: "tw-ml-1" }, h("bcm-tooltip", { message: tooltip, placement: "top", trigger: "hover" }, h("bcm-icon", { icon: "fas fa-info-circle" }))))));
16
16
  };