@aplus-frontend/ui 0.4.4 → 0.4.6

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 (57) hide show
  1. package/es/index.mjs +51 -49
  2. package/es/src/ap-field/date/index.vue.d.ts +1 -0
  3. package/es/src/ap-field/date/index.vue.mjs +22 -15
  4. package/es/src/ap-field/interface.d.ts +5 -0
  5. package/es/src/ap-table/components/setting/modal/index.vue2.mjs +55 -55
  6. package/es/src/ap-table/constants.d.ts +3 -0
  7. package/es/src/ap-table/hooks/use-table-column-state.d.ts +2 -2
  8. package/es/src/ap-table/hooks/use-table-column-state.mjs +92 -92
  9. package/es/src/business/ap-select-layout/select-layout.vue2.mjs +52 -56
  10. package/es/src/business/ap-summary/ap-summary.vue.d.ts +0 -1
  11. package/es/src/business/ap-summary/ap-summary.vue2.mjs +36 -35
  12. package/es/src/business/ap-summary/index.d.ts +0 -3
  13. package/es/src/business/batch-input-group/form-item.vue.d.ts +10 -1
  14. package/es/src/business/batch-input-group/form-item.vue.mjs +50 -49
  15. package/es/src/business/batch-input-group/interface.d.ts +5 -0
  16. package/es/src/index.mjs +48 -46
  17. package/es/src/locale/lang/en.mjs +3 -0
  18. package/es/src/locale/lang/zh-cn.mjs +3 -0
  19. package/es/src/scroll-bar/index.d.ts +1 -0
  20. package/es/src/scroll-bar/index.mjs +4 -0
  21. package/es/src/scroll-bar/index.vue.d.ts +6 -5
  22. package/es/src/scroll-bar/index.vue.mjs +51 -38
  23. package/es/src/scroll-bar/interface.d.ts +1 -1
  24. package/es/src/scroll-bar/internal.vue.d.ts +1 -1
  25. package/es/src/scroll-bar/utils/index.d.ts +7 -0
  26. package/es/src/scroll-bar/utils/index.mjs +16 -11
  27. package/lib/index.js +1 -1
  28. package/lib/src/ap-field/date/index.vue.d.ts +1 -0
  29. package/lib/src/ap-field/date/index.vue.js +1 -1
  30. package/lib/src/ap-field/interface.d.ts +5 -0
  31. package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
  32. package/lib/src/ap-table/constants.d.ts +3 -0
  33. package/lib/src/ap-table/hooks/use-table-column-state.d.ts +2 -2
  34. package/lib/src/ap-table/hooks/use-table-column-state.js +1 -1
  35. package/lib/src/business/ap-select-layout/select-layout.vue2.js +1 -1
  36. package/lib/src/business/ap-summary/ap-summary.vue.d.ts +0 -1
  37. package/lib/src/business/ap-summary/ap-summary.vue2.js +1 -1
  38. package/lib/src/business/ap-summary/index.d.ts +0 -3
  39. package/lib/src/business/batch-input-group/form-item.vue.d.ts +10 -1
  40. package/lib/src/business/batch-input-group/form-item.vue.js +1 -1
  41. package/lib/src/business/batch-input-group/interface.d.ts +5 -0
  42. package/lib/src/index.js +1 -1
  43. package/lib/src/locale/lang/en.js +1 -1
  44. package/lib/src/locale/lang/zh-cn.js +1 -1
  45. package/lib/src/scroll-bar/index.d.ts +1 -0
  46. package/lib/src/scroll-bar/index.js +1 -1
  47. package/lib/src/scroll-bar/index.vue.d.ts +6 -5
  48. package/lib/src/scroll-bar/index.vue.js +1 -1
  49. package/lib/src/scroll-bar/interface.d.ts +1 -1
  50. package/lib/src/scroll-bar/internal.vue.d.ts +1 -1
  51. package/lib/src/scroll-bar/utils/index.d.ts +7 -0
  52. package/lib/src/scroll-bar/utils/index.js +1 -1
  53. package/package.json +1 -1
  54. package/theme/ap-table/ap-table.css +4 -4
  55. package/theme/ap-table/ap-table.less +4 -4
  56. package/theme/ap-table-modal/index.css +4 -4
  57. package/theme/index.css +4 -4
package/es/index.mjs CHANGED
@@ -4,15 +4,15 @@ import "./src/hooks/index.mjs";
4
4
  import { configProviderProps as d } from "./src/config-provider/config-provider-props.mjs";
5
5
  import { DEFAULT_NAMESPACE as s, DEFAULT_UIMODE as A, configProviderContextKey as n } from "./src/config-provider/constants.mjs";
