bromcom-ui 2.9.0-rc.17 → 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 (228) 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-e990bd92.js → p-04e7d8ac.js} +1 -1
  4. package/dist/bromcom-ui/{p-ec3f8fa1.entry.js → p-05fef42b.entry.js} +1 -1
  5. package/dist/bromcom-ui/{p-471e6f13.entry.js → p-06672174.entry.js} +1 -1
  6. package/dist/bromcom-ui/{p-b2f9f3de.entry.js → p-06c3ed21.entry.js} +1 -1
  7. package/dist/bromcom-ui/{p-b285932b.entry.js → p-09737f79.entry.js} +1 -1
  8. package/dist/bromcom-ui/{p-a2895a18.entry.js → p-0ac10364.entry.js} +1 -1
  9. package/dist/bromcom-ui/{p-0c705d0d.entry.js → p-0b81c02f.entry.js} +1 -1
  10. package/dist/bromcom-ui/p-0c774416.entry.js +7 -0
  11. package/dist/bromcom-ui/{p-7883b679.entry.js → p-0fb41a53.entry.js} +1 -1
  12. package/dist/bromcom-ui/{p-4e79863b.entry.js → p-14cafd64.entry.js} +1 -1
  13. package/dist/bromcom-ui/{p-0c8157d4.entry.js → p-150450da.entry.js} +1 -1
  14. package/dist/bromcom-ui/{p-685ac3f4.entry.js → p-1625ce05.entry.js} +1 -1
  15. package/dist/bromcom-ui/{p-6340db85.entry.js → p-1ae58853.entry.js} +1 -1
  16. package/dist/bromcom-ui/{p-d7ee1012.entry.js → p-1ba23d50.entry.js} +1 -1
  17. package/dist/bromcom-ui/{p-9319f7f4.entry.js → p-203446af.entry.js} +1 -1
  18. package/dist/bromcom-ui/p-2156f8f5.js +5 -0
  19. package/dist/bromcom-ui/{p-c59955f2.js → p-2208aada.js} +1 -1
  20. package/dist/bromcom-ui/{p-540f4773.entry.js → p-2505c9d9.entry.js} +1 -1
  21. package/dist/bromcom-ui/{p-b4ab469f.entry.js → p-26290ed5.entry.js} +1 -1
  22. package/dist/bromcom-ui/{p-5c6acefe.entry.js → p-29a6e6c0.entry.js} +1 -1
  23. package/dist/bromcom-ui/{p-beaa330c.entry.js → p-29ca858f.entry.js} +1 -1
  24. package/dist/bromcom-ui/{p-155da29a.entry.js → p-2dbf5ba5.entry.js} +1 -1
  25. package/dist/bromcom-ui/{p-20a6109c.entry.js → p-302fe8de.entry.js} +1 -1
  26. package/dist/bromcom-ui/{p-85626493.entry.js → p-30dbc7bd.entry.js} +1 -1
  27. package/dist/bromcom-ui/{p-eb499b2a.js → p-3363ca16.js} +1 -1
  28. package/dist/bromcom-ui/{p-b1a5a52f.entry.js → p-3a29e450.entry.js} +1 -1
  29. package/dist/bromcom-ui/{p-7f168998.js → p-3fa51f1b.js} +1 -1
  30. package/dist/bromcom-ui/{p-bc4d601b.js → p-41dc7f2d.js} +1 -1
  31. package/dist/bromcom-ui/{p-46207bba.entry.js → p-430c0a24.entry.js} +1 -1
  32. package/dist/bromcom-ui/{p-57919ad8.entry.js → p-47ce3a16.entry.js} +1 -1
  33. package/dist/bromcom-ui/{p-57e95f4d.entry.js → p-4a511d29.entry.js} +1 -1
  34. package/dist/bromcom-ui/{p-2ecdf256.entry.js → p-4a83d3fc.entry.js} +1 -1
  35. package/dist/bromcom-ui/{p-17d77ef9.entry.js → p-4be8e402.entry.js} +1 -1
  36. package/dist/bromcom-ui/{p-5b7405f1.entry.js → p-56e27911.entry.js} +1 -1
  37. package/dist/bromcom-ui/p-5c03d929.entry.js +5 -0
  38. package/dist/bromcom-ui/{p-07c3eb8e.js → p-61db1f1f.js} +1 -1
  39. package/dist/bromcom-ui/{p-279d1c89.entry.js → p-66da9512.entry.js} +1 -1
  40. package/dist/bromcom-ui/{p-5ae0a59b.js → p-7e44e6b5.js} +1 -1
  41. package/dist/bromcom-ui/{p-660a8daa.entry.js → p-80ee3d97.entry.js} +1 -1
  42. package/dist/bromcom-ui/{p-26474f78.js → p-85ca2b62.js} +1 -1
  43. package/dist/bromcom-ui/{p-ce5ecb3b.entry.js → p-87dda5e5.entry.js} +1 -1
  44. package/dist/bromcom-ui/{p-f8a945e0.entry.js → p-8a9e9aeb.entry.js} +1 -1
  45. package/dist/bromcom-ui/{p-ca8d81d3.entry.js → p-8b08527e.entry.js} +1 -1
  46. package/dist/bromcom-ui/{p-3c7a0345.js → p-8c018ae0.js} +1 -1
  47. package/dist/bromcom-ui/p-90c5221d.entry.js +5 -0
  48. package/dist/bromcom-ui/{p-cd730a64.js → p-917bd915.js} +1 -1
  49. package/dist/bromcom-ui/{p-c9c7067e.entry.js → p-99824717.entry.js} +1 -1
  50. package/dist/bromcom-ui/{p-225a4a91.entry.js → p-9e25eb82.entry.js} +1 -1
  51. package/dist/bromcom-ui/{p-ea34b1bb.entry.js → p-9ed18ccb.entry.js} +1 -1
  52. package/dist/bromcom-ui/{p-7460c390.entry.js → p-a2b00328.entry.js} +1 -1
  53. package/dist/bromcom-ui/{p-06f6bec2.entry.js → p-a3e268da.entry.js} +1 -1
  54. package/dist/bromcom-ui/{p-bbd40bdb.entry.js → p-a7763f93.entry.js} +1 -1
  55. package/dist/bromcom-ui/{p-78523120.entry.js → p-a8254f18.entry.js} +1 -1
  56. package/dist/bromcom-ui/{p-50e46665.entry.js → p-ad822bff.entry.js} +1 -1
  57. package/dist/bromcom-ui/{p-6a8553bd.entry.js → p-bb3239ef.entry.js} +1 -1
  58. package/dist/bromcom-ui/p-bc46e80c.entry.js +5 -0
  59. package/dist/bromcom-ui/{p-3d730230.entry.js → p-c1a992e7.entry.js} +1 -1
  60. package/dist/bromcom-ui/{p-8df92692.entry.js → p-c78ab3ca.entry.js} +1 -1
  61. package/dist/bromcom-ui/p-ce938f1e.entry.js +5 -0
  62. package/dist/bromcom-ui/{p-42ced8e3.entry.js → p-cf9d4122.entry.js} +1 -1
  63. package/dist/bromcom-ui/{p-f8998fe4.entry.js → p-d64879be.entry.js} +1 -1
  64. package/dist/bromcom-ui/{p-fb8e1424.entry.js → p-d85727a3.entry.js} +1 -1
  65. package/dist/bromcom-ui/{p-61cc61af.entry.js → p-e45a2a64.entry.js} +1 -1
  66. package/dist/bromcom-ui/{p-8f9077af.entry.js → p-e688b044.entry.js} +1 -1
  67. package/dist/bromcom-ui/p-e6e00bc4.entry.js +5 -0
  68. package/dist/bromcom-ui/{p-a829d1e0.entry.js → p-f2b3b5a8.entry.js} +1 -1
  69. package/dist/bromcom-ui/{p-3f883b7f.js → p-fc361b51.js} +1 -1
  70. package/dist/bromcom-ui/{p-7e05ccf7.entry.js → p-fe86c9e1.entry.js} +1 -1
  71. package/dist/cjs/bcm-accordion.cjs.entry.js +2 -2
  72. package/dist/cjs/bcm-alert.cjs.entry.js +2 -2
  73. package/dist/cjs/bcm-attendance.cjs.entry.js +2 -2
  74. package/dist/cjs/bcm-avatar_2.cjs.entry.js +4 -4
  75. package/dist/cjs/bcm-breadcrumb.cjs.entry.js +2 -2
  76. package/dist/cjs/bcm-button-group.cjs.entry.js +2 -2
  77. package/dist/cjs/{bcm-button_14.cjs.entry.js → bcm-button_15.cjs.entry.js} +3586 -2960
  78. package/dist/cjs/bcm-card.cjs.entry.js +2 -2
  79. package/dist/cjs/bcm-checkbox-group.cjs.entry.js +2 -2
  80. package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +2 -2
  81. package/dist/cjs/bcm-checkbox_2.cjs.entry.js +2 -2
  82. package/dist/cjs/bcm-chip-group.cjs.entry.js +4 -4
  83. package/dist/cjs/bcm-chip.cjs.entry.js +2 -2
  84. package/dist/cjs/bcm-collapse.cjs.entry.js +2 -2
  85. package/dist/cjs/bcm-color-input.cjs.entry.js +4 -4
  86. package/dist/cjs/bcm-default.cjs.entry.js +2 -2
  87. package/dist/cjs/bcm-drawer.cjs.entry.js +4 -4
  88. package/dist/cjs/bcm-dropdown.cjs.entry.js +3 -3
  89. package/dist/cjs/bcm-expansion-panel.cjs.entry.js +2 -2
  90. package/dist/cjs/bcm-input-custom.cjs.entry.js +2 -2
  91. package/dist/cjs/bcm-input-dropdown.cjs.entry.js +4 -4
  92. package/dist/cjs/bcm-item.cjs.entry.js +2 -2
  93. package/dist/cjs/bcm-items.cjs.entry.js +2 -2
  94. package/dist/cjs/bcm-list_3.cjs.entry.js +9 -6
  95. package/dist/cjs/bcm-menu.cjs.entry.js +5 -5
  96. package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +4 -4
  97. package/dist/cjs/bcm-modal-2-header.cjs.entry.js +4 -4
  98. package/dist/cjs/bcm-modal-2.cjs.entry.js +4 -4
  99. package/dist/cjs/bcm-modal.cjs.entry.js +2 -2
  100. package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +2 -2
  101. package/dist/cjs/bcm-popconfirm.cjs.entry.js +2 -2
  102. package/dist/cjs/bcm-popover.cjs.entry.js +4 -4
  103. package/dist/cjs/bcm-progress.cjs.entry.js +2 -2
  104. package/dist/cjs/bcm-radio-group.cjs.entry.js +4 -4
  105. package/dist/cjs/bcm-radio.cjs.entry.js +4 -4
  106. package/dist/cjs/bcm-range.cjs.entry.js +2 -2
  107. package/dist/cjs/bcm-skeleton.cjs.entry.js +2 -2
  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-switch.cjs.entry.js +2 -2
  111. package/dist/cjs/bcm-tab-group.cjs.entry.js +4 -4
  112. package/dist/cjs/bcm-tab-item-header.cjs.entry.js +4 -4
  113. package/dist/cjs/bcm-tab-item.cjs.entry.js +4 -4
  114. package/dist/cjs/bcm-table.cjs.entry.js +4 -4
  115. package/dist/cjs/bcm-tag.cjs.entry.js +3 -3
  116. package/dist/cjs/bcm-textarea.cjs.entry.js +3 -3
  117. package/dist/cjs/bcm-toast.cjs.entry.js +2 -2
  118. package/dist/cjs/bromcom-ui.cjs.js +3 -3
  119. package/dist/cjs/{generate-030514c7.js → generate-a614441c.js} +1 -1
  120. package/dist/cjs/{global-7a53c842.js → global-dbb478c2.js} +1 -1
  121. package/dist/cjs/{input-template-66b87638.js → input-template-2f000bbb.js} +1 -1
  122. package/dist/cjs/{json-parse-decarator-06d53544.js → json-parse-decarator-2831cc43.js} +1 -1
  123. package/dist/cjs/loader.cjs.js +3 -3
  124. package/dist/cjs/{number-helper-352187f7.js → number-helper-f401b29a.js} +1 -1
  125. package/dist/cjs/old-bcm-popover-box.cjs.entry.js +3 -3
  126. package/dist/cjs/old-bcm-popover.cjs.entry.js +2 -2
  127. package/dist/cjs/{package-11e34ed7.js → package-5175214b.js} +1 -1
  128. package/dist/cjs/{stepper-states-49f02d8f.js → stepper-states-fa6f45d2.js} +1 -1
  129. package/dist/cjs/{tooltip-helper-bb2b5e81.js → tooltip-helper-a9d5aaef.js} +3 -3
  130. package/dist/cjs/{validators-930ccb7e.js → validators-45097bb8.js} +1 -1
  131. package/dist/collection/components/molecules/input/input.js +0 -2
  132. package/dist/collection/components/molecules/linked/linked.js +3 -27
  133. package/dist/collection/components/organism/list/list.js +3 -18
  134. package/dist/collection/components/third-parts/rc-picker/date.js +202 -56
  135. package/dist/collection/components/third-parts/rc-picker/rc-picker.css +101 -4
  136. package/dist/collection/components/third-parts/rc-picker/rc-picker.js +274 -159
  137. package/dist/components/bcm-date.js +44 -15
  138. package/dist/components/generate.js +1 -1
  139. package/dist/components/input.js +0 -2
  140. package/dist/components/linked.js +4 -10
  141. package/dist/components/list.js +4 -1
  142. package/dist/components/rc-picker.js +3031 -2887
  143. package/dist/esm/bcm-accordion.entry.js +2 -2
  144. package/dist/esm/bcm-alert.entry.js +2 -2
  145. package/dist/esm/bcm-attendance.entry.js +2 -2
  146. package/dist/esm/bcm-avatar_2.entry.js +7 -7
  147. package/dist/esm/bcm-breadcrumb.entry.js +2 -2
  148. package/dist/esm/bcm-button-group.entry.js +2 -2
  149. package/dist/esm/{bcm-button_14.entry.js → bcm-button_15.entry.js} +3589 -2964
  150. package/dist/esm/bcm-card.entry.js +4 -4
  151. package/dist/esm/bcm-checkbox-group.entry.js +3 -3
  152. package/dist/esm/bcm-checkbox-lite_9.entry.js +3 -3
  153. package/dist/esm/bcm-checkbox_2.entry.js +4 -4
  154. package/dist/esm/bcm-chip-group.entry.js +7 -7
  155. package/dist/esm/bcm-chip.entry.js +4 -4
  156. package/dist/esm/bcm-collapse-group.entry.js +1 -1
  157. package/dist/esm/bcm-collapse.entry.js +2 -2
  158. package/dist/esm/bcm-color-input.entry.js +7 -7
  159. package/dist/esm/bcm-colorpicker.entry.js +2 -2
  160. package/dist/esm/bcm-default.entry.js +2 -2
  161. package/dist/esm/bcm-drawer.entry.js +7 -7
  162. package/dist/esm/bcm-dropdown.entry.js +3 -3
  163. package/dist/esm/bcm-expansion-panel.entry.js +4 -4
  164. package/dist/esm/bcm-input-custom.entry.js +2 -2
  165. package/dist/esm/bcm-input-dropdown.entry.js +7 -7
  166. package/dist/esm/bcm-item.entry.js +4 -4
  167. package/dist/esm/bcm-items.entry.js +2 -2
  168. package/dist/esm/bcm-list_3.entry.js +12 -9
  169. package/dist/esm/bcm-menu.entry.js +8 -8
  170. package/dist/esm/bcm-modal-2-footer.entry.js +7 -7
  171. package/dist/esm/bcm-modal-2-header.entry.js +7 -7
  172. package/dist/esm/bcm-modal-2.entry.js +7 -7
  173. package/dist/esm/bcm-modal.entry.js +2 -2
  174. package/dist/esm/bcm-old-tag_2.entry.js +1 -1
  175. package/dist/esm/bcm-popconfirm-box.entry.js +4 -4
  176. package/dist/esm/bcm-popconfirm.entry.js +2 -2
  177. package/dist/esm/bcm-popover.entry.js +7 -7
  178. package/dist/esm/bcm-progress.entry.js +4 -4
  179. package/dist/esm/bcm-radio-group.entry.js +7 -7
  180. package/dist/esm/bcm-radio.entry.js +7 -7
  181. package/dist/esm/bcm-range.entry.js +3 -3
  182. package/dist/esm/bcm-select.entry.js +1 -1
  183. package/dist/esm/bcm-skeleton.entry.js +2 -2
  184. package/dist/esm/bcm-step.entry.js +3 -3
  185. package/dist/esm/bcm-stepper.entry.js +8 -8
  186. package/dist/esm/bcm-switch.entry.js +3 -3
  187. package/dist/esm/bcm-tab-group.entry.js +7 -7
  188. package/dist/esm/bcm-tab-item-header.entry.js +7 -7
  189. package/dist/esm/bcm-tab-item.entry.js +7 -7
  190. package/dist/esm/bcm-table.entry.js +7 -7
  191. package/dist/esm/bcm-tabs-content.entry.js +1 -1
  192. package/dist/esm/bcm-tabs.entry.js +1 -1
  193. package/dist/esm/bcm-tag.entry.js +4 -4
  194. package/dist/esm/bcm-text.entry.js +2 -2
  195. package/dist/esm/bcm-textarea.entry.js +4 -4
  196. package/dist/esm/bcm-toast.entry.js +3 -3
  197. package/dist/esm/bromcom-ui.js +3 -3
  198. package/dist/esm/{color-helper-71b610e7.js → color-helper-845ba523.js} +1 -1
  199. package/dist/esm/{element-dragger-7ea06c76.js → element-dragger-89bb52fd.js} +1 -1
  200. package/dist/esm/{generate-bc4836ec.js → generate-f5397d67.js} +1 -1
  201. package/dist/esm/{global-f3c4deee.js → global-fca83dc9.js} +1 -1
  202. package/dist/esm/{input-template-488d5665.js → input-template-50de36a8.js} +1 -1
  203. package/dist/esm/{json-parse-decarator-db6d3ec5.js → json-parse-decarator-db88bf63.js} +1 -1
  204. package/dist/esm/loader.js +3 -3
  205. package/dist/esm/{number-helper-ff8702fd.js → number-helper-aac382ed.js} +1 -1
  206. package/dist/esm/old-bcm-popover-box.entry.js +5 -5
  207. package/dist/esm/old-bcm-popover.entry.js +2 -2
  208. package/dist/esm/{package-24fdb9f8.js → package-3edf06a4.js} +1 -1
  209. package/dist/esm/{stepper-states-a9f17d5f.js → stepper-states-d7ac1d20.js} +1 -1
  210. package/dist/esm/{tooltip-helper-db3aba86.js → tooltip-helper-d7a40058.js} +6 -6
  211. package/dist/esm/{utils-b3338faf.js → utils-57652744.js} +1 -1
  212. package/dist/esm/{validators-efb38781.js → validators-7cb12260.js} +1 -1
  213. package/dist/types/components/molecules/linked/linked.d.ts +1 -3
  214. package/dist/types/components/organism/list/list.d.ts +1 -0
  215. package/dist/types/components/third-parts/rc-picker/date.d.ts +121 -6
  216. package/dist/types/components/third-parts/rc-picker/rc-picker.d.ts +35 -16
  217. package/dist/types/components.d.ts +52 -25
  218. package/package.json +7 -7
  219. package/dist/bromcom-ui/p-00f70814.entry.js +0 -5
  220. package/dist/bromcom-ui/p-06e043df.entry.js +0 -13
  221. package/dist/bromcom-ui/p-64fb69ee.entry.js +0 -5
  222. package/dist/bromcom-ui/p-74221f9a.entry.js +0 -5
  223. package/dist/bromcom-ui/p-75d8b6cd.entry.js +0 -5
  224. package/dist/bromcom-ui/p-ac1b198d.js +0 -5
  225. package/dist/bromcom-ui/p-ba30fbea.entry.js +0 -5
  226. package/dist/bromcom-ui/p-c0d0d800.entry.js +0 -5
  227. package/dist/cjs/bcm-form.cjs.entry.js +0 -489
  228. package/dist/esm/bcm-form.entry.js +0 -485
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { Bcm } from "@bcm/model";
6
6
  import moment from "moment";
