@aplus-frontend/ui 7.7.11 → 7.9.0

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.
Files changed (153) hide show
  1. package/es/index.mjs +230 -226
  2. package/es/src/ag-grid/index.vue.mjs +53 -52
  3. package/es/src/ag-grid/style/index.mjs +9 -4
  4. package/es/src/ap-field/hooks/use-default-placeholder.d.ts +2 -1
  5. package/es/src/ap-field/hooks/use-default-placeholder.mjs +8 -7
  6. package/es/src/ap-field/index.d.ts +10 -2
  7. package/es/src/ap-field/index.mjs +65 -58
  8. package/es/src/ap-field/interface.d.ts +11 -0
  9. package/es/src/ap-field/second/helper.d.ts +7 -0
  10. package/es/src/ap-field/second/helper.mjs +9 -0
  11. package/es/src/ap-field/second/index.vue.d.ts +44 -0
  12. package/es/src/ap-field/second/index.vue.mjs +90 -0
  13. package/es/src/ap-field/second/index.vue2.mjs +4 -0
  14. package/es/src/ap-field/second/read.vue.d.ts +6 -0
  15. package/es/src/ap-field/second/read.vue.mjs +4 -0
  16. package/es/src/ap-field/second/read.vue2.mjs +58 -0
  17. package/es/src/ap-field/style/textarea.mjs +15 -5
  18. package/es/src/ap-field/text-area/index.vue.d.ts +3 -0
  19. package/es/src/ap-field/text-area/index.vue.mjs +44 -28
  20. package/es/src/ap-field/text-area/read.vue.d.ts +3 -0
  21. package/es/src/ap-field/text-area/read.vue2.mjs +26 -8
  22. package/es/src/ap-field/text-area/utils.d.ts +1 -0
  23. package/es/src/ap-field/text-area/utils.mjs +13 -0
  24. package/es/src/ap-form/items/text-area/index.vue.d.ts +12 -0
  25. package/es/src/ap-table/constants.d.ts +9 -0
  26. package/es/src/ap-table/style/index.d.ts +2 -2
  27. package/es/src/ap-table/style/index.mjs +3 -3
  28. package/es/src/business/ag-grid-modal/hooks/use-ag-grid-select-modal.mjs +20 -19
  29. package/es/src/business/ag-grid-modal/hooks/use-modal-title.d.ts +9 -0
  30. package/es/src/business/ag-grid-modal/hooks/use-modal-title.mjs +14 -10
  31. package/es/src/business/ap-batch-action-group/MenuItemGroup.vue2.mjs +19 -19
  32. package/es/src/business/ap-batch-action-group/interface.d.ts +4 -1
  33. package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +73 -71
  34. package/es/src/index.d.ts +1 -0
  35. package/es/src/index.mjs +290 -286
  36. package/es/src/skeleton/components/desc/index.vue.d.ts +6 -0
  37. package/es/src/skeleton/components/desc/index.vue.mjs +4 -0
  38. package/es/src/skeleton/components/desc/index.vue2.mjs +37 -0
  39. package/es/src/skeleton/components/desc/item-large.vue.d.ts +6 -0
  40. package/es/src/skeleton/components/desc/item-large.vue.mjs +4 -0
  41. package/es/src/skeleton/components/desc/item-large.vue2.mjs +72 -0
  42. package/es/src/skeleton/components/desc/item.vue.d.ts +7 -0
  43. package/es/src/skeleton/components/desc/item.vue.mjs +4 -0
  44. package/es/src/skeleton/components/desc/item.vue2.mjs +69 -0
  45. package/es/src/skeleton/components/line/index.d.ts +14 -0
  46. package/es/src/skeleton/components/line/index.mjs +26 -0
  47. package/es/src/skeleton/components/list/index.vue.d.ts +10 -0
  48. package/es/src/skeleton/components/list/index.vue.mjs +4 -0
  49. package/es/src/skeleton/components/list/index.vue2.mjs +49 -0
  50. package/es/src/skeleton/components/list/item.vue.d.ts +6 -0
  51. package/es/src/skeleton/components/list/item.vue.mjs +4 -0
  52. package/es/src/skeleton/components/list/item.vue2.mjs +57 -0
  53. package/es/src/skeleton/components/page-header/index.vue.d.ts +6 -0
  54. package/es/src/skeleton/components/page-header/index.vue.mjs +4 -0
  55. package/es/src/skeleton/components/page-header/index.vue2.mjs +24 -0
  56. package/es/src/skeleton/components/search-form/index.vue.d.ts +6 -0
  57. package/es/src/skeleton/components/search-form/index.vue.mjs +4 -0
  58. package/es/src/skeleton/components/search-form/index.vue2.mjs +99 -0
  59. package/es/src/skeleton/components/table/index.vue.d.ts +11 -0
  60. package/es/src/skeleton/components/table/index.vue.mjs +4 -0
  61. package/es/src/skeleton/components/table/index.vue2.mjs +78 -0
  62. package/es/src/skeleton/components/table/item.vue.d.ts +9 -0
  63. package/es/src/skeleton/components/table/item.vue.mjs +4 -0
  64. package/es/src/skeleton/components/table/item.vue2.mjs +80 -0
  65. package/es/src/skeleton/descriptions.vue.d.ts +8 -0
  66. package/es/src/skeleton/descriptions.vue.mjs +4 -0
  67. package/es/src/skeleton/descriptions.vue2.mjs +37 -0
  68. package/es/src/skeleton/index.d.ts +9 -0
  69. package/es/src/skeleton/index.mjs +12 -0
  70. package/es/src/skeleton/interface.d.ts +12 -0
  71. package/es/src/skeleton/interface.mjs +1 -0
  72. package/es/src/skeleton/list-page.vue.d.ts +10 -0
  73. package/es/src/skeleton/list-page.vue.mjs +4 -0
  74. package/es/src/skeleton/list-page.vue2.mjs +50 -0
  75. package/es/src/version.d.ts +1 -1
  76. package/es/src/version.mjs +1 -1
  77. package/lib/index.js +1 -1
  78. package/lib/src/ag-grid/index.vue.js +1 -1
  79. package/lib/src/ag-grid/style/index.js +1 -1
  80. package/lib/src/ap-field/hooks/use-default-placeholder.d.ts +2 -1
  81. package/lib/src/ap-field/hooks/use-default-placeholder.js +1 -1
  82. package/lib/src/ap-field/index.d.ts +10 -2
  83. package/lib/src/ap-field/index.js +1 -1
  84. package/lib/src/ap-field/interface.d.ts +11 -0
  85. package/lib/src/ap-field/second/helper.d.ts +7 -0
  86. package/lib/src/ap-field/second/helper.js +1 -0
  87. package/lib/src/ap-field/second/index.vue.d.ts +44 -0
  88. package/lib/src/ap-field/second/index.vue.js +1 -0
  89. package/lib/src/ap-field/second/index.vue2.js +1 -0
  90. package/lib/src/ap-field/second/read.vue.d.ts +6 -0
  91. package/lib/src/ap-field/second/read.vue.js +1 -0
  92. package/lib/src/ap-field/second/read.vue2.js +1 -0
  93. package/lib/src/ap-field/style/textarea.js +1 -1
  94. package/lib/src/ap-field/text-area/index.vue.d.ts +3 -0
  95. package/lib/src/ap-field/text-area/index.vue.js +1 -1
  96. package/lib/src/ap-field/text-area/read.vue.d.ts +3 -0
  97. package/lib/src/ap-field/text-area/read.vue2.js +1 -1
  98. package/lib/src/ap-field/text-area/utils.d.ts +1 -0
  99. package/lib/src/ap-field/text-area/utils.js +1 -0
  100. package/lib/src/ap-form/items/text-area/index.vue.d.ts +12 -0
  101. package/lib/src/ap-table/constants.d.ts +9 -0
  102. package/lib/src/ap-table/style/index.d.ts +2 -2
  103. package/lib/src/ap-table/style/index.js +1 -1
  104. package/lib/src/business/ag-grid-modal/hooks/use-ag-grid-select-modal.js +1 -1
  105. package/lib/src/business/ag-grid-modal/hooks/use-modal-title.d.ts +9 -0
  106. package/lib/src/business/ag-grid-modal/hooks/use-modal-title.js +1 -1
  107. package/lib/src/business/ap-batch-action-group/MenuItemGroup.vue2.js +1 -1
  108. package/lib/src/business/ap-batch-action-group/interface.d.ts +4 -1
  109. package/lib/src/business/ap-expand-alert/ApExpandAlert.vue2.js +1 -1
  110. package/lib/src/index.d.ts +1 -0
  111. package/lib/src/index.js +1 -1
  112. package/lib/src/skeleton/components/desc/index.vue.d.ts +6 -0
  113. package/lib/src/skeleton/components/desc/index.vue.js +1 -0
  114. package/lib/src/skeleton/components/desc/index.vue2.js +1 -0
  115. package/lib/src/skeleton/components/desc/item-large.vue.d.ts +6 -0
  116. package/lib/src/skeleton/components/desc/item-large.vue.js +1 -0
  117. package/lib/src/skeleton/components/desc/item-large.vue2.js +1 -0
  118. package/lib/src/skeleton/components/desc/item.vue.d.ts +7 -0
  119. package/lib/src/skeleton/components/desc/item.vue.js +1 -0
  120. package/lib/src/skeleton/components/desc/item.vue2.js +1 -0
  121. package/lib/src/skeleton/components/line/index.d.ts +14 -0
  122. package/lib/src/skeleton/components/line/index.js +1 -0
  123. package/lib/src/skeleton/components/list/index.vue.d.ts +10 -0
  124. package/lib/src/skeleton/components/list/index.vue.js +1 -0
  125. package/lib/src/skeleton/components/list/index.vue2.js +1 -0
  126. package/lib/src/skeleton/components/list/item.vue.d.ts +6 -0
  127. package/lib/src/skeleton/components/list/item.vue.js +1 -0
  128. package/lib/src/skeleton/components/list/item.vue2.js +1 -0
  129. package/lib/src/skeleton/components/page-header/index.vue.d.ts +6 -0
  130. package/lib/src/skeleton/components/page-header/index.vue.js +1 -0
  131. package/lib/src/skeleton/components/page-header/index.vue2.js +1 -0
  132. package/lib/src/skeleton/components/search-form/index.vue.d.ts +6 -0
  133. package/lib/src/skeleton/components/search-form/index.vue.js +1 -0
  134. package/lib/src/skeleton/components/search-form/index.vue2.js +1 -0
  135. package/lib/src/skeleton/components/table/index.vue.d.ts +11 -0
  136. package/lib/src/skeleton/components/table/index.vue.js +1 -0
  137. package/lib/src/skeleton/components/table/index.vue2.js +1 -0
  138. package/lib/src/skeleton/components/table/item.vue.d.ts +9 -0
  139. package/lib/src/skeleton/components/table/item.vue.js +1 -0
  140. package/lib/src/skeleton/components/table/item.vue2.js +1 -0
  141. package/lib/src/skeleton/descriptions.vue.d.ts +8 -0
  142. package/lib/src/skeleton/descriptions.vue.js +1 -0
  143. package/lib/src/skeleton/descriptions.vue2.js +1 -0
  144. package/lib/src/skeleton/index.d.ts +9 -0
  145. package/lib/src/skeleton/index.js +1 -0
  146. package/lib/src/skeleton/interface.d.ts +12 -0
  147. package/lib/src/skeleton/interface.js +1 -0
  148. package/lib/src/skeleton/list-page.vue.d.ts +10 -0
  149. package/lib/src/skeleton/list-page.vue.js +1 -0
  150. package/lib/src/skeleton/list-page.vue2.js +1 -0
  151. package/lib/src/version.d.ts +1 -1
  152. package/lib/src/version.js +1 -1
  153. package/package.json +3 -3
