@dazhicheng/ui 1.6.33 → 1.6.34

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,63 +1,65 @@
1
- import { ElColorPicker as d, ElCascader as f, ElUpload as u, ElTreeSelect as O, ElTimePicker as M, ElSwitch as N, ElSelectV2 as P, ElSelect as T, ElRadioGroup as b, ElRadio as C, ElMention as _, ElInputTag as k, ElInputNumber as S, ElDatePicker as h, ElCheckboxGroup as R, ElCheckboxButton as A, ElCheckbox as I } from "element-plus";
2
- import { TtSelect as L } from "../../tt-select/index.js";
3
- import { TtCheckbox as x } from "../../tt-checkbox/index.js";
1
+ import { ElColorPicker as f, ElCascader as d, ElUpload as u, ElTreeSelect as T, ElTimePicker as O, ElSwitch as M, ElSelectV2 as N, ElSelect as P, ElRadioGroup as b, ElRadio as C, ElMention as _, ElInputTag as k, ElInputNumber as S, ElDatePicker as h, ElCheckboxGroup as I, ElCheckboxButton as R, ElCheckbox as x } from "element-plus";
2
+ import { TtSelect as A } from "../../tt-select/index.js";
3
+ import { TtCheckbox as L } from "../../tt-checkbox/index.js";
4
4
  import { TtRadioGroup as y } from "../../tt-radio-group/index.js";
5
5
  import { TtPanelSelect as D } from "../../tt-panel-select/index.js";
6
6
  import { TtUpload as F } from "../../tt-upload/index.js";
7
7
  import { TtApiComponent as U } from "../../tt-api-component/index.js";
