@aplus-frontend/ui 7.19.0-beta.1 → 7.19.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 (165) hide show
  1. package/es/src/ag-grid/context.mjs +1 -1
  2. package/es/src/ag-grid/editable/form-item.vue.d.ts +2 -4
  3. package/es/src/ag-grid/editable/form-item.vue.mjs +88 -77
  4. package/es/src/ag-grid/editable/index.vue.d.ts +2 -4
  5. package/es/src/ag-grid/editable/index.vue.mjs +9 -8
  6. package/es/src/ag-grid/editable/interface.d.ts +15 -1
  7. package/es/src/ag-grid/hooks/use-columns.mjs +31 -23
  8. package/es/src/ag-grid/hooks/use-pinned-row.mjs +2 -2
  9. package/es/src/ag-grid/index.vue.d.ts +2 -4
  10. package/es/src/ag-grid/index.vue.mjs +353 -335
  11. package/es/src/ag-grid/interface.d.ts +40 -1
  12. package/es/src/ag-grid/utils.d.ts +18 -0
  13. package/es/src/ag-grid/utils.mjs +39 -18
  14. package/es/src/ap-field/cascader/use-options.d.ts +4 -4
  15. package/es/src/ap-field/date/index.vue.d.ts +0 -1
  16. package/es/src/ap-field/date-range/index.vue.d.ts +0 -1
  17. package/es/src/ap-field/select/use-select-options.d.ts +2 -2
  18. package/es/src/ap-field/text/password.vue.d.ts +4 -4
  19. package/es/src/ap-field/tree-select/use-request.d.ts +4 -4
  20. package/es/src/ap-form/ap-form.vue.d.ts +1 -2
  21. package/es/src/ap-form/ap-form.vue2.mjs +63 -61
  22. package/es/src/ap-form/context.mjs +1 -1
  23. package/es/src/ap-form/drawer-form/index.vue.d.ts +3 -4
  24. package/es/src/ap-form/interface.d.ts +4 -0
  25. package/es/src/ap-form/item/index.vue.d.ts +6 -6
  26. package/es/src/ap-form/item-group/helper.mjs +2 -2
  27. package/es/src/ap-form/items/date/index.vue.d.ts +9 -11
  28. package/es/src/ap-form/items/date-range/index.vue.d.ts +13 -15
  29. package/es/src/ap-form/items/number/index.vue.d.ts +2 -3
  30. package/es/src/ap-form/items/select/index.vue.d.ts +8 -8
  31. package/es/src/ap-form/modal-form/index.vue.d.ts +3 -4
  32. package/es/src/ap-form/provider/context.mjs +1 -1
  33. package/es/src/ap-form/search-form/index.vue.d.ts +3 -4
  34. package/es/src/ap-grid/editable/form-item.vue.d.ts +2 -4
  35. package/es/src/ap-grid/editable/index.vue.d.ts +2 -4
  36. package/es/src/ap-grid/index.vue.d.ts +2 -4
  37. package/es/src/ap-grid/utils/table.mjs +2 -2
  38. package/es/src/ap-list/index.vue.d.ts +2 -4
  39. package/es/src/ap-modal/utils/confirm.d.ts +1 -1
  40. package/es/src/ap-pro-card/components/card/index.vue2.mjs +2 -2
  41. package/es/src/ap-table/ap-table.vue.d.ts +2 -4
  42. package/es/src/ap-table/components/setting/context.d.ts +1 -1
  43. package/es/src/ap-table/components/setting/context.mjs +1 -1
  44. package/es/src/ap-table/components/setting/modal/index.vue.mjs +127 -117
  45. package/es/src/ap-table/components/setting/sorter/context.mjs +1 -1
  46. package/es/src/ap-table/components/setting/template/edit-form.vue.d.ts +2 -3
  47. package/es/src/ap-table/constants.d.ts +20 -22
  48. package/es/src/ap-table/context.mjs +1 -1
  49. package/es/src/ap-table/hooks/use-table-paging-ng.mjs +9 -9
  50. package/es/src/ap-table/hooks/use-table-template-storage.d.ts +9 -9
  51. package/es/src/ap-table/hooks/use-table-template-storage.mjs +102 -95
  52. package/es/src/ap-table/utils.mjs +1 -1
  53. package/es/src/business/ag-grid-modal/hooks/use-ag-grid-instance.mjs +1 -1
  54. package/es/src/business/ap-batch-action-group/index.d.ts +3 -3
  55. package/es/src/business/ap-download/hooks/index.mjs +1 -1
  56. package/es/src/business/ap-draggable-grid/ApDraggableGrid.vue.d.ts +1 -1
  57. package/es/src/business/ap-draggable-grid/ApDraggableGrid.vue2.mjs +1 -3
  58. package/es/src/business/ap-draggable-grid/index.d.ts +1 -1
  59. package/es/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +2 -4
  60. package/es/src/business/ap-keep-alive/hook.mjs +1 -1
  61. package/es/src/business/ap-keep-alive/utils.mjs +1 -1
  62. package/es/src/business/ap-select-layout/index.d.ts +2 -4
  63. package/es/src/business/ap-select-layout/select-layout.vue.d.ts +2 -4
  64. package/es/src/business/ap-table-modal/index.d.ts +17 -5
  65. package/es/src/business/ap-upload/components/MultipleFile.vue.d.ts +1 -1
  66. package/es/src/business/ap-upload/components/MultipleFile.vue2.mjs +128 -112
  67. package/es/src/business/ap-value-select-card/index.vue.d.ts +2 -4
  68. package/es/src/business/ap-view/ap-view.vue.d.ts +1 -1
  69. package/es/src/business/ap-view/ap-view.vue2.mjs +87 -81
  70. package/es/src/business/ap-view/components/main-button-content.vue.d.ts +2 -3
  71. package/es/src/business/ap-view/components/menu-list-content.vue.d.ts +2 -3
  72. package/es/src/business/ap-view/hooks/use-send-to-url.d.ts +2 -0
  73. package/es/src/business/ap-view/hooks/use-send-to-url.mjs +46 -30
  74. package/es/src/business/ap-view/hooks/use-view-provide.mjs +1 -1
  75. package/es/src/business/ap-view/index.d.ts +3 -3
  76. package/es/src/business/ap-view/interface.d.ts +7 -1
  77. package/es/src/check-card/context.mjs +1 -1
  78. package/es/src/config-provider/constants.mjs +1 -1
  79. package/es/src/config-provider/hooks/use-locale.mjs +1 -1
  80. package/es/src/config-provider/hooks/use-namespace.d.ts +5 -1
  81. package/es/src/config-provider/hooks/use-namespace.mjs +1 -1
  82. package/es/src/config-provider/hooks/use-token.mjs +1 -1
  83. package/es/src/editable-table/form-item.vue.d.ts +2 -4
  84. package/es/src/editable-table/index.vue.d.ts +2 -4
  85. package/es/src/editable-table/utils.mjs +1 -1
  86. package/es/src/scroll-view/index.vue.d.ts +5 -5
  87. package/es/src/tests/wrapper.d.ts +4 -4
  88. package/es/src/text/context.mjs +1 -1
  89. package/es/src/time-ago/useTimeAgo.mjs +1 -1
  90. package/es/src/type.d.ts +1 -0
  91. package/es/src/utils/slot.mjs +1 -1
  92. package/es/src/version.d.ts +1 -1
  93. package/es/src/version.mjs +1 -1
  94. package/lib/src/ag-grid/editable/form-item.vue.d.ts +2 -4
  95. package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
  96. package/lib/src/ag-grid/editable/index.vue.d.ts +2 -4
  97. package/lib/src/ag-grid/editable/index.vue.js +1 -1
  98. package/lib/src/ag-grid/editable/interface.d.ts +15 -1
  99. package/lib/src/ag-grid/hooks/use-columns.js +1 -1
  100. package/lib/src/ag-grid/hooks/use-pinned-row.js +1 -1
  101. package/lib/src/ag-grid/index.vue.d.ts +2 -4
  102. package/lib/src/ag-grid/index.vue.js +1 -1
  103. package/lib/src/ag-grid/interface.d.ts +40 -1
  104. package/lib/src/ag-grid/utils.d.ts +18 -0
  105. package/lib/src/ag-grid/utils.js +1 -1
  106. package/lib/src/ap-field/cascader/use-options.d.ts +4 -4
  107. package/lib/src/ap-field/date/index.vue.d.ts +0 -1
  108. package/lib/src/ap-field/date-range/index.vue.d.ts +0 -1
  109. package/lib/src/ap-field/select/use-select-options.d.ts +2 -2
  110. package/lib/src/ap-field/text/password.vue.d.ts +4 -4
  111. package/lib/src/ap-field/tree-select/use-request.d.ts +4 -4
  112. package/lib/src/ap-form/ap-form.vue.d.ts +1 -2
  113. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  114. package/lib/src/ap-form/drawer-form/index.vue.d.ts +3 -4
  115. package/lib/src/ap-form/interface.d.ts +4 -0
  116. package/lib/src/ap-form/item/index.vue.d.ts +6 -6
  117. package/lib/src/ap-form/items/date/index.vue.d.ts +9 -11
  118. package/lib/src/ap-form/items/date-range/index.vue.d.ts +13 -15
  119. package/lib/src/ap-form/items/number/index.vue.d.ts +2 -3
  120. package/lib/src/ap-form/items/select/index.vue.d.ts +8 -8
  121. package/lib/src/ap-form/modal-form/index.vue.d.ts +3 -4
  122. package/lib/src/ap-form/search-form/index.vue.d.ts +3 -4
  123. package/lib/src/ap-grid/editable/form-item.vue.d.ts +2 -4
  124. package/lib/src/ap-grid/editable/index.vue.d.ts +2 -4
  125. package/lib/src/ap-grid/index.vue.d.ts +2 -4
  126. package/lib/src/ap-grid/utils/table.js +1 -1
  127. package/lib/src/ap-list/index.vue.d.ts +2 -4
  128. package/lib/src/ap-modal/utils/confirm.d.ts +1 -1
  129. package/lib/src/ap-table/ap-table.vue.d.ts +2 -4
  130. package/lib/src/ap-table/components/setting/context.d.ts +1 -1
  131. package/lib/src/ap-table/components/setting/modal/index.vue.js +1 -1
  132. package/lib/src/ap-table/components/setting/template/edit-form.vue.d.ts +2 -3
  133. package/lib/src/ap-table/constants.d.ts +20 -22
  134. package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
  135. package/lib/src/ap-table/hooks/use-table-template-storage.d.ts +9 -9
  136. package/lib/src/ap-table/hooks/use-table-template-storage.js +1 -1
  137. package/lib/src/business/ap-batch-action-group/index.d.ts +3 -3
  138. package/lib/src/business/ap-draggable-grid/ApDraggableGrid.vue.d.ts +1 -1
  139. package/lib/src/business/ap-draggable-grid/ApDraggableGrid.vue2.js +1 -1
  140. package/lib/src/business/ap-draggable-grid/index.d.ts +1 -1
  141. package/lib/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +2 -4
  142. package/lib/src/business/ap-select-layout/index.d.ts +2 -4
  143. package/lib/src/business/ap-select-layout/select-layout.vue.d.ts +2 -4
  144. package/lib/src/business/ap-table-modal/index.d.ts +17 -5
  145. package/lib/src/business/ap-upload/components/MultipleFile.vue.d.ts +1 -1
  146. package/lib/src/business/ap-upload/components/MultipleFile.vue2.js +1 -1
  147. package/lib/src/business/ap-value-select-card/index.vue.d.ts +2 -4
  148. package/lib/src/business/ap-view/ap-view.vue.d.ts +1 -1
  149. package/lib/src/business/ap-view/ap-view.vue2.js +1 -1
  150. package/lib/src/business/ap-view/components/main-button-content.vue.d.ts +2 -3
  151. package/lib/src/business/ap-view/components/menu-list-content.vue.d.ts +2 -3
  152. package/lib/src/business/ap-view/hooks/use-send-to-url.d.ts +2 -0
  153. package/lib/src/business/ap-view/hooks/use-send-to-url.js +1 -1
  154. package/lib/src/business/ap-view/index.d.ts +3 -3
  155. package/lib/src/business/ap-view/interface.d.ts +7 -1
  156. package/lib/src/config-provider/hooks/use-namespace.d.ts +5 -1
  157. package/lib/src/editable-table/form-item.vue.d.ts +2 -4
  158. package/lib/src/editable-table/index.vue.d.ts +2 -4
  159. package/lib/src/scroll-view/index.vue.d.ts +5 -5
  160. package/lib/src/tests/wrapper.d.ts +4 -4
  161. package/lib/src/time-ago/useTimeAgo.js +1 -1
  162. package/lib/src/type.d.ts +1 -0
  163. package/lib/src/version.d.ts +1 -1
  164. package/lib/src/version.js +1 -1
  165. package/package.json +1 -1
