@aplus-frontend/ui 7.13.10 → 7.13.11

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,24 +1,25 @@
1
- import { ref as E, watch as L } from "vue";
2
- const s = "SELECTABLE_ALL_VALUE_KEY", u = (o) => {
3
- const e = E(o?.options || []);
4
- function n(t) {
5
- t && (e.value = [...t]);
1
+ import { isArray as E } from "lodash-unified";
2
+ import { ref as L, watch as i } from "vue";
3
+ const u = "SELECTABLE_ALL_VALUE_KEY", a = (o) => {
4
+ const r = L(o?.options || []);
5
+ function e(t) {
6
+ !t || !E(t) || (r.value = [...t]);
6
7
  }
7
- return L(
8
+ return i(
8
9
  () => o.options,
9
10
  (t) => {
10
- n(t);
11
+ e(t);
11
12
  },
12
13
  {
13
14
  deep: !0
14
15
  }
15
16
  ), {
16
- options: e,
17
- updateOptions: n
17
+ options: r,
18
+ updateOptions: e
18
19
  };
19
20
  };
20
21
  export {
21
- s as SELECT_ALL_VALUE_KEY,
22
- u as default,
23
- u as useSelectOptions
22
+ u as SELECT_ALL_VALUE_KEY,
23
+ a as default,
24
+ a as useSelectOptions
24
25
  };
@@ -1,5 +1,5 @@
1
- import { defineComponent as T, ref as y, watch as $, createElementBlock as m, openBlock as c, normalizeClass as V, unref as e, createElementVNode as o, createCommentVNode as f, toDisplayString as r, createVNode as i, withModifiers as b, withCtx as v } from "vue";
2
- import { Space as C, Popconfirm as B } from "@aplus-frontend/antdv";
1
+ import { defineComponent as $, ref as V, watch as b, createElementBlock as m, openBlock as c, normalizeClass as C, unref as e, createElementVNode as a, createCommentVNode as f, toDisplayString as r, createVNode as n, withModifiers as d, withCtx as v } from "vue";
2
+ import { Space as x, Popconfirm as B } from "@aplus-frontend/antdv";
3
3
  import { ApField as F } from "../../../ap-field/index.mjs";
4
4
  import "../../../ap-form/ap-form.vue.mjs";
5
5
  import "../../../config-provider/index.mjs";
@@ -8,99 +8,99 @@ import "../../ap-tag/index.mjs";
8
8
  import { useViewInject as M } from "../hooks/use-view-provide.mjs";
9
9
  import P from "../icons/line-delete.vue.mjs";
10
10
  import Y from "../style/index.mjs";
11
- import { SYSTEM_VIEW_KEY as h } from "../utils/enum.mjs";
11
+ import { SYSTEM_VIEW_KEY as N } from "../utils/enum.mjs";
12
12
  import { useNamespace as j } from "../../../config-provider/hooks/use-namespace.mjs";
13
13
  import { useLocale as A } from "../../../config-provider/hooks/use-locale.mjs";
14
14
  import O from "../../ap-tag/ap-tag.vue.mjs";
15
- import x from "../../../ap-form/ap-form.vue2.mjs";
15
+ import h from "../../../ap-form/ap-form.vue2.mjs";
16
16
  const U = { class: "menu-list-content-name" }, W = ["title"], q = {
17
17
  key: 0,
18
18
  class: "menu-list-content-default"
19
- }, G = { class: "menu-list-content-action-delete" }, H = { class: "menu-list-content-edit" }, ve = /* @__PURE__ */ T({
19
+ }, G = { class: "menu-list-content-action-delete" }, H = { class: "menu-list-content-edit" }, ve = /* @__PURE__ */ $({
20
20
  __name: "menu-list-content",
21
21
  props: {
22
22
  view: {}
23
23
  },
24
- setup(N) {
25
- const { b: s } = j("ap-view"), d = Y("ap-view"), { token: K } = L(), { t: n } = A(), t = N, {
26
- currentViewKey: D,
27
- changeCurrentViewKey: S,
24
+ setup(K) {
25
+ const { b: s } = j("ap-view"), k = Y("ap-view"), { token: D } = L(), { t: o } = A(), t = K, {
26
+ currentViewKey: S,
27
+ changeCurrentViewKey: g,
28
28
  viewListCRUD: p,
29
29
  tableKey: w,
30
30
  menuOpen: _
31
- } = M(), l = y(!1), k = y(), g = () => {
32
- S(t.view.viewKey), _.value = !1;
33
- }, E = () => {
31
+ } = M(), l = V(!1), y = V(), E = () => {
32
+ g(t.view.viewKey), _.value = !1;
33
+ }, z = () => {
34
34
  p?.changeView?.({
35
35
  ...t.view,
36
36
  tableKey: w,
37
37
  isDefault: !0
38
38
  });
39
- }, z = () => {
39
+ }, I = () => {
40
40
  p?.removeView?.({
41
41
  tableKey: w,
42
42
  viewKey: t.view.viewKey
43
43
  });
44
- }, I = async () => {
45
- const u = await k.value?.validate?.();
44
+ }, R = async () => {
45
+ const u = await y.value?.validate?.();
46
46
  p?.changeView?.({
47
47
  ...t.view,
48
48
  tableKey: w,
49
49
  viewName: u?.viewName || t.view.viewName
50
50
  }), l.value = !1;
51
51
  };
52
- return $(
52
+ return b(
53
53
  () => _.value,
54
54
  (u) => {
55
55
  u && (l.value = !1);
56
56
  }
57
- ), (u, a) => l.value === !1 ? (c(), m("div", {
57
+ ), (u, i) => l.value === !1 ? (c(), m("div", {
58
58
  key: 0,
59
- class: V({
59
+ class: C({
60
60
  [e(s)()]: !0,
61
61
  [e(s)("menu-list-content")]: !0,
62
- [e(s)("menu-list-content-active")]: t.view?.viewKey === e(D),
63
- [e(d)]: !0
62
+ [e(s)("menu-list-content-active")]: t.view?.viewKey === e(S),
63
+ [e(k)]: !0
64
64
  }),
65
- onClick: g
65
+ onClick: E
66
66
  }, [
67
- o("div", U, [
68
- o("span", {
67
+ a("div", U, [
68
+ a("span", {
69
69
  title: t.view?.viewName
70
70
  }, r(t.view?.viewName), 9, W)
71
71
  ]),
72
- t.view?.viewKey !== e(h) && t.view?.isDefault ? (c(), m("div", q, [
73
- i(e(O), {
74
- text: e(n)("ap.apView.default"),
72
+ t.view?.viewKey !== e(N) && t.view?.isDefault ? (c(), m("div", q, [
73
+ n(e(O), {
74
+ text: e(o)("ap.apView.default"),
75
75
  size: "small",
76
- color: e(K).colorPrimary
76
+ color: e(D).colorPrimary
77
77
  }, null, 8, ["text", "color"])
78
78
  ])) : f("", !0),
79
- t.view?.viewKey !== e(h) ? (c(), m("div", {
79
+ t.view?.viewKey !== e(N) ? (c(), m("div", {
80
80
  key: 1,
81
81
  class: "menu-list-content-action",
82
- onClick: a[1] || (a[1] = b(() => {
82
+ onClick: i[1] || (i[1] = d(() => {
83
83
  }, ["stop"]))
84
84
  }, [
85
- i(e(C), { size: 8 }, {
85
+ n(e(x), { size: 8 }, {
86
86
  default: v(() => [
87
- o("div", {
87
+ a("div", {
88
88
  class: "menu-list-content-action-text",
89
- onClick: a[0] || (a[0] = (R) => l.value = !0)
90
- }, r(e(n)("ap.apView.rename")), 1),
89
+ onClick: i[0] || (i[0] = d((T) => l.value = !0, ["stop"]))
90
+ }, r(e(o)("ap.apView.rename")), 1),
91
91
  t.view?.isDefault ? f("", !0) : (c(), m("div", {
92
92
  key: 0,
93
93
  class: "menu-list-content-action-text",
94
- onClick: E
95
- }, r(e(n)("ap.apView.setDefault")), 1)),
96
- o("div", G, [
97
- i(e(B), {
98
- title: e(n)("ap.apView.deleteTip"),
99
- "ok-text": e(n)("ap.apView.ok"),
100
- onConfirm: z
94
+ onClick: z
95
+ }, r(e(o)("ap.apView.setDefault")), 1)),
96
+ a("div", G, [
97
+ n(e(B), {
98
+ title: e(o)("ap.apView.deleteTip"),
99
+ "ok-text": e(o)("ap.apView.ok"),
100
+ onConfirm: I
101
101
  }, {
102
102
  default: v(() => [
103
- i(P)
103
+ n(P)
104
104
  ]),
105
105
  _: 1
106
106
  }, 8, ["title", "ok-text"])
@@ -111,33 +111,35 @@ const U = { class: "menu-list-content-name" }, W = ["title"], q = {
111
111
  ])) : f("", !0)
112
112
  ], 2)) : (c(), m("div", {
113
113
  key: 1,
114
- class: V([e(s)("menu-list-content"), e(s)("menu-list-content-edit"), e(d)])
114
+ class: C([e(s)("menu-list-content"), e(s)("menu-list-content-edit"), e(k)]),
115
+ onClick: i[3] || (i[3] = d(() => {
116
+ }, ["stop"]))
115
117
  }, [
116
- i(x, {
118
+ n(h, {
117
119
  ref_key: "formRef",
118
- ref: k,
120
+ ref: y,
119
121
  "initial-values": {
120
122
  viewName: t.view?.viewName
121
123
  }
122
124
  }, {
123
125
  default: v(() => [
124
- o("div", H, [
125
- i(e(C), { size: 8 }, {
126
+ a("div", H, [
127
+ n(e(x), { size: 8 }, {
126
128
  default: v(() => [
127
- i(x.FormItem, { name: "viewName" }, {
129
+ n(h.FormItem, { name: "viewName" }, {
128
130
  default: v(() => [
129
- i(e(F).Text, { maxlength: 20 })
131
+ n(e(F).Text, { maxlength: 20 })
130
132
  ]),
131
133
  _: 1
132
134
  }),
133
- o("div", {
135
+ a("div", {
134
136
  class: "menu-list-content-action-text",
135
- onClick: I
136
- }, r(e(n)("ap.apView.save")), 1),
137
- o("div", {
137
+ onClick: R
138
+ }, r(e(o)("ap.apView.save")), 1),
139
+ a("div", {
138
140
  class: "menu-list-content-action-text",
139
- onClick: a[2] || (a[2] = (R) => l.value = !1)
140
- }, r(e(n)("ap.apView.cancel")), 1)
141
+ onClick: i[2] || (i[2] = (T) => l.value = !1)
142
+ }, r(e(o)("ap.apView.cancel")), 1)
141
143
  ]),
142
144
  _: 1
143
145
  })
@@ -1,2 +1,2 @@
1
- declare const _default: "7.13.10";
1
+ declare const _default: "7.13.11";
2
2
  export default _default;
@@ -1,4 +1,4 @@
1
- const e = "7.13.10";
1
+ const e = "7.13.11";
2
2
  export {
3
3
  e as default
4
4
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),E="SELECTABLE_ALL_VALUE_KEY",s=t=>{const o=n.ref(t?.options||[]);function u(e){e&&(o.value=[...e])}return n.watch(()=>t.options,e=>{u(e)},{deep:!0}),{options:o,updateOptions:u}};exports.SELECT_ALL_VALUE_KEY=E;exports.default=s;exports.useSelectOptions=s;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("lodash-unified"),r=require("vue"),n="SELECTABLE_ALL_VALUE_KEY",s=t=>{const o=r.ref(t?.options||[]);function u(e){!e||!i.isArray(e)||(o.value=[...e])}return r.watch(()=>t.options,e=>{u(e)},{deep:!0}),{options:o,updateOptions:u}};exports.SELECT_ALL_VALUE_KEY=n;exports.default=s;exports.useSelectOptions=s;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("@aplus-frontend/antdv"),E=require("../../../ap-field/index.js");require("../../../ap-form/ap-form.vue.js");require("../../../config-provider/index.js");const h=require("../../../config-provider/hooks/use-token.js");require("../../ap-tag/index.js");const S=require("../hooks/use-view-provide.js"),q=require("../icons/line-delete.vue.js"),g=require("../style/index.js"),m=require("../utils/enum.js"),D=require("../../../config-provider/hooks/use-namespace.js"),K=require("../../../config-provider/hooks/use-locale.js"),B=require("../../ap-tag/ap-tag.vue.js"),f=require("../../../ap-form/ap-form.vue2.js"),T={class:"menu-list-content-name"},z=["title"],I={key:0,class:"menu-list-content-default"},M={class:"menu-list-content-action-delete"},b={class:"menu-list-content-edit"},P=e.defineComponent({__name:"menu-list-content",props:{view:{}},setup(w){const{b:a}=D.useNamespace("ap-view"),c=g.default("ap-view"),{token:p}=h.useToken(),{t:n}=K.useLocale(),t=w,{currentViewKey:_,changeCurrentViewKey:V,viewListCRUD:r,tableKey:s,menuOpen:d}=S.useViewInject(),o=e.ref(!1),v=e.ref(),k=()=>{V(t.view.viewKey),d.value=!1},N=()=>{r?.changeView?.({...t.view,tableKey:s,isDefault:!0})},y=()=>{r?.removeView?.({tableKey:s,viewKey:t.view.viewKey})},C=async()=>{const l=await v.value?.validate?.();r?.changeView?.({...t.view,tableKey:s,viewName:l?.viewName||t.view.viewName}),o.value=!1};return e.watch(()=>d.value,l=>{l&&(o.value=!1)}),(l,i)=>o.value===!1?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass({[e.unref(a)()]:!0,[e.unref(a)("menu-list-content")]:!0,[e.unref(a)("menu-list-content-active")]:t.view?.viewKey===e.unref(_),[e.unref(c)]:!0}),onClick:k},[e.createElementVNode("div",T,[e.createElementVNode("span",{title:t.view?.viewName},e.toDisplayString(t.view?.viewName),9,z)]),t.view?.viewKey!==e.unref(m.SYSTEM_VIEW_KEY)&&t.view?.isDefault?(e.openBlock(),e.createElementBlock("div",I,[e.createVNode(e.unref(B.default),{text:e.unref(n)("ap.apView.default"),size:"small",color:e.unref(p).colorPrimary},null,8,["text","color"])])):e.createCommentVNode("",!0),t.view?.viewKey!==e.unref(m.SYSTEM_VIEW_KEY)?(e.openBlock(),e.createElementBlock("div",{key:1,class:"menu-list-content-action",onClick:i[1]||(i[1]=e.withModifiers(()=>{},["stop"]))},[e.createVNode(e.unref(u.Space),{size:8},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"menu-list-content-action-text",onClick:i[0]||(i[0]=x=>o.value=!0)},e.toDisplayString(e.unref(n)("ap.apView.rename")),1),t.view?.isDefault?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"menu-list-content-action-text",onClick:N},e.toDisplayString(e.unref(n)("ap.apView.setDefault")),1)),e.createElementVNode("div",M,[e.createVNode(e.unref(u.Popconfirm),{title:e.unref(n)("ap.apView.deleteTip"),"ok-text":e.unref(n)("ap.apView.ok"),onConfirm:y},{default:e.withCtx(()=>[e.createVNode(q.default)]),_:1},8,["title","ok-text"])])]),_:1})])):e.createCommentVNode("",!0)],2)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass([e.unref(a)("menu-list-content"),e.unref(a)("menu-list-content-edit"),e.unref(c)])},[e.createVNode(f.default,{ref_key:"formRef",ref:v,"initial-values":{viewName:t.view?.viewName}},{default:e.withCtx(()=>[e.createElementVNode("div",b,[e.createVNode(e.unref(u.Space),{size:8},{default:e.withCtx(()=>[e.createVNode(f.default.FormItem,{name:"viewName"},{default:e.withCtx(()=>[e.createVNode(e.unref(E.ApField).Text,{maxlength:20})]),_:1}),e.createElementVNode("div",{class:"menu-list-content-action-text",onClick:C},e.toDisplayString(e.unref(n)("ap.apView.save")),1),e.createElementVNode("div",{class:"menu-list-content-action-text",onClick:i[2]||(i[2]=x=>o.value=!1)},e.toDisplayString(e.unref(n)("ap.apView.cancel")),1)]),_:1})])]),_:1},8,["initial-values"])],2))}});exports.default=P;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("@aplus-frontend/antdv"),E=require("../../../ap-field/index.js");require("../../../ap-form/ap-form.vue.js");require("../../../config-provider/index.js");const h=require("../../../config-provider/hooks/use-token.js");require("../../ap-tag/index.js");const S=require("../hooks/use-view-provide.js"),q=require("../icons/line-delete.vue.js"),g=require("../style/index.js"),m=require("../utils/enum.js"),D=require("../../../config-provider/hooks/use-namespace.js"),K=require("../../../config-provider/hooks/use-locale.js"),B=require("../../ap-tag/ap-tag.vue.js"),f=require("../../../ap-form/ap-form.vue2.js"),T={class:"menu-list-content-name"},M=["title"],z={key:0,class:"menu-list-content-default"},I={class:"menu-list-content-action-delete"},b={class:"menu-list-content-edit"},P=e.defineComponent({__name:"menu-list-content",props:{view:{}},setup(w){const{b:a}=D.useNamespace("ap-view"),c=g.default("ap-view"),{token:p}=h.useToken(),{t:i}=K.useLocale(),t=w,{currentViewKey:_,changeCurrentViewKey:V,viewListCRUD:r,tableKey:s,menuOpen:d}=S.useViewInject(),o=e.ref(!1),v=e.ref(),k=()=>{V(t.view.viewKey),d.value=!1},N=()=>{r?.changeView?.({...t.view,tableKey:s,isDefault:!0})},y=()=>{r?.removeView?.({tableKey:s,viewKey:t.view.viewKey})},C=async()=>{const l=await v.value?.validate?.();r?.changeView?.({...t.view,tableKey:s,viewName:l?.viewName||t.view.viewName}),o.value=!1};return e.watch(()=>d.value,l=>{l&&(o.value=!1)}),(l,n)=>o.value===!1?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass({[e.unref(a)()]:!0,[e.unref(a)("menu-list-content")]:!0,[e.unref(a)("menu-list-content-active")]:t.view?.viewKey===e.unref(_),[e.unref(c)]:!0}),onClick:k},[e.createElementVNode("div",T,[e.createElementVNode("span",{title:t.view?.viewName},e.toDisplayString(t.view?.viewName),9,M)]),t.view?.viewKey!==e.unref(m.SYSTEM_VIEW_KEY)&&t.view?.isDefault?(e.openBlock(),e.createElementBlock("div",z,[e.createVNode(e.unref(B.default),{text:e.unref(i)("ap.apView.default"),size:"small",color:e.unref(p).colorPrimary},null,8,["text","color"])])):e.createCommentVNode("",!0),t.view?.viewKey!==e.unref(m.SYSTEM_VIEW_KEY)?(e.openBlock(),e.createElementBlock("div",{key:1,class:"menu-list-content-action",onClick:n[1]||(n[1]=e.withModifiers(()=>{},["stop"]))},[e.createVNode(e.unref(u.Space),{size:8},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"menu-list-content-action-text",onClick:n[0]||(n[0]=e.withModifiers(x=>o.value=!0,["stop"]))},e.toDisplayString(e.unref(i)("ap.apView.rename")),1),t.view?.isDefault?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"menu-list-content-action-text",onClick:N},e.toDisplayString(e.unref(i)("ap.apView.setDefault")),1)),e.createElementVNode("div",I,[e.createVNode(e.unref(u.Popconfirm),{title:e.unref(i)("ap.apView.deleteTip"),"ok-text":e.unref(i)("ap.apView.ok"),onConfirm:y},{default:e.withCtx(()=>[e.createVNode(q.default)]),_:1},8,["title","ok-text"])])]),_:1})])):e.createCommentVNode("",!0)],2)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass([e.unref(a)("menu-list-content"),e.unref(a)("menu-list-content-edit"),e.unref(c)]),onClick:n[3]||(n[3]=e.withModifiers(()=>{},["stop"]))},[e.createVNode(f.default,{ref_key:"formRef",ref:v,"initial-values":{viewName:t.view?.viewName}},{default:e.withCtx(()=>[e.createElementVNode("div",b,[e.createVNode(e.unref(u.Space),{size:8},{default:e.withCtx(()=>[e.createVNode(f.default.FormItem,{name:"viewName"},{default:e.withCtx(()=>[e.createVNode(e.unref(E.ApField).Text,{maxlength:20})]),_:1}),e.createElementVNode("div",{class:"menu-list-content-action-text",onClick:C},e.toDisplayString(e.unref(i)("ap.apView.save")),1),e.createElementVNode("div",{class:"menu-list-content-action-text",onClick:n[2]||(n[2]=x=>o.value=!1)},e.toDisplayString(e.unref(i)("ap.apView.cancel")),1)]),_:1})])]),_:1},8,["initial-values"])],2))}});exports.default=P;
@@ -1,2 +1,2 @@
1
- declare const _default: "7.13.10";
1
+ declare const _default: "7.13.11";
2
2
  export default _default;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="7.13.10";exports.default=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="7.13.11";exports.default=e;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aplus-frontend/ui",
3
- "version": "7.13.10",
3
+ "version": "7.13.11",
4
4
  "main": "./lib/index.js",
5
5
  "type": "module",
6
6
  "files": [