@keyblade/pro-components 1.13.8-alpha.4 → 1.13.8-alpha.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/es/components.d.ts +7 -0
  2. package/es/global-props.d.ts +18 -2
  3. package/es/index.d.ts +7 -0
  4. package/es/index.js +48 -30
  5. package/es/inerface.d.ts +5 -1
  6. package/es/pro-calendar/calendar.vue.d.ts +75 -0
  7. package/es/pro-calendar/calendar.vue.js +159 -0
  8. package/es/pro-calendar/calendar.vue3.js +5 -0
  9. package/es/pro-calendar/enum.d.ts +6 -0
  10. package/es/pro-calendar/enum.js +4 -0
  11. package/es/pro-calendar/header.vue.d.ts +35 -0
  12. package/es/pro-calendar/header.vue.js +146 -0
  13. package/es/pro-calendar/header.vue2.js +4 -0
  14. package/es/pro-calendar/hooks/useCellClassName.d.ts +12 -0
  15. package/es/pro-calendar/hooks/useCellClassName.js +40 -0
  16. package/es/pro-calendar/index.d.ts +117 -0
  17. package/es/pro-calendar/index.js +12 -0
  18. package/es/pro-calendar/interface.d.ts +89 -0
  19. package/es/pro-calendar/month.d.ts +5 -0
  20. package/es/pro-calendar/month.js +53 -0
  21. package/es/pro-calendar/month.vue.d.ts +22 -0
  22. package/es/pro-calendar/month.vue.js +126 -0
  23. package/es/pro-calendar/month.vue2.js +4 -0
  24. package/es/pro-calendar/week.vue.d.ts +3 -0
  25. package/es/pro-calendar/week.vue.js +34 -0
  26. package/es/pro-calendar/week.vue2.js +4 -0
  27. package/es/pro-calendar/year.vue.d.ts +3 -0
  28. package/es/pro-calendar/year.vue.js +123 -0
  29. package/es/pro-calendar/year.vue2.js +4 -0
  30. package/es/pro-date-range-picker/index.d.ts +183 -13
  31. package/es/pro-date-range-picker/interface.d.ts +38 -0
  32. package/es/pro-date-range-picker/pro-date-range-picker.vue.d.ts +173 -6
  33. package/es/pro-date-range-picker/pro-date-range-picker.vue.js +1 -1
  34. package/es/pro-date-range-picker/pro-date-range-picker.vue2.js +127 -97
  35. package/es/pro-dates-picker/index.d.ts +49 -0
  36. package/es/pro-dates-picker/index.js +13 -0
  37. package/es/pro-dates-picker/index.vue.d.ts +29 -0
  38. package/es/pro-dates-picker/index.vue.js +135 -0
  39. package/es/pro-dates-picker/index.vue3.js +5 -0
  40. package/es/pro-dates-picker/interface.d.ts +38 -0
  41. package/es/pro-dates-picker/util.d.ts +12 -0
  42. package/es/pro-dates-picker/util.js +9 -0
  43. package/es/pro-find-password/enum.d.ts +8 -0
  44. package/es/pro-find-password/enum.js +4 -0
  45. package/es/pro-find-password/index.d.ts +11 -0
  46. package/es/pro-find-password/index.js +12 -0
  47. package/es/pro-find-password/index.vue.d.ts +4459 -0
  48. package/es/pro-find-password/index.vue.js +176 -0
  49. package/es/pro-find-password/index.vue3.js +5 -0
  50. package/es/pro-find-password/interface.d.ts +45 -0
  51. package/es/pro-find-password/reset-password.vue.d.ts +591 -0
  52. package/es/pro-find-password/reset-password.vue.js +179 -0
  53. package/es/pro-find-password/reset-password.vue2.js +4 -0
  54. package/es/pro-find-password/verify-user-name.vue.d.ts +795 -0
  55. package/es/pro-find-password/verify-user-name.vue.js +112 -0
  56. package/es/pro-find-password/verify-user-name.vue3.js +5 -0
  57. package/es/pro-footer-bar/index.d.ts +6 -3
  58. package/es/pro-footer-bar/index.vue.d.ts +1 -1
  59. package/es/pro-footer-bar/index.vue.js +2 -2
  60. package/es/pro-footer-bar/index.vue2.js +24 -26
  61. package/es/pro-footer-bar/{inerface.d.ts → interface.d.ts} +1 -0
  62. package/es/pro-form-group/index.d.ts +44 -0
  63. package/es/pro-form-group/index.js +12 -0
  64. package/es/pro-form-group/index.vue.d.ts +28 -0
  65. package/es/pro-form-group/index.vue.js +7 -0
  66. package/es/pro-form-group/index.vue2.js +42 -0
  67. package/es/pro-image-upload/cropper.vue.js +2 -2
  68. package/es/pro-image-upload/cropper.vue2.js +200 -190
  69. package/es/pro-image-upload/image-upload.vue.d.ts +1123 -371
  70. package/es/pro-image-upload/image-upload.vue.js +172 -145
  71. package/es/pro-image-upload/index.d.ts +1726 -1001
  72. package/es/pro-image-upload/index.js +1 -1
  73. package/es/pro-keep-alive-router-view/index.d.ts +1 -0
  74. package/es/pro-keep-alive-router-view/pro-keep-alive-router-view.vue.js +17 -18
  75. package/es/pro-layout/hooks.d.ts +80 -1
  76. package/es/pro-layout/hooks.js +133 -84
  77. package/es/pro-layout/index.d.ts +9 -6
  78. package/es/pro-layout/index.js +1 -1
  79. package/es/pro-layout/pro-layout.vue.d.ts +4 -2
  80. package/es/pro-layout/pro-layout.vue.js +220 -208
  81. package/es/pro-loader/index.d.ts +43 -0
  82. package/es/pro-loader/index.js +11 -0
  83. package/es/pro-loader/index.vue.d.ts +28 -0
  84. package/es/pro-loader/index.vue.js +112 -0
  85. package/es/pro-loader/index.vue3.js +5 -0
  86. package/es/pro-loader/interface.d.ts +16 -0
  87. package/es/pro-login/enum.d.ts +6 -0
  88. package/es/pro-login/enum.js +4 -0
  89. package/es/pro-login/form-mobile.vue.d.ts +797 -0
  90. package/es/pro-login/form-mobile.vue.js +146 -0
  91. package/es/pro-login/form-mobile.vue2.js +4 -0
  92. package/es/pro-login/form-password.vue.d.ts +584 -0
  93. package/es/pro-login/form-password.vue.js +99 -0
  94. package/es/pro-login/form-password.vue2.js +4 -0
  95. package/es/pro-login/index.d.ts +11 -0
  96. package/es/pro-login/index.js +12 -0
  97. package/es/pro-login/index.vue.d.ts +4429 -0
  98. package/es/pro-login/index.vue.js +105 -0
  99. package/es/pro-login/index.vue3.js +5 -0
  100. package/es/pro-login/interface.d.ts +72 -0
  101. package/es/pro-login/regexp.d.ts +17 -0
  102. package/es/pro-login/regexp.js +28 -0
  103. package/es/pro-menu/index.d.ts +18 -80
  104. package/es/pro-menu/interface.d.ts +31 -0
  105. package/es/pro-menu/menu-item.vue.d.ts +27 -0
  106. package/es/pro-menu/menu-item.vue.js +35 -0
  107. package/es/pro-menu/menu-item.vue2.js +4 -0
  108. package/es/pro-menu/pro-menu-item.vue.d.ts +9 -0
  109. package/es/pro-menu/pro-menu-item.vue.js +63 -0
  110. package/es/pro-menu/pro-menu-item.vue2.js +4 -0
  111. package/es/pro-menu/pro-menu.vue.d.ts +9 -55
  112. package/es/pro-menu/pro-menu.vue.js +36 -119
  113. package/es/pro-menu/sub-menu.vue.d.ts +22 -0
  114. package/es/pro-menu/sub-menu.vue.js +55 -0
  115. package/es/pro-menu/sub-menu.vue2.js +4 -0
  116. package/es/pro-menu/util.d.ts +9 -0
  117. package/es/pro-menu/util.js +7 -0
  118. package/es/pro-page-container/constant.d.ts +2 -0
  119. package/es/pro-page-container/constant.js +9 -0
  120. package/es/pro-page-container/index.d.ts +9 -22
  121. package/es/pro-page-container/index.js +21 -8
  122. package/es/pro-page-container/interface.d.ts +12 -0
  123. package/es/pro-page-container/pro-page-container.vue.d.ts +4 -15
  124. package/es/pro-page-container/pro-page-container.vue.js +58 -38
  125. package/es/pro-page-header/constant.d.ts +2 -0
  126. package/es/pro-page-header/constant.js +13 -0
  127. package/es/pro-page-header/index.d.ts +14 -147
  128. package/es/pro-page-header/index.js +21 -8
  129. package/es/pro-page-header/interface.d.ts +21 -0
  130. package/es/pro-page-header/pro-page-header.vue.d.ts +18 -103
  131. package/es/pro-page-header/pro-page-header.vue.js +141 -124
  132. package/es/pro-reuse-tabs/index.d.ts +8 -6
  133. package/es/pro-reuse-tabs/index.js +1 -1
  134. package/es/pro-reuse-tabs/pro-reuse-tabs.vue.d.ts +2 -2
  135. package/es/pro-reuse-tabs/pro-reuse-tabs.vue.js +33 -35
  136. package/es/pro-table/index.d.ts +22 -20
  137. package/es/pro-table/index.js +7 -5
  138. package/es/pro-table/index.vue.d.ts +11 -9
  139. package/es/pro-table/index.vue.js +93 -25
  140. package/es/pro-table/index.vue3.js +5 -0
  141. package/es/pro-table/interface.d.ts +74 -65
  142. package/es/pro-textarea/index.d.ts +7 -5
  143. package/es/pro-textarea/index.vue.d.ts +1 -1
  144. package/es/pro-textarea/index.vue.js +1 -1
  145. package/es/pro-textarea/index.vue2.js +14 -16
  146. package/es/pro-textarea/{inerface.d.ts → interface.d.ts} +19 -18
  147. package/es/style.css +1 -1
  148. package/es/utils.d.ts +6 -0
  149. package/es/utils.js +7 -0
  150. package/package.json +5 -4
  151. package/es/pro-date-range-picker/type.d.ts +0 -22
  152. package/es/pro-page-container/inerface.d.ts +0 -12
  153. package/es/pro-table/index.vue2.js +0 -4
