magtool 1.6.21 → 1.6.22

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.
@@ -1,8 +1,8 @@
1
- import { defineComponent as N, reactive as S, getCurrentInstance as w, inject as k, computed as u, watch as M, resolveComponent as g, createElementBlock as f, openBlock as c, createVNode as L, mergeProps as B, unref as r, createSlots as O, withCtx as v, Fragment as D, renderList as E, createBlock as F, normalizeClass as P, createElementVNode as i, createCommentVNode as j, toDisplayString as m, createTextVNode as I } from "vue";
2
- import { useMap as U } from "asamap";
3
- const $ = { class: "SuperTimezone" }, A = { class: "flexMode vc hb g16" }, Z = { class: "flexMode vc" }, q = { key: 0 }, G = N({
1
+ import { defineComponent as N, reactive as S, getCurrentInstance as x, inject as k, computed as u, watch as w, resolveComponent as g, createElementBlock as f, openBlock as c, createVNode as M, mergeProps as B, unref as s, createSlots as L, withCtx as v, Fragment as O, renderList as D, createBlock as E, normalizeClass as P, createElementVNode as m, createCommentVNode as j, toDisplayString as i, createTextVNode as F } from "vue";
2
+ import { useMap as I } from "asamap";
3
+ const U = { class: "SuperTimezone" }, $ = { class: "flexMode vc hb g16" }, A = { class: "flexMode vc" }, Z = { key: 0 }, q = N({
4
4
  name: "SuperTimezone"
5
- }), R = /* @__PURE__ */ Object.assign(G, {
5
+ }), Q = /* @__PURE__ */ Object.assign(q, {
6
6
  props: {
7
7
  modelValue: {
8
8
  type: String,
@@ -26,20 +26,18 @@ const $ = { class: "SuperTimezone" }, A = { class: "flexMode vc hb g16" }, Z = {
26
26
  }
27
27
  },
28
28
  emits: ["change", "update:modelValue", "update:timezone"],
29
- setup(T, { emit: C }) {
30
- const _ = T, l = S({
29
+ setup(T, { emit: V }) {
30
+ const _ = T, r = S({
31
31
  v: "",
32
32
  timezone: "",
33
33
  name: "",
34
34
  options: [],
35
35
  filterTxt: ""
36
- }), { proxy: H } = w(), h = k("store");
36
+ }), { proxy: G } = x(), h = k("store");
37
37
  h.common();
38
- const d = h.asa(), n = C, V = (e) => {
39
- s.value ? (n("update:modelValue", s.value.label), n("update:timezone", s.value.value)) : (n("update:modelValue", ""), n("update:timezone", "")), n("change");
40
- }, y = (e) => {
41
- l.filterTxt = e.toLowerCase();
42
- }, z = u(() => U("common.timezone").map((e) => (e.v = e.value.toString(), e.des_en_us = e.label_en_us.toLowerCase(), e.des_zh_cn = e.label_zh_cn.toLowerCase(), e.hide = !1, e))), b = u(() => {
38
+ const d = h.asa(), l = V, y = (e) => {
39
+ n.value ? (l("update:modelValue", n.value.label), l("update:timezone", n.value.value)) : (l("update:modelValue", ""), l("update:timezone", "")), l("change");
40
+ }, z = u(() => I("common.timezone").map((e) => (e.v = e.value.toString(), e.des_en_us = e.label_en_us.toLowerCase(), e.des_zh_cn = e.label_zh_cn.toLowerCase(), e.hide = !1, e))), b = u(() => {
43
41
  if (_.usePreTimezone) {
44
42
  const e = [
45
43
  {
@@ -53,14 +51,14 @@ const $ = { class: "SuperTimezone" }, A = { class: "flexMode vc hb g16" }, Z = {
53
51
  value: d.accountTimezone.timezone,
54
52
  hide: !1
55
53
  },
56
- { ...x.value }
54
+ { ...C.value }
57
55
  ], o = [];
58
56
  return z.value.forEach((a) => {
59
57
  e.filter1((p) => p.label === a.label).data || o.push(a);
60
58
  }), [...e, ...o];
61
59
  } else
62
60
  return z.value;
63
- }), s = u(() => b.value.filter1((e) => e.label === l.v).data), x = u(() => {
61
+ }), n = u(() => b.value.filter1((e) => e.label === r.v).data), C = u(() => {
64
62
  const e = Intl.DateTimeFormat().resolvedOptions().timeZone, o = (/* @__PURE__ */ new Date()).getTimezoneOffset(), a = Math.floor(Math.abs(o) / 60);
65
63
  return {
66
64
  label: e,
@@ -69,41 +67,40 @@ const $ = { class: "SuperTimezone" }, A = { class: "flexMode vc hb g16" }, Z = {
69
67
  hide: !1
70
68
  };
71
69
  });
72
- return M(
70
+ return w(
73
71
  () => _.modelValue,
74
72
  (e, o) => {
75
- e !== void 0 && e !== o && (l.v = e);
73
+ e !== void 0 && e !== o && (r.v = e);
76
74
  },
77
75
  {
78
76
  immediate: !0
79
77
  }
80
78
  ), (e, o) => {
81
79
  const a = g("el-option"), p = g("el-select");
82
- return c(), f("div", $, [
83
- L(p, B({
84
- modelValue: r(l).v,
85
- "onUpdate:modelValue": o[0] || (o[0] = (t) => r(l).v = t),
80
+ return c(), f("div", U, [
81
+ M(p, B({
82
+ modelValue: s(r).v,
83
+ "onUpdate:modelValue": o[0] || (o[0] = (t) => s(r).v = t),
86
84
  filterable: "",
87
- placeholder: e.$l("Timezone"),
88
- "filter-method": y
85
+ placeholder: e.$l("Timezone")
89
86
  }, e.$attrs, {
90
- onChange: V,
87
+ onChange: y,
91
88
  class: "wp100"
92
- }), O({
89
+ }), L({
93
90
  default: v(() => [
94
- (c(!0), f(D, null, E(r(b), (t, J) => (c(), F(a, {
91
+ (c(!0), f(O, null, D(s(b), (t, H) => (c(), E(a, {
95
92
  key: t.label,
96
93
  label: t.label,
97
94
  value: t.label,
98
95
  class: P(t.hide && "hide")
99
96
  }, {
100
97
  default: v(() => [
101
- i("div", A, [
102
- i("div", Z, [
103
- i("span", null, m(t.label), 1),
104
- t.tip ? (c(), f("span", q, "(" + m(t.tip) + ")", 1)) : j("", !0)
98
+ m("div", $, [
99
+ m("div", A, [
100
+ m("span", null, i(t.label), 1),
101
+ t.tip ? (c(), f("span", Z, "(" + i(t.tip) + ")", 1)) : j("", !0)
105
102
  ]),
106
- i("span", null, m(t.value < 1 ? t.value : "+" + t.value), 1)
103
+ m("span", null, i(t.value < 1 ? t.value : "+" + t.value), 1)
107
104
  ])
108
105
  ]),
109
106
  _: 2
@@ -111,10 +108,10 @@ const $ = { class: "SuperTimezone" }, A = { class: "flexMode vc hb g16" }, Z = {
111
108
  ]),
112
109
  _: 2
113
110
  }, [
114
- r(s) ? {
111
+ s(n) ? {
115
112
  name: "prefix",
116
113
  fn: v(() => [
117
- I(" [" + m(r(s).value) + "] ", 1)
114
+ F(" [" + i(s(n).value) + "] ", 1)
118
115
  ]),
119
116
  key: "0"
120
117
  } : void 0
@@ -124,5 +121,5 @@ const $ = { class: "SuperTimezone" }, A = { class: "flexMode vc hb g16" }, Z = {
124
121
  }
125
122
  });
126
123
  export {
127
- R as default
124
+ Q as default
128
125
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "magtool",
3
3
  "packageManager": "yarn@4.4.1",
4
- "version": "1.6.21",
4
+ "version": "1.6.22",
5
5
  "author": "matt avis",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",