@@ -1,13 +1,12 @@
1
1
  import { ViewListModel } from '../interface';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, ComponentInternalInstance, ExtractPropTypes, PropType, HTMLAttributes, VNodeProps, AllowedComponentProps, ComponentCustomProps, CreateComponentPublicInstanceWithMixins, GlobalComponents, GlobalDirectives, Slot, ComponentPublicInstance, ComponentOptionsBase, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties } from 'vue';
3
3
  import { ColSize } from '@aplus-frontend/antdv/es/grid';
4
- import { FormLabelAlign, ValidateMessages, FieldData, ValidateErrorEntity, NamePath, RuleObject, ValidateOptions, InternalNamePath } from '@aplus-frontend/antdv/es/form/interface';
4
+ import { FormLabelAlign, ValidateMessages, FieldData, ValidateErrorEntity, NamePath, ValidateOptions, InternalNamePath } from '@aplus-frontend/antdv/es/form/interface';
5
5
  import { RequiredMark } from '@aplus-frontend/antdv/es/form/Form';
6
6
  import { RuleObject } from '@aplus-frontend/antdv/es/form';
7
7
  import { Options } from '../../../../node_modules/scroll-into-view-if-needed';
8
8
  import { Recordable } from '../../../type';
9
9
  import { VueTypeDef, VueTypeValidableDef } from '../../../../node_modules/vue-types';