@@ -1,6 +1,7 @@
1
1
  declare module 'vue' {
2
2
  interface GlobalComponents {
3
3
  KbProDateRangePicker: typeof import('./index')['ProDateRangePicker'];
4
+ KbProDatesPicker: typeof import('./index')['ProDatesPicker'];
4
5
  KbProImageUpload: typeof import('./index')['ProImageUpload'];
5
6
  KbProPageHeader: typeof import('./index')['ProPageHeader'];
6
7
  KbProKeepAliveRouterView: typeof import('./index')['ProKeepAliveRouterView'];
@@ -10,6 +11,12 @@ declare module 'vue' {
10
11
  KbProReuseTabs: typeof import('./index')['ProReuseTabs'];
11
12
  KbProFooterBar: typeof import('./index')['ProFooterBar'];
12
13
  KbProTextarea: typeof import('./index')['ProTextarea'];
14
+ KbProTable: typeof import('./index')['ProTable'];
15
+ KbProFormGroup: typeof import('./index')['ProFormGroup'];
16
+ KbProCalendar: typeof import('./index')['ProCalendar'];
17
+ KbProLoader: typeof import('./index')['ProLoader'];
18
+ KbProLogin: typeof import('./index')['ProLogin'];
19
+ KbProFindPassword: typeof import('./index')['ProFindPassword'];
13
20
  }
14
21
  }
15
22
  export {};
@@ -1,7 +1,23 @@
1
- import { ProFooterBarProps } from './pro-footer-bar/inerface';
2
- import { ProTextareaProps } from './pro-textarea';
1
+ import { ProFooterBarProps } from './pro-footer-bar/interface.ts';
2
+ import { ProTableProps } from './pro-table/interface';
3
+ import { ProTextareaProps } from './pro-textarea/interface.ts';
4
+ import { ProDateRangePickerProps } from './pro-date-range-picker/interface.ts';
5
+ import { ProCalendarProps } from './pro-calendar/interface.ts';
6
+ import { ProDatesPickerProps } from './pro-dates-picker/interface.ts';
7
+ import { ProLoaderProps } from './pro-loader/interface.ts';
8
+ import { PageContainerProps } from './pro-page-container/interface.ts';
9
+ import { PageHeaderProps } from './pro-page-header/interface.ts';
3
10
  export interface GlobalProps {
4
11
  footerBar?: ProFooterBarProps;
12
+ dateRangePicker?: ProDateRangePickerProps;
13
+ datesPicker?: ProDatesPickerProps;
5
14
  textarea?: ProTextareaProps;
15
+ table?: ProTableProps;
16
+ calendar?: ProCalendarProps;
17
+ loader?: ProLoaderProps;
18
+ /** 页面容器 */
19
+ pageContainer?: PageContainerProps;
20
+ /** 页头 */
21
+ pageHeader?: PageHeaderProps;
6
22
  }
7
23
  export declare const globalProps: GlobalProps;
package/es/index.d.ts CHANGED
@@ -4,6 +4,8 @@ declare const _default: {
4
4
  install(app: App, options?: GlobalProps): void;
5
5
  };
6
6
  export default _default;
7
+ export { default as ProLogin } from './pro-login';
8
+ export { default as ProFindPassword } from './pro-find-password';
7
9
  export { default as ProPageHeader } from './pro-page-header';
8
10
  export { default as ProKeepAliveRouterView } from './pro-keep-alive-router-view';
9
11
  export { default as ProLayout } from './pro-layout';
@@ -15,8 +17,13 @@ export { default as ProReuseTabs } from './pro-reuse-tabs';
15
17
  export type { IProTab } from './pro-reuse-tabs';
16
18
  export { default as ProImageUpload } from './pro-image-upload';
17
19
  export * from './pro-image-upload';
20
+ export { default as ProDatesPicker } from './pro-dates-picker';
18
21
  export { default as ProDateRangePicker } from './pro-date-range-picker';
19
22
  export { default as ProTextarea } from './pro-textarea';
20
23
  export { default as ProTable } from './pro-table';
24
+ export { default as ProFormGroup } from './pro-form-group';
25
+ export { default as ProCalendar } from './pro-calendar';
26
+ export { default as ProLoader } from './pro-loader';
21
27
  export type {} from './components';
22
28
  export * from './inerface';
29
+ export * from './utils';
package/es/index.js CHANGED
@@ -1,35 +1,53 @@
1
- import { ProPageHeader as e } from "./pro-page-header/index.js";
2
- import { ProKeepAliveRouterView as m } from "./pro-keep-alive-router-view/index.js";
3
- import { ProLayout as t } from "./pro-layout/index.js";
4
- import { ProMenu as i } from "./pro-menu/index.js";
5
- import { ProPageContainer as s } from "./pro-page-container/index.js";
6
- import { ProReuseTabs as f } from "./pro-reuse-tabs/index.js";
7
- import { ProImageUpload as u } from "./pro-image-upload/index.js";
8
- import { ProDateRangePicker as a } from "./pro-date-range-picker/index.js";
9
- import { ProTable as P } from "./pro-table/index.js";
10
- import { ProTextarea as l } from "./pro-textarea/index.js";
11
- import { ProFooterBar as n } from "./pro-footer-bar/index.js";
12
- import { globalProps as d } from "./global-props.js";
13
- import { EImageUploadInnerBeforeUploadStep as y } from "./pro-image-upload/types.js";
14
- import { defaultImageUploadOptions as C } from "./pro-image-upload/constant.js";
15
- const k = {
1
+ import { ProLogin as e } from "./pro-login/index.js";
2
+ import { ProFindPassword as m } from "./pro-find-password/index.js";
3
+ import { ProPageHeader as t } from "./pro-page-header/index.js";
4
+ import { ProKeepAliveRouterView as i } from "./pro-keep-alive-router-view/index.js";
5
+ import { ProLayout as s } from "./pro-layout/index.js";
6
+ import { ProMenu as f } from "./pro-menu/index.js";
7
+ import { ProPageContainer as P } from "./pro-page-container/index.js";
8
+ import { ProReuseTabs as u } from "./pro-reuse-tabs/index.js";
9
+ import { ProImageUpload as n } from "./pro-image-upload/index.js";
10
+ import { ProDatesPicker as a } from "./pro-dates-picker/index.js";
11
+ import { ProDateRangePicker as d } from "./pro-date-range-picker/index.js";
12
+ import { ProTable as l } from "./pro-table/index.js";
13
+ import { ProTextarea as g } from "./pro-textarea/index.js";
14
+ import { ProFooterBar as x } from "./pro-footer-bar/index.js";
15
+ import { ProFormGroup as c } from "./pro-form-group/index.js";
16
+ import { ProCalendar as p } from "./pro-calendar/index.js";
17
+ import { ProLoader as b } from "./pro-loader/index.js";
18
+ import { globalProps as F } from "./global-props.js";
19
+ import { splitStringWithCommaAndSpace as M } from "./utils.js";
20
+ import { EImageUploadInnerBeforeUploadStep as W } from "./pro-image-upload/types.js";
21
+ import { defaultImageUploadOptions as z } from "./pro-image-upload/constant.js";
22
+ import { EProLoginType as N } from "./pro-login/enum.js";
23
+ import { EFindPasswordSteps as X } from "./pro-find-password/enum.js";
24
+ const G = {
16
25
  install(o, r) {
17
- Object.assign(d, r || {}), o.use(e), o.use(m), o.use(t), o.use(n), o.use(i), o.use(s), o.use(f), o.use(u), o.use(a), o.use(l), o.use(P);
26
+ Object.assign(F, r || {}), o.use(e), o.use(m), o.use(t), o.use(i), o.use(s), o.use(x), o.use(f), o.use(P), o.use(u), o.use(n), o.use(a), o.use(d), o.use(g), o.use(l), o.use(c), o.use(p), o.use(b);
18
27
  }
19
28
  };
20
29
  export {
21
- y as EImageUploadInnerBeforeUploadStep,
22
- a as ProDateRangePicker,
23
- n as ProFooterBar,
24
- u as ProImageUpload,
25
- m as ProKeepAliveRouterView,
26
- t as ProLayout,
27
- i as ProMenu,
28
- s as ProPageContainer,
29
- e as ProPageHeader,
30
- f as ProReuseTabs,
31
- P as ProTable,
32
- l as ProTextarea,
33
- k as default,
34
- C as defaultImageUploadOptions
30
+ X as EFindPasswordSteps,
31
+ W as EImageUploadInnerBeforeUploadStep,
32
+ N as EProLoginType,
33
+ p as ProCalendar,
34
+ d as ProDateRangePicker,
35
+ a as ProDatesPicker,
36
+ m as ProFindPassword,
37
+ x as ProFooterBar,
38
+ c as ProFormGroup,
39
+ n as ProImageUpload,
40
+ i as ProKeepAliveRouterView,
41
+ s as ProLayout,
42
+ b as ProLoader,
43
+ e as ProLogin,
44
+ f as ProMenu,
45
+ P as ProPageContainer,
46
+ t as ProPageHeader,
47
+ u as ProReuseTabs,
48
+ l as ProTable,
49
+ g as ProTextarea,
50
+ G as default,
51
+ z as defaultImageUploadOptions,
52
+ M as splitStringWithCommaAndSpace
35
53
  };
package/es/inerface.d.ts CHANGED
@@ -1 +1,5 @@
1
- export * from './pro-footer-bar/inerface';
1
+ export * from './pro-footer-bar/interface';
2
+ export * from './pro-date-range-picker/interface.ts';
3
+ export * from './pro-table/interface';
4
+ export * from './pro-login/interface';
5
+ export * from './pro-find-password/interface.ts';
@@ -0,0 +1,75 @@
1
+ import { IProCalendarProps } from './interface.ts';
2
+ import { EMode } from './enum';
3
+ declare function changePageShowDate(type: 'prev' | 'next', unit: EMode): void;
4
+ declare function __VLS_template(): {
5
+ attrs: Partial<{}>;
6
+ slots: Readonly<{
7
+ default?: (props: {
8
+ year: string;
9
+ month: string;
10
+ date?: string;
11
+ value: {
12
+ year: number;
13
+ month: number;
14
+ date?: number;
15
+ };
16
+ }) => any;
17
+ header?: (props: {
18
+ year: string;
19
+ month: string;
20
+ value: {
21
+ year: number;
22
+ month: number;
23
+ };
24
+ }) => any;
25
+ }> & {
26
+ default?: (props: {
27
+ year: string;
28
+ month: string;
29
+ date?: string;
30
+ value: {
31
+ year: number;
32
+ month: number;
33
+ date?: number;
34
+ };
35
+ }) => any;
36
+ header?: (props: {
37
+ year: string;
38
+ month: string;
39
+ value: {
40
+ year: number;
41
+ month: number;
42
+ };
43
+ }) => any;
44
+ };
45
+ refs: {};
46
+ rootEl: HTMLDivElement;
47
+ };
48
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
49
+ declare const __VLS_component: import('vue').DefineComponent<IProCalendarProps, {
50
+ changePageShowDate: typeof changePageShowDate;
51
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
52
+ change: (date: Date) => any;
53
+ "update:modelValue": (date: Date) => any;
54
+ panelChange: (date: Date) => any;
55
+ }, string, import('vue').PublicProps, Readonly<IProCalendarProps> & Readonly<{
56
+ onChange?: ((date: Date) => any) | undefined;
57
+ "onUpdate:modelValue"?: ((date: Date) => any) | undefined;
58
+ onPanelChange?: ((date: Date) => any) | undefined;
59
+ }>, {
60
+ header: boolean | import('./interface.ts').IHeaderObjProps;
61
+ modes: (EMode.month | EMode.year)[];
62
+ defaultMode: EMode.month | EMode.year;
63
+ allowSelect: boolean;
64
+ panelTodayBtn: boolean;
65
+ dayStartOfWeek: 0 | 1;
66
+ isWeek: boolean;
67
+ panel: boolean;
68
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
69
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
70
+ export default _default;
71
+ type __VLS_WithTemplateSlots<T, S> = T & {
72
+ new (): {
73
+ $slots: S;
74
+ };
75
+ };
@@ -0,0 +1,159 @@
1
+ import { defineComponent as R, useSlots as U, ref as k, computed as r, watch as X, createElementBlock as v, openBlock as m, mergeProps as i, createVNode as Z, createCommentVNode as S, createSlots as O, withCtx as P, unref as u, renderSlot as x, normalizeClass as w, createBlock as A, toDisplayString as ee } from "vue";
2
+ import ae from "./month.vue.js";
3
+ import te from "./year.vue.js";
4
+ import oe from "./header.vue.js";
5
+ import { getDayjsValue as N, getNow as le, pickDataAttributes as ne, methods as h } from "@arco-design/web-vue/es/_utils/date";
6
+ import { getPrefixCls as re } from "@arco-design/web-vue/es/_utils/global-config";
7
+ import { useI18n as ue } from "@arco-design/web-vue/es/locale";
8
+ import { getAllDaysByTime as de } from "./month.js";
9
+ import { EMode as l } from "./enum.js";
10
+ import { conclude as se } from "vue-global-config";
11
+ import { globalProps as C } from "../global-props.js";
12
+ const we = /* @__PURE__ */ R({
13
+ __name: "calendar",
14
+ props: {
15
+ modelValue: {},
16
+ defaultValue: {},
17
+ mode: {},
18
+ defaultMode: { default: l.month },
19
+ modes: { default: () => [l.month, l.year] },
20
+ header: { type: [Boolean, Object], default: !0 },
21
+ allowSelect: { type: Boolean, default: !0 },
22
+ panelWidth: {},
23
+ panelTodayBtn: { type: Boolean, default: !1 },
24
+ dayStartOfWeek: { default: 0 },
25
+ isWeek: { type: Boolean, default: !1 },
26
+ panel: { type: Boolean, default: !1 }
27
+ },
28
+ emits: ["update:modelValue", "change", "panelChange"],
29
+ setup(T, { expose: j, emit: E }) {
30
+ function F(e, o) {
31
+ return e === l.month || e === l.year && !o ? "YYYY-MM-DD" : "YYYY-MM";
32
+ }
33
+ const t = T, s = E, D = U(), d = re("calendar"), { t: g } = ue(), V = k(t.defaultMode), n = r(() => t.mode ? t.mode : V.value), W = r(() => F(n.value, t.panel)), M = k(N(t.defaultValue || Date.now(), W.value)), p = r(() => t.modelValue ? N(t.modelValue, W.value) : M.value), a = k(p.value || le());
34
+ X(p, (e) => {
35
+ a.value = e;
36
+ });
37
+ const B = r(() => de(a.value, {
38
+ dayStartOfWeek: t.dayStartOfWeek,
39
+ isWeek: t.isWeek
40
+ }));
41
+ function z(e) {
42
+ a.value = e, s("panelChange", e.toDate());
43
+ }
44
+ function Y(e) {
45
+ M.value = e, s("change", e.toDate()), s("update:modelValue", e.toDate()), z(e);
46
+ }
47
+ function _(e, o = !1) {
48
+ o || Y(e);
49
+ }
50
+ const H = r(() => n.value === l.month ? g("calendar.formatMonth") : n.value === l.year ? g("calendar.formatYear") : "");
51
+ function $(e, o) {
52
+ e.includes("prev") && (a.value = h.subtract(a.value, 1, o)), e.includes("next") && (a.value = h.add(a.value, 1, o)), s("panelChange", a.value.toDate());
53
+ }
54
+ function I(e) {
55
+ const o = h.set(a.value, l.year, e);
56
+ a.value = o, s("panelChange", o.toDate());
57
+ }
58
+ function q(e) {
59
+ const o = h.set(a.value, l.month, e - 1);
60
+ a.value = o, s("panelChange", o.toDate());
61
+ }
62
+ function G(e) {
63
+ V.value = e;
64
+ }
65
+ const J = r(() => [
66
+ d,
67
+ n.value === l.month ? `${d}-mode-month` : `${d}-mode-year`,
68
+ {
69
+ [`${d}-panel`]: t.panel && (n.value === l.month || n.value === l.year)
70
+ }
71
+ ]), K = r(() => t.panel ? { width: t.panelWidth } : {}), L = r(() => ne(t)), Q = r(() => {
72
+ var e;
73
+ return se([t.header, ((e = C.calendar) == null ? void 0 : e.header) || {}]);
74
+ }), y = r(() => {
75
+ var e, o;
76
+ return {
77
+ dayStartOfWeek: ((e = C.calendar) == null ? void 0 : e.dayStartOfWeek) || t.dayStartOfWeek,
78
+ isWeek: ((o = C.calendar) == null ? void 0 : o.isWeek) || t.isWeek
79
+ };
80
+ });
81
+ return j({
82
+ changePageShowDate: $
83
+ }), (e, o) => (m(), v("div", i({
84
+ class: J.value,
85
+ style: K.value
86
+ }, L.value), [
87
+ Z(oe, i(y.value, {
88
+ header: Q.value,
89
+ move: Y,
90
+ "header-value-format": H.value,
91
+ modes: e.modes,
92
+ mode: n.value,
93
+ "page-show-date": a.value,
94
+ onModeChange: G,
95
+ onYearChange: I,
96
+ onMonthChange: q,
97
+ onChangePageShowDate: $
98
+ }), O({ _: 2 }, [
99
+ u(D).header ? {
100
+ name: "default",
101
+ fn: P(({ year: c, month: f }) => [
102
+ x(e.$slots, "header", {
103
+ value: { year: c, month: f },
104
+ year: c.toString(),
105
+ month: f.toString().padStart(2, "0")
106
+ })
107
+ ]),
108
+ key: "0"
109
+ } : void 0
110
+ ]), 1040, ["header", "header-value-format", "modes", "mode", "page-show-date"]),
111
+ n.value === u(l).month ? (m(), v("div", {
112
+ key: 0,
113
+ class: w(`${u(d)}-body`)
114
+ }, [
115
+ (m(), A(ae, i(y.value, {
116
+ key: a.value.month(),
117
+ "page-data": B.value,
118
+ value: p.value,
119
+ mode: n.value,
120
+ "select-handler": _,
121
+ "page-show-date": a.value
122
+ }), O({ _: 2 }, [
123
+ u(D).default ? {
124
+ name: "default",
125
+ fn: P(({ year: c, month: f, date: b }) => [
126
+ x(e.$slots, "default", {
127
+ year: c.toString(),
128
+ month: f.toString().padStart(2, "0"),
129
+ date: b.toString().padStart(2, "0"),
130
+ value: { year: c, month: f, date: b }
131
+ })
132
+ ]),
133
+ key: "0"
134
+ } : void 0
135
+ ]), 1040, ["page-data", "value", "mode", "page-show-date"]))
136
+ ], 2)) : S("", !0),
137
+ n.value === u(l).year ? (m(), v("div", {
138
+ key: 1,
139
+ class: w(`${u(d)}-body`)
140
+ }, [
141
+ (m(), A(te, i(y.value, {
142
+ key: a.value.year(),
143
+ "page-data": B.value,
144
+ "page-show-date": a.value,
145
+ mode: n.value,
146
+ value: p.value,
147
+ "select-handler": _
148
+ }), null, 16, ["page-data", "page-show-date", "mode", "value"]))
149
+ ], 2)) : S("", !0),
150
+ e.panel && e.panelTodayBtn ? (m(), v("div", {
151
+ key: 2,
152
+ class: w(`${u(d)}-footer-btn-wrapper`)
153
+ }, ee(u(g)("today")), 3)) : S("", !0)
154
+ ], 16));
155
+ }
156
+ });
157
+ export {
158
+ we as default
159
+ };
@@ -0,0 +1,5 @@
1
+ import o from "./calendar.vue.js";
2
+ /* empty css */
3
+ export {
4
+ o as default
5
+ };
@@ -0,0 +1,6 @@
1
+ export declare enum EMode {
2
+ day = "day",
3
+ week = "week",
4
+ month = "month",
5
+ year = "year"
6
+ }
@@ -0,0 +1,4 @@
1
+ var a = /* @__PURE__ */ ((r) => (r.day = "day", r.week = "week", r.month = "month", r.year = "year", r))(a || {});
2
+ export {
3
+ a as EMode
4
+ };
@@ -0,0 +1,35 @@
1
+ import { IProCalendarHeader } from './interface.ts';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ default?(_: {
6
+ year: number;
7
+ month: number;
8
+ }): any;
9
+ default?(_: {
10
+ year: number;
11
+ month: number;
12
+ }): any;
13
+ default?(_: {
14
+ year: number;
15
+ month: number;
16
+ }): any;
17
+ };
18
+ refs: {};
19
+ rootEl: HTMLDivElement;
20
+ };
21
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
22
+ declare const __VLS_component: import('vue').DefineComponent<IProCalendarHeader, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
23
+ yearChange: (year: number) => any;
24
+ monthChange: (month: number) => any;
25
+ }, string, import('vue').PublicProps, Readonly<IProCalendarHeader> & Readonly<{
26
+ onYearChange?: ((year: number) => any) | undefined;
27
+ onMonthChange?: ((month: number) => any) | undefined;
28
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
29
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
30
+ export default _default;
31
+ type __VLS_WithTemplateSlots<T, S> = T & {
32
+ new (): {
33
+ $slots: S;
34
+ };
35
+ };
@@ -0,0 +1,146 @@
1
+ import { defineComponent as z, useSlots as Y, computed as s, withDirectives as v, createElementBlock as m, openBlock as d, normalizeClass as n, unref as o, renderSlot as g, createCommentVNode as y, createElementVNode as i, createVNode as u, Fragment as C, createBlock as E, createTextVNode as D, toDisplayString as b, withCtx as I, vShow as c } from "vue";
2
+ import { Select as F, Radio as O } from "@arco-design/web-vue";
3
+ import R from "@arco-design/web-vue/es/button";
4
+ import T from "@arco-design/web-vue/es/icon/icon-left";
5
+ import L from "@arco-design/web-vue/es/icon/icon-right";
6
+ import { getNow as W } from "@arco-design/web-vue/es/_utils/date";
7
+ import { isArray as j } from "@arco-design/web-vue/es/_utils/is";
8
+ import { getPrefixCls as A } from "@arco-design/web-vue/es/_utils/global-config";
9
+ import { useI18n as G } from "@arco-design/web-vue/es/locale";
10
+ import { EMode as k } from "./enum.js";
11
+ const ee = /* @__PURE__ */ z({
12
+ __name: "header",
13
+ props: {
14
+ mode: {},
15
+ modes: {},
16
+ pageShowDate: {},
17
+ move: { type: Function },
18
+ onYearChange: { type: Function },
19
+ onMonthChange: { type: Function },
20
+ onChangePageShowDate: { type: Function },
21
+ onModeChange: { type: Function },
22
+ headerValueFormat: {},
23
+ header: { type: [Boolean, Object] },
24
+ dayStartOfWeek: {},
25
+ isWeek: { type: Boolean },
26
+ panel: { type: Boolean }
27
+ },
28
+ emits: ["yearChange", "monthChange"],
29
+ setup(B) {
30
+ const l = B, h = Y(), t = A("calendar"), { t: S } = G(), M = s(() => j(l.modes) ? l.modes.map((e) => ({
31
+ label: S(`datePicker.view.${e}`),
32
+ value: e
33
+ })) : []), N = s(() => {
34
+ var e;
35
+ return ((e = l.header) == null ? void 0 : e.headerType) === "select";
36
+ }), r = s(() => l.pageShowDate.year()), p = s(() => l.pageShowDate.month() + 1), P = s(() => {
37
+ const e = [r.value];
38
+ for (let a = 1; a <= 10; a++)
39
+ e.unshift(r.value - a);
40
+ for (let a = 1; a < 10; a++)
41
+ e.push(r.value + a);
42
+ return e;
43
+ }), V = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
44
+ return (e, a) => {
45
+ var w, $;
46
+ return v((d(), m("div", {
47
+ class: n(`${o(t)}-header`)
48
+ }, [
49
+ o(h).default && e.header.slot === "start" ? g(e.$slots, "default", {
50
+ key: 0,
51
+ year: r.value,
52
+ month: p.value
53
+ }) : y("", !0),
54
+ v(i("div", {
55
+ class: n(`${o(t)}-header-left`)
56
+ }, [
57
+ N.value ? (d(), m(C, { key: 0 }, [
58
+ u(o(F), {
59
+ size: "small",
60
+ class: n(`${o(t)}-header-value-year`),
61
+ "default-value": r.value,
62
+ options: P.value,
63
+ onChange: a[0] || (a[0] = (f) => {
64
+ e.onYearChange(Number(f));
65
+ }),
66
+ "popup-container": `${o(t)}-header`
67
+ }, null, 8, ["class", "default-value", "options", "popup-container"]),
68
+ e.mode === o(k).month ? (d(), E(o(F), {
69
+ key: 0,
70
+ size: "small",
71
+ class: n(`${o(t)}-header-value-month`),
72
+ "default-value": p.value,
73
+ options: V,
74
+ onChange: a[1] || (a[1] = (f) => {
75
+ e.onMonthChange(Number(f));
76
+ }),
77
+ "popup-container": `${o(t)}-header`
78
+ }, null, 8, ["class", "default-value", "popup-container"])) : y("", !0)
79
+ ], 64)) : (d(), m(C, { key: 1 }, [
80
+ i("div", {
81
+ class: n(`${o(t)}-header-icon`),
82
+ role: "button",
83
+ tabindex: "0",
84
+ onClick: a[2] || (a[2] = () => e.onChangePageShowDate("prev", e.mode || o(k).month))
85
+ }, [
86
+ u(o(T))
87
+ ], 2),
88
+ i("div", {
89
+ class: n(`${o(t)}-header-value`)
90
+ }, [
91
+ o(h).default && (e.header.slot === "date" || !e.header.slot) ? g(e.$slots, "default", {
92
+ key: 0,
93
+ year: r.value,
94
+ month: p.value
95
+ }) : (d(), m(C, { key: 1 }, [
96
+ D(b(e.pageShowDate.format(e.headerValueFormat)), 1)
97
+ ], 64))
98
+ ], 2),
99
+ i("div", {
100
+ role: "button",
101
+ tabindex: "0",
102
+ class: n(`${o(t)}-header-icon`),
103
+ onClick: a[3] || (a[3] = () => e.onChangePageShowDate("next", e.mode || o(k).month))
104
+ }, [
105
+ u(o(L))
106
+ ], 2)
107
+ ], 64)),
108
+ u(o(R), {
109
+ size: "small",
110
+ onClick: a[4] || (a[4] = () => e.move(o(W)()))
111
+ }, {
112
+ default: I(() => [
113
+ D(b(o(S)("datePicker.today")), 1)
114
+ ]),
115
+ _: 1
116
+ })
117
+ ], 2), [
118
+ [c, !((w = e.header) != null && w.hideLeft)]
119
+ ]),
120
+ v(i("div", {
121
+ class: n(`${o(t)}-header-right`)
122
+ }, [
123
+ u(o(O).Group, {
124
+ size: "small",
125
+ type: "button",
126
+ options: M.value,
127
+ onChange: e.onModeChange,
128
+ "model-value": e.mode
129
+ }, null, 8, ["options", "onChange", "model-value"])
130
+ ], 2), [
131
+ [c, !(($ = e.header) != null && $.hideRight)]
132
+ ]),
133
+ o(h).default && e.header.slot === "end" ? g(e.$slots, "default", {
134
+ key: 1,
135
+ year: r.value,
136
+ month: p.value
137
+ }) : y("", !0)
138
+ ], 2)), [
139
+ [c, e.header]
140
+ ]);
141
+ };
142
+ }
143
+ });
144
+ export {
145
+ ee as default
146
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./header.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,12 @@
1
+ declare const useClassName: ({ prefixCls, mergedValue, rangeValues, hoverRangeValues, panel, isSameTime, innerMode, }: {
2
+ prefixCls: any;
3
+ mergedValue: any;
4
+ rangeValues: any;
5
+ hoverRangeValues: any;
6
+ panel: any;
7
+ isSameTime: any;
8
+ innerMode: any;
9
+ }) => (cellDateObj: any, disabled: any) => (string | {
10
+ [x: string]: any;
11
+ })[];
12
+ export default useClassName;
@@ -0,0 +1,40 @@
1
+ import { isArray as w } from "@arco-design/web-vue/es/_utils/is";
2
+ import { getNow as u } from "@arco-design/web-vue/es/_utils/date";
3
+ import { EMode as A } from "../enum.js";
4
+ function o(n, r) {
5
+ if (n && w(n))
6
+ return n[r];
7
+ }
8
+ const P = ({
9
+ prefixCls: n,
10
+ mergedValue: r,
11
+ rangeValues: a,
12
+ hoverRangeValues: c,
13
+ panel: E,
14
+ isSameTime: i,
15
+ innerMode: R
16
+ }) => function(t, h) {
17
+ const s = o(a, 0), g = o(a, 1), d = o(c, 0), l = o(c, 1), $ = !t.isPrev && !t.isNext, e = $ && E, N = e, v = e;
18
+ d && s && d.isBefore(s);
19
+ const y = g && l && l.isAfter(g) && v;
20
+ let m = i(t.time, u());
21
+ return R === A.year && (m = u().isSame(t.time, "date")), [
22
+ `${n}-cell`,
23
+ {
24
+ [`${n}-cell-in-view`]: $,
25
+ [`${n}-cell-today`]: m,
26
+ [`${n}-cell-selected`]: r && i(t.time, r),
27
+ [`${n}-cell-range-start`]: N,
28
+ [`${n}-cell-range-end`]: v,
29
+ [`${n}-cell-in-range`]: e,
30
+ [`${n}-cell-in-range-near-hover`]: y,
31
+ [`${n}-cell-hover-range-start`]: e,
32
+ [`${n}-cell-hover-range-end`]: e,
33
+ [`${n}-cell-hover-in-range`]: e,
34
+ [`${n}-cell-disabled`]: h
35
+ }
36
+ ];
37
+ };
38
+ export {
39
+ P as default
40
+ };