@das-fed/upf-ui 6.4.0-dev.142 → 6.4.0-dev.143

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@das-fed/upf-ui",
3
- "version": "6.4.0-dev.142",
3
+ "version": "6.4.0-dev.143",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -26,7 +26,7 @@
26
26
  "@antv/x6-plugin-snapline": "^2.1.7",
27
27
  "@antv/x6-plugin-transform": "^2.1.8",
28
28
  "@antv/x6-vue-shape": "^2.1.2",
29
- "@das-fed/upf-ui": "6.4.0-dev.142",
29
+ "@das-fed/upf-ui": "6.4.0-dev.143",
30
30
  "@element-plus/icons-vue": "^2.3.1",
31
31
  "@types/lodash": "^4.14.194",
32
32
  "@types/lodash-es": "^4.17.9",
@@ -56,9 +56,9 @@
56
56
  "vue-tsc": "^2.0.29"
57
57
  },
58
58
  "dependencies": {
59
- "@das-fed/upf-cli": "6.4.0-dev.142",
60
- "@das-fed/upf-utils": "6.4.0-dev.142",
61
- "@das-fed/upf-web": "6.4.0-dev.142",
59
+ "@das-fed/upf-cli": "6.4.0-dev.143",
60
+ "@das-fed/upf-utils": "6.4.0-dev.143",
61
+ "@das-fed/upf-web": "6.4.0-dev.143",
62
62
  "@types/markdown-it": "^14.1.2",
63
63
  "@wangeditor-next/editor": "5.6.31",
64
64
  "@wangeditor-next/editor-for-vue": "5.1.14",
@@ -1,8 +1,8 @@
1
1
  import '@das-fed/upf-ui/packages/components/form/style.css';
2
- import { defineComponent as y, ref as d, provide as F, reactive as _, computed as i, createElementBlock as R, openBlock as x, normalizeStyle as S, normalizeClass as I, renderSlot as z } from "vue";
3
- import { withInstall as B } from "@das-fed/upf-utils/with-install/index";
2
+ import { defineComponent as I, ref as f, reactive as d, computed as r, provide as R, createElementBlock as x, openBlock as S, normalizeStyle as M, normalizeClass as z, renderSlot as B } from "vue";
3
+ import { withInstall as $ } from "@das-fed/upf-utils/with-install/index";
4
4
  import "@das-fed/upf-ui/packages/global/theme";
5
- const $ = /* @__PURE__ */ y({
5
+ const k = /* @__PURE__ */ I({
6
6
  __name: "Index",
7
7
  props: {
8
8
  labelLength: { default: 4 },
@@ -20,64 +20,71 @@ const $ = /* @__PURE__ */ y({
20
20
  autoMarginRight: { type: Boolean, default: !1 },
21
21
  size: { default: "default" }
22
22
  },
23
- setup(o, { expose: r }) {
24
- const t = o, n = d();
25
- let l = [];
26
- F("DasForm", _({ props: t, addField: (e) => {
23
+ setup(o, { expose: s }) {
24
+ const a = o, n = f();
25
+ let l = d([]);
26
+ const c = r(() => l.filter((e) => {
27
+ var t;
28
+ return (t = e.formItemProps) == null ? void 0 : t.required;
29
+ }).length > 0), m = r(() => l.filter((e) => {
30
+ var t;
31
+ return (t = e.formItemProps) == null ? void 0 : t.helpMessage;
32
+ }).length > 0);
33
+ R("DasForm", d({ props: a, addField: (e) => {
27
34
  l.push(e);
28
35
  }, removeField: (e) => {
29
- l = l.filter((a) => a.timeStamp !== e.timeStamp);
30
- } }));
31
- const f = async (e) => {
32
- const a = await u();
33
- e(a);
34
- }, c = async (e, a) => {
35
- const h = await l.find((s) => s.propName === e && s.rules.length > 0).validate();
36
- a(h);
37
- }, u = async () => {
36
+ l = l.filter((t) => t.timeStamp !== e.timeStamp);
37
+ }, hasRequiredFormItem: c, hasHelpMessageFormItem: m }));
38
+ const u = async (e) => {
39
+ const t = await g();
40
+ e(t);
41
+ }, p = async (e, t) => {
42
+ const _ = await l.find((i) => i.propName === e && i.rules.length > 0).validate();
43
+ t(_);
44
+ }, g = async () => {
38
45
  let e = !0;
39
- for (const a of l)
40
- a.propName && a.rules.length > 0 && (await a.validate() || (e = !1));
46
+ for (const t of l)
47
+ t.propName && t.rules.length > 0 && (await t.validate() || (e = !1));
41
48
  return e;
42
- }, m = () => {
49
+ }, h = () => {
43
50
  l.forEach((e) => {
44
51
  e.resetError();
45
52
  });
46
- }, p = i(() => ({
53
+ }, v = r(() => ({
47
54
  display: "grid",
48
- gridTemplateColumns: `repeat(${t.cols}, ${t.contentWidth && t.contentWidth !== "auto" ? "min-content" : "1fr"})`,
49
- gridColumnGap: t.cols && t.autoMarginRight ? t.marginRight : void 0
50
- })), g = i(() => ({
51
- alignItems: t.alignItems,
52
- ...t.cols && t.alignType === "vertical" ? p.value : {}
55
+ gridTemplateColumns: `repeat(${a.cols}, ${a.contentWidth && a.contentWidth !== "auto" ? "min-content" : "1fr"})`,
56
+ gridColumnGap: a.cols && a.autoMarginRight ? a.marginRight : void 0
57
+ })), y = r(() => ({
58
+ alignItems: a.alignItems,
59
+ ...a.cols && a.alignType === "vertical" ? v.value : {}
53
60
  }));
54
- return r({
55
- validate: f,
56
- validateField: c,
57
- resetField: m
58
- }), (e, a) => (x(), R(
61
+ return s({
62
+ validate: u,
63
+ validateField: p,
64
+ resetField: h
65
+ }), (e, t) => (S(), x(
59
66
  "div",
60
67
  {
61
- class: I(["das-ui-form", { horizontal: e.alignType === "horizontal" }]),
68
+ class: z(["das-ui-form", { horizontal: e.alignType === "horizontal" }]),
62
69
  ref_key: "$formRef",
63
70
  ref: n,
64
- style: S(g.value)
71
+ style: M(y.value)
65
72
  },
66
73
  [
67
- z(e.$slots, "default", {}, void 0, !0)
74
+ B(e.$slots, "default", {}, void 0, !0)
68
75
  ],
69
76
  6
70
77
  /* CLASS, STYLE */
71
78
  ));
72
79
  }
73
- }), k = (o, r) => {
74
- const t = o.__vccOpts || o;
75
- for (const [n, l] of r)
76
- t[n] = l;
77
- return t;
78
- }, w = /* @__PURE__ */ k($, [["__scopeId", "data-v-d8f87c64"]]), E = B(w), W = () => d(null);
80
+ }), w = (o, s) => {
81
+ const a = o.__vccOpts || o;
82
+ for (const [n, l] of s)
83
+ a[n] = l;
84
+ return a;
85
+ }, C = /* @__PURE__ */ w(k, [["__scopeId", "data-v-e455d465"]]), W = $(C), q = () => f(null);
79
86
  export {
80
- E as DasForm,
81
- W as DasFormRef,
82
- E as default
87
+ W as DasForm,
88
+ q as DasFormRef,
89
+ W as default
83
90
  };
@@ -1 +1 @@
1
- .das-ui-form[data-v-d8f87c64]{display:flex;flex-direction:column;align-content:flex-start}.das-ui-form.horizontal[data-v-d8f87c64]{flex-direction:row;flex-wrap:wrap}.das-ui-form.grid[data-v-d8f87c64]{display:grid;grid-template-columns:repeat(var(--cols),var(--content-width, 1fr));column-gap:var(--gap)}
1
+ .das-ui-form[data-v-e455d465]{display:flex;flex-direction:column;align-content:flex-start}.das-ui-form.horizontal[data-v-e455d465]{flex-direction:row;flex-wrap:wrap}.das-ui-form.grid[data-v-e455d465]{display:grid;grid-template-columns:repeat(var(--cols),var(--content-width, 1fr));column-gap:var(--gap)}