@cldemo/ui-kit 1.1.3 → 1.1.5

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 (321) hide show
  1. package/buildLibs/all/index.cjs +8 -8
  2. package/buildLibs/all/index.css +1 -1
  3. package/buildLibs/all/index.js +12158 -12048
  4. package/buildLibs/common/globalConfig.cjs +1 -1
  5. package/buildLibs/common/globalConfig.js +29 -15
  6. package/buildLibs/common/i18n/en.cjs +1 -1
  7. package/buildLibs/common/i18n/en.js +3 -1
  8. package/buildLibs/common/i18n/zh_CN.cjs +1 -1
  9. package/buildLibs/common/i18n/zh_CN.js +3 -1
  10. package/buildLibs/common/index.cjs +1 -1
  11. package/buildLibs/common/index.js +26 -24
  12. package/buildLibs/mobile/index.cjs +5 -5
  13. package/buildLibs/mobile/index.css +1 -1
  14. package/buildLibs/mobile/index.js +5903 -5852
  15. package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-4TeN_Yn-.js +310 -0
  16. package/buildLibs/{utils/Shared/Index.vue_vue_type_script_setup_true_lang-DKMVQrVU.js → modules/shared/Index.vue_vue_type_script_setup_true_lang-B-T2hoSW.js} +66 -60
  17. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-BOcOO9-n.js → Index.vue_vue_type_script_setup_true_lang-BBjneEVa.js} +386 -375
  18. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-gwA_FyLx.js → Index.vue_vue_type_script_setup_true_lang-BIH4-mgs.js} +1 -1
  19. package/buildLibs/{utils/Shared/Index.vue_vue_type_script_setup_true_lang-CgdGs-U2.js → modules/shared/Index.vue_vue_type_script_setup_true_lang-BVGrVxFC.js} +68 -60
  20. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-B2Ste7lk.js → Index.vue_vue_type_script_setup_true_lang-Bi8DPjJz.js} +1 -1
  21. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-RRUPY9bd.js → Index.vue_vue_type_script_setup_true_lang-CMfPrFu4.js} +154 -146
  22. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-CKoVf-v1.js → Index.vue_vue_type_script_setup_true_lang-D4je4ahg.js} +3 -3
  23. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-XiSSYx4X.js → Index.vue_vue_type_script_setup_true_lang-D7YeNBdk.js} +120 -113
  24. package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-DC1L_0IK.js +2536 -0
  25. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-CRKrLCa6.js → Index.vue_vue_type_script_setup_true_lang-DFeBj9IN.js} +209 -201
  26. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-D0g1xGPL.js → Index.vue_vue_type_script_setup_true_lang-DM74NqhN.js} +8 -8
  27. package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-DPcqZPoO.js +1533 -0
  28. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-Bj1vSCM8.js → Index.vue_vue_type_script_setup_true_lang-DPxMsZuy.js} +2 -2
  29. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-C0DgaU5I.js → Index.vue_vue_type_script_setup_true_lang-D_eRjg8p.js} +54 -48
  30. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-G8UXhRvM.js → Index.vue_vue_type_script_setup_true_lang-Df0iiX1E.js} +1 -1
  31. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-DqZBB8fM.js → Index.vue_vue_type_script_setup_true_lang-DjcrAnYd.js} +2 -2
  32. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-Cyi6TkkK.js → Index.vue_vue_type_script_setup_true_lang-UqloO5cR.js} +1 -1
  33. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-6Rsz2dYw.js → Index.vue_vue_type_script_setup_true_lang-ljMopEep.js} +1 -1
  34. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-CIA-Kc0M.js → Index.vue_vue_type_script_setup_true_lang-vizZ7Mti.js} +6 -5
  35. package/buildLibs/{utils/Shared/Index.vue_vue_type_script_setup_true_lang-Cg_benGj.js → modules/shared/Index.vue_vue_type_script_setup_true_lang-wS3dtCDx.js} +63 -55
  36. package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-x7Q4MNNE.js +254 -0
  37. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-BbD4hLPT.js → Index.vue_vue_type_script_setup_true_lang-xpySjof2.js} +2 -2
  38. package/buildLibs/modules/shared/{List.vue_vue_type_script_setup_true_lang-Chy0eAps.js → List.vue_vue_type_script_setup_true_lang-F-n2xPeF.js} +1 -1
  39. package/buildLibs/modules/shared/{One.vue_vue_type_script_setup_true_lang-BR8b8AgK.js → One.vue_vue_type_script_setup_true_lang-BPQ-99F1.js} +1 -1
  40. package/buildLibs/modules/shared/{One.vue_vue_type_script_setup_true_lang-bPEj13DH.js → One.vue_vue_type_script_setup_true_lang-CnkGjequ.js} +1 -1
  41. package/buildLibs/modules/shared/{Validate.vue_vue_type_script_setup_true_lang-3s_3ut9M.js → Validate.vue_vue_type_script_setup_true_lang-D-BFbuqJ.js} +103 -93
  42. package/buildLibs/modules/ui-kit.css +1 -1
  43. package/buildLibs/styles/Common/IconFont-base.css +3 -3
  44. package/buildLibs/styles/Common/Input-base.css +10 -0
  45. package/buildLibs/styles/Element/ClInputTextarea.css +2 -2
  46. package/buildLibs/styles/Web/ClDatetime.css +2 -1
  47. package/buildLibs/styles/Web/ClInputTag.css +4 -3
  48. package/buildLibs/styles/Web/ClPaginate.css +2 -1
  49. package/buildLibs/styles/Web/ClSelect.css +2 -1
  50. package/buildLibs/styles/Web/ClSelectCascade.css +2 -1
  51. package/buildLibs/styles/Web/ClSelectTree.css +2 -1
  52. package/buildLibs/styles/Web/ClSelectmove.css +2 -1
  53. package/buildLibs/styles/Web/ClTable.css +2 -1
  54. package/buildLibs/styles/Web/ClXeditable.css +4 -3
  55. package/buildLibs/types/All/index.d.ts +1 -1
  56. package/buildLibs/types/Common/globalConfig.d.ts +29 -0
  57. package/buildLibs/types/Common/globalTypes.d.ts +11 -0
  58. package/buildLibs/types/Common/i18n/en.d.ts +2 -0
  59. package/buildLibs/types/Common/i18n/zh_CN.d.ts +2 -0
  60. package/buildLibs/types/Common/index.d.ts +1 -1
  61. package/buildLibs/types/Element/CheckBox/Index.vue.d.ts +9 -0
  62. package/buildLibs/types/Element/Input/Index.vue.d.ts +9 -0
  63. package/buildLibs/types/Element/InputNumber/Index.vue.d.ts +9 -0
  64. package/buildLibs/types/Element/InputNumberStepper/Index.vue.d.ts +9 -0
  65. package/buildLibs/types/Element/InputTextarea/Index.vue.d.ts +9 -0
  66. package/buildLibs/types/Element/Radio/Index.vue.d.ts +9 -0
  67. package/buildLibs/types/Web/DateTime/Index.vue.d.ts +9 -0
  68. package/buildLibs/types/Web/FileUpload/Index.vue.d.ts +9 -0
  69. package/buildLibs/types/Web/Select/Index.vue.d.ts +9 -0
  70. package/buildLibs/types/Web/SelectCascade/Index.vue.d.ts +9 -0
  71. package/buildLibs/types/Web/SelectMove/Index.vue.d.ts +9 -0
  72. package/buildLibs/types/Web/SelectTag/Index.vue.d.ts +9 -0
  73. package/buildLibs/types/Web/SelectTree/Index.vue.d.ts +9 -0
  74. package/buildLibs/types/Web/Tree/Index.vue.d.ts +9 -0
  75. package/buildLibs/types/Web/componentsInstalls.d.ts +90 -0
  76. package/buildLibs/utils/Element/ClButton.cjs +1 -1
  77. package/buildLibs/utils/Element/ClButton.js +1 -1
  78. package/buildLibs/utils/Element/ClCheckbox.cjs +1 -1
  79. package/buildLibs/utils/Element/ClCheckbox.js +1 -1
  80. package/buildLibs/utils/Element/ClCheckboxOne.cjs +1 -1
  81. package/buildLibs/utils/Element/ClCheckboxOne.js +1 -1
  82. package/buildLibs/utils/Element/ClClipboard.cjs +1 -1
  83. package/buildLibs/utils/Element/ClClipboard.js +1 -1
  84. package/buildLibs/utils/Element/ClCollapse.cjs +1 -1
  85. package/buildLibs/utils/Element/ClCollapse.js +1 -1
  86. package/buildLibs/utils/Element/ClFormValidate.cjs +1 -1
  87. package/buildLibs/utils/Element/ClFormValidate.js +1 -1
  88. package/buildLibs/utils/Element/ClIconFont.cjs +1 -1
  89. package/buildLibs/utils/Element/ClIconFont.js +1 -1
  90. package/buildLibs/utils/Element/ClInput.cjs +1 -1
  91. package/buildLibs/utils/Element/ClInput.js +1 -1
  92. package/buildLibs/utils/Element/ClInputCaptcha.cjs +1 -1
  93. package/buildLibs/utils/Element/ClInputCaptcha.js +1 -1
  94. package/buildLibs/utils/Element/ClInputNumber.cjs +1 -1
  95. package/buildLibs/utils/Element/ClInputNumber.js +1 -1
  96. package/buildLibs/utils/Element/ClInputNumberStepper.cjs +1 -1
  97. package/buildLibs/utils/Element/ClInputNumberStepper.js +1 -1
  98. package/buildLibs/utils/Element/ClInputPassword.cjs +1 -1
  99. package/buildLibs/utils/Element/ClInputPassword.js +2 -2
  100. package/buildLibs/utils/Element/ClInputSearch.cjs +1 -1
  101. package/buildLibs/utils/Element/ClInputSearch.js +1 -1
  102. package/buildLibs/utils/Element/ClInputTextarea.cjs +1 -1
  103. package/buildLibs/utils/Element/ClInputTextarea.js +1 -1
  104. package/buildLibs/utils/Element/ClModal.cjs +1 -1
  105. package/buildLibs/utils/Element/ClModal.js +1 -1
  106. package/buildLibs/utils/Element/ClRadio.cjs +1 -1
  107. package/buildLibs/utils/Element/ClRadio.js +1 -1
  108. package/buildLibs/utils/Element/ClRadioOne.cjs +1 -1
  109. package/buildLibs/utils/Element/ClRadioOne.js +1 -1
  110. package/buildLibs/utils/Element/ClTags.cjs +1 -1
  111. package/buildLibs/utils/Element/ClTags.js +1 -1
  112. package/buildLibs/utils/Element/__provide__/Validate.cjs +1 -1
  113. package/buildLibs/utils/Element/__provide__/Validate.js +13 -3
  114. package/buildLibs/utils/Mobile/ClActionSheet.cjs +1 -1
  115. package/buildLibs/utils/Mobile/ClActionSheet.js +1 -1
  116. package/buildLibs/utils/Mobile/ClBackTop.cjs +1 -1
  117. package/buildLibs/utils/Mobile/ClBackTop.js +1 -1
  118. package/buildLibs/utils/Mobile/ClBanner.cjs +1 -1
  119. package/buildLibs/utils/Mobile/ClBanner.js +1 -1
  120. package/buildLibs/utils/Mobile/ClCalendarM.cjs +1 -1
  121. package/buildLibs/utils/Mobile/ClCalendarM.js +1 -1
  122. package/buildLibs/utils/Mobile/ClCell.cjs +1 -1
  123. package/buildLibs/utils/Mobile/ClCell.js +1 -1
  124. package/buildLibs/utils/Mobile/ClCodeLegendM.cjs +1 -1
  125. package/buildLibs/utils/Mobile/ClCodeLegendM.js +2 -2
  126. package/buildLibs/utils/Mobile/ClCropperM.cjs +1 -1
  127. package/buildLibs/utils/Mobile/ClCropperM.js +1 -1
  128. package/buildLibs/utils/Mobile/ClDropdownMenuMItem.cjs +1 -1
  129. package/buildLibs/utils/Mobile/ClDropdownMenuMItem.js +1 -1
  130. package/buildLibs/utils/Mobile/ClGrid.cjs +1 -1
  131. package/buildLibs/utils/Mobile/ClGrid.js +1 -1
  132. package/buildLibs/utils/Mobile/ClNavBar.cjs +1 -1
  133. package/buildLibs/utils/Mobile/ClNavBar.js +1 -1
  134. package/buildLibs/utils/Mobile/ClNoticeBar.cjs +1 -1
  135. package/buildLibs/utils/Mobile/ClNoticeBar.js +1 -1
  136. package/buildLibs/utils/Mobile/ClNotifyM.cjs +1 -1
  137. package/buildLibs/utils/Mobile/ClNotifyM.js +1 -1
  138. package/buildLibs/utils/Mobile/ClNumberKeyboard.cjs +1 -1
  139. package/buildLibs/utils/Mobile/ClNumberKeyboard.js +1 -1
  140. package/buildLibs/utils/Mobile/ClPickerCascader.cjs +1 -1
  141. package/buildLibs/utils/Mobile/ClPickerCascader.js +1 -1
  142. package/buildLibs/utils/Mobile/ClPullToRefresh.cjs +1 -1
  143. package/buildLibs/utils/Mobile/ClPullToRefresh.js +1 -1
  144. package/buildLibs/utils/Mobile/ClRate.cjs +1 -1
  145. package/buildLibs/utils/Mobile/ClRate.js +1 -1
  146. package/buildLibs/utils/Mobile/ClScrollCard.cjs +1 -1
  147. package/buildLibs/utils/Mobile/ClScrollCard.js +1 -1
  148. package/buildLibs/utils/Mobile/ClSharePanel.cjs +1 -1
  149. package/buildLibs/utils/Mobile/ClSharePanel.js +1 -1
  150. package/buildLibs/utils/Mobile/ClSidebarSelect.cjs +1 -1
  151. package/buildLibs/utils/Mobile/ClSidebarSelect.js +1 -1
  152. package/buildLibs/utils/Mobile/ClSteps.cjs +1 -1
  153. package/buildLibs/utils/Mobile/ClSteps.js +1 -1
  154. package/buildLibs/utils/Mobile/ClTabbar.cjs +1 -1
  155. package/buildLibs/utils/Mobile/ClTabbar.js +1 -1
  156. package/buildLibs/utils/Mobile/ClToast.cjs +1 -1
  157. package/buildLibs/utils/Mobile/ClToast.js +1 -1
  158. package/buildLibs/utils/Mobile/__provide__/NotifyM.cjs +1 -1
  159. package/buildLibs/utils/Mobile/__provide__/NotifyM.js +1 -1
  160. package/buildLibs/utils/Mobile/__provide__/Toast.cjs +1 -1
  161. package/buildLibs/utils/Mobile/__provide__/Toast.js +1 -1
  162. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-C1OgPpoJ.js → Index.vue_vue_type_script_setup_true_lang-0S6ab-Lp.js} +120 -113
  163. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-neC9NxKi.js → Index.vue_vue_type_script_setup_true_lang-2Fe9SkjL.js} +209 -201
  164. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-Dzm58mMQ.js → Index.vue_vue_type_script_setup_true_lang-2zp0QTNm.js} +1 -1
  165. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-4I3wTvhS.js +2536 -0
  166. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-5WPoXMwr.js +1 -0
  167. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-5itnjwU_.js +1 -0
  168. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-BIFHYrzc.js → Index.vue_vue_type_script_setup_true_lang-98sOHlWj.js} +1 -1
  169. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-B60Rs_ka.js +1 -0
  170. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-B-Mbqw1Y.js → Index.vue_vue_type_script_setup_true_lang-B6NmuslZ.js} +1 -1
  171. package/buildLibs/{modules/shared/Index.vue_vue_type_script_setup_true_lang-D7bJ5UAn.js → utils/Shared/Index.vue_vue_type_script_setup_true_lang-B8YAhRda.js} +63 -55
  172. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BGwsPv0S.js +1 -0
  173. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-Eczgr-_r.js → Index.vue_vue_type_script_setup_true_lang-BJ_m7Dj5.js} +1 -1
  174. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BM_FJlr9.js +2 -0
  175. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BN9ybiKv.js +1 -0
  176. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-D_YbdXMB.js → Index.vue_vue_type_script_setup_true_lang-BUscvdlk.js} +1 -1
  177. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-UydTJByU.js → Index.vue_vue_type_script_setup_true_lang-BXz7Y87Q.js} +1 -1
  178. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-X8d38eaU.js → Index.vue_vue_type_script_setup_true_lang-BfELTliJ.js} +1 -1
  179. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-C2LGy18j.js → Index.vue_vue_type_script_setup_true_lang-Bt0l5FYh.js} +6 -5
  180. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-BQSP8SA4.js → Index.vue_vue_type_script_setup_true_lang-BwwnFiXJ.js} +1 -1
  181. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-C2zOEwJ1.js +1 -0
  182. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-D6kK-vM7.js → Index.vue_vue_type_script_setup_true_lang-C6Ou-vmn.js} +1 -1
  183. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-BWeBT0aj.js → Index.vue_vue_type_script_setup_true_lang-C8euOy7Z.js} +2 -2
  184. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-C6Evk0-z.js → Index.vue_vue_type_script_setup_true_lang-CAMYF15G.js} +54 -48
  185. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CSqU5Nz6.js +1 -0
  186. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-ChnRq_PS.js → Index.vue_vue_type_script_setup_true_lang-CWwycVzt.js} +3 -3
  187. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-BO4cal3i.js → Index.vue_vue_type_script_setup_true_lang-Cb8fYSc9.js} +386 -375
  188. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-Dwkuei2j.js → Index.vue_vue_type_script_setup_true_lang-D3Z2BVYR.js} +2 -2
  189. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-C67qv3YC.js → Index.vue_vue_type_script_setup_true_lang-DB79nPqn.js} +1 -1
  190. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DDMwfmi3.js +1533 -0
  191. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-Dirpq4z0.js → Index.vue_vue_type_script_setup_true_lang-DPpZ2_Sb.js} +1 -1
  192. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DUfxwsAA.js +1 -0
  193. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-CBjEJN0Y.js → Index.vue_vue_type_script_setup_true_lang-Dc4eYcq-.js} +1 -1
  194. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-O_Nltaue.js → Index.vue_vue_type_script_setup_true_lang-DfAoAIa3.js} +1 -1
  195. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-CsUYHAm8.js → Index.vue_vue_type_script_setup_true_lang-Dg5pJiPZ.js} +1 -1
  196. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-DxYJbPyJ.js → Index.vue_vue_type_script_setup_true_lang-DulzCj86.js} +8 -8
  197. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-DWkYiuK9.js → Index.vue_vue_type_script_setup_true_lang-DvYX7kuB.js} +1 -1
  198. package/buildLibs/{modules/shared/Index.vue_vue_type_script_setup_true_lang-CAe8mhTl.js → utils/Shared/Index.vue_vue_type_script_setup_true_lang-LeQz80jL.js} +66 -60
  199. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-L4NDsLxm.js → Index.vue_vue_type_script_setup_true_lang-M5y0DMPl.js} +1 -1
  200. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-OfqQJV8-.js +1 -0
  201. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-OiTdNs2W.js +310 -0
  202. package/buildLibs/{modules/shared/Index.vue_vue_type_script_setup_true_lang-DdLVG0R0.js → utils/Shared/Index.vue_vue_type_script_setup_true_lang-S9t4A2yy.js} +68 -60
  203. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-SW27GX-g.js +254 -0
  204. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-D_XMW7K4.js → Index.vue_vue_type_script_setup_true_lang-VUD3rCg5.js} +154 -146
  205. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-ZNpokp-x.js +1 -0
  206. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-CYFgnd30.js → Index.vue_vue_type_script_setup_true_lang-kCemr-ml.js} +1 -1
  207. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-D__hI9ud.js → Index.vue_vue_type_script_setup_true_lang-sGJNOVn3.js} +1 -1
  208. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-CizRrQsH.js → Index.vue_vue_type_script_setup_true_lang-vVnnJuup.js} +1 -1
  209. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-xONe0mSK.js +1 -0
  210. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-ctptavhp.js → Index.vue_vue_type_script_setup_true_lang-yXhOl-Ln.js} +2 -2
  211. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-ywDP-ayG.js +1 -0
  212. package/buildLibs/utils/Shared/Index22.css +1 -1
  213. package/buildLibs/utils/Shared/Index8.css +1 -1
  214. package/buildLibs/utils/Shared/Input.css +1 -1
  215. package/buildLibs/utils/Shared/List.css +1 -1
  216. package/buildLibs/utils/Shared/{List.vue_vue_type_script_setup_true_lang-CFCST05R.js → List.vue_vue_type_script_setup_true_lang-B75tAGde.js} +1 -1
  217. package/buildLibs/utils/Shared/{List.vue_vue_type_script_setup_true_lang-CRkZfB8a.js → List.vue_vue_type_script_setup_true_lang-NrDV8bOV.js} +1 -1
  218. package/buildLibs/utils/Shared/{One.vue_vue_type_script_setup_true_lang-cviYcHLZ.js → One.vue_vue_type_script_setup_true_lang-BL5CUHVm.js} +1 -1
  219. package/buildLibs/utils/Shared/{One.vue_vue_type_script_setup_true_lang-HWXEDCZF.js → One.vue_vue_type_script_setup_true_lang-D3hrzxgT.js} +1 -1
  220. package/buildLibs/utils/Shared/{One.vue_vue_type_script_setup_true_lang-CGNfuoKE.js → One.vue_vue_type_script_setup_true_lang-DHPYObdu.js} +1 -1
  221. package/buildLibs/utils/Shared/{One.vue_vue_type_script_setup_true_lang-D9zWNf0s.js → One.vue_vue_type_script_setup_true_lang-DxUlP9yq.js} +1 -1
  222. package/buildLibs/utils/Shared/{Validate.vue_vue_type_script_setup_true_lang-W46p_d7L.js → Validate.vue_vue_type_script_setup_true_lang-BYSnGTWU.js} +1 -1
  223. package/buildLibs/utils/Shared/{Validate.vue_vue_type_script_setup_true_lang-Jyse_5LL.js → Validate.vue_vue_type_script_setup_true_lang-DPwcfCQb.js} +1 -1
  224. package/buildLibs/utils/Shared/{index-DgQu20UC.js → index-BjDIq1u8.js} +1 -1
  225. package/buildLibs/utils/Shared/{index-D-7jSnpf.js → index-CBplKIwJ.js} +2 -2
  226. package/buildLibs/utils/Web/ClAnchorNav.cjs +1 -1
  227. package/buildLibs/utils/Web/ClAnchorNav.js +1 -1
  228. package/buildLibs/utils/Web/ClCalendar.cjs +1 -1
  229. package/buildLibs/utils/Web/ClCalendar.js +1 -1
  230. package/buildLibs/utils/Web/ClCodeLegend.cjs +1 -1
  231. package/buildLibs/utils/Web/ClCodeLegend.js +1 -1
  232. package/buildLibs/utils/Web/ClColorPicker.cjs +1 -1
  233. package/buildLibs/utils/Web/ClColorPicker.js +3 -3
  234. package/buildLibs/utils/Web/ClCropper.cjs +1 -1
  235. package/buildLibs/utils/Web/ClCropper.js +1 -1
  236. package/buildLibs/utils/Web/ClCropperPreview.cjs +1 -1
  237. package/buildLibs/utils/Web/ClCropperPreview.js +4 -4
  238. package/buildLibs/utils/Web/ClDateTime.cjs +1 -1
  239. package/buildLibs/utils/Web/ClDateTime.js +1 -1
  240. package/buildLibs/utils/Web/ClDropdownMenu.cjs +1 -1
  241. package/buildLibs/utils/Web/ClDropdownMenu.js +1 -1
  242. package/buildLibs/utils/Web/ClEchartsLineAxisTag.cjs +1 -1
  243. package/buildLibs/utils/Web/ClEchartsLineAxisTag.js +1 -1
  244. package/buildLibs/utils/Web/ClFileUpload.cjs +1 -1
  245. package/buildLibs/utils/Web/ClFileUpload.js +1 -1
  246. package/buildLibs/utils/Web/ClInputTag.cjs +1 -1
  247. package/buildLibs/utils/Web/ClInputTag.js +1 -1
  248. package/buildLibs/utils/Web/ClPaginate.cjs +1 -1
  249. package/buildLibs/utils/Web/ClPaginate.js +1 -1
  250. package/buildLibs/utils/Web/ClPreviewExample.cjs +1 -1
  251. package/buildLibs/utils/Web/ClPreviewExample.js +1 -1
  252. package/buildLibs/utils/Web/ClSelect.cjs +1 -1
  253. package/buildLibs/utils/Web/ClSelect.js +1 -1
  254. package/buildLibs/utils/Web/ClSelectCascade.cjs +1 -1
  255. package/buildLibs/utils/Web/ClSelectCascade.js +1 -1
  256. package/buildLibs/utils/Web/ClSelectMove.cjs +1 -1
  257. package/buildLibs/utils/Web/ClSelectMove.js +655 -647
  258. package/buildLibs/utils/Web/ClSelectTag.cjs +1 -1
  259. package/buildLibs/utils/Web/ClSelectTag.js +1 -1
  260. package/buildLibs/utils/Web/ClSelectTree.cjs +1 -1
  261. package/buildLibs/utils/Web/ClSelectTree.js +71 -63
  262. package/buildLibs/utils/Web/ClSideMenu.cjs +1 -1
  263. package/buildLibs/utils/Web/ClSideMenu.js +1 -1
  264. package/buildLibs/utils/Web/ClTable.cjs +1 -1
  265. package/buildLibs/utils/Web/ClTable.js +4 -4
  266. package/buildLibs/utils/Web/ClTabs.cjs +1 -1
  267. package/buildLibs/utils/Web/ClTabs.js +1 -1
  268. package/buildLibs/utils/Web/ClTree.cjs +1 -1
  269. package/buildLibs/utils/Web/ClTree.js +1 -1
  270. package/buildLibs/utils/Web/ClXEditable.cjs +1 -1
  271. package/buildLibs/utils/Web/ClXEditable.js +13 -13
  272. package/buildLibs/utils/Web/__provide__/Alert.cjs +1 -1
  273. package/buildLibs/utils/Web/__provide__/Alert.js +2 -2
  274. package/buildLibs/utils/Web/__provide__/Notify.cjs +1 -1
  275. package/buildLibs/utils/Web/__provide__/Notify.js +1 -1
  276. package/buildLibs/utils/Web/__provide__/Preview.cjs +1 -1
  277. package/buildLibs/utils/Web/__provide__/Preview.js +1 -1
  278. package/buildLibs/web/index.cjs +7 -7
  279. package/buildLibs/web/index.css +1 -1
  280. package/buildLibs/web/index.js +10793 -10685
  281. package/docs/components/Element/Checkbox.md +2 -1
  282. package/docs/components/Element/Form.md +15 -0
  283. package/docs/components/Element/Input.md +2 -1
  284. package/docs/components/Element/InputNumber.md +2 -1
  285. package/docs/components/Element/InputNumberStepper.md +2 -1
  286. package/docs/components/Element/InputTextarea.md +2 -1
  287. package/docs/components/Element/Radio.md +2 -1
  288. package/docs/components/Web/DateTime.md +2 -1
  289. package/docs/components/Web/FileUpload.md +2 -1
  290. package/docs/components/Web/Select.md +2 -1
  291. package/docs/components/Web/SelectCascade.md +1 -0
  292. package/docs/components/Web/SelectMove.md +2 -1
  293. package/docs/components/Web/SelectTag.md +1 -0
  294. package/docs/components/Web/SelectTree.md +2 -1
  295. package/docs/components/Web/Tree.md +2 -1
  296. package/fonts/iconfont.css +7 -3
  297. package/fonts/iconfont.ttf +0 -0
  298. package/fonts/iconfont.woff +0 -0
  299. package/fonts/iconfont.woff2 +0 -0
  300. package/package.json +1 -1
  301. package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-CiNidFJt.js +0 -246
  302. package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-DC6727pS.js +0 -2528
  303. package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-EXqjkKwS.js +0 -302
  304. package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-Hg16dgRQ.js +0 -1527
  305. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-5aX79Fcf.js +0 -1
  306. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BRvOcf4B.js +0 -1
  307. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-Ba8Z8fOP.js +0 -1
  308. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BjNP5odR.js +0 -1
  309. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CFZ5jK-q.js +0 -1
  310. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CQ3RGLek.js +0 -302
  311. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CY5fRV6o.js +0 -1
  312. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CYN4r-Mx.js +0 -1
  313. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-C_7ArHlU.js +0 -1
  314. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CuJjJvft.js +0 -2
  315. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CwjigRBx.js +0 -2528
  316. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-D6cmq0Tf.js +0 -1527
  317. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-Dbf-3Nik.js +0 -1
  318. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DgD_gHit.js +0 -1
  319. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-FowII7_3.js +0 -1
  320. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-c7oxeU_j.js +0 -246
  321. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-vLqCsSbV.js +0 -1