6
6
  import { keysOf as c, provideGlobalConfig as F, useGlobalConfig as I } from "./src/config-provider/hooks/use-global-config.mjs";
7
- import { buildLocaleContext as b, buildTranslator as C, localeContextKey as D, translate as S, useLocale as g } from "./src/config-provider/hooks/use-locale.mjs";
7
+ import { buildLocaleContext as b, buildTranslator as C, localeContextKey as D, translate as g, useLocale as S } from "./src/config-provider/hooks/use-locale.mjs";
8
8
  import { defaultNamespace as G, namespaceContextKey as M, useGetDerivedNamespace as P, useNamespace as E } from "./src/config-provider/hooks/use-namespace.mjs";
9
- import { ConfigProvider as N, globalConfigCached as y } from "./src/config-provider/config-provider.mjs";
9
+ import { ConfigProvider as N, globalConfigCached as R } from "./src/config-provider/config-provider.mjs";
10
10
  import { APConfigProvider as w } from "./src/config-provider/index.mjs";
11
11
  import { ApFormItemText as v } from "./src/ap-form/items/text/index.mjs";
12
12
  import { default as K } from "./src/ap-form/items/text-area/index.vue.mjs";
13
13
  import { default as O } from "./src/ap-form/items/number/index.vue.mjs";
14
- import { default as _ } from "./src/ap-form/items/date/index.vue.mjs";
15
- import { default as H } from "./src/ap-form/items/date-range/index.vue.mjs";
14
+ import { default as W } from "./src/ap-form/items/date/index.vue.mjs";
15
+ import { default as z } from "./src/ap-form/items/date-range/index.vue.mjs";
16
16
  import { default as $ } from "./src/ap-form/items/radio/index.vue.mjs";
17
17
  import { default as q } from "./src/ap-form/items/select/index.vue.mjs";
18
18
  import { default as Q } from "./src/ap-form/items/switch/index.vue.mjs";
@@ -29,17 +29,17 @@ import { default as ce } from "./src/ap-form/set/index.vue.mjs";
29
29
  import { default as Ie } from "./src/ap-form/drawer-form/index.vue.mjs";
30
30
  import { default as be } from "./src/ap-form/render/control.vue.mjs";
31
31
  import { default as De } from "./src/ap-form/render/item.vue.mjs";
32
- import { default as ge } from "./src/ap-form/provider/index.vue.mjs";
32
+ import { default as Se } from "./src/ap-form/provider/index.vue.mjs";
33
33
  import { ApField as Ge } from "./src/ap-field/index.mjs";
34
34
  import { ApFieldText as Pe } from "./src/ap-field/text/index.mjs";
35
35
  import { default as Le } from "./src/ap-field/checkbox/index.vue.mjs";
36
- import { default as ye } from "./src/ap-field/date/index.vue.mjs";
36
+ import { default as Re } from "./src/ap-field/date/index.vue.mjs";
37
37
  import { default as we } from "./src/ap-field/number/index.vue.mjs";
38
38
  import { default as ve } from "./src/ap-field/radio/index.vue.mjs";
39
39
  import { default as Ke } from "./src/ap-field/switch/index.vue.mjs";
40
40
  import { default as Oe } from "./src/ap-field/text-area/index.vue.mjs";
41
- import { default as _e } from "./src/ap-field/date-range/index.vue.mjs";
42
- import { default as He } from "./src/ap-field/select/index.vue.mjs";
41
+ import { default as We } from "./src/ap-field/date-range/index.vue.mjs";
42
+ import { default as ze } from "./src/ap-field/select/index.vue.mjs";
43
43
  import { default as $e } from "./src/ap-field/text/password.vue.mjs";
44
44
  import { default as qe } from "./src/ap-field/slider/index.vue.mjs";
45
45
  import { default as Qe } from "./src/ap-field/segmented/index.vue.mjs";
@@ -54,18 +54,18 @@ import { DictCode as no, langMap as io } from "./src/work-order-modal/interfaces
54
54
  import { createWorkOrderModal as Fo } from "./src/work-order-modal/createWorkOrder.mjs";
55
55
  import { default as To } from "./src/work-order-modal/work-order-modal.vue.mjs";
56
56
  import { default as Co } from "./src/ap-tag/ap-tag.vue.mjs";
57
- import { default as So } from "./src/ap-tag/ap-tag-group.vue.mjs";
57
+ import { default as go } from "./src/ap-tag/ap-tag-group.vue.mjs";
58
58
  import { default as ho } from "./src/ap-info-layout/ApInfoLayout.vue.mjs";