7
- import Picker from "rc-picker";
7
+ import Picker, { RangePicker } from "rc-picker";
8
8
  import momentGenerateConfig from "rc-picker/lib/generate/moment";
9
9
  import enUS from "rc-picker/lib/locale/en_US";
10
10
  import cs from "classnames";
@@ -12,99 +12,99 @@ import React from "react";
12
12
  import ReactDOM from "react-dom";
13
13
  export class BcmRcPicker {
14
14
  constructor() {
15
- this.val = undefined;
16
- this.type = "date";
17
- this.format = undefined;
15
+ this.manageDisabledDates = (current) => {
16
+ const { min, max, dates, custom } = this.disabledDates || {};
17
+ if (min && current.isBefore(this.convertDateToMoment(min)))
18
+ return true;
19
+ if (max && current.isAfter(this.convertDateToMoment(max)))
20
+ return true;
21
+ if (dates && dates.length > 0) {
22
+ return dates.some(date => current.isSame(this.convertDateToMoment(date), "day"));
23
+ }
24
+ if (custom) {
25
+ return custom(current);
26
+ }
27
+ return false;
28
+ };
29
+ this.manageDisabledTime = () => {
30
+ const { disabledHours, disabledMinutes, disabledSeconds } = this.disabledTime || {};
31
+ return Object.assign(Object.assign(Object.assign({}, (disabledHours && { disabledHours: () => disabledHours })), (disabledMinutes && { disabledMinutes: () => disabledMinutes })), (disabledSeconds && { disabledSeconds: () => disabledSeconds }));
32
+ };
33
+ this.convertDateToMoment = (date) => {
34
+ return date && date !== "invalid date" ? moment(date) : null;
35
+ };
18
36
  this.placeholder = undefined;
19
37
  this.size = Bcm.Size.medium;
20
- this.showTime = undefined;
21
- this.showToday = undefined;
22
- this.showNow = undefined;
23
- this.showHour = undefined;
24
- this.showMinute = undefined;
25
- this.showSecond = undefined;
26
- this.use12Hours = undefined;
27
- this.error = undefined;
28
- this.disabled = undefined;
38
+ this.error = false;
39
+ this.disabled = false;
29
40
  this.clearable = false;
30
- this.defaultValue = undefined;
31
- this.newValue = undefined;
32
- }
33
- setValue(newValue) {
34
- this.defaultValue = newValue;
35
- }
36
- handleChange(newValue) {
37
- this.setValue(newValue);
38
- this.bcmRCPickerChange.emit(newValue ? moment(newValue) : null);
41
+ this.type = "date";
42
+ this.format = undefined;
43
+ this.range = false;
44
+ this.showToday = true;
45
+ this.disabledDates = undefined;
46
+ this.showTime = false;
47
+ this.showNow = true;
48
+ this.showHour = true;
49
+ this.showMinute = true;
50
+ this.showSecond = false;
51
+ this.use12Hours = false;
52
+ this.hourStep = 1;
53
+ this.minuteStep = 1;
54
+ this.secondStep = 1;
55
+ this.hideDisabledOptions = false;
56
+ this.disabledTime = undefined;
57
+ this.newValue = null;
39
58
  }
40
59
  async set(value) {
41
- if (value && value != "invalid date") {
42
- this.newValue = moment(value);
43
- this.handleChange(moment(value));
44
- }
60
+ this.newValue = value ? moment(value) : null;
61
+ this.bcmRCPickerChange.emit(this.newValue);
45
62
  }
46
63
  componentDidRender() {
47
- // const onSelect = (newValue: Moment) => {
48
- // // console.log("Select:", newValue);
49
- // };
50
- const props = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (this.format && { format: this.format })), (this.clearable && { allowClear: this.clearable })), (this.placeholder && { placeholder: this.placeholder })), (this.error && { error: this.error })), (this.disabled && { disabled: this.disabled }));
64
+ const dateOptions = {
65
+ showToday: this.showToday,
66
+ disabledDate: current => this.manageDisabledDates(current),
67
+ };
68
+ const timeOptions = {
69
+ showNow: this.showNow,
70
+ showHour: this.showHour,
71
+ showMinute: this.showMinute,
72
+ showSecond: this.showSecond,
73
+ use12Hours: this.use12Hours,
74
+ hourStep: this.hourStep,
75
+ minuteStep: this.minuteStep,
76
+ secondStep: this.secondStep,
77
+ hideDisabledOptions: this.hideDisabledOptions,
78
+ disabledTime: () => this.manageDisabledTime(),
79
+ };
51
80
  const options = {
52
- time: {
53
- // showTime: this.showTime,
54
- // showToday: this.showToday,
55
- showNow: this.showNow,
56
- showHour: this.showHour,
57
- showMinute: this.showMinute,
58
- showSecond: this.showSecond,
59
- use12Hours: this.use12Hours,
60
- format: this.format,
61
- hourStep: 1,
62
- minuteStep: 1,
63
- secondStep: 1,
64
- hideDisabledOptions: false,
65
- // defaultValue: moment("08:00", "HH:mm"),
66
- disabledTime: () => ({
67
- // disabledHours: () => [0, 1, 2, 3, 4, 5, 6, 7, 13, 18, 19, 20, 21, 22, 23],
68
- // disabledMinutes: () => [1, 2, 3],
69
- // disabledSeconds: () => [1, 2, 3],
70
- }),
71
- active: true,
72
- },
73
- date: {
74
- format: this.format,
75
- showToday: this.showToday,
76
- },
81
+ time: Object.assign({}, timeOptions),
82
+ date: Object.assign({}, dateOptions),
77
83
  datetime: {
78
- showTime: true,
79
- showNow: this.showNow,
80
- showHour: this.showHour,
81
- showMinute: this.showMinute,
82
- showSecond: this.showSecond,
83
- use12Hours: this.use12Hours,
84
- format: this.format,
85
- showToday: this.showToday,
84
+ // ...dateOptions,
85
+ // ...timeOptions,
86
+ // showTime={{
87
+ // showSecond: false,
88
+ // defaultValue: moment('11:28:39', 'HH:mm:ss'),
89
+ // }}
90
+ // showToday
91
+ showTime: {
92
+ showSecond: this.showSecond,
93
+ // defaultValue: moment(),
94
+ },
95
+ showToday: true,
86
96
  },
87
97
  };
