@aplus-frontend/ui 0.1.28 → 0.1.30

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 (79) hide show
  1. package/es/index.mjs +78 -76
  2. package/es/src/ap-field/date-range/index.vue.mjs +154 -109
  3. package/es/src/ap-field/interface.d.ts +4 -0
  4. package/es/src/ap-field/select/index.vue.mjs +4 -2
  5. package/es/src/ap-form/ap-form.vue.d.ts +1 -1
  6. package/es/src/ap-form/modal-form/index.vue.d.ts +2 -2
  7. package/es/src/ap-form/search-form/index.vue.d.ts +2 -2
  8. package/es/src/ap-form/style/ap-form-item.css +2 -0
  9. package/es/src/ap-table/ap-table.vue.mjs +1 -1
  10. package/es/src/ap-table/components/setting/modal/index.vue2.mjs +72 -97
  11. package/es/src/ap-table/components/setting/select-group/index.vue2.mjs +37 -33
  12. package/es/src/ap-table/components/setting/sorter/index.vue2.mjs +5 -6
  13. package/es/src/ap-table/components/setting/utils.d.ts +7 -1
  14. package/es/src/ap-table/components/setting/utils.mjs +37 -22
  15. package/es/src/ap-table/constants.d.ts +12 -0
  16. package/es/src/ap-table/hooks/use-table-column-state.d.ts +6 -2
  17. package/es/src/ap-table/hooks/use-table-column-state.mjs +101 -33
  18. package/es/src/ap-table/interface.d.ts +8 -1
  19. package/es/src/ap-table/utils.mjs +42 -42
  20. package/es/src/business/ap-action-button/ApActionButton.vue.d.ts +43 -0
  21. package/es/src/business/ap-action-button/ApActionButton.vue.mjs +4 -0
  22. package/es/src/business/ap-action-button/ApActionButton.vue2.mjs +97 -0
  23. package/es/src/business/ap-action-button/index.css +6 -0
  24. package/es/src/business/ap-action-button/interface.d.ts +6 -0
  25. package/es/src/business/ap-action-button/interface.mjs +1 -0
  26. package/es/src/business/index.d.ts +265 -0
  27. package/es/src/business/index.mjs +25 -21
  28. package/es/src/editable-table/form-item.vue.d.ts +2 -1
  29. package/es/src/editable-table/form-item.vue.mjs +69 -65
  30. package/es/src/editable-table/index.vue.d.ts +2 -1
  31. package/es/src/editable-table/index.vue.mjs +84 -79
  32. package/es/src/editable-table/interface.d.ts +6 -0
  33. package/es/src/index.mjs +209 -207
  34. package/es/src/theme/ap-action-button/ap-action-button.css +6 -0
  35. package/es/src/theme/ap-form/ap-form-item.css +2 -0
  36. package/es/src/work-order-modal/index.mjs +4 -3
  37. package/es/src/work-order-modal/interfaces.d.ts +3 -0
  38. package/es/src/work-order-modal/interfaces.mjs +6 -1
  39. package/es/src/work-order-modal/work-order-modal.vue.mjs +28 -28
  40. package/lib/index.js +1 -1
  41. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  42. package/lib/src/ap-field/interface.d.ts +4 -0
  43. package/lib/src/ap-field/select/index.vue.js +1 -1
  44. package/lib/src/ap-form/ap-form.vue.d.ts +1 -1
  45. package/lib/src/ap-form/modal-form/index.vue.d.ts +2 -2
  46. package/lib/src/ap-form/search-form/index.vue.d.ts +2 -2
  47. package/lib/src/ap-form/style/ap-form-item.css +2 -0
  48. package/lib/src/ap-table/ap-table.vue.js +1 -1
  49. package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
  50. package/lib/src/ap-table/components/setting/select-group/index.vue2.js +1 -1
  51. package/lib/src/ap-table/components/setting/sorter/index.vue2.js +1 -1
  52. package/lib/src/ap-table/components/setting/utils.d.ts +7 -1
  53. package/lib/src/ap-table/components/setting/utils.js +1 -1
  54. package/lib/src/ap-table/constants.d.ts +12 -0
  55. package/lib/src/ap-table/hooks/use-table-column-state.d.ts +6 -2
  56. package/lib/src/ap-table/hooks/use-table-column-state.js +1 -1
  57. package/lib/src/ap-table/interface.d.ts +8 -1
  58. package/lib/src/ap-table/utils.js +1 -1
  59. package/lib/src/business/ap-action-button/ApActionButton.vue.d.ts +43 -0
  60. package/lib/src/business/ap-action-button/ApActionButton.vue.js +1 -0
  61. package/lib/src/business/ap-action-button/ApActionButton.vue2.js +1 -0
  62. package/lib/src/business/ap-action-button/index.css +6 -0
  63. package/lib/src/business/ap-action-button/interface.d.ts +6 -0
  64. package/lib/src/business/ap-action-button/interface.js +1 -0
  65. package/lib/src/business/index.d.ts +265 -0
  66. package/lib/src/business/index.js +1 -1
  67. package/lib/src/editable-table/form-item.vue.d.ts +2 -1
  68. package/lib/src/editable-table/form-item.vue.js +1 -1
  69. package/lib/src/editable-table/index.vue.d.ts +2 -1
  70. package/lib/src/editable-table/index.vue.js +1 -1
  71. package/lib/src/editable-table/interface.d.ts +6 -0
  72. package/lib/src/index.js +1 -1
  73. package/lib/src/theme/ap-action-button/ap-action-button.css +6 -0
  74. package/lib/src/theme/ap-form/ap-form-item.css +2 -0
  75. package/lib/src/work-order-modal/index.js +1 -1
  76. package/lib/src/work-order-modal/interfaces.d.ts +3 -0
  77. package/lib/src/work-order-modal/interfaces.js +1 -1
  78. package/lib/src/work-order-modal/work-order-modal.vue.js +1 -1
  79. package/package.json +1 -1