59
59
  import { NeedNameKeyDefault as Mo } from "./src/ap-upload/apUploadTypes.mjs";
60
60
  import { default as Eo } from "./src/ap-upload/apUpload.vue.mjs";
61
61
  import { ApDownLoadNeedNameKeyDefault as No } from "./src/ap-download/interface.mjs";
62
- import { default as Ro } from "./src/ap-download/ap-download.vue.mjs";
62
+ import { default as yo } from "./src/ap-download/ap-download.vue.mjs";
63
63
  import { CheckCard as ko } from "./src/check-card/index.mjs";
64
64
  import { default as Bo } from "./src/check-card/group.vue.mjs";
65
65
  import { ApModal as Uo } from "./src/ap-modal/index.mjs";
66
- import { default as Wo } from "./src/ap-list/index.vue.mjs";
67
- import { default as zo } from "./src/ap-button/ap-button.vue.mjs";
68
- import { default as Vo } from "./src/ap-button/ap-action-button.vue.mjs";
66
+ import { default as Vo } from "./src/ap-list/index.vue.mjs";
67
+ import { default as _o } from "./src/ap-button/ap-button.vue.mjs";
68
+ import { default as Ho } from "./src/ap-button/ap-action-button.vue.mjs";
69
69
  import { ApDrawer as jo } from "./src/ap-drawer/index.mjs";
70
70
  import { ApTransformDataHelper as Jo } from "./src/utils/ap-trans-data/index.mjs";
71
71
  import { default as Xo } from "./src/business/ap-table-modal/index.mjs";
@@ -81,17 +81,17 @@ import { ApExportGroupActionType as ir } from "./src/business/ap-export-group/in
81
81
  import { ApExportGroup as Fr } from "./src/business/ap-export-group/index.mjs";
82
82
  import { handleExportDownload as Tr } from "./src/business/ap-export-group/handleExportDownload.mjs";
83
83
  import { convertExportField as Cr } from "./src/business/ap-export-group/convertExportField.mjs";
84
- import { ApImage as Sr } from "./src/business/ap-image/index.mjs";
84
+ import { ApImage as gr } from "./src/business/ap-image/index.mjs";
85
85
  import { ApInputRadio as hr } from "./src/business/ap-input-radio/index.mjs";
86
86
  import { ApLabel as Mr, ApLabelGroup as Pr } from "./src/business/ap-label/index.mjs";
87
87
  import { locales as Lr } from "./src/business/ap-ladder/interface.mjs";
88
- import { ApLadder as yr } from "./src/business/ap-ladder/index.mjs";
88
+ import { ApLadder as Rr } from "./src/business/ap-ladder/index.mjs";
89
89
  import { ApSelectLayout as wr } from "./src/business/ap-select-layout/index.mjs";
90
90
  import { ApStatus as vr, ApStatusGroup as Br } from "./src/business/ap-status/index.mjs";
91
91
  import { ApTitle as Ur } from "./src/business/ap-title/index.mjs";
92
- import { usePageListApTable as Wr } from "./src/business/hooks/usePageListApTable.mjs";
93
- import { useTableRefresh as zr } from "./src/business/hooks/useTableRefresh.mjs";
94
- import { computedRecords as Vr, flattenColumns as $r, formatDataIndex as jr, formatNumber as qr } from "./src/business/ap-summary/utils.mjs";
92
+ import { usePageListApTable as Vr } from "./src/business/hooks/usePageListApTable.mjs";
93
+ import { useTableRefresh as _r } from "./src/business/hooks/useTableRefresh.mjs";
94
+ import { computedRecords as Hr, flattenColumns as $r, formatDataIndex as jr, formatNumber as qr } from "./src/business/ap-summary/utils.mjs";
95
95
  import { ApSummary as Qr } from "./src/business/ap-summary/index.mjs";
96
96
  import { ApNeedNameKeyDefault as Yr } from "./src/business/ap-appendix/interface.mjs";
97
97
  import { ApAppendix as et } from "./src/business/ap-appendix/index.mjs";
@@ -105,12 +105,13 @@ import { ApTable as ct } from "./src/ap-table/index.mjs";
105
105
  import { default as It } from "./src/editable-table/index.vue.mjs";
106
106
  import { default as bt } from "./src/editable-table/form-item.vue.mjs";
107
107
  import { default as Dt } from "./src/ap-descriptions/ap-descriptions.vue.mjs";