88
- const sharedProps = Object.assign(Object.assign(Object.assign(Object.assign({ generateConfig: momentGenerateConfig, value: this.newValue,
89
- // onSelect: (newValue: Moment) => this.handleChange(newValue),
90
- onChange: (newValue) => this.handleChange(newValue) }, props), { picker: this.type,
91
- // presets: [
92
- // {
93
- // label: "Hello World!",
94
- // value: moment(),
95
- // },
96
- // {
97
- // label: "Now",
98
- // value: () => moment(),
99
- // },
100
- // ]
101
- // showTime: true,
102
- // showSecond: false,
103
- prefixCls: "bcm-date", suffixIcon: " " }), options[this.type]), { autofocus: true });
104
- ReactDOM.render(React.createElement(Picker, Object.assign(Object.assign({}, sharedProps), { locale: enUS, className: cs("bcm-date--" + this.type, {
98
+ const sharedProps = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ generateConfig: momentGenerateConfig, value: this.newValue, onChange: newValue => this.set(newValue) }, (this.format && { format: this.format })), (this.clearable && { allowClear: this.clearable })), (this.placeholder && { placeholder: this.placeholder })), (this.error && { error: this.error })), (this.disabled && { disabled: this.disabled })), { format: this.format, picker: this.type }), options[this.type]), { prefixCls: "bcm-date", suffixIcon: " ", autofocus: true, locale: enUS, className: cs(`bcm-date--${this.type}`, {
105
99
  [`bcm-date--${this.size}`]: this.size,
106
- [`bcm-date--error`]: this.error,
107
- }) })), this.el);
100
+ "bcm-date--error": this.error,
101
+ }) });
102
+ if (this.range) {
103
+ ReactDOM.render(React.createElement(RangePicker, Object.assign({}, sharedProps)), this.el);
104
+ }
105
+ else {
106
+ ReactDOM.render(React.createElement(Picker, Object.assign({}, sharedProps)), this.el);
107
+ }
108
108
  }