package/es/index.mjs CHANGED
@@ -5,8 +5,8 @@ import { configProviderProps as x } from "./src/config-provider/config-provider-
5
5
  import { configProviderContextKey as u, tableDefaultConfig as n } from "./src/config-provider/constants.mjs";
6
6
  import { keysOf as c, provideGlobalConfig as T, useGlobalConfig as F } from "./src/config-provider/hooks/use-global-config.mjs";
7
7
  import { buildLocaleContext as b, buildTranslator as S, localeContextKey as I, translate as g, useLocale as P } from "./src/config-provider/hooks/use-locale.mjs";
8
- import { defaultNamespace as D, namespaceContextKey as M, useGetDerivedNamespace as R, useNamespace as G } from "./src/config-provider/hooks/use-namespace.mjs";
9
- import { ConfigProvider as B, globalConfigCached as L } from "./src/config-provider/config-provider.mjs";
8
+ import { defaultNamespace as D, namespaceContextKey as M, useGetDerivedNamespace as R, useNamespace as B } from "./src/config-provider/hooks/use-namespace.mjs";
9
+ import { ConfigProvider as v, globalConfigCached as L } from "./src/config-provider/config-provider.mjs";
10
10
  import { APConfigProvider as k } from "./src/config-provider/index.mjs";
11
11
  import { Scrollbar as y } from "./src/scroll-bar/index.mjs";
12
12
  import { CollapseContainer as K, ScrollContainer as X } from "./src/container/index.mjs";
@@ -24,7 +24,7 @@ import { isComponentFormSchema as Se, isSlotFormSchema as Ie } from "./src/pro-f
24
24
  import { Field as Pe } from "./src/pro-form/index.mjs";
25
25
  import { default as De } from "./src/pro-form/components/api-cascader.vue.mjs";
26
26
  import { default as Re } from "./src/pro-form/components/api-radio-group.vue.mjs";
27
- import { default as ve } from "./src/pro-form/components/api-select.vue.mjs";
27
+ import { default as Ge } from "./src/pro-form/components/api-select.vue.mjs";
28
28
  import { default as Le } from "./src/pro-form/components/api-transfer.vue.mjs";
29
29
  import { default as ke } from "./src/pro-form/components/api-tree.vue.mjs";
30
30
  import { default as ye } from "./src/pro-form/components/radio-button-group.vue.mjs";
@@ -49,7 +49,7 @@ import { default as Io } from "./src/pro-table/components/edit-table-header-icon
49
49
  import { default as Po } from "./src/pro-table/components/table-image.vue.mjs";
50
50
  import { useTable as Do } from "./src/pro-table/hooks/use-table.mjs";
51
51
  import { ApFormItemText as Ro } from "./src/ap-form/items/text/index.mjs";
52
- import { default as vo } from "./src/ap-form/items/text-area/index.vue.mjs";
52
+ import { default as Go } from "./src/ap-form/items/text-area/index.vue.mjs";
53
53
  import { default as Lo } from "./src/ap-form/items/number/index.vue.mjs";
54
54
  import { default as ko } from "./src/ap-form/items/date/index.vue.mjs";
55
55
  import { default as yo } from "./src/ap-form/items/date-range/index.vue.mjs";
@@ -76,7 +76,7 @@ import { default as Ir } from "./src/ap-field/date-range/index.vue.mjs";
76
76
  import { default as Pr } from "./src/ap-field/select/index.vue.mjs";
77
77
  import { default as Dr } from "./src/ap-field/text/password.vue.mjs";
78
78
  import { default as Rr } from "./src/ap-field/slider/index.vue.mjs";
79
- import { default as vr } from "./src/ap-field/segmented/index.vue.mjs";
79
+ import { default as Gr } from "./src/ap-field/segmented/index.vue.mjs";
80
80
  import { default as Lr } from "./src/ap-field/rate/index.vue.mjs";
81
81
  import { adminToken as kr, aplusToken as Nr } from "./src/design-token/index.mjs";
82
82
  import { ApActionItem as Er } from "./src/ap-action/index.mjs";
@@ -88,34 +88,34 @@ import { generateTableList as $r } from "./src/ap-custom-column/utils.mjs";
88
88
  import { useCacheColumnSetting as qr } from "./src/ap-custom-column/useCacheColumnSetting.mjs";
89
89
  import { default as Qr } from "./src/ap-custom-column/custom-column.vue.mjs";