@@ -0,0 +1,44 @@
1
+ import { ApFieldSecondProps } from '../interface';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ import { ValueType } from '@aplus-frontend/antdv/es/input-number/src/utils/MiniDecimal';
4
+ type ApFieldSecondSlots = {
5
+ addonBefore?: any;
6
+ addonAfter?: any;
7
+ prefix?: any;
8
+ default?: any;
9
+ upIcon?: any;
10
+ downIcon?: any;
11
+ };
12
+ declare function __VLS_template(): {
13
+ attrs: Partial<{}>;
14
+ slots: Readonly<ApFieldSecondSlots> & ApFieldSecondSlots;
15
+ refs: {};
16
+ rootEl: any;
17
+ };
18
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
19
+ declare const __VLS_component: DefineComponent<ApFieldSecondProps, {
20
+ focus: () => void;
21
+ blur: () => void;
22
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
23
+ "update:value": (...args: any[]) => void;
24
+ }, string, PublicProps, Readonly<ApFieldSecondProps> & Readonly<{
25
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
26
+ }>, {
27
+ step: ValueType;
28
+ disabled: boolean;
29
+ keyboard: boolean;
30
+ bordered: boolean;
31
+ emptyText: string;
32
+ changeOnWheel: boolean;
33
+ changeOnBlur: boolean;
34
+ min: ValueType;
35
+ max: ValueType;
36
+ controls: boolean;
37
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
38
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
39
+ export default _default;
40
+ type __VLS_WithTemplateSlots<T, S> = T & {
41
+ new (): {
42
+ $slots: S;
43
+ };
44
+ };
@@ -0,0 +1,90 @@
1
+ import { defineComponent as h, shallowRef as B, useSlots as b, createElementBlock as x, createBlock as S, openBlock as r, toDisplayString as _, unref as e, mergeProps as g, createSlots as k, renderList as C, withCtx as P, renderSlot as I, normalizeProps as U, guardReactiveProps as w } from "vue";
2
+ import "../../hooks/index.mjs";
3
+ import { formatSecond as R } from "./helper.mjs";
4
+ import { InputNumber as V } from "@aplus-frontend/antdv";
5
+ import { useDefaultPlaceholder as z } from "../hooks/use-default-placeholder.mjs";
6
+ import { omit as A } from "lodash-unified";
7
+ import { useControllableValue as D } from "../../hooks/useControllableValue.mjs";
8
+ const E = { key: 0 }, q = /* @__PURE__ */ h({
9
+ name: "ApFieldSecond",
10
+ __name: "index",
11
+ props: {
12
+ mode: {},
13
+ class: {},
14
+ style: {},
15
+ size: {},
16
+ bordered: { type: Boolean, default: !0 },
17
+ placeholder: {},
18
+ name: {},
19
+ id: {},
20
+ type: {},
21
+ addonBefore: {},
22
+ addonAfter: {},
23
+ prefix: {},
24
+ suffix: {},
25
+ "onUpdate:value": {},
26
+ valueModifiers: {},
27
+ status: {},
28
+ variant: {},
29
+ changeOnWheel: { type: Boolean, default: void 0 },
30
+ changeOnBlur: { type: Boolean, default: void 0 },
31
+ stringMode: { type: Boolean },
32
+ defaultValue: {},
33
+ value: {},
34
+ prefixCls: {},
35
+ min: { default: -1 / 0 },
36
+ max: { default: 1 / 0 },
37
+ step: { default: 1 },
38
+ tabindex: {},
39
+ controls: { type: Boolean, default: !0 },
40
+ readonly: { type: Boolean },
41
+ disabled: { type: Boolean, default: void 0 },
42
+ autofocus: { type: Boolean },
43
+ keyboard: { type: Boolean, default: !0 },
44
+ parser: {},
45
+ formatter: {},
46
+ precision: {},
47
+ decimalSeparator: {},
48
+ onInput: {},
49
+ onChange: {},
50
+ onPressEnter: {},
51
+ onStep: {},
52
+ onBlur: {},
53
+ onFocus: {},
54
+ emptyText: { default: "--" }
55
+ },
56
+ emits: ["update:value"],
57
+ setup(u, { expose: d, emit: s }) {
58
+ const o = u, p = s, t = B(), { value: a, updateValue: i } = D(
59
+ o,
60
+ p
61
+ ), f = b(), c = z("Second", o);
62
+ function m() {
63
+ t.value?.focus();
64
+ }
65
+ function y() {
66
+ t.value?.blur();
67
+ }
68
+ return d({ focus: m, blur: y }), (l, F) => l.mode === "read" ? (r(), x("span", E, _(e(R)(Number(e(a)))), 1)) : (r(), S(e(V), g(
69
+ {
70
+ key: 1,
71
+ min: 0,
72
+ style: { width: "100%" },
73
+ placeholder: e(c),
74
+ value: e(a)
75
+ },
76
+ e(A)(o, ["value", "onUpdate:value", "min", "placeholder", "mode"]),
77
+ { "onUpdate:value": e(i) }
78
+ ), k({ _: 2 }, [
79
+ C(f, (M, n) => ({
80
+ name: n,
81
+ fn: P((v) => [
82
+ I(l.$slots, n, U(w(v || {})))
83
+ ])
84
+ }))
85
+ ]), 1040, ["placeholder", "value", "onUpdate:value"]));
86
+ }
87
+ });
88
+ export {
89
+ q as default
90
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./index.vue.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,6 @@
1
+ import { ApFieldSecondProps } from '../interface';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ declare const _default: DefineComponent<ApFieldSecondProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApFieldSecondProps> & Readonly<{}>, {
4
+ emptyText: string;
5
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLSpanElement>;
6
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import f from "./read.vue2.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,58 @@
1
+ import { defineComponent as n, createElementBlock as t, openBlock as r, toDisplayString as l, unref as p } from "vue";
2
+ import { formatSecond as s } from "./helper.mjs";
3
+ const m = /* @__PURE__ */ n({
4
+ name: "ApFieldSecond",
5
+ __name: "read",
6
+ props: {
7
+ mode: {},
8
+ class: {},
9
+ style: {},
10
+ size: {},
11
+ bordered: { type: Boolean },
12
+ placeholder: {},
13
+ name: {},
14
+ id: {},
15
+ type: {},
16
+ addonBefore: {},
17
+ addonAfter: {},
18
+ prefix: {},
19
+ suffix: {},
20
+ "onUpdate:value": {},
21
+ valueModifiers: {},
22
+ status: {},
23
+ variant: {},
24
+ changeOnWheel: { type: Boolean },
25
+ changeOnBlur: { type: Boolean },
26
+ stringMode: { type: Boolean },
27
+ defaultValue: {},
28
+ value: {},
29
+ prefixCls: {},
30
+ min: {},
31
+ max: {},
32
+ step: {},
33
+ tabindex: {},
34
+ controls: { type: Boolean },
35
+ readonly: { type: Boolean },
36
+ disabled: { type: Boolean },
37
+ autofocus: { type: Boolean },
38
+ keyboard: { type: Boolean },
39
+ parser: {},
40
+ formatter: {},
41
+ precision: {},
42
+ decimalSeparator: {},
43
+ onInput: {},
44
+ onChange: {},
45
+ onPressEnter: {},
46
+ onStep: {},
47
+ onBlur: {},
48
+ onFocus: {},
49
+ emptyText: { default: "--" }
50
+ },
51
+ setup(o) {
52
+ const a = o;
53
+ return (e, d) => (r(), t("span", null, l(e.value ? p(s)(Number(a.value)) : e.emptyText), 1));
54
+ }
55
+ });
56
+ export {
57
+ m as default
58
+ };
@@ -1,12 +1,22 @@
1
- const t = (a) => {
2
- const { componentCls: e } = a;
1
+ const a = (e) => {
2
+ const { componentCls: r } = e;
3
3
  return {
4
- [`${e}-textarea--read`]: {
4
+ [`${r}-textarea--read`]: {
5
5
  whiteSpace: "pre-wrap",
6
6
  wordWrap: "break-word",
7
7
  wordBreak: "break-all"
8
8
  },
9
- [`${e}-textarea`]: {
9
+ [`${r}-textarea--code`]: {
10
+ padding: e.spaceXL,
11
+ overflow: "auto",
12
+ fontSize: "85%",
13
+ lineHeight: 1.45,
14
+ color: e.textColor2,
15
+ backgroundColor: "rgba(150, 150, 150, 0.1)",
16
+ borderRadius: e.borderRadiusSM,
17
+ width: "min-content"
18
+ },
19
+ [`${r}-textarea`]: {
10
20
  "&.ant-input-affix-wrapper-textarea-with-clear-btn .ant-input-clear-icon": {
11
21
  insetBlockStart: "9px"
12
22
  // (28 - 10) / 2
@@ -15,5 +25,5 @@ const t = (a) => {
15
25
  };
16
26
  };
17
27
  export {
18
- t as genTextareaStyle
28
+ a as genTextareaStyle
19
29
  };
@@ -18,6 +18,9 @@ declare const _default: DefineComponent<ApFieldTextAreaProps, {
18
18
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
19
19
  }>, {
20
20
  type: "number" | "reset" | "submit" | "button" | "search" | "time" | "month" | "date" | "week" | "hidden" | "checkbox" | "radio" | "color" | "text" | "range" | "image" | "tel" | "url" | "email" | "datetime-local" | "file" | "password";
21
+ code: boolean | {
22
+ language?: "text" | "json";
23
+ };
21
24
  mode: FieldMode;
22
25
  disabled: boolean;
23
26
  bordered: boolean;
@@ -1,13 +1,14 @@
1
- import { defineComponent as B, shallowRef as b, computed as I, createElementBlock as A, createBlock as C, openBlock as s, normalizeClass as g, unref as e, toDisplayString as z, mergeProps as T } from "vue";
2
- import { isNil as w, omit as k } from "lodash-unified";
1
+ import { defineComponent as A, shallowRef as k, computed as c, createElementBlock as s, createBlock as z, openBlock as n, Fragment as T, normalizeClass as m, unref as e, toDisplayString as f, createElementVNode as w, mergeProps as R } from "vue";
2
+ import { isNil as F, omit as S } from "lodash-unified";
3
3
  import "../../hooks/index.mjs";
4
4
  import "../../config-provider/index.mjs";
5
- import { Input as R } from "@aplus-frontend/antdv";
6
- import { useDefaultPlaceholder as S } from "../hooks/use-default-placeholder.mjs";
7
- import _ from "../style/index.mjs";
8
- import { useControllableValue as U } from "../../hooks/useControllableValue.mjs";
9
- import { useNamespace as V } from "../../config-provider/hooks/use-namespace.mjs";
10
- const q = /* @__PURE__ */ B({
5
+ import { Input as V } from "@aplus-frontend/antdv";
6
+ import { useDefaultPlaceholder as E } from "../hooks/use-default-placeholder.mjs";
7
+ import U from "../style/index.mjs";
8
+ import { languageFormat as _ } from "./utils.mjs";
9
+ import { useControllableValue as j } from "../../hooks/useControllableValue.mjs";
10
+ import { useNamespace as M } from "../../config-provider/hooks/use-namespace.mjs";
11
+ const L = /* @__PURE__ */ A({
11
12
  name: "ApFieldTextArea",
12
13
  __name: "index",
13
14
  props: {
@@ -59,40 +60,55 @@ const q = /* @__PURE__ */ B({
59
60
  clearIcon: {},
60
61
  allowClear: { type: Boolean, default: !0 },
61
62
  emptyText: { default: "--" },
62
- beforeInput: {}
63
+ beforeInput: {},
64
+ code: { type: [Boolean, Object], default: !1 }
63
65
  },
64
66
  emits: ["update:value"],
65
- setup(i, { expose: d, emit: c }) {
66
- const o = b(), a = i, m = c, { value: l, updateValue: f } = U(a, m), { b: y, m: x } = V("field-textarea"), r = _("field"), v = S("TextArea", a);
67
- function h(t) {
68
- const n = t.target.value || "", u = a.beforeInput ? a.beforeInput?.(n) : n, p = o.value?.$el?.querySelector("textarea");
69
- p && (p.value = u), f(u);
67
+ setup(y, { expose: g, emit: v }) {
68
+ const a = k(), o = y, x = v, { value: l, updateValue: h } = j(o, x), { b: B, m: p } = M("field-textarea"), r = U("field"), b = E("TextArea", o), I = c(() => {
69
+ if (o.code)
70
+ return o.code === !0 ? {
71
+ language: "text"
72
+ } : {
73
+ language: o.code?.language ?? "text"
74
+ };
75
+ });
76
+ function C(t) {
77
+ const u = t.target.value || "", d = o.beforeInput ? o.beforeInput?.(u) : u, i = a.value?.$el?.querySelector("textarea");
78
+ i && (i.value = d), h(d);
70
79
  }
71
- return d({
80
+ return g({
72
81
  focus: (t) => {
73
- o.value?.focus(t);
82
+ a.value?.focus(t);
74
83
  },
75
84
  blur: () => {
76
- o.value?.blur();
85
+ a.value?.blur();
77
86
  },
78
- resizableTextArea: I(() => o.value?.resizableTextArea)
79
- }), (t, n) => t.mode === "read" ? (s(), A("span", {
80
- key: 0,
81
- class: g([e(x)("read"), e(r)])
82
- }, z(e(w)(e(l)) || e(l) === "" ? t.emptyText : e(l)), 3)) : (s(), C(e(R).TextArea, T(
87
+ resizableTextArea: c(() => a.value?.resizableTextArea)
88
+ }), (t, u) => t.mode === "read" ? (n(), s(T, { key: 0 }, [
89
+ t.code ? (n(), s("pre", {
90
+ key: 1,
91
+ class: m([e(p)("code"), e(r)])
92
+ }, [
93
+ w("code", null, f(e(_)(e(l), I.value.language)), 1)
94
+ ], 2)) : (n(), s("span", {
95
+ key: 0,
96
+ class: m([e(p)("read"), e(r)])
97
+ }, f(e(F)(e(l)) || e(l) === "" ? t.emptyText : e(l)), 3))
98
+ ], 64)) : (n(), z(e(V).TextArea, R(
83
99
  { key: 1 },
84
- e(k)(a, ["onUpdate:value", "value", "beforeInput", "emptyText"]),
100
+ e(S)(o, ["onUpdate:value", "value", "beforeInput", "emptyText"]),
85
101
  {
86
102
  ref_key: "textAreaRef",
87
- ref: o,
88
- placeholder: e(v),
103
+ ref: a,
104
+ placeholder: e(b),
89
105
  value: e(l),
90
- class: [e(y)(), e(r)],
91
- onInput: h
106
+ class: [e(B)(), e(r)],
107
+ onInput: C
92
108
  }
93
109
  ), null, 16, ["placeholder", "value", "class"]));
94
110
  }
95
111
  });
96
112
  export {
97
- q as default
113
+ L as default
98
114
  };
@@ -3,6 +3,9 @@ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOp
3
3
  import { FieldMode } from '..';
4
4
  declare const _default: DefineComponent<ApFieldTextAreaProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApFieldTextAreaProps> & Readonly<{}>, {
5
5
  type: "number" | "reset" | "submit" | "button" | "search" | "time" | "month" | "date" | "week" | "hidden" | "checkbox" | "radio" | "color" | "text" | "range" | "image" | "tel" | "url" | "email" | "datetime-local" | "file" | "password";
6
+ code: boolean | {
7
+ language?: "text" | "json";
8
+ };
6
9
  mode: FieldMode;
7
10
  disabled: boolean;
8
11
  bordered: boolean;
@@ -1,13 +1,17 @@
1
- import { defineComponent as o, createElementBlock as t, createCommentVNode as a, openBlock as n, toDisplayString as l, unref as r } from "vue";
2
- import { isNil as p } from "lodash-unified";
3
- const u = {
1
+ import { defineComponent as s, computed as i, createElementBlock as a, openBlock as n, toDisplayString as l, unref as o, normalizeClass as m, createElementVNode as c } from "vue";
2
+ import { isNil as f } from "lodash-unified";
3
+ import "../../config-provider/index.mjs";
4
+ import y from "../style/index.mjs";
5
+ import { languageFormat as g } from "./utils.mjs";
6
+ import { useNamespace as B } from "../../config-provider/hooks/use-namespace.mjs";
7
+ const h = {
4
8
  key: 0,
5
9
  style: {
6
10
  whiteSpace: "pre-wrap",
7
11
  wordWrap: "break-word",
8
12
  wordBreak: "break-all"
9
13
  }
10
- }, y = /* @__PURE__ */ o({
14
+ }, I = /* @__PURE__ */ s({
11
15
  name: "ApFieldTextAreaRead",
12
16
  __name: "read",
13
17
  props: {
@@ -59,12 +63,26 @@ const u = {
59
63
  clearIcon: {},
60
64
  allowClear: { type: Boolean, default: !0 },
61
65
  emptyText: { default: "--" },
62
- beforeInput: {}
66
+ beforeInput: {},
67
+ code: { type: [Boolean, Object], default: !1 }
63
68
  },
64
- setup(d) {
65
- return (e, s) => e.mode === "read" ? (n(), t("span", u, l(r(p)(e.value) || e.value === "" ? e.emptyText : e.value), 1)) : a("", !0);
69
+ setup(r) {
70
+ const { m: u } = B("field-textarea"), d = y("field"), t = r, p = i(() => {
71
+ if (t.code)
72
+ return t.code === !0 ? {
73
+ language: "text"
74
+ } : {
75
+ language: t.code?.language ?? "text"
76
+ };
77
+ });
78
+ return (e, v) => e.code ? (n(), a("pre", {
79
+ key: 1,
80
+ class: m([o(u)("code"), o(d)])
81
+ }, [
82
+ c("code", null, l(o(g)(e.value, p.value.language)), 1)
83
+ ], 2)) : (n(), a("span", h, l(o(f)(e.value) || e.value === "" ? e.emptyText : e.value), 1));
66
84
  }
67
85
  });
68
86
  export {
69
- y as default
87
+ I as default
70
88
  };
@@ -0,0 +1 @@
1
+ export declare const languageFormat: (text: string, language: string) => string;
@@ -0,0 +1,13 @@
1
+ const o = (r, n) => {
2
+ if (console.log("text", r, n), typeof r != "string")
3
+ return r;
4
+ try {
5
+ if (n === "json")
6
+ return JSON.stringify(JSON.parse(r), null, 2);
7
+ } catch {
8
+ }
9
+ return r;
10
+ };
11
+ export {
12
+ o as languageFormat
13
+ };
@@ -24,6 +24,9 @@ declare function __VLS_template(): {
24
24
  "update:value": (...args: any[]) => void;
25
25
  }, PublicProps, {
26
26
  type: "number" | "reset" | "submit" | "button" | "search" | "time" | "month" | "date" | "week" | "hidden" | "checkbox" | "radio" | "color" | "text" | "range" | "image" | "tel" | "url" | "email" | "datetime-local" | "file" | "password";
27
+ code: boolean | {
28
+ language?: "text" | "json";
29
+ };
27
30
  mode: FieldMode;
28
31
  disabled: boolean;
29
32
  bordered: boolean;
@@ -314,6 +317,9 @@ declare function __VLS_template(): {
314
317
  resizableTextArea: any;
315
318
  }, {}, {}, {}, {
316
319
  type: "number" | "reset" | "submit" | "button" | "search" | "time" | "month" | "date" | "week" | "hidden" | "checkbox" | "radio" | "color" | "text" | "range" | "image" | "tel" | "url" | "email" | "datetime-local" | "file" | "password";
320
+ code: boolean | {
321
+ language?: "text" | "json";
322
+ };
317
323
  mode: FieldMode;
318
324
  disabled: boolean;
319
325
  bordered: boolean;
@@ -348,6 +354,9 @@ declare const __VLS_component: DefineComponent<ApFormItemTextAreaProps, {
348
354
  "update:value": (...args: any[]) => void;
349
355
  }, PublicProps, {
350
356
  type: "number" | "reset" | "submit" | "button" | "search" | "time" | "month" | "date" | "week" | "hidden" | "checkbox" | "radio" | "color" | "text" | "range" | "image" | "tel" | "url" | "email" | "datetime-local" | "file" | "password";
357
+ code: boolean | {
358
+ language?: "text" | "json";
359
+ };
351
360
  mode: FieldMode;
352
361
  disabled: boolean;
353
362
  bordered: boolean;
@@ -638,6 +647,9 @@ declare const __VLS_component: DefineComponent<ApFormItemTextAreaProps, {
638
647
  resizableTextArea: any;
639
648
  }, {}, {}, {}, {
640
649
  type: "number" | "reset" | "submit" | "button" | "search" | "time" | "month" | "date" | "week" | "hidden" | "checkbox" | "radio" | "color" | "text" | "range" | "image" | "tel" | "url" | "email" | "datetime-local" | "file" | "password";
650
+ code: boolean | {
651
+ language?: "text" | "json";
652
+ };
641
653
  mode: FieldMode;
642
654
  disabled: boolean;
643
655
  bordered: boolean;
@@ -1896,6 +1896,9 @@ export declare const apTableFormItemMap: {
1896
1896
  "update:value": (...args: any[]) => void;
1897
1897
  }, PublicProps, {
1898
1898
  type: "number" | "reset" | "submit" | "button" | "search" | "time" | "month" | "date" | "week" | "hidden" | "checkbox" | "radio" | "color" | "text" | "range" | "image" | "tel" | "url" | "email" | "datetime-local" | "file" | "password";
1899
+ code: boolean | {
1900
+ language?: "text" | "json";
1901
+ };
1899
1902
  mode: FieldMode;
1900
1903
  disabled: boolean;
1901
1904
  bordered: boolean;
@@ -2186,6 +2189,9 @@ export declare const apTableFormItemMap: {
2186
2189
  resizableTextArea: any;
2187
2190
  }, {}, {}, {}, {
2188
2191
  type: "number" | "reset" | "submit" | "button" | "search" | "time" | "month" | "date" | "week" | "hidden" | "checkbox" | "radio" | "color" | "text" | "range" | "image" | "tel" | "url" | "email" | "datetime-local" | "file" | "password";
2192
+ code: boolean | {
2193
+ language?: "text" | "json";
2194
+ };
2189
2195
  mode: FieldMode;
2190
2196
  disabled: boolean;
2191
2197
  bordered: boolean;
@@ -3427,6 +3433,9 @@ export declare const apTableRenderItemMap: {
3427
3433
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLSpanElement>;
3428
3434
  textArea: DefineComponent<ApFieldTextAreaProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ApFieldTextAreaProps> & Readonly<{}>, {
3429
3435
  type: "number" | "reset" | "submit" | "button" | "search" | "time" | "month" | "date" | "week" | "hidden" | "checkbox" | "radio" | "color" | "text" | "range" | "image" | "tel" | "url" | "email" | "datetime-local" | "file" | "password";
3436
+ code: boolean | {
3437
+ language?: "text" | "json";
3438
+ };
3430
3439
  mode: FieldMode;
3431
3440
  disabled: boolean;
3432
3441
  bordered: boolean;
@@ -1,11 +1,11 @@
1
- import { GenStyleFunc, StyleMixin } from '../../design-token/interface';
1
+ import { BaseToken, GenStyleFunc, StyleMixin } from '../../design-token/interface';
2
2
  import { ComputedRef } from 'vue';
3
3
  export type ApTableToken = {
4
4
  apTableHeaderBg: string;
5
5
  apTableIndexSize: number;
6
6
  apTableSettingRightWidth: number;
7
7
  };
8
- export declare const defaultValue: ApTableToken;
8
+ export declare const defaultValue: (token: BaseToken) => ApTableToken;
9
9
  export declare const genSettingTriggerBtnStyle: StyleMixin;
10
10
  export declare const genApTableStyle: GenStyleFunc<ApTableToken>;
11
11
  declare const _default: (prefixCls: string) => ComputedRef<string>;
@@ -1,10 +1,10 @@
1
1
  import { multiRows as l, resetScrollbar as i } from "../../style/index.mjs";
2
2
  import { genComponentStyleHook as o } from "../../utils/cssinjs/index.mjs";
3
- const r = {
4
- apTableHeaderBg: "#F2F6F9",
3
+ const r = (t) => ({
4
+ apTableHeaderBg: t.tableHeaderBg,
5
5
  apTableIndexSize: 14,
6
6
  apTableSettingRightWidth: 240
7
- }, p = (t) => ({
7
+ }), p = (t) => ({
8
8
  [`.${t.namespace}-ap-table-setting-trigger-button`]: {
9
9
  color: t.textColor2,
10
10
  "&:hover": {
@@ -1,9 +1,9 @@
1
1
  import { defineComponent as _, ref as H, createVNode as i, mergeProps as L, onUnmounted as j } from "vue";
2
2
  import { ApModal as q } from "../../../ap-modal/index.mjs";
3
3
  import "../../../ag-grid/index.mjs";
4
- import { AsyncCallback as G, genRequest as T, delRowKeyField as D, addRowKeyField as F, getModalLayoutConfig as E } from "../utils.mjs";
4
+ import { AsyncCallback as D, genRequest as G, delRowKeyField as T, addRowKeyField as F, getModalLayoutConfig as E } from "../utils.mjs";
5
5
  import { useAgGridInstance as U } from "./use-ag-grid-instance.mjs";
6
- import { isFunction as u, cloneDeep as W, isEmpty as b, omitBy as $, isUndefined as z, omit as p } from "lodash-unified";
6
+ import { isFunction as u, cloneDeep as W, isEmpty as b, omitBy as $, isUndefined as z, omit as S } from "lodash-unified";
7
7
  import { ROW_KEY as B } from "../constants.mjs";
8
8
  import { useModalTitle as N } from "./use-modal-title.mjs";
9
9
  import { message as V } from "@aplus-frontend/antdv";
@@ -15,14 +15,14 @@ import J from "../wrapper/index.vue2.mjs";
15
15
  import Q from "../modal-layout/index.vue2.mjs";
16
16
  import X from "../../../ag-grid/index.vue.mjs";
17
17
  function we(t) {
18
- let c, f = null, g = null;
19
- const d = new G(), [K, S] = N(), {
18
+ let d, f = null, g = null;
19
+ const c = new D(), [x, K] = N(), {
20
20
  t: k
21
- } = Y(), [s, x] = U({
21
+ } = Y(), [s, p] = U({
22
22
  onSelectedRows(e) {
23
- S.setCount(e?.length || 0);
23
+ K.setCount(e?.length || 0);
24
24
  }
25
- }), w = T(t.api, t.getRowKey, s.setDataSourceLength), y = (e) => {
25
+ }), w = G(t.api, t.getRowKey, s.setDataSourceLength), y = (e) => {
26
26
  const {
27
27
  title: o,
28
28
  width: l,
@@ -42,16 +42,16 @@ function we(t) {
42
42
  keys: A(o),
43
43
  rows: o.map((a) => {
44
44
  const r = m(a);
45
- return e === "old" && c?.[r] ? c[r] : D(a);
45
+ return e === "old" && d?.[r] ? d[r] : T(a);
46
46
  })
47
47
  };
48
48
  }, h = async () => {
49
49
  const e = P(), o = t.maxCount || 1 / 0;
50
50
  return e.keys.length > o ? (V.warning(k("ap.apTableModal.messageMaxCount", {
51
51
  maxCount: o
52
- })), Promise.reject()) : (await t.beforeOk?.(e), t.finishCallback?.(e), d.resolve(e), e);
52
+ })), Promise.reject()) : (await t.beforeOk?.(e), t.finishCallback?.(e), c.resolve(e), e);
53
53
  }, M = () => {
54
- d.reject("modal is closed!");
54
+ c.reject("modal is closed!");
55
55
  }, I = /* @__PURE__ */ _({
56
56
  name: "AgGridModalSelectContent",
57
57
  props: {
@@ -73,12 +73,12 @@ function we(t) {
73
73
  };
74
74
  }, () => {
75
75
  const l = e.selectedRows?.map((r) => F(r, o.value.getRowKey)), n = o.value, a = E(n.modalLayout);
76
- return i(x, null, {
76
+ return i(p, null, {
77
77
  default: () => [i(J, {
78
78
  height: n.height,
79
79
  rowHeight: n.rowHeight
80
80
  }, {
81
- default: () => [t.renderHeader?.(p(s, "setInstance"), {
81
+ default: () => [t.renderHeader?.(S(s, "setInstance"), {
82
82
  updateProps: y
83
83
  }), i(Q, a.props, {
84
84
  default: () => [i(X, L({
@@ -103,7 +103,7 @@ function we(t) {
103
103
  fixed: "left",
104
104
  columnWidth: 38,
105
105
  disabled(r) {
106
- return u(n.disabledCheckbox) ? n.disabledCheckbox(r, p(s, "setInstance")) : n.disabledCheckbox ?? !1;
106
+ return u(n.disabledCheckbox) ? n.disabledCheckbox(r, S(s, "setInstance")) : n.disabledCheckbox ?? !1;
107
107
  },
108
108
  ...t.rowSelection
109
109
  },
@@ -123,11 +123,12 @@ function we(t) {
123
123
  }, null);
124
124
  }
125
125
  function v() {
126
- const e = Object.values(c || {}), o = C(e);
126
+ const e = Object.values(d || {}), o = C(e);
127
127
  f = q.createModal({
128
- title: i(K, {
128
+ title: i(x, {
129
129
  title: t.title,
130
- maxCount: t.maxCount || 1 / 0
130
+ maxCount: t.maxCount || 1 / 0,
131
+ isShowDefaultSuffix: t.mode !== "radio"
131
132
  }, t.modalTitleSlots),
132
133
  width: t.width,
133
134
  destroyOnClose: !0,
@@ -145,17 +146,17 @@ function we(t) {
145
146
  return e?.map(m) || [];
146
147
  }
147
148
  function R(e, o, l = !1) {
148
- if (c = e?.reduce((n, a) => {
149
+ if (d = e?.reduce((n, a) => {
149
150
  const r = m(a);
150
151
  return n[r] = a, n;
151
152
  }, {}), w.setExtraParams(o?.extraParams), v(), l)
152
- return d.buildPromise();
153
+ return c.buildPromise();
153
154
  }
154
155
  function O(e, o) {
155
156
  return R(e, o, !0);
156
157
  }
157
158
  return j(() => {
158
- d.reject("component is Unmounted!");
159
+ c.reject("component is Unmounted!");
159
160
  }), {
160
161
  open: R,
161
162
  asyncOpen: O,