10
- import { SizeType } from '@aplus-frontend/antdv/es/config-provider';
11
10
  import { SizeType } from '@aplus-frontend/antdv/es/button';
12
11
  import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
13
12
  import { ApFormProps, UpdateModelOptimizeFn, ApFormInternalInstance, WatchFunc } from '../../../ap-form';
@@ -111,7 +110,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
111
110
  readonly onValidate?: ((name: string | number | string[] | number[], status: boolean, errors: string[]) => void) | undefined;
112
111
  readonly initialValues?: Recordable | undefined;
113
112
  readonly onValuesChange?: ((changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void) | undefined;
114
- readonly syncToUrl?: (boolean | ((values: Recordable, type: "get" | "set") => Recordable)) | undefined;
113
+ readonly syncToUrl?: boolean | ((values: Recordable, type: "get" | "set") => Recordable) | undefined;
115
114
  readonly syncToUrlPriority?: boolean | undefined;
116
115
  readonly autoFocusFirstInput?: boolean | undefined;
117
116
  } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
@@ -5,6 +5,8 @@ export declare const useSendToUrl: (option: {
5
5
  saveDataSource: SaveDataSource;
6
6
  sendToUrl: ComputedRef<boolean>;
7
7
  tableKey: ComputedRef<string>;
8
+ extraUrlParams: ComputedRef<(() => Recordable) | undefined>;
9
+ searchFormModel: ComputedRef<any>;
8
10
  }) => {
9
11
  mountedData: ComputedRef<Recordable>;
10
12
  isValidMountedData: ComputedRef<boolean>;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@aplus-frontend/utils"),t=require("vue"),l=require("../utils/query.js"),v=s=>{const{saveDataSource:c,sendToUrl:d,tableKey:u}=s;let n,a,o=!1;const r=t.ref({});return t.onMounted(()=>{if(d?.value){try{const e=l.getUrlQuery()[u.value]??"";r.value=e?JSON.parse(decodeURIComponent(e)):{}}catch{r.value={}}n=setInterval(()=>{try{const e=encodeURIComponent(JSON.stringify(c?.getSearchFormValues?.()??{}));e!==a&&(a=e,o=!0)}catch{a=""}o&&(l.setUrlQuery({[u.value]:a}),o=!1)},500)}}),t.onUnmounted(()=>{n&&clearInterval(n)}),{mountedData:t.computed(()=>r.value),isValidMountedData:t.computed(()=>i.isObjectWithContent(r.value))}};exports.useSendToUrl=v;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("@aplus-frontend/utils"),y=require("lodash-unified"),t=require("vue"),l=require("../utils/query.js"),U=d=>{const{saveDataSource:s,sendToUrl:r,tableKey:u,extraUrlParams:c,searchFormModel:i}=d;let a,o=!1;const n=t.ref({}),h=()=>{try{const e=encodeURIComponent(JSON.stringify({...s?.getSearchFormValues?.(),...c?.value?.()??{}}));e!==a&&(a=e,o=!0)}catch{a=""}o&&(l.setUrlQuery({[u.value]:a}),o=!1)},m=y.debounce(h,500),v=()=>{try{const e=l.getUrlQuery()[u.value]??"";n.value=e?JSON.parse(decodeURIComponent(e)):{}}catch{n.value={}}};return t.watch(i,()=>{r?.value&&m()},{deep:!0,immediate:!0}),t.onMounted(()=>{r?.value&&v()}),{mountedData:t.computed(()=>n.value),isValidMountedData:t.computed(()=>f.isObjectWithContent(n.value))}};exports.useSendToUrl=U;
@@ -6,7 +6,7 @@ declare const ApView: {
6
6
  new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ApViewProps> & Readonly<{}>, {
7
7
  setFirstDefaultSystemView: (value: boolean) => void;
8
8
  setInitToUrl: (value: boolean) => void;
9
- mountedData: Recordable;
9
+ getMountedData: () => Recordable;
10
10
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
11
11
  manual: boolean;
12
12
  maxViewNum: number;
@@ -24,7 +24,7 @@ declare const ApView: {
24
24
  }, Readonly< ApViewProps> & Readonly<{}>, {
25
25
  setFirstDefaultSystemView: (value: boolean) => void;
26
26
  setInitToUrl: (value: boolean) => void;
27
- mountedData: Recordable;
27
+ getMountedData: () => Recordable;
28
28
  }, {}, {}, {}, {
29
29
  manual: boolean;
30
30
  maxViewNum: number;
@@ -39,7 +39,7 @@ declare const ApView: {
39
39
  } & ComponentOptionsBase<Readonly< ApViewProps> & Readonly<{}>, {
40
40
  setFirstDefaultSystemView: (value: boolean) => void;
41
41
  setInitToUrl: (value: boolean) => void;
42
- mountedData: Recordable;
42
+ getMountedData: () => Recordable;
43
43
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
44
44
  manual: boolean;
45
45
  maxViewNum: number;
@@ -19,6 +19,10 @@ export interface SaveDataSource {
19
19
  resetSearchFormSorterItems?: () => void;
20
20
  /** 是否转换搜索表单,默认为 false */
21
21
  searchFormTransform?: boolean;
22
+ /**
23
+ * searchForm的model,用于当searchFormModel变更时触发url参数更新
24
+ */
25
+ searchFormModel?: any;
22
26
  }
23
27
  export interface ViewCacheOption {
24
28
  /** 获取视图列表 */
@@ -98,9 +102,11 @@ export interface ApViewProps {
98
102
  * 是否在第一次进入页面时将参数保存在url回显在 searchForm,默认为 true,设置为 false 后,第一次进入页面时 searchForm 将不会将参数保存在url上
99
103
  */
100
104
  initToUrl?: boolean;
105
+ /** 额外的保存在url的参数 */
106
+ extraUrlParams?: () => Recordable;
101
107
  }
102
108
  export interface ApViewExpose {
103
109
  setFirstDefaultSystemView: (value: boolean) => void;
104
110
  setInitToUrl: (value: boolean) => void;
105
- mountedData: Recordable;
111
+ getMountedData: () => Recordable;
106
112
  }
@@ -2,7 +2,11 @@ import { InjectionKey, Ref, ComputedRef } from 'vue';
2
2
  export declare const defaultNamespace = "aplus";
3
3
  export declare const namespaceContextKey: InjectionKey<Ref<string | undefined>>;
4
4
  export declare const useGetDerivedNamespace: (namespaceOverrides?: Ref<string | undefined>) => ComputedRef<string>;
5
- export declare const useNamespace: (block: string, namespaceOverrides?: Ref<string | undefined>) => {
5
+ export declare const useNamespace: (
6
+ /**
7
+ * 块 一般是指组件名
8
+ */
9
+ block: string, namespaceOverrides?: Ref<string | undefined>) => {
6
10
  namespace: ComputedRef<string>;
7
11
  b: (blockSuffix?: string) => string;
8
12
  e: (element?: string) => string;
@@ -1,5 +1,5 @@
1
1
  import { EditableColumnType, EditableTableFormItemExpose, EditableTableFormItemProps } from './interface';
2
- import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode, RendererNode, RendererElement } from 'vue';
2
+ import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode } from 'vue';
3
3
  declare const _default: <RecordType = any>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
4
4
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & EditableTableFormItemProps<RecordType> & Partial<{}>> & PublicProps;
5
5
  expose(exposed: ShallowUnwrapRef<EditableTableFormItemExpose>): void;
@@ -36,9 +36,7 @@ declare const _default: <RecordType = any>(__VLS_props: NonNullable<Awaited<type
36
36
  }) => void;
37
37
  };
38
38
  emit: {};
39
- }>) => VNode<RendererNode, RendererElement, {
40
- [key: string]: any;
41
- }> & {
39
+ }>) => VNode & {
42
40
  __ctx?: Awaited<typeof __VLS_setup>;
43
41
  };
44
42
  export default _default;
@@ -1,6 +1,6 @@
1
1
  import { Recordable } from '../type';
2
2
  import { EditableTableProps, EditableColumnType, EditableTableExpose } from './interface';
3
- import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode, RendererNode, RendererElement } from 'vue';
3
+ import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode } from 'vue';
4
4
  declare const _default: <RecordType extends Recordable = any>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