8
- import { globalShareState as G } from "./shared/global-state.js";
9
- import { defineRule as V } from "vee-validate";
10
- import j from "./components/FormElInput.vue.js";
11
- const p = "modelValue", g = {}, B = {
12
- TtSelect: L,
13
- TtCheckbox: x,
8
+ import { TtInputTextarea as G } from "../../tt-input-textarea/index.js";
9
+ import { globalShareState as V } from "./shared/global-state.js";
10
+ import { defineRule as j } from "vee-validate";
11
+ import g from "./components/FormElInput.vue.js";
12
+ const p = "modelValue", B = {}, v = {
13
+ TtSelect: A,
14
+ TtCheckbox: L,
14
15
  TtRadioGroup: y,
15
16
  TtUpload: F,
16
- ElCheckbox: I,
17
- ElCheckboxButton: A,
18
- ElCheckboxGroup: R,
17
+ TtInputTextarea: G,
18
+ ElCheckbox: x,
19
+ ElCheckboxButton: R,
20
+ ElCheckboxGroup: I,
19
21
  ElDatePicker: h,
20
- ElInput: j,
22
+ ElInput: g,
21
23
  ElInputNumber: S,
22
24
  ElInputTag: k,
23
25
  ElMention: _,
24
26
  ElRadio: C,
25
27
  ElRadioGroup: b,
26
- ElSelect: T,
27
- ElSelectV2: P,
28
- ElSwitch: N,
29
- ElTimePicker: M,
30
- ElTreeSelect: O,
28
+ ElSelect: P,
29
+ ElSelectV2: N,
30
+ ElSwitch: M,
31
+ ElTimePicker: O,
32
+ ElTreeSelect: T,
31
33
  ElUpload: u,
32
- ElCascader: f,
33
- ElColorPicker: d,
34
+ ElCascader: d,
35
+ ElColorPicker: f,
34
36
  TtApiComponent: U,
35
37
  TtPanelSelect: D
36
38
  }, i = {
37
39
  ElUpload: "fileList"
38
40
  };
39
- function Y(a) {
40
- const { config: e, defineRules: l } = a, {
41
+ function $(a) {
42
+ const { config: e, defineRules: r } = a, {
41
43
  disabledOnChangeListener: c = !0,
42
44
  disabledOnInputListener: s = !0,
43
45
  emptyStateValue: E = void 0
44
46
  } = e || {};
45
- if (Object.assign(g, {
47
+ if (Object.assign(B, {
46
48
  disabledOnChangeListener: c,
47
49
  disabledOnInputListener: s,
48
50
  emptyStateValue: E
49
- }), l)
50
- for (const o of Object.keys(l))
51
- V(o, l[o]);
52
- const m = (e == null ? void 0 : e.baseModelPropName) ?? p, r = e == null ? void 0 : e.modelPropNameMap, n = G.getComponents();
51
+ }), r)
52
+ for (const o of Object.keys(r))
53
+ j(o, r[o]);
54
+ const m = (e == null ? void 0 : e.baseModelPropName) ?? p, l = e == null ? void 0 : e.modelPropNameMap, n = V.getComponents();
53
55
  for (const o of Object.keys(n)) {
54
56
  const t = o;
55
- B[t] = n[o], m !== p && (i[t] = m), r && r[t] && (i[t] = r[t]);
57
+ v[t] = n[o], m !== p && (i[t] = m), l && l[t] && (i[t] = l[t]);
56
58
  }
57
59
  }
58
60
  export {
59
61
  i as COMPONENT_BIND_EVENT_MAP,
60
- B as COMPONENT_MAP,
61
- g as DEFAULT_FORM_COMMON_CONFIG,
62
- Y as setupForm
62
+ v as COMPONENT_MAP,
63
+ B as DEFAULT_FORM_COMMON_CONFIG,
64
+ $ as setupForm
63
65
  };
@@ -1,7 +1,7 @@
1
1
  import { unref as V, ref as n, shallowRef as N, computed as O, watch as j, toRaw as k } from "vue";
2
2
  import "axios";
3
3
  import "element-plus";
4
- import { isFunction as o, isBoolean as E, isObject as A, isString as q } from "../../../../packages/utils/src/is.js";
4
+ import { isFunction as o, isBoolean as I, isObject as A, isString as q } from "../../../../packages/utils/src/is.js";
5
5
  import "dayjs";
6
6
  import "numeral";
7
7
  import "xe-utils";
@@ -16,76 +16,83 @@ import "lodash-es";
16
16
  import { get as B } from "es-toolkit/compat";
17
17
  import { useFormValues as C } from "vee-validate";
18
18
  import { injectFormProps as K } from "../useFormContext.js";
19
- const M = /* @__PURE__ */ new Set(["ElInput", "FormElInput", "ElInputNumber", "ElInputTag", "ElMention"]);
20
- function ar(r) {
21
- const t = q(r) ? r : (r == null ? void 0 : r.name) ?? (r == null ? void 0 : r.__name);
19
+ const M = /* @__PURE__ */ new Set([
20
+ "ElInput",
21
+ "FormElInput",
22
+ "ElInputNumber",
23
+ "ElInputTag",
24
+ "ElMention",
25
+ "TtInputTextarea"
26
+ ]);
27
+ function ae(e) {
28
+ const t = q(e) ? e : (e == null ? void 0 : e.name) ?? (e == null ? void 0 : e.__name);
22
29
  return q(t) && M.has(t) ? "required" : "selectRequired";
23
30
  }
24
- function W(r, t) {
31
+ function W(e, t) {
25
32
  if (t.startsWith("[") && t.endsWith("]")) {
26
- const p = t.slice(1, -1);
27
- return r[p];
33
+ const w = t.slice(1, -1);
34
+ return e[w];
28
35
  }
29
- return B(r, t);
36
+ return B(e, t);
30
37
  }
31
- function or(r) {
32
- var x;
33
- const t = C(), [p] = K(), s = V(p).formApi;
38
+ function oe(e) {
39
+ var E;
40
+ const t = C(), [w] = K(), s = V(w).formApi;
34
41
  if (!t)
35
42
  throw new Error("useDependencies should be used within <TtForm>");
36
43
  const l = n(!0), f = n(!1), m = n(!0), g = n(!1), h = n({}), F = N(), S = O(() => {
37
44
  var i;
38
- return (((i = r()) == null ? void 0 : i.triggerFields) ?? []).map((d) => W(t.value, d));
45
+ return (((i = e()) == null ? void 0 : i.triggerFields) ?? []).map((d) => W(t.value, d));
39
46
  });
40
- let I = 0;
47
+ let x = 0;
41
48
  return j(
42
- [S, r],
49
+ [S, e],
43
50
  async ([_, i]) => {
44
51
  var b;
45
52
  if (!i || !((b = i == null ? void 0 : i.triggerFields) != null && b.length))
46
53
  return;
47
- const d = ++I, u = () => d !== I, { componentProps: R, disabled: v, if: c, required: y, rules: P, show: w, trigger: T } = i, a = t.value;
54
+ const d = ++x, u = () => d !== x, { componentProps: T, disabled: v, if: c, required: R, rules: y, show: p, trigger: P } = i, a = t.value;
48
55
  if (o(c)) {
49
- const e = !!await c(a, s);
50
- if (u() || (l.value = e, !l.value)) return;
51
- } else if (E(c)) {
56
+ const r = !!await c(a, s);
57
+ if (u() || (l.value = r, !l.value)) return;
58
+ } else if (I(c)) {
52
59
  if (l.value = c, !l.value) return;
53
60
  } else
54
61
  l.value = !0;
55
- if (o(w)) {
56
- const e = !!await w(a, s);
62
+ if (o(p)) {
63
+ const r = !!await p(a, s);
57
64
  if (u()) return;
58
- m.value = e;
59
- } else E(w) ? m.value = w : m.value = !0;
60
- if (o(R)) {
61
- const e = await R(a, s);
65
+ m.value = r;
66
+ } else I(p) ? m.value = p : m.value = !0;
67
+ if (o(T)) {
68
+ const r = await T(a, s);
62
69
  if (u()) return;
63
- h.value = e;
70
+ h.value = r;
64
71
  } else
65
72
  h.value = {};
66
- if (o(P)) {
67
- const e = await P(a, s);
73
+ if (o(y)) {
74
+ const r = await y(a, s);
68
75
  if (u()) return;
69
- F.value = A(e) ? k(e) : e;
76
+ F.value = A(r) ? k(r) : r;
70
77
  } else
71
78
  F.value = void 0;
72
79
  if (o(v)) {
73
- const e = !!await v(a, s);
80
+ const r = !!await v(a, s);
74
81
  if (u()) return;
75
- f.value = e;
76
- } else E(v) ? f.value = v : f.value = !1;
77
- if (o(y)) {
78
- const e = !!await y(a, s);
82
+ f.value = r;
83
+ } else I(v) ? f.value = v : f.value = !1;
84
+ if (o(R)) {
85
+ const r = !!await R(a, s);
79
86
  if (u()) return;
80
- g.value = e;
87
+ g.value = r;
81
88
  } else
82
89
  g.value = !1;
83
- if (o(T)) {
90
+ if (o(P)) {
84
91
  if (u()) return;
85
- await T(a, s);
92
+ await P(a, s);
86
93
  }
87
94
  },
88
- { deep: !0, immediate: ((x = r()) == null ? void 0 : x.immediate) ?? !0 }
95
+ { deep: !0, immediate: ((E = e()) == null ? void 0 : E.immediate) ?? !0 }
89
96
  ), {
90
97
  dynamicComponentProps: h,
91
98
  dynamicRules: F,
@@ -96,7 +103,7 @@ function or(r) {
96
103
  };
97
104
  }
98
105
  export {
99
- or as default,
100
- ar as resolveRequiredRuleName,
106
+ oe as default,
107
+ ae as resolveRequiredRuleName,
101
108
  W as resolveValueByFieldName
102
109
  };
@@ -11,12 +11,14 @@ import { FieldEntry, FieldArrayContext } from './types/forms';
11
11
  import { PanelContainerProps } from '../../tt-panel-select';
12
12
  import { TtRadioGroupProp } from '../../tt-radio-group';
13
13
  import { TtCheckboxProp } from '../../tt-checkbox';
14
+ import { TtInputTextareaProps } from '../../tt-input-textarea';
14
15
  import { FormApi } from './formApi';
15
16
  export type FormLayout = "horizontal" | "inline" | "vertical";
16
17
  export interface BaseFormComponentMap {
17
18
  TtSelect: TtSelectProp;
18
19
  TtCheckbox: TtCheckboxProp;
19
20
  TtRadioGroup: TtRadioGroupProp;
21
+ TtInputTextarea: TtInputTextareaProps;
20
22
  ElCheckbox: CheckboxProps;
21
23
  ElCheckboxButton: CheckboxProps;
22
24
  ElCheckboxGroup: CheckboxGroupProps;
@@ -0,0 +1,6 @@
1
+ import { SFCWithInstall } from '../../../../utils/src';
2
+ import { default as TtInputTextareaConstructor } from './index.vue';
3
+ export declare const TtInputTextarea: SFCWithInstall<typeof TtInputTextareaConstructor>;
4
+ export default TtInputTextarea;
5
+ export type TtInputTextareaInstance = InstanceType<typeof TtInputTextarea>;
6
+ export type { TtInputTextareaProps, TtInputTextareaEmits, TtInputTextareaExpose } from './types';
@@ -0,0 +1,22 @@
1
+ import "axios";
2
+ import "element-plus";
3
+ import "dayjs";
4
+ import "vue";
5
+ import { withInstall as t } from "../../packages/utils/src/install.js";
6
+ import "numeral";
7
+ import "xe-utils";
8
+ import "dayjs/plugin/utc";
9
+ import "dayjs/plugin/timezone";
10
+ import "../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
11
+ import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
12
+ import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
13
+ import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
14
+ import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
15
+ import "lodash-es";
16
+ import o from "./index.vue.js";
17
+ /* empty css */
18
+ const h = t(o);
19
+ export {
20
+ h as TtInputTextarea,
21
+ h as default
22
+ };