109
109
  static get is() { return "bcm-rc-picker"; }
110
110
  static get originalStyleUrls() {
@@ -119,12 +119,12 @@ export class BcmRcPicker {
119
119
  }
120
120
  static get properties() {
121
121
  return {
122
- "val": {
123
- "type": "any",
124
- "mutable": true,
122
+ "placeholder": {
123
+ "type": "string",
124
+ "mutable": false,
125
125
  "complexType": {
126
- "original": "any",
127
- "resolved": "any",
126
+ "original": "string",
127
+ "resolved": "string",
128
128
  "references": {}
129
129
  },
130
130
  "required": false,
@@ -133,15 +133,38 @@ export class BcmRcPicker {
133
133
  "tags": [],
134
134
  "text": ""
135
135
  },
136
- "attribute": "val",
136
+ "attribute": "placeholder",
137
137
  "reflect": false
138
138
  },
139
- "type": {
139
+ "size": {
140
140
  "type": "string",
141
141
  "mutable": false,
142
142
  "complexType": {
143
- "original": "\"time\" | \"date\" | \"week\" | \"month\" | \"year\" | \"datetime\"",
144
- "resolved": "\"date\" | \"datetime\" | \"month\" | \"time\" | \"week\" | \"year\"",
143
+ "original": "SizeTypes",
144
+ "resolved": "\"large\" | \"medium\" | \"small\"",
145
+ "references": {
146
+ "SizeTypes": {
147
+ "location": "import",
148
+ "path": "@bcm/model"
149
+ }
150
+ }
151
+ },
152
+ "required": false,
153
+ "optional": false,
154
+ "docs": {
155
+ "tags": [],
156
+ "text": ""
157
+ },
158
+ "attribute": "size",
159
+ "reflect": true,
160
+ "defaultValue": "Bcm.Size.medium"
161
+ },
162
+ "error": {
163
+ "type": "boolean",
164
+ "mutable": false,
165
+ "complexType": {
166
+ "original": "boolean",
167
+ "resolved": "boolean",
145
168
  "references": {}
146
169
  },
147
170
  "required": false,
@@ -150,16 +173,16 @@ export class BcmRcPicker {
150
173
  "tags": [],
151
174
  "text": ""
152
175
  },
153
- "attribute": "type",
176
+ "attribute": "error",
154
177
  "reflect": false,
155
- "defaultValue": "\"date\""
178
+ "defaultValue": "false"
156
179
  },
157
- "format": {
158
- "type": "string",
180
+ "disabled": {
181
+ "type": "boolean",
159
182
  "mutable": false,
160
183
  "complexType": {
161
- "original": "string",
162
- "resolved": "string",
184
+ "original": "boolean",
185
+ "resolved": "boolean",
163
186
  "references": {}
164
187
  },
165
188
  "required": false,
@@ -168,15 +191,16 @@ export class BcmRcPicker {
168
191
  "tags": [],
169
192
  "text": ""
170
193
  },
171
- "attribute": "format",
172
- "reflect": false
194
+ "attribute": "disabled",
195
+ "reflect": false,
196
+ "defaultValue": "false"
173
197
  },
174
- "placeholder": {
175
- "type": "string",
198
+ "clearable": {
199
+ "type": "boolean",
176
200
  "mutable": false,
177
201
  "complexType": {
178
- "original": "string",
179
- "resolved": "string",
202
+ "original": "boolean",
203
+ "resolved": "boolean",
180
204
  "references": {}
181
205
  },
182
206
  "required": false,
@@ -185,21 +209,17 @@ export class BcmRcPicker {
185
209
  "tags": [],
186
210
  "text": ""
187
211
  },
188
- "attribute": "placeholder",
189
- "reflect": false
212
+ "attribute": "clearable",
213
+ "reflect": false,
214
+ "defaultValue": "false"
190
215
  },
191
- "size": {
216
+ "type": {
192
217
  "type": "string",
193
218
  "mutable": false,
194
219
  "complexType": {
195
- "original": "SizeTypes",
196
- "resolved": "\"large\" | \"medium\" | \"small\"",
197
- "references": {
198
- "SizeTypes": {
199
- "location": "import",
200
- "path": "@bcm/model"
201
- }
202
- }
220
+ "original": "\"time\" | \"date\" | \"week\" | \"month\" | \"year\" | \"datetime\"",
221
+ "resolved": "\"date\" | \"datetime\" | \"month\" | \"time\" | \"week\" | \"year\"",
222
+ "references": {}
203
223
  },
204
224
  "required": false,
205
225
  "optional": false,
@@ -207,11 +227,11 @@ export class BcmRcPicker {
207
227
  "tags": [],
208
228
  "text": ""
209
229
  },
210
- "attribute": "size",
211
- "reflect": true,
212
- "defaultValue": "Bcm.Size.medium"
230
+ "attribute": "type",
231
+ "reflect": false,
232
+ "defaultValue": "\"date\""
213
233
  },
214
- "showTime": {
234
+ "format": {
215
235
  "type": "any",
216
236
  "mutable": false,
217
237
  "complexType": {
@@ -225,15 +245,33 @@ export class BcmRcPicker {
225
245
  "tags": [],
226
246
  "text": ""
227
247
  },
228
- "attribute": "show-time",
248
+ "attribute": "format",
229
249
  "reflect": false
230
250
  },
251
+ "range": {
252
+ "type": "boolean",
253
+ "mutable": false,
254
+ "complexType": {
255
+ "original": "boolean",
256
+ "resolved": "boolean",
257
+ "references": {}
258
+ },
259
+ "required": false,
260
+ "optional": false,
261
+ "docs": {
262
+ "tags": [],
263
+ "text": ""
264
+ },
265
+ "attribute": "range",
266
+ "reflect": false,
267
+ "defaultValue": "false"
268
+ },
231
269
  "showToday": {
232
- "type": "any",
270
+ "type": "boolean",
233
271
  "mutable": false,
234
272
  "complexType": {
235
- "original": "any",
236
- "resolved": "any",
273
+ "original": "boolean",
274
+ "resolved": "boolean",
237
275
  "references": {}
238
276
  },
239
277
  "required": false,
@@ -243,14 +281,48 @@ export class BcmRcPicker {
243
281
  "text": ""
244
282
  },
245
283
  "attribute": "show-today",
246
- "reflect": false
284
+ "reflect": false,
285
+ "defaultValue": "true"
286
+ },
287
+ "disabledDates": {
288
+ "type": "unknown",
289
+ "mutable": false,
290
+ "complexType": {
291
+ "original": "{ min: any; max: any; dates: any; custom: any; }",
292
+ "resolved": "{ min: any; max: any; dates: any; custom: any; }",
293
+ "references": {}
294
+ },
295
+ "required": false,
296
+ "optional": false,
297
+ "docs": {
298
+ "tags": [],
299
+ "text": ""
300
+ }
301
+ },
302
+ "showTime": {
303
+ "type": "boolean",
304
+ "mutable": false,
305
+ "complexType": {
306
+ "original": "boolean",
307
+ "resolved": "boolean",
308
+ "references": {}
309
+ },
310
+ "required": false,
311
+ "optional": false,
312
+ "docs": {
313
+ "tags": [],
314
+ "text": ""
315
+ },
316
+ "attribute": "show-time",
317
+ "reflect": false,
318
+ "defaultValue": "false"
247
319
  },
248
320
  "showNow": {
249
- "type": "any",
321
+ "type": "boolean",
250
322
  "mutable": false,
251
323
  "complexType": {
252
- "original": "any",
253
- "resolved": "any",
324
+ "original": "boolean",
325
+ "resolved": "boolean",
254
326
  "references": {}
255
327
  },
256
328
  "required": false,
@@ -260,14 +332,15 @@ export class BcmRcPicker {
260
332
  "text": ""
261
333
  },
262
334
  "attribute": "show-now",
263
- "reflect": false
335
+ "reflect": false,
336
+ "defaultValue": "true"
264
337
  },
265
338
  "showHour": {
266
- "type": "any",
339
+ "type": "boolean",
267
340
  "mutable": false,
268
341
  "complexType": {
269
- "original": "any",
270
- "resolved": "any",
342
+ "original": "boolean",
343
+ "resolved": "boolean",
271
344
  "references": {}
272
345
  },
273
346
  "required": false,
@@ -277,14 +350,15 @@ export class BcmRcPicker {
277
350
  "text": ""
278
351
  },
279
352
  "attribute": "show-hour",
280
- "reflect": false
353
+ "reflect": false,
354
+ "defaultValue": "true"
281
355
  },
282
356
  "showMinute": {
283
- "type": "any",
357
+ "type": "boolean",
284
358
  "mutable": false,
285
359
  "complexType": {
286
- "original": "any",
287
- "resolved": "any",
360
+ "original": "boolean",
361
+ "resolved": "boolean",
288
362
  "references": {}
289
363
  },
290
364
  "required": false,
@@ -294,14 +368,15 @@ export class BcmRcPicker {
294
368
  "text": ""
295
369
  },
296
370
  "attribute": "show-minute",
297
- "reflect": false
371
+ "reflect": false,
372
+ "defaultValue": "true"
298
373
  },
299
374
  "showSecond": {
300
- "type": "any",
375
+ "type": "boolean",
301
376
  "mutable": false,
302
377
  "complexType": {
303
- "original": "any",
304
- "resolved": "any",
378
+ "original": "boolean",
379
+ "resolved": "boolean",
305
380
  "references": {}
306
381
  },
307
382
  "required": false,
@@ -311,14 +386,15 @@ export class BcmRcPicker {
311
386
  "text": ""
312
387
  },
313
388
  "attribute": "show-second",
314
- "reflect": false
389
+ "reflect": false,
390
+ "defaultValue": "false"
315
391
  },
316
392
  "use12Hours": {
317
- "type": "any",
393
+ "type": "boolean",
318
394
  "mutable": false,
319
395
  "complexType": {
320
- "original": "any",
321
- "resolved": "any",
396
+ "original": "boolean",
397
+ "resolved": "boolean",
322
398
  "references": {}
323
399
  },
324
400
  "required": false,
@@ -328,14 +404,15 @@ export class BcmRcPicker {
328
404
  "text": ""
329
405
  },
330
406
  "attribute": "use-1-2-hours",
331
- "reflect": false
407
+ "reflect": false,
408
+ "defaultValue": "false"
332
409
  },
333
- "error": {
334
- "type": "any",
410
+ "hourStep": {
411
+ "type": "number",
335
412
  "mutable": false,
336
413
  "complexType": {
337
- "original": "any",
338
- "resolved": "any",
414
+ "original": "number",
415
+ "resolved": "number",
339
416
  "references": {}
340
417
  },
341
418
  "required": false,
@@ -344,15 +421,16 @@ export class BcmRcPicker {
344
421
  "tags": [],
345
422
  "text": ""
346
423
  },
347
- "attribute": "error",
348
- "reflect": false
424
+ "attribute": "hour-step",
425
+ "reflect": false,
426
+ "defaultValue": "1"
349
427
  },
350
- "disabled": {
351
- "type": "any",
428
+ "minuteStep": {
429
+ "type": "number",
352
430
  "mutable": false,
353
431
  "complexType": {
354
- "original": "any",
355
- "resolved": "any",
432
+ "original": "number",
433
+ "resolved": "number",
356
434
  "references": {}
357
435
  },
358
436
  "required": false,
@@ -361,10 +439,29 @@ export class BcmRcPicker {
361
439
  "tags": [],
362
440
  "text": ""
363
441
  },
364
- "attribute": "disabled",
365
- "reflect": false
442
+ "attribute": "minute-step",
443
+ "reflect": false,
444
+ "defaultValue": "1"
366
445
  },
367
- "clearable": {
446
+ "secondStep": {
447
+ "type": "number",
448
+ "mutable": false,
449
+ "complexType": {
450
+ "original": "number",
451
+ "resolved": "number",
452
+ "references": {}
453
+ },
454
+ "required": false,
455
+ "optional": false,
456
+ "docs": {
457
+ "tags": [],
458
+ "text": ""
459
+ },
460
+ "attribute": "second-step",
461
+ "reflect": false,
462
+ "defaultValue": "1"
463
+ },
464
+ "hideDisabledOptions": {
368
465
  "type": "boolean",
369
466
  "mutable": false,
370
467
  "complexType": {
@@ -378,15 +475,29 @@ export class BcmRcPicker {
378
475
  "tags": [],
379
476
  "text": ""
380
477
  },
381
- "attribute": "clearable",
478
+ "attribute": "hide-disabled-options",
382
479
  "reflect": false,
383
480
  "defaultValue": "false"
481
+ },
482
+ "disabledTime": {
483
+ "type": "unknown",
484
+ "mutable": false,
485
+ "complexType": {
486
+ "original": "{ disabledHours: any; disabledMinutes: any; disabledSeconds: any }",
487
+ "resolved": "{ disabledHours: any; disabledMinutes: any; disabledSeconds: any; }",
488
+ "references": {}
489
+ },
490
+ "required": false,
491
+ "optional": false,
492
+ "docs": {
493
+ "tags": [],
494
+ "text": ""
495
+ }
384
496
  }
385
497
  };
386
498
  }
387
499
  static get states() {
388
500
  return {
389
- "defaultValue": {},
390
501
  "newValue": {}
391
502
  };
392
503
  }
@@ -412,7 +523,7 @@ export class BcmRcPicker {
412
523
  return {
413
524
  "set": {
414
525
  "complexType": {
415
- "signature": "(value: any) => Promise<void>",
526
+ "signature": "(value: Moment | null) => Promise<void>",
416
527
  "parameters": [{
417
528
  "tags": [],
418
529
  "text": ""
@@ -420,6 +531,10 @@ export class BcmRcPicker {
420
531
  "references": {
421
532
  "Promise": {
422
533
  "location": "global"
534
+ },
535
+ "Moment": {
536
+ "location": "import",
537
+ "path": "moment"
423
538
  }
424
539
  },
425
540
  "return": "Promise<void>"