@@ -0,0 +1,2536 @@
1
+ import { defineComponent as Oe, inject as ke, computed as De, reactive as ge, ref as Ae, onMounted as Pe, nextTick as Ve, watch as re, openBlock as S, createElementBlock as C, unref as me, normalizeClass as ue, createElementVNode as I, createVNode as fe, Fragment as U, toDisplayString as xe, renderList as Ie, withKeys as Ce, withModifiers as Me, normalizeStyle as Qe, withDirectives as We, vShow as qe, provide as Je, createBlock as Be, useTemplateRef as je, readonly as Ge, withCtx as Ue } from "vue";
2
+ import be from "@cldemo/ui-kit/common/log";
3
+ import F from "dayjs";
4
+ import o from "@cldemo/ui-kit/common/base";
5
+ import { getPlaintextOutText as Xe } from "@cldemo/ui-kit/common/globalConfig";
6
+ import $e from "@cldemo/ui-kit/common/Element";
7
+ import { _ as et } from "./List.vue_vue_type_script_setup_true_lang-NrDV8bOV.js";
8
+ import { _ as _e } from "./Index.vue_vue_type_script_setup_true_lang-Bt0l5FYh.js";
9
+ import { a as Ne } from "./language-CZZEj4e3.js";
10
+ import { _ as Fe } from "./Index.vue_vue_type_script_setup_true_lang-CAMYF15G.js";
11
+ import Le from "@cldemo/ui-kit/common/day";
12
+ import { _ as Ze } from "./Index.vue_vue_type_script_setup_true_lang-sGJNOVn3.js";
13
+ /* empty css */
14
+ /* empty css */
15
+ const tt = ["id"], at = { class: "table-base" }, nt = {
16
+ class: "time-head time-head-day",
17
+ colspan: "7"
18
+ }, st = { class: "time-prev" }, it = ["title"], ot = ["title"], lt = { class: "time-next" }, rt = ["title"], ct = ["title"], ut = ["aria-disabled", "onClick", "onKeydown", "onMouseover"], mt = /* @__PURE__ */ Oe({
19
+ name: "ClCalendarsDays",
20
+ __name: "CalendarsDays",
21
+ props: {
22
+ className: String,
23
+ // desc: 自定义CSS类名
24
+ viewValue: String,
25
+ // desc: 当前视图日期值
26
+ selectValue: String,
27
+ // desc: 当前选中日期值
28
+ startValue: String,
29
+ // desc: 范围选择开始值
30
+ endValue: String,
31
+ // desc: 范围选择结束值
32
+ hoverValue: String,
33
+ // desc: 悬停日期值
34
+ minValue: String,
35
+ // desc: 最小可选日期
36
+ maxValue: String
37
+ // desc: 最大可选日期
38
+ },
39
+ emits: {
40
+ onChangeDate: (d) => !0,
41
+ // desc: 视图日期变更时触发
42
+ onChangeType: (d) => !0,
43
+ // desc: 切换视图类型时触发
44
+ onSelectDate: (d, ce) => !0,
45
+ // desc: 选中日期时触发
46
+ onHoverDate: (d, ce) => !0,
47
+ // desc: 悬停日期时触发
48
+ onInitComplete: (d) => !0
49
+ // desc: 初始化完成时触发
50
+ },
51
+ setup(d, { emit: ce }) {
52
+ const v = d, i = ce, { optPageLanguage: R, getPageLanguage: $ } = Ne();
53
+ $("dataTime");
54
+ const N = ke("$DateTimeTop"), T = ke("$DateTimeTopBase"), y = ke("$DateTimeBase");
55
+ (!N || !T || !y) && be.warn(
56
+ "ClCalendarsDays",
57
+ "未找到 $DateTimeTop/$DateTimeTopBase/$DateTimeBase 注入,请确保组件在 ClDateTime 组件树内使用"
58
+ );
59
+ const M = `calendarsDays-${o.getRandom(5)}`, g = N?.elId ? `${N.elId}-calendarsDays-${o.getRandom(5)}` : void 0, l = De(() => {
60
+ let r = {
61
+ "panel-calendarsdays": !0
62
+ };
63
+ return r = o.getJsonMerge(r, $e.getClassNameJson(v.className)), r;
64
+ }), t = ge({
65
+ isPrevYear: !1,
66
+ isPrevMonth: !1,
67
+ titleYear: "",
68
+ titleMonth: "",
69
+ isNextYear: !1,
70
+ isNextMonth: !1
71
+ }), u = Ae([]), n = Ae([]), e = {
72
+ viewDate: null,
73
+ selectDate: null,
74
+ startDate: null,
75
+ endDate: null,
76
+ hoverDate: null
77
+ }, Y = () => {
78
+ if (!e.viewDate)
79
+ return;
80
+ const r = e.viewDate.year(), E = e.viewDate.localeData().monthsShort(e.viewDate), O = e.viewDate.clone().subtract(1, "years").endOf("month"), _ = y.checkDataMinMax(O, "day"), de = e.viewDate.clone().subtract(1, "months").endOf("month"), ee = y.checkDataMinMax(de, "day"), K = e.viewDate.clone().add(1, "months").startOf("month"), Z = y.checkDataMinMax(K, "day"), J = e.viewDate.clone().add(1, "years").startOf("month"), pe = y.checkDataMinMax(J, "day");
81
+ t.isPrevYear = !_, t.isPrevMonth = !ee, t.titleYear = `${r}${R.value.year}`, t.titleMonth = E, t.isNextMonth = !Z, t.isNextYear = !pe;
82
+ }, ie = () => {
83
+ if (!e.viewDate)
84
+ return;
85
+ const r = e.viewDate.localeData(), V = r.weekdaysMin(), E = r.firstDayOfWeek(), O = [];
86
+ V.forEach((_, de) => {
87
+ O[(7 + de - E) % 7] = _;
88
+ }), u.value = O;
89
+ }, te = () => {
90
+ if (!e.viewDate)
91
+ return;
92
+ const r = e.viewDate.clone(), V = e.selectDate, E = r.year(), O = r.month();
93
+ let _ = r.clone().subtract(1, "months");
94
+ const de = [];
95
+ let ee = [];
96
+ _ = _.date(_.daysInMonth()).startOf("week");
97
+ for (let K = 0; K < 42; K += 1) {
98
+ K > 0 && (_ = _.add(1, "days"));
99
+ const Z = _.clone(), J = Z.date(), pe = _.year() === E && _.month() < O || _.year() < E, ve = _.year() === E && _.month() > O || _.year() > E;
100
+ let Ye = V && _.isSame(V, "day");
101
+ const h = y.checkDataMinMax(Z, "day");
102
+ let x = !1, b = !1, B = !1;
103
+ T.isRange && (e.hoverDate ? e.startDate && e.endDate && e.startDate.isSame(e.hoverDate, "day") && e.hoverDate.isBefore(e.endDate, "day") ? (x = _.isSame(e.startDate, "day"), b = _.isSame(e.endDate, "day"), B = x || b || _.isAfter(e.startDate, "day") && _.isBefore(e.endDate, "day")) : e.startDate ? (x = _.isSame(e.startDate, "day"), B = x || _.isSame(e.hoverDate, "day"), B = B || _.isAfter(e.startDate, "day") && _.isBefore(e.hoverDate, "day"), b = e.hoverDate.isSame(e.startDate, "day") && x) : e.endDate && (b = _.isSame(e.endDate, "day"), B = b || _.isSame(e.hoverDate, "day"), B = B || _.isAfter(e.hoverDate, "day") && _.isBefore(e.endDate, "day"), x = e.hoverDate.isSame(e.endDate, "day") && b) : (x = !!(e.startDate && _.isSame(e.startDate, "day")), e.endDate && (b = _.isSame(e.endDate, "day"), B = x || b || !!(e.startDate && _.isAfter(e.startDate, "day") && _.isBefore(e.endDate, "day")))), Ye = x || b);
104
+ const j = $e.getAddClass("day", {
105
+ old: pe,
106
+ new: ve,
107
+ active: Ye && !pe && !ve && !h,
108
+ disabled: h,
109
+ "date-start": x && !pe && !ve,
110
+ "date-end": b && !pe && !ve,
111
+ "range-in": B && !pe && !ve
112
+ });
113
+ ee.push({ cls: j, day: J, value: J, isDisabled: h, isOld: pe, isNew: ve }), ee.length === 7 && (de.push({ days: ee }), ee = []);
114
+ }
115
+ n.value = de;
116
+ }, G = (r, V, E) => {
117
+ if (!e.viewDate)
118
+ return;
119
+ const O = e.viewDate.clone()[r](V, E);
120
+ i("onChangeDate", O);
121
+ };
122
+ let ne = !1;
123
+ const he = () => {
124
+ ne || (ne = !0, Ve(() => {
125
+ i("onInitComplete", "days");
126
+ }));
127
+ }, ye = () => {
128
+ e.selectDate = N.getMomentDate(v.selectValue), e.startDate = N.getMomentDate(v.startValue), e.endDate = N.getMomentDate(v.endValue), e.hoverDate = N.getMomentDate(v.hoverValue);
129
+ }, A = (r, V, E) => {
130
+ if (V !== E) {
131
+ const O = N.getMomentDate(V);
132
+ O && O.isValid() && (e[r] = O, ye(), ie(), Y(), te(), he());
133
+ }
134
+ }, X = () => {
135
+ if (o.isNonEmptyString(v.viewValue)) {
136
+ const r = N.getMomentDate(v.viewValue);
137
+ r && r.isValid() && (e.viewDate = r, ye(), ie(), Y(), te(), he());
138
+ }
139
+ };
140
+ Pe(() => {
141
+ Ve(() => {
142
+ X();
143
+ });
144
+ }), re(
145
+ () => v.viewValue,
146
+ (r, V) => {
147
+ A("viewDate", r, V);
148
+ }
149
+ ), re([() => v.selectValue, () => v.startValue, () => v.endValue], () => {
150
+ e.viewDate && (e.selectDate = N.getMomentDate(v.selectValue), e.startDate = N.getMomentDate(v.startValue), e.endDate = N.getMomentDate(v.endValue), e.hoverDate = N.getMomentDate(v.hoverValue), te());
151
+ }), re(
152
+ () => v.hoverValue,
153
+ () => {
154
+ e.viewDate && (e.hoverDate = N.getMomentDate(v.hoverValue), T.isRange && te());
155
+ }
156
+ ), re([() => v.minValue, () => v.maxValue], () => {
157
+ e.viewDate && (Y(), te());
158
+ });
159
+ const oe = (r) => {
160
+ r.preventDefault(), r.stopPropagation(), G("subtract", 1, "years");
161
+ }, z = (r) => {
162
+ r.preventDefault(), r.stopPropagation(), G("subtract", 1, "months");
163
+ }, se = (r) => {
164
+ r.preventDefault(), r.stopPropagation(), G("add", 1, "months");
165
+ }, D = (r) => {
166
+ r.preventDefault(), r.stopPropagation(), G("add", 1, "years");
167
+ }, c = (r, V) => {
168
+ r.preventDefault(), r.stopPropagation(), i("onChangeType", V);
169
+ }, f = (r, V) => {
170
+ r.preventDefault(), r.stopPropagation(), V.isDisabled || i("onSelectDate", "days", V);
171
+ }, w = (r, V) => {
172
+ r.preventDefault(), r.stopPropagation(), V.isDisabled || i("onHoverDate", "days", V);
173
+ };
174
+ return (r, V) => (S(), C("div", {
175
+ class: ue(l.value),
176
+ id: me(g)
177
+ }, [
178
+ I("table", at, [
179
+ I("thead", null, [
180
+ I("tr", null, [
181
+ I("th", nt, [
182
+ I("span", st, [
183
+ t.isPrevYear ? (S(), C("span", {
184
+ key: 0,
185
+ class: "prev-year",
186
+ title: me(R).prevYear,
187
+ onClick: oe
188
+ }, [
189
+ fe(_e, { name: "angle-double-left" })
190
+ ], 8, it)) : (S(), C(U, { key: 1 }, [], 64)),
191
+ t.isPrevMonth ? (S(), C("span", {
192
+ key: 2,
193
+ class: "prev-month",
194
+ title: me(R).prevMonth,
195
+ onClick: z
196
+ }, [
197
+ fe(_e, { name: "angle-left" })
198
+ ], 8, ot)) : (S(), C(U, { key: 3 }, [], 64))
199
+ ]),
200
+ I("span", {
201
+ class: "datetime-switch-year",
202
+ onClick: V[0] || (V[0] = (E) => c(E, "years"))
203
+ }, xe(t.titleYear), 1),
204
+ I("span", {
205
+ class: "datetime-switch-month",
206
+ onClick: V[1] || (V[1] = (E) => c(E, "months"))
207
+ }, xe(t.titleMonth), 1),
208
+ I("span", lt, [
209
+ t.isNextYear ? (S(), C("span", {
210
+ key: 0,
211
+ class: "next-year",
212
+ title: me(R).nextYear,
213
+ onClick: D
214
+ }, [
215
+ fe(_e, { name: "angle-double-right" })
216
+ ], 8, rt)) : (S(), C(U, { key: 1 }, [], 64)),
217
+ t.isNextMonth ? (S(), C("span", {
218
+ key: 2,
219
+ class: "next-month",
220
+ title: me(R).nextMonth,
221
+ onClick: se
222
+ }, [
223
+ fe(_e, { name: "angle-right" })
224
+ ], 8, ct)) : (S(), C(U, { key: 3 }, [], 64))
225
+ ])
226
+ ])
227
+ ]),
228
+ I("tr", null, [
229
+ (S(!0), C(U, null, Ie(u.value, (E, O) => (S(), C("th", {
230
+ key: `${M}-week-${O}`
231
+ }, xe(E), 1))), 128))
232
+ ])
233
+ ]),
234
+ I("tbody", null, [
235
+ (S(!0), C(U, null, Ie(n.value, (E, O) => (S(), C("tr", {
236
+ key: `${M}-days-${O}`
237
+ }, [
238
+ (S(!0), C(U, null, Ie(E.days, (_, de) => (S(), C("td", {
239
+ key: `${M}-day-${de}`,
240
+ role: "gridcell",
241
+ tabindex: "0",
242
+ "aria-disabled": _.isDisabled,
243
+ class: ue(_.cls),
244
+ onClick: (ee) => f(ee, _),
245
+ onKeydown: [
246
+ Ce(Me((ee) => f(ee, _), ["prevent"]), ["enter"]),
247
+ Ce(Me((ee) => f(ee, _), ["prevent"]), ["space"])
248
+ ],
249
+ onMouseover: (ee) => w(ee, _)
250
+ }, xe(_.day), 43, ut))), 128))
251
+ ]))), 128))
252
+ ])
253
+ ])
254
+ ], 10, tt));
255
+ }
256
+ }), dt = ["id"], Dt = { class: "table-base" }, ft = { class: "time-head time-head-month" }, ht = { class: "time-prev" }, yt = ["title"], pt = { class: "time-next" }, vt = ["title"], gt = { class: "time-body-month" }, Vt = ["aria-disabled", "onClick", "onKeydown", "onMouseover"], kt = /* @__PURE__ */ Oe({
257
+ name: "ClCalendarsMonths",
258
+ __name: "CalendarsMonths",
259
+ props: {
260
+ className: String,
261
+ // desc: 自定义CSS类名
262
+ viewValue: String,
263
+ // desc: 当前视图日期值
264
+ selectValue: String,
265
+ // desc: 当前选中日期值
266
+ startValue: String,
267
+ // desc: 范围选择开始值
268
+ endValue: String,
269
+ // desc: 范围选择结束值
270
+ hoverValue: String,
271
+ // desc: 悬停日期值
272
+ minValue: String,
273
+ // desc: 最小可选日期
274
+ maxValue: String
275
+ // desc: 最大可选日期
276
+ },
277
+ emits: {
278
+ onChangeDate: (d) => !0,
279
+ // desc: 视图日期变更时触发
280
+ onChangeType: (d) => !0,
281
+ // desc: 切换视图类型时触发
282
+ onSelectDate: (d, ce) => !0,
283
+ // desc: 选中月份时触发
284
+ onHoverDate: (d, ce) => !0,
285
+ // desc: 悬停月份时触发
286
+ onInitComplete: (d) => !0
287
+ // desc: 初始化完成时触发
288
+ },
289
+ setup(d, { emit: ce }) {
290
+ const v = d, i = ce, R = `calendarsMonths-${o.getRandom(5)}`, { optPageLanguage: $, getPageLanguage: N } = Ne();
291
+ N("dataTime");
292
+ const T = ke("$DateTimeTop"), y = ke("$DateTimeTopBase"), M = ke("$DateTimeBase");
293
+ (!T || !y || !M) && be.warn(
294
+ "ClCalendarsMonths",
295
+ "未找到 $DateTimeTop/$DateTimeTopBase/$DateTimeBase 注入,请确保组件在 ClDateTime 组件树内使用"
296
+ );
297
+ const g = T?.elId ? `${T.elId}-calendarsMonths-${o.getRandom(5)}` : void 0, l = De(() => {
298
+ let D = {
299
+ "panel-calendarsmonths": !0
300
+ };
301
+ return D = o.getJsonMerge(D, $e.getClassNameJson(v.className)), D;
302
+ }), t = ge({
303
+ isPrevYear: !1,
304
+ titleYear: "",
305
+ isNextYear: !1
306
+ }), u = Ae([]), n = {
307
+ viewDate: null,
308
+ selectDate: null,
309
+ startDate: null,
310
+ endDate: null,
311
+ hoverDate: null
312
+ }, e = () => {
313
+ if (!n.viewDate)
314
+ return;
315
+ const D = n.viewDate.year(), c = n.viewDate.clone().subtract(1, "years").endOf("year"), f = M.checkDataMinMax(c, "month"), w = n.viewDate.clone().add(1, "years").startOf("year"), r = M.checkDataMinMax(w, "month");
316
+ t.isPrevYear = !f, t.titleYear = `${D}${$.value.year}`, t.isNextYear = !r;
317
+ }, Y = () => {
318
+ if (!n.viewDate)
319
+ return;
320
+ const D = n.viewDate.clone(), c = M.getFocusDate(), f = n.selectDate, w = D.year(), r = [];
321
+ D.localeData().monthsShort().forEach((V, E) => {
322
+ const O = M.getViewMin(w, E);
323
+ let _ = !!(f && O.isSame(f, "month")), de = !!(c && O.isSame(c, "month"));
324
+ const ee = M.checkDataMinMax(O, "month");
325
+ let K = !1, Z = !1, J = !1;
326
+ y.isRange && (de = !1, n.hoverDate ? n.startDate && n.endDate && n.startDate.isSame(n.hoverDate, "month") && n.hoverDate.isBefore(n.endDate, "month") ? (K = O.isSame(n.startDate, "month"), Z = O.isSame(n.endDate, "month"), J = K || Z || O.isAfter(n.startDate, "month") && O.isBefore(n.endDate, "month")) : n.startDate ? (K = O.isSame(n.startDate, "month"), J = K || O.isSame(n.hoverDate, "month"), J = J || O.isAfter(n.startDate, "month") && O.isBefore(n.hoverDate, "month"), Z = !!(n.hoverDate && n.hoverDate.isSame(n.startDate, "month")) && K) : n.endDate && (Z = O.isSame(n.endDate, "month"), J = Z || O.isSame(n.hoverDate, "month"), J = J || O.isAfter(n.hoverDate, "month") && O.isBefore(n.endDate, "month"), K = !!(n.hoverDate && n.hoverDate.isSame(n.endDate, "month")) && Z) : (K = !!(n.startDate && O.isSame(n.startDate, "month")), n.endDate && n.startDate && (Z = O.isSame(n.endDate, "month"), J = O.isAfter(n.startDate, "month") && O.isBefore(n.endDate, "month"))), _ = K || Z), y.layerType === "months" && (de = !1);
327
+ const pe = $e.getAddClass("month", {
328
+ active: _ && !ee,
329
+ focused: de,
330
+ disabled: ee,
331
+ "date-start": K,
332
+ "date-end": Z,
333
+ "range-in": J
334
+ });
335
+ r.push({ cls: pe, month: V, isDisabled: ee, value: E });
336
+ }), u.value = r;
337
+ }, ie = (D, c, f) => {
338
+ if (!n.viewDate)
339
+ return;
340
+ const w = n.viewDate.clone()[D](c, f);
341
+ i("onChangeDate", w);
342
+ };
343
+ let te = !1;
344
+ const G = () => {
345
+ te || (te = !0, Ve(() => {
346
+ i("onInitComplete", "months");
347
+ }));
348
+ }, ne = () => {
349
+ n.selectDate = T.getMomentDate(v.selectValue), n.startDate = T.getMomentDate(v.startValue), n.endDate = T.getMomentDate(v.endValue), n.hoverDate = T.getMomentDate(v.hoverValue);
350
+ }, he = (D, c, f) => {
351
+ if (c !== f) {
352
+ const w = T.getMomentDate(c);
353
+ w && w.isValid() && (n[D] = w, ne(), e(), Y(), G());
354
+ }
355
+ }, ye = () => {
356
+ const D = T.getMomentDate(v.viewValue);
357
+ D && D.isValid() && (n.viewDate = D, ne(), e(), Y(), G());
358
+ };
359
+ Pe(() => {
360
+ Ve(() => {
361
+ ye();
362
+ });
363
+ }), re(
364
+ () => v.viewValue,
365
+ (D, c) => {
366
+ he("viewDate", D, c);
367
+ }
368
+ ), re(
369
+ [() => v.selectValue, () => v.startValue, () => v.endValue, () => v.hoverValue],
370
+ () => {
371
+ n.viewDate && (n.selectDate = T.getMomentDate(v.selectValue), n.startDate = T.getMomentDate(v.startValue), n.endDate = T.getMomentDate(v.endValue), n.hoverDate = T.getMomentDate(v.hoverValue), Y());
372
+ }
373
+ ), re([() => v.minValue, () => v.maxValue], () => {
374
+ n.viewDate && (e(), Y());
375
+ });
376
+ const A = (D) => {
377
+ D.preventDefault(), D.stopPropagation(), ie("subtract", 1, "years");
378
+ }, X = (D) => {
379
+ D.preventDefault(), D.stopPropagation(), ie("add", 1, "years");
380
+ }, oe = (D, c) => {
381
+ D.preventDefault(), D.stopPropagation(), i("onChangeType", c);
382
+ }, z = (D, c) => {
383
+ D.preventDefault(), D.stopPropagation(), c.isDisabled || i("onSelectDate", "months", c);
384
+ }, se = (D, c) => {
385
+ D.preventDefault(), D.stopPropagation(), c.isDisabled || i("onHoverDate", "months", c);
386
+ };
387
+ return (D, c) => (S(), C("div", {
388
+ class: ue(l.value),
389
+ id: me(g)
390
+ }, [
391
+ I("table", Dt, [
392
+ I("thead", null, [
393
+ I("tr", null, [
394
+ I("th", ft, [
395
+ I("span", ht, [
396
+ t.isPrevYear ? (S(), C("span", {
397
+ key: 0,
398
+ class: "prev-year",
399
+ title: me($).prevYear,
400
+ onClick: A
401
+ }, [
402
+ fe(_e, { name: "angle-left" })
403
+ ], 8, yt)) : (S(), C(U, { key: 1 }, [], 64))
404
+ ]),
405
+ I("span", {
406
+ class: "datetime-switch-year",
407
+ onClick: c[0] || (c[0] = (f) => oe(f, "years"))
408
+ }, xe(t.titleYear), 1),
409
+ I("span", pt, [
410
+ t.isNextYear ? (S(), C("span", {
411
+ key: 0,
412
+ class: "next-year",
413
+ title: me($).nextYear,
414
+ onClick: X
415
+ }, [
416
+ fe(_e, { name: "angle-right" })
417
+ ], 8, vt)) : (S(), C(U, { key: 1 }, [], 64))
418
+ ])
419
+ ])
420
+ ])
421
+ ]),
422
+ I("tbody", null, [
423
+ I("tr", null, [
424
+ I("td", gt, [
425
+ I("div", null, [
426
+ (S(!0), C(U, null, Ie(u.value, (f, w) => (S(), C("span", {
427
+ key: `${R}-month-${w}`,
428
+ role: "button",
429
+ tabindex: "0",
430
+ "aria-disabled": f.isDisabled,
431
+ class: ue(f.cls),
432
+ onClick: (r) => z(r, f),
433
+ onKeydown: [
434
+ Ce(Me((r) => z(r, f), ["prevent"]), ["enter"]),
435
+ Ce(Me((r) => z(r, f), ["prevent"]), ["space"])
436
+ ],
437
+ onMouseover: (r) => se(r, f)
438
+ }, xe(f.month), 43, Vt))), 128))
439
+ ])
440
+ ])
441
+ ])
442
+ ])
443
+ ])
444
+ ], 10, dt));
445
+ }
446
+ }), wt = ["id"], St = { class: "table-base" }, Ct = { class: "time-head time-head-year" }, Mt = { class: "time-prev" }, bt = ["title"], xt = { class: "time-next" }, Tt = ["title"], _t = { class: "time-body-year" }, $t = ["aria-disabled", "onClick", "onKeydown", "onMouseover"], Yt = /* @__PURE__ */ Oe({
447
+ name: "ClCalendarsYears",
448
+ __name: "CalendarsYears",
449
+ props: {
450
+ className: String,
451
+ // desc: 自定义CSS类名
452
+ viewValue: String,
453
+ // desc: 当前视图日期值
454
+ selectValue: String,
455
+ // desc: 当前选中日期值
456
+ startValue: String,
457
+ // desc: 范围选择开始值
458
+ endValue: String,
459
+ // desc: 范围选择结束值
460
+ hoverValue: String,
461
+ // desc: 悬停日期值
462
+ minValue: String,
463
+ // desc: 最小可选日期
464
+ maxValue: String
465
+ // desc: 最大可选日期
466
+ },
467
+ emits: {
468
+ onChangeDate: (d) => !0,
469
+ // desc: 视图日期变更时触发
470
+ onSelectDate: (d, ce) => !0,
471
+ // desc: 选中年份时触发
472
+ onHoverDate: (d, ce) => !0,
473
+ // desc: 悬停年份时触发
474
+ onInitComplete: (d) => !0
475
+ // desc: 初始化完成时触发
476
+ },
477
+ setup(d, { emit: ce }) {
478
+ const v = d, i = ce, { optPageLanguage: R, getPageLanguage: $ } = Ne();
479
+ $("dataTime");
480
+ const N = ke("$DateTimeTop"), T = ke("$DateTimeTopBase"), y = ke("$DateTimeBase");
481
+ (!N || !T || !y) && be.warn(
482
+ "ClCalendarsYears",
483
+ "未找到 $DateTimeTop/$DateTimeTopBase/$DateTimeBase 注入,请确保组件在 ClDateTime 组件树内使用"
484
+ );
485
+ const M = `calendarsYears-${o.getRandom(5)}`, g = N?.elId ? `${N.elId}-calendarsYears-${o.getRandom(5)}` : void 0, l = De(() => {
486
+ let D = {
487
+ "panel-calendarsyears": !0
488
+ };
489
+ return D = o.getJsonMerge(D, $e.getClassNameJson(v.className)), D;
490
+ }), t = ge({
491
+ isPrevYear: !1,
492
+ titleYear: "",
493
+ isNextYear: !1
494
+ }), u = Ae([]), n = {
495
+ startYear: 0,
496
+ viewDate: null,
497
+ selectDate: null,
498
+ startDate: null,
499
+ endDate: null,
500
+ hoverDate: null
501
+ }, e = () => {
502
+ if (!n.viewDate)
503
+ return;
504
+ const D = `${n.startYear}-${n.startYear + 9}`, c = N.getMomentDate({ year: n.startYear - 1, month: 11 }), f = N.getMomentDate({ year: n.startYear + 10, month: 0 }), w = c ? y.checkDataMinMax(c.endOf("month"), "year") : !1, r = f ? y.checkDataMinMax(f.startOf("month"), "year") : !1;
505
+ t.isPrevYear = !w, t.titleYear = D, t.isNextYear = !r;
506
+ }, Y = () => {
507
+ const D = y.getFocusDate(), c = n.selectDate, f = [];
508
+ for (let w = -1; w < 11; w += 1) {
509
+ const r = n.startYear + w, V = y.getViewMin(r), E = w === -1, O = w > 9;
510
+ let _ = c ? V.isSame(c, "year") : !1, de = !!(D && V.isSame(D, "year"));
511
+ const ee = y.checkDataMinMax(V, "year");
512
+ let K = !1, Z = !1, J = !1;
513
+ if (T.isRange) {
514
+ if (de = !1, n.hoverDate) {
515
+ const ve = parseInt(n.hoverDate.format("YYYY"), 10);
516
+ n.startDate && n.endDate && n.startDate.isSame(n.hoverDate, "year") && n.hoverDate.isBefore(n.endDate, "year") ? (K = r === parseInt(n.startDate.format("YYYY"), 10), Z = r === parseInt(n.endDate.format("YYYY"), 10), J = K || Z || r > parseInt(n.startDate.format("YYYY"), 10) && r < parseInt(n.endDate.format("YYYY"), 10)) : n.startDate ? (K = r === parseInt(n.startDate.format("YYYY"), 10), J = K || r === ve, J = J || V.isAfter(n.startDate, "year") && V.isBefore(n.hoverDate, "year"), Z = !1) : n.endDate && (Z = r === parseInt(n.endDate.format("YYYY"), 10), J = Z || r === ve, J = J || V.isAfter(n.hoverDate, "year") && V.isBefore(n.endDate, "year"), K = !!(n.hoverDate && n.hoverDate.isSame(n.endDate, "year")) && Z);
517
+ } else
518
+ K = !!(n.startDate && V.isSame(n.startDate, "year")), n.endDate && n.startDate && (Z = V.isSame(n.endDate, "year"), J = V.isAfter(n.startDate, "year") && V.isBefore(n.endDate, "year"));
519
+ _ = K || Z;
520
+ }
521
+ T.layerType === "years" && (de = !1);
522
+ const pe = $e.getAddClass("year", {
523
+ old: E,
524
+ new: O,
525
+ active: _ && !E && !O,
526
+ focused: de,
527
+ disabled: ee,
528
+ "date-start": K && !E && !O,
529
+ "date-end": Z && !E && !O,
530
+ "range-in": J && !E && !O
531
+ });
532
+ f.push({ cls: pe, year: r, isDisabled: ee, value: r });
533
+ }
534
+ u.value = f;
535
+ }, ie = () => {
536
+ n.viewDate && (n.startYear = Math.floor(n.viewDate.year() / 10) * 10, e(), Y());
537
+ }, te = (D, c, f) => {
538
+ n.viewDate && (n.viewDate = n.viewDate.clone()[D](c, f), ie(), i("onChangeDate", n.viewDate));
539
+ };
540
+ let G = !1;
541
+ const ne = () => {
542
+ G || (G = !0, Ve(() => {
543
+ i("onInitComplete", "years");
544
+ }));
545
+ }, he = () => {
546
+ n.selectDate = N.getMomentDate(v.selectValue), n.startDate = N.getMomentDate(v.startValue), n.endDate = N.getMomentDate(v.endValue), n.hoverDate = N.getMomentDate(v.hoverValue);
547
+ }, ye = (D, c, f) => {
548
+ if (c !== f) {
549
+ const w = N.getMomentDate(c);
550
+ w && w.isValid() ? (n[D] = w, he(), ie(), ne()) : (n.viewDate = null, n.startYear = 0, u.value = [], t.isPrevYear = !1, t.isNextYear = !1, t.titleYear = "");
551
+ }
552
+ }, A = () => {
553
+ const D = N.getMomentDate(v.viewValue);
554
+ D && D.isValid() && (n.viewDate = D, he(), ie(), ne());
555
+ };
556
+ Pe(() => {
557
+ Ve(() => {
558
+ A();
559
+ });
560
+ }), re(
561
+ () => v.viewValue,
562
+ (D, c) => {
563
+ ye("viewDate", D, c);
564
+ }
565
+ ), re(
566
+ [() => v.selectValue, () => v.startValue, () => v.endValue, () => v.hoverValue],
567
+ () => {
568
+ n.viewDate && (n.selectDate = N.getMomentDate(v.selectValue), n.startDate = N.getMomentDate(v.startValue), n.endDate = N.getMomentDate(v.endValue), n.hoverDate = N.getMomentDate(v.hoverValue), Y());
569
+ }
570
+ ), re([() => v.minValue, () => v.maxValue], () => {
571
+ n.viewDate && (e(), Y());
572
+ });
573
+ const X = (D) => {
574
+ D.preventDefault(), D.stopPropagation(), te("subtract", 10, "years");
575
+ }, oe = (D) => {
576
+ D.preventDefault(), D.stopPropagation(), te("add", 10, "years");
577
+ }, z = (D, c) => {
578
+ D.preventDefault(), D.stopPropagation(), c.isDisabled || i("onSelectDate", "years", c);
579
+ }, se = (D, c) => {
580
+ D.preventDefault(), D.stopPropagation(), c.isDisabled || i("onHoverDate", "years", c);
581
+ };
582
+ return (D, c) => (S(), C("div", {
583
+ class: ue(l.value),
584
+ id: me(g)
585
+ }, [
586
+ I("table", St, [
587
+ I("thead", null, [
588
+ I("tr", null, [
589
+ I("th", Ct, [
590
+ I("span", Mt, [
591
+ t.isPrevYear ? (S(), C("span", {
592
+ key: 0,
593
+ class: "prev-year",
594
+ title: me(R).prevYear10,
595
+ onClick: X
596
+ }, [
597
+ fe(_e, { name: "angle-left" })
598
+ ], 8, bt)) : (S(), C(U, { key: 1 }, [], 64))
599
+ ]),
600
+ I("span", null, xe(t.titleYear), 1),
601
+ I("span", xt, [
602
+ t.isNextYear ? (S(), C("span", {
603
+ key: 0,
604
+ class: "next-year",
605
+ title: me(R).nextYear10,
606
+ onClick: oe
607
+ }, [
608
+ fe(_e, { name: "angle-right" })
609
+ ], 8, Tt)) : (S(), C(U, { key: 1 }, [], 64))
610
+ ])
611
+ ])
612
+ ])
613
+ ]),
614
+ I("tbody", null, [
615
+ I("tr", null, [
616
+ I("td", _t, [
617
+ (S(!0), C(U, null, Ie(u.value, (f, w) => (S(), C("span", {
618
+ key: `${M}-${f.year}-${w}`,
619
+ role: "button",
620
+ tabindex: "0",
621
+ "aria-disabled": f.isDisabled,
622
+ class: ue(f.cls),
623
+ onClick: (r) => z(r, f),
624
+ onKeydown: [
625
+ Ce(Me((r) => z(r, f), ["prevent"]), ["enter"]),
626
+ Ce(Me((r) => z(r, f), ["prevent"]), ["space"])
627
+ ],
628
+ onMouseover: (r) => se(r, f)
629
+ }, xe(f.year), 43, $t))), 128))
630
+ ])
631
+ ])
632
+ ])
633
+ ])
634
+ ], 10, wt));
635
+ }
636
+ }), Et = ["id"], Ot = { class: "times-container" }, It = ["title"], Pt = ["title"], Bt = { class: "times-clock" }, Nt = { class: "clock-nums" }, Rt = ["aria-disabled", "onClick", "onKeydown"], At = { class: "clock-pointer" }, Ht = { class: "clock-am" }, Lt = "2000-01-01", Qt = /* @__PURE__ */ Oe({
637
+ name: "ClCalendarsClocks",
638
+ __name: "CalendarsClock",
639
+ props: {
640
+ className: String,
641
+ // desc: 自定义CSS类名
642
+ selectDay: String,
643
+ // desc: 选中日期
644
+ selectValue: String,
645
+ // desc: 选中时间值
646
+ minValue: String,
647
+ // desc: 最小可选时间
648
+ maxValue: String,
649
+ // desc: 最大可选时间
650
+ isShowPointer: {
651
+ type: Boolean,
652
+ default: !0
653
+ // desc: 是否显示表盘指针
654
+ },
655
+ isShowSubmit: {
656
+ type: Boolean,
657
+ default: !1
658
+ // desc: 是否显示确认按钮
659
+ },
660
+ isShowCancel: {
661
+ type: Boolean,
662
+ default: !1
663
+ // desc: 是否显示取消按钮
664
+ },
665
+ isClickOverlay: {
666
+ type: Boolean,
667
+ default: !1
668
+ // desc: 是否点击遮罩关闭
669
+ }
670
+ },
671
+ emits: {
672
+ onSubmit: (d) => !0,
673
+ // desc: 确认时间选择时触发
674
+ onInitComplete: (d) => !0
675
+ // desc: 初始化完成时触发
676
+ },
677
+ setup(d, { emit: ce }) {
678
+ const v = d, i = ce, R = `calendarsClock-${o.getRandom(5)}`, { optPageLanguage: $, getPageLanguage: N } = Ne();
679
+ N("dataTime");
680
+ const T = ke("$DateTimeTop"), y = ke("$DateTimeTopBase");
681
+ (!T || !y) && be.warn(
682
+ "ClCalendarsClocks",
683
+ "未找到 $DateTimeTop/$DateTimeTopBase 注入,请确保组件在 ClDateTime 组件树内使用"
684
+ );
685
+ const M = T?.elId ? `${T.elId}-calendarsClock-${o.getRandom(5)}` : void 0, g = ge({
686
+ isOpen: !1,
687
+ activePointer: "hour",
688
+ activeAm: "am"
689
+ }), l = ge({
690
+ hour: !0,
691
+ hourDisabled: !1,
692
+ minute: !0,
693
+ minuteDisabled: !1,
694
+ minuteShowAddSub: !0,
695
+ second: !0,
696
+ secondDisabled: !1
697
+ }), t = ge({
698
+ hour: -90,
699
+ hourMinute: 0,
700
+ minute: -90,
701
+ minuteSecond: 0,
702
+ second: -90
703
+ }), u = ge({
704
+ hour: "00",
705
+ minute: "00",
706
+ second: "00"
707
+ }), n = Ae([]), e = {
708
+ selectDayDate: null,
709
+ minDate: null,
710
+ maxDate: null,
711
+ timeAngle: { hour: 30, minute: 6, second: 6 },
712
+ num: {
713
+ hourAm: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],
714
+ hourPm: [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23],
715
+ minute: [0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55],
716
+ second: [0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55]
717
+ },
718
+ origValue: {
719
+ hour: "00",
720
+ minute: "00",
721
+ second: "00"
722
+ },
723
+ lastValue: {
724
+ hour: "00",
725
+ minute: "00",
726
+ second: "00"
727
+ },
728
+ isCheckMin: !1,
729
+ checkMinDiff: null,
730
+ min: {
731
+ hour: 0,
732
+ minute: 0,
733
+ second: 0
734
+ },
735
+ isCheckMax: !1,
736
+ checkMaxDiff: null,
737
+ max: {
738
+ hour: 0,
739
+ minute: 0,
740
+ second: 0
741
+ }
742
+ }, Y = De(() => {
743
+ let a = {
744
+ "panel-calendarsclocks": !0,
745
+ "datetime-times": !0
746
+ };
747
+ return a["times-open"] = g.isOpen, a = o.getJsonMerge(a, $e.getClassNameJson(v.className)), a;
748
+ }), ie = De(() => {
749
+ const a = { "pointer-hour": !0 };
750
+ return a["pointer-active"] = g.activePointer === "hour", a["pointer-disabled"] = l.hourDisabled, a;
751
+ }), te = De(() => {
752
+ const a = { "pointer-minute": !0 };
753
+ return a["pointer-active"] = g.activePointer === "minute", a["pointer-disabled"] = l.minuteDisabled, a;
754
+ }), G = De(() => {
755
+ const a = { "pointer-second": !0 };
756
+ return a["pointer-active"] = g.activePointer === "second", a["pointer-disabled"] = l.secondDisabled, a;
757
+ }), ne = De(() => {
758
+ const a = { "am-am": !0 };
759
+ return a["am-active"] = g.activeAm === "am", a;
760
+ }), he = De(() => {
761
+ const a = { "am-pm": !0 };
762
+ return a["am-active"] = g.activeAm === "pm", a;
763
+ }), ye = De(() => {
764
+ const a = { "clock-set": !0, "clock-set-hour": !0 };
765
+ return a["clock-set-active"] = g.activePointer === "hour", a["clock-set-disabled"] = l.hourDisabled, a;
766
+ }), A = De(() => {
767
+ const a = { "clock-set": !0, "clock-set-minute": !0 };
768
+ return a["clock-set-active"] = g.activePointer === "minute", a["clock-set-disabled"] = l.minuteDisabled, a;
769
+ }), X = De(() => {
770
+ const a = { "clock-set": !0, "clock-set-second": !0 };
771
+ return a["clock-set-active"] = g.activePointer === "second", a["clock-set-disabled"] = l.secondDisabled, a;
772
+ }), oe = (a, m) => {
773
+ e[a] = T.getMomentDate(m);
774
+ }, z = (a) => {
775
+ let m = parseInt(e.lastValue[a], 10), p = parseInt(u[a], 10), L = 0;
776
+ return a === "hour" ? (p === 0 && m === 23 && (p = 24), m === 0 && p === 23 && (m = 24), p - m > 6 && (m += 12), m - p >= 6 && (p += 12), L = p - m) : (p - m > 30 && (m += 60), m - p >= 30 && (p += 60), L = p - m), L;
777
+ }, se = (a) => {
778
+ const p = z(a) * e.timeAngle[a];
779
+ return t[a] + (p >= 360 ? p % 360 : p);
780
+ }, D = () => {
781
+ const a = se("hour"), m = e.timeAngle.hour * parseFloat((parseInt(u.minute, 10) / 60).toString()), p = se("minute"), L = e.timeAngle.second * parseFloat((parseInt(u.second, 10) / 60).toString()), q = se("second");
782
+ t.hour = a, t.hourMinute = m, t.minute = p, t.minuteSecond = L, t.second = q;
783
+ }, c = (a) => parseInt(a, 10) < 12 ? "am" : "pm", f = (a, m) => {
784
+ let p = !0;
785
+ switch (a) {
786
+ case "hour":
787
+ p = !0;
788
+ break;
789
+ case "minute":
790
+ p = parseInt(u.hour, 10) === e[m].hour;
791
+ break;
792
+ case "second":
793
+ p = parseInt(u.hour, 10) === e[m].hour && parseInt(u.minute, 10) === e[m].minute;
794
+ break;
795
+ }
796
+ return p;
797
+ }, w = () => e.isCheckMin && e.isCheckMax && e.checkMinDiff === 0 && e.checkMaxDiff === 0 && e.min.hour > e.max.hour, r = (a, m) => {
798
+ let p = !1;
799
+ return w() && a === "hour" ? p = m < e.min[a] && m > e.max[a] : e.isCheckMin && (e.checkMinDiff === 0 ? f(a, "min") && (p = m < e.min[a]) : e.checkMinDiff < 0 && (p = !0)), !p && e.isCheckMax && (e.checkMaxDiff === 0 ? f(a, "max") && (p = m > e.max[a]) : e.checkMaxDiff > 0 && (p = !0)), p;
800
+ }, V = (a) => {
801
+ let m = a;
802
+ m === "hour" && (m = g.activeAm === "am" ? "hourAm" : "hourPm");
803
+ const p = l[`${a}Disabled`], L = [];
804
+ e.num[m].forEach((q, ae) => {
805
+ const le = { num: q, cls: "clock-num", isDisabled: !1 };
806
+ le.cls += ` clock-num${ae + 1} `, le.isDisabled = p ? !0 : r(a, q), le.isDisabled && (le.cls += " clock-nums-disabled "), L.push(le);
807
+ }), n.value = L;
808
+ }, E = (a) => {
809
+ g.activePointer = a, a === "hour" && (g.activeAm = c(u.hour)), V(a);
810
+ }, O = (a) => {
811
+ let m = null;
812
+ if (!o.isUndefined(a) && !o.isUndefined(e.selectDayDate)) {
813
+ const p = e.selectDayDate.clone().format("YYYY-MM-DD 00:00:00"), L = a.clone().format("YYYY-MM-DD 00:00:00");
814
+ m = T.Dayjs(p).diff(T.Dayjs(L));
815
+ }
816
+ return m;
817
+ }, _ = (a = !0) => {
818
+ t.hour = -90, t.hourMinute = 0, t.minute = -90, t.minuteSecond = 0, t.second = -90, e.lastValue = { hour: "00", minute: "00", second: "00" }, D(), Ve(() => {
819
+ const m = u.hour, p = u.minute, L = u.second;
820
+ e.lastValue = { hour: m, minute: p, second: L }, a && (e.origValue = { hour: m, minute: p, second: L });
821
+ });
822
+ }, de = (a, m) => {
823
+ e.lastValue.hour = u.hour, e.lastValue.minute = u.minute, e.lastValue.second = u.second, u[a] = o.getFillZero(m), D(), v.isShowSubmit || i("onSubmit", `${u.hour}:${u.minute}:${u.second}`);
824
+ }, ee = (a) => {
825
+ let m = 0, p = 0, L = 0;
826
+ if (!o.isEmpty(a)) {
827
+ const q = (o.isEmpty(e.selectDayDate) ? T.getNow() : e.selectDayDate).format("YYYY-MM-DD"), ae = T.getMomentDate(`${q} ${a}`);
828
+ ae && ae.isValid() && (m = ae.hour(), p = ae.minute(), L = ae.second());
829
+ }
830
+ return { HH: m, mm: p, ss: L };
831
+ }, K = () => {
832
+ let a = !0, m = !0;
833
+ const p = o.isEmpty(e.selectDayDate), L = ee(v.selectValue), q = L.HH, ae = L.mm, le = L.ss;
834
+ switch (y.layerType) {
835
+ case "hours":
836
+ a = !1, m = !1;
837
+ break;
838
+ case "minutes":
839
+ m = !1;
840
+ break;
841
+ }
842
+ e.isCheckMin = !o.isUndefined(e.minDate), e.isCheckMin && (e.checkMinDiff = T.checkIsTimes() ? 0 : O(e.minDate), e.min = {
843
+ hour: e.minDate.hour(),
844
+ minute: e.minDate.minute(),
845
+ second: e.minDate.second()
846
+ }), e.isCheckMax = !o.isUndefined(e.maxDate), e.isCheckMax && (e.checkMaxDiff = T.checkIsTimes() ? 0 : O(e.maxDate), e.max = {
847
+ hour: e.maxDate.hour(),
848
+ minute: e.maxDate.minute(),
849
+ second: e.maxDate.second()
850
+ });
851
+ const Ee = o.getFillZero(q);
852
+ let Re = o.getFillZero(ae), Te = o.getFillZero(le);
853
+ a || (Re = "00"), m || (Te = "00"), e.origValue = { hour: Ee, minute: Re, second: Te }, l.hour = !0, l.minute = a, l.second = m, u.hour = Ee, u.minute = Re, u.second = Te, T.checkIsTimes() || (l.hourDisabled = p, l.minuteDisabled = p, l.secondDisabled = p), y.layerType === "hours" && (l.minute = !0, l.minuteDisabled = !0, l.minuteShowAddSub = !1), Z(), J();
854
+ }, Z = () => {
855
+ e.lastValue = { hour: "00", minute: "00", second: "00" }, t.hour = -90, t.hourMinute = 0, t.minute = -90, t.minuteSecond = 0, t.second = -90;
856
+ }, J = () => {
857
+ D(), g.activeAm = c(u.hour), V(g.activePointer);
858
+ }, pe = () => {
859
+ g.isOpen = v.isShowPointer, oe(
860
+ "selectDayDate",
861
+ T.checkIsTimes() ? Lt : v.selectDay
862
+ ), oe("minDate", T.getValueEffective(v.minValue)), oe("maxDate", T.getValueEffective(v.maxValue)), K(), E("hour"), _(), Ve(() => {
863
+ i("onInitComplete", "times");
864
+ });
865
+ }, ve = (a) => {
866
+ let m = !1;
867
+ return l[a] && !l[`${a}Disabled`] && (g.isOpen ? m = !0 : (_(!1), g.isOpen = !0, E(a))), m;
868
+ }, Ye = (a, m) => {
869
+ if (l[a] && !l[`${a}Disabled`] && g.isOpen) {
870
+ let p = !0, L = 0, q = a === "hour" ? 23 : 59;
871
+ if (e.isCheckMin && (e.checkMinDiff === 0 ? f(a, "min") && (L = e.min[a]) : e.checkMinDiff < 0 && (p = !1)), e.isCheckMax && (e.checkMaxDiff === 0 ? f(a, "max") && (q = e.max[a]) : e.checkMaxDiff > 0 && (p = !1)), p) {
872
+ const ae = parseInt(u[a], 10);
873
+ let le = 0;
874
+ w() && a === "hour" ? le = m === "add" ? ae >= 23 ? 0 : ae + 1 : ae <= 0 ? 23 : ae - 1 : m === "add" ? le = ae < L || ae >= q ? L : ae + 1 : le = ae > q || ae <= L ? q : ae - 1, r(a, le) || (de(a, le), E(a));
875
+ }
876
+ }
877
+ };
878
+ Pe(() => {
879
+ Ve(() => {
880
+ pe();
881
+ });
882
+ }), re(
883
+ () => v.selectDay,
884
+ (a, m) => {
885
+ oe("selectDayDate", a), K();
886
+ }
887
+ ), re(
888
+ () => v.minValue,
889
+ (a, m) => {
890
+ const p = T.getValueEffective(a);
891
+ oe("minDate", p), K();
892
+ }
893
+ ), re(
894
+ () => v.maxValue,
895
+ (a, m) => {
896
+ const p = T.getValueEffective(a);
897
+ oe("maxDate", p), K();
898
+ }
899
+ ), re(
900
+ () => v.selectValue,
901
+ (a, m) => {
902
+ const p = ee(a), L = o.getFillZero(p.HH), q = o.getFillZero(p.mm), ae = o.getFillZero(p.ss);
903
+ (u.hour !== L || u.minute !== q || u.second !== ae) && (u.hour = L, u.minute = q, u.second = ae, e.origValue = { hour: L, minute: q, second: ae }, Z(), J());
904
+ }
905
+ );
906
+ const h = (a) => {
907
+ l[a] && !l[`${a}Disabled`] && (E(a), g.isOpen || (_(), g.isOpen = !0));
908
+ }, x = (a) => {
909
+ if (!a.isDisabled) {
910
+ const m = g.activePointer, p = parseInt(u[m], 10), L = a.num;
911
+ L !== p && de(m, L);
912
+ }
913
+ }, b = (a) => {
914
+ g.activeAm = a, g.activePointer = "hour";
915
+ const m = parseInt(u.hour, 10);
916
+ a === "pm" && m < 12 ? u.hour = o.getFillZero(m + 12) : a === "am" && m >= 12 && (u.hour = o.getFillZero(m - 12)), D(), V("hour");
917
+ }, B = () => ve("hour"), j = (a) => {
918
+ let m = !1, p = !1;
919
+ const L = w();
920
+ if (e.isCheckMin) {
921
+ if (e.checkMinDiff < 0)
922
+ m = !0, p = !0;
923
+ else if (e.checkMinDiff === 0) {
924
+ const q = parseInt(u[a], 10);
925
+ f(a, "min") && (m = L ? q === e.min[a] : q <= e.min[a]);
926
+ }
927
+ }
928
+ if (e.isCheckMax) {
929
+ if (e.checkMaxDiff > 0)
930
+ m = !0, p = !0;
931
+ else if (e.checkMaxDiff === 0) {
932
+ const q = parseInt(u[a], 10);
933
+ f(a, "max") && (p = L ? q === e.max[a] : q >= e.max[a]);
934
+ }
935
+ }
936
+ return { subtractDisabled: m, addDisabled: p };
937
+ }, s = (a) => (o.isEmpty(a.type) || Ye("hour", a.type), { value: u.hour, ...j("hour") }), k = () => ve("minute"), P = (a) => (o.isEmpty(a.type) || Ye("minute", a.type), { value: u.minute, ...j("minute") }), H = () => ve("second"), Q = (a) => (o.isEmpty(a.type) || Ye("second", a.type), { value: u.second, ...j("second") }), W = () => {
938
+ v.isClickOverlay && g.isOpen && (T.checkIsTimes() || (g.isOpen = !1), i("onSubmit", `${u.hour}:${u.minute}:${u.second}`));
939
+ }, we = () => {
940
+ T.checkIsTimes() || (g.isOpen = !1), i("onSubmit", `${u.hour}:${u.minute}:${u.second}`);
941
+ }, Se = () => {
942
+ (u.hour !== e.origValue.hour || u.minute !== e.origValue.minute || u.second !== e.origValue.second) && (e.lastValue.hour = u.hour, e.lastValue.minute = u.minute, e.lastValue.second = u.second, u.hour = e.origValue.hour, u.minute = e.origValue.minute, u.second = e.origValue.second, J()), T.checkIsTimes() || (g.isOpen = !1);
943
+ };
944
+ return (a, m) => (S(), C("div", {
945
+ class: ue(Y.value),
946
+ id: me(M)
947
+ }, [
948
+ m[15] || (m[15] = I("div", { class: "datetime-times-inner" }, null, -1)),
949
+ I("div", null, [
950
+ I("div", Ot, [
951
+ I("div", {
952
+ class: "times-overlay",
953
+ onClick: W
954
+ }),
955
+ d.isShowCancel ? (S(), C("div", {
956
+ key: 0,
957
+ class: "times-cancel",
958
+ title: me($).common.cancel,
959
+ onClick: Se
960
+ }, [
961
+ fe(_e, { name: "close1" })
962
+ ], 8, It)) : (S(), C(U, { key: 1 }, [], 64)),
963
+ d.isShowSubmit ? (S(), C("div", {
964
+ key: 2,
965
+ class: "times-submit",
966
+ title: me($).common.submit,
967
+ onClick: we
968
+ }, [
969
+ fe(_e, { name: "check1" })
970
+ ], 8, Pt)) : (S(), C(U, { key: 3 }, [], 64)),
971
+ I("div", Bt, [
972
+ I("div", Nt, [
973
+ (S(!0), C(U, null, Ie(n.value, (p, L) => (S(), C("div", {
974
+ key: `${R}-clock-${L}`,
975
+ role: "button",
976
+ tabindex: "0",
977
+ "aria-disabled": p.isDisabled,
978
+ class: ue(p.cls),
979
+ onClick: (q) => x(p),
980
+ onKeydown: [
981
+ Ce(Me((q) => x(p), ["prevent"]), ["enter"]),
982
+ Ce(Me((q) => x(p), ["prevent"]), ["space"])
983
+ ]
984
+ }, xe(p.num), 43, Rt))), 128))
985
+ ]),
986
+ I("div", At, [
987
+ l.hour ? (S(), C("div", {
988
+ key: 0,
989
+ class: ue(ie.value),
990
+ onClick: m[0] || (m[0] = (p) => h("hour")),
991
+ style: Qe({ transform: `rotate(${t.hour + t.hourMinute}deg)` })
992
+ }, null, 6)) : (S(), C(U, { key: 1 }, [], 64)),
993
+ l.minute ? (S(), C("div", {
994
+ key: 2,
995
+ class: ue(te.value),
996
+ onClick: m[1] || (m[1] = (p) => h("minute")),
997
+ style: Qe({ transform: `rotate(${t.minute + t.minuteSecond}deg)` })
998
+ }, null, 6)) : (S(), C(U, { key: 3 }, [], 64)),
999
+ l.second ? (S(), C("div", {
1000
+ key: 4,
1001
+ class: ue(G.value),
1002
+ onClick: m[2] || (m[2] = (p) => h("second")),
1003
+ style: Qe({ transform: `rotate(${t.second}deg)` })
1004
+ }, null, 6)) : (S(), C(U, { key: 5 }, [], 64))
1005
+ ]),
1006
+ We(I("div", Ht, [
1007
+ I("small", {
1008
+ role: "button",
1009
+ tabindex: "0",
1010
+ class: ue(ne.value),
1011
+ onClick: m[3] || (m[3] = (p) => b("am")),
1012
+ onKeydown: [
1013
+ m[4] || (m[4] = Ce(Me((p) => b("am"), ["prevent"]), ["enter"])),
1014
+ m[5] || (m[5] = Ce(Me((p) => b("am"), ["prevent"]), ["space"]))
1015
+ ]
1016
+ }, xe(me($).am), 35),
1017
+ I("small", {
1018
+ role: "button",
1019
+ tabindex: "0",
1020
+ class: ue(he.value),
1021
+ onClick: m[6] || (m[6] = (p) => b("pm")),
1022
+ onKeydown: [
1023
+ m[7] || (m[7] = Ce(Me((p) => b("pm"), ["prevent"]), ["enter"])),
1024
+ m[8] || (m[8] = Ce(Me((p) => b("pm"), ["prevent"]), ["space"]))
1025
+ ]
1026
+ }, xe(me($).pm), 35)
1027
+ ], 512), [
1028
+ [qe, g.activePointer === "hour"]
1029
+ ])
1030
+ ])
1031
+ ]),
1032
+ l.hour ? (S(), C("div", {
1033
+ key: 0,
1034
+ class: ue(ye.value),
1035
+ onClick: m[10] || (m[10] = (p) => h("hour"))
1036
+ }, [
1037
+ fe(Fe, {
1038
+ value: u.hour,
1039
+ "onUpdate:value": m[9] || (m[9] = (p) => u.hour = p),
1040
+ size: "small",
1041
+ isClean: !1,
1042
+ disabled: l.hourDisabled,
1043
+ isTextRead: !0,
1044
+ fillZeroCount: 2,
1045
+ isLoop: !0,
1046
+ btnTheme: "upDown",
1047
+ operateBtnDownBeforeCallback: B,
1048
+ calculationOperateValueCallback: s
1049
+ }, null, 8, ["value", "disabled"])
1050
+ ], 2)) : (S(), C(U, { key: 1 }, [], 64)),
1051
+ l.minute && l.minuteShowAddSub ? (S(), C("div", {
1052
+ key: 2,
1053
+ class: ue(A.value),
1054
+ onClick: m[12] || (m[12] = (p) => h("minute"))
1055
+ }, [
1056
+ fe(Fe, {
1057
+ value: u.minute,
1058
+ "onUpdate:value": m[11] || (m[11] = (p) => u.minute = p),
1059
+ size: "small",
1060
+ isClean: !1,
1061
+ disabled: l.minuteDisabled,
1062
+ isTextRead: !0,
1063
+ fillZeroCount: 2,
1064
+ isLoop: !0,
1065
+ btnTheme: "upDown",
1066
+ operateBtnDownBeforeCallback: k,
1067
+ calculationOperateValueCallback: P
1068
+ }, null, 8, ["value", "disabled"])
1069
+ ], 2)) : (S(), C(U, { key: 3 }, [], 64)),
1070
+ l.second ? (S(), C("div", {
1071
+ key: 4,
1072
+ class: ue(X.value),
1073
+ onClick: m[14] || (m[14] = (p) => h("second"))
1074
+ }, [
1075
+ fe(Fe, {
1076
+ value: u.second,
1077
+ "onUpdate:value": m[13] || (m[13] = (p) => u.second = p),
1078
+ size: "small",
1079
+ isClean: !1,
1080
+ disabled: l.secondDisabled,
1081
+ isTextRead: !0,
1082
+ fillZeroCount: 2,
1083
+ isLoop: !0,
1084
+ btnTheme: "upDown",
1085
+ operateBtnDownBeforeCallback: H,
1086
+ calculationOperateValueCallback: Q
1087
+ }, null, 8, ["value", "disabled"])
1088
+ ], 2)) : (S(), C(U, { key: 5 }, [], 64))
1089
+ ])
1090
+ ], 10, Et));
1091
+ }
1092
+ }), Ft = ["id"], Ke = /* @__PURE__ */ Oe({
1093
+ name: "ClCalendarsBase",
1094
+ __name: "CalendarsBase",
1095
+ props: {
1096
+ className: String,
1097
+ // desc: 自定义CSS类名
1098
+ viewValue: String,
1099
+ // desc: 当前视图日期值
1100
+ selectValue: String,
1101
+ // desc: 当前选中日期值
1102
+ startValue: String,
1103
+ // desc: 范围选择开始值
1104
+ endValue: String,
1105
+ // desc: 范围选择结束值
1106
+ hoverValue: String,
1107
+ // desc: 悬停日期值
1108
+ minValue: String,
1109
+ // desc: 最小可选日期
1110
+ maxValue: String
1111
+ // desc: 最大可选日期
1112
+ },
1113
+ emits: {
1114
+ onSelectDate: (d) => !0,
1115
+ // desc: 选中日期时触发
1116
+ onChangeViewValue: (d) => !0,
1117
+ // desc: 视图日期变更时触发
1118
+ onHoverDate: (d) => !0,
1119
+ // desc: 悬停日期时触发(payload 为 Dayjs 实例,由 _getSelectDateByElement 产出)
1120
+ onChangeViewType: (d) => !0,
1121
+ // desc: 视图类型变更时触发
1122
+ onSelectTime: (d) => !0,
1123
+ // desc: 选中时间时触发
1124
+ onInitComplete: (d) => !0
1125
+ // desc: 初始化完成时触发
1126
+ },
1127
+ setup(d, { emit: ce }) {
1128
+ const v = d, i = ce, R = ke("$DateTimeTop"), $ = ke("$DateTimeTopBase");
1129
+ (!R || !$) && be.warn(
1130
+ "ClCalendarsBase",
1131
+ "未找到 $DateTimeTop/$DateTimeTopBase 注入,请确保组件在 ClDateTime 组件树内使用"
1132
+ );
1133
+ const N = R?.elId ? `${R.elId}-calendarsBase-${o.getRandom(5)}` : void 0, T = De(() => {
1134
+ let c = {
1135
+ "panel-calendarsbase": !0
1136
+ };
1137
+ return c = o.getJsonMerge(c, $e.getClassNameJson(v.className)), c;
1138
+ }), y = ge({
1139
+ currentView: "",
1140
+ viewValue: "",
1141
+ selectValue: "",
1142
+ selectClockDay: "",
1143
+ selectClockTime: ""
1144
+ }), M = ge({
1145
+ isShow: !1,
1146
+ isViewDay: !1,
1147
+ isShowClockPointer: !1,
1148
+ isShowClockSubmit: !1,
1149
+ isShowClockCancel: !1,
1150
+ isClockClickOverlay: !1
1151
+ }), g = {
1152
+ viewDate: null,
1153
+ selectDate: null,
1154
+ focusDate: null,
1155
+ minDate: null,
1156
+ maxDate: null
1157
+ }, l = (c, f) => {
1158
+ g[c] = o.isString(f) ? R.getMomentDate(f) : null;
1159
+ }, t = (c) => {
1160
+ const f = Object.keys(c);
1161
+ o.isExistValue(f, "viewValue") && $.layerView === c.currentView && i("onChangeViewValue", c.viewValue), f.forEach((w) => {
1162
+ const r = w, V = c[r];
1163
+ o.isExistJsonKey(y, r) && y[r] !== V && (y[r] = V), o.isExistJsonKey(g, r) && (g[r] = V);
1164
+ });
1165
+ }, u = (c, f) => {
1166
+ let w = !1;
1167
+ return o.isEmpty(c) || o.isNaN(c) || (o.isEmpty(g.minDate) || (w = R.Dayjs(c).isBefore(g.minDate, f)), !w && !o.isEmpty(g.maxDate) && (w = R.Dayjs(c).isAfter(g.maxDate, f))), w;
1168
+ }, n = (c, f) => {
1169
+ let w = 0, r = 1;
1170
+ if (o.isEmpty(g.minDate))
1171
+ o.isUndefined(f) || (w = f);
1172
+ else {
1173
+ const V = c === g.minDate.year();
1174
+ let E = !0;
1175
+ o.isUndefined(f) ? w = V ? g.minDate.month() : 0 : (E = f === g.minDate.month(), w = f), r = V && E ? g.minDate.date() : 1;
1176
+ }
1177
+ return R.getMomentDate({ year: c, month: w, day: r }) ?? R.getNow().startOf("year");
1178
+ }, e = (c) => {
1179
+ let f = "";
1180
+ switch (c) {
1181
+ case "months":
1182
+ f = "days";
1183
+ break;
1184
+ case "years":
1185
+ f = "months";
1186
+ break;
1187
+ default:
1188
+ f = "days";
1189
+ break;
1190
+ }
1191
+ return f;
1192
+ }, Y = (c) => {
1193
+ const w = (c || g.selectDate || g.viewDate).format("YYYY-MM-DD") + " " + (o.isEmpty(y.selectClockTime) ? "00:00:00" : y.selectClockTime);
1194
+ return R.Dayjs(w);
1195
+ }, ie = (c, f) => {
1196
+ const w = g.viewDate.clone(), r = parseInt(f.value, 10);
1197
+ if (o.isNaN(r))
1198
+ return Y(w);
1199
+ let V;
1200
+ switch (c) {
1201
+ case "days": {
1202
+ let E = 0;
1203
+ f.isNew ? E = 1 : f.isOld && (E = -1), V = w.month(w.month() + E).date(r);
1204
+ break;
1205
+ }
1206
+ case "months": {
1207
+ const E = g.selectDate || w, O = w.month(r);
1208
+ V = O.date(Math.min(E.date(), O.daysInMonth()));
1209
+ break;
1210
+ }
1211
+ case "years":
1212
+ V = w.month(0).date(1).year(r);
1213
+ break;
1214
+ default:
1215
+ V = w;
1216
+ break;
1217
+ }
1218
+ return Y(V);
1219
+ }, te = () => {
1220
+ y.viewValue = g.viewDate.format($.formatIn), g.focusDate = g.viewDate.clone();
1221
+ }, G = (c) => {
1222
+ l("selectDate", c === "-1" ? "" : c);
1223
+ const f = g.selectDate ? g.selectDate.format("YYYY-MM-DD") : "";
1224
+ y.selectValue = f, y.selectClockDay = f, y.selectClockTime = g.selectDate ? g.selectDate.format("HH:mm:ss") : "";
1225
+ }, ne = () => {
1226
+ let c = !1, f = !1, w = !1, r = !1, V = !1, E = !1;
1227
+ y.currentView === "times" ? (c = !0, w = !0, E = !1, r = $.isDefault && $.isShowPopup, V = $.isDefault && $.isShowPopup, $.layerType === "hours" && (V = !1, r = !1)) : y.currentView === "days" && (f = $.timeType === "datetime", f && (V = !0, r = !0, w = !1, E = !0)), M.isShow = c, M.isViewDay = f, M.isShowClockPointer = w, M.isShowClockSubmit = r, M.isShowClockCancel = V, M.isClockClickOverlay = E;
1228
+ }, he = () => {
1229
+ y.currentView = $.layerView, g.viewDate = R.getViewDate(v.viewValue), te(), G(v.selectValue), l("minDate", v.minValue), l("maxDate", v.maxValue), ne();
1230
+ };
1231
+ Pe(() => {
1232
+ Ve(() => {
1233
+ he();
1234
+ });
1235
+ }), re(
1236
+ () => v.viewValue,
1237
+ (c, f) => {
1238
+ g.viewDate = R.getViewDate(c), te();
1239
+ }
1240
+ ), re(
1241
+ () => v.selectValue,
1242
+ (c, f) => {
1243
+ const w = $.isRange && c === "-1";
1244
+ let r = c;
1245
+ const V = y.selectClockTime;
1246
+ w && (r = ""), G(r), w && (y.selectClockTime = V);
1247
+ }
1248
+ ), re(
1249
+ () => v.minValue,
1250
+ (c, f) => {
1251
+ l("minDate", c);
1252
+ }
1253
+ ), re(
1254
+ () => v.maxValue,
1255
+ (c, f) => {
1256
+ l("maxDate", c);
1257
+ }
1258
+ );
1259
+ const ye = (c) => {
1260
+ t({
1261
+ currentView: y.currentView,
1262
+ viewDate: c.clone(),
1263
+ viewValue: c.format($.formatIn)
1264
+ });
1265
+ }, A = (c) => {
1266
+ y.currentView = c, g.focusDate = g.viewDate.clone(), ne(), i("onChangeViewType", c);
1267
+ }, X = (c, f) => {
1268
+ const w = ie(c, f), r = w.format("YYYY-MM-DD"), V = {};
1269
+ if ($.layerView === c)
1270
+ V.selectDate = w, V.selectValue = r, $.isRange || (V.selectClockDay = r), t(V), i("onSelectDate", r);
1271
+ else {
1272
+ const E = e(c);
1273
+ if (E === c) {
1274
+ V.selectDate = w, V.selectValue = r, $.isRange || (V.selectClockDay = r), t(V), i("onSelectDate", r);
1275
+ return;
1276
+ }
1277
+ V.viewDate = w.clone().startOf("month"), V.viewValue = V.viewDate.format($.formatIn), V.currentView = E, t(V), ne(), i("onChangeViewType", V.currentView);
1278
+ }
1279
+ }, oe = (c, f) => {
1280
+ const w = ie(c, f);
1281
+ i("onHoverDate", w);
1282
+ }, z = (c) => {
1283
+ t({ selectClockTime: c }), i("onSelectTime", c);
1284
+ }, se = /* @__PURE__ */ new Set(), D = (c) => {
1285
+ $.layerView === c && !se.has(c) && (se.add(c), i("onInitComplete", c));
1286
+ };
1287
+ return Je("$DateTimeBase", {
1288
+ checkDataMinMax: u,
1289
+ getViewMin: n,
1290
+ getFocusDate: () => g.focusDate && g.focusDate.clone()
1291
+ }), (c, f) => (S(), C("div", {
1292
+ id: me(N),
1293
+ class: ue(T.value)
1294
+ }, [
1295
+ y.currentView === "days" ? (S(), Be(mt, {
1296
+ key: 0,
1297
+ viewValue: y.viewValue,
1298
+ selectValue: y.selectValue,
1299
+ startValue: d.startValue,
1300
+ endValue: d.endValue,
1301
+ hoverValue: d.hoverValue,
1302
+ minValue: d.minValue,
1303
+ maxValue: d.maxValue,
1304
+ onOnChangeDate: ye,
1305
+ onOnChangeType: A,
1306
+ onOnSelectDate: X,
1307
+ onOnHoverDate: oe,
1308
+ onOnInitComplete: D
1309
+ }, null, 8, ["viewValue", "selectValue", "startValue", "endValue", "hoverValue", "minValue", "maxValue"])) : y.currentView === "months" ? (S(), Be(kt, {
1310
+ key: 1,
1311
+ viewValue: y.viewValue,
1312
+ selectValue: y.selectValue,
1313
+ startValue: d.startValue,
1314
+ endValue: d.endValue,
1315
+ hoverValue: d.hoverValue,
1316
+ minValue: d.minValue,
1317
+ maxValue: d.maxValue,
1318
+ onOnChangeDate: ye,
1319
+ onOnChangeType: A,
1320
+ onOnSelectDate: X,
1321
+ onOnHoverDate: oe,
1322
+ onOnInitComplete: D
1323
+ }, null, 8, ["viewValue", "selectValue", "startValue", "endValue", "hoverValue", "minValue", "maxValue"])) : y.currentView === "years" ? (S(), Be(Yt, {
1324
+ key: 2,
1325
+ viewValue: y.viewValue,
1326
+ selectValue: y.selectValue,
1327
+ startValue: d.startValue,
1328
+ endValue: d.endValue,
1329
+ hoverValue: d.hoverValue,
1330
+ minValue: d.minValue,
1331
+ maxValue: d.maxValue,
1332
+ onOnChangeDate: ye,
1333
+ onOnSelectDate: X,
1334
+ onOnHoverDate: oe,
1335
+ onOnInitComplete: D
1336
+ }, null, 8, ["viewValue", "selectValue", "startValue", "endValue", "hoverValue", "minValue", "maxValue"])) : (S(), C(U, { key: 3 }, [], 64)),
1337
+ M.isShow || M.isViewDay ? (S(), C("div", {
1338
+ key: 4,
1339
+ class: ue({ "datetime-days-times": M.isViewDay })
1340
+ }, [
1341
+ fe(Qt, {
1342
+ selectDay: y.selectClockDay,
1343
+ selectValue: y.selectClockTime,
1344
+ minValue: d.minValue,
1345
+ maxValue: d.maxValue,
1346
+ isShowPointer: M.isShowClockPointer,
1347
+ isShowSubmit: M.isShowClockSubmit,
1348
+ isShowCancel: M.isShowClockCancel,
1349
+ isClickOverlay: M.isClockClickOverlay,
1350
+ onOnSubmit: z,
1351
+ onOnInitComplete: D
1352
+ }, null, 8, ["selectDay", "selectValue", "minValue", "maxValue", "isShowPointer", "isShowSubmit", "isShowCancel", "isClickOverlay"])
1353
+ ], 2)) : (S(), C(U, { key: 5 }, [], 64))
1354
+ ], 10, Ft));
1355
+ }
1356
+ }), Jt = ["tabindex", "aria-disabled", "onKeydown"], jt = /* @__PURE__ */ Oe({
1357
+ name: "ClDateTimeDefault",
1358
+ __name: "DateTimeDefault",
1359
+ props: {
1360
+ className: String,
1361
+ // desc: 自定义CSS类名
1362
+ value: String,
1363
+ // desc: 绑定日期值
1364
+ minValue: String,
1365
+ // desc: 最小可选日期
1366
+ maxValue: String
1367
+ // desc: 最大可选日期
1368
+ },
1369
+ emits: {
1370
+ // payload 为选中值解析后的 Dayjs 实例(_emitSelectValue 已判空,永不 emit null)
1371
+ onSelectValue: (d) => !0,
1372
+ // desc: 选中值变更时触发
1373
+ onInitComplete: () => !0
1374
+ // desc: 初始化完成时触发
1375
+ },
1376
+ setup(d, { expose: ce, emit: v }) {
1377
+ const i = d, R = v, { optPageLanguage: $, getPageLanguage: N } = Ne();
1378
+ N("dataTime");
1379
+ const T = ke("$DateTimeTop"), y = ke("$DateTimeTopBase");
1380
+ (!T || !y) && be.warn(
1381
+ "ClDateTimeDefault",
1382
+ "未找到 $DateTimeTop/$DateTimeTopBase 注入,请确保组件在 ClDateTime 组件树内使用"
1383
+ );
1384
+ const M = ge({
1385
+ isShowSubmit: !1,
1386
+ isSubmitDisplay: !1
1387
+ }), g = ge({
1388
+ day: "",
1389
+ time: ""
1390
+ }), l = De(() => {
1391
+ let A = {
1392
+ "panel-date-time-default": !0,
1393
+ "datetime-default": !0,
1394
+ // 日历内容自持类:面板挂载到容器外后不再有 .panel-date-time 祖先,样式以此类为限定
1395
+ "datetime-panel-body": !0
1396
+ };
1397
+ return A = o.getJsonMerge(A, $e.getClassNameJson(i.className)), A;
1398
+ }), t = () => {
1399
+ const A = T.getMergeDayTime(g.day, g.time), X = T.checkValue(A);
1400
+ M.isSubmitDisplay = o.isEmpty(g.day) || X.errMsg.length > 0;
1401
+ }, u = (A) => {
1402
+ let X = !1;
1403
+ y.timeType === "datetime" && (X = A === "days"), M.isShowSubmit = X;
1404
+ }, n = (A) => {
1405
+ let X = "", oe = "", z = !0;
1406
+ if (o.isNonEmptyString(A)) {
1407
+ const se = T.getMomentDate(A);
1408
+ se && (X = se.format("YYYY-MM-DD"), oe = se.format("HH:mm:ss"), z = !1);
1409
+ }
1410
+ g.day = X, g.time = oe, M.isSubmitDisplay = z, t();
1411
+ }, e = () => {
1412
+ u(y.layerView), n(i.value);
1413
+ }, Y = () => {
1414
+ const A = T.getMomentDate(
1415
+ T.getMergeDayTime(g.day, g.time)
1416
+ );
1417
+ A && R("onSelectValue", A);
1418
+ };
1419
+ Pe(() => {
1420
+ Ve(() => {
1421
+ e();
1422
+ });
1423
+ }), re(
1424
+ () => i.value,
1425
+ (A, X) => {
1426
+ A !== X && n(A);
1427
+ }
1428
+ ), re([() => i.minValue, () => i.maxValue], () => {
1429
+ t();
1430
+ });
1431
+ const ie = (A) => {
1432
+ g.day = A, t(), y.timeType === "date" && Y();
1433
+ }, te = (A) => {
1434
+ g.time = A, t(), (y.timeType === "time" || y.timeType === "datetime" && !M.isSubmitDisplay) && Y();
1435
+ }, G = (A) => {
1436
+ u(A);
1437
+ }, ne = () => {
1438
+ M.isShowSubmit && !M.isSubmitDisplay && Y();
1439
+ }, he = () => {
1440
+ R("onInitComplete");
1441
+ };
1442
+ return ce({
1443
+ getValue: () => {
1444
+ const A = T.getMergeDayTime(g.day, g.time);
1445
+ return T.getMomentDate(A);
1446
+ }
1447
+ }), (A, X) => (S(), C(U, null, [
1448
+ fe(Ke, {
1449
+ class: ue(l.value),
1450
+ selectValue: d.value,
1451
+ viewValue: d.value,
1452
+ minValue: d.minValue,
1453
+ maxValue: d.maxValue,
1454
+ onOnSelectDate: ie,
1455
+ onOnSelectTime: te,
1456
+ onOnChangeViewType: G,
1457
+ onOnInitComplete: he
1458
+ }, null, 8, ["class", "selectValue", "viewValue", "minValue", "maxValue"]),
1459
+ M.isShowSubmit ? (S(), C("div", {
1460
+ key: 0,
1461
+ role: "button",
1462
+ tabindex: M.isSubmitDisplay ? -1 : 0,
1463
+ "aria-disabled": M.isSubmitDisplay,
1464
+ class: ue({ "datetime-days-submit": !0, "days-submit-disabled": M.isSubmitDisplay }),
1465
+ onClick: ne,
1466
+ onKeydown: [
1467
+ Ce(Me(ne, ["prevent"]), ["enter"]),
1468
+ Ce(Me(ne, ["prevent"]), ["space"])
1469
+ ]
1470
+ }, [
1471
+ I("span", null, xe(me($).common.submit), 1)
1472
+ ], 42, Jt)) : (S(), C(U, { key: 1 }, [], 64))
1473
+ ], 64));
1474
+ }
1475
+ }), Kt = ["id"], Ut = { class: "calendar-range calendar-left" }, Zt = { class: "calendar-text" }, zt = { class: "time-input-base" }, Wt = ["value", "name"], qt = { class: "calendar-panel" }, Gt = { class: "calendar-range calendar-right" }, Xt = { class: "calendar-text" }, ea = { class: "time-input-base" }, ta = ["value", "name"], aa = { class: "calendar-panel" }, na = { class: "calendar-range calendar-quick" }, sa = ["onClick", "onKeydown"], ia = {
1476
+ key: 0,
1477
+ class: "panel-quick-btn"
1478
+ }, oa = /* @__PURE__ */ Oe({
1479
+ name: "ClDateTimeRange",
1480
+ __name: "DateTimeRange",
1481
+ props: {
1482
+ className: String,
1483
+ // desc: 自定义CSS类名
1484
+ startValue: String,
1485
+ // desc: 范围开始日期值
1486
+ endValue: String,
1487
+ // desc: 范围结束日期值
1488
+ minValue: String,
1489
+ // desc: 最小可选日期
1490
+ maxValue: String,
1491
+ // desc: 最大可选日期
1492
+ rangeQuick: {
1493
+ type: Array,
1494
+ default: () => []
1495
+ // desc: 快捷选项列表
1496
+ }
1497
+ },
1498
+ emits: {
1499
+ onSubmit: (d) => !0,
1500
+ // desc: 确认范围选择时触发
1501
+ onCancel: () => !0,
1502
+ // desc: 取消选择时触发
1503
+ onInitComplete: () => !0
1504
+ // desc: 初始化完成时触发
1505
+ },
1506
+ setup(d, { expose: ce, emit: v }) {
1507
+ const i = d, R = v, $ = `dateTimeRange-${o.getRandom(5)}`, { optPageLanguage: N, getPageLanguage: T } = Ne();
1508
+ T("dataTime");
1509
+ const y = ke("$DateTimeTop"), M = ke("$DateTimeTopBase");
1510
+ (!y || !M) && be.warn(
1511
+ "ClDateTimeRange",
1512
+ "未找到 $DateTimeTop/$DateTimeTopBase 注入,请确保组件在 ClDateTime 组件树内使用"
1513
+ );
1514
+ const g = y?.elId ? `${y.elId}-dateTimeRange-${o.getRandom(5)}` : void 0, l = De(() => {
1515
+ let h = {
1516
+ "panel-date-time-range": !0,
1517
+ "panel-range-calendar": !0,
1518
+ // datetime-range 是共享 index.css 布局体系(.datetime-range .calendar-range 等),必须保留
1519
+ "datetime-range": !0,
1520
+ // 日历内容自持类:面板挂载到容器外后不再有 .panel-date-time 祖先,样式以此类为限定
1521
+ "datetime-panel-body": !0
1522
+ };
1523
+ return h = o.getJsonMerge(h, $e.getClassNameJson(i.className)), h;
1524
+ }), t = ge({
1525
+ operateViewDataType: "",
1526
+ selectCount: 0,
1527
+ hoverValue: "",
1528
+ activeQuick: "",
1529
+ isCheck: !0,
1530
+ // 内嵌 datetime 模式也显示提交按钮,避免「选完日期后时间无法选择、值无法回传」的死锁
1531
+ isShowQuickBtn: M.isShowPopup || M.timeType === "datetime",
1532
+ previewStart: "",
1533
+ previewEnd: ""
1534
+ }), u = ge({
1535
+ view: "",
1536
+ text: "",
1537
+ name: `input_${o.getRandom(8)}`
1538
+ }), n = ge({
1539
+ view: "",
1540
+ text: "",
1541
+ name: `input_${o.getRandom(8)}`
1542
+ }), e = ge({
1543
+ day: "",
1544
+ time: "",
1545
+ value: ""
1546
+ }), Y = ge({
1547
+ day: "",
1548
+ time: "",
1549
+ value: ""
1550
+ }), ie = Ae([]), te = (h, x) => {
1551
+ const b = y.getViewDate(h), B = M.layerView === "years" ? 10 : 1, j = t.operateViewDataType;
1552
+ return b[x](B, j).format(M.formatIn);
1553
+ }, G = (h, x) => {
1554
+ if (o.isEmpty(h))
1555
+ return "";
1556
+ const b = x === "right" ? M.formatOutEnd : M.formatOut;
1557
+ if (o.isString(h)) {
1558
+ const B = y.getMomentDate(h);
1559
+ return B ? B.format(b) : "";
1560
+ }
1561
+ return h.format(b);
1562
+ }, ne = () => {
1563
+ const h = y.getMergeDayTime(e.day, e.time);
1564
+ e.value = h, u.text = G(h, "left");
1565
+ }, he = () => {
1566
+ const h = y.getMergeDayTime(Y.day, Y.time);
1567
+ Y.value = h, n.text = G(h, "right");
1568
+ }, ye = () => {
1569
+ if (t.selectCount === 2) {
1570
+ let h = "-1";
1571
+ if (!o.isEmpty(e.day) && !o.isEmpty(Y.day) && !o.isEmpty(ie.value)) {
1572
+ const x = "YYYY-MM-DD";
1573
+ let b = y.getMomentDate(e.day, x), B = y.getMomentDate(Y.day, x);
1574
+ if (b && B) {
1575
+ switch (M.layerType) {
1576
+ case "years":
1577
+ if (b = y.getMomentDate(
1578
+ b.startOf("year").format(x),
1579
+ x
1580
+ ), B = y.getMomentDate(B.endOf("year").format(x), x), !b || !B) {
1581
+ t.activeQuick = "-1";
1582
+ return;
1583
+ }
1584
+ break;
1585
+ case "months":
1586
+ if (b = y.getMomentDate(
1587
+ b.startOf("month").format(x),
1588
+ x
1589
+ ), B = y.getMomentDate(B.endOf("month").format(x), x), !b || !B) {
1590
+ t.activeQuick = "-1";
1591
+ return;
1592
+ }
1593
+ break;
1594
+ }
1595
+ const j = b, s = B;
1596
+ j && s && ie.value.forEach((k) => {
1597
+ k.start && k.end && j.isSame(Le.getDayjsObject(k.start).format(x)) && s.isSame(Le.getDayjsObject(k.end).format(x)) && (h = k.id);
1598
+ });
1599
+ }
1600
+ }
1601
+ t.activeQuick = h;
1602
+ }
1603
+ }, A = (h) => {
1604
+ const x = e.value, b = Y.value, B = o.isEmpty(x), j = o.isEmpty(b), s = !B && j, k = B && !j;
1605
+ let P = !1, H = !1;
1606
+ if (h && (s || k)) {
1607
+ const Q = y.getMomentDate(s ? x : b);
1608
+ Q && (P = h.isBefore(Q, "day"), H = h.isSame(Q, "day"));
1609
+ }
1610
+ return { isStart: s, isEnd: k, isBefore: P, isSame: H };
1611
+ }, X = (h) => {
1612
+ if (t.selectCount === 1) {
1613
+ const x = h.format("YYYY-MM-DD"), b = e.day, B = Y.day, j = A(h);
1614
+ t.hoverValue = x;
1615
+ let s = "", k = "";
1616
+ j.isBefore ? (s = x, k = j.isStart ? b : B) : (s = j.isEnd ? B : b, k = x), t.previewStart = s, t.previewEnd = k, u.text = G(
1617
+ y.getMergeDayTime(s, e.time),
1618
+ "left"
1619
+ ), n.text = G(y.getMergeDayTime(k, Y.time), "right");
1620
+ }
1621
+ }, oe = (h) => {
1622
+ switch (t.previewStart = "", t.previewEnd = "", t.selectCount) {
1623
+ case 0:
1624
+ case 2: {
1625
+ t.selectCount = 1, t.activeQuick = "", e.day = h, ne(), Y.day = "", Y.time = "", Y.value = "", n.text = G(y.getMergeDayTime(h, ""), "right"), t.hoverValue = h;
1626
+ break;
1627
+ }
1628
+ case 1: {
1629
+ t.selectCount = 2;
1630
+ const x = y.getMomentDate(h);
1631
+ if (!x) {
1632
+ t.selectCount = 1;
1633
+ break;
1634
+ }
1635
+ const b = A(x);
1636
+ b.isSame ? (e.day = h, ne(), Y.day = h, he()) : b.isBefore ? (Y.day = e.day, Y.time = e.time, e.day = h, ne(), he()) : (Y.day = h, he()), t.hoverValue = "";
1637
+ break;
1638
+ }
1639
+ }
1640
+ t.selectCount === 2 && ye();
1641
+ }, z = () => {
1642
+ !t.isShowQuickBtn && t.selectCount === 2 && t.isCheck && R("onSubmit", { start: e.value, end: Y.value });
1643
+ }, se = (h, x) => {
1644
+ const b = y.getMomentDate(x), B = b ? b.format("YYYY-MM-DD") : "", j = b ? b.format("HH:mm:ss") : "", s = b ? y.getMergeDayTime(B, j) : "";
1645
+ h ? (e.day = B, e.time = j, e.value = s, u.text = G(s, "left")) : (Y.day = B, Y.time = j, Y.value = s, n.text = G(s, "right"));
1646
+ }, D = () => {
1647
+ let h = "";
1648
+ switch (M.layerType) {
1649
+ case "days":
1650
+ h = "months";
1651
+ break;
1652
+ case "months":
1653
+ h = "years";
1654
+ break;
1655
+ case "years":
1656
+ h = "years";
1657
+ break;
1658
+ default:
1659
+ h = "months";
1660
+ }
1661
+ t.operateViewDataType = h;
1662
+ const x = i.startValue || "", b = i.endValue || "", B = !o.isEmpty(x), j = !o.isEmpty(b);
1663
+ if (t.selectCount = B && j ? 2 : B || j ? 1 : 0, u.view = y.getViewDate(x).format(M.formatIn), n.view = te(u.view, "add"), se(!0, x), se(!1, b), M.timeType === "time") {
1664
+ t.selectCount = 2;
1665
+ const s = M.layerType === "seconds" ? "00:00:00" : "00:00";
1666
+ o.isEmpty(u.text) && se(!0, y.getValueEffective(s)), o.isEmpty(n.text) && se(!1, y.getValueEffective(s));
1667
+ }
1668
+ c();
1669
+ }, c = () => {
1670
+ let h = [];
1671
+ o.isArray(i.rangeQuick) && (h = o.getListClone(i.rangeQuick).filter(
1672
+ (x) => o.isObject(x) && o.isNonEmptyString(x.id)
1673
+ ), h.length > 0 && h.push({ id: "-1", text: N.value.common.custom })), ie.value = h;
1674
+ }, f = () => {
1675
+ D(), ye(), Ve(() => {
1676
+ Ve(() => {
1677
+ R("onInitComplete");
1678
+ });
1679
+ });
1680
+ }, w = () => {
1681
+ if (t.selectCount === 2) {
1682
+ const h = y.checkValue(e.value, Y.value);
1683
+ t.isCheck = h.errMsg.length === 0;
1684
+ }
1685
+ };
1686
+ Pe(() => {
1687
+ Ve(() => {
1688
+ f();
1689
+ });
1690
+ }), re([() => i.startValue, () => i.endValue], ([h, x]) => {
1691
+ se(!0, h), se(!1, x);
1692
+ const b = !o.isEmpty(h), B = !o.isEmpty(x);
1693
+ t.selectCount = b && B ? 2 : b || B ? 1 : 0, t.selectCount !== 2 && (t.activeQuick = ""), t.hoverValue = "", t.previewStart = "", t.previewEnd = "", ye(), w();
1694
+ }), re(
1695
+ () => i.rangeQuick,
1696
+ () => {
1697
+ t.operateViewDataType && c();
1698
+ }
1699
+ );
1700
+ const r = () => {
1701
+ t.hoverValue = "", t.previewStart = "", t.previewEnd = "", u.text = G(y.getMergeDayTime(e.day, e.time), "left"), n.text = G(y.getMergeDayTime(Y.day, Y.time), "right");
1702
+ }, V = (h) => {
1703
+ u.view = h, n.view = te(h, "add");
1704
+ }, E = (h) => {
1705
+ oe(h), w(), z();
1706
+ }, O = (h) => {
1707
+ e.time = h, ne(), w(), z();
1708
+ }, _ = (h) => {
1709
+ X(h);
1710
+ }, de = (h) => {
1711
+ u.view = te(h, "subtract"), n.view = h;
1712
+ }, ee = (h) => {
1713
+ oe(h), w(), z();
1714
+ }, K = (h) => {
1715
+ Y.time = h, he(), w(), z();
1716
+ }, Z = (h) => {
1717
+ X(h);
1718
+ }, J = (h) => {
1719
+ if (h.id !== "-1") {
1720
+ if (o.isEmpty(h.start) || o.isEmpty(h.end))
1721
+ return;
1722
+ const x = Le.getDayjsObject(h.start), b = Le.getDayjsObject(h.end);
1723
+ if (!x.isValid() || !b.isValid()) {
1724
+ be.warn("ClDateTimeRange", `快捷项 "${h.text}" 日期无效,已忽略`);
1725
+ return;
1726
+ }
1727
+ let B = x.format("YYYY-MM-DD"), j = b.format("YYYY-MM-DD");
1728
+ const s = y.checkMinMax(B, j, "YYYY-MM-DD");
1729
+ if (!s.isStartMax || !s.isEndMin) {
1730
+ be.warn("ClDateTimeRange", `快捷项 "${h.text}" 超出可选范围,已忽略`);
1731
+ return;
1732
+ }
1733
+ s.isStartMin || (B = s.minDay), s.isEndMax || (j = s.maxDay), e.day = B, ne(), Y.day = j, he(), u.view = B;
1734
+ const k = o.isEmpty(j) ? null : y.getMomentDate(j);
1735
+ n.view = k ? k.startOf("month").format(M.formatIn) : te(B, "add"), t.hoverValue = "", t.previewStart = "", t.previewEnd = "", t.selectCount = 2, t.activeQuick = h.id, w(), z();
1736
+ }
1737
+ }, pe = () => {
1738
+ t.selectCount === 2 && t.isCheck && (R("onSubmit", { start: e.value, end: Y.value }), t.isCheck = !1);
1739
+ }, ve = () => {
1740
+ R("onCancel");
1741
+ };
1742
+ return ce({
1743
+ getValue: () => ({ start: e.value, end: Y.value })
1744
+ }), (h, x) => (S(), C("div", {
1745
+ id: me(g),
1746
+ class: ue(l.value),
1747
+ onMouseleave: r
1748
+ }, [
1749
+ I("div", Ut, [
1750
+ I("div", Zt, [
1751
+ I("div", zt, [
1752
+ I("input", {
1753
+ class: "form-control time-input",
1754
+ type: "text",
1755
+ readonly: !0,
1756
+ value: u.text,
1757
+ name: u.name
1758
+ }, null, 8, Wt),
1759
+ fe(_e, {
1760
+ name: "calendar",
1761
+ className: "time-icon"
1762
+ })
1763
+ ])
1764
+ ]),
1765
+ I("div", qt, [
1766
+ fe(Ke, {
1767
+ selectValue: t.selectCount === 2 ? e.value : "-1",
1768
+ startValue: t.previewStart || e.value,
1769
+ endValue: t.previewEnd || Y.value,
1770
+ viewValue: u.view,
1771
+ hoverValue: t.hoverValue,
1772
+ minValue: d.minValue,
1773
+ maxValue: d.maxValue,
1774
+ onOnChangeViewValue: V,
1775
+ onOnSelectDate: E,
1776
+ onOnSelectTime: O,
1777
+ onOnHoverDate: _
1778
+ }, null, 8, ["selectValue", "startValue", "endValue", "viewValue", "hoverValue", "minValue", "maxValue"])
1779
+ ])
1780
+ ]),
1781
+ I("div", Gt, [
1782
+ I("div", Xt, [
1783
+ I("div", ea, [
1784
+ I("input", {
1785
+ class: "form-control time-input",
1786
+ type: "text",
1787
+ readonly: !0,
1788
+ value: n.text,
1789
+ name: n.name
1790
+ }, null, 8, ta),
1791
+ fe(_e, {
1792
+ name: "calendar",
1793
+ className: "time-icon"
1794
+ })
1795
+ ])
1796
+ ]),
1797
+ I("div", aa, [
1798
+ fe(Ke, {
1799
+ selectValue: t.selectCount === 2 ? Y.value : "-1",
1800
+ startValue: t.previewStart || e.value,
1801
+ endValue: t.previewEnd || Y.value,
1802
+ viewValue: n.view,
1803
+ hoverValue: t.hoverValue,
1804
+ minValue: d.minValue,
1805
+ maxValue: d.maxValue,
1806
+ onOnChangeViewValue: de,
1807
+ onOnSelectDate: ee,
1808
+ onOnSelectTime: K,
1809
+ onOnHoverDate: Z
1810
+ }, null, 8, ["selectValue", "startValue", "endValue", "viewValue", "hoverValue", "minValue", "maxValue"])
1811
+ ])
1812
+ ]),
1813
+ I("div", na, [
1814
+ I("ul", null, [
1815
+ (S(!0), C(U, null, Ie(ie.value, (b, B) => (S(), C("li", {
1816
+ key: `${$}-${b.id}-${B}`,
1817
+ role: "button",
1818
+ tabindex: "0",
1819
+ class: ue({
1820
+ active: b.id === t.activeQuick,
1821
+ "calendar-quick-special": b.id === "-1"
1822
+ }),
1823
+ onClick: (j) => J(b),
1824
+ onKeydown: [
1825
+ Ce(Me((j) => J(b), ["prevent"]), ["enter"]),
1826
+ Ce(Me((j) => J(b), ["prevent"]), ["space"])
1827
+ ]
1828
+ }, xe(b.text), 43, sa))), 128))
1829
+ ]),
1830
+ t.isShowQuickBtn ? (S(), C("div", ia, [
1831
+ fe(Ze, {
1832
+ className: "quick-submit",
1833
+ label: me(N).common.submit,
1834
+ size: "small",
1835
+ disabled: t.selectCount !== 2 || !t.isCheck,
1836
+ onOnClick: pe
1837
+ }, null, 8, ["label", "disabled"]),
1838
+ fe(Ze, {
1839
+ className: "quick-cancel",
1840
+ label: me(N).common.cancel,
1841
+ size: "small",
1842
+ color: "grayLight",
1843
+ onOnClick: ve
1844
+ }, null, 8, ["label"])
1845
+ ])) : (S(), C(U, { key: 1 }, [], 64))
1846
+ ])
1847
+ ], 42, Kt));
1848
+ }
1849
+ }), la = {
1850
+ key: 3,
1851
+ class: "datetime-errmsg",
1852
+ role: "alert"
1853
+ }, ze = /* @__PURE__ */ Oe({
1854
+ name: "ClDateTimeBase",
1855
+ __name: "DateTimeBase",
1856
+ props: {
1857
+ isDefault: {
1858
+ type: Boolean,
1859
+ default: !1
1860
+ // desc: 是否默认(单选)模式
1861
+ },
1862
+ isRange: {
1863
+ type: Boolean,
1864
+ default: !1
1865
+ // desc: 是否范围选择模式
1866
+ },
1867
+ start: String,
1868
+ // desc: 开始日期值
1869
+ end: String,
1870
+ // desc: 结束日期值
1871
+ minDate: String,
1872
+ // desc: 最小可选日期
1873
+ maxDate: String,
1874
+ // desc: 最大可选日期
1875
+ rangeQuick: {
1876
+ type: Array,
1877
+ default: () => []
1878
+ // desc: 范围模式快捷选项列表
1879
+ },
1880
+ errMsg: {
1881
+ type: Array,
1882
+ default: () => []
1883
+ // desc: 错误消息列表
1884
+ }
1885
+ },
1886
+ emits: {
1887
+ // default 模式 payload 为 Dayjs 实例;range 模式 payload 为 { start, end }——调用方按 isDefault/isRange 分支消费
1888
+ onSelectValue: (d) => !0,
1889
+ // desc: 选中值变更时触发
1890
+ onClose: () => !0,
1891
+ // desc: 关闭面板时触发(仅 range 模式可达,default 模式无关闭事件来源)
1892
+ onInitComplete: () => !0
1893
+ // desc: 初始化完成时触发
1894
+ },
1895
+ setup(d, { expose: ce, emit: v }) {
1896
+ const i = d, R = v, $ = `clDatetimeBase-${o.getRandom(5)}`, N = ke("$DateTimeTop");
1897
+ N || be.warn("ClDateTimeBase", "未找到 $DateTimeTop 注入,请确保组件在 ClDateTime 组件树内使用");
1898
+ const T = De(() => !!N);
1899
+ i.isDefault === i.isRange && be.warn(
1900
+ "ClDateTimeBase",
1901
+ `isDefault(${i.isDefault}) 与 isRange(${i.isRange}) 必须恰好一个为 true`
1902
+ );
1903
+ const y = je("refEl");
1904
+ let M = !1;
1905
+ const g = De(() => o.isArray(i.errMsg) && i.errMsg.length > 0), l = (e) => {
1906
+ R("onSelectValue", e);
1907
+ }, t = () => {
1908
+ R("onClose");
1909
+ }, u = () => {
1910
+ M || (M = !0, R("onInitComplete"));
1911
+ };
1912
+ return ce({
1913
+ getValue: () => y.value ? y.value.getValue() : i.isDefault ? o.isNonEmptyString(i.start) ? N?.getMomentDate(i.start) ?? i.start : null : o.isNonEmptyString(i.start) || o.isNonEmptyString(i.end) ? { start: i.start, end: i.end } : ""
1914
+ }), (e, Y) => (S(), C(U, null, [
1915
+ T.value && d.isDefault ? (S(), Be(jt, {
1916
+ key: 0,
1917
+ ref_key: "refEl",
1918
+ ref: y,
1919
+ value: d.start,
1920
+ minValue: d.minDate,
1921
+ maxValue: d.maxDate,
1922
+ onOnSelectValue: l,
1923
+ onOnInitComplete: u
1924
+ }, null, 8, ["value", "minValue", "maxValue"])) : T.value && d.isRange ? (S(), Be(oa, {
1925
+ key: 1,
1926
+ ref_key: "refEl",
1927
+ ref: y,
1928
+ rangeQuick: d.rangeQuick,
1929
+ minValue: d.minDate,
1930
+ maxValue: d.maxDate,
1931
+ startValue: d.start,
1932
+ endValue: d.end,
1933
+ onOnSubmit: l,
1934
+ onOnCancel: t,
1935
+ onOnInitComplete: u
1936
+ }, null, 8, ["rangeQuick", "minValue", "maxValue", "startValue", "endValue"])) : (S(), C(U, { key: 2 }, [], 64)),
1937
+ g.value ? (S(), C("ul", la, [
1938
+ (S(!0), C(U, null, Ie(d.errMsg, (ie, te) => (S(), C("li", {
1939
+ key: `${$}-err-${te}`
1940
+ }, xe(ie), 1))), 128))
1941
+ ])) : (S(), C(U, { key: 4 }, [], 64))
1942
+ ], 64));
1943
+ }
1944
+ }), ra = ["id"], ca = ["id"], ua = "2000-01-01", Ma = /* @__PURE__ */ Oe({
1945
+ name: "ClDateTime",
1946
+ __name: "Index",
1947
+ props: {
1948
+ id: String,
1949
+ // desc: 组件实例唯一标识,用于多实例场景下 DOM 查询限定
1950
+ value: String,
1951
+ // desc: 绑定值,默认格式 YYYY-MM-DD,范围格式 start~end
1952
+ className: String,
1953
+ // desc: 自定义 CSS 类名
1954
+ placeholder: String,
1955
+ // desc: 占位文本
1956
+ disabled: {
1957
+ type: Boolean,
1958
+ default: !1
1959
+ // desc: 是否禁用
1960
+ },
1961
+ theme: {
1962
+ type: String,
1963
+ default: "default",
1964
+ validator: (d) => ["default", "range"].includes(d)
1965
+ // desc: 主题类型 | enum: default, range
1966
+ },
1967
+ layerType: {
1968
+ type: String,
1969
+ default: "days",
1970
+ validator: (d) => ["years", "months", "days", "hours", "minutes", "seconds"].includes(d)
1971
+ // desc: 面板精度 | enum: years, months, days, hours, minutes, seconds
1972
+ },
1973
+ timeType: {
1974
+ type: String,
1975
+ default: "date",
1976
+ validator: (d) => ["date", "time", "datetime"].includes(d)
1977
+ // desc: 时间类型 | enum: date, time, datetime
1978
+ },
1979
+ format: String,
1980
+ // desc: 自定义输出格式,不设则根据 layerType 推断:years→YYYY,months→YYYY-MM,days→YYYY-MM-DD,hours→HH:00,minutes→HH:mm,seconds→HH:mm:ss
1981
+ formatEnd: String,
1982
+ // desc: 范围模式结束值格式
1983
+ direction: {
1984
+ type: String,
1985
+ default: "left"
1986
+ // desc: 弹出层三角箭头位置 | enum: left, right (可自定义)
1987
+ },
1988
+ minDate: String,
1989
+ // desc: 最小可选日期
1990
+ maxDate: String,
1991
+ // desc: 最大可选日期
1992
+ isClear: {
1993
+ type: Boolean,
1994
+ default: !1
1995
+ // desc: 是否显示清除按钮
1996
+ },
1997
+ rangeQuick: {
1998
+ type: Array,
1999
+ default: () => []
2000
+ // desc: 范围模式快捷选项,每项结构 { id, text, start, end },start/end 支持 Dayjs 或 string
2001
+ },
2002
+ isDropdown: {
2003
+ type: Boolean,
2004
+ default: !0
2005
+ // desc: 是否以下拉方式展示
2006
+ },
2007
+ themeStyle: {
2008
+ type: String,
2009
+ default: "default",
2010
+ validator: (d) => ["default", "noBorder"].includes(d)
2011
+ // desc: 主题样式 | enum: default, noBorder
2012
+ },
2013
+ arrowDirection: {
2014
+ type: String,
2015
+ default: "right"
2016
+ // desc: 箭头在文本左侧还是右侧 | enum: left, right (可自定义)
2017
+ },
2018
+ isUseDropdownArrow: {
2019
+ type: Boolean,
2020
+ default: !0
2021
+ // desc: 是否显示弹出层三角箭头
2022
+ },
2023
+ checkCallback: Function,
2024
+ // desc: 校验回调,返回 false 阻止选择;default 模式参数为 Dayjs 实例,range 模式参数为 (start, end) 字符串
2025
+ isPlaintext: {
2026
+ type: Boolean,
2027
+ default: !1
2028
+ // desc: 是否纯文本只读模式,只渲染格式化后的日期文本不挂载日历面板
2029
+ },
2030
+ plaintextEmptyText: {
2031
+ type: String,
2032
+ default: void 0
2033
+ // desc: 纯文本只读模式下值为空时的显示文本(默认 "-",显式传空串则显示空白;未显式传时依次读取组件配置段与 plaintextGlobal 段)
2034
+ },
2035
+ plaintextSeparator: {
2036
+ type: String,
2037
+ default: " ~ "
2038
+ // desc: 纯文本模式下 range 模式起止日期的分隔符
2039
+ },
2040
+ appendContainer: {
2041
+ type: String,
2042
+ default: ""
2043
+ // desc: 面板挂载容器,空为当前父元素,body 挂到 body,或指定选择器(需为触发元素的上级,如表格滚动容器外的容器)
2044
+ }
2045
+ },
2046
+ emits: {
2047
+ "update:value": (d) => !0,
2048
+ // desc: v-model 值更新时触发
2049
+ "update:modelValue": (d) => !0,
2050
+ // desc: 标准 v-model 支持(等价 update:value)
2051
+ onChange: (d, ce) => !0,
2052
+ // desc: 选中值变更时触发
2053
+ onInit: () => !0
2054
+ // desc: 组件初始化完成时触发
2055
+ },
2056
+ setup(d, { expose: ce, emit: v }) {
2057
+ const i = d, R = v, { optPageLanguage: $, getPageLanguage: N } = Ne();
2058
+ N("dataTime");
2059
+ const T = `datetime-${o.getRandom(8)}`, y = i.id, M = je("refElDropdownLayer"), g = je("refElDatetime"), l = ge({
2060
+ isInit: !1,
2061
+ isDefault: i.theme !== "range",
2062
+ isRange: i.theme === "range",
2063
+ isShowPopup: i.isDropdown,
2064
+ timeType: "",
2065
+ layerType: i.layerType,
2066
+ layerView: "",
2067
+ formatIn: "",
2068
+ formatOut: "",
2069
+ formatOutEnd: "",
2070
+ rangeQuick: [],
2071
+ errMsg: []
2072
+ }), t = ge({
2073
+ showText: "",
2074
+ start: "",
2075
+ end: ""
2076
+ }), u = {
2077
+ lastStart: "",
2078
+ lastEnd: ""
2079
+ }, n = De(() => {
2080
+ let s = i.arrowDirection;
2081
+ return o.isEmpty(s) && (s = i.themeStyle === "noBorder" ? "left" : "right"), s;
2082
+ }), e = De(() => {
2083
+ let s = {
2084
+ "panel-date-time": !0
2085
+ };
2086
+ return i.themeStyle === "noBorder" && (s["datetime-themeStyle-noBorder"] = !0), i.themeStyle === "noBorder" && o.isEmpty(t.showText) && (s["datetime-empty"] = !0), i.isDropdown || (s["datetime-noPopup"] = !0, s[`datetime-${i.theme}`] = !0), s = o.getJsonMerge(s, $e.getClassNameJson(i.className)), o.getStringByJson(s, " ");
2087
+ }), Y = De(() => `datetime-dropdown datetime-${i.theme} datetime-dropdown-${i.theme}`), ie = De(() => {
2088
+ let s = {
2089
+ "panel-date-time": !0
2090
+ };
2091
+ return s = o.getJsonMerge(s, $e.getClassNameJson(i.className)), `${o.getStringByJson(s, " ")} cl-plaintext-value`;
2092
+ }), te = De(() => {
2093
+ const s = t.showText, k = o.isString(i.plaintextSeparator) ? i.plaintextSeparator : " ~ ";
2094
+ return !l.isRange || k === " ~ " ? s : s.split(" ~ ").join(k);
2095
+ }), G = De(
2096
+ () => Xe("dateTime", i.plaintextEmptyText, te.value, i.value)
2097
+ ), ne = () => [
2098
+ { id: "today", text: $.value.today, start: F(), end: F() },
2099
+ {
2100
+ id: "yesterDay",
2101
+ text: $.value.yesterDay,
2102
+ start: F().subtract(1, "day"),
2103
+ end: F().subtract(1, "day")
2104
+ },
2105
+ {
2106
+ id: "pastDays7",
2107
+ text: $.value.pastDays7,
2108
+ start: F().subtract(7, "day"),
2109
+ end: F().subtract(1, "day")
2110
+ },
2111
+ {
2112
+ id: "pastDays30",
2113
+ text: $.value.pastDays30,
2114
+ start: F().subtract(30, "day"),
2115
+ end: F().subtract(1, "day")
2116
+ },
2117
+ {
2118
+ id: "mont",
2119
+ text: $.value.montCurrent,
2120
+ start: F().startOf("month"),
2121
+ end: F().endOf("month")
2122
+ },
2123
+ {
2124
+ id: "montLast",
2125
+ text: $.value.montLast,
2126
+ start: F().subtract(1, "month").startOf("month"),
2127
+ end: F().subtract(1, "month").endOf("month")
2128
+ }
2129
+ ], he = () => [
2130
+ {
2131
+ id: "mont",
2132
+ text: $.value.montCurrent,
2133
+ start: F().startOf("month"),
2134
+ end: F().endOf("month")
2135
+ },
2136
+ {
2137
+ id: "montLast",
2138
+ text: $.value.montLast,
2139
+ start: F().subtract(1, "month").startOf("month"),
2140
+ end: F().subtract(1, "month").endOf("month")
2141
+ },
2142
+ {
2143
+ id: "montLately6",
2144
+ text: $.value.montLately6,
2145
+ start: F().subtract(5, "month").startOf("month"),
2146
+ end: F().endOf("month")
2147
+ },
2148
+ {
2149
+ id: "year",
2150
+ text: $.value.yearCurrent,
2151
+ start: F().startOf("year"),
2152
+ end: F().endOf("year")
2153
+ },
2154
+ {
2155
+ id: "yearLast",
2156
+ text: $.value.yearLast,
2157
+ start: F().subtract(1, "year").startOf("year"),
2158
+ end: F().subtract(1, "year").endOf("year")
2159
+ }
2160
+ ], ye = () => [
2161
+ {
2162
+ id: "year",
2163
+ text: $.value.yearCurrent,
2164
+ start: F().startOf("year"),
2165
+ end: F().endOf("year")
2166
+ },
2167
+ {
2168
+ id: "yearLast",
2169
+ text: $.value.yearLast,
2170
+ start: F().subtract(1, "year").startOf("year"),
2171
+ end: F().subtract(1, "year").endOf("year")
2172
+ }
2173
+ ], A = (s) => {
2174
+ const k = o.isEmpty(s.start), P = o.isEmpty(s.end), H = k ? "" : F(s.start).format(l.formatIn), Q = P ? "" : F(s.end).format(l.formatIn), W = l.isDefault ? H : k || P ? "" : `${H}~${Q}`, we = l.isDefault ? { value: H } : { start: H, end: Q, value: W };
2175
+ return { value: W, info: we };
2176
+ }, X = () => {
2177
+ M.value && M.value.setOpen(!1);
2178
+ }, oe = () => l.timeType === "time", z = (s) => {
2179
+ if (!s)
2180
+ return "";
2181
+ const k = o.isString(s) ? o.trim(s) : "";
2182
+ return oe() ? /^\d{4}-\d{2}-\d{2}/.test(k) ? k : `${ua} ${k}` : k;
2183
+ }, se = () => F(), D = (s, k) => {
2184
+ let P = null;
2185
+ if (!o.isEmpty(s)) {
2186
+ const H = o.isUndefined(k) ? l.formatIn : k;
2187
+ P = o.isString(s) ? F(s, H) : F(s), P && !P.isValid() && (P = null);
2188
+ }
2189
+ return P;
2190
+ }, c = (s) => {
2191
+ const k = D(s);
2192
+ return k ? k.startOf("month") : se().startOf("month");
2193
+ }, f = (s, k, P) => {
2194
+ const H = o.isEmpty(P) ? l.formatIn : P;
2195
+ let Q = "";
2196
+ if (!o.isEmpty(i.minDate)) {
2197
+ const Te = D(z(i.minDate));
2198
+ Q = Te ? Te.format(H) : "";
2199
+ }
2200
+ let W = "";
2201
+ if (!o.isEmpty(i.maxDate)) {
2202
+ const Te = D(z(i.maxDate));
2203
+ W = Te ? Te.format(H) : "";
2204
+ }
2205
+ let we = !0, Se = !0, a = !0, m = !0, p = !0, L = !1;
2206
+ const q = o.isEmpty(s), ae = o.isEmpty(k);
2207
+ let le;
2208
+ switch (i.layerType) {
2209
+ case "years":
2210
+ le = "year";
2211
+ break;
2212
+ case "months":
2213
+ le = "month";
2214
+ break;
2215
+ case "days":
2216
+ le = "day";
2217
+ break;
2218
+ case "hours":
2219
+ le = "hour";
2220
+ break;
2221
+ case "minutes":
2222
+ le = "minute";
2223
+ break;
2224
+ case "seconds":
2225
+ le = "second";
2226
+ break;
2227
+ default:
2228
+ le = "day";
2229
+ break;
2230
+ }
2231
+ if (!q) {
2232
+ const Te = F(s);
2233
+ if (Te.isValid() && (o.isEmpty(Q) || (we = Te.isSameOrAfter(Q, le)), o.isEmpty(W) || (Se = Te.isSameOrBefore(W, le)), !ae)) {
2234
+ const He = F(k);
2235
+ He.isValid() && (o.isEmpty(Q) || (a = He.isSameOrAfter(Q, le)), o.isEmpty(W) || (m = He.isSameOrBefore(W, le)), He.isBefore(Te) && (p = !1));
2236
+ }
2237
+ }
2238
+ const Ee = [], Re = l.isRange ? $.value.rangeStartLabel : "";
2239
+ return Se ? a ? (we || Ee.push(
2240
+ `${Re}${$.value.checkStartMinLabel}(${D(Q, H)?.format(l.formatOut) ?? Q})`
2241
+ ), m || Ee.push(
2242
+ `${$.value.checkEndMaxLabel}(${D(W, H)?.format(l.formatOut) ?? W})`
2243
+ )) : Ee.push(
2244
+ `${$.value.checkEndMinLabel}(${D(Q, H)?.format(l.formatOut) ?? Q})`
2245
+ ) : Ee.push(
2246
+ `${Re}${$.value.checkStartMaxLabel}(${D(W, H)?.format(l.formatOut) ?? W})`
2247
+ ), l.isRange && ((q || ae) && (L = !0, Ee.push($.value.checkRangeEmptyLabel)), p || Ee.push($.value.checkStartEndLabel)), {
2248
+ isStartMin: we,
2249
+ isStartMax: Se,
2250
+ isEndMin: a,
2251
+ isEndMax: m,
2252
+ isStartEnd: p,
2253
+ isRangeEmpty: L,
2254
+ errMsg: Ee,
2255
+ minDay: Q,
2256
+ maxDay: W
2257
+ };
2258
+ }, w = (s, k, P) => {
2259
+ const H = f(s, k || "", P);
2260
+ return l.errMsg = H.errMsg, M.value && Ve(() => {
2261
+ M.value?.calculationPosition();
2262
+ }), H;
2263
+ }, r = () => {
2264
+ let s = [];
2265
+ switch (i.layerType) {
2266
+ case "days":
2267
+ case "hours":
2268
+ case "minutes":
2269
+ case "seconds":
2270
+ s = l.timeType === "time" ? [] : ne();
2271
+ break;
2272
+ case "months":
2273
+ s = he();
2274
+ break;
2275
+ case "years":
2276
+ s = ye();
2277
+ break;
2278
+ }
2279
+ return s;
2280
+ }, V = () => {
2281
+ let s = [];
2282
+ l.isRange && (o.isArray(i.rangeQuick) && i.rangeQuick.length > 0 ? s = [...i.rangeQuick] : s = r()), l.rangeQuick = s;
2283
+ }, E = () => {
2284
+ ["default", "range"].includes(i.theme) || be.warn("ClDateTime", `theme 非法值 "${i.theme}",可选值 default/range`), ["years", "months", "days", "hours", "minutes", "seconds"].includes(i.layerType) || be.warn("ClDateTime", `layerType 非法值 "${i.layerType}"`), ["date", "time", "datetime"].includes(i.timeType) || be.warn("ClDateTime", `timeType 非法值 "${i.timeType}"`), ["default", "noBorder"].includes(i.themeStyle) || be.warn("ClDateTime", `themeStyle 非法值 "${i.themeStyle}"`);
2285
+ }, O = () => {
2286
+ E();
2287
+ let s = "", k = "", P = "";
2288
+ switch (i.layerType) {
2289
+ case "years":
2290
+ s = "date", k = "YYYY", P = i.layerType;
2291
+ break;
2292
+ case "months":
2293
+ s = "date", k = "YYYY-MM", P = i.layerType;
2294
+ break;
2295
+ case "days":
2296
+ s = "date", k = "YYYY-MM-DD", P = i.layerType;
2297
+ break;
2298
+ case "hours":
2299
+ s = i.timeType === "date" ? "datetime" : i.timeType, k = s === "time" ? "HH:00" : "YYYY-MM-DD HH:00", P = s === "datetime" ? "days" : "times";
2300
+ break;
2301
+ case "minutes":
2302
+ s = i.timeType === "date" ? "datetime" : i.timeType, k = s === "time" ? "HH:mm" : "YYYY-MM-DD HH:mm", P = s === "datetime" ? "days" : "times";
2303
+ break;
2304
+ case "seconds":
2305
+ s = i.timeType === "date" ? "datetime" : i.timeType, k = s === "time" ? "HH:mm:ss" : "YYYY-MM-DD HH:mm:ss", P = s === "datetime" ? "days" : "times";
2306
+ break;
2307
+ default:
2308
+ s = "date", k = "YYYY-MM-DD", P = i.layerType;
2309
+ break;
2310
+ }
2311
+ l.timeType = s, l.layerView = P, l.formatIn = s === "date" ? "YYYY-MM-DD" : "YYYY-MM-DD HH:mm:ss", l.formatOut = o.isNonEmptyString(i.format) ? i.format : k, l.formatOutEnd = o.isNonEmptyString(i.formatEnd) ? i.formatEnd : k;
2312
+ }, _ = (s) => {
2313
+ let k = "", P = "", H = "";
2314
+ if (o.isNonEmptyString(s)) {
2315
+ if (l.isDefault) {
2316
+ const Q = z(s), W = F(Q);
2317
+ W.isValid() && (P = W.format(l.formatIn), k = W.format(l.formatOut));
2318
+ } else if (l.isRange) {
2319
+ const Q = s.split("~");
2320
+ if (Q.length === 2) {
2321
+ const W = z(Q[0]), we = z(Q[1]), Se = F(W), a = F(we);
2322
+ Se.isValid() && a.isValid() && (P = Se.format(l.formatIn), H = a.format(l.formatIn), k = `${Se.format(l.formatOut)} ~ ${a.format(l.formatOutEnd)}`);
2323
+ }
2324
+ }
2325
+ }
2326
+ t.start = P, t.end = H, t.showText = k;
2327
+ }, de = (s) => {
2328
+ let k = !0;
2329
+ if (i.checkCallback && !o.isEmpty(s)) {
2330
+ try {
2331
+ l.isDefault ? k = i.checkCallback(s) : l.isRange && (k = i.checkCallback(s.start, s.end));
2332
+ } catch (P) {
2333
+ be.warn("ClDateTime", "checkCallback 回调执行异常,本次选择不生效", P), k = !1;
2334
+ }
2335
+ k = o.isBoolean(k) ? k : !0;
2336
+ }
2337
+ return k;
2338
+ }, ee = (s) => {
2339
+ let k = "", P = "", H = "", Q = !1;
2340
+ if (l.isDefault) {
2341
+ if (!o.isEmpty(s)) {
2342
+ const Se = D(s);
2343
+ Se && (P = Se.format(l.formatIn), k = Se.format(l.formatOut));
2344
+ }
2345
+ Q = P !== u.lastStart;
2346
+ } else if (l.isRange) {
2347
+ if (!o.isEmpty(s) && !o.isEmpty(s.start) && !o.isEmpty(s.end)) {
2348
+ const Se = D(s.start), a = D(s.end);
2349
+ Se && a && (P = Se.format(l.formatIn), H = a.format(l.formatIn), k = `${Se.format(l.formatOut)} ~ ${a.format(l.formatOutEnd)}`);
2350
+ }
2351
+ Q = P !== u.lastStart || H !== u.lastEnd;
2352
+ }
2353
+ const W = f(P, H);
2354
+ let we = !1;
2355
+ return W.errMsg.length === 0 && (we = de(s)), l.errMsg = W.errMsg, M.value && Ve(() => {
2356
+ M.value?.calculationPosition();
2357
+ }), { start: P, end: H, text: k, isChange: Q, checkInfo: W, isCheck: we };
2358
+ }, K = () => {
2359
+ O(), V(), _(i.value), Ve(() => {
2360
+ l.isInit = !0;
2361
+ });
2362
+ }, Z = () => {
2363
+ const s = g.value?.getValue();
2364
+ let k = "", P = "";
2365
+ if (l.isDefault) {
2366
+ if (!o.isEmpty(s)) {
2367
+ const H = D(s);
2368
+ H && (k = H.format(l.formatIn));
2369
+ }
2370
+ } else if (l.isRange) {
2371
+ const H = s;
2372
+ if (!o.isEmpty(H?.start) && !o.isEmpty(H?.end)) {
2373
+ const Q = D(H?.start), W = D(H?.end);
2374
+ Q && W && (k = Q.format(l.formatIn), P = W.format(l.formatIn));
2375
+ }
2376
+ }
2377
+ return A({ start: k, end: P });
2378
+ };
2379
+ Pe(() => {
2380
+ Ve(() => {
2381
+ K();
2382
+ });
2383
+ }), re(
2384
+ () => i.value,
2385
+ (s, k) => {
2386
+ s !== k && (_(s), u.lastStart = t.start, u.lastEnd = t.end);
2387
+ }
2388
+ ), re(
2389
+ () => i.isDropdown,
2390
+ (s) => {
2391
+ l.isShowPopup = s;
2392
+ }
2393
+ ), re(
2394
+ [
2395
+ () => i.theme,
2396
+ () => i.layerType,
2397
+ () => i.timeType,
2398
+ () => i.format,
2399
+ () => i.formatEnd
2400
+ ],
2401
+ () => {
2402
+ l.isDefault = i.theme !== "range", l.isRange = i.theme === "range", O(), V(), _(i.value), u.lastStart = t.start, u.lastEnd = t.end;
2403
+ }
2404
+ );
2405
+ const J = (s) => {
2406
+ i.disabled || s && (l.errMsg = [], u.lastStart = t.start, u.lastEnd = t.end, V());
2407
+ }, pe = () => {
2408
+ if (!i.disabled) {
2409
+ t.start = "", t.end = "", t.showText = "", u.lastStart = "", u.lastEnd = "";
2410
+ const s = A(t);
2411
+ R("update:value", s.value), R("update:modelValue", s.value), R("onChange", s.value, s.info);
2412
+ }
2413
+ }, ve = (s) => {
2414
+ if (!i.disabled) {
2415
+ const { start: k, end: P, text: H, isChange: Q, isCheck: W } = ee(s);
2416
+ if (W && (t.start = k, t.end = P, t.showText = H, u.lastStart = k, u.lastEnd = P, X(), Q)) {
2417
+ const we = A(t);
2418
+ R("update:value", we.value), R("update:modelValue", we.value), R("onChange", we.value, we.info);
2419
+ }
2420
+ }
2421
+ }, Ye = () => {
2422
+ X();
2423
+ };
2424
+ let h = !1;
2425
+ const x = () => {
2426
+ l.isShowPopup && M.value && (M.value.checkIsShowOpen() || M.value.initCompleteOpen()), h || (h = !0, R("onInit"));
2427
+ };
2428
+ return Je("$DateTimeTop", {
2429
+ keyIndex: T,
2430
+ elId: i.id,
2431
+ getMomentDate: D,
2432
+ getViewDate: c,
2433
+ getNow: se,
2434
+ checkIsTimes: oe,
2435
+ checkValue: w,
2436
+ checkMinMax: f,
2437
+ getValueEffective: z,
2438
+ getMergeDayTime: (s, k) => {
2439
+ let P = "";
2440
+ const H = o.isString(s) ? o.trim(s) : "";
2441
+ let Q = o.isString(k) ? o.trim(k) : "";
2442
+ switch (l.timeType) {
2443
+ case "date":
2444
+ P = H;
2445
+ break;
2446
+ case "time":
2447
+ P = z(Q) || "";
2448
+ break;
2449
+ case "datetime":
2450
+ o.isEmpty(H) || (Q = o.isEmpty(k) ? "00:00:00" : Q, P = `${H} ${Q}`);
2451
+ break;
2452
+ }
2453
+ return P;
2454
+ },
2455
+ Dayjs: F
2456
+ }), Je("$DateTimeTopBase", Ge(l)), ce({
2457
+ getValue: () => Z().value,
2458
+ getValueData: () => Z().info,
2459
+ setValue: (s) => {
2460
+ _(s), u.lastStart = t.start, u.lastEnd = t.end;
2461
+ }
2462
+ }), (s, k) => d.isPlaintext ? (S(), C("div", {
2463
+ key: 0,
2464
+ id: me(y),
2465
+ class: ue(ie.value)
2466
+ }, xe(G.value), 11, ra)) : d.isDropdown ? (S(), Be(et, {
2467
+ key: 1,
2468
+ ref_key: "refElDropdownLayer",
2469
+ ref: M,
2470
+ id: me(y),
2471
+ classParent: e.value,
2472
+ classDropDown: Y.value,
2473
+ placeholder: d.placeholder,
2474
+ isDisabled: d.disabled,
2475
+ isClear: d.isClear,
2476
+ textLabel: t.showText,
2477
+ textArrowDirection: n.value,
2478
+ dropdownArrowPos: d.direction,
2479
+ isUseDropdownArrow: d.isUseDropdownArrow,
2480
+ appendContainer: d.appendContainer,
2481
+ appendFollowWidth: !1,
2482
+ onOnChangeOpen: J,
2483
+ onOnClear: pe
2484
+ }, {
2485
+ textExtend: Ue(() => [
2486
+ fe(_e, {
2487
+ name: l.timeType === "time" ? "clock" : "calendar",
2488
+ className: "datetime-icon",
2489
+ "aria-hidden": "true"
2490
+ }, null, 8, ["name"])
2491
+ ]),
2492
+ dropdown: Ue(() => [
2493
+ fe(ze, {
2494
+ ref_key: "refElDatetime",
2495
+ ref: g,
2496
+ isDefault: l.isDefault,
2497
+ isRange: l.isRange,
2498
+ start: t.start,
2499
+ end: t.end,
2500
+ minDate: d.minDate,
2501
+ maxDate: d.maxDate,
2502
+ rangeQuick: l.rangeQuick,
2503
+ errMsg: l.errMsg,
2504
+ onOnSelectValue: ve,
2505
+ onOnClose: Ye,
2506
+ onOnInitComplete: x
2507
+ }, null, 8, ["isDefault", "isRange", "start", "end", "minDate", "maxDate", "rangeQuick", "errMsg"])
2508
+ ]),
2509
+ _: 1
2510
+ }, 8, ["id", "classParent", "classDropDown", "placeholder", "isDisabled", "isClear", "textLabel", "textArrowDirection", "dropdownArrowPos", "isUseDropdownArrow", "appendContainer"])) : (S(), C("div", {
2511
+ key: 2,
2512
+ id: me(y),
2513
+ class: ue(e.value)
2514
+ }, [
2515
+ l.isInit ? (S(), Be(ze, {
2516
+ key: 0,
2517
+ ref_key: "refElDatetime",
2518
+ ref: g,
2519
+ isDefault: l.isDefault,
2520
+ isRange: l.isRange,
2521
+ start: t.start,
2522
+ end: t.end,
2523
+ minDate: d.minDate,
2524
+ maxDate: d.maxDate,
2525
+ rangeQuick: l.rangeQuick,
2526
+ errMsg: l.errMsg,
2527
+ onOnSelectValue: ve,
2528
+ onOnClose: Ye,
2529
+ onOnInitComplete: x
2530
+ }, null, 8, ["isDefault", "isRange", "start", "end", "minDate", "maxDate", "rangeQuick", "errMsg"])) : (S(), C(U, { key: 1 }, [], 64))
2531
+ ], 10, ca));
2532
+ }
2533
+ });
2534
+ export {
2535
+ Ma as _
2536
+ };