90
90
  import { default as _r } from "./src/ap-custom-column/column-select.vue.mjs";
91
- import { DictCode as ot } from "./src/work-order-modal/interfaces.mjs";
92
- import { createWorkOrderModal as tt } from "./src/work-order-modal/createWorkOrder.mjs";
93
- import { default as pt } from "./src/work-order-modal/work-order-modal.vue.mjs";
94
- import { default as mt } from "./src/ap-tag/ap-tag.vue.mjs";
95
- import { default as st } from "./src/ap-tag/ap-tag-group.vue.mjs";
96
- import { default as xt } from "./src/ap-layout/ApInfoLayout.vue.mjs";
97
- import { NeedNameKeyDefault as ut } from "./src/ap-upload/apUploadTypes.mjs";
98
- import { default as At } from "./src/ap-upload/apUpload.vue.mjs";
99
- import { ApDownLoadNeedNameKeyDefault as Tt } from "./src/ap-download/interface.mjs";
100
- import { default as Ct } from "./src/ap-download/ap-download.vue.mjs";
101
- import { CheckCard as St } from "./src/check-card/index.mjs";
102
- import { default as gt } from "./src/check-card/group.vue.mjs";
103
- import { ApModal as ht } from "./src/ap-modal/index.mjs";
104
- import { default as Mt } from "./src/ap-list/index.vue.mjs";
91
+ import { DictCode as ot, langMap as rt } from "./src/work-order-modal/interfaces.mjs";
92
+ import { createWorkOrderModal as at } from "./src/work-order-modal/createWorkOrder.mjs";
93
+ import { default as ft } from "./src/work-order-modal/work-order-modal.vue.mjs";
94
+ import { default as lt } from "./src/ap-tag/ap-tag.vue.mjs";
95
+ import { default as dt } from "./src/ap-tag/ap-tag-group.vue.mjs";
96
+ import { default as it } from "./src/ap-layout/ApInfoLayout.vue.mjs";
97
+ import { NeedNameKeyDefault as nt } from "./src/ap-upload/apUploadTypes.mjs";
98
+ import { default as ct } from "./src/ap-upload/apUpload.vue.mjs";
99
+ import { ApDownLoadNeedNameKeyDefault as Ft } from "./src/ap-download/interface.mjs";
100
+ import { default as bt } from "./src/ap-download/ap-download.vue.mjs";
101
+ import { CheckCard as It } from "./src/check-card/index.mjs";
102
+ import { default as Pt } from "./src/check-card/group.vue.mjs";
103
+ import { ApModal as Dt } from "./src/ap-modal/index.mjs";
104
+ import { default as Rt } from "./src/ap-list/index.vue.mjs";
105
105
  import { usePageListApTable as Gt } from "./src/business/hooks/usePageListApTable.mjs";