5
5
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
6
6
  readonly "onUpdate:value"?: ((...args: any[]) => any) | undefined;
@@ -39,9 +39,7 @@ declare const _default: <RecordType extends Recordable = any>(__VLS_props: NonNu
39
39
  }) => void;
40
40
  };
41
41
  emit: (event: "update:value", ...args: any[]) => void;
42
- }>) => VNode<RendererNode, RendererElement, {
43
- [key: string]: any;
44
- }> & {
42
+ }>) => VNode & {
45
43
  __ctx?: Awaited<typeof __VLS_setup>;
46
44
  };
47
45
  export default _default;
@@ -1,4 +1,4 @@
1
- import { ScrollBarDirection, InternalScrollBarProps, ColorType } from '../scroll-bar';
1
+ import { ScrollBarDirection, InternalScrollBarProps } from '../scroll-bar';
2
2
  import { ScrollOptions, ScrollViewProps } from './interface';
3
3
  import { CreateComponentPublicInstanceWithMixins, Ref, ShallowRef, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, DefineComponent, ComputedRef } from 'vue';
4
4
  declare function scroll(x?: number, y?: number): void;
@@ -106,8 +106,8 @@ declare const __VLS_component: DefineComponent<ScrollViewProps, {
106
106
  onScroll?: ((percent: number) => void) | undefined;
107
107
  disabled?: boolean | undefined;
108
108
  trackSpeed?: number | undefined;
109
- barColor?: ColorType;
110
- trackColor?: ColorType;
109
+ barColor?: import("csstype").Property.BackgroundColor | undefined;
110
+ trackColor?: import("csstype").Property.BackgroundColor | undefined;
111
111
  trackWidth?: number | undefined;
112
112
  showTrack?: boolean | undefined;
113
113
  onScrollStart?: ((percent: number) => void) | undefined;
@@ -118,8 +118,8 @@ declare const __VLS_component: DefineComponent<ScrollViewProps, {
118
118
  onScroll?: ((percent: number) => void) | undefined;
119
119
  disabled?: boolean | undefined;
120
120
  trackSpeed?: number | undefined;
121
- barColor?: ColorType;
122
- trackColor?: ColorType;
121
+ barColor?: import("csstype").Property.BackgroundColor | undefined;
122
+ trackColor?: import("csstype").Property.BackgroundColor | undefined;
123
123
  trackWidth?: number | undefined;
124
124
  showTrack?: boolean | undefined;
125
125
  onScrollStart?: ((percent: number) => void) | undefined;
@@ -1,8 +1,8 @@
1
1
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
2
  export declare const Wrapper: DefineComponent<{
3
- uiMode?: ("admin" | "aplus") | undefined;
4
- lang?: ("en" | "zh-cn") | undefined;
3
+ uiMode?: "admin" | "aplus" | undefined;
4
+ lang?: "en" | "zh-cn" | undefined;
5
5
  }, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{
6
- uiMode?: ("admin" | "aplus") | undefined;
7
- lang?: ("en" | "zh-cn") | undefined;
6
+ uiMode?: "admin" | "aplus" | undefined;
7
+ lang?: "en" | "zh-cn" | undefined;
8
8
  }> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("dayjs"),r=require("vue"),b=require("./utils.js");function s(n,u){const t=Math.abs(n-u),e={diffMs:t,type:n<u?"ago":"late",diffFormatted:b.formatDuration(t)};return t<60*1e3?(e.unit="s",e.count=Math.round(t/1e3)):t<60*60*1e3?(e.unit="m",e.count=Math.round(t/(60*1e3))):t<24*60*60*1e3?(e.unit="h",e.count=Math.round(t/(60*60*1e3))):t<30*24*60*60*1e3?(e.unit="d",e.count=Math.round(t/(24*60*60*1e3))):t<365*24*60*60*1e3?(e.unit="M",e.count=Math.round(t/(30*24*60*60*1e3))):(e.unit="y",e.count=Math.round(t/365/(24*60*60*1e3))),e}function i(n){return h(n).valueOf()}let p=1;function v(){return p++}const o=new Map;let l,c;function M(n,u){o.set(n,u),o.size&&!c&&(clearInterval(l),l=setInterval(()=>{c=!0;const t=Date.now();o.forEach(e=>{e.interval&&Math.abs(t-e.updated-e.interval)<50&&(e.timeAgo.value=s(e.ts,t),e.updated=t)})},5e3))}function m(n){o.delete(n),o.size||(clearInterval(l),c=!1)}const T=(n,u,t)=>{const e=v(),a=r.ref(s(i(n.value),i(u))),f={ts:i(n.value),timeAgo:a,interval:t.value,updated:Date.now()};return r.watch(()=>n.value,g=>{const d=i(g);f.ts=d,a.value=s(d,i(u))}),M(e,f),r.onBeforeUnmount(()=>{m(e)}),a};exports.default=T;exports.getId=v;exports.getTimeAgo=s;exports.subscribe=M;exports.unsubscribe=m;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("dayjs"),r=require("vue"),b=require("./utils.js");function s(n,u){const t=Math.abs(n-u),e={diffMs:t,type:n<u?"ago":"late",diffFormatted:b.formatDuration(t)};return t<60*1e3?(e.unit="s",e.count=Math.round(t/1e3)):t<3600*1e3?(e.unit="m",e.count=Math.round(t/(60*1e3))):t<1440*60*1e3?(e.unit="h",e.count=Math.round(t/(3600*1e3))):t<720*60*60*1e3?(e.unit="d",e.count=Math.round(t/(1440*60*1e3))):t<365*24*60*60*1e3?(e.unit="M",e.count=Math.round(t/(720*60*60*1e3))):(e.unit="y",e.count=Math.round(t/365/(1440*60*1e3))),e}function i(n){return h(n).valueOf()}let p=1;function v(){return p++}const o=new Map;let l,c;function M(n,u){o.set(n,u),o.size&&!c&&(clearInterval(l),l=setInterval(()=>{c=!0;const t=Date.now();o.forEach(e=>{e.interval&&Math.abs(t-e.updated-e.interval)<50&&(e.timeAgo.value=s(e.ts,t),e.updated=t)})},5e3))}function m(n){o.delete(n),o.size||(clearInterval(l),c=!1)}const T=(n,u,t)=>{const e=v(),a=r.ref(s(i(n.value),i(u))),f={ts:i(n.value),timeAgo:a,interval:t.value,updated:Date.now()};return r.watch(()=>n.value,g=>{const d=i(g);f.ts=d,a.value=s(d,i(u))}),M(e,f),r.onBeforeUnmount(()=>{m(e)}),a};exports.default=T;exports.getId=v;exports.getTimeAgo=s;exports.subscribe=M;exports.unsubscribe=m;
package/lib/src/type.d.ts CHANGED
@@ -31,4 +31,5 @@ export type LiteralUnion<T extends U, U> = T | (U & {
31
31
  export type RecursivePartial<T> = {
32
32
  [P in keyof T]?: T[P] extends object ? RecursivePartial<T[P]> : T[P];
33
33
  };
34
+ export type Awaitable<T> = T | Promise<T>;
34
35
  export {};
@@ -1,2 +1,2 @@
1
- declare const _default: "7.19.0-beta.1";
1
+ declare const _default: "7.19.0";
2
2
  export default _default;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="7.19.0-beta.1";exports.default=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="7.19.0";exports.default=e;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aplus-frontend/ui",
3
- "version": "7.19.0-beta.1",
3
+ "version": "7.19.0",
4
4
  "main": "./lib/index.js",
5
5
  "type": "module",
6
6
  "typings": "./lib/index.d.ts",