@devtable/dashboard 14.50.1 → 14.50.2

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.
@@ -2,9 +2,9 @@ import { DateRangeValue } from '../../../../model';
2
2
  type Props = {
3
3
  value: DateRangeValue;
4
4
  onChange: (v: DateRangeValue) => void;
5
- close: () => void;
5
+ onClose: () => void;
6
6
  max_days: number;
7
7
  allowSingleDateInRange: boolean;
8
8
  };
9
- export declare const Calendar: ({ value, onChange, close, max_days, allowSingleDateInRange }: Props) => import('./react/jsx-runtime').JSX.Element;
9
+ export declare const Calendar: ({ value, onChange, onClose, max_days, allowSingleDateInRange }: Props) => import('./react/jsx-runtime').JSX.Element;
10
10
  export {};
@@ -1,4 +1,7 @@
1
1
  import { DateRangeValue } from '../../../../../model';
2
- export declare const Shortcuts: ({ onChange }: {
2
+ type Props = {
3
3
  onChange: (v: DateRangeValue) => void;
4
- }) => import('./react/jsx-runtime').JSX.Element;
4
+ onClose: () => void;
5
+ };
6
+ export declare const Shortcuts: ({ onChange, onClose }: Props) => import('./react/jsx-runtime').JSX.Element;
7
+ export {};
@@ -2,7 +2,7 @@ import { DateRangeValue_Value, MericoDateRangeValue } from '../../../../../model
2
2
  type Props = {
3
3
  value: MericoDateRangeValue;
4
4
  onChange: (v: DateRangeValue_Value) => void;
5
- close: () => void;
5
+ onClose: () => void;
6
6
  };
7
- export declare const Calendar: ({ value, onChange, close }: Props) => string | import('./react/jsx-runtime').JSX.Element;
7
+ export declare const Calendar: ({ value, onChange, onClose }: Props) => string | import('./react/jsx-runtime').JSX.Element;
8
8
  export {};
@@ -2,6 +2,7 @@ import { MericoDateRangeValue } from '../../../../../model';
2
2
  type Props = {
3
3
  step: string;
4
4
  onChange: (v: MericoDateRangeValue) => void;
5
+ onClose: () => void;
5
6
  };
6
- export declare const Shortcuts: ({ onChange, step }: Props) => import('./react/jsx-runtime').JSX.Element;
7
+ export declare const Shortcuts: ({ onChange, step, onClose }: Props) => import('./react/jsx-runtime').JSX.Element;
7
8
  export {};
@@ -2504,7 +2504,7 @@ function ug() {
2504
2504
  } = E.useContext(Ps);
2505
2505
  return e ? document.getElementById(e) : null;
2506
2506
  }
2507
- const Es = "14.50.1", hg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2507
+ const Es = "14.50.2", hg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2508
2508
  __proto__: null,
2509
2509
  version: Es
2510
2510
  }, Symbol.toStringTag, { value: "Module" }));
@@ -28999,7 +28999,7 @@ const qT = (e) => new OT(e), FT = ({
28999
28999
  ] })), BT = ({
29000
29000
  value: e,
29001
29001
  onChange: t,
29002
- close: n,
29002
+ onClose: n,
29003
29003
  max_days: a,
29004
29004
  allowSingleDateInRange: i
29005
29005
  }) => {
@@ -29047,15 +29047,16 @@ const qT = (e) => new OT(e), FT = ({
29047
29047
  /* @__PURE__ */ r(A, { variant: "dashed", my: 10 })
29048
29048
  ] }) : null;
29049
29049
  }, HT = ({
29050
- onChange: e
29050
+ onChange: e,
29051
+ onClose: t
29051
29052
  }) => {
29052
29053
  const {
29053
- t,
29054
- i18n: n
29055
- } = y(), a = (l) => () => {
29056
- const s = l();
29057
- e(s);
29058
- }, i = k(() => Ld(), []), o = n.language === "zh";
29054
+ t: n,
29055
+ i18n: a
29056
+ } = y(), i = (s) => () => {
29057
+ const c = s();
29058
+ e(c), t();
29059
+ }, o = k(() => Ld(), []), l = a.language === "zh";
29059
29060
  return /* @__PURE__ */ u(F, { children: [
29060
29061
  /* @__PURE__ */ r(A, { variant: "dashed", my: 10 }),
29061
29062
  /* @__PURE__ */ r(w, { withTableBorder: !1, sx: {
@@ -29073,16 +29074,16 @@ const qT = (e) => new OT(e), FT = ({
29073
29074
  td: {
29074
29075
  paddingLeft: "1px"
29075
29076
  }
29076
- }, children: /* @__PURE__ */ r(w.Tbody, { children: Object.entries(i).map(([l, s]) => /* @__PURE__ */ u(w.Tr, { children: [
29077
+ }, children: /* @__PURE__ */ r(w.Tbody, { children: Object.entries(o).map(([s, c]) => /* @__PURE__ */ u(w.Tr, { children: [
29077
29078
  /* @__PURE__ */ r(w.Th, { children: /* @__PURE__ */ r(z, { size: "xs", c: "#555", fw: 500, sx: {
29078
29079
  textAlignLast: "justify"
29079
- }, children: t(`filter.widget.date_range.shortcut.${l}.label`) }) }),
29080
- s.map(({
29081
- key: c,
29082
- value: d,
29083
- getRange: h
29084
- }) => /* @__PURE__ */ r(w.Td, { children: /* @__PURE__ */ r(L, { size: "compact-xs", variant: "subtle", onClick: a(h), children: t(`filter.widget.date_range.shortcut.${l}.${o ? "full." : ""}${c}`) }) }, c))
29085
- ] }, l)) }) })
29080
+ }, children: n(`filter.widget.date_range.shortcut.${s}.label`) }) }),
29081
+ c.map(({
29082
+ key: d,
29083
+ value: h,
29084
+ getRange: p
29085
+ }) => /* @__PURE__ */ r(w.Td, { children: /* @__PURE__ */ r(L, { size: "compact-xs", variant: "subtle", onClick: i(p), children: n(`filter.widget.date_range.shortcut.${s}.${l ? "full." : ""}${d}`) }) }, d))
29086
+ ] }, s)) }) })
29086
29087
  ] });
