@aplus-frontend/ui 0.4.10 → 0.4.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.
Files changed (95) hide show
  1. package/es/index.mjs +42 -36
  2. package/es/src/ap-field/date/index.vue.mjs +98 -65
  3. package/es/src/ap-field/date-range/index.vue.mjs +98 -70
  4. package/es/src/ap-field/hooks/use-date-timezone.d.ts +7 -0
  5. package/es/src/ap-field/hooks/use-date-timezone.mjs +10 -0
  6. package/es/src/ap-field/hooks/use-default-presets.d.ts +3 -2
  7. package/es/src/ap-field/hooks/use-default-presets.mjs +8 -8
  8. package/es/src/ap-field/interface.d.ts +8 -2
  9. package/es/src/business/ap-ladder/ApLadder.vue.d.ts +6 -2
  10. package/es/src/business/ap-ladder/ApLadder.vue2.mjs +118 -95
  11. package/es/src/business/ap-ladder/index.d.ts +3 -1
  12. package/es/src/full-screen/index.d.ts +3 -0
  13. package/es/src/full-screen/index.mjs +2 -0
  14. package/es/src/full-screen/index.vue.d.ts +43 -0
  15. package/es/src/full-screen/index.vue.mjs +84 -0
  16. package/es/src/full-screen/index.vue2.mjs +4 -0
  17. package/es/src/full-screen/interface.d.ts +50 -0
  18. package/es/src/full-screen/interface.mjs +1 -0
  19. package/es/src/full-screen/style/css.d.ts +0 -0
  20. package/es/src/full-screen/style/css.js +1 -0
  21. package/es/src/full-screen/style/index.d.ts +0 -0
  22. package/es/src/full-screen/style/index.js +1 -0
  23. package/es/src/hooks/index.d.ts +1 -0
  24. package/es/src/hooks/index.mjs +6 -4
  25. package/es/src/hooks/useFullScreen.d.ts +8 -0
  26. package/es/src/hooks/useFullScreen.mjs +50 -0
  27. package/es/src/index.d.ts +2 -0
  28. package/es/src/index.mjs +243 -237
  29. package/es/src/path-map.mjs +3 -1
  30. package/es/src/portal/index.d.ts +3 -0
  31. package/es/src/portal/index.mjs +2 -0
  32. package/es/src/portal/index.vue.d.ts +18 -0
  33. package/es/src/portal/index.vue.mjs +21 -0
  34. package/es/src/portal/index.vue2.mjs +4 -0
  35. package/es/src/portal/interface.d.ts +2 -0
  36. package/es/src/portal/interface.mjs +1 -0
  37. package/es/src/portal/style/css.d.ts +1 -0
  38. package/es/src/portal/style/css.js +1 -0
  39. package/es/src/portal/style/index.d.ts +1 -0
  40. package/es/src/portal/style/index.js +1 -0
  41. package/lib/index.js +1 -1
  42. package/lib/src/ap-field/date/index.vue.js +1 -1
  43. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  44. package/lib/src/ap-field/hooks/use-date-timezone.d.ts +7 -0
  45. package/lib/src/ap-field/hooks/use-date-timezone.js +1 -0
  46. package/lib/src/ap-field/hooks/use-default-presets.d.ts +3 -2
  47. package/lib/src/ap-field/hooks/use-default-presets.js +1 -1
  48. package/lib/src/ap-field/interface.d.ts +8 -2
  49. package/lib/src/business/ap-ladder/ApLadder.vue.d.ts +6 -2
  50. package/lib/src/business/ap-ladder/ApLadder.vue2.js +1 -1
  51. package/lib/src/business/ap-ladder/index.d.ts +3 -1
  52. package/lib/src/full-screen/index.d.ts +3 -0
  53. package/lib/src/full-screen/index.js +1 -0
  54. package/lib/src/full-screen/index.vue.d.ts +43 -0
  55. package/lib/src/full-screen/index.vue.js +1 -0
  56. package/lib/src/full-screen/index.vue2.js +1 -0
  57. package/lib/src/full-screen/interface.d.ts +50 -0
  58. package/lib/src/full-screen/interface.js +1 -0
  59. package/lib/src/full-screen/style/css.cjs +1 -0
  60. package/lib/src/full-screen/style/css.d.ts +0 -0
  61. package/lib/src/full-screen/style/index.cjs +1 -0
  62. package/lib/src/full-screen/style/index.d.ts +0 -0
  63. package/lib/src/hooks/index.d.ts +1 -0
  64. package/lib/src/hooks/index.js +1 -1
  65. package/lib/src/hooks/useFullScreen.d.ts +8 -0
  66. package/lib/src/hooks/useFullScreen.js +1 -0
  67. package/lib/src/index.d.ts +2 -0
  68. package/lib/src/index.js +1 -1
  69. package/lib/src/path-map.js +1 -1
  70. package/lib/src/portal/index.d.ts +3 -0
  71. package/lib/src/portal/index.js +1 -0
  72. package/lib/src/portal/index.vue.d.ts +18 -0
  73. package/lib/src/portal/index.vue.js +1 -0
  74. package/lib/src/portal/index.vue2.js +1 -0
  75. package/lib/src/portal/interface.d.ts +2 -0
  76. package/lib/src/portal/interface.js +1 -0
  77. package/lib/src/portal/style/css.cjs +1 -0
  78. package/lib/src/portal/style/css.d.ts +1 -0
  79. package/lib/src/portal/style/index.cjs +1 -0
  80. package/lib/src/portal/style/index.d.ts +1 -0
  81. package/package.json +3 -3
  82. package/theme/ap-form/ap-form-item.css +4 -0
  83. package/theme/ap-form/ap-form-item.less +7 -0
  84. package/theme/ap-form/index.css +18 -0
  85. package/theme/ap-form/item-text-group.css +14 -0
  86. package/theme/ap-form/item-text-group.less +11 -1
  87. package/theme/ap-form/item-text.css +14 -0
  88. package/theme/ap-form/search-form.css +4 -0
  89. package/theme/ap-table/ap-table.css +18 -0
  90. package/theme/ap-table-modal/index.css +18 -0
  91. package/theme/editable-table/index.css +18 -0
  92. package/theme/full-screen/index.css +6 -0
  93. package/theme/full-screen/index.less +12 -0
  94. package/theme/index.css +24 -0
  95. package/theme/index.less +1 -0
