@das-fed/ui 6.4.0-dev.9 → 6.4.0-hot.1

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 (241) hide show
  1. package/package.json +8 -6
  2. package/packages/business-components/app-container/index.js +46 -252
  3. package/packages/business-components/app-container/index.js.gz +0 -0
  4. package/packages/business-components/app-container/style.css +1 -1
  5. package/packages/business-components/app-container/style.css.gz +0 -0
  6. package/packages/business-components/change-enterprises/index.js +89 -295
  7. package/packages/business-components/change-enterprises/index.js.gz +0 -0
  8. package/packages/business-components/change-enterprises/style.css +1 -1
  9. package/packages/business-components/change-enterprises/style.css.gz +0 -0
  10. package/packages/business-components/device-panel/index.js +24047 -29070
  11. package/packages/business-components/device-panel/index.js.gz +0 -0
  12. package/packages/business-components/device-panel/style.css +1 -1
  13. package/packages/business-components/device-panel/style.css.gz +0 -0
  14. package/packages/business-components/export-button/index.js +152 -432
  15. package/packages/business-components/export-button/index.js.gz +0 -0
  16. package/packages/business-components/import-button/index.js +323 -603
  17. package/packages/business-components/import-button/index.js.gz +0 -0
  18. package/packages/business-components/process-form/index.js +788 -1276
  19. package/packages/business-components/process-form/index.js.gz +0 -0
  20. package/packages/business-components/process-form/style.css +1 -1
  21. package/packages/business-components/process-log/ProcessLogItem.vue.d.ts +1 -1
  22. package/packages/business-components/process-log/index.d.ts +21 -21
  23. package/packages/business-components/process-log/index.js +329 -3948
  24. package/packages/business-components/process-log/index.js.gz +0 -0
  25. package/packages/business-components/process-search-form/index.js +439 -719
  26. package/packages/business-components/process-search-form/index.js.gz +0 -0
  27. package/packages/business-components/process-table/index.js +538 -819
  28. package/packages/business-components/process-table/index.js.gz +0 -0
  29. package/packages/business-components/urgent-panel/index.js +1587 -2700
  30. package/packages/business-components/urgent-panel/index.js.gz +0 -0
  31. package/packages/business-components/urgent-panel/src/components/urgentPanelModal/apis.d.ts +1 -0
  32. package/packages/business-components/urgent-panel/src/components/urgentPanelModal/components/use-schedule-track/Track.vue.d.ts +2 -2
  33. package/packages/business-components/urgent-panel/src/components/urgentPanelModal/components/use-schedule-track/track.d.ts +1 -1
  34. package/packages/business-components/urgent-panel/style.css +1 -1
  35. package/packages/business-components/urgent-panel/style.css.gz +0 -0
  36. package/packages/business-components/video-dialog/index.js +338 -619
  37. package/packages/business-components/video-dialog/index.js.gz +0 -0
  38. package/packages/components/alert/index.js +52 -3418
  39. package/packages/components/alert/index.js.gz +0 -0
  40. package/packages/components/alert/style.css +1 -1
  41. package/packages/components/alert/style.css.gz +0 -0
  42. package/packages/components/autocomplete/index.js +456 -2872
  43. package/packages/components/autocomplete/index.js.gz +0 -0
  44. package/packages/components/autocomplete/style.css +1 -1
  45. package/packages/components/autocomplete/style.css.gz +0 -0
  46. package/packages/components/breadcrumb/index.js +47 -269
  47. package/packages/components/breadcrumb/index.js.gz +0 -0
  48. package/packages/components/breadcrumb/style.css +1 -1
  49. package/packages/components/breadcrumb/style.css.gz +0 -0
  50. package/packages/components/button/index.js +215 -9801
  51. package/packages/components/button/index.js.gz +0 -0
  52. package/packages/components/button/style.css +1 -1
  53. package/packages/components/button/style.css.gz +0 -0
  54. package/packages/components/calendar/index.js +257 -614
  55. package/packages/components/calendar/index.js.gz +0 -0
  56. package/packages/components/cascader/index.js +139 -6397
  57. package/packages/components/cascader/index.js.gz +0 -0
  58. package/packages/components/cascader/style.css +1 -1
  59. package/packages/components/cascader/style.css.gz +0 -0
  60. package/packages/components/checkbox/index.js +180 -3837
  61. package/packages/components/checkbox/index.js.gz +0 -0
  62. package/packages/components/checkbox/style.css +1 -1
  63. package/packages/components/checkbox/style.css.gz +0 -0
  64. package/packages/components/collapse-panel/index.js +31 -3624
  65. package/packages/components/collapse-panel/index.js.gz +0 -0
  66. package/packages/components/collapse-panel/style.css +1 -1
  67. package/packages/components/collapse-panel/style.css.gz +0 -0
  68. package/packages/components/collaspe/index.js +31 -3624
  69. package/packages/components/collaspe/index.js.gz +0 -0
  70. package/packages/components/collaspe/style.css +1 -1
  71. package/packages/components/color-picker/index.js +106 -5342
  72. package/packages/components/color-picker/index.js.gz +0 -0
  73. package/packages/components/color-picker/style.css +1 -1
  74. package/packages/components/color-picker/style.css.gz +0 -0
  75. package/packages/components/date-picker/index.js +539 -14894
  76. package/packages/components/date-picker/index.js.gz +0 -0
  77. package/packages/components/date-picker/style.css +1 -1
  78. package/packages/components/date-picker/style.css.gz +0 -0
  79. package/packages/components/dialog/index.js +186 -1832
  80. package/packages/components/dialog/index.js.gz +0 -0
  81. package/packages/components/dialog/style.css +1 -1
  82. package/packages/components/dialog/style.css.gz +0 -0
  83. package/packages/components/drawer/index.js +38 -1611
  84. package/packages/components/drawer/index.js.gz +0 -0
  85. package/packages/components/drawer/style.css +1 -1
  86. package/packages/components/dropdown/index.js +54 -4607
  87. package/packages/components/dropdown/index.js.gz +0 -0
  88. package/packages/components/dropdown/style.css +1 -1
  89. package/packages/components/dropdown/style.css.gz +0 -0
  90. package/packages/components/empty/index.js +39 -800
  91. package/packages/components/empty/index.js.gz +0 -0
  92. package/packages/components/image-preview/index.js +34 -1282
  93. package/packages/components/image-preview/index.js.gz +0 -0
  94. package/packages/components/image-upload/index.js +112 -11722
  95. package/packages/components/image-upload/index.js.gz +0 -0
  96. package/packages/components/image-upload/style.css +1 -1
  97. package/packages/components/image-upload/style.css.gz +0 -0
  98. package/packages/components/image-viewer/index.d.ts +9 -0
  99. package/packages/components/image-viewer/index.js +389 -13162
  100. package/packages/components/image-viewer/index.js.gz +0 -0
  101. package/packages/components/image-viewer/src/Index.vue.d.ts +3 -0
  102. package/packages/components/image-viewer/src/hooks/use-handler-image-src.d.ts +2 -1
  103. package/packages/components/image-viewer/src/type.d.ts +3 -0
  104. package/packages/components/image-viewer/style.css +1 -1
  105. package/packages/components/image-viewer/style.css.gz +0 -0
  106. package/packages/components/input/index.js +157 -1084
  107. package/packages/components/input/index.js.gz +0 -0
  108. package/packages/components/input/style.css +1 -1
  109. package/packages/components/input/style.css.gz +0 -0
  110. package/packages/components/input-dialog-select/index.js +2 -2
  111. package/packages/components/input-dialog-select/index.js.gz +0 -0
  112. package/packages/components/input-dialog-select/style.css +1 -1
  113. package/packages/components/input-dialog-select/style.css.gz +0 -0
  114. package/packages/components/input-number/index.js +145 -1828
  115. package/packages/components/input-number/index.js.gz +0 -0
  116. package/packages/components/input-number/style.css +1 -1
  117. package/packages/components/input-number/style.css.gz +0 -0
  118. package/packages/components/live-player/index.js +2883 -3667
  119. package/packages/components/live-player/index.js.gz +0 -0
  120. package/packages/components/live-player/style.css +1 -1
  121. package/packages/components/map/index.js +1189 -5207
  122. package/packages/components/map/index.js.gz +0 -0
  123. package/packages/components/map/style.css +1 -1
  124. package/packages/components/menu-aside/index.js +610 -8303
  125. package/packages/components/menu-aside/index.js.gz +0 -0
  126. package/packages/components/menu-aside/style.css +1 -1
  127. package/packages/components/menu-aside/style.css.gz +0 -0
  128. package/packages/components/menu-header/index.js +39 -10077
  129. package/packages/components/menu-header/index.js.gz +0 -0
  130. package/packages/components/menu-header/style.css +1 -1
  131. package/packages/components/menu-header/style.css.gz +0 -0
  132. package/packages/components/message/index.js +53 -1286
  133. package/packages/components/message/index.js.gz +0 -0
  134. package/packages/components/message/style.css +1 -1
  135. package/packages/components/message/style.css.gz +0 -0
  136. package/packages/components/notification/index.js +48 -3269
  137. package/packages/components/notification/index.js.gz +0 -0
  138. package/packages/components/notification/style.css +1 -1
  139. package/packages/components/notification/style.css.gz +0 -0
  140. package/packages/components/pagination/index.js +153 -8015
  141. package/packages/components/pagination/index.js.gz +0 -0
  142. package/packages/components/pagination/style.css +1 -1
  143. package/packages/components/pagination/style.css.gz +0 -0
  144. package/packages/components/popover/index.js +44 -2492
  145. package/packages/components/popover/index.js.gz +0 -0
  146. package/packages/components/popover/style.css +1 -1
  147. package/packages/components/popover/style.css.gz +0 -0
  148. package/packages/components/progress/index.js +107 -514
  149. package/packages/components/progress/index.js.gz +0 -0
  150. package/packages/components/progress/style.css +1 -1
  151. package/packages/components/progress/style.css.gz +0 -0
  152. package/packages/components/radio/index.js +160 -3724
  153. package/packages/components/radio/index.js.gz +0 -0
  154. package/packages/components/radio/style.css +1 -1
  155. package/packages/components/radio/style.css.gz +0 -0
  156. package/packages/components/scrollbar/index.js +915 -1440
  157. package/packages/components/scrollbar/index.js.gz +0 -0
  158. package/packages/components/scrollbar/style.css +9 -9
  159. package/packages/components/scrollbar/style.css.gz +0 -0
  160. package/packages/components/search/index.js +90 -5261
  161. package/packages/components/search/index.js.gz +0 -0
  162. package/packages/components/search/style.css +1 -1
  163. package/packages/components/search/style.css.gz +0 -0
  164. package/packages/components/search-form/index.js +920 -1008
  165. package/packages/components/search-form/index.js.gz +0 -0
  166. package/packages/components/select/index.js +380 -10505
  167. package/packages/components/select/index.js.gz +0 -0
  168. package/packages/components/select/style.css +1 -1
  169. package/packages/components/select/style.css.gz +0 -0
  170. package/packages/components/select-list/index.js +1173 -1431
  171. package/packages/components/select-list/index.js.gz +0 -0
  172. package/packages/components/select-list/style.css +1 -1
  173. package/packages/components/select-list/style.css.gz +0 -0
  174. package/packages/components/special-range-picker-month/index.js +196 -2645
  175. package/packages/components/special-range-picker-month/index.js.gz +0 -0
  176. package/packages/components/special-range-picker-year/index.js +259 -2707
  177. package/packages/components/special-range-picker-year/index.js.gz +0 -0
  178. package/packages/components/special-range-picker-year/style.css +1 -1
  179. package/packages/components/special-range-picker-year/style.css.gz +0 -0
  180. package/packages/components/spin/index.js +49 -3534
  181. package/packages/components/spin/index.js.gz +0 -0
  182. package/packages/components/spin/style.css +1 -1
  183. package/packages/components/spin/style.css.gz +0 -0
  184. package/packages/components/step/index.js +29 -4085
  185. package/packages/components/step/index.js.gz +0 -0
  186. package/packages/components/step/style.css +1 -1
  187. package/packages/components/steps/index.js +15 -4070
  188. package/packages/components/steps/style.css +1 -1
  189. package/packages/components/steps/style.css.gz +0 -0
  190. package/packages/components/switch/index.js +31 -545
  191. package/packages/components/switch/index.js.gz +0 -0
  192. package/packages/components/switch/style.css +1 -1
  193. package/packages/components/switch/style.css.gz +0 -0
  194. package/packages/components/table/index.js +6287 -18573
  195. package/packages/components/table/index.js.gz +0 -0
  196. package/packages/components/table/src/Table.vue.d.ts +2 -2
  197. package/packages/components/table/style.css +1 -1
  198. package/packages/components/table/style.css.gz +0 -0
  199. package/packages/components/tabs/index.js +173 -12627
  200. package/packages/components/tabs/index.js.gz +0 -0
  201. package/packages/components/tabs/style.css +1 -1
  202. package/packages/components/tabs/style.css.gz +0 -0
  203. package/packages/components/tag/index.js +55 -323
  204. package/packages/components/tag/index.js.gz +0 -0
  205. package/packages/components/tag/style.css +1 -1
  206. package/packages/components/tag/style.css.gz +0 -0
  207. package/packages/components/time-line/index.js +61 -3397
  208. package/packages/components/time-line/index.js.gz +0 -0
  209. package/packages/components/time-line/style.css +1 -1
  210. package/packages/components/time-line/style.css.gz +0 -0
  211. package/packages/components/tooltip/index.js +65 -2171
  212. package/packages/components/tooltip/index.js.gz +0 -0
  213. package/packages/components/tooltip/style.css +1 -1
  214. package/packages/components/tooltip/style.css.gz +0 -0
  215. package/packages/components/tree/index.js +1887 -6747
  216. package/packages/components/tree/index.js.gz +0 -0
  217. package/packages/components/tree/style.css +1 -1
  218. package/packages/components/tree/style.css.gz +0 -0
  219. package/packages/components/tree-select/index.js +358 -2776
  220. package/packages/components/tree-select/index.js.gz +0 -0
  221. package/packages/components/tree-select/style.css +1 -1
  222. package/packages/components/tree-select/style.css.gz +0 -0
  223. package/packages/components/upload/index.js +116 -11726
  224. package/packages/components/upload/index.js.gz +0 -0
  225. package/packages/components/upload/style.css +1 -1
  226. package/packages/components/upload/style.css.gz +0 -0
  227. package/packages/components/virtual-tree/index.js +86 -2923
  228. package/packages/components/virtual-tree/index.js.gz +0 -0
  229. package/packages/components/virtual-tree/style.css +1 -1
  230. package/packages/components/virtual-tree/style.css.gz +0 -0
  231. package/packages/components/watermark/index.js +17 -368
  232. package/packages/business-components/process-form/style.css.gz +0 -0
  233. package/packages/components/collaspe/style.css.gz +0 -0
  234. package/packages/components/drawer/style.css.gz +0 -0
  235. package/packages/components/image-preview/style.css +0 -1
  236. package/packages/components/image-preview/style.css.gz +0 -0
  237. package/packages/components/live-player/style.css.gz +0 -0
  238. package/packages/components/map/style.css.gz +0 -0
  239. package/packages/components/step/style.css.gz +0 -0
  240. package/packages/components/steps/index.js.gz +0 -0
  241. package/packages/components/watermark/index.js.gz +0 -0