108
- import { default as gt } from "./src/scroll-bar/index.vue.mjs";
109
- import { default as Gt } from "./src/scroll-bar/internal.vue.mjs";
110
- import { useMessage as Pt } from "./src/hooks/useMessage.mjs";
111
- import { useControllableValue as Lt } from "./src/hooks/useControllableValue.mjs";
112
- import { useManualRef as yt } from "./src/hooks/useManualRef.mjs";
113
- import { useThrottleRef as wt } from "./src/hooks/useThrottleRef.mjs";
108
+ import { ensureRangeValue as St } from "./src/scroll-bar/utils/index.mjs";
109
+ import { default as Gt } from "./src/scroll-bar/index.vue.mjs";
110
+ import { default as Pt } from "./src/scroll-bar/internal.vue.mjs";
111
+ import { useMessage as Lt } from "./src/hooks/useMessage.mjs";
112
+ import { useControllableValue as Rt } from "./src/hooks/useControllableValue.mjs";
113
+ import { useManualRef as wt } from "./src/hooks/useManualRef.mjs";
114
+ import { useThrottleRef as vt } from "./src/hooks/useThrottleRef.mjs";
114
115
  const a = {
115
116
  install: (r) => {
116
117
  for (const t in o) {
@@ -121,7 +122,7 @@ const a = {
121
122
  };
122
123
  export {
123
124
  w as APConfigProvider,
124
- Vo as ApActionButton,
125
+ Ho as ApActionButton,
125
126
  so as ApActionGroup,
126
127
  to as ApActionItem,
127
128
  xo as ApActionItemDropdown,
@@ -131,12 +132,12 @@ export {
131
132
  tr as ApAttachment,
132
133
  ar as ApBatchAction,
133
134
  mr as ApBatchActionGroup,
134
- zo as ApButton,
135
+ _o as ApButton,
135
136
  xr as ApButtonGroup,
136
137
  ur as ApCard,
137
138
  Dt as ApDescriptions,
138
139
  No as ApDownLoadNeedNameKeyDefault,
139
- Ro as ApDownload,
140
+ yo as ApDownload,
140
141
  jo as ApDrawer,
141
142
  Ar as ApExpandAlert,
142
143
  Fr as ApExportGroup,
@@ -144,14 +145,14 @@ export {
144
145
  rt as ApExtensionSelect,
145
146
  Ge as ApField,
146
147
  Le as ApFieldCheckbox,
147
- ye as ApFieldDate,
148
- _e as ApFieldDateRange,
148
+ Re as ApFieldDate,
149
+ We as ApFieldDateRange,
149
150
  we as ApFieldNumber,
150
151
  $e as ApFieldPassword,
151
152
  ve as ApFieldRadio,
152
153
  Ye as ApFieldRate,
153
154
  Qe as ApFieldSegmented,
154
- He as ApFieldSelect,
155
+ ze as ApFieldSelect,
155
156
  qe as ApFieldSlider,
156
157
  Ke as ApFieldSwitch,
157
158
  Pe as ApFieldText,
@@ -163,8 +164,8 @@ export {
163
164
  pe as ApFormItem,
164
165
  dt as ApFormItemBatchInput,
165
166
  Y as ApFormItemCheckbox,
166
- _ as ApFormItemDate,
167
- H as ApFormItemDateRange,
167
+ W as ApFormItemDate,
168
+ z as ApFormItemDateRange,
168
169
  fe as ApFormItemGroup,
169
170
  O as ApFormItemNumber,
170
171
  $ as ApFormItemRadio,
@@ -176,17 +177,17 @@ export {
176
177
  ee as ApFormItemTextPassword,
177
178
  le as ApFormList,
178
179
  se as ApFormModalForm,
179
- ge as ApFormProvider,
180
+ Se as ApFormProvider,
180
181
  de as ApFormSearchForm,
181
182
  ce as ApFormSet,
182
183
  tt as ApGroupSearch,
183
- Sr as ApImage,
184
+ gr as ApImage,
184
185
  ho as ApInfoLayout,
185
186
  hr as ApInputRadio,
186
187
  Mr as ApLabel,
187
188
  Pr as ApLabelGroup,
188
- yr as ApLadder,
189
- Wo as ApList,
189
+ Rr as ApLadder,
190
+ Vo as ApList,
190
191
  Uo as ApModal,
191
192
  Yr as ApNeedNameKeyDefault,
192
193
  pt as ApPopoverSelect,
@@ -198,7 +199,7 @@ export {
198
199
  ct as ApTable,
199
200
  Xo as ApTableModal,
200
201
  Co as ApTag,
201
- So as ApTagGroup,
202
+ go as ApTagGroup,
202
203
  Ur as ApTitle,
203
204
  Jo as ApTransformDataHelper,
204
205
  Eo as ApUpload,
@@ -212,25 +213,26 @@ export {
212
213
  no as DictCode,
213
214
  It as EditableTable,
214
215
  bt as EditableTableFormItem,
215
- Gt as InternalScrollBar,
216
+ Pt as InternalScrollBar,
216
217
  Mo as NeedNameKeyDefault,
217
- gt as ScrollBar,
218
+ Gt as ScrollBar,
218
219
  To as WorkOrderModal,
219
220
  eo as adminToken,
220
221
  oo as aplusToken,
221
222
  b as buildLocaleContext,
222
223
  C as buildTranslator,
223
- Vr as computedRecords,
224
+ Hr as computedRecords,
224
225
  n as configProviderContextKey,
225
226
  d as configProviderProps,
226
227
  Cr as convertExportField,
227
228
  Fo as createWorkOrderModal,
228
229
  a as default,
229
230
  G as defaultNamespace,
231
+ St as ensureRangeValue,
230
232
  $r as flattenColumns,
231
233
  jr as formatDataIndex,
232
234
  qr as formatNumber,
233
- y as globalConfigCached,
235
+ R as globalConfigCached,
234
236
  Tr as handleExportDownload,
235
237
  c as keysOf,
236
238
  io as langMap,
@@ -239,18 +241,18 @@ export {
239
241
  M as namespaceContextKey,
240
242
  l as pathMap,
241
243
  F as provideGlobalConfig,
242
- S as translate,
243
- Lt as useControllableValue,
244
+ g as translate,
245
+ Rt as useControllableValue,
244
246
  P as useGetDerivedNamespace,
245
247
  I as useGlobalConfig,
246
- g as useLocale,
247
- yt as useManualRef,
248
- Pt as useMessage,
248
+ S as useLocale,
249
+ wt as useManualRef,
250
+ Lt as useMessage,
249
251
  E as useNamespace,
250
- Wr as usePageListApTable,
252
+ Vr as usePageListApTable,
251
253
  Zo as useTableModal,
252
254
  nt as useTablePaging,
253
- zr as useTableRefresh,
255
+ _r as useTableRefresh,
254
256
  or as useTableSelectModal,
255
- wt as useThrottleRef
257
+ vt as useThrottleRef
256
258
  };
@@ -56,6 +56,7 @@ declare const __VLS_component: DefineComponent<ApFieldDateProps, {}, {}, {}, {},
56
56
  showToday: boolean;
57
57
  showTime: boolean | SharedTimeProps<dayjs.Dayjs>;
58
58
  emptyText: string;
59
+ formatBegins: boolean;
59
60
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
60
61
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
61
62
  export default _default;
@@ -83,23 +83,24 @@ const le = /* @__PURE__ */ b({
83
83
  onChange: {},
84
84
  onOk: {},
85
85
  format: { default: "Y-D" },
86
+ formatBegins: { type: Boolean, default: !0 },
86
87
  timezone: {}
87
88
  },
88
89
  emits: ["update:value"],
89
90
  setup(h, { emit: B }) {
90
- const e = h, k = B, { value: p, updateValue: c } = Z(
91
+ const e = h, g = B, { value: m, updateValue: c } = Z(
91
92
  e,
92
- k
93
- ), P = Y("Date", e), n = i(
93
+ g
94
+ ), k = Y("Date", e), n = i(
94
95
  () => I.indexOf(e.format) > -1
95
96
  ), d = i(
96
97
  () => n.value ? H[e.format] : e.format
97
- ), m = i(() => {
98
- if (y(t(p)))
98
+ ), p = i(() => {
99
+ if (y(t(m)))
99
100
  return;
100
- let o = r(t(p));
101
- return e.timezone && (o = r(W(t(p), e.timezone))), o;
102
- }), g = i(() => t(n) ? e.picker ?? U[e.format] : e.picker), C = i(() => {
101
+ let o = r(t(m));
102
+ return e.timezone && (o = r(W(t(m), e.timezone))), o;
103
+ }), P = i(() => t(n) ? e.picker ?? U[e.format] : e.picker), C = i(() => {
103
104
  const o = t(n) ? K[e.format] : {};
104
105
  return {
105
106
  ...$(e, [
@@ -111,7 +112,7 @@ const le = /* @__PURE__ */ b({
111
112
  "onUpdate:value",
112
113
  "mode"
113
114
  ]),
114
- placeholder: t(P),
115
+ placeholder: t(k),
115
116
  ...o
116
117
  };
117
118
  }), f = L(e.timezone);
@@ -122,14 +123,19 @@ const le = /* @__PURE__ */ b({
122
123
  }
123
124
  const l = r(o);
124
125
  c(
125
- f(l, t(n) ? t(d) : void 0)
126
+ f(
127
+ l,
128
+ t(n) ? t(d) : void 0,
129
+ e.formatBegins
130
+ )
126
131
  );
127
132
  }
128
133
  function T(o, l) {
129
134
  var s;
130
135
  const u = r(o), a = o ? f(
131
136
  u,
132
- t(n) ? t(d) : void 0
137
+ t(n) ? t(d) : void 0,
138
+ e.formatBegins
133
139
  ) : null;
134
140
  (s = e.onChange) == null || s.call(e, a, l);
135
141
  }
@@ -137,16 +143,17 @@ const le = /* @__PURE__ */ b({
137
143
  var a;
138
144
  const l = r(o), u = o ? f(
139
145
  l,
140
- t(n) ? t(d) : void 0
146
+ t(n) ? t(d) : void 0,
147
+ e.formatBegins
141
148
  ) : null;
142
149
  (a = e.onOk) == null || a.call(e, u);
143
150
  }
144
151
  return (o, l) => o.mode === "read" ? (v(), _(w, { key: 0 }, [
145
- M(R(m.value ? t(r)(m.value).format(d.value) : o.emptyText), 1)
152
+ M(R(p.value ? t(r)(p.value).format(d.value) : o.emptyText), 1)
146
153
  ], 64)) : (v(), F(t(j), A({ key: 1 }, C.value, {
147
- value: m.value,
154
+ value: p.value,
148
155
  format: d.value,
149
- picker: g.value,
156
+ picker: P.value,
150
157
  "onUpdate:value": O,
151
158
  onChange: T,
152
159
  onOk: S
@@ -41,6 +41,11 @@ export type ApFieldDateProps = BasicApFieldProps<Omit<DatePickerProps, 'mode' |
41
41
  onChange?: (ts: number | null, dayStr: string) => void;
42
42
  onOk?: (ts: number | null) => void;
43
43
  format?: LiteralUnion<ApFormatPresetType, string>;
44
+ /**
45
+ * 格式化时间时是否以`format`的开始
46
+ * @default true
47
+ */
48
+ formatBegins?: boolean;
44
49
  /**
45
50
  * 指定时区,指定后value会变为特定时区下的timestamp
46
51
  */
@@ -1,23 +1,23 @@
1
- import { defineComponent as G, ref as x, unref as e, useSlots as H, createVNode as l, cloneVNode as L, openBlock as y, createElementBlock as M, Fragment as q, createBlock as J, resolveDynamicComponent as K, createCommentVNode as P, withCtx as s, createElementVNode as i, normalizeClass as r, toDisplayString as m, createTextVNode as v, isRef as Q } from "vue";
2
- import { Button as B, Modal as W, RadioGroup as X, RadioButton as _, Divider as h } from "@aplus-frontend/antdv";
3
- import { getSingleVNode as Y } from "../../../../utils/slot.mjs";
4
- import { useInjectApTable as Z } from "../../../context.mjs";
1
+ import { defineComponent as G, ref as y, unref as e, computed as H, useSlots as L, createVNode as l, cloneVNode as M, openBlock as x, createElementBlock as P, Fragment as q, createBlock as J, resolveDynamicComponent as Q, createCommentVNode as W, withCtx as i, createElementVNode as s, normalizeClass as r, toDisplayString as c, createTextVNode as C, isRef as X } from "vue";
2
+ import { Button as B, Modal as Y, RadioGroup as Z, RadioButton as _, Divider as h } from "@aplus-frontend/antdv";
3
+ import { getSingleVNode as ee } from "../../../../utils/slot.mjs";
4
+ import { useInjectApTable as te } from "../../../context.mjs";
5
5
  import "../tree-select/index.vue.mjs";
6
- import { useTableColumnState as ee } from "../../../hooks/use-table-column-state.mjs";
6
+ import { useTableColumnState as le } from "../../../hooks/use-table-column-state.mjs";
7
7
  import "../../../../config-provider/index.mjs";
8
8
  import "../sorter/index.vue.mjs";
9
- import te, { customCloneColumnStates as N } from "../utils.mjs";
10
- import { SettingOutlined as le } from "@ant-design/icons-vue";
11
- import { useLocale as oe } from "../../../../config-provider/hooks/use-locale.mjs";
9
+ import oe, { customCloneColumnStates as N } from "../utils.mjs";
10
+ import { SettingOutlined as ne } from "@ant-design/icons-vue";
11
+ import { useLocale as ae } from "../../../../config-provider/hooks/use-locale.mjs";
12
12
  import { useNamespace as T } from "../../../../config-provider/hooks/use-namespace.mjs";
13
- import ne from "../tree-select/index.vue2.mjs";
14
- import ae from "../sorter/index.vue2.mjs";
15
- const ie = {
13
+ import se from "../tree-select/index.vue2.mjs";
14
+ import ie from "../sorter/index.vue2.mjs";
15
+ const re = {
16
16
  style: {
17
17
  lineHeight: "22px",
18
18
  color: "#8896B0"
19
19
  }
20
- }, xe = /* @__PURE__ */ G({
20
+ }, Be = /* @__PURE__ */ G({
21
21
  __name: "index",
22
22
  props: {
23
23
  config: {
@@ -25,46 +25,46 @@ const ie = {
25
25
  }
26
26
  },
27
27
  setup(A) {
28
- const C = A, {
28
+ const m = A, {
29
29
  columnsBackup: V,
30
30
  size: z,
31
- updateSize: c,
32
- updateColumns: d
33
- } = Z(), f = x(e(z)), {
31
+ updateSize: d,
32
+ updateColumns: f
33
+ } = te(), g = y(e(z)), R = H(() => m.config.persistenceKey), {
34
34
  columnState: n,
35
- setColumnState: R,
36
- isAllSelected: w,
37
- toggleSelectAll: D,
38
- columnStateBackup: O,
39
- setColumnStateBackup: U,
40
- cacheColumnStateIfNeeded: E
41
- } = ee(C.config, []), {
35
+ setColumnState: w,
36
+ isAllSelected: D,
37
+ toggleSelectAll: O,
38
+ columnStateBackup: U,
39
+ setColumnStateBackup: E,
40
+ cacheColumnStateIfNeeded: I
41
+ } = le(m.config, R, []), {
42
42
  t: a
43
- } = oe(), {
44
- b: g,
43
+ } = ae(), {
44
+ b: v,
45
45
  be: S
46
46
  } = T("ap-column-setting"), {
47
- b: I
48
- } = T("ap-table"), u = x(!1), $ = H(), b = Y($.trigger) || l(B, {
49
- icon: l(le, null, null),
50
- class: I("setting-trigger-button")
51
- }, null), k = b ? L(b, {
47
+ b: K
48
+ } = T("ap-table"), u = y(!1), $ = L(), b = ee($.trigger) || l(B, {
49
+ icon: l(ne, null, null),
50
+ class: K("setting-trigger-button")
51
+ }, null), k = b ? M(b, {
52
52
  onClick: () => {
53
53
  u.value = !0;
54
54
  }
55
55
  }) : null;
56
56
  function j() {
57
- R(N(e(O)));
57
+ w(N(e(U)));
58
58
  }
59
59
  function F() {
60
60
  var t, o;
61
- d == null || d(te(e(V), e(n))), c == null || c(e(f)), u.value = !1;
61
+ f == null || f(oe(e(V), e(n))), d == null || d(e(g)), u.value = !1;
62
62
  const p = N(n.value);
63
- U(p), E(p), (o = (t = C.config) == null ? void 0 : t.onChange) == null || o.call(t, p);
63
+ E(p), I(p), (o = (t = m.config) == null ? void 0 : t.onChange) == null || o.call(t, p);
64
64
  }
65
- return (p, t) => (y(), M(q, null, [e(k) ? (y(), J(K(e(k)), {
65
+ return (p, t) => (x(), P(q, null, [e(k) ? (x(), J(Q(e(k)), {
66
66
  key: 0
67
- })) : P("", !0), l(e(W), {
67
+ })) : W("", !0), l(e(Y), {
68
68
  open: u.value,
69
69
  "onUpdate:open": t[2] || (t[2] = (o) => u.value = o),
70
70
  title: e(a)("ap.apTable.setting.title"),
@@ -76,32 +76,32 @@ const ie = {
76
76
  },
77
77
  onOk: F
78
78
  }, {
79
- default: s(() => [i("div", {
80
- class: r(e(g)("wrapper"))
81
- }, [i("div", {
82
- class: r(e(g)("left"))
83
- }, [i("div", {
79
+ default: i(() => [s("div", {
80
+ class: r(e(v)("wrapper"))
81
+ }, [s("div", {
82
+ class: r(e(v)("left"))
83
+ }, [s("div", {
84
84
  class: r(e(S)("left", "header"))
85
- }, [i("div", null, [i("span", ie, m(e(a)("ap.apTable.setting.selectAllTip")), 1), l(e(B), {
85
+ }, [s("div", null, [s("span", re, c(e(a)("ap.apTable.setting.selectAllTip")), 1), l(e(B), {
86
86
  type: "link",
87
87
  size: "small",
88
- onClick: e(D)
88
+ onClick: e(O)
89
89
  }, {
90
- default: s(() => [v(m(e(w) ? e(a)("ap.apTable.setting.unSelectAll") : e(a)("ap.apTable.setting.selectAll")), 1)]),
90
+ default: i(() => [C(c(e(D) ? e(a)("ap.apTable.setting.unSelectAll") : e(a)("ap.apTable.setting.selectAll")), 1)]),
91
91
  _: 1
92
- }, 8, ["onClick"])]), l(e(X), {
93
- value: f.value,
94
- "onUpdate:value": t[0] || (t[0] = (o) => f.value = o)
92
+ }, 8, ["onClick"])]), l(e(Z), {
93
+ value: g.value,
94
+ "onUpdate:value": t[0] || (t[0] = (o) => g.value = o)
95
95
  }, {
96
- default: s(() => [l(e(_), {
96
+ default: i(() => [l(e(_), {
97
97
  value: "small"
98
98
  }, {
99
- default: s(() => [v(m(e(a)("ap.apTable.setting.sizeSmall")), 1)]),
99
+ default: i(() => [C(c(e(a)("ap.apTable.setting.sizeSmall")), 1)]),
100
100
  _: 1
101
101
  }), l(e(_), {
102
102
  value: "middle"
103
103
  }, {
104
- default: s(() => [v(m(e(a)("ap.apTable.setting.sizeNormal")), 1)]),
104
+ default: i(() => [C(c(e(a)("ap.apTable.setting.sizeNormal")), 1)]),
105
105
  _: 1
106
106
  })]),
107
107
  _: 1
@@ -110,7 +110,7 @@ const ie = {
110
110
  style: {
111
111
  margin: "0px"
112
112
  }
113
- }), l(ne, {
113
+ }), l(se, {
114
114
  class: r(e(S)("left", "content")),
115
115
  value: e(n)
116
116
  }, null, 8, ["class", "value"])], 2), l(e(h), {
@@ -119,11 +119,11 @@ const ie = {
119
119
  height: "100%",
120
120
  margin: "0px"
121
121
  }
122
- }), i("div", {
123
- class: r(e(g)("right"))
124
- }, [l(ae, {
122
+ }), s("div", {
123
+ class: r(e(v)("right"))
124
+ }, [l(ie, {
125
125
  value: e(n),
126
- "onUpdate:value": t[1] || (t[1] = (o) => Q(n) ? n.value = o : null),
126
+ "onUpdate:value": t[1] || (t[1] = (o) => X(n) ? n.value = o : null),
127
127
  onReset: j
128
128
  }, null, 8, ["value"])], 2)], 2)]),
129
129
  _: 1
@@ -131,5 +131,5 @@ const ie = {
131
131
  }
132
132
  });
133
133
  export {
134
- xe as default
134
+ Be as default
135
135
  };
@@ -1838,6 +1838,7 @@ export declare const apTableRenderItemMap: {
1838
1838
  showToday: boolean;
1839
1839
  showTime: boolean | SharedTimeProps<Dayjs>;
1840
1840
  emptyText: string;
1841
+ formatBegins: boolean;
1841
1842
  }, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
1842
1843
  P: {};
1843
1844
  B: {};
@@ -1874,6 +1875,7 @@ export declare const apTableRenderItemMap: {
1874
1875
  showToday: boolean;
1875
1876
  showTime: boolean | SharedTimeProps<Dayjs>;
1876
1877
  emptyText: string;
1878
+ formatBegins: boolean;
1877
1879
  }>;
1878
1880
  __isFragment?: never;
1879
1881
  __isTeleport?: never;
@@ -1909,6 +1911,7 @@ export declare const apTableRenderItemMap: {
1909
1911
  showToday: boolean;
1910
1912
  showTime: boolean | SharedTimeProps<Dayjs>;
1911
1913
  emptyText: string;
1914
+ formatBegins: boolean;
1912
1915
  }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
1913
1916
  $slots: Readonly<{
1914
1917
  dateRender: any;
@@ -1,6 +1,6 @@
1
- import { ApColumnState, ApTableSettingType } from '../interface';
2
1
  import { Ref, ComputedRef, ShallowRef } from 'vue';
3
- export declare const useTableColumnState: (columnSetting: ApTableSettingType, initialColumnState: ApColumnState[]) => {
2
+ import { ApColumnState, ApTableSettingType } from '../interface';
3
+ export declare const useTableColumnState: (columnSetting: ApTableSettingType, persistenceKey: Ref<string | undefined>, initialColumnState: ApColumnState[]) => {
4
4
  columnState: Ref<{
5
5
  key: string | number;
6
6
  show?: boolean | undefined;