bromcom-ui 2.9.0-rc.18 → 2.9.0-rc.19

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 (223) hide show
  1. package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
  2. package/dist/bromcom-ui/{p-13380aab.js → p-04e7d8ac.js} +1 -1
  3. package/dist/bromcom-ui/{p-b4b9c195.entry.js → p-05fef42b.entry.js} +1 -1
  4. package/dist/bromcom-ui/{p-1264d0a2.entry.js → p-06672174.entry.js} +1 -1
  5. package/dist/bromcom-ui/{p-95c6e625.entry.js → p-06c3ed21.entry.js} +1 -1
  6. package/dist/bromcom-ui/{p-901911e3.entry.js → p-09737f79.entry.js} +1 -1
  7. package/dist/bromcom-ui/{p-882a7f23.entry.js → p-0ac10364.entry.js} +1 -1
  8. package/dist/bromcom-ui/{p-0b3dc9d6.entry.js → p-0b81c02f.entry.js} +1 -1
  9. package/dist/bromcom-ui/p-0c774416.entry.js +7 -0
  10. package/dist/bromcom-ui/{p-85ad9f3f.entry.js → p-0fb41a53.entry.js} +1 -1
  11. package/dist/bromcom-ui/{p-4e79863b.entry.js → p-14cafd64.entry.js} +1 -1
  12. package/dist/bromcom-ui/{p-0248dda1.entry.js → p-150450da.entry.js} +1 -1
  13. package/dist/bromcom-ui/{p-b81b471f.entry.js → p-1625ce05.entry.js} +1 -1
  14. package/dist/bromcom-ui/{p-cb8f146d.entry.js → p-1ae58853.entry.js} +1 -1
  15. package/dist/bromcom-ui/{p-f7c0dacd.entry.js → p-1ba23d50.entry.js} +1 -1
  16. package/dist/bromcom-ui/{p-73d21d07.entry.js → p-203446af.entry.js} +1 -1
  17. package/dist/bromcom-ui/{p-f9be0aa3.js → p-2156f8f5.js} +1 -1
  18. package/dist/bromcom-ui/{p-0f59535f.js → p-2208aada.js} +1 -1
  19. package/dist/bromcom-ui/{p-970b4b64.entry.js → p-2505c9d9.entry.js} +1 -1
  20. package/dist/bromcom-ui/{p-b4ab469f.entry.js → p-26290ed5.entry.js} +1 -1
  21. package/dist/bromcom-ui/{p-1da685cc.entry.js → p-29a6e6c0.entry.js} +1 -1
  22. package/dist/bromcom-ui/{p-3db2e540.entry.js → p-29ca858f.entry.js} +1 -1
  23. package/dist/bromcom-ui/{p-ad278432.entry.js → p-2dbf5ba5.entry.js} +1 -1
  24. package/dist/bromcom-ui/{p-bd02fdcc.entry.js → p-302fe8de.entry.js} +1 -1
  25. package/dist/bromcom-ui/{p-dda4e3d6.entry.js → p-30dbc7bd.entry.js} +1 -1
  26. package/dist/bromcom-ui/{p-df33161f.js → p-3363ca16.js} +1 -1
  27. package/dist/bromcom-ui/{p-c357d5b9.entry.js → p-3a29e450.entry.js} +1 -1
  28. package/dist/bromcom-ui/{p-ce7aa349.js → p-3fa51f1b.js} +1 -1
  29. package/dist/bromcom-ui/{p-9efd429a.js → p-41dc7f2d.js} +1 -1
  30. package/dist/bromcom-ui/{p-46207bba.entry.js → p-430c0a24.entry.js} +1 -1
  31. package/dist/bromcom-ui/{p-9c7c62bf.entry.js → p-47ce3a16.entry.js} +1 -1
  32. package/dist/bromcom-ui/{p-2d859945.entry.js → p-4a511d29.entry.js} +1 -1
  33. package/dist/bromcom-ui/{p-98cb2ad8.entry.js → p-4a83d3fc.entry.js} +1 -1
  34. package/dist/bromcom-ui/{p-00adb162.entry.js → p-4be8e402.entry.js} +1 -1
  35. package/dist/bromcom-ui/{p-e2cfb773.entry.js → p-56e27911.entry.js} +1 -1
  36. package/dist/bromcom-ui/p-5c03d929.entry.js +5 -0
  37. package/dist/bromcom-ui/{p-07c3eb8e.js → p-61db1f1f.js} +1 -1
  38. package/dist/bromcom-ui/{p-ac5f4e84.entry.js → p-66da9512.entry.js} +1 -1
  39. package/dist/bromcom-ui/{p-5ae0a59b.js → p-7e44e6b5.js} +1 -1
  40. package/dist/bromcom-ui/{p-660a8daa.entry.js → p-80ee3d97.entry.js} +1 -1
  41. package/dist/bromcom-ui/{p-5f87e129.js → p-85ca2b62.js} +1 -1
  42. package/dist/bromcom-ui/{p-6f32652d.entry.js → p-87dda5e5.entry.js} +1 -1
  43. package/dist/bromcom-ui/{p-ac234c84.entry.js → p-8a9e9aeb.entry.js} +1 -1
  44. package/dist/bromcom-ui/{p-a6edcc85.entry.js → p-8b08527e.entry.js} +1 -1
  45. package/dist/bromcom-ui/{p-3c7a0345.js → p-8c018ae0.js} +1 -1
  46. package/dist/bromcom-ui/{p-a341fa6d.entry.js → p-90c5221d.entry.js} +1 -1
  47. package/dist/bromcom-ui/{p-10fd8284.js → p-917bd915.js} +1 -1
  48. package/dist/bromcom-ui/{p-c9c7067e.entry.js → p-99824717.entry.js} +1 -1
  49. package/dist/bromcom-ui/{p-5a0e52d2.entry.js → p-9e25eb82.entry.js} +1 -1
  50. package/dist/bromcom-ui/{p-347b7912.entry.js → p-9ed18ccb.entry.js} +1 -1
  51. package/dist/bromcom-ui/{p-347606cb.entry.js → p-a2b00328.entry.js} +1 -1
  52. package/dist/bromcom-ui/{p-eeaf54a5.entry.js → p-a3e268da.entry.js} +1 -1
  53. package/dist/bromcom-ui/{p-2d0719af.entry.js → p-a7763f93.entry.js} +1 -1
  54. package/dist/bromcom-ui/{p-6a2c6341.entry.js → p-a8254f18.entry.js} +1 -1
  55. package/dist/bromcom-ui/{p-99384b21.entry.js → p-ad822bff.entry.js} +1 -1
  56. package/dist/bromcom-ui/{p-e2933884.entry.js → p-bb3239ef.entry.js} +1 -1
  57. package/dist/bromcom-ui/{p-381c0161.entry.js → p-bc46e80c.entry.js} +1 -1
  58. package/dist/bromcom-ui/{p-3d730230.entry.js → p-c1a992e7.entry.js} +1 -1
  59. package/dist/bromcom-ui/{p-c917c1fb.entry.js → p-c78ab3ca.entry.js} +1 -1
  60. package/dist/bromcom-ui/p-ce938f1e.entry.js +5 -0
  61. package/dist/bromcom-ui/{p-766522ff.entry.js → p-cf9d4122.entry.js} +1 -1
  62. package/dist/bromcom-ui/{p-042fa5c0.entry.js → p-d64879be.entry.js} +1 -1
  63. package/dist/bromcom-ui/{p-eae72194.entry.js → p-d85727a3.entry.js} +1 -1
  64. package/dist/bromcom-ui/{p-bb2f87d8.entry.js → p-e45a2a64.entry.js} +1 -1
  65. package/dist/bromcom-ui/{p-8f9077af.entry.js → p-e688b044.entry.js} +1 -1
  66. package/dist/bromcom-ui/{p-edf43cd5.entry.js → p-e6e00bc4.entry.js} +1 -1
  67. package/dist/bromcom-ui/{p-fae5ab21.entry.js → p-f2b3b5a8.entry.js} +1 -1
  68. package/dist/bromcom-ui/{p-12010629.js → p-fc361b51.js} +1 -1
  69. package/dist/bromcom-ui/{p-106a65bf.entry.js → p-fe86c9e1.entry.js} +1 -1
  70. package/dist/cjs/bcm-accordion.cjs.entry.js +2 -2
  71. package/dist/cjs/bcm-alert.cjs.entry.js +2 -2
  72. package/dist/cjs/bcm-attendance.cjs.entry.js +2 -2
  73. package/dist/cjs/bcm-avatar_2.cjs.entry.js +4 -4
  74. package/dist/cjs/bcm-breadcrumb.cjs.entry.js +2 -2
  75. package/dist/cjs/bcm-button-group.cjs.entry.js +2 -2
  76. package/dist/cjs/{bcm-button_14.cjs.entry.js → bcm-button_15.cjs.entry.js} +3586 -2960
  77. package/dist/cjs/bcm-card.cjs.entry.js +2 -2
  78. package/dist/cjs/bcm-checkbox-group.cjs.entry.js +2 -2
  79. package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +2 -2
  80. package/dist/cjs/bcm-checkbox_2.cjs.entry.js +2 -2
  81. package/dist/cjs/bcm-chip-group.cjs.entry.js +4 -4
  82. package/dist/cjs/bcm-chip.cjs.entry.js +2 -2
  83. package/dist/cjs/bcm-collapse.cjs.entry.js +2 -2
  84. package/dist/cjs/bcm-color-input.cjs.entry.js +4 -4
  85. package/dist/cjs/bcm-default.cjs.entry.js +2 -2
  86. package/dist/cjs/bcm-drawer.cjs.entry.js +4 -4
  87. package/dist/cjs/bcm-dropdown.cjs.entry.js +3 -3
  88. package/dist/cjs/bcm-expansion-panel.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 +4 -4
  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-list_3.cjs.entry.js +9 -6
  94. package/dist/cjs/bcm-menu.cjs.entry.js +5 -5
  95. package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +4 -4
  96. package/dist/cjs/bcm-modal-2-header.cjs.entry.js +4 -4
  97. package/dist/cjs/bcm-modal-2.cjs.entry.js +4 -4
  98. package/dist/cjs/bcm-modal.cjs.entry.js +2 -2
  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-skeleton.cjs.entry.js +2 -2
  107. package/dist/cjs/bcm-step.cjs.entry.js +3 -3
  108. package/dist/cjs/bcm-stepper.cjs.entry.js +5 -5
  109. package/dist/cjs/bcm-switch.cjs.entry.js +2 -2
  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-toast.cjs.entry.js +2 -2
  117. package/dist/cjs/bromcom-ui.cjs.js +3 -3
  118. package/dist/cjs/{generate-90889006.js → generate-a614441c.js} +1 -1
  119. package/dist/cjs/{global-83d1dfc5.js → global-dbb478c2.js} +1 -1
  120. package/dist/cjs/{input-template-58031bb0.js → input-template-2f000bbb.js} +1 -1
  121. package/dist/cjs/{json-parse-decarator-c5086a06.js → json-parse-decarator-2831cc43.js} +1 -1
  122. package/dist/cjs/loader.cjs.js +3 -3
  123. package/dist/cjs/{number-helper-7cf76b12.js → number-helper-f401b29a.js} +1 -1
  124. package/dist/cjs/old-bcm-popover-box.cjs.entry.js +3 -3
  125. package/dist/cjs/old-bcm-popover.cjs.entry.js +2 -2
  126. package/dist/cjs/{package-cbf038fe.js → package-5175214b.js} +1 -1
  127. package/dist/cjs/{stepper-states-7f2a5e9d.js → stepper-states-fa6f45d2.js} +1 -1
  128. package/dist/cjs/{tooltip-helper-2dd2937e.js → tooltip-helper-a9d5aaef.js} +3 -3
  129. package/dist/cjs/{validators-b86a27db.js → validators-45097bb8.js} +1 -1
  130. package/dist/collection/components/molecules/input/input.js +0 -2
  131. package/dist/collection/components/molecules/linked/linked.js +3 -27
  132. package/dist/collection/components/organism/list/list.js +3 -18
  133. package/dist/collection/components/third-parts/rc-picker/date.js +202 -56
  134. package/dist/collection/components/third-parts/rc-picker/rc-picker.css +101 -4
  135. package/dist/collection/components/third-parts/rc-picker/rc-picker.js +274 -159
  136. package/dist/components/bcm-date.js +44 -15
  137. package/dist/components/generate.js +1 -1
  138. package/dist/components/input.js +0 -2
  139. package/dist/components/linked.js +4 -10
  140. package/dist/components/list.js +4 -1
  141. package/dist/components/rc-picker.js +3031 -2887
  142. package/dist/esm/bcm-accordion.entry.js +2 -2
  143. package/dist/esm/bcm-alert.entry.js +2 -2
  144. package/dist/esm/bcm-attendance.entry.js +2 -2
  145. package/dist/esm/bcm-avatar_2.entry.js +7 -7
  146. package/dist/esm/bcm-breadcrumb.entry.js +2 -2
  147. package/dist/esm/bcm-button-group.entry.js +2 -2
  148. package/dist/esm/{bcm-button_14.entry.js → bcm-button_15.entry.js} +3589 -2964
  149. package/dist/esm/bcm-card.entry.js +4 -4
  150. package/dist/esm/bcm-checkbox-group.entry.js +3 -3
  151. package/dist/esm/bcm-checkbox-lite_9.entry.js +3 -3
  152. package/dist/esm/bcm-checkbox_2.entry.js +4 -4
  153. package/dist/esm/bcm-chip-group.entry.js +7 -7
  154. package/dist/esm/bcm-chip.entry.js +4 -4
  155. package/dist/esm/bcm-collapse-group.entry.js +1 -1
  156. package/dist/esm/bcm-collapse.entry.js +2 -2
  157. package/dist/esm/bcm-color-input.entry.js +7 -7
  158. package/dist/esm/bcm-colorpicker.entry.js +2 -2
  159. package/dist/esm/bcm-default.entry.js +2 -2
  160. package/dist/esm/bcm-drawer.entry.js +7 -7
  161. package/dist/esm/bcm-dropdown.entry.js +3 -3
  162. package/dist/esm/bcm-expansion-panel.entry.js +4 -4
  163. package/dist/esm/bcm-input-custom.entry.js +2 -2
  164. package/dist/esm/bcm-input-dropdown.entry.js +7 -7
  165. package/dist/esm/bcm-item.entry.js +4 -4
  166. package/dist/esm/bcm-items.entry.js +2 -2
  167. package/dist/esm/bcm-list_3.entry.js +12 -9
  168. package/dist/esm/bcm-menu.entry.js +8 -8
  169. package/dist/esm/bcm-modal-2-footer.entry.js +7 -7
  170. package/dist/esm/bcm-modal-2-header.entry.js +7 -7
  171. package/dist/esm/bcm-modal-2.entry.js +7 -7
  172. package/dist/esm/bcm-modal.entry.js +2 -2
  173. package/dist/esm/bcm-old-tag_2.entry.js +1 -1
  174. package/dist/esm/bcm-popconfirm-box.entry.js +4 -4
  175. package/dist/esm/bcm-popconfirm.entry.js +2 -2
  176. package/dist/esm/bcm-popover.entry.js +7 -7
  177. package/dist/esm/bcm-progress.entry.js +4 -4
  178. package/dist/esm/bcm-radio-group.entry.js +7 -7
  179. package/dist/esm/bcm-radio.entry.js +7 -7
  180. package/dist/esm/bcm-range.entry.js +3 -3
  181. package/dist/esm/bcm-select.entry.js +1 -1
  182. package/dist/esm/bcm-skeleton.entry.js +2 -2
  183. package/dist/esm/bcm-step.entry.js +3 -3
  184. package/dist/esm/bcm-stepper.entry.js +8 -8
  185. package/dist/esm/bcm-switch.entry.js +3 -3
  186. package/dist/esm/bcm-tab-group.entry.js +7 -7
  187. package/dist/esm/bcm-tab-item-header.entry.js +7 -7
  188. package/dist/esm/bcm-tab-item.entry.js +7 -7
  189. package/dist/esm/bcm-table.entry.js +7 -7
  190. package/dist/esm/bcm-tabs-content.entry.js +1 -1
  191. package/dist/esm/bcm-tabs.entry.js +1 -1
  192. package/dist/esm/bcm-tag.entry.js +4 -4
  193. package/dist/esm/bcm-text.entry.js +2 -2
  194. package/dist/esm/bcm-textarea.entry.js +4 -4
  195. package/dist/esm/bcm-toast.entry.js +3 -3
  196. package/dist/esm/bromcom-ui.js +3 -3
  197. package/dist/esm/{color-helper-71b610e7.js → color-helper-845ba523.js} +1 -1
  198. package/dist/esm/{element-dragger-7ea06c76.js → element-dragger-89bb52fd.js} +1 -1
  199. package/dist/esm/{generate-429ed196.js → generate-f5397d67.js} +1 -1
  200. package/dist/esm/{global-4d7d3a13.js → global-fca83dc9.js} +1 -1
  201. package/dist/esm/{input-template-ab2e6439.js → input-template-50de36a8.js} +1 -1
  202. package/dist/esm/{json-parse-decarator-a55054fc.js → json-parse-decarator-db88bf63.js} +1 -1
  203. package/dist/esm/loader.js +3 -3
  204. package/dist/esm/{number-helper-4dc8b504.js → number-helper-aac382ed.js} +1 -1
  205. package/dist/esm/old-bcm-popover-box.entry.js +5 -5
  206. package/dist/esm/old-bcm-popover.entry.js +2 -2
  207. package/dist/esm/{package-ad16f749.js → package-3edf06a4.js} +1 -1
  208. package/dist/esm/{stepper-states-f96a4ba5.js → stepper-states-d7ac1d20.js} +1 -1
  209. package/dist/esm/{tooltip-helper-c4cb45ab.js → tooltip-helper-d7a40058.js} +6 -6
  210. package/dist/esm/{utils-b3338faf.js → utils-57652744.js} +1 -1
  211. package/dist/esm/{validators-4cbe3998.js → validators-7cb12260.js} +1 -1
  212. package/dist/types/components/molecules/linked/linked.d.ts +1 -3
  213. package/dist/types/components/organism/list/list.d.ts +1 -0
  214. package/dist/types/components/third-parts/rc-picker/date.d.ts +121 -6
  215. package/dist/types/components/third-parts/rc-picker/rc-picker.d.ts +35 -16
  216. package/dist/types/components.d.ts +52 -25
  217. package/package.json +7 -7
  218. package/dist/bromcom-ui/p-00f70814.entry.js +0 -5
  219. package/dist/bromcom-ui/p-8373bb17.entry.js +0 -5
  220. package/dist/bromcom-ui/p-be63b3e6.entry.js +0 -13
  221. package/dist/bromcom-ui/p-f82738d7.entry.js +0 -5
  222. package/dist/cjs/bcm-form.cjs.entry.js +0 -489
  223. package/dist/esm/bcm-form.entry.js +0 -485
