@das-fed/ui 6.4.0-hot.7 → 6.4.0-hot.8

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 (73) hide show
  1. package/esm-map.json +7 -4
  2. package/package.json +5 -6
  3. package/packages/business-components/change-pwd/src/hooks/use-changePwd.d.ts +16 -1
  4. package/packages/business-components/device-panel/index.js +22265 -16373
  5. package/packages/business-components/device-panel/index.js.gz +0 -0
  6. package/packages/business-components/device-panel/src/components/drag-resize/index.vue.d.ts +129 -0
  7. package/packages/business-components/device-panel/src/components/drag-resize/type.d.ts +83 -0
  8. package/packages/business-components/device-panel/style.css +1 -1
  9. package/packages/business-components/device-panel/style.css.gz +0 -0
  10. package/packages/business-components/echarts/index.d.ts +199 -0
  11. package/packages/business-components/echarts/index.js +6959 -6863
  12. package/packages/business-components/echarts/index.js.gz +0 -0
  13. package/packages/business-components/echarts/src/Index.vue.d.ts +24 -0
  14. package/packages/business-components/echarts/src/type.d.ts +19 -0
  15. package/packages/business-components/echarts/style.css +1 -0
  16. package/packages/business-components/import-button/hooks/file.d.ts +1 -1
  17. package/packages/business-components/import-button/index.d.ts +3 -0
  18. package/packages/business-components/import-button/index.js +33 -32
  19. package/packages/business-components/import-button/index.js.gz +0 -0
  20. package/packages/business-components/import-button/src/App.vue.d.ts +1 -0
  21. package/packages/business-components/import-button/style.css +1 -1
  22. package/packages/business-components/model-table-dialog/index.js +156 -135
  23. package/packages/business-components/model-table-dialog/index.js.gz +0 -0
  24. package/packages/business-components/model-table-dialog/style.css +1 -1
  25. package/packages/business-components/model-table-dialog/style.css.gz +0 -0
  26. package/packages/business-components/process-form/App.vue.d.ts +6 -0
  27. package/packages/business-components/process-form/api-service/formPreView.d.ts +16 -0
  28. package/packages/business-components/process-form/apis.d.ts +4 -0
  29. package/packages/business-components/process-form/index.d.ts +12 -0
  30. package/packages/business-components/process-form/index.js +1414 -1000
  31. package/packages/business-components/process-form/index.js.gz +0 -0
  32. package/packages/business-components/process-form/src/hooks/useForm.d.ts +16 -1
  33. package/packages/business-components/process-form/src/hooks/useSelector.d.ts +3 -1
  34. package/packages/business-components/process-form/src/widgets/base/radio.vue.d.ts +6 -2
  35. package/packages/business-components/process-form/src/widgets/store.d.ts +2 -0
  36. package/packages/business-components/process-form/style.css +1 -1
  37. package/packages/business-components/process-form/type.d.ts +2 -0
  38. package/packages/business-components/urgent-panel/index.d.ts +2 -1
  39. package/packages/business-components/urgent-panel/index.js +1505 -1586
  40. package/packages/business-components/urgent-panel/index.js.gz +0 -0
  41. package/packages/business-components/urgent-panel/src/components/drag-resize/index.vue.d.ts +129 -0
  42. package/packages/business-components/urgent-panel/src/components/drag-resize/type.d.ts +83 -0
  43. package/packages/business-components/urgent-panel/style.css +1 -1
  44. package/packages/business-components/urgent-panel/style.css.gz +0 -0
  45. package/packages/components/calendar/index.js +219 -220
  46. package/packages/components/calendar/index.js.gz +0 -0
  47. package/packages/components/form/index.d.ts +35 -1
  48. package/packages/components/form/index.js +76 -40
  49. package/packages/components/form/index.js.gz +0 -0
  50. package/packages/components/form/src/Index.vue.d.ts +3 -0
  51. package/packages/components/form/src/type.d.ts +3 -0
  52. package/packages/components/form/src/utils/flat-form-item.d.ts +1 -0
  53. package/packages/components/form/style.css +1 -1
  54. package/packages/components/image-viewer/index.js +362 -329
  55. package/packages/components/image-viewer/index.js.gz +0 -0
  56. package/packages/components/image-viewer/src/hooks/use-handler-url-name.d.ts +3 -0
  57. package/packages/components/image-viewer/src/hooks/use-imageViewer.d.ts +4 -2
  58. package/packages/components/image-viewer/style.css +1 -1
  59. package/packages/components/image-viewer/style.css.gz +0 -0
  60. package/packages/components/menu-aside/index.d.ts +1 -0
  61. package/packages/components/menu-aside/index.js +55 -52
  62. package/packages/components/menu-aside/index.js.gz +0 -0
  63. package/packages/components/menu-aside/src/Index.vue.d.ts +1 -0
  64. package/packages/components/menu-aside/style.css +1 -1
  65. package/packages/components/menu-aside/style.css.gz +0 -0
  66. package/packages/components/table/index.d.ts +35 -1
  67. package/packages/components/table/index.js +575 -571
  68. package/packages/components/table/index.js.gz +0 -0
  69. package/packages/components/table/src/Table.vue.d.ts +3 -0
  70. package/packages/components/table/src/type.d.ts +3 -0
  71. package/packages/components/table/style.css +1 -1
  72. package/packages/components/table/style.css.gz +0 -0
  73. package/packages/components/table/theme/index.d.ts +2 -0