106
- import { useTableRefresh as Bt } from "./src/business/hooks/useTableRefresh.mjs";
107
- import { default as wt } from "./src/business/ap-table-modal/index.mjs";
108
- import { useTableModal as Nt } from "./src/business/ap-table-modal/hooks/use-table-modal.mjs";
109
- import { useTableSelectModal as Et } from "./src/business/ap-table-modal/hooks/use-table-select-modal.mjs";
110
- import { ApAttachment as Xt, ApBatchAction as Yt, ApBatchActionGroup as Ht, ApExpandAlert as Ot, ApExportGroup as Wt, ApImage as zt, ApInputRadio as Ut, ApLabel as Vt, ApLabelGroup as $t, ApLadder as jt, ApSelectLayout as qt, ApStatus as Jt, ApStatusGroup as Qt, ApTitle as Zt } from "./src/business/index.mjs";
111
- import { ApTransformDataHelper as ea } from "./src/utils/ap-trans-data/index.mjs";
112
- import { useTablePaging as ra } from "./src/ap-table/hooks/use-table-paging.mjs";
113
- import { default as aa } from "./src/ap-table/ap-table.vue.mjs";
114
- import { default as fa } from "./src/editable-table/index.vue.mjs";
115
- import { default as la } from "./src/editable-table/form-item.vue.mjs";
116
- import { default as da } from "./src/ap-descriptions/ap-descriptions.vue.mjs";
117
- import { useMessage as ia } from "./src/hooks/useMessage.mjs";
118
- import { useControllableValue as na } from "./src/hooks/useControllableValue.mjs";
106
+ import { useTableRefresh as Lt } from "./src/business/hooks/useTableRefresh.mjs";
107
+ import { default as kt } from "./src/business/ap-table-modal/index.mjs";
108
+ import { useTableModal as yt } from "./src/business/ap-table-modal/hooks/use-table-modal.mjs";
109
+ import { useTableSelectModal as Kt } from "./src/business/ap-table-modal/hooks/use-table-select-modal.mjs";
110
+ import { ApActionButton as Yt, ApAttachment as Ht, ApBatchAction as Ot, ApBatchActionGroup as Wt, ApExpandAlert as zt, ApExportGroup as Ut, ApImage as Vt, ApInputRadio as $t, ApLabel as jt, ApLabelGroup as qt, ApLadder as Jt, ApSelectLayout as Qt, ApStatus as Zt, ApStatusGroup as _t, ApTitle as ea } from "./src/business/index.mjs";
111
+ import { ApTransformDataHelper as ra } from "./src/utils/ap-trans-data/index.mjs";
112
+ import { useTablePaging as aa } from "./src/ap-table/hooks/use-table-paging.mjs";
113
+ import { default as fa } from "./src/ap-table/ap-table.vue.mjs";
114
+ import { default as la } from "./src/editable-table/index.vue.mjs";
115
+ import { default as da } from "./src/editable-table/form-item.vue.mjs";
116
+ import { default as ia } from "./src/ap-descriptions/ap-descriptions.vue.mjs";
117
+ import { useMessage as na } from "./src/hooks/useMessage.mjs";
118
+ import { useControllableValue as ca } from "./src/hooks/useControllableValue.mjs";
119
119
  const p = {
120
120
  install: (r) => {
121
121
  for (const t in o) {
@@ -126,21 +126,22 @@ const p = {
126
126
  };
127
127
  export {
128
128
  k as APConfigProvider,
129
+ Yt as ApActionButton,
129
130
  Ur as ApActionGroup,
130
131
  Er as ApActionItem,
131
132
  Wr as ApActionItemDropdown,
132
133
  Xr as ApActionItemModal,
133
134
  Hr as ApActionItemPopconfirm,
134
- Xt as ApAttachment,
135
- Yt as ApBatchAction,
136
- Ht as ApBatchActionGroup,
135
+ Ht as ApAttachment,
136
+ Ot as ApBatchAction,
137
+ Wt as ApBatchActionGroup,
137
138
  Qr as ApCustomColumn,
138
139
  _r as ApCustomSelect,
139
- da as ApDescriptions,
140
- Tt as ApDownLoadNeedNameKeyDefault,
141
- Ct as ApDownload,
142
- Ot as ApExpandAlert,
143
- Wt as ApExportGroup,
140
+ ia as ApDescriptions,
141
+ Ft as ApDownLoadNeedNameKeyDefault,
142
+ bt as ApDownload,
143
+ zt as ApExpandAlert,
144
+ Ut as ApExportGroup,
144
145
  fr as ApField,
145
146
  dr as ApFieldCheckbox,
146
147
  ir as ApFieldDate,
@@ -149,7 +150,7 @@ export {
149
150
  Dr as ApFieldPassword,
150
151
  cr as ApFieldRadio,
151
152
  Lr as ApFieldRate,
152
- vr as ApFieldSegmented,
153
+ Gr as ApFieldSegmented,
153
154
  Pr as ApFieldSelect,
154
155
  Rr as ApFieldSlider,
155
156
  Fr as ApFieldSwitch,
@@ -166,32 +167,32 @@ export {
166
167
  Yo as ApFormItemSelect,
167
168
  Oo as ApFormItemSwitch,
168
169
  Ro as ApFormItemText,
169
- vo as ApFormItemTextArea,
170
+ Go as ApFormItemTextArea,
170
171
  Vo as ApFormItemTextPassword,
171
172
  er as ApFormList,
172
173
  ar as ApFormModalForm,
173
174
  rr as ApFormSearchForm,
174
- zt as ApImage,
175
- xt as ApInfoLayout,
176
- Ut as ApInputRadio,
177
- Vt as ApLabel,
178
- $t as ApLabelGroup,
179
- jt as ApLadder,
180
- Mt as ApList,
181
- ht as ApModal,
182
- qt as ApSelectLayout,
183
- Jt as ApStatus,
184
- Qt as ApStatusGroup,
185
- aa as ApTable,
186
- wt as ApTableModal,
187
- mt as ApTag,
188
- st as ApTagGroup,
189
- Zt as ApTitle,
190
- ea as ApTransformDataHelper,
191
- At as ApUpload,
175
+ Vt as ApImage,
176
+ it as ApInfoLayout,
177
+ $t as ApInputRadio,
178
+ jt as ApLabel,
179
+ qt as ApLabelGroup,
180
+ Jt as ApLadder,
181
+ Rt as ApList,
182
+ Dt as ApModal,
183
+ Qt as ApSelectLayout,
184
+ Zt as ApStatus,
185
+ _t as ApStatusGroup,
186
+ fa as ApTable,
187
+ kt as ApTableModal,
188
+ lt as ApTag,
189
+ dt as ApTagGroup,
190
+ ea as ApTitle,
191
+ ra as ApTransformDataHelper,
192
+ ct as ApUpload,
192
193
  De as ApiCascader,
193
194
  Re as ApiRadioGroup,
194
- ve as ApiSelect,
195
+ Ge as ApiSelect,
195
196
  Le as ApiTransfer,
196
197
  ke as ApiTree,
197
198
  Ye as ApiTreeSelect,
@@ -200,11 +201,11 @@ export {
200
201
  $ as BasicArrow,
201
202
  j as BasicHelp,
202
203
  q as BasicTitle,
203
- St as CheckCard,
204
- gt as CheckCardGroup,
204
+ It as CheckCard,
205
+ Pt as CheckCardGroup,
205
206
  K as CollapseContainer,
206
207
  Q as CollapseTransition,
207
- B as ConfigProvider,
208
+ v as ConfigProvider,
208
209
  xo as CountdownButton,
209
210
  io as CountdownInput,
210
211
  mo as CropperAvatar,
@@ -213,8 +214,8 @@ export {
213
214
  ot as DictCode,
214
215
  co as Dropdown,
215
216
  Io as EditTableHeaderIcon,
216
- fa as EditableTable,
217
- la as EditableTableFormItem,
217
+ la as EditableTable,
218
+ da as EditableTableFormItem,
218
219
  _ as ExpandTransition,
219
220
  ee as ExpandXTransition,
220
221
  oe as FadeTransition,
@@ -222,7 +223,7 @@ export {
222
223
  l as Icon,
223
224
  H as IconPicker,
224
225
  Ve as ModalButton,
225
- ut as NeedNameKeyDefault,
226
+ nt as NeedNameKeyDefault,
226
227
  je as PopConfirmButton,
227
228
  Ke as ProForm,
228
229
  Fo as ProTable,
@@ -245,7 +246,7 @@ export {
245
246
  s as SvgIcon,
246
247
  bo as TableAction,
247
248
  Po as TableImg,
248
- pt as WorkOrderModal,
249
+ ft as WorkOrderModal,
249
250
  kr as adminToken,
250
251
  Nr as aplusToken,
251
252
  b as buildLocaleContext,
@@ -253,7 +254,7 @@ export {
253
254
  u as configProviderContextKey,
254
255
  x as configProviderProps,
255
256
  no as createPrompt,
256
- tt as createWorkOrderModal,
257
+ at as createWorkOrderModal,
257
258
  p as default,
258
259
  D as defaultNamespace,
259
260
  U as en,
@@ -262,6 +263,7 @@ export {
262
263
  Se as isComponentFormSchema,
263
264
  Ie as isSlotFormSchema,
264
265
  c as keysOf,
266
+ rt as langMap,
265
267
  I as localeContextKey,
266
268
  M as namespaceContextKey,
267
269
  T as provideGlobalConfig,
@@ -269,22 +271,22 @@ export {
269
271
  g as translate,
270
272
  qr as useCacheColumnSetting,
271
273
  Te as useComponentRegister,
272
- na as useControllableValue,
274
+ ca as useControllableValue,
273
275
  ue as useDescription,
274
276
  Ce as useForm,
275
277
  R as useGetDerivedNamespace,
276
278
  F as useGlobalConfig,
277
279
  P as useLocale,
278
- ia as useMessage,
280
+ na as useMessage,
279
281
  ro as useModal,
280
282
  eo as useModalContext,
281
283
  to as useModalInner,
282
- G as useNamespace,
284
+ B as useNamespace,
283
285
  Gt as usePageListApTable,
284
286
  Do as useTable,
285
- Nt as useTableModal,
286
- ra as useTablePaging,
287
- Bt as useTableRefresh,
288
- Et as useTableSelectModal,
287
+ yt as useTableModal,
288
+ aa as useTablePaging,
289
+ Lt as useTableRefresh,
290
+ Kt as useTableSelectModal,
289
291
  W as zhCn
290
292
  };
@@ -1,29 +1,37 @@
1
- import { defineComponent as V, computed as c, unref as t, openBlock as h, createElementBlock as k, Fragment as B, createTextVNode as O, toDisplayString as P, renderSlot as T, createVNode as I, createBlock as j, mergeProps as U, createSlots as H, renderList as $, withCtx as K, normalizeProps as L, guardReactiveProps as W } from "vue";
2
- import { ApFieldDatePresetFormats as Y, PRESET_FORMAT_MAP as Z, PRESET_FORMAT_PICK_MAP as q, PRESET_FORMAT_TIME_MAP as G } from "../date/constant.mjs";
1
+ import { defineComponent as U, useSlots as H, computed as p, unref as n, isVNode as K, createVNode as M, Fragment as y, openBlock as h, createElementBlock as B, createTextVNode as O, toDisplayString as P, createBlock as D, resolveDynamicComponent as $, mergeProps as L, createSlots as W, renderList as Y, withCtx as Z, renderSlot as q, normalizeProps as G, guardReactiveProps as J } from "vue";
2
+ import { ApFieldDatePresetFormats as Q, PRESET_FORMAT_MAP as X, PRESET_FORMAT_PICK_MAP as ee, PRESET_FORMAT_TIME_MAP as oe } from "../date/constant.mjs";
3
3
  import "../../hooks/index.mjs";
4
- import { isNil as D, omit as S, isString as f } from "lodash-unified";
5
- import i from "dayjs";
6
- import { DatePicker as J } from "ant-design-vue";
7
- import { formatDayWithTimezone as Q, formatValue as b } from "../date/helper.mjs";
8
- import { SwapRightOutlined as X } from "@ant-design/icons-vue";
9
- import { omitUndefined as ee } from "../../utils/index.mjs";
10
- import { getTimeFormatToZone as R } from "@aplus-frontend/utils";
11
- import { useDefaultPlaceholder as oe } from "../hooks/use-default-placeholder.mjs";
12
- import { useControllableValue as te } from "../../hooks/useControllableValue.mjs";
13
- const ve = /* @__PURE__ */ V({
4
+ import { isNil as T, omit as b, isString as m, isFunction as ne } from "lodash-unified";
5
+ import d from "dayjs";
6
+ import { DatePicker as te } from "ant-design-vue";
7
+ import { formatDayWithTimezone as ae, formatValue as R } from "../date/helper.mjs";
8
+ import { SwapRightOutlined as re } from "@ant-design/icons-vue";
9
+ import { omitUndefined as le } from "../../utils/index.mjs";
10
+ import { getTimeFormatToZone as w } from "@aplus-frontend/utils";
11
+ import { useDefaultPlaceholder as ue } from "../hooks/use-default-placeholder.mjs";
12
+ import { useControllableValue as de } from "../../hooks/useControllableValue.mjs";
13
+ const Be = /* @__PURE__ */ U({
14
14
  __name: "index",
15
15
  props: {
16
- mode: { default: "edit" },
16
+ mode: {
17
+ default: "edit"
18
+ },
17
19
  class: {},
18
20
  style: {},
19
21
  id: {},
20
22
  defaultPickerValue: {},
21
23
  placeholder: {},
22
- disabled: { type: [Boolean, Array], default: void 0 },
24
+ disabled: {
25
+ type: [Boolean, Array],
26
+ default: void 0
27
+ },
23
28
  disabledTime: {},
24
29
  presets: {},
25
30
  ranges: {},
26
- separator: { type: [Object, String, Number, Boolean, null, Array], default: void 0 },
31
+ separator: {
32
+ type: [Object, String, Number, Boolean, null, Array],
33
+ default: void 0
34
+ },
27
35
  allowEmpty: {},
28
36
  onCalendarChange: {},
29
37
  onFocus: {},
@@ -42,14 +50,35 @@ const ve = /* @__PURE__ */ V({
42
50
  dropdownAlign: {},
43
51
  popupStyle: {},
44
52
  transitionName: {},
45
- allowClear: { type: Boolean, default: !0 },
46
- autofocus: { type: Boolean, default: void 0 },
53
+ allowClear: {
54
+ type: Boolean,
55
+ default: !0
56
+ },
57
+ autofocus: {
58
+ type: Boolean,
59
+ default: void 0
60
+ },
47
61
  tabindex: {},
48
- open: { type: Boolean, default: void 0 },
49
- defaultOpen: { type: Boolean, default: void 0 },
50
- inputReadOnly: { type: Boolean, default: void 0 },
51
- suffixIcon: { type: [Object, String, Number, Boolean, null, Array], default: void 0 },
52
- clearIcon: { type: [Object, String, Number, Boolean, null, Array], default: void 0 },
62
+ open: {
63
+ type: Boolean,
64
+ default: void 0
65
+ },
66
+ defaultOpen: {
67
+ type: Boolean,
68
+ default: void 0
69
+ },
70
+ inputReadOnly: {
71
+ type: Boolean,
72
+ default: void 0
73
+ },
74
+ suffixIcon: {
75
+ type: [Object, String, Number, Boolean, null, Array],
76
+ default: void 0
77
+ },
78
+ clearIcon: {
79
+ type: [Object, String, Number, Boolean, null, Array],
80
+ default: void 0
81
+ },
53
82
  getPopupContainer: {},
54
83
  inputRender: {},
55
84
  onOpenChange: {},
@@ -63,125 +92,141 @@ const ve = /* @__PURE__ */ V({
63
92
  monthCellRender: {},
64
93
  locale: {},
65
94
  size: {},
66
- bordered: { type: Boolean, default: void 0 },
67
- showTime: { type: Boolean, default: void 0 },
68
- showNow: { type: Boolean, default: void 0 },
69
- order: { type: Boolean, default: void 0 },
95
+ bordered: {
96
+ type: Boolean,
97
+ default: void 0
98
+ },
99
+ showTime: {
100
+ type: Boolean,
101
+ default: void 0
102
+ },
103
+ showNow: {
104
+ type: Boolean,
105
+ default: void 0
106
+ },
107
+ order: {
108
+ type: Boolean,
109
+ default: void 0
110
+ },
70
111
  defaultOpenValue: {},
71
- showHour: { type: Boolean, default: void 0 },
72
- showMinute: { type: Boolean, default: void 0 },
73
- showSecond: { type: Boolean, default: void 0 },
74
- use12Hours: { type: Boolean, default: void 0 },
112
+ showHour: {
113
+ type: Boolean,
114
+ default: void 0
115
+ },
116
+ showMinute: {
117
+ type: Boolean,
118
+ default: void 0
119
+ },
120
+ showSecond: {
121
+ type: Boolean,
122
+ default: void 0
123
+ },
124
+ use12Hours: {
125
+ type: Boolean,
126
+ default: void 0
127
+ },
75
128
  hourStep: {},
76
129
  minuteStep: {},
77
130
  secondStep: {},
78
- hideDisabledOptions: { type: Boolean, default: void 0 },
131
+ hideDisabledOptions: {
132
+ type: Boolean,
133
+ default: void 0
134
+ },
79
135
  disabledHours: {},
80
136
  disabledMinutes: {},
81
137
  disabledSeconds: {},
82
138
  valueFormat: {},
83
- emptyText: { default: "--" },
139
+ emptyText: {
140
+ default: "--"
141
+ },
84
142
  value: {},
85
143
  defaultValue: {},
86
144
  onChange: {},
87
145
  onOk: {},
88
- format: { default: "Y-D" },
89
- timezone: {}
146
+ format: {
147
+ default: "Y-D"
148
+ },
149
+ timezone: {},
150
+ readModeSeparator: {}
90
151
  },
91
152
  emits: ["update:value"],
92
- setup(M, { emit: w }) {
93
- const o = M, _ = w, u = c(
94
- () => Y.indexOf(o.format) > -1
95
- ), r = c(
96
- () => u.value ? Z[o.format] : o.format
97
- ), { value: p, updateValue: g } = te(
98
- o,
99
- _
100
- ), A = oe("DateRange", o), m = Q(o.timezone), v = c(() => {
101
- var l, d;
102
- const e = t(p);
103
- if (D(e) || !(e != null && e.length))
153
+ setup(_, {
154
+ emit: A
155
+ }) {
156
+ const o = _, F = A, S = H(), u = p(() => Q.indexOf(o.format) > -1), l = p(() => u.value ? X[o.format] : o.format), {
157
+ value: c,
158
+ updateValue: k
159
+ } = de(o, F), N = ue("DateRange", o), s = ae(o.timezone), v = p(() => {
160
+ var r, i;
161
+ const e = n(c);
162
+ if (T(e) || !(e != null && e.length))
104
163
  return e;
105
- const n = o.timezone ? R(
106
- t(p)[0],
107
- o.timezone
108
- ) : (l = t(p)) == null ? void 0 : l[0], a = o.timezone ? R(
109
- t(p)[1],
110
- o.timezone
111
- ) : (d = t(p)) == null ? void 0 : d[1];
112
- return [i(n), i(a)];
113
- }), F = c(() => t(u) ? o.picker ?? q[o.format] : o.picker), z = c(() => {
114
- const e = t(u) ? G[o.format] : {};
164
+ const a = o.timezone ? w(n(c)[0], o.timezone) : (r = n(c)) == null ? void 0 : r[0], t = o.timezone ? w(n(c)[1], o.timezone) : (i = n(c)) == null ? void 0 : i[1];
165
+ return [d(a), d(t)];
166
+ }), x = p(() => n(u) ? o.picker ?? ee[o.format] : o.picker), z = p(() => {
167
+ const e = n(u) ? oe[o.format] : {};
115
168
  return {
116
- ...ee(
117
- S(o, [
118
- "value",
119
- "onUpdate:value",
120
- "onChange",
121
- "onOk",
122
- "format",
123
- "mode"
124
- ])
125
- ),
126
- placeholder: t(A),
169
+ ...le(b(o, ["value", "onUpdate:value", "onChange", "onOk", "format", "mode"])),
170
+ placeholder: n(N),
127
171
  ...e
128
172
  };
129
173
  });
130
174
  function E(e) {
131
175
  if (!e) {
132
- g(e);
176
+ k(e);
133
177
  return;
134
178
  }
135
- let n = f(e[0]) ? i(e[0]) : e[0], a = f(e[1]) ? i(e[1]) : e[1];
136
- t(u) ? g([
137
- m(n, t(r)),
138
- m(a, t(r), !1)
139
- ]) : g([b(n), b(a)]);
179
+ let a = m(e[0]) ? d(e[0]) : e[0], t = m(e[1]) ? d(e[1]) : e[1];
180
+ n(u) ? k([s(a, n(l)), s(t, n(l), !1)]) : k([R(a), R(t)]);
140
181
  }
141
- function N(e) {
142
- var s;
143
- const n = f(e[0]) ? i(e[0]) : e[0], a = f(e[1]) ? i(e[1]) : e[1], l = e[0] ? t(u) ? m(n, t(r)) : n.valueOf() : null, d = e[1] ? t(u) ? m(a, t(r), !1) : a.valueOf() : null;
144
- (s = o.onOk) == null || s.call(o, [l, d]);
182
+ function V(e) {
183
+ var f;
184
+ const a = m(e[0]) ? d(e[0]) : e[0], t = m(e[1]) ? d(e[1]) : e[1], r = e[0] ? n(u) ? s(a, n(l)) : a.valueOf() : null, i = e[1] ? n(u) ? s(t, n(l), !1) : t.valueOf() : null;
185
+ (f = o.onOk) == null || f.call(o, [r, i]);
145
186
  }
146
- function x(e, n) {
147
- var y, C;
148
- if (D(e)) {
149
- (y = o.onChange) == null || y.call(o, e, n);
187
+ function I(e, a) {
188
+ var g, C;
189
+ if (T(e)) {
190
+ (g = o.onChange) == null || g.call(o, e, a);
150
191
  return;
151
192
  }
152
- const a = f(e[0]) ? i(e[0]) : e[0], l = f(e[1]) ? i(e[1]) : e[1], d = e[0] ? t(u) ? m(a, t(r)) : a.valueOf() : null, s = e[1] ? t(u) ? m(l, t(r), !1) : l.valueOf() : null;
153
- (C = o.onChange) == null || C.call(o, [d, s], n);
193
+ const t = m(e[0]) ? d(e[0]) : e[0], r = m(e[1]) ? d(e[1]) : e[1], i = e[0] ? n(u) ? s(t, n(l)) : t.valueOf() : null, f = e[1] ? n(u) ? s(r, n(l), !1) : r.valueOf() : null;
194
+ (C = o.onChange) == null || C.call(o, [i, f], a);
154
195
  }
155
- return (e, n) => {
156
- var a, l;
157
- return e.mode === "read" ? (h(), k(B, { key: 0 }, [
158
- v.value ? (h(), k(B, { key: 0 }, [
159
- O(P((a = v.value[0]) == null ? void 0 : a.format(r.value)) + " ", 1),
160
- T(e.$slots, "readModeSeparator", {}, () => [
161
- I(t(X))
162
- ]),
163
- O(" " + P((l = v.value[1]) == null ? void 0 : l.format(r.value)), 1)
164
- ], 64)) : (h(), k(B, { key: 1 }, [
165
- O(P(e.emptyText), 1)
166
- ], 64))
167
- ], 64)) : (h(), j(t(J).RangePicker, U({ key: 1 }, z.value, {
196
+ const j = p(() => {
197
+ var t;
198
+ const e = o.readModeSeparator;
199
+ if (e)
200
+ return K(e) || ne(e) ? o.readModeSeparator : M(y, null, [o.readModeSeparator]);
201
+ const a = (t = S.readModeSeparator) == null ? void 0 : t.call(S);
202
+ return a ? M(y, null, [a]) : re;
203
+ });
204
+ return (e, a) => {
205
+ var t, r;
206
+ return e.mode === "read" ? (h(), B(y, {
207
+ key: 0
208
+ }, [v.value ? (h(), B(y, {
209
+ key: 0
210
+ }, [O(P((t = v.value[0]) == null ? void 0 : t.format(l.value)) + " ", 1), (h(), D($(j.value))), O(" " + P((r = v.value[1]) == null ? void 0 : r.format(l.value)), 1)], 64)) : (h(), B(y, {
211
+ key: 1
212
+ }, [O(P(e.emptyText), 1)], 64))], 64)) : (h(), D(n(te).RangePicker, L({
213
+ key: 1
214
+ }, z.value, {
168
215
  value: v.value,
169
216
  "onUpdate:value": E,
170
- onChange: x,
171
- picker: F.value,
172
- format: r.value,
173
- onOk: N
174
- }), H({ _: 2 }, [
175
- $(t(S)(e.$slots, "readModeSeparator"), (d, s) => ({
176
- name: s,
177
- fn: K((y) => [
178
- T(e.$slots, s, L(W(y || {})))
179
- ])
180
- }))
181
- ]), 1040, ["value", "picker", "format"]));
217
+ onChange: I,
218
+ picker: x.value,
219
+ format: l.value,
220
+ onOk: V
221
+ }), W({
222
+ _: 2
223
+ }, [Y(n(b)(e.$slots, "readModeSeparator"), (i, f) => ({
224
+ name: f,
225
+ fn: Z((g) => [q(e.$slots, f, G(J(g || {})))])
226
+ }))]), 1040, ["value", "picker", "format"]));
182
227
  };
183
228
  }
184
229
  });
185
230
  export {
186
- ve as default
231
+ Be as default
187
232
  };
@@ -94,6 +94,10 @@ export type ApFieldDateRangeProps = BasicApFieldProps<Omit<RangePickerProps, 'va
94
94
  * 指定时区,指定后value会变为特定时区下的timestamp
95
95
  */
96
96
  timezone?: ZoneAlias;
97
+ /**
98
+ * 只读模式下的分隔符(比插槽优先级更高)
99
+ */
100
+ readModeSeparator?: any;
97
101
  };
98
102
  export type ApFieldSelectProps = BasicApFieldProps<Omit<SelectProps, 'mode' | 'value' | 'onUpdate:value' | 'onSearch'>> & {
99
103
  emptyText?: string;
@@ -149,8 +149,10 @@ const te = { key: 0 }, se = /* @__PURE__ */ T({
149
149
  return (h = u(i).find((M) => M[l] === f)) == null ? void 0 : h[t];
150
150
  }
151
151
  ).filter(Boolean).join("、") || e.emptyText;
152
- const a = u(i).find((f) => f.value === o);
153
- return (a == null ? void 0 : a.label) || e.emptyText;
152
+ const a = u(i).find(
153
+ (f) => f[l] === o
154
+ );
155
+ return (a == null ? void 0 : a[t]) || e.emptyText;
154
156
  }), k = y(() => {
155
157
  const o = !!(e != null && e.showSearch), t = e.searchMode;
156
158
  let l = {};
@@ -897,7 +897,7 @@ declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypeProp
897
897
  validateTrigger: string;
898
898
  }>, {
899
899
  resetFields: () => Promise<void>;
900
- clearValidate: (name?: NamePath) => void;
900
+ clearValidate: (name?: NamePath | NamePath[]) => void;
901
901
  validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<{
902
902
  [key: string]: any;
903
903
  }> | undefined;