@@ -1,5 +0,0 @@
1
- /*!
2
- * Built with Stencil
3
- * Copyright (c) Bromcom.
4
- */
5
- import{r as t,h as p,H as s,g as r}from"./p-170cf07d.js";import"./p-07c3eb8e.js";import"./p-5f87e129.js";import{G as o}from"./p-10fd8284.js";import"./p-f9be0aa3.js";import"./p-d153c7fc.js";import"./p-5ae0a59b.js";import"./p-f711588b.js";import{c as e}from"./p-64fad38b.js";import"./p-436364c8.js";import"./p-3c7a0345.js";import"./p-6edf985f.js";import"./p-85eedabc.js";import"./p-0f59535f.js";const i=class{constructor(p){t(this,p),this._id=o.UID(),this.el.slot="footer"}render(){return p(s,{class:e("tw-flex tw-flex-row tw-items-center tw-justify-end tw-gap-2 tw-px-6 tw-pb-6 tw-pt-2")},p("slot",null))}get el(){return r(this)}};export{i as bcm_modal_2_footer}
@@ -1,489 +0,0 @@
1
- /*!
2
- * Built with Stencil
3
- * Copyright (c) Bromcom.
4
- */
5
- 'use strict';
6
-
7
- Object.defineProperty(exports, '__esModule', { value: true });
8
-
9
- const index = require('./index-c591ecec.js');
10
- const index$1 = require('./index-95ae50d0.js');
11
- const isLoadDecorator = require('./is-load-decorator-15036f37.js');
12
- const stringHelper = require('./string-helper-fda7cbba.js');
13
- const utils = require('./utils-fc077139.js');
14
- require('./_commonjsHelpers-ed84c3ca.js');
15
- require('./bcm-7f703055.js');
16
-
17
- // /**
18
- // *
19
- // * @param type
20
- // */
21
- // export const required = (value:any) => {
22
- // if ( value || value != null ) {
23
- // return true
24
- // } else {
25
- // return true
26
- // }
27
- // }
28
- class rules {
29
- constructor() { }
30
- response(status, message) {
31
- return Object.assign(Object.assign({ valid: status }, (message && { message })), (!status && { type: 'error' }));
32
- }
33
- required(value, componentValidation) {
34
- let validation = this.response(true);
35
- if (value == '' || value == "" || value == undefined || value == null || value === false) {
36
- validation = this.response(false, 'This field is required.');
37
- }
38
- if (componentValidation) {
39
- if (!componentValidation.valid) {
40
- validation = this.response(false, componentValidation.errorText);
41
- }
42
- if (value instanceof Object) {
43
- if (value.isValid) {
44
- if (value.isValid == false)
45
- validation = this.response(false, 'This field is required.');
46
- }
47
- }
48
- }
49
- return validation;
50
- }
51
- selfValidation(input) {
52
- let validation = this.response(true);
53
- if (input.captionError != null || input.captionType == 'error') {
54
- validation = this.response(false, input.captionError);
55
- }
56
- return validation;
57
- }
58
- }
59
- const validate = new rules;
60
-
61
- const formCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}:host{display:block;margin-bottom:8px}:host(.hidden){display:none}";
62
-
63
- var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
64
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
65
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
66
- r = Reflect.decorate(decorators, target, key, desc);
67
- else
68
- for (var i = decorators.length - 1; i >= 0; i--)
69
- if (d = decorators[i])
70
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
71
- return c > 3 && r && Object.defineProperty(target, key, r), r;
72
- };
73
- const BcmForm = class {
74
- constructor(hostRef) {
75
- index.registerInstance(this, hostRef);
76
- this.bcmForm = index.createEvent(this, "bcm-form", 7);
77
- this.formData = {};
78
- this.inputs = [];
79
- this.duplicateInput = [];
80
- this.isValid = true;
81
- this.returnCaption = [];
82
- this.Bromcom = {
83
- errors: {
84
- targetFormNotExist: 'target form is not exist --> ',
85
- },
86
- inputComponents: {
87
- CHIP_GROUP: 'chip-group',
88
- // Birbirinin aynısı
89
- INPUT: 'input',
90
- TEXTAREA: 'textarea',
91
- //çok benzer
92
- SWITCH: 'switch',
93
- CHECKBOX: 'checkbox',
94
- RADIO_GROUP: 'radio-group',
95
- CHECKBOX_GROUP: 'checkbox-group',
96
- RANGE: 'range',
97
- // sadece value fırlatıyor
98
- FORM: 'form',
99
- FORM_GROUP: 'form-group',
100
- // *En vakit alacak => içinde select, autocomplete, listbox, treeview özellikleri var
101
- LIST: 'list',
102
- //
103
- COLORPICKER: 'colorpicker',
104
- DATE: 'date',
105
- // picker aslında tek komponent hepsi datetimepicker
106
- DATE_PICKER: 'date-picker',
107
- TIME_PICKER: 'time-picker',
108
- DATETIME_PICKER: 'datetime-picker',
109
- // silinecek komponentler
110
- SELECT: 'select',
111
- LISTBOX: 'listbox'
112
- },
113
- helpers: {
114
- randomId: function () {
115
- return Math.random().toString(16).slice(2, -1);
116
- },
117
- },
118
- };
119
- this._id = (Math.random() * 4).toString(16).replace('.', '');
120
- this.hidden = false;
121
- this.validation = false;
122
- this.name = "";
123
- this.value = undefined;
124
- this.autocomplete = false;
125
- }
126
- handleSubmit() {
127
- // if (lowercase(e.target.nodeName) === 'bcm-button') {
128
- // if (e.target.type === 'submit') {
129
- // this.submitFunction()
130
- // }
131
- // }
132
- }
133
- async submitFunction() {
134
- this.formData = {};
135
- this.inputs = [];
136
- this.selector = this.el;
137
- await this.getInputs();
138
- await utils.delay(10);
139
- const usrFrmData = await this.userFormData();
140
- var formData = { isValid: true, formData: usrFrmData };
141
- if (this.name) {
142
- formData = Object.assign(Object.assign({}, formData), { formName: this.name });
143
- }
144
- if (this.isValid) {
145
- this.bcmForm.emit(formData);
146
- return formData;
147
- }
148
- else {
149
- this.returnCaption = { isValid: false, 'message': 'Please fill in all inputs', 'errorDetails': this.returnCaption, formData: usrFrmData };
150
- if (this.name) {
151
- this.returnCaption = Object.assign(Object.assign({}, this.returnCaption), { formName: this.name });
152
- }
153
- this.bcmForm.emit(this.returnCaption);
154
- return this.returnCaption;
155
- }
156
- }
157
- async submit() {
158
- return Promise.resolve(this.submitFunction());
159
- }
160
- async set(data) {
161
- var _a;
162
- const validate = this.validation;
163
- this.validation = false;
164
- // debugger
165
- this.selector = this.el;
166
- await this.getInputs();
167
- if (data && ((_a = this.inputs) === null || _a === void 0 ? void 0 : _a.length) > 0) {
168
- for (const key of Object.keys(data)) {
169
- const item = this.inputs.find(item => item.name === key);
170
- if (item) {
171
- try {
172
- await item.set(data[key]);
173
- }
174
- catch (error) {
175
- console.log(item.nodeName, "set", error);
176
- }
177
- }
178
- }
179
- }
180
- this.validation = validate;
181
- }
182
- async get() {
183
- var _a;
184
- let formData = {};
185
- this.selector = this.el;
186
- const inputsCache = this.inputs;
187
- await this.getInputs();
188
- ((_a = this.inputs) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.inputs.forEach(async (item) => {
189
- try {
190
- const value = await item.get();
191
- formData = Object.assign(Object.assign({}, formData), { [item.name]: value });
192
- }
193
- catch (error) {
194
- console.log(`${item.nodeName} get error`);
195
- }
196
- });
197
- this.inputs = inputsCache;
198
- await utils.delay(10);
199
- return Promise.resolve(formData);
200
- }
201
- async setClear() {
202
- this.formData = {};
203
- this.inputs = [];
204
- this.selector = this.el;
205
- let clear = [];
206
- await this.getInputs();
207
- this.inputs.forEach(async (item) => {
208
- try {
209
- clear.push(await item.setClear());
210
- }
211
- catch (error) {
212
- console.log(error);
213
- }
214
- });
215
- await Promise.all(clear).then(() => {
216
- this.formData = {};
217
- this.inputs = [];
218
- this.duplicateInput = [];
219
- this.isValid = true;
220
- this.returnCaption = [];
221
- });
222
- await utils.delay(10);
223
- return Promise.resolve(true);
224
- }
225
- async resetCaption() {
226
- await utils.delay(10);
227
- this.formData = {};
228
- this.inputs = [];
229
- this.selector = this.el;
230
- await this.getInputs();
231
- for (const item of this.inputs) {
232
- try {
233
- await item.resetCaption();
234
- }
235
- catch (error) {
236
- console.log(item.nodeName, "rc p");
237
- }
238
- }
239
- await utils.delay(10);
240
- return Promise.resolve();
241
- }
242
- async config(_config) {
243
- if (_config['validation']) {
244
- typeof _config['validation'] == 'boolean'
245
- ? this.validation = _config['validation']
246
- : this.validation = false;
247
- }
248
- return true;
249
- }
250
- async getInputs() {
251
- var form = this.selector;
252
- if (!form) {
253
- console.warn(this.Bromcom.errors.targetFormNotExist + this.selector);
254
- return;
255
- }
256
- const inputs = Array.from(form.querySelectorAll('bcm-' + Object.values(this.Bromcom.inputComponents).join(',bcm-')));
257
- this.duplicateInput = [];
258
- // s-hn: Stencil private flag that contains host web component
259
- // https://github.com/ionic-team/stencil/blob/45388e95edb46ef357eb9ae37cd32bbb5bc1ed23/src/runtime/vdom/vdom-render.ts#L116
260
- const rootInputs = inputs.filter((input) => { var _a; return !input['s-hn'] || ((_a = input['s-hn']) === null || _a === void 0 ? void 0 : _a.nodeName) !== 'BcmForm'; });
261
- // debugger;
262
- for (const item of rootInputs) {
263
- if (stringHelper.StringHelper.lowercase(item.nodeName) == "bcm-checkbox-group") {
264
- let checkboxs = item.querySelectorAll("bcm-checkbox");
265
- if (checkboxs) {
266
- for (const checkbox of checkboxs) {
267
- this.duplicateInput.push(checkbox.name);
268
- }
269
- }
270
- }
271
- if (stringHelper.StringHelper.lowercase(item.nodeName) == "bcm-form") {
272
- const groupInputs = Array.from(item.querySelectorAll('bcm-' + Object.values(this.Bromcom.inputComponents).join(',bcm-')));
273
- let itemObject = {};
274
- for (const element of groupInputs) {
275
- var name = element.name;
276
- var value = element.value;
277
- itemObject = Object.assign(Object.assign({}, itemObject), { [name]: value });
278
- this.duplicateInput.push(element.name);
279
- }
280
- item.value = itemObject;
281
- let checkboxs = item.querySelectorAll("bcm-checkbox");
282
- if (checkboxs) {
283
- for (const checkbox of checkboxs) {
284
- this.duplicateInput.push(checkbox.name);
285
- }
286
- }
287
- }
288
- }
289
- await utils.delay(10);
290
- this.inputs = rootInputs;
291
- }
292
- getItemValue(item) {
293
- const tagName = item.tagName.toLowerCase().replace('bcm-', '');
294
- switch (tagName) {
295
- /* case 'date-picker':
296
- case 'datetime-picker':
297
- return item.value.timestamp
298
- case 'time-picker':
299
- return item.value.time */
300
- default:
301
- return item.value;
302
- }
303
- }
304
- isWrapperComponent(item) {
305
- return ['bcm-datetime-picker', 'bcm-date-picker', 'bcm-time-picker'].includes(item.toLowerCase());
306
- }
307
- isGroupComponent(item) {
308
- return ['bcm-checkbox-group'].includes(item.toLowerCase());
309
- }
310
- isListComponent(item) {
311
- return ['bcm-list'].includes(item.toLowerCase());
312
- }
313
- async userFormData() {
314
- this.formData = {};
315
- this.isValid = true;
316
- this.returnCaption = [];
317
- for (const item of this.inputs) {
318
- // const isListComponent = this.isListComponent(item.tagName);
319
- const isGroupComponent = this.isGroupComponent(item.tagName);
320
- const isWrapperComponent = this.isWrapperComponent(item.tagName);
321
- const wrapperComponent = isWrapperComponent && item;
322
- const input = isWrapperComponent
323
- ? await item.getInput() && item
324
- : item;
325
- // input.caption = ''
326
- // input.captionType = ''
327
- if (this.validation) {
328
- let valid = null;
329
- // if (isListComponent) {
330
- // valid = !(input.value && input.value.length > 0) && validate.required(input.value)
331
- // } else
332
- if (isWrapperComponent) {
333
- const isPickerValid = await wrapperComponent.isValid();
334
- valid = validate.required(input.value, isPickerValid);
335
- if (valid) {
336
- if (input.value instanceof Object) {
337
- if (input.value["isValid"] == false) {
338
- valid = validate.required("", isPickerValid);
339
- }
340
- }
341
- else {
342
- valid = validate.required(input.value, isPickerValid);
343
- }
344
- }
345
- }
346
- else if (isGroupComponent) {
347
- const childsCheckbox = utils.getChildElements(input, 'bcm-checkbox:not(#bcm-indeterminate-element)');
348
- if (childsCheckbox && childsCheckbox.length > 0) {
349
- for (const element of childsCheckbox) {
350
- if (element && element.required === true) {
351
- valid = validate.required(element.checked);
352
- if (!valid['valid']) {
353
- element.noCaption = false;
354
- element.captionError = valid['message'];
355
- element.captionType = valid['type'];
356
- }
357
- else {
358
- element.noCaption = input.noCaption;
359
- element.captionError = null;
360
- element.captionType = "default";
361
- }
362
- }
363
- }
364
- }
365
- }
366
- else {
367
- valid = validate.required(input.value);
368
- }
369
- if (input.required) {
370
- if (!valid['valid']) {
371
- input.captionError = valid['message'];
372
- input.captionType = valid['type'];
373
- }
374
- else {
375
- input.captionError = null;
376
- input.captionType = "default";
377
- }
378
- await utils.delay(10);
379
- const selfValidation = validate.selfValidation(input);
380
- if (valid['valid']) {
381
- if (!selfValidation['valid']) {
382
- input.captionError = selfValidation['message'];
383
- input.captionType = selfValidation['type'];
384
- }
385
- }
386
- }
387
- let name = input.name;
388
- let value = input.captionError;
389
- !input.hidden && input.captionType == 'error' && (this.returnCaption = [...Array.from(this.returnCaption), { [name]: value }],
390
- this.isValid = false);
391
- }
392
- if (input.name && !this.duplicateInput.includes(input.name)) {
393
- var itemValue = this.getItemValue(input);
394
- if (!itemValue || itemValue == undefined || itemValue == null) {
395
- itemValue = null;
396
- }
397
- this.formData[input.name] = itemValue;
398
- }
399
- }
400
- return this.formData;
401
- }
402
- async handleChange(e) {
403
- const isWrapperComponent = this.isWrapperComponent(e.target.tagName);
404
- const isGroupComponent = this.isGroupComponent(e.target.tagName);
405
- let target;
406
- if (isWrapperComponent) {
407
- target = e.target.getInput && await e.target.getInput() || e.target;
408
- }
409
- else if (isGroupComponent) {
410
- let req = false;
411
- const childsCheckbox = utils.getChildElements(e.target, 'bcm-checkbox:not(#bcm-indeterminate-element)');
412
- childsCheckbox.length > 0 && (childsCheckbox.forEach((element) => {
413
- if (element && element.required === true) {
414
- req = true;
415
- }
416
- }));
417
- target = Object.assign(Object.assign({}, e.target), { required: req });
418
- }
419
- else {
420
- target = e.target;
421
- }
422
- const value = e.target.value;
423
- const wrapperComponent = isWrapperComponent && e.target;
424
- var isPickerValid;
425
- if (isWrapperComponent) {
426
- isPickerValid = await wrapperComponent.isValid();
427
- }
428
- const tick = setTimeout(() => {
429
- if (target.required) {
430
- let valid = null;
431
- if (isWrapperComponent) {
432
- valid = validate.required(value, isPickerValid);
433
- if (valid) {
434
- if (value instanceof Object) {
435
- if (value["isValid"] == false) {
436
- valid = validate.required("", isPickerValid);
437
- }
438
- }
439
- else {
440
- valid = validate.required(value, isPickerValid);
441
- }
442
- }
443
- }
444
- else if (isGroupComponent) {
445
- const childsCheckbox = utils.getChildElements(e.target, 'bcm-checkbox:not(#bcm-indeterminate-element)');
446
- childsCheckbox.length > 0 && (childsCheckbox.forEach((element) => {
447
- if (element && element.required === true) {
448
- valid = validate.required(element.checked);
449
- if (!valid['valid']) {
450
- element.noCaption = false;
451
- element.captionError = valid['message'];
452
- element.captionType = valid['type'];
453
- }
454
- else {
455
- element.noCaption = e.target.noCaption;
456
- element.captionError = null;
457
- element.captionType = "default";
458
- }
459
- }
460
- }));
461
- }
462
- else {
463
- valid = validate.required(value);
464
- }
465
- if (valid['valid']) {
466
- target.captionError = null;
467
- target.captionType = null;
468
- }
469
- else {
470
- target.captionError = valid['message'];
471
- target.captionType = valid['type'];
472
- }
473
- }
474
- clearTimeout(tick);
475
- });
476
- this.value = await this.userFormData();
477
- }
478
- render() {
479
- const hostClasses = index$1.classnames(this.hidden ? 'hidden' : null);
480
- return (index.h(index.Host, { class: hostClasses }, index.h("form", { class: "bcm-form", autocomplete: this.autocomplete ? "on" : "off" }, index.h("slot", null))));
481
- }
482
- get el() { return index.getElement(this); }
483
- };
484
- __decorate([
485
- isLoadDecorator.IsLoad()
486
- ], BcmForm.prototype, "el", void 0);
487
- BcmForm.style = formCss;
488
-
489
- exports.bcm_form = BcmForm;