29087
29088
  }, rl = (e) => ({
29088
29089
  label: {
@@ -29158,8 +29159,8 @@ const qT = (e) => new OT(e), FT = ({
29158
29159
  ] }),
29159
29160
  /* @__PURE__ */ u(Ye.Dropdown, { p: "sm", children: [
29160
29161
  /* @__PURE__ */ r(QT, { max_days: i }),
29161
- /* @__PURE__ */ r(BT, { value: n, onChange: a, close: p, allowSingleDateInRange: o, max_days: i }),
29162
- /* @__PURE__ */ r(HT, { onChange: a })
29162
+ /* @__PURE__ */ r(BT, { value: n, onChange: a, onClose: p, allowSingleDateInRange: o, max_days: i }),
29163
+ /* @__PURE__ */ r(HT, { onChange: a, onClose: p })
29163
29164
  ] })
29164
29165
  ] });
29165
29166
  }, yu = {
@@ -29713,7 +29714,7 @@ const lD = (e, t, n) => {
29713
29714
  }, gD = ({
29714
29715
  value: e,
29715
29716
  onChange: t,
29716
- close: n
29717
+ onClose: n
29717
29718
  }) => {
29718
29719
  const a = (o) => {
29719
29720
  const [l, s] = o, c = to(l, e.step), d = no(s, e.step);
@@ -29737,7 +29738,7 @@ const lD = (e, t, n) => {
29737
29738
  count: a
29738
29739
  });
29739
29740
  return /* @__PURE__ */ r(ae, { label: i, children: /* @__PURE__ */ r(Bt, { size: "sm", variant: "light", children: a }) });
29740
- }, bD = "_begin_wqt18_1", yD = "_end_wqt18_27", _D = "_step_wqt18_53", va = {
29741
+ }, bD = "_begin_1cder_1", yD = "_end_1cder_27", _D = "_step_1cder_52", va = {
29741
29742
  begin: bD,
29742
29743
  end: yD,
29743
29744
  step: _D
@@ -29771,15 +29772,16 @@ const lD = (e, t, n) => {
29771
29772
  } });
29772
29773
  }, vD = ({
29773
29774
  onChange: e,
29774
- step: t
29775
+ step: t,
29776
+ onClose: n
29775
29777
  }) => {
29776
29778
  const {
29777
- t: n,
29778
- i18n: a
29779
- } = y(), i = (s) => () => {
29780
- const c = s(t);
29781
- e(c);
29782
- }, o = k(() => Gd(t), [t]), l = a.language === "zh";
29779
+ t: a,
29780
+ i18n: i
29781
+ } = y(), o = (c) => () => {
29782
+ const d = c(t);
29783
+ e(d), n();
29784
+ }, l = k(() => Gd(t), [t]), s = i.language === "zh";
29783
29785
  return /* @__PURE__ */ u(F, { children: [
29784
29786
  /* @__PURE__ */ r(A, { variant: "dashed", my: 10 }),
29785
29787
  /* @__PURE__ */ r(w, { withTableBorder: !1, sx: {
@@ -29797,16 +29799,16 @@ const lD = (e, t, n) => {
29797
29799
  td: {
29798
29800
  paddingLeft: "1px"
29799
29801
  }
29800
- }, children: /* @__PURE__ */ r(w.Tbody, { children: Object.entries(o).map(([s, c]) => /* @__PURE__ */ u(w.Tr, { children: [
29802
+ }, children: /* @__PURE__ */ r(w.Tbody, { children: Object.entries(l).map(([c, d]) => /* @__PURE__ */ u(w.Tr, { children: [
29801
29803
  /* @__PURE__ */ r(w.Th, { w: 80, children: /* @__PURE__ */ r(z, { size: "xs", c: "#555", fw: 500, sx: {
29802
29804
  textAlignLast: "justify"
29803
- }, children: n(`filter.widget.date_range.shortcut.${s}.label`) }) }),
29804
- c.map(({
29805
- key: d,
29806
- value: h,
29807
- getRange: p
29808
- }) => /* @__PURE__ */ r(w.Td, { children: /* @__PURE__ */ r(L, { size: "compact-xs", variant: "subtle", onClick: i(p), children: n(`filter.widget.date_range.shortcut.${s}.${l ? "full." : ""}${d}`) }) }, d))
29809
- ] }, s)) }) })
29805
+ }, children: a(`filter.widget.date_range.shortcut.${c}.label`) }) }),
29806
+ d.map(({
29807
+ key: h,
29808
+ value: p,
29809
+ getRange: g
29810
+ }) => /* @__PURE__ */ r(w.Td, { children: /* @__PURE__ */ r(L, { size: "compact-xs", variant: "subtle", onClick: o(g), children: a(`filter.widget.date_range.shortcut.${c}.${s ? "full." : ""}${h}`) }) }, h))
29811
+ ] }, c)) }) })
29810
29812
  ] });