@@ -1,12 +1,12 @@
1
- import { computed as r } from "vue";
2
- import { presetsDefault as f } from "../../utils/data-range-persets.mjs";
3
- const b = (e) => r(() => {
4
- var t, u;
5
- return e.presets === !0 ? f(e == null ? void 0 : e.timezone) : (u = (t = e == null ? void 0 : e.presets) == null ? void 0 : t.map) == null ? void 0 : u.call(t, (l) => {
6
- var a;
1
+ import { computed as f } from "vue";
2
+ import { presetsDefault as n } from "../../utils/data-range-persets.mjs";
3
+ const b = (e) => f(() => {
4
+ var u, l, a;
5
+ return e.presets === !0 ? n((u = e == null ? void 0 : e.timezone) == null ? void 0 : u.value) : (a = (l = e == null ? void 0 : e.presets) == null ? void 0 : l.map) == null ? void 0 : a.call(l, (t) => {
6
+ var m;
7
7
  return {
8
- label: l.label,
9
- value: (a = l == null ? void 0 : l.value) == null ? void 0 : a.filter((m) => m !== null)
8
+ label: t.label,
9
+ value: (m = t == null ? void 0 : t.value) == null ? void 0 : m.filter((r) => r !== null)
10
10
  };
11
11
  });
12
12
  });
@@ -49,7 +49,10 @@ export type ApFieldDateProps = BasicApFieldProps<Omit<DatePickerProps, 'mode' |
49
49
  /**
50
50
  * 指定时区,指定后value会变为特定时区下的timestamp
51
51
  */
52
- timezone?: ZoneAlias;
52
+ timezone?: ZoneAlias | {
53
+ label?: string;
54
+ value: ZoneAlias;
55
+ }[];
53
56
  };
54
57
  export type ApFieldNumberProps = BasicApFieldProps<InputNumberProps> & {
55
58
  emptyText?: string;
@@ -99,7 +102,10 @@ export type ApFieldDateRangeProps = BasicApFieldProps<Omit<RangePickerProps, 'va
99
102
  /**
100
103
  * 指定时区,指定后value会变为特定时区下的timestamp
101
104
  */
102
- timezone?: ZoneAlias;
105
+ timezone?: ZoneAlias | {
106
+ label?: string;
107
+ value: ZoneAlias;
108
+ }[];
103
109
  /**
104
110
  * 只读模式下的分隔符(比插槽优先级更高)
105
111
  */
@@ -9,7 +9,9 @@ import { AlignType, BuildInPlacements } from '@aplus-frontend/antdv/es/vc-trigge
9
9
  declare function __VLS_template(): {
10
10
  attrs: Partial<{}>;
11
11
  slots: Readonly<ApLadderSlots> & ApLadderSlots;
12
- refs: {};
12
+ refs: {
13
+ valueRefs: HTMLSpanElement;
14
+ };
13
15
  rootEl: HTMLDivElement;
14
16
  };
15
17
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
@@ -92,7 +94,9 @@ declare const __VLS_component: DefineComponent<ApLadderProps, {}, {}, {}, {}, Co
92
94
  unitStyles: string | false | CSSProperties | StyleValue[] | null;
93
95
  tooltipLabelStyles: string | false | CSSProperties | StyleValue[] | null;
94
96
  tooltipValueStyles: string | false | CSSProperties | StyleValue[] | null;
95
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
97
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {
98
+ valueRefs: HTMLSpanElement;
99
+ }, HTMLDivElement>;
96
100
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
97
101
  export default _default;
98
102
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1,12 +1,12 @@
1
- import { defineComponent as K, useSlots as Q, ref as U, computed as g, unref as o, onMounted as X, openBlock as l, createElementBlock as r, normalizeClass as a, createBlock as y, normalizeProps as E, mergeProps as C, createSlots as N, withCtx as f, Fragment as k, createElementVNode as m, normalizeStyle as d, toDisplayString as n, renderSlot as z, createCommentVNode as S, renderList as T, createTextVNode as Y, isVNode as P, resolveDynamicComponent as b, createVNode as V } from "vue";
2
- import { Tooltip as j } from "@aplus-frontend/antdv";
1
+ import { defineComponent as Y, useSlots as Z, ref as R, useTemplateRef as x, computed as C, unref as o, onMounted as ee, onUnmounted as te, openBlock as l, createElementBlock as r, normalizeClass as y, createBlock as p, normalizeProps as T, mergeProps as j, createSlots as z, withCtx as f, Fragment as k, createElementVNode as m, normalizeStyle as d, toDisplayString as i, renderSlot as W, createCommentVNode as S, renderList as D, createTextVNode as le, isVNode as V, resolveDynamicComponent as b, createVNode as $ } from "vue";
2
+ import { Tooltip as v } from "@aplus-frontend/antdv";
3
3
  import "../../config-provider/index.mjs";
4
- import { locales as Z } from "./interface.mjs";
4
+ import { locales as oe } from "./interface.mjs";
5
5
  import "./HelpMessageIcon.vue.mjs";
6
- import { useNamespace as x } from "../../config-provider/hooks/use-namespace.mjs";
7
- import { useGlobalConfig as ee } from "../../config-provider/hooks/use-global-config.mjs";
8
- import O from "./HelpMessageIcon.vue2.mjs";
9
- const te = { key: 1 }, le = { key: 0 }, oe = { key: 1 }, re = { key: 0 }, ie = ["onClick"], se = { key: 0 }, ne = { key: 1 }, ke = /* @__PURE__ */ K({
6
+ import { useNamespace as re } from "../../config-provider/hooks/use-namespace.mjs";
7
+ import { useGlobalConfig as se } from "../../config-provider/hooks/use-global-config.mjs";
8
+ import B from "./HelpMessageIcon.vue2.mjs";
9
+ const ne = { key: 1 }, ie = { key: 0 }, ae = { key: 1 }, ue = { key: 0 }, ye = ["onClick"], pe = { key: 0 }, de = { key: 1 }, Ce = /* @__PURE__ */ Y({
10
10
  name: "ApLadder",
11
11
  __name: "ApLadder",
12
12
  props: {
@@ -44,19 +44,25 @@ const te = { key: 1 }, le = { key: 0 }, oe = { key: 1 }, re = { key: 0 }, ie = [
44
44
  tooltipLabelStyles: { type: [Boolean, null, String, Object, Array], default: void 0 },
45
45
  tooltipValueStyles: { type: [Boolean, null, String, Object, Array], default: void 0 }
46
46
  },
47
- setup(D) {
48
- const M = Q(), i = D, { b: F, e: s, m: W } = x("ap-ladder"), G = ee("uiMode", "aplus"), $ = `ap-ladder-${Math.floor(Math.random() * 1e7)}`, I = s("ellipsis"), h = U(!1), q = g(() => i.labelValues.length === 0), H = g(() => i.labelValues.length > 0), B = g(() => i.majorColor ? {
49
- color: `${i.majorColor}`
50
- } : {}), w = g(() => i.minorColor ? {
51
- color: `${i.minorColor}`
52
- } : {}), A = (t) => t == null || typeof t == "string" && t.trim() === "", c = (t, u = {}) => {
47
+ setup(F) {
48
+ const P = Z(), s = F, { b: G, e: n, m: I } = re("ap-ladder"), q = se("uiMode", "aplus"), O = `ap-ladder-${Math.floor(Math.random() * 1e7)}`, H = n("ellipsis"), h = R(!1), _ = R(), g = x("valueRefs");
49
+ function U(t) {
50
+ var u;
51
+ const a = (u = g.value) == null ? void 0 : u[t];
52
+ return a ? getComputedStyle(a).color : void 0;
53
+ }
54
+ const J = C(() => s.labelValues.length === 0), K = C(() => s.labelValues.length > 0), w = C(() => s.majorColor ? {
55
+ color: `${s.majorColor}`
56
+ } : {}), E = C(() => s.minorColor ? {
57
+ color: `${s.minorColor}`
58
+ } : {}), A = (t) => t == null || typeof t == "string" && t.trim() === "", c = (t, a = {}) => {
53
59
  const e = {
54
- rawValue: u.rawValue,
55
- precision: u.precision === void 0 ? 2 : u.precision,
56
- thousand: u.thousand,
57
- thousandSeparator: u.thousandSeparator || ",",
58
- currency: u.currency,
59
- percent: u.percent
60
+ rawValue: a.rawValue,
61
+ precision: a.precision === void 0 ? 2 : a.precision,
62
+ thousand: a.thousand,
63
+ thousandSeparator: a.thousandSeparator || ",",
64
+ currency: a.currency,
65
+ percent: a.percent
60
66
  };
61
67
  if (t === null || typeof t == "object" || typeof t == "function" || typeof t > "u")
62
68
  return "--";
@@ -70,96 +76,101 @@ const te = { key: 1 }, le = { key: 0 }, oe = { key: 1 }, re = { key: 0 }, ie = [
70
76
  if (e.percent)
71
77
  return `${t.toFixed(e.precision)}%`;
72
78
  if (e.currency)
73
- return t.toLocaleString(Z[e.currency], {
79
+ return t.toLocaleString(oe[e.currency], {
74
80
  style: "currency",
75
81
  currency: e.currency
76
82
  });
77
83
  if (e.thousand) {
78
- const [p, v] = t.toFixed(e.precision).split(".");
79
- return `${p.replace(
84
+ const [u, M] = t.toFixed(e.precision).split(".");
85
+ return `${u.replace(
80
86
  /(\d)(?=(\d{3})+(?!\d))/g,
81
87
  `$1${e.thousandSeparator}`
82
- )}.${v}`;
88
+ )}.${M}`;
83
89
  }
84
90
  return t.toFixed(e.precision);
85
91
  }
86
92
  return t;
87
- }, R = () => {
88
- const t = document.getElementById($);
93
+ }, Q = () => {
94
+ var e;
95
+ const t = document.getElementById(O);
89
96
  if (!t)
90
97
  return;
91
- const u = t.querySelectorAll(`.${I}`);
92
- new ResizeObserver((p) => {
93
- p.forEach((v) => {
94
- v.target === t && (h.value = !1, u.forEach((_) => {
95
- _.clientWidth < _.scrollWidth && (h.value = !0);
98
+ const a = t.querySelectorAll(`.${H}`);
99
+ _.value = new ResizeObserver((u) => {
100
+ u.forEach((M) => {
101
+ M.target === t && (h.value = !1, a.forEach((N) => {
102
+ N.clientWidth < N.scrollWidth && (h.value = !0);
96
103
  }));
97
104
  });
98
- }).observe(t), h.value = !1, u.forEach((p) => {
99
- p.clientWidth < p.scrollWidth && (h.value = !0);
105
+ }), (e = o(_)) == null || e.observe(t), h.value = !1, a.forEach((u) => {
106
+ u.clientWidth < u.scrollWidth && (h.value = !0);
100
107
  });
101
- }, L = g(() => M.title ? !0 : i.tooltip && o(h)), J = (t) => {
108
+ }, L = C(() => P.title ? !0 : s.tooltip && o(h)), X = (t) => {
102
109
  t.link && window.open(t.link, "_blank"), typeof t.handleClickLink == "function" && t.handleClickLink();
103
110
  };
104
- return X(() => {
105
- R();
106
- }), (t, u) => (l(), r("div", {
107
- id: $,
108
- class: a([o(F)(), `${o(W)(o(G))}`])
111
+ return ee(() => {
112
+ Q();
113
+ }), te(() => {
114
+ var t;
115
+ o(_) && ((t = o(_)) == null || t.disconnect());
116
+ }), (t, a) => (l(), r("div", {
117
+ id: O,
118
+ class: y([o(G)(), `${o(I)(o(q))}`])
109
119
  }, [
110
- q.value ? (l(), y(o(j), E(C({ key: 0 }, { ...i.tooltipProps })), N({
120
+ J.value ? (l(), p(o(v), T(j({ key: 0 }, { ...s.tooltipProps })), z({
111
121
  default: f(() => [
112
122
  !A(t.major) || !A(t.minor) ? (l(), r(k, { key: 0 }, [
113
- i.layout === "vertical" ? (l(), r(k, { key: 0 }, [
123
+ s.layout === "vertical" ? (l(), r(k, { key: 0 }, [
114
124
  m("div", {
115
- class: a([o(s)("major"), o(s)("ellipsis")]),
116
- style: d([t.majorStyles, B.value])
117
- }, n(c(t.major)), 7),
125
+ class: y([o(n)("major"), o(n)("ellipsis")]),
126
+ style: d([t.majorStyles, w.value])
127
+ }, i(c(t.major)), 7),
118
128
  m("div", {
119
- class: a([o(s)("minor"), o(s)("ellipsis")]),
120
- style: d([t.minorStyles, w.value])
121
- }, n(c(t.minor)), 7)
129
+ class: y([o(n)("minor"), o(n)("ellipsis")]),
130
+ style: d([t.minorStyles, E.value])
131
+ }, i(c(t.minor)), 7)
122
132
  ], 64)) : (l(), r("div", {
123
133
  key: 1,
124
- class: a(o(s)("ellipsis"))
134
+ class: y(o(n)("ellipsis"))
125
135
  }, [
126
136
  m("span", {
127
- class: a([o(s)("major")]),
128
- style: d([t.majorStyles, B.value])
129
- }, n(c(t.major)), 7),
137
+ class: y([o(n)("major")]),
138
+ style: d([t.majorStyles, w.value])
139
+ }, i(c(t.major)), 7),
130
140
  m("span", {
131
- class: a([o(s)("minor")]),
132
- style: d([t.minorStyles, w.value])
133
- }, n(c(t.minor)), 7)
141
+ class: y([o(n)("minor")]),
142
+ style: d([t.minorStyles, E.value])
143
+ }, i(c(t.minor)), 7)
134
144
  ], 2))
135
- ], 64)) : (l(), r("div", te, n("--")))
145
+ ], 64)) : (l(), r("div", ne, i("--")))
136
146
  ]),
137
147
  _: 2
138
148
  }, [
139
149
  L.value ? {
140
150
  name: "title",
141
151
  fn: f(() => [
142
- M.title ? z(t.$slots, "title", { key: 0 }) : (l(), r(k, { key: 1 }, [
143
- i.tooltipProps.title ? (l(), r("div", le, n(i.tooltipProps.title), 1)) : (l(), r("div", oe, [
144
- m("div", null, n(c(t.major)), 1),
145
- m("div", null, n(c(t.minor)), 1)
152
+ P.title ? W(t.$slots, "title", { key: 0 }) : (l(), r(k, { key: 1 }, [
153
+ s.tooltipProps.title ? (l(), r("div", ie, i(s.tooltipProps.title), 1)) : (l(), r("div", ae, [
154
+ m("div", null, i(c(t.major)), 1),
155
+ m("div", null, i(c(t.minor)), 1)
146
156
  ]))
147
157
  ], 64))
148
158
  ]),
149
159
  key: "0"
150
160
  } : void 0
151
161
  ]), 1040)) : S("", !0),
152
- H.value ? (l(), y(o(j), E(C({ key: 1 }, { ...i.tooltipProps })), N({
162
+ K.value ? (l(), p(o(v), T(j({ key: 1 }, { ...s.tooltipProps })), z({
153
163
  default: f(() => [
154
- (l(!0), r(k, null, T(i.labelValues, (e, p) => (l(), r("div", {
155
- key: p,
156
- class: a([o(s)("cross-bar")])
164
+ (l(!0), r(k, null, D(s.labelValues, (e, u) => (l(), r("div", {
165
+ key: u,
166
+ class: y([o(n)("cross-bar")])
157
167
  }, [
158
168
  m("div", {
159
- class: a([o(s)("ellipsis")])
169
+ class: y([o(n)("ellipsis")]),
170
+ style: d({ color: U(u) })
160
171
  }, [
161
172
  m("span", {
162
- class: a(o(s)("label")),
173
+ class: y(o(n)("label")),
163
174
  style: d([
164
175
  t.labelStyles,
165
176
  e.labelStyles,
@@ -167,72 +178,84 @@ const te = { key: 1 }, le = { key: 0 }, oe = { key: 1 }, re = { key: 0 }, ie = [
167
178
  { textAlign: e.labelAlign || t.labelAlign }
168
179
  ])
169
180
  }, [
170
- Y(n(e.label), 1),
171
- e.label ? (l(), r("span", re, ":")) : S("", !0)
181
+ le(i(e.label), 1),
182
+ e.label ? (l(), r("span", ue, ":")) : S("", !0)
172
183
  ], 6),
173
- P(e.value) ? (l(), y(b(e.value), {
184
+ V(e.value) ? (l(), p(b(e.value), {
174
185
  key: 0,
186
+ ref_for: !0,
187
+ ref_key: "valueRefs",
188
+ ref: g,
175
189
  style: { display: "inline-block" }
176
- })) : typeof e.value == "function" ? (l(), y(b(e.value()), {
190
+ }, null, 512)) : typeof e.value == "function" ? (l(), p(b(e.value()), {
177
191
  key: 1,
192
+ ref_for: !0,
193
+ ref_key: "valueRefs",
194
+ ref: g,
178
195
  style: { display: "inline-block" }
179
- })) : (l(), r(k, { key: 2 }, [
196
+ }, null, 512)) : (l(), r(k, { key: 2 }, [
180
197
  A(e.link) ? (l(), r("span", {
181
198
  key: 1,
182
- class: a(o(s)("value")),
199
+ ref_for: !0,
200
+ ref_key: "valueRefs",
201
+ ref: g,
202
+ class: y(o(n)("value")),
183
203
  style: d([
184
204
  t.valueStyles,
185
205
  e.valueStyles,
186
206
  e.valueColor ? { color: e.valueColor } : void 0
187
207
  ])
188
- }, n(c(e.value, { ...e })), 7)) : (l(), r("span", {
208
+ }, i(c(e.value, { ...e })), 7)) : (l(), r("span", {
189
209
  key: 0,
190
- class: a(o(s)("link")),
210
+ ref_for: !0,
211
+ ref_key: "valueRefs",
212
+ ref: g,
213
+ class: y(o(n)("link")),
191
214
  style: d([
192
215
  t.linkStyles,
193
216
  e.linkStyles,
194
217
  e.linkColor ? { color: e.linkColor } : void 0
195
218
  ]),
196
- onClick: (v) => J(e)
197
- }, n(c(e.value, { ...e })), 15, ie))
219
+ onClick: (M) => X(e)
220
+ }, i(c(e.value, { ...e })), 15, ye))
198
221
  ], 64)),
199
222
  e.unit ? (l(), r("span", {
200
223
  key: 3,
201
- class: a(o(s)("unit")),
224
+ class: y(o(n)("unit")),
202
225
  style: d([
203
226
  t.unitStyles,
204
227
  e.unitStyles,
205
228
  e.unitColor ? { color: e.unitColor } : void 0
206
229
  ])
207
- }, n(e.unit), 7)) : S("", !0)
208
- ], 2),
230
+ }, i(e.unit), 7)) : S("", !0)
231
+ ], 6),
209
232
  e.helpMessage ? (l(), r("div", {
210
233
  key: 0,
211
- class: a([o(s)("help-message")])
234
+ class: y([o(n)("help-message")])
212
235
  }, [
213
- P(e.helpMessage) ? (l(), y(o(j), C({
236
+ V(e.helpMessage) ? (l(), p(o(v), j({
214
237
  key: 0,
215
238
  ref_for: !0
216
239
  }, { ...e.helpMessageTooltipProps }), {
217
240
  title: f(() => [
218
- (l(), y(b(e.helpMessage)))
241
+ (l(), p(b(e.helpMessage)))
219
242
  ]),
220
243
  default: f(() => [
221
- V(O, { lv: e }, null, 8, ["lv"])
244
+ $(B, { lv: e }, null, 8, ["lv"])
222
245
  ]),
223
246
  _: 2
224
- }, 1040)) : typeof e.helpMessage == "function" ? (l(), y(o(j), C({
247
+ }, 1040)) : typeof e.helpMessage == "function" ? (l(), p(o(v), j({
225
248
  key: 1,
226
249
  ref_for: !0
227
250
  }, { ...e.helpMessageTooltipProps }), {
228
251
  title: f(() => [
229
- (l(), y(b(e.helpMessage())))
252
+ (l(), p(b(e.helpMessage())))
230
253
  ]),
231
254
  default: f(() => [
232
- V(O, { lv: e }, null, 8, ["lv"])
255
+ $(B, { lv: e }, null, 8, ["lv"])
233
256
  ]),
234
257
  _: 2
235
- }, 1040)) : (l(), y(o(j), C({
258
+ }, 1040)) : (l(), p(o(v), j({
236
259
  key: 2,
237
260
  ref_for: !0
238
261
  }, { ...e.helpMessageTooltipProps }, {
@@ -240,7 +263,7 @@ const te = { key: 1 }, le = { key: 0 }, oe = { key: 1 }, re = { key: 0 }, ie = [
240
263
  title: e.helpMessage
241
264
  }), {
242
265
  default: f(() => [
243
- V(O, { lv: e }, null, 8, ["lv"])
266
+ $(B, { lv: e }, null, 8, ["lv"])
244
267
  ]),
245
268
  _: 2
246
269
  }, 1040, ["title"]))
@@ -252,26 +275,26 @@ const te = { key: 1 }, le = { key: 0 }, oe = { key: 1 }, re = { key: 0 }, ie = [
252
275
  L.value ? {
253
276
  name: "title",
254
277
  fn: f(() => [
255
- M.title ? z(t.$slots, "title", { key: 0 }) : (l(), r(k, { key: 1 }, [
256
- i.tooltipProps.title ? (l(), r("div", se, n(i.tooltipProps.title), 1)) : (l(), r("div", ne, [
257
- (l(!0), r(k, null, T(i.labelValues, (e, p) => (l(), r("div", {
258
- key: p,
278
+ P.title ? W(t.$slots, "title", { key: 0 }) : (l(), r(k, { key: 1 }, [
279
+ s.tooltipProps.title ? (l(), r("div", pe, i(s.tooltipProps.title), 1)) : (l(), r("div", de, [
280
+ (l(!0), r(k, null, D(s.labelValues, (e, u) => (l(), r("div", {
281
+ key: u,
259
282
  style: { "word-break": "break-all" }
260
283
  }, [
261
284
  e.label ? (l(), r("span", {
262
285
  key: 0,
263
286
  style: d([t.tooltipLabelStyles, e.tooltipLabelStyles])
264
- }, n(e.label) + ":", 5)) : S("", !0),
265
- P(e.value) ? (l(), y(b(e.value), {
287
+ }, i(e.label) + ":", 5)) : S("", !0),
288
+ V(e.value) ? (l(), p(b(e.value), {
266
289
  key: 1,
267
290
  style: { display: "inline-block" }
268
- })) : typeof e.value == "function" ? (l(), y(b(e.value()), {
291
+ })) : typeof e.value == "function" ? (l(), p(b(e.value()), {
269
292
  key: 2,
270
293
  style: { display: "inline-block" }
271
294
  })) : (l(), r("span", {
272
295
  key: 3,
273
296
  style: d([t.tooltipValueStyles, e.tooltipValueStyles])
274
- }, n(c(e.value, { ...e })), 5))
297
+ }, i(c(e.value, { ...e })), 5))
275
298
  ]))), 128))
276
299
  ]))
277
300
  ], 64))
@@ -283,5 +306,5 @@ const te = { key: 1 }, le = { key: 0 }, oe = { key: 1 }, re = { key: 0 }, ie = [
283
306
  }
284
307
  });
285
308
  export {
286
- ke as default
309
+ Ce as default
287
310
  };
@@ -87,7 +87,9 @@ declare const ApLadder: {
87
87
  unitStyles: string | false | CSSProperties | StyleValue[] | null;
88
88
  tooltipLabelStyles: string | false | CSSProperties | StyleValue[] | null;
89
89
  tooltipValueStyles: string | false | CSSProperties | StyleValue[] | null;
90
- }, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, HTMLDivElement, ComponentProvideOptions, {
90
+ }, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
91
+ valueRefs: HTMLSpanElement;
92
+ }, HTMLDivElement, ComponentProvideOptions, {
91
93
  P: {};
92
94
  B: {};
93
95
  D: {};
@@ -0,0 +1,3 @@
1
+ import { default as FullScreen } from './index.vue';
2
+ export { FullScreen };
3
+ export * from './interface';
@@ -0,0 +1,2 @@
1
+ import "./index.vue2.mjs";
2
+ import "./interface.mjs";
@@ -0,0 +1,43 @@
1
+ import { FullScreenMode, FullScreenProps } from './interface';
2
+ import { DefineComponent, ComputedRef, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ declare function enter(mode: FullScreenMode, force?: boolean): Promise<void>;
4
+ declare function exit(force?: boolean): Promise<void>;
5
+ declare function toggle(mode: FullScreenMode, force?: boolean): Promise<void>;
6
+ declare function __VLS_template(): {
7
+ attrs: Partial<{}>;
8
+ slots: {
9
+ default?(_: {
10
+ full: boolean;
11
+ enter: typeof enter;
12
+ exit: typeof exit;
13
+ toggle: typeof toggle;
14
+ mode: FullScreenMode | undefined;
15
+ portalRoot: HTMLDivElement | undefined;
16
+ }): any;
17
+ };
18
+ refs: {
19
+ target: unknown;
20
+ protalRootRef: HTMLDivElement;
21
+ };
22
+ rootEl: any;
23
+ };
24
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
25
+ declare const __VLS_component: DefineComponent<FullScreenProps, {
26
+ target: ComputedRef<HTMLElement | null | undefined>;
27
+ portalRoot: ComputedRef<HTMLDivElement | undefined>;
28
+ full: ComputedRef<boolean>;
29
+ mode: ComputedRef<FullScreenMode | undefined>;
30
+ enter: typeof enter;
31
+ exit: typeof exit;
32
+ toggle: typeof toggle;
33
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<FullScreenProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
34
+ target: unknown;
35
+ protalRootRef: HTMLDivElement;
36
+ }, any>;
37
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
38
+ export default _default;
39
+ type __VLS_WithTemplateSlots<T, S> = T & {
40
+ new (): {
41
+ $slots: S;
42
+ };
43
+ };
@@ -0,0 +1,84 @@
1
+ import { defineComponent as k, ref as u, watch as E, unref as a, computed as n, openBlock as m, createBlock as d, withCtx as v, resolveDynamicComponent as z, mergeProps as C, renderSlot as F, createElementVNode as N, normalizeClass as S } from "vue";
2
+ import "../hooks/index.mjs";
3
+ import "../portal/index.mjs";
4
+ import "../config-provider/index.mjs";
5
+ import { useScrollLock as h } from "@vueuse/core";
6
+ import { useFullScreen as I } from "../hooks/useFullScreen.mjs";
7
+ import { useNamespace as $ } from "../config-provider/hooks/use-namespace.mjs";
8
+ import B from "../portal/index.vue.mjs";
9
+ const H = /* @__PURE__ */ k({
10
+ name: "FullScreen",
11
+ __name: "index",
12
+ props: {
13
+ wrapperElementName: { default: "div" },
14
+ zIndex: { default: 2147483647 }
15
+ },
16
+ setup(L, { expose: w }) {
17
+ const {
18
+ target: i,
19
+ full: b,
20
+ enter: y,
21
+ exit: _
22
+ } = I(), { b: x, bm: g, be: R } = $("full-screen"), t = u(!1), l = u(), f = h(document.body), p = u();
23
+ E(
24
+ () => a(b),
25
+ (e) => {
26
+ e || (t.value = !1, l.value = void 0);
27
+ }
28
+ );
29
+ async function r(e, o = !1) {
30
+ await s(), t.value = !0, l.value = e, e === "browser" ? y(o) : f.value = !0;
31
+ }
32
+ async function s(e = !1) {
33
+ t.value = !1, l.value === "browser" ? await _(e) : f.value = !1, l.value = void 0;
34
+ }
35
+ async function c(e, o = !1) {
36
+ t.value ? l.value !== e ? await r(e, o) : await s(o) : await r(e, o);
37
+ }
38
+ return w({
39
+ target: n(() => a(i)),
40
+ portalRoot: n(() => a(p)),
41
+ full: n(() => a(t)),
42
+ mode: n(() => a(l)),
43
+ enter: r,
44
+ exit: s,
45
+ toggle: c
46
+ }), (e, o) => (m(), d(a(B), {
47
+ to: "body",
48
+ disabled: l.value !== "window"
49
+ }, {
50
+ default: v(() => [
51
+ (m(), d(z(e.wrapperElementName), C({
52
+ ref_key: "target",
53
+ ref: i
54
+ }, e.$attrs, {
55
+ class: [
56
+ a(x)("wrapper"),
57
+ t.value && l.value === "window" ? a(g)("wrapper", "full") : null
58
+ ],
59
+ style: { zIndex: t.value && l.value === "window" ? e.zIndex : "unset" }
60
+ }), {
61
+ default: v(() => [
62
+ F(e.$slots, "default", {
63
+ full: t.value,
64
+ enter: r,
65
+ exit: s,
66
+ toggle: c,
67
+ mode: l.value,
68
+ portalRoot: p.value
69
+ }),
70
+ N("div", {
71
+ ref: "protalRootRef",
72
+ class: S(a(R)("wrapper", "portal-root"))
73
+ }, null, 2)
74
+ ]),
75
+ _: 3
76
+ }, 16, ["class", "style"]))
77
+ ]),
78
+ _: 3
79
+ }, 8, ["disabled"]));
80
+ }
81
+ });
82
+ export {
83
+ H as default
84
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./index.vue.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,50 @@
1
+ import { ComputedRef } from 'vue';
2
+ export type FullScreenMode = 'browser' | 'window';
3
+ export type FullScreenProps = {
4
+ /**
5
+ * 容器元素标签名
6
+ */
7
+ wrapperElementName?: string;
8
+ /**
9
+ * 全屏状态下的css zIndex 默认为2^31 - 1
10
+ */
11
+ zIndex?: number;
12
+ };
13
+ export type FullScreenExpose = {
14
+ /**
15
+ * 全屏的目标元素
16
+ */
17
+ target: ComputedRef<HTMLElement>;
18
+ /**
19
+ * 目标元素内用于渲染全局组件的容器
20
+ */
21
+ portalRoot: ComputedRef<HTMLDivElement>;
22
+ /**
23
+ * 当前是否全屏
24
+ */
25
+ full: ComputedRef<boolean>;
26
+ /**
27
+ * 当前的全屏模式
28
+ */
29
+ mode: ComputedRef<FullScreenMode>;
30
+ /**
31
+ * 进入全屏
32
+ * @param mode 全屏模式 窗口全屏/浏览器全屏
33
+ * @param force
34
+ * @returns
35
+ */
36
+ enter: (mode: FullScreenMode, force?: boolean) => Promise<void>;
37
+ /**
38
+ * 退出全屏
39
+ * @param force
40
+ * @returns
41
+ */
42
+ exit: (force?: boolean) => Promise<void>;
43
+ /**
44
+ * 切换全屏状态
45
+ * @param mode 全屏模式
46
+ * @param force
47
+ * @returns
48
+ */
49
+ toggle: (mode: FullScreenMode, force?: boolean) => Promise<void>;
50
+ };
@@ -0,0 +1 @@
1
+
File without changes
@@ -0,0 +1 @@
1
+ import '@aplus-frontend/ui/theme/full-screen/index.css';
File without changes
@@ -0,0 +1 @@
1
+ import '@aplus-frontend/ui/theme/full-screen/index.less';