yahee-components 0.0.57 → 0.0.59

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 oe, toRefs as re, ref as m, computed as ie, watch as ce, onMounted as fe, nextTick as A, resolveComponent as K, createElementBlock as S, openBlock as v, createVNode as V, withCtx as q, unref as s, createCommentVNode as z, normalizeStyle as de, toDisplayString as F, Fragment as me, renderList as ve, createBlock as pe, createTextVNode as M } from "vue";
1
+ import { defineComponent as oe, toRefs as re, ref as m, computed as ie, watch as ce, onMounted as fe, nextTick as A, resolveComponent as K, createElementBlock as V, openBlock as v, createVNode as b, withCtx as z, unref as s, createCommentVNode as J, normalizeStyle as de, toDisplayString as F, Fragment as me, renderList as ve, createBlock as pe, createTextVNode as M } from "vue";
2
2
  import l from "../_virtual/lodash.js";
3
3
  import ge from "./left-condition-sub.vue.js";
4
4
  import { stylesUtils as ye } from "../utils/style.js";
5
- import { M2 as J } from "../utils/translate.js";
5
+ import { M2 as O } from "../utils/translate.js";
6
6
  const he = { class: "yahee-left-condition" }, ke = {
7
7
  key: 1,
8
8
  class: "el-button custom-button el-button--small",
@@ -32,27 +32,27 @@ const he = { class: "yahee-left-condition" }, ke = {
32
32
  showTotal: { type: Boolean, default: !0 }
33
33
  },
34
34
  emits: ["filterChange", "setNoNeedRefreshNumFilterName"],
35
- setup(O, { expose: Y, emit: j }) {
36
- const G = O, {
35
+ setup(Y, { expose: j, emit: G }) {
36
+ const H = Y, {
37
37
  multiSelectList: w,
38
- displayRangeInput: b,
38
+ displayRangeInput: C,
39
39
  selectList: p,
40
- hasNum: H,
41
- allIsEmpty: Q,
42
- translateUserId: W,
43
- label: X,
40
+ hasNum: Q,
41
+ allIsEmpty: W,
42
+ translateUserId: X,
43
+ label: Z,
44
44
  filterKey: g,
45
45
  rangeStartKey: r,
46
46
  rangeEndKey: i,
47
47
  noNeedRefreshNumFilterName: $,
48
48
  defaultValues: y,
49
- totalCount: C,
50
- countList: R,
51
- showTotal: Z
52
- } = re(G), _ = j, x = m(C.value), c = m(), f = m(), T = m(R.value), u = /* @__PURE__ */ new Map(), d = m(!1), h = m([]), k = () => {
49
+ totalCount: R,
50
+ countList: _,
51
+ showTotal: ee
52
+ } = re(H), x = G, B = m(R.value), c = m(), f = m(), T = m(_.value), u = /* @__PURE__ */ new Map(), d = m(!1), h = m([]), k = () => {
53
53
  console.log("left condition notifyParent start"), A(() => {
54
- var o, N;
55
- const e = L(), t = ae();
54
+ var o, S;
55
+ const e = L(), t = ue();
56
56
  if (l.isEmpty(e) && l.isEmpty(t)) {
57
57
  I();
58
58
  return;
@@ -63,28 +63,28 @@ const he = { class: "yahee-left-condition" }, ke = {
63
63
  checkedValues: l.map(e, (n) => n.value)
64
64
  }
65
65
  ];
66
- b.value && (a.push({
66
+ C.value && (a.push({
67
67
  filterKey: r.value,
68
68
  checkedValues: [(o = u.get(r.value)) == null ? void 0 : o.value]
69
69
  }), a.push({
70
70
  filterKey: i.value,
71
- checkedValues: [(N = u.get(i.value)) == null ? void 0 : N.value]
72
- })), _("filterChange", a), console.log(
71
+ checkedValues: [(S = u.get(i.value)) == null ? void 0 : S.value]
72
+ })), x("filterChange", a), console.log(
73
73
  `left condition notifyParent nextTick after emit, filterKey: ${g.value}, checkedValues: ${JSON.stringify(l.map(e, (n) => n.value))}`
74
74
  );
75
75
  });
76
- }, ee = () => {
77
- _("setNoNeedRefreshNumFilterName");
78
- }, U = () => {
79
- E(), B({ label: r.value, selected: !0, value: c.value }), B({ label: i.value, selected: !0, value: f.value });
80
76
  }, te = () => {
77
+ x("setNoNeedRefreshNumFilterName");
78
+ }, U = () => {
79
+ N(), E({ label: r.value, selected: !0, value: c.value }), E({ label: i.value, selected: !0, value: f.value });
80
+ }, le = () => {
81
81
  const e = u.get(r.value);
82
82
  l.isEmpty(e) && !c.value || l.get(e, "value") === c.value || (U(), k());
83
- }, le = () => {
83
+ }, ae = () => {
84
84
  const e = u.get(i.value);
85
85
  l.isEmpty(e) && !f.value || l.get(e, "value") === f.value || (U(), k());
86
86
  };
87
- function B(e) {
87
+ function E(e) {
88
88
  console.log(`left condition setSelectedStatusMap start, item: ${JSON.stringify(e)}`), u.set(e.label, {
89
89
  selected: e.selected,
90
90
  value: e.value
@@ -93,7 +93,7 @@ const he = { class: "yahee-left-condition" }, ke = {
93
93
  function P(e) {
94
94
  return l.includes(w.value, e.value);
95
95
  }
96
- function E() {
96
+ function N() {
97
97
  const e = l.map(L(), (t) => t.value);
98
98
  u.clear(), l.forEach(h.value, (t) => {
99
99
  l.includes(e, t.getValue().value) && t.resetValue();
@@ -108,33 +108,35 @@ const he = { class: "yahee-left-condition" }, ke = {
108
108
  const a = Array.from(u.keys()).find((o) => u.get(o) === t);
109
109
  return ![r.value, i.value].includes(a);
110
110
  });
111
- }, ae = () => l.filter(Array.from(u.values()), (e) => {
111
+ }, ue = () => l.filter(Array.from(u.values()), (e) => {
112
112
  const t = Array.from(u.keys()).find((a) => u.get(a) === e);
113
113
  return [r.value, i.value].includes(t);
114
- }), ue = () => {
114
+ }), D = () => {
115
115
  d.value = !1;
116
- }, ne = ie(() => l.sortBy(p.value, (e) => P(e))), D = () => {
116
+ }, ne = ie(() => l.sortBy(p.value, (e) => P(e))), q = () => {
117
117
  c.value = void 0, f.value = void 0, u.delete(r.value), u.delete(i.value);
118
118
  };
119
119
  function I() {
120
- E(), A(() => {
120
+ N(), A(() => {
121
121
  console.log("selectList.value:", p.value), d.value = !0;
122
122
  const e = p.value.filter((a) => !P(a)), t = l.map(e, (a) => a.value);
123
- _("filterChange", [
123
+ x("filterChange", [
124
124
  {
125
125
  filterKey: g.value,
126
- checkedValues: Q.value ? [] : t
126
+ checkedValues: W.value ? [] : t
127
127
  }
128
128
  ]);
129
- }), b.value && D();
129
+ }), C.value && q();
130
130
  }
131
131
  return ce(
132
- [() => C.value, () => R.value],
132
+ [() => R.value, () => _.value],
133
133
  ([e, t], [a, o]) => {
134
- console.log(e, t), console.log(a, o), (!$.value || !l.eq($.value, g.value)) && (x.value = C.value, T.value = R.value);
134
+ console.log(e, t), console.log(a, o), (!$.value || !l.eq($.value, g.value)) && (B.value = R.value, T.value = _.value);
135
135
  }
136
- ), Y({
137
- clickAllSelected: I
136
+ ), j({
137
+ clickAllSelected: I,
138
+ resetAllCheckedValue: N,
139
+ resetIsSelectAll: D
138
140
  }), fe(() => {
139
141
  if (!Array.isArray(y.value) || l.isEmpty(y.value)) {
140
142
  d.value = !0;
@@ -146,39 +148,39 @@ const he = { class: "yahee-left-condition" }, ke = {
146
148
  }), k();
147
149
  });
148
150
  }), (e, t) => {
149
- const a = K("el-input-number"), o = K("el-form-item"), N = K("el-form");
150
- return v(), S("div", he, [
151
- V(N, null, {
152
- default: q(() => [
153
- V(o, { label: s(X) }, {
154
- default: q(() => [
155
- s(Z) ? (v(), S("span", {
151
+ const a = K("el-input-number"), o = K("el-form-item"), S = K("el-form");
152
+ return v(), V("div", he, [
153
+ b(S, null, {
154
+ default: z(() => [
155
+ b(o, { label: s(Z) }, {
156
+ default: z(() => [
157
+ s(ee) ? (v(), V("span", {
156
158
  key: 0,
157
159
  class: "el-button custom-button el-button--small",
158
160
  style: de(s(ye).getBackgroundColor(d.value)),
159
161
  onClick: I
160
- }, F(x.value ? `${s(J)("全部")}(${x.value})` : s(J)("全部")), 5)) : z("", !0),
161
- (v(!0), S(me, null, ve(ne.value, (n, se) => (v(), pe(ge, {
162
+ }, F(B.value ? `${s(O)("全部")}(${B.value})` : s(O)("全部")), 5)) : J("", !0),
163
+ (v(!0), V(me, null, ve(ne.value, (n, se) => (v(), pe(ge, {
162
164
  key: se,
163
165
  ref_for: !0,
164
166
  ref_key: "itemRefs",
165
167
  ref: h,
166
168
  "all-is-checkbox": e.allIsCheckbox,
167
169
  "multi-select-list": s(w),
168
- "translate-user-id": s(W),
170
+ "translate-user-id": s(X),
169
171
  "count-list": T.value,
170
172
  item: n,
171
- "has-num": s(H),
172
- onResetAllCheckedValue: E,
173
- onSetSelectedStatusMap: B,
174
- onResetRange: D,
175
- onSetNoNeedRefreshNumFilterName: ee,
173
+ "has-num": s(Q),
174
+ onResetAllCheckedValue: N,
175
+ onSetSelectedStatusMap: E,
176
+ onResetRange: q,
177
+ onSetNoNeedRefreshNumFilterName: te,
176
178
  onNotifyParent: k,
177
- onResetIsSelectAll: ue
179
+ onResetIsSelectAll: D
178
180
  }, null, 8, ["all-is-checkbox", "multi-select-list", "translate-user-id", "count-list", "item", "has-num"]))), 128)),
179
- s(b) ? (v(), S("div", ke, [
181
+ s(C) ? (v(), V("div", ke, [
180
182
  M(F(e.rangeLabel) + "  ", 1),
181
- V(a, {
183
+ b(a, {
182
184
  modelValue: c.value,
183
185
  "onUpdate:modelValue": t[0] || (t[0] = (n) => c.value = n),
184
186
  style: { "margin-left": "2px", width: "60px", height: "22px" },
@@ -187,10 +189,10 @@ const he = { class: "yahee-left-condition" }, ke = {
187
189
  min: 1,
188
190
  max: 100,
189
191
  controls: !1,
190
- onBlur: te
192
+ onBlur: le
191
193
  }, null, 8, ["modelValue"]),
192
194
  M("   %   " + F(e.rangeDelimiter) + "   ", 1),
193
- V(a, {
195
+ b(a, {
194
196
  modelValue: f.value,
195
197
  "onUpdate:modelValue": t[1] || (t[1] = (n) => f.value = n),
196
198
  style: { width: "60px", height: "22px" },
@@ -199,10 +201,10 @@ const he = { class: "yahee-left-condition" }, ke = {
199
201
  size: "small",
200
202
  max: 100,
201
203
  controls: !1,
202
- onChange: le
204
+ onChange: ae
203
205
  }, null, 8, ["modelValue"]),
204
206
  t[2] || (t[2] = M(" %   "))
205
- ])) : z("", !0)
207
+ ])) : J("", !0)
206
208
  ]),
207
209
  _: 1
208
210
  }, 8, ["label"])
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "yahee-components",
3
3
  "private": false,
4
- "version": "0.0.57",
4
+ "version": "0.0.59",
5
5
  "description": "深圳前海亚讯前端组件库",
6
6
  "main": "lib",
7
7
  "module": "es",
@@ -26,9 +26,11 @@
26
26
  "gulp-autoprefixer": "^9.0.0",
27
27
  "gulp-sass": "^5.1.0",
28
28
  "sass": "^1.78.0",
29
- "vite": "^6.0.1",
30
29
  "shelljs": "^0.8.5",
31
- "unplugin-element-plus": "^0.8.0"
30
+ "typedoc": "0.28.2",
31
+ "typedoc-plugin-markdown": "^4.6.2",
32
+ "unplugin-element-plus": "^0.8.0",
33
+ "vite": "^6.0.1"
32
34
  },
33
35
  "peerDependencies": {
34
36
  "@element-plus/icons-vue": "^2.3.1",
@@ -1455,6 +1455,8 @@ declare const _default: (( SFCWithInstall<DefineComponent<InputProps, {
1455
1455
  showTotal?: boolean;
1456
1456
  }, {
1457
1457
  clickAllSelected: () => void;
1458
+ resetAllCheckedValue: () => void;
1459
+ resetIsSelectAll: () => void;
1458
1460
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1459
1461
  filterChange: (...args: any[]) => void;
1460
1462
  setNoNeedRefreshNumFilterName: (...args: any[]) => void;
@@ -23,6 +23,8 @@ export declare const YaheeLeftCondition: SFCWithInstall<DefineComponent<{
23
23
  showTotal?: boolean;
24
24
  }, {
25
25
  clickAllSelected: () => void;
26
+ resetAllCheckedValue: () => void;
27
+ resetIsSelectAll: () => void;
26
28
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
27
29
  filterChange: (...args: any[]) => void;
28
30
  setNoNeedRefreshNumFilterName: (...args: any[]) => void;
@@ -21,9 +21,12 @@ type __VLS_Props = {
21
21
  defaultValues?: Array<string | number | boolean>;
22
22
  showTotal?: boolean;
23
23
  };
24
+ declare function resetAllCheckedValue(): void;
24
25
  declare function clickAllSelected(): void;
25
26
  declare const _default: DefineComponent<__VLS_Props, {
26
27
  clickAllSelected: typeof clickAllSelected;
28
+ resetAllCheckedValue: typeof resetAllCheckedValue;
29
+ resetIsSelectAll: () => void;
27
30
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
28
31
  filterChange: (...args: any[]) => void;
29
32
  setNoNeedRefreshNumFilterName: (...args: any[]) => void;