29811
29813
  }, al = (e) => ({
29812
29814
  label: {
@@ -29851,12 +29853,12 @@ const lD = (e, t, n) => {
29851
29853
  /* @__PURE__ */ r(Ye.Target, { children: /* @__PURE__ */ r($, { label: e, labelProps: {
29852
29854
  title: e
29853
29855
  }, required: t, leftSection: /* @__PURE__ */ r(Kl, { size: 16 }), placeholder: l("filter.widget.date_range.start_date"), readOnly: !0, disabled: o, value: g, onFocus: c, styles: al(s), className: va.begin }) }),
29854
- /* @__PURE__ */ r($, { label: /* @__PURE__ */ r(R, { children: " " }), leftSection: /* @__PURE__ */ r(Yl, { size: 16, onClick: c }), placeholder: l("filter.widget.date_range.end_date"), readOnly: !0, disabled: !h || o, value: b, onFocus: c, styles: al(s), className: va.end }),
29856
+ /* @__PURE__ */ r($, { label: /* @__PURE__ */ r(R, { children: " " }), leftSection: /* @__PURE__ */ r(Yl, { size: 16, onClick: c }), placeholder: l("filter.widget.date_range.end_date"), readOnly: !0, disabled: o, value: b, onFocus: c, styles: al(s), className: va.end }),
29855
29857
  /* @__PURE__ */ r(vu, { className: va.step, value: n.step, onChange: x, label: /* @__PURE__ */ r(_, { justify: "flex-end", children: /* @__PURE__ */ r(fD, { begin: h, end: p }) }) })
29856
29858
  ] }),
29857
29859
  /* @__PURE__ */ u(Ye.Dropdown, { p: "sm", children: [
29858
- /* @__PURE__ */ r(gD, { value: n, onChange: v, close: d }),
29859
- /* @__PURE__ */ r(vD, { onChange: a, step: n.step })
29860
+ /* @__PURE__ */ r(gD, { value: n, onChange: v, onClose: d }),
29861
+ /* @__PURE__ */ r(vD, { onChange: a, step: n.step, onClose: d })
29860
29862
  ] })
29861
29863
  ] });
29862
29864
  }, xu = {
@@ -30451,9 +30453,7 @@ function e6(e) {
30451
30453
  const [t, n] = H(null);
30452
30454
  return N(() => {
30453
30455
  n(null);
30454
- }, [e]), N(() => {
30455
- console.log(t);
30456
- }, [t]), {
30456
+ }, [e]), {
30457
30457
  echartsOptions: t,
30458
30458
  setEchartsOptions: n
30459
30459
  };
@@ -34954,8 +34954,9 @@ const kI = D(() => {
34954
34954
  /* @__PURE__ */ r(q, { data: a, label: t("filter.widget.date_range.default_by_shortcut"), value: n.default_shortcut, onChange: c, placeholder: t("filter.widget.date_range.default_by_shortcut_placeholder"), clearable: !0, sx: {
34955
34955
  flexGrow: 1
34956
34956
  }, maxDropdownHeight: 500 }),
34957
- /* @__PURE__ */ r(Tp, { type: "range", label: t("filter.widget.date_range.default_value"), value: o, onChange: s, valueFormat: n.inputFormat, required: n.required, allowSingleDateInRange: !0, numberOfColumns: 2, w: "50%", disabled: !!n.default_shortcut })
34957
+ /* @__PURE__ */ r(Tp, { type: "range", label: t("filter.widget.date_range.default_value"), value: o, onChange: s, valueFormat: n.inputFormat, allowSingleDateInRange: !0, numberOfColumns: 2, w: "50%", disabled: !!n.default_shortcut })
34958
34958
  ] }),
34959
+ n.required && !n.default_shortcut && n.default_value.every((h) => !h) && /* @__PURE__ */ r(z, { size: "xs", mt: -10, ta: "center", children: "快捷方式与具体日期范围二选一,且必填" }),
34959
34960
  /* @__PURE__ */ r(yn, { filter: e })
34960
34961
  ] });
34961
34962
  }), OI = {