@@ -1,400 +1,43 @@
1
1
  import '@das-fed/ui/packages/components/calendar/style.css';
2
- import { withInstall as Me } from "@das-fed/utils/with-install/index";
3
- import { defineComponent as ke, ref as X, computed as L, watch as Se, nextTick as ye, openBlock as Y, createElementBlock as j, normalizeClass as ae, Fragment as ue, renderList as ce, createElementVNode as G, toDisplayString as de, renderSlot as I, createCommentVNode as R, normalizeStyle as Ce, onMounted as ze, onBeforeUnmount as be, createVNode as Ne, createSlots as me, withCtx as oe, normalizeProps as ie, mergeProps as le, guardReactiveProps as fe, createBlock as Oe } from "vue";
4
- import { t as he, setI18nRule as We } from "@das-fed/web/packages/i18n/index";
5
- import { SizeWatcher as He } from "@das-fed/utils/size-watcher";
6
- import { setThemeRule as _e } from "@das-fed/web/packages/theme/index";
7
- var $e = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
8
- function De(p) {
9
- return p && p.__esModule && Object.prototype.hasOwnProperty.call(p, "default") ? p.default : p;
10
- }
11
- var we = { exports: {} };
12
- (function(p, z) {
13
- (function(D, k) {
14
- p.exports = k();
15
- })($e, function() {
16
- var D = 1e3, k = 6e4, u = 36e5, d = "millisecond", w = "second", $ = "minute", N = "hour", O = "day", B = "week", l = "month", y = "quarter", A = "year", b = "date", H = "Invalid Date", V = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, K = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, r = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(c) {
17
- var a = ["th", "st", "nd", "rd"], e = c % 100;
18
- return "[" + c + (a[(e - 20) % 10] || a[e] || a[0]) + "]";
19
- } }, M = function(c, a, e) {
20
- var s = String(c);
21
- return !s || s.length >= a ? c : "" + Array(a + 1 - s.length).join(e) + c;
22
- }, t = { s: M, z: function(c) {
23
- var a = -c.utcOffset(), e = Math.abs(a), s = Math.floor(e / 60), n = e % 60;
24
- return (a <= 0 ? "+" : "-") + M(s, 2, "0") + ":" + M(n, 2, "0");
25
- }, m: function c(a, e) {
26
- if (a.date() < e.date()) return -c(e, a);
27
- var s = 12 * (e.year() - a.year()) + (e.month() - a.month()), n = a.clone().add(s, l), h = e - n < 0, f = a.clone().add(s + (h ? -1 : 1), l);
28
- return +(-(s + (e - n) / (h ? n - f : f - n)) || 0);
29
- }, a: function(c) {
30
- return c < 0 ? Math.ceil(c) || 0 : Math.floor(c);
31
- }, p: function(c) {
32
- return { M: l, y: A, w: B, d: O, D: b, h: N, m: $, s: w, ms: d, Q: y }[c] || String(c || "").toLowerCase().replace(/s$/, "");
33
- }, u: function(c) {
34
- return c === void 0;
35
- } }, o = "en", i = {};
36
- i[o] = r;
37
- var S = "$isDayjsObject", W = function(c) {
38
- return c instanceof ee || !(!c || !c[S]);
39
- }, _ = function c(a, e, s) {
40
- var n;
41
- if (!a) return o;
42
- if (typeof a == "string") {
43
- var h = a.toLowerCase();
44
- i[h] && (n = h), e && (i[h] = e, n = h);
45
- var f = a.split("-");
46
- if (!n && f.length > 1) return c(f[0]);
47
- } else {
48
- var v = a.name;
49
- i[v] = a, n = v;
50
- }
51
- return !s && n && (o = n), n || !s && o;
52
- }, g = function(c, a) {
53
- if (W(c)) return c.clone();
54
- var e = typeof a == "object" ? a : {};
55
- return e.date = c, e.args = arguments, new ee(e);
56
- }, m = t;
57
- m.l = _, m.i = W, m.w = function(c, a) {
58
- return g(c, { locale: a.$L, utc: a.$u, x: a.$x, $offset: a.$offset });
59
- };
60
- var ee = function() {
61
- function c(e) {
62
- this.$L = _(e.locale, null, !0), this.parse(e), this.$x = this.$x || e.x || {}, this[S] = !0;
63
- }
64
- var a = c.prototype;
65
- return a.parse = function(e) {
66
- this.$d = function(s) {
67
- var n = s.date, h = s.utc;
68
- if (n === null) return /* @__PURE__ */ new Date(NaN);
69
- if (m.u(n)) return /* @__PURE__ */ new Date();
70
- if (n instanceof Date) return new Date(n);
71
- if (typeof n == "string" && !/Z$/i.test(n)) {
72
- var f = n.match(V);
73
- if (f) {
74
- var v = f[2] - 1 || 0, C = (f[7] || "0").substring(0, 3);
75
- return h ? new Date(Date.UTC(f[1], v, f[3] || 1, f[4] || 0, f[5] || 0, f[6] || 0, C)) : new Date(f[1], v, f[3] || 1, f[4] || 0, f[5] || 0, f[6] || 0, C);
76
- }
77
- }
78
- return new Date(n);
79
- }(e), this.init();
80
- }, a.init = function() {
81
- var e = this.$d;
82
- this.$y = e.getFullYear(), this.$M = e.getMonth(), this.$D = e.getDate(), this.$W = e.getDay(), this.$H = e.getHours(), this.$m = e.getMinutes(), this.$s = e.getSeconds(), this.$ms = e.getMilliseconds();
83
- }, a.$utils = function() {
84
- return m;
85
- }, a.isValid = function() {
86
- return this.$d.toString() !== H;
87
- }, a.isSame = function(e, s) {
88
- var n = g(e);
89
- return this.startOf(s) <= n && n <= this.endOf(s);
90
- }, a.isAfter = function(e, s) {
91
- return g(e) < this.startOf(s);
92
- }, a.isBefore = function(e, s) {
93
- return this.endOf(s) < g(e);
94
- }, a.$g = function(e, s, n) {
95
- return m.u(e) ? this[s] : this.set(n, e);
96
- }, a.unix = function() {
97
- return Math.floor(this.valueOf() / 1e3);
98
- }, a.valueOf = function() {
99
- return this.$d.getTime();
100
- }, a.startOf = function(e, s) {
101
- var n = this, h = !!m.u(s) || s, f = m.p(e), v = function(q, F) {
102
- var J = m.w(n.$u ? Date.UTC(n.$y, F, q) : new Date(n.$y, F, q), n);
103
- return h ? J : J.endOf(O);
104
- }, C = function(q, F) {
105
- return m.w(n.toDate()[q].apply(n.toDate("s"), (h ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(F)), n);
106
- }, T = this.$W, x = this.$M, Z = this.$D, Q = "set" + (this.$u ? "UTC" : "");
107
- switch (f) {
108
- case A:
109
- return h ? v(1, 0) : v(31, 11);
110
- case l:
111
- return h ? v(1, x) : v(0, x + 1);
112
- case B:
113
- var U = this.$locale().weekStart || 0, te = (T < U ? T + 7 : T) - U;
114
- return v(h ? Z - te : Z + (6 - te), x);
115
- case O:
116
- case b:
117
- return C(Q + "Hours", 0);
118
- case N:
119
- return C(Q + "Minutes", 1);
120
- case $:
121
- return C(Q + "Seconds", 2);
122
- case w:
123
- return C(Q + "Milliseconds", 3);
124
- default:
125
- return this.clone();
126
- }
127
- }, a.endOf = function(e) {
128
- return this.startOf(e, !1);
129
- }, a.$set = function(e, s) {
130
- var n, h = m.p(e), f = "set" + (this.$u ? "UTC" : ""), v = (n = {}, n[O] = f + "Date", n[b] = f + "Date", n[l] = f + "Month", n[A] = f + "FullYear", n[N] = f + "Hours", n[$] = f + "Minutes", n[w] = f + "Seconds", n[d] = f + "Milliseconds", n)[h], C = h === O ? this.$D + (s - this.$W) : s;
131
- if (h === l || h === A) {
132
- var T = this.clone().set(b, 1);
133
- T.$d[v](C), T.init(), this.$d = T.set(b, Math.min(this.$D, T.daysInMonth())).$d;
134
- } else v && this.$d[v](C);
135
- return this.init(), this;
136
- }, a.set = function(e, s) {
137
- return this.clone().$set(e, s);
138
- }, a.get = function(e) {
139
- return this[m.p(e)]();
140
- }, a.add = function(e, s) {
141
- var n, h = this;
142
- e = Number(e);
143
- var f = m.p(s), v = function(x) {
144
- var Z = g(h);
145
- return m.w(Z.date(Z.date() + Math.round(x * e)), h);
146
- };
147
- if (f === l) return this.set(l, this.$M + e);
148
- if (f === A) return this.set(A, this.$y + e);
149
- if (f === O) return v(1);
150
- if (f === B) return v(7);
151
- var C = (n = {}, n[$] = k, n[N] = u, n[w] = D, n)[f] || 1, T = this.$d.getTime() + e * C;
152
- return m.w(T, this);
153
- }, a.subtract = function(e, s) {
154
- return this.add(-1 * e, s);
155
- }, a.format = function(e) {
156
- var s = this, n = this.$locale();
157
- if (!this.isValid()) return n.invalidDate || H;
158
- var h = e || "YYYY-MM-DDTHH:mm:ssZ", f = m.z(this), v = this.$H, C = this.$m, T = this.$M, x = n.weekdays, Z = n.months, Q = n.meridiem, U = function(F, J, ne, se) {
159
- return F && (F[J] || F(s, h)) || ne[J].slice(0, se);
160
- }, te = function(F) {
161
- return m.s(v % 12 || 12, F, "0");
162
- }, q = Q || function(F, J, ne) {
163
- var se = F < 12 ? "AM" : "PM";
164
- return ne ? se.toLowerCase() : se;
165
- };
166
- return h.replace(K, function(F, J) {
167
- return J || function(ne) {
168
- switch (ne) {
169
- case "YY":
170
- return String(s.$y).slice(-2);
171
- case "YYYY":
172
- return m.s(s.$y, 4, "0");
173
- case "M":
174
- return T + 1;
175
- case "MM":
176
- return m.s(T + 1, 2, "0");
177
- case "MMM":
178
- return U(n.monthsShort, T, Z, 3);
179
- case "MMMM":
180
- return U(Z, T);
181
- case "D":
182
- return s.$D;
183
- case "DD":
184
- return m.s(s.$D, 2, "0");
185
- case "d":
186
- return String(s.$W);
187
- case "dd":
188
- return U(n.weekdaysMin, s.$W, x, 2);
189
- case "ddd":
190
- return U(n.weekdaysShort, s.$W, x, 3);
191
- case "dddd":
192
- return x[s.$W];
193
- case "H":
194
- return String(v);
195
- case "HH":
196
- return m.s(v, 2, "0");
197
- case "h":
198
- return te(1);
199
- case "hh":
200
- return te(2);
201
- case "a":
202
- return q(v, C, !0);
203
- case "A":
204
- return q(v, C, !1);
205
- case "m":
206
- return String(C);
207
- case "mm":
208
- return m.s(C, 2, "0");
209
- case "s":
210
- return String(s.$s);
211
- case "ss":
212
- return m.s(s.$s, 2, "0");
213
- case "SSS":
214
- return m.s(s.$ms, 3, "0");
215
- case "Z":
216
- return f;
217
- }
218
- return null;
219
- }(F) || f.replace(":", "");
220
- });
221
- }, a.utcOffset = function() {
222
- return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
223
- }, a.diff = function(e, s, n) {
224
- var h, f = this, v = m.p(s), C = g(e), T = (C.utcOffset() - this.utcOffset()) * k, x = this - C, Z = function() {
225
- return m.m(f, C);
226
- };
227
- switch (v) {
228
- case A:
229
- h = Z() / 12;
230
- break;
231
- case l:
232
- h = Z();
233
- break;
234
- case y:
235
- h = Z() / 3;
236
- break;
237
- case B:
238
- h = (x - T) / 6048e5;
239
- break;
240
- case O:
241
- h = (x - T) / 864e5;
242
- break;
243
- case N:
244
- h = x / u;
245
- break;
246
- case $:
247
- h = x / k;
248
- break;
249
- case w:
250
- h = x / D;
251
- break;
252
- default:
253
- h = x;
254
- }
255
- return n ? h : m.a(h);
256
- }, a.daysInMonth = function() {
257
- return this.endOf(l).$D;
258
- }, a.$locale = function() {
259
- return i[this.$L];
260
- }, a.locale = function(e, s) {
261
- if (!e) return this.$L;
262
- var n = this.clone(), h = _(e, s, !0);
263
- return h && (n.$L = h), n;
264
- }, a.clone = function() {
265
- return m.w(this.$d, this);
266
- }, a.toDate = function() {
267
- return new Date(this.valueOf());
268
- }, a.toJSON = function() {
269
- return this.isValid() ? this.toISOString() : null;
270
- }, a.toISOString = function() {
271
- return this.$d.toISOString();
272
- }, a.toString = function() {
273
- return this.$d.toUTCString();
274
- }, c;
275
- }(), re = ee.prototype;
276
- return g.prototype = re, [["$ms", d], ["$s", w], ["$m", $], ["$H", N], ["$W", O], ["$M", l], ["$y", A], ["$D", b]].forEach(function(c) {
277
- re[c[1]] = function(a) {
278
- return this.$g(a, c[0], c[1]);
279
- };
280
- }), g.extend = function(c, a) {
281
- return c.$i || (c(a, ee, g), c.$i = !0), g;
282
- }, g.locale = _, g.isDayjs = W, g.unix = function(c) {
283
- return g(1e3 * c);
284
- }, g.en = i[o], g.Ls = i, g.p = {}, g;
285
- });
286
- })(we);
287
- var Te = we.exports;
288
- const P = /* @__PURE__ */ De(Te), Ye = (p, z) => {
289
- const D = p.endOf("month"), k = z.startOf("month"), d = D.isSame(k, "week") ? k.add(1, "week") : k;
2
+ import { withInstall as Q } from "@das-fed/utils/with-install/index";
3
+ import { defineComponent as q, ref as O, computed as g, watch as X, nextTick as I, openBlock as i, createElementBlock as y, normalizeClass as B, Fragment as F, renderList as P, createElementVNode as W, toDisplayString as Z, renderSlot as M, createCommentVNode as C, normalizeStyle as ee, onMounted as te, onBeforeUnmount as ae, createVNode as ne, createSlots as x, withCtx as _, normalizeProps as R, mergeProps as V, guardReactiveProps as L, createBlock as se } from "vue";
4
+ import { t as j, setI18nRule as re } from "@das-fed/web/packages/i18n/index";
5
+ import z from "dayjs";
6
+ import le from "dayjs/plugin/localeData.js";
7
+ import { SizeWatcher as oe } from "@das-fed/utils/size-watcher";
8
+ import { setThemeRule as de } from "@das-fed/web/packages/theme/index";
9
+ const ce = (o, h) => {
10
+ const d = o.endOf("month"), c = h.startOf("month"), s = d.isSame(c, "week") ? c.add(1, "week") : c;
290
11
  return [
291
- [p, D],
292
- [d.startOf("week"), z]
12
+ [o, d],
13
+ [s.startOf("week"), h]
293
14
  ];
294
- }, Ae = (p, z) => {
295
- const D = p.endOf("month"), k = p.add(1, "month").startOf("month"), u = D.isSame(
296
- k,
15
+ }, he = (o, h) => {
16
+ const d = o.endOf("month"), c = o.add(1, "month").startOf("month"), r = d.isSame(
17
+ c,
297
18
  "week"
298
- ) ? k.add(1, "week") : k, d = u.endOf("month"), w = z.startOf("month"), $ = d.isSame(w, "week") ? w.add(1, "week") : w;
19
+ ) ? c.add(1, "week") : c, s = r.endOf("month"), m = h.startOf("month"), N = s.isSame(m, "week") ? m.add(1, "week") : m;
299
20
  return [
300
- [p, D],
301
- [u.startOf("week"), d],
302
- [$.startOf("week"), z]
21
+ [o, d],
22
+ [r.startOf("week"), s],
23
+ [N.startOf("week"), h]
303
24
  ];
304
- }, pe = (p, z) => {
305
- const D = p.startOf("week"), k = z.endOf("week"), u = D.get("month"), d = k.get("month");
306
- return u === d ? [[D, k]] : (u + 1) % 12 === d ? Ye(D, k) : u + 2 === d || (u + 1) % 11 === d ? Ae(D, k) : [];
307
- }, E = (p) => Array.from(Array.from({ length: p }).keys()), je = (p, z) => {
308
- const D = p.subtract(1, "month").endOf("month").date();
309
- return E(z).map((k, u) => D - (z - u - 1));
310
- }, xe = (p) => {
311
- const z = p.daysInMonth();
312
- return E(z).map((D, k) => k + 1);
313
- }, Be = (p) => E(p.length / 7).map((z) => {
314
- const D = z * 7;
315
- return p.slice(D, D + 7);
316
- });
317
- var ve = { exports: {} };
318
- (function(p, z) {
319
- (function(D, k) {
320
- p.exports = k();
321
- })($e, function() {
322
- return function(D, k, u) {
323
- var d = k.prototype, w = function(l) {
324
- return l && (l.indexOf ? l : l.s);
325
- }, $ = function(l, y, A, b, H) {
326
- var V = l.name ? l : l.$locale(), K = w(V[y]), r = w(V[A]), M = K || r.map(function(o) {
327
- return o.slice(0, b);
328
- });
329
- if (!H) return M;
330
- var t = V.weekStart;
331
- return M.map(function(o, i) {
332
- return M[(i + (t || 0)) % 7];
333
- });
334
- }, N = function() {
335
- return u.Ls[u.locale()];
336
- }, O = function(l, y) {
337
- return l.formats[y] || function(A) {
338
- return A.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(b, H, V) {
339
- return H || V.slice(1);
340
- });
341
- }(l.formats[y.toUpperCase()]);
342
- }, B = function() {
343
- var l = this;
344
- return { months: function(y) {
345
- return y ? y.format("MMMM") : $(l, "months");
346
- }, monthsShort: function(y) {
347
- return y ? y.format("MMM") : $(l, "monthsShort", "months", 3);
348
- }, firstDayOfWeek: function() {
349
- return l.$locale().weekStart || 0;
350
- }, weekdays: function(y) {
351
- return y ? y.format("dddd") : $(l, "weekdays");
352
- }, weekdaysMin: function(y) {
353
- return y ? y.format("dd") : $(l, "weekdaysMin", "weekdays", 2);
354
- }, weekdaysShort: function(y) {
355
- return y ? y.format("ddd") : $(l, "weekdaysShort", "weekdays", 3);
356
- }, longDateFormat: function(y) {
357
- return O(l.$locale(), y);
358
- }, meridiem: this.$locale().meridiem, ordinal: this.$locale().ordinal };
359
- };
360
- d.localeData = function() {
361
- return B.bind(this)();
362
- }, u.localeData = function() {
363
- var l = N();
364
- return { firstDayOfWeek: function() {
365
- return l.weekStart || 0;
366
- }, weekdays: function() {
367
- return u.weekdays();
368
- }, weekdaysShort: function() {
369
- return u.weekdaysShort();
370
- }, weekdaysMin: function() {
371
- return u.weekdaysMin();
372
- }, months: function() {
373
- return u.months();
374
- }, monthsShort: function() {
375
- return u.monthsShort();
376
- }, longDateFormat: function(y) {
377
- return O(l, y);
378
- }, meridiem: l.meridiem, ordinal: l.ordinal };
379
- }, u.months = function() {
380
- return $(N(), "months");
381
- }, u.monthsShort = function() {
382
- return $(N(), "monthsShort", "months", 3);
383
- }, u.weekdays = function(l) {
384
- return $(N(), "weekdays", null, null, l);
385
- }, u.weekdaysShort = function(l) {
386
- return $(N(), "weekdaysShort", "weekdays", 3, l);
387
- }, u.weekdaysMin = function(l) {
388
- return $(N(), "weekdaysMin", "weekdays", 2, l);
389
- };
390
- };
391
- });
392
- })(ve);
393
- var Fe = ve.exports;
394
- const Le = /* @__PURE__ */ De(Fe), Ve = { key: 0 }, Ze = { class: "das-calendar-header-box" }, Pe = { class: "das-calendar-header-week-line" }, Re = ["onClick"], Ie = {
25
+ }, K = (o, h) => {
26
+ const d = o.startOf("week"), c = h.endOf("week"), r = d.get("month"), s = c.get("month");
27
+ return r === s ? [[d, c]] : (r + 1) % 12 === s ? ce(d, c) : r + 2 === s || (r + 1) % 11 === s ? he(d, c) : [];
28
+ }, $ = (o) => Array.from(Array.from({ length: o }).keys()), ie = (o, h) => {
29
+ const d = o.subtract(1, "month").endOf("month").date();
30
+ return $(h).map((c, r) => d - (h - r - 1));
31
+ }, ue = (o) => {
32
+ const h = o.daysInMonth();
33
+ return $(h).map((d, c) => c + 1);
34
+ }, ye = (o) => $(o.length / 7).map((h) => {
35
+ const d = h * 7;
36
+ return o.slice(d, d + 7);
37
+ }), me = { key: 0 }, pe = { class: "das-calendar-header-box" }, fe = { class: "das-calendar-header-week-line" }, ge = ["onClick"], ke = {
395
38
  name: "calendar-table"
396
- }, ge = /* @__PURE__ */ ke({
397
- ...Ie,
39
+ }, U = /* @__PURE__ */ q({
40
+ ...ke,
398
41
  props: {
399
42
  selectedDay: {},
400
43
  date: {},
@@ -409,118 +52,118 @@ const Le = /* @__PURE__ */ De(Fe), Ve = { key: 0 }, Ze = { class: "das-calendar-
409
52
  cellHeight: {}
410
53
  },
411
54
  emits: ["pick"],
412
- setup(p, { expose: z, emit: D }) {
413
- const k = D, u = P(), d = p, w = X("128px"), $ = X(), N = 60, O = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"], B = L(() => !!d.range && !!d.range.length), l = L(() => {
414
- const t = d.firstDayOfWeek, o = d.showZhou ? "das-calendar-weeks-zhou-" : "das-calendar-weeks-";
415
- return t === 0 ? O.map((i) => he(`${o}${i}`)) : O.slice(t).concat(O.slice(0, t)).map((i) => he(`${o}${i}`));
416
- }), y = L(() => {
417
- let t = [];
418
- if (B.value) {
419
- const [o, i] = d.range;
420
- let S = [];
421
- o.isSame(i, "month") ? S = E(i.date() - o.date() + 1).map((g) => ({
422
- text: o.date() + g,
55
+ setup(o, { expose: h, emit: d }) {
56
+ const c = d, r = z(), s = o, m = O("128px"), N = O(), H = 60, b = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"], S = g(() => !!s.range && !!s.range.length), J = g(() => {
57
+ const e = s.firstDayOfWeek, a = s.showZhou ? "das-calendar-weeks-zhou-" : "das-calendar-weeks-";
58
+ return e === 0 ? b.map((n) => j(`${a}${n}`)) : b.slice(e).concat(b.slice(0, e)).map((n) => j(`${a}${n}`));
59
+ }), D = g(() => {
60
+ let e = [];
61
+ if (S.value) {
62
+ const [a, n] = s.range;
63
+ let l = [];
64
+ a.isSame(n, "month") ? l = $(n.date() - a.date() + 1).map((k) => ({
65
+ text: a.date() + k,
423
66
  type: "current"
424
- })) : S = E(o.endOf("month").date() - o.date() + 1).map((g) => ({
425
- text: o.date() + g,
67
+ })) : l = $(a.endOf("month").date() - a.date() + 1).map((k) => ({
68
+ text: a.date() + k,
426
69
  type: "current"
427
70
  }));
428
- let W = S.length % 7;
429
- W = W === 0 ? 0 : 7 - W;
430
- const _ = E(W).map((g, m) => ({
431
- text: m + 1,
71
+ let p = l.length % 7;
72
+ p = p === 0 ? 0 : 7 - p;
73
+ const f = $(p).map((k, T) => ({
74
+ text: T + 1,
432
75
  type: "next"
433
76
  }));
434
- t = S.concat(_);
77
+ e = l.concat(f);
435
78
  } else {
436
- const o = d.date.startOf("month").day(), i = je(
437
- d.date,
438
- (o - d.firstDayOfWeek + 7) % 7
439
- ).map((g) => ({
440
- text: g,
79
+ const a = s.date.startOf("month").day(), n = ie(
80
+ s.date,
81
+ (a - s.firstDayOfWeek + 7) % 7
82
+ ).map((k) => ({
83
+ text: k,
441
84
  type: "prev"
442
- })), S = xe(d.date).map((g) => ({
443
- text: g,
85
+ })), l = ue(s.date).map((k) => ({
86
+ text: k,
444
87
  type: "current"
445
88
  }));
446
- t = [...i, ...S];
447
- const W = 7 - (t.length % 7 || 7), _ = E(W).map((g, m) => ({
448
- text: m + 1,
89
+ e = [...n, ...l];
90
+ const p = 7 - (e.length % 7 || 7), f = $(p).map((k, T) => ({
91
+ text: T + 1,
449
92
  type: "next"
450
93
  }));
451
- if (t = t.concat(_), d.calendartType == "simple" && t.length / 7 < 6) {
452
- const g = _.length ? _[_.length - 1].text : 0, m = E(7).map((ee, re) => ({
453
- text: g + re + 1,
94
+ if (e = e.concat(f), s.calendartType == "simple" && e.length / 7 < 6) {
95
+ const k = f.length ? f[f.length - 1].text : 0, T = $(7).map((We, G) => ({
96
+ text: k + G + 1,
454
97
  type: "next"
455
98
  }));
456
- t = t.concat(m);
99
+ e = e.concat(T);
457
100
  }
458
101
  }
459
- return Be(t);
102
+ return ye(e);
460
103
  });
461
- Se(
462
- () => y.value,
463
- (t) => {
464
- if (d.cellHeight) {
465
- w.value = `${d.cellHeight}px`;
104
+ X(
105
+ () => D.value,
106
+ (e) => {
107
+ if (s.cellHeight) {
108
+ m.value = `${s.cellHeight}px`;
466
109
  return;
467
110
  }
468
- t && t.length ? ye(() => {
469
- var S;
470
- const o = (S = d.parent) == null ? void 0 : S.offsetHeight;
471
- let i = Number(o) - N - 1;
472
- w.value = i / t.length - 1 + "px";
473
- }) : w.value = "128px";
111
+ e && e.length ? I(() => {
112
+ var l;
113
+ const a = (l = s.parent) == null ? void 0 : l.offsetHeight;
114
+ let n = Number(a) - H - 1;
115
+ m.value = n / e.length - 1 + "px";
116
+ }) : m.value = "128px";
474
117
  },
475
118
  { immediate: !0 }
476
119
  );
477
120
  const A = () => {
478
- if (d.cellHeight) {
479
- w.value = `${d.cellHeight}px`;
121
+ if (s.cellHeight) {
122
+ m.value = `${s.cellHeight}px`;
480
123
  return;
481
124
  }
482
- ye(() => {
483
- var i;
484
- const t = (i = d.parent) == null ? void 0 : i.offsetHeight;
485
- let o = Number(t) - N;
486
- w.value = o / y.value.length - 1 * y.value.length + "px";
125
+ I(() => {
126
+ var n;
127
+ const e = (n = s.parent) == null ? void 0 : n.offsetHeight;
128
+ let a = Number(e) - H;
129
+ m.value = a / D.value.length - 1 * D.value.length + "px";
487
130
  });
488
- }, b = (t, o) => {
489
- switch (o) {
131
+ }, w = (e, a) => {
132
+ switch (a) {
490
133
  case "prev":
491
- return d.date.startOf("month").subtract(1, "month").date(t);
134
+ return s.date.startOf("month").subtract(1, "month").date(e);
492
135
  case "next":
493
- return d.date.startOf("month").add(1, "month").date(t);
136
+ return s.date.startOf("month").add(1, "month").date(e);
494
137
  case "current":
495
- return d.date.date(t);
138
+ return s.date.date(e);
496
139
  }
497
- }, H = ({ text: t, type: o }) => {
498
- const i = [o], S = b(t, o);
499
- return S.isSame(d.selectedDay, "day") && i.push("is-selected"), S.isSame(u, "day") && i.push("is-today"), i;
500
- }, V = ({ text: t, type: o }) => {
501
- const i = b(t, o);
502
- k("pick", i);
503
- }, K = (t) => {
504
- const o = y.value[0];
505
- if (o) {
506
- const i = o[t];
507
- if (i) {
508
- const { text: S, type: W } = i;
509
- return b(S, W).format("MM/DD");
140
+ }, v = ({ text: e, type: a }) => {
141
+ const n = [a], l = w(e, a);
142
+ return l.isSame(s.selectedDay, "day") && n.push("is-selected"), l.isSame(r, "day") && n.push("is-today"), n;
143
+ }, Y = ({ text: e, type: a }) => {
144
+ const n = w(e, a);
145
+ c("pick", n);
146
+ }, E = (e) => {
147
+ const a = D.value[0];
148
+ if (a) {
149
+ const n = a[e];
150
+ if (n) {
151
+ const { text: l, type: p } = n;
152
+ return w(l, p).format("MM/DD");
510
153
  }
511
154
  }
512
155
  return "";
513
- }, r = (t) => {
514
- const o = y.value[0];
515
- if (o) {
516
- const i = o[t];
517
- if (i) {
518
- const { text: S, type: W } = i, _ = b(S, W);
156
+ }, t = (e) => {
157
+ const a = D.value[0];
158
+ if (a) {
159
+ const n = a[e];
160
+ if (n) {
161
+ const { text: l, type: p } = n, f = w(l, p);
519
162
  return {
520
- isSelected: _.isSame(d.selectedDay),
521
- type: `${W}-month`,
522
- day: _.format("YYYY-MM-DD"),
523
- date: _.toDate()
163
+ isSelected: f.isSame(s.selectedDay),
164
+ type: `${p}-month`,
165
+ day: f.format("YYYY-MM-DD"),
166
+ date: f.toDate()
524
167
  };
525
168
  }
526
169
  }
@@ -530,95 +173,95 @@ const Le = /* @__PURE__ */ De(Fe), Ve = { key: 0 }, Ze = { class: "das-calendar-
530
173
  day: null,
531
174
  date: null
532
175
  };
533
- }, M = ({ text: t, type: o }) => {
534
- const i = b(t, o);
176
+ }, u = ({ text: e, type: a }) => {
177
+ const n = w(e, a);
535
178
  return {
536
- isSelected: i.isSame(d.selectedDay),
537
- type: `${o}-month`,
538
- day: i.format("YYYY-MM-DD"),
539
- date: i.toDate()
179
+ isSelected: n.isSame(s.selectedDay),
180
+ type: `${a}-month`,
181
+ day: n.format("YYYY-MM-DD"),
182
+ date: n.toDate()
540
183
  };
541
184
  };
542
- return z({
185
+ return h({
543
186
  getHeight: A
544
- }), (t, o) => y.value.length ? (Y(), j("table", {
187
+ }), (e, a) => D.value.length ? (i(), y("table", {
545
188
  key: 0,
546
- class: ae(["das-calendar-table", { "is-range": B.value, "is-week": t.calendartType == "week", simple: t.calendartType == "simple" }]),
189
+ class: B(["das-calendar-table", { "is-range": S.value, "is-week": e.calendartType == "week", simple: e.calendartType == "simple" }]),
547
190
  cellspacing: "0",
548
191
  cellpadding: "0",
549
192
  ref_key: "tableRef",
550
- ref: $
193
+ ref: N
551
194
  }, [
552
- t.hideHeader ? R("", !0) : (Y(), j("thead", Ve, [
553
- (Y(!0), j(ue, null, ce(l.value, (i, S) => (Y(), j("th", {
195
+ e.hideHeader ? C("", !0) : (i(), y("thead", me, [
196
+ (i(!0), y(F, null, P(J.value, (n, l) => (i(), y("th", {
554
197
  class: "das-calendar-table-header",
555
- key: i
198
+ key: n
556
199
  }, [
557
- G("div", Ze, [
558
- G("div", Pe, [
559
- G("div", {
560
- class: ae(["das-calendar-header-week", { highlight: t.highlightWeek }])
561
- }, de(i), 3),
562
- t.calendartType == "week" ? I(t.$slots, "week-type", {
200
+ W("div", pe, [
201
+ W("div", fe, [
202
+ W("div", {
203
+ class: B(["das-calendar-header-week", { highlight: e.highlightWeek }])
204
+ }, Z(n), 3),
205
+ e.calendartType == "week" ? M(e.$slots, "week-type", {
563
206
  key: 0,
564
- data: r(S)
565
- }) : R("", !0)
207
+ data: t(l)
208
+ }) : C("", !0)
566
209
  ]),
567
- t.calendartType == "week" ? (Y(), j("div", {
210
+ e.calendartType == "week" ? (i(), y("div", {
568
211
  key: 0,
569
- class: ae(["das-calendar-header-day", { highlight: t.highlightDay }])
570
- }, de(K(S)), 3)) : R("", !0)
212
+ class: B(["das-calendar-header-day", { highlight: e.highlightDay }])
213
+ }, Z(E(l)), 3)) : C("", !0)
571
214
  ])
572
215
  ]))), 128))
573
216
  ])),
574
- G("tbody", null, [
575
- (Y(!0), j(ue, null, ce(y.value, (i, S) => (Y(), j("tr", {
576
- key: S,
577
- class: ae({
217
+ W("tbody", null, [
218
+ (i(!0), y(F, null, P(D.value, (n, l) => (i(), y("tr", {
219
+ key: l,
220
+ class: B({
578
221
  "das-calendar-table-row": !0,
579
- "hide-border": S === 0 && t.hideHeader
222
+ "hide-border": l === 0 && e.hideHeader
580
223
  })
581
224
  }, [
582
- (Y(!0), j(ue, null, ce(i, (W, _) => (Y(), j("td", {
583
- key: _,
584
- class: ae(H(W)),
585
- onClick: (g) => V(W)
225
+ (i(!0), y(F, null, P(n, (p, f) => (i(), y("td", {
226
+ key: f,
227
+ class: B(v(p)),
228
+ onClick: (k) => Y(p)
586
229
  }, [
587
- G("div", {
230
+ W("div", {
588
231
  class: "das-calendar-day",
589
- style: Ce({ height: w.value })
232
+ style: ee({ height: m.value })
590
233
  }, [
591
- I(t.$slots, "date-cell", {
592
- data: M(W)
234
+ M(e.$slots, "date-cell", {
235
+ data: u(p)
593
236
  })
594
237
  ], 4)
595
- ], 10, Re))), 128))
238
+ ], 10, ge))), 128))
596
239
  ], 2))), 128))
597
240
  ])
598
- ], 2)) : R("", !0);
241
+ ], 2)) : C("", !0);
599
242
  }
600
- }), Je = {
243
+ }), De = {
601
244
  key: 0,
602
245
  class: "das-calendar-body 1"
603
- }, Ee = {
246
+ }, ve = {
604
247
  key: 1,
605
248
  class: "das-calendar-cell-date"
606
- }, Ue = {
249
+ }, we = {
607
250
  key: 2,
608
251
  class: "das-calendar-cell-cont"
609
- }, qe = {
252
+ }, ze = {
610
253
  key: 1,
611
254
  class: "das-calendar-body 2"
612
- }, Ge = {
255
+ }, Ce = {
613
256
  key: 1,
614
257
  class: "das-calendar-cell-date"
615
- }, Ke = {
258
+ }, Ne = {
616
259
  key: 2,
617
260
  class: "das-calendar-cell-cont"
618
- }, Qe = {
261
+ }, Me = {
619
262
  name: "test"
620
- }, Xe = /* @__PURE__ */ ke({
621
- ...Qe,
263
+ }, Se = /* @__PURE__ */ q({
264
+ ...Me,
622
265
  props: {
623
266
  modelValue: {},
624
267
  range: {},
@@ -632,126 +275,126 @@ const Le = /* @__PURE__ */ De(Fe), Ve = { key: 0 }, Ze = { class: "das-calendar-
632
275
  cellHeight: { default: 0 }
633
276
  },
634
277
  emits: ["update:model-value", "itemClick"],
635
- setup(p, { expose: z, emit: D }) {
636
- P.extend(Le);
637
- const k = P.localeData().firstDayOfWeek(), u = p, d = D, w = X(), $ = X(), N = X(), O = L(() => u.firstDayOfWeek || k), B = X(), l = P(), y = L({
278
+ setup(o, { expose: h, emit: d }) {
279
+ z.extend(le);
280
+ const c = z.localeData().firstDayOfWeek(), r = o, s = d, m = O(), N = O(), H = O(), b = g(() => r.firstDayOfWeek || c), S = O(), J = z(), D = g({
638
281
  get() {
639
- return u.modelValue ? (B.value = H.value, H.value) : B.value;
282
+ return r.modelValue ? (S.value = v.value, v.value) : S.value;
640
283
  },
641
- set(r) {
642
- if (!r) return;
643
- B.value = r;
644
- const M = r.toDate();
645
- u.isSwitchMonth && d("update:model-value", M);
284
+ set(t) {
285
+ if (!t) return;
286
+ S.value = t;
287
+ const u = t.toDate();
288
+ r.isSwitchMonth && s("update:model-value", u);
646
289
  }
647
- }), A = L(() => {
648
- if (u.type == "week") {
649
- if (u.range) return u.range;
650
- const M = (P(u.modelValue).day() - O.value + 7) % 7, t = 7 - (M + 1), o = [];
651
- return o.push(P(u.modelValue).subtract(M, "day").toDate()), o.push(P(u.modelValue).add(t, "day").toDate()), o;
290
+ }), A = g(() => {
291
+ if (r.type == "week") {
292
+ if (r.range) return r.range;
293
+ const u = (z(r.modelValue).day() - b.value + 7) % 7, e = 7 - (u + 1), a = [];
294
+ return a.push(z(r.modelValue).subtract(u, "day").toDate()), a.push(z(r.modelValue).add(e, "day").toDate()), a;
652
295
  } else
653
- return u.range ? u.range : void 0;
654
- }), b = L(() => {
296
+ return r.range ? r.range : void 0;
297
+ }), w = g(() => {
655
298
  if (!A.value) return [];
656
- const r = A.value.map((o) => P(o)), [M, t] = r;
657
- return u.type == "week" ? [[M, t]] : M.isAfter(t) ? [] : M.isSame(t, "month") ? pe(M, t) : M.add(1, "month").month() !== t.month() ? [] : pe(M, t);
658
- }), H = L(() => u.modelValue ? P(u.modelValue) : y.value || (b.value.length ? b.value[0][0] : l));
659
- L(() => H.value.subtract(1, "month").date(1)), L(() => H.value.add(1, "month").date(1)), L(() => H.value.subtract(1, "year").date(1)), L(() => H.value.add(1, "year").date(1)), L(() => {
660
- const r = `das-calendar-month${H.value.format("M")}`;
661
- return `${H.value.year()} ${he("das-calendar-year")} ${he(r)}`;
662
- }), ze(() => {
663
- N.value = He(() => {
664
- var r, M;
665
- Array.isArray($.value) ? (r = $.value[0]) == null || r.getHeight() : (M = $.value) == null || M.getHeight();
666
- }, w.value);
667
- }), be(() => {
668
- N.value.disconnect();
299
+ const t = A.value.map((a) => z(a)), [u, e] = t;
300
+ return r.type == "week" ? [[u, e]] : u.isAfter(e) ? [] : u.isSame(e, "month") ? K(u, e) : u.add(1, "month").month() !== e.month() ? [] : K(u, e);
301
+ }), v = g(() => r.modelValue ? z(r.modelValue) : D.value || (w.value.length ? w.value[0][0] : J));
302
+ g(() => v.value.subtract(1, "month").date(1)), g(() => v.value.add(1, "month").date(1)), g(() => v.value.subtract(1, "year").date(1)), g(() => v.value.add(1, "year").date(1)), g(() => {
303
+ const t = `das-calendar-month${v.value.format("M")}`;
304
+ return `${v.value.year()} ${j("das-calendar-year")} ${j(t)}`;
305
+ }), te(() => {
306
+ H.value = oe(() => {
307
+ var t, u;
308
+ Array.isArray(N.value) ? (t = N.value[0]) == null || t.getHeight() : (u = N.value) == null || u.getHeight();
309
+ }, m.value);
310
+ }), ae(() => {
311
+ H.value.disconnect();
669
312
  });
670
- const V = (r) => {
671
- u.isSwitchSelection && (y.value = r), d("itemClick", r.toDate());
313
+ const Y = (t) => {
314
+ r.isSwitchSelection && (D.value = t), s("itemClick", t.toDate());
672
315
  };
673
- return z({
674
- $calendar: w,
675
- setActive: (r) => {
676
- y.value = P(r), d("itemClick", r);
316
+ return h({
317
+ $calendar: m,
318
+ setActive: (t) => {
319
+ D.value = z(t), s("itemClick", t);
677
320
  }
678
- }), (r, M) => (Y(), j("div", {
321
+ }), (t, u) => (i(), y("div", {
679
322
  ref_key: "$calendar",
680
- ref: w,
323
+ ref: m,
681
324
  class: "das-ui-calendar"
682
325
  }, [
683
- b.value.length === 0 ? (Y(), j("div", Je, [
684
- Ne(ge, {
326
+ w.value.length === 0 ? (i(), y("div", De, [
327
+ ne(U, {
685
328
  ref_key: "$calendarTable",
686
- ref: $,
687
- date: H.value,
688
- firstDayOfWeek: O.value,
689
- parent: w.value,
690
- calendartType: r.type,
691
- highlightWeek: r.highlightWeek,
692
- highlightDay: r.highlightDay,
693
- showZhou: r.showZhou,
694
- cellHeight: r.cellHeight,
695
- "selected-day": B.value,
696
- onPick: V
697
- }, me({
698
- "date-cell": oe((t) => [
699
- r.$slots.custom ? I(r.$slots, "custom", ie(le({ key: 0 }, t))) : R("", !0),
700
- r.type != "week" && !r.$slots.custom ? (Y(), j("p", Ee, [
701
- G("span", null, de(Number(t.data.day.split("-").slice(2)).toString()), 1),
702
- I(r.$slots, "date-type", ie(fe(t)))
703
- ])) : R("", !0),
704
- r.$slots.custom ? R("", !0) : (Y(), j("div", Ue, [
705
- I(r.$slots, "date-cell", ie(fe(t)))
329
+ ref: N,
330
+ date: v.value,
331
+ firstDayOfWeek: b.value,
332
+ parent: m.value,
333
+ calendartType: t.type,
334
+ highlightWeek: t.highlightWeek,
335
+ highlightDay: t.highlightDay,
336
+ showZhou: t.showZhou,
337
+ cellHeight: t.cellHeight,
338
+ "selected-day": S.value,
339
+ onPick: Y
340
+ }, x({
341
+ "date-cell": _((e) => [
342
+ t.$slots.custom ? M(t.$slots, "custom", R(V({ key: 0 }, e))) : C("", !0),
343
+ t.type != "week" && !t.$slots.custom ? (i(), y("p", ve, [
344
+ W("span", null, Z(Number(e.data.day.split("-").slice(2)).toString()), 1),
345
+ M(t.$slots, "date-type", R(L(e)))
346
+ ])) : C("", !0),
347
+ t.$slots.custom ? C("", !0) : (i(), y("div", we, [
348
+ M(t.$slots, "date-cell", R(L(e)))
706
349
  ]))
707
350
  ]),
708
351
  _: 2
709
352
  }, [
710
- r.$slots["week-type"] && r.type == "week" ? {
353
+ t.$slots["week-type"] && t.type == "week" ? {
711
354
  name: "week-type",
712
- fn: oe((t) => [
713
- I(r.$slots, "week-type", ie(fe(t)))
355
+ fn: _((e) => [
356
+ M(t.$slots, "week-type", R(L(e)))
714
357
  ]),
715
358
  key: "0"
716
359
  } : void 0
717
360
  ]), 1032, ["date", "firstDayOfWeek", "parent", "calendartType", "highlightWeek", "highlightDay", "showZhou", "cellHeight", "selected-day"])
718
- ])) : (Y(), j("div", qe, [
719
- (Y(!0), j(ue, null, ce(b.value, (t, o) => (Y(), Oe(ge, {
361
+ ])) : (i(), y("div", ze, [
362
+ (i(!0), y(F, null, P(w.value, (e, a) => (i(), se(U, {
720
363
  ref_for: !0,
721
364
  ref_key: "$calendarTable",
722
- ref: $,
723
- key: o,
724
- firstDayOfWeek: O.value,
725
- date: t[0],
726
- calendartType: r.type,
727
- highlightWeek: r.highlightWeek,
728
- highlightDay: r.highlightDay,
729
- showZhou: r.showZhou,
730
- cellHeight: r.cellHeight,
731
- "selected-day": B.value,
732
- range: t,
733
- parent: w.value,
734
- "hide-header": o !== 0,
735
- onPick: V
736
- }, me({
737
- "date-cell": oe((i) => [
738
- r.$slots.custom ? I(r.$slots, "custom", le({
365
+ ref: N,
366
+ key: a,
367
+ firstDayOfWeek: b.value,
368
+ date: e[0],
369
+ calendartType: t.type,
370
+ highlightWeek: t.highlightWeek,
371
+ highlightDay: t.highlightDay,
372
+ showZhou: t.showZhou,
373
+ cellHeight: t.cellHeight,
374
+ "selected-day": S.value,
375
+ range: e,
376
+ parent: m.value,
377
+ "hide-header": a !== 0,
378
+ onPick: Y
379
+ }, x({
380
+ "date-cell": _((n) => [
381
+ t.$slots.custom ? M(t.$slots, "custom", V({
739
382
  key: 0,
740
383
  ref_for: !0
741
- }, i)) : R("", !0),
742
- r.type != "week" && !r.$slots.custom ? (Y(), j("p", Ge, [
743
- G("span", null, de(Number(i.data.day.split("-").slice(2)).toString()), 1)
744
- ])) : R("", !0),
745
- r.$slots.custom ? R("", !0) : (Y(), j("div", Ke, [
746
- I(r.$slots, "date-cell", le({ ref_for: !0 }, i))
384
+ }, n)) : C("", !0),
385
+ t.type != "week" && !t.$slots.custom ? (i(), y("p", Ce, [
386
+ W("span", null, Z(Number(n.data.day.split("-").slice(2)).toString()), 1)
387
+ ])) : C("", !0),
388
+ t.$slots.custom ? C("", !0) : (i(), y("div", Ne, [
389
+ M(t.$slots, "date-cell", V({ ref_for: !0 }, n))
747
390
  ]))
748
391
  ]),
749
392
  _: 2
750
393
  }, [
751
- r.$slots["week-type"] && r.type == "week" ? {
394
+ t.$slots["week-type"] && t.type == "week" ? {
752
395
  name: "week-type",
753
- fn: oe((i) => [
754
- I(r.$slots, "week-type", le({ ref_for: !0 }, i))
396
+ fn: _((n) => [
397
+ M(t.$slots, "week-type", V({ ref_for: !0 }, n))
755
398
  ]),
756
399
  key: "0"
757
400
  } : void 0
@@ -759,7 +402,7 @@ const Le = /* @__PURE__ */ De(Fe), Ve = { key: 0 }, Ze = { class: "das-calendar-
759
402
  ]))
760
403
  ], 512));
761
404
  }
762
- }), et = {
405
+ }), $e = {
763
406
  "--das-ui-calendar-color-primary": "#5582F3",
764
407
  // 主题色
765
408
  "--das-ui-calendar-color-text": "#212121",
@@ -778,7 +421,7 @@ const Le = /* @__PURE__ */ De(Fe), Ve = { key: 0 }, Ze = { class: "das-calendar-
778
421
  // 上/下一个月文字颜色
779
422
  // '--das-ui-calendar-head-height': '60px', // 日历表头高度
780
423
  // '--das-ui-calendar-cell-height': '128px', // 单元格高度
781
- }, tt = {
424
+ }, be = {
782
425
  "das-calendar-prevMonth": { "zh-CN": "上个月", en: "Previous Month" },
783
426
  "das-calendar-nextMonth": { "zh-CN": "下个月", en: "Next Month" },
784
427
  "das-calendar-prevYear": { "zh-CN": "前一年", en: "Previous Year" },
@@ -824,10 +467,10 @@ const Le = /* @__PURE__ */ De(Fe), Ve = { key: 0 }, Ze = { class: "das-calendar-
824
467
  "das-calendar-months-nov": { "zh-CN": "十一月", en: "Nov" },
825
468
  "das-calendar-months-dec": { "zh-CN": "十二月", en: "Dec" }
826
469
  };
827
- We(tt);
828
- _e(et);
829
- const it = Me(Xe), lt = { name: "calendar 日历" };
470
+ re(be);
471
+ de($e);
472
+ const Re = Q(Se), Ve = { name: "calendar 日历" };
830
473
  export {
831
- it as DasCalendar,
832
- lt as default
474
+ Re as DasCalendar,
475
+ Ve as default
833
476
  };