@@ -1,43 +1,43 @@
1
1
  import '@das-fed/ui/packages/components/calendar/style.css';
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";
2
+ import { withInstall as X } from "@das-fed/utils/with-install/index";
3
+ import { defineComponent as G, ref as H, computed as D, watch as ee, nextTick as x, openBlock as u, createElementBlock as m, normalizeClass as A, Fragment as P, renderList as Z, createElementVNode as b, toDisplayString as j, renderSlot as M, createCommentVNode as C, normalizeStyle as te, onMounted as ae, onBeforeUnmount as ne, createVNode as se, createSlots as K, withCtx as R, normalizeProps as V, mergeProps as F, guardReactiveProps as E, createBlock as re } from "vue";
4
+ import { t as J, setI18nRule as le } from "@das-fed/web/packages/i18n/index";
5
5
  import z from "dayjs";
6
- import le from "dayjs/plugin/localeData";
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;
6
+ import oe from "dayjs/plugin/localeData";
7
+ import { SizeWatcher as de } from "@das-fed/utils/size-watcher";
8
+ import { setThemeRule as ce } from "@das-fed/web/packages/theme/index";
9
+ const he = (l, i) => {
10
+ const o = l.endOf("month"), c = i.startOf("month"), n = o.isSame(c, "week") ? c.add(1, "week") : c;
11
11
  return [
12
- [o, d],
13
- [s.startOf("week"), h]
12
+ [l, o],
13
+ [n.startOf("week"), i]
14
14
  ];
15
- }, he = (o, h) => {
16
- const d = o.endOf("month"), c = o.add(1, "month").startOf("month"), r = d.isSame(
15
+ }, ie = (l, i) => {
16
+ const o = l.endOf("month"), c = l.add(1, "month").startOf("month"), r = o.isSame(
17
17
  c,
18
18
  "week"
19
- ) ? c.add(1, "week") : c, s = r.endOf("month"), m = h.startOf("month"), N = s.isSame(m, "week") ? m.add(1, "week") : m;
19
+ ) ? c.add(1, "week") : c, n = r.endOf("month"), p = i.startOf("month"), N = n.isSame(p, "week") ? p.add(1, "week") : p;
20
20
  return [
21
- [o, d],
22
- [r.startOf("week"), s],
23
- [N.startOf("week"), h]
21
+ [l, o],
22
+ [r.startOf("week"), n],
23
+ [N.startOf("week"), i]
24
24
  ];
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 = {
25
+ }, U = (l, i) => {
26
+ const o = l.startOf("week"), c = i.endOf("week"), r = o.get("month"), n = c.get("month");
27
+ return r === n ? [[o, c]] : (r + 1) % 12 === n ? he(o, c) : r + 2 === n || (r + 1) % 11 === n ? ie(o, c) : [];
28
+ }, $ = (l) => Array.from(Array.from({ length: l }).keys()), ue = (l, i) => {
29
+ const o = l.subtract(1, "month").endOf("month").date();
30
+ return $(i).map((c, r) => o - (i - r - 1));
31
+ }, ye = (l) => {
32
+ const i = l.daysInMonth();
33
+ return $(i).map((o, c) => c + 1);
34
+ }, me = (l) => $(l.length / 7).map((i) => {
35
+ const o = i * 7;
36
+ return l.slice(o, o + 7);
37
+ }), pe = { key: 0 }, fe = { class: "das-calendar-header-box" }, ge = { class: "das-calendar-header-week-line" }, ke = ["onClick"], De = {
38
38
  name: "calendar-table"
39
- }, U = /* @__PURE__ */ q({
40
- ...ke,
39
+ }, q = /* @__PURE__ */ G({
40
+ ...De,
41
41
  props: {
42
42
  selectedDay: {},
43
43
  date: {},
@@ -52,118 +52,117 @@ const ce = (o, h) => {
52
52
  cellHeight: {}
53
53
  },
54
54
  emits: ["pick"],
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(() => {
55
+ setup(l, { expose: i, emit: o }) {
56
+ const c = o, r = z(), n = l, p = H("128px"), N = H(), Y = 60, W = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"], S = D(() => !!n.range && !!n.range.length), L = D(() => {
57
+ const e = n.firstDayOfWeek, a = n.showZhou ? "das-calendar-weeks-zhou-" : "das-calendar-weeks-";
58
+ return e === 0 ? W.map((s) => J(`${a}${s}`)) : W.slice(e).concat(W.slice(0, e)).map((s) => J(`${a}${s}`));
59
+ }), w = D(() => {
60
60
  let e = [];
61
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,
62
+ const [a, s] = n.range;
63
+ let h = [];
64
+ a.isSame(s, "month") ? h = $(s.date() - a.date() + 1).map((v) => ({
65
+ text: a.date() + v,
66
66
  type: "current"
67
- })) : l = $(a.endOf("month").date() - a.date() + 1).map((k) => ({
68
- text: a.date() + k,
67
+ })) : h = $(a.endOf("month").date() - a.date() + 1).map((v) => ({
68
+ text: a.date() + v,
69
69
  type: "current"
70
70
  }));
71
- let p = l.length % 7;
72
- p = p === 0 ? 0 : 7 - p;
73
- const f = $(p).map((k, T) => ({
74
- text: T + 1,
71
+ let g = h.length % 7;
72
+ g = g === 0 ? 0 : 7 - g;
73
+ const k = $(g).map((v, B) => ({
74
+ text: B + 1,
75
75
  type: "next"
76
76
  }));
77
- e = l.concat(f);
77
+ e = h.concat(k);
78
78
  } else {
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,
79
+ const a = n.date.startOf("month").day(), s = ue(
80
+ n.date,
81
+ (a - n.firstDayOfWeek + 7) % 7
82
+ ).map((v) => ({
83
+ text: v,
84
84
  type: "prev"
85
- })), l = ue(s.date).map((k) => ({
86
- text: k,
85
+ })), h = ye(n.date).map((v) => ({
86
+ text: v,
87
87
  type: "current"
88
88
  }));
89
- e = [...n, ...l];
90
- const p = 7 - (e.length % 7 || 7), f = $(p).map((k, T) => ({
91
- text: T + 1,
89
+ e = [...s, ...h];
90
+ const g = 7 - (e.length % 7 || 7), k = $(g).map((v, B) => ({
91
+ text: B + 1,
92
92
  type: "next"
93
93
  }));
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,
94
+ if (e = e.concat(k), n.calendartType == "simple" && e.length / 7 < 6) {
95
+ const v = k.length ? k[k.length - 1].text : 0, B = $(7).map((Oe, Q) => ({
96
+ text: v + Q + 1,
97
97
  type: "next"
98
98
  }));
99
- e = e.concat(T);
99
+ e = e.concat(B);
100
100
  }
101
101
  }
102
- return ye(e);
103
- });
104
- X(
105
- () => D.value,
102
+ return me(e);
103
+ }), T = () => {
104
+ var s;
105
+ const e = (s = n.parent) == null ? void 0 : s.offsetHeight;
106
+ let a = Number(e) - Y - 1;
107
+ p.value = a / w.value.length - 1 + "px";
108
+ };
109
+ ee(
110
+ () => w.value,
106
111
  (e) => {
107
- if (s.cellHeight) {
108
- m.value = `${s.cellHeight}px`;
112
+ if (n.cellHeight) {
113
+ p.value = `${n.cellHeight}px`;
109
114
  return;
110
115
  }
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";
116
+ e && e.length ? x(() => {
117
+ T();
118
+ }) : p.value = "128px";
117
119
  },
118
120
  { immediate: !0 }
119
121
  );
120
- const A = () => {
121
- if (s.cellHeight) {
122
- m.value = `${s.cellHeight}px`;
122
+ const O = () => {
123
+ if (n.cellHeight) {
124
+ p.value = `${n.cellHeight}px`;
123
125
  return;
124
126
  }
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";
127
+ x(() => {
128
+ T();
130
129
  });
131
- }, w = (e, a) => {
130
+ }, f = (e, a) => {
132
131
  switch (a) {
133
132
  case "prev":
134
- return s.date.startOf("month").subtract(1, "month").date(e);
133
+ return n.date.startOf("month").subtract(1, "month").date(e);
135
134
  case "next":
136
- return s.date.startOf("month").add(1, "month").date(e);
135
+ return n.date.startOf("month").add(1, "month").date(e);
137
136
  case "current":
138
- return s.date.date(e);
137
+ return n.date.date(e);
139
138
  }
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];
139
+ }, _ = ({ text: e, type: a }) => {
140
+ const s = [a], h = f(e, a);
141
+ return h.isSame(n.selectedDay, "day") && s.push("is-selected"), h.isSame(r, "day") && s.push("is-today"), s;
142
+ }, I = ({ text: e, type: a }) => {
143
+ const s = f(e, a);
144
+ c("pick", s);
145
+ }, t = (e) => {
146
+ const a = w.value[0];
148
147
  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");
148
+ const s = a[e];
149
+ if (s) {
150
+ const { text: h, type: g } = s;
151
+ return f(h, g).format("MM/DD");
153
152
  }
154
153
  }
155
154
  return "";
156
- }, t = (e) => {
157
- const a = D.value[0];
155
+ }, y = (e) => {
156
+ const a = w.value[0];
158
157
  if (a) {
159
- const n = a[e];
160
- if (n) {
161
- const { text: l, type: p } = n, f = w(l, p);
158
+ const s = a[e];
159
+ if (s) {
160
+ const { text: h, type: g } = s, k = f(h, g);
162
161
  return {
163
- isSelected: f.isSame(s.selectedDay),
164
- type: `${p}-month`,
165
- day: f.format("YYYY-MM-DD"),
166
- date: f.toDate()
162
+ isSelected: k.isSame(n.selectedDay),
163
+ type: `${g}-month`,
164
+ day: k.format("YYYY-MM-DD"),
165
+ date: k.toDate()
167
166
  };
168
167
  }
169
168
  }
@@ -173,95 +172,95 @@ const ce = (o, h) => {
173
172
  day: null,
174
173
  date: null
175
174
  };
176
- }, u = ({ text: e, type: a }) => {
177
- const n = w(e, a);
175
+ }, d = ({ text: e, type: a }) => {
176
+ const s = f(e, a);
178
177
  return {
179
- isSelected: n.isSame(s.selectedDay),
178
+ isSelected: s.isSame(n.selectedDay),
180
179
  type: `${a}-month`,
181
- day: n.format("YYYY-MM-DD"),
182
- date: n.toDate()
180
+ day: s.format("YYYY-MM-DD"),
181
+ date: s.toDate()
183
182
  };
184
183
  };
185
- return h({
186
- getHeight: A
187
- }), (e, a) => D.value.length ? (i(), y("table", {
184
+ return i({
185
+ getHeight: O
186
+ }), (e, a) => w.value.length ? (u(), m("table", {
188
187
  key: 0,
189
- class: B(["das-calendar-table", { "is-range": S.value, "is-week": e.calendartType == "week", simple: e.calendartType == "simple" }]),
188
+ class: A(["das-calendar-table", { "is-range": S.value, "is-week": e.calendartType == "week", simple: e.calendartType == "simple" }]),
190
189
  cellspacing: "0",
191
190
  cellpadding: "0",
192
191
  ref_key: "tableRef",
193
192
  ref: N
194
193
  }, [
195
- e.hideHeader ? C("", !0) : (i(), y("thead", me, [
196
- (i(!0), y(F, null, P(J.value, (n, l) => (i(), y("th", {
194
+ e.hideHeader ? C("", !0) : (u(), m("thead", pe, [
195
+ (u(!0), m(P, null, Z(L.value, (s, h) => (u(), m("th", {
197
196
  class: "das-calendar-table-header",
198
- key: n
197
+ key: s
199
198
  }, [
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),
199
+ b("div", fe, [
200
+ b("div", ge, [
201
+ b("div", {
202
+ class: A(["das-calendar-header-week", { highlight: e.highlightWeek }])
203
+ }, j(s), 3),
205
204
  e.calendartType == "week" ? M(e.$slots, "week-type", {
206
205
  key: 0,
207
- data: t(l)
206
+ data: y(h)
208
207
  }) : C("", !0)
209
208
  ]),
210
- e.calendartType == "week" ? (i(), y("div", {
209
+ e.calendartType == "week" ? (u(), m("div", {
211
210
  key: 0,
212
- class: B(["das-calendar-header-day", { highlight: e.highlightDay }])
213
- }, Z(E(l)), 3)) : C("", !0)
211
+ class: A(["das-calendar-header-day", { highlight: e.highlightDay }])
212
+ }, j(t(h)), 3)) : C("", !0)
214
213
  ])
215
214
  ]))), 128))
216
215
  ])),
217
- W("tbody", null, [
218
- (i(!0), y(F, null, P(D.value, (n, l) => (i(), y("tr", {
219
- key: l,
220
- class: B({
216
+ b("tbody", null, [
217
+ (u(!0), m(P, null, Z(w.value, (s, h) => (u(), m("tr", {
218
+ key: h,
219
+ class: A({
221
220
  "das-calendar-table-row": !0,
222
- "hide-border": l === 0 && e.hideHeader
221
+ "hide-border": h === 0 && e.hideHeader
223
222
  })
224
223
  }, [
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)
224
+ (u(!0), m(P, null, Z(s, (g, k) => (u(), m("td", {
225
+ key: k,
226
+ class: A(_(g)),
227
+ onClick: (v) => I(g)
229
228
  }, [
230
- W("div", {
229
+ b("div", {
231
230
  class: "das-calendar-day",
232
- style: ee({ height: m.value })
231
+ style: te({ height: p.value })
233
232
  }, [
234
233
  M(e.$slots, "date-cell", {
235
- data: u(p)
234
+ data: d(g)
236
235
  })
237
236
  ], 4)
238
- ], 10, ge))), 128))
237
+ ], 10, ke))), 128))
239
238
  ], 2))), 128))
240
239
  ])
241
240
  ], 2)) : C("", !0);
242
241
  }
243
- }), De = {
242
+ }), ve = {
244
243
  key: 0,
245
244
  class: "das-calendar-body 1"
246
- }, ve = {
245
+ }, we = {
247
246
  key: 1,
248
247
  class: "das-calendar-cell-date"
249
- }, we = {
248
+ }, ze = {
250
249
  key: 2,
251
250
  class: "das-calendar-cell-cont"
252
- }, ze = {
251
+ }, Ce = {
253
252
  key: 1,
254
253
  class: "das-calendar-body 2"
255
- }, Ce = {
254
+ }, Ne = {
256
255
  key: 1,
257
256
  class: "das-calendar-cell-date"
258
- }, Ne = {
257
+ }, Me = {
259
258
  key: 2,
260
259
  class: "das-calendar-cell-cont"
261
- }, Me = {
260
+ }, Se = {
262
261
  name: "test"
263
- }, Se = /* @__PURE__ */ q({
264
- ...Me,
262
+ }, $e = /* @__PURE__ */ G({
263
+ ...Se,
265
264
  props: {
266
265
  modelValue: {},
267
266
  range: {},
@@ -275,126 +274,126 @@ const ce = (o, h) => {
275
274
  cellHeight: { default: 0 }
276
275
  },
277
276
  emits: ["update:model-value", "itemClick"],
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({
277
+ setup(l, { expose: i, emit: o }) {
278
+ z.extend(oe);
279
+ const c = z.localeData().firstDayOfWeek(), r = l, n = o, p = H(), N = H(), Y = H(), W = D(() => r.firstDayOfWeek || c), S = H(), L = z(), w = D({
281
280
  get() {
282
- return r.modelValue ? (S.value = v.value, v.value) : S.value;
281
+ return r.modelValue ? (S.value = f.value, f.value) : S.value;
283
282
  },
284
283
  set(t) {
285
284
  if (!t) return;
286
285
  S.value = t;
287
- const u = t.toDate();
288
- r.isSwitchMonth && s("update:model-value", u);
286
+ const y = t.toDate();
287
+ r.isSwitchMonth && n("update:model-value", y);
289
288
  }
290
- }), A = g(() => {
289
+ }), T = D(() => {
291
290
  if (r.type == "week") {
292
291
  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;
292
+ const y = (z(r.modelValue).day() - W.value + 7) % 7, d = 7 - (y + 1), e = [];
293
+ return e.push(z(r.modelValue).subtract(y, "day").toDate()), e.push(z(r.modelValue).add(d, "day").toDate()), e;
295
294
  } else
296
295
  return r.range ? r.range : void 0;
297
- }), w = g(() => {
298
- if (!A.value) return [];
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);
296
+ }), O = D(() => {
297
+ if (!T.value) return [];
298
+ const t = T.value.map((e) => z(e)), [y, d] = t;
299
+ return r.type == "week" ? [[y, d]] : y.isAfter(d) ? [] : y.isSame(d, "month") ? U(y, d) : y.add(1, "month").month() !== d.month() ? [] : U(y, d);
300
+ }), f = D(() => r.modelValue ? z(r.modelValue) : w.value || (O.value.length ? O.value[0][0] : L));
301
+ D(() => f.value.subtract(1, "month").date(1)), D(() => f.value.add(1, "month").date(1)), D(() => f.value.subtract(1, "year").date(1)), D(() => f.value.add(1, "year").date(1)), D(() => {
302
+ const t = `das-calendar-month${f.value.format("M")}`;
303
+ return `${f.value.year()} ${J("das-calendar-year")} ${J(t)}`;
310
304
  }), ae(() => {
311
- H.value.disconnect();
305
+ Y.value = de(() => {
306
+ var t, y;
307
+ Array.isArray(N.value) ? (t = N.value[0]) == null || t.getHeight() : (y = N.value) == null || y.getHeight();
308
+ }, p.value);
309
+ }), ne(() => {
310
+ Y.value.disconnect();
312
311
  });
313
- const Y = (t) => {
314
- r.isSwitchSelection && (D.value = t), s("itemClick", t.toDate());
312
+ const _ = (t) => {
313
+ r.isSwitchSelection && (w.value = t), n("itemClick", t.toDate());
315
314
  };
316
- return h({
317
- $calendar: m,
315
+ return i({
316
+ $calendar: p,
318
317
  setActive: (t) => {
319
- D.value = z(t), s("itemClick", t);
318
+ w.value = z(t), n("itemClick", t);
320
319
  }
321
- }), (t, u) => (i(), y("div", {
320
+ }), (t, y) => (u(), m("div", {
322
321
  ref_key: "$calendar",
323
- ref: m,
322
+ ref: p,
324
323
  class: "das-ui-calendar"
325
324
  }, [
326
- w.value.length === 0 ? (i(), y("div", De, [
327
- ne(U, {
325
+ O.value.length === 0 ? (u(), m("div", ve, [
326
+ se(q, {
328
327
  ref_key: "$calendarTable",
329
328
  ref: N,
330
- date: v.value,
331
- firstDayOfWeek: b.value,
332
- parent: m.value,
329
+ date: f.value,
330
+ firstDayOfWeek: W.value,
331
+ parent: p.value,
333
332
  calendartType: t.type,
334
333
  highlightWeek: t.highlightWeek,
335
334
  highlightDay: t.highlightDay,
336
335
  showZhou: t.showZhou,
337
336
  cellHeight: t.cellHeight,
338
337
  "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)))
338
+ onPick: _
339
+ }, K({
340
+ "date-cell": R((d) => [
341
+ t.$slots.custom ? M(t.$slots, "custom", V(F({ key: 0 }, d))) : C("", !0),
342
+ t.type != "week" && !t.$slots.custom ? (u(), m("p", we, [
343
+ b("span", null, j(Number(d.data.day.split("-").slice(2)).toString()), 1),
344
+ M(t.$slots, "date-type", V(E(d)))
346
345
  ])) : C("", !0),
347
- t.$slots.custom ? C("", !0) : (i(), y("div", we, [
348
- M(t.$slots, "date-cell", R(L(e)))
346
+ t.$slots.custom ? C("", !0) : (u(), m("div", ze, [
347
+ M(t.$slots, "date-cell", V(E(d)))
349
348
  ]))
350
349
  ]),
351
350
  _: 2
352
351
  }, [
353
352
  t.$slots["week-type"] && t.type == "week" ? {
354
353
  name: "week-type",
355
- fn: _((e) => [
356
- M(t.$slots, "week-type", R(L(e)))
354
+ fn: R((d) => [
355
+ M(t.$slots, "week-type", V(E(d)))
357
356
  ]),
358
357
  key: "0"
359
358
  } : void 0
360
359
  ]), 1032, ["date", "firstDayOfWeek", "parent", "calendartType", "highlightWeek", "highlightDay", "showZhou", "cellHeight", "selected-day"])
361
- ])) : (i(), y("div", ze, [
362
- (i(!0), y(F, null, P(w.value, (e, a) => (i(), se(U, {
360
+ ])) : (u(), m("div", Ce, [
361
+ (u(!0), m(P, null, Z(O.value, (d, e) => (u(), re(q, {
363
362
  ref_for: !0,
364
363
  ref_key: "$calendarTable",
365
364
  ref: N,
366
- key: a,
367
- firstDayOfWeek: b.value,
368
- date: e[0],
365
+ key: e,
366
+ firstDayOfWeek: W.value,
367
+ date: d[0],
369
368
  calendartType: t.type,
370
369
  highlightWeek: t.highlightWeek,
371
370
  highlightDay: t.highlightDay,
372
371
  showZhou: t.showZhou,
373
372
  cellHeight: t.cellHeight,
374
373
  "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({
374
+ range: d,
375
+ parent: p.value,
376
+ "hide-header": e !== 0,
377
+ onPick: _
378
+ }, K({
379
+ "date-cell": R((a) => [
380
+ t.$slots.custom ? M(t.$slots, "custom", F({
382
381
  key: 0,
383
382
  ref_for: !0
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)
383
+ }, a)) : C("", !0),
384
+ t.type != "week" && !t.$slots.custom ? (u(), m("p", Ne, [
385
+ b("span", null, j(Number(a.data.day.split("-").slice(2)).toString()), 1)
387
386
  ])) : C("", !0),
388
- t.$slots.custom ? C("", !0) : (i(), y("div", Ne, [
389
- M(t.$slots, "date-cell", V({ ref_for: !0 }, n))
387
+ t.$slots.custom ? C("", !0) : (u(), m("div", Me, [
388
+ M(t.$slots, "date-cell", F({ ref_for: !0 }, a))
390
389
  ]))
391
390
  ]),
392
391
  _: 2
393
392
  }, [
394
393
  t.$slots["week-type"] && t.type == "week" ? {
395
394
  name: "week-type",
396
- fn: _((n) => [
397
- M(t.$slots, "week-type", V({ ref_for: !0 }, n))
395
+ fn: R((a) => [
396
+ M(t.$slots, "week-type", F({ ref_for: !0 }, a))
398
397
  ]),
399
398
  key: "0"
400
399
  } : void 0
@@ -402,7 +401,7 @@ const ce = (o, h) => {
402
401
  ]))
403
402
  ], 512));
404
403
  }
405
- }), $e = {
404
+ }), We = {
406
405
  "--das-ui-calendar-color-primary": "#5582F3",
407
406
  // 主题色
408
407
  "--das-ui-calendar-color-text": "#212121",
@@ -467,10 +466,10 @@ const ce = (o, h) => {
467
466
  "das-calendar-months-nov": { "zh-CN": "十一月", en: "Nov" },
468
467
  "das-calendar-months-dec": { "zh-CN": "十二月", en: "Dec" }
469
468
  };
470
- re(be);
471
- de($e);
472
- const Re = Q(Se), Ve = { name: "calendar 日历" };
469
+ le(be);
470
+ ce(We);
471
+ const Ve = X($e), Fe = { name: "calendar 日历" };
473
472
  export {
474
- Re as DasCalendar,
475
- Ve as default
473
+ Ve as DasCalendar,
474
+ Fe as default
476
475
  };