@blueking/date-picker 0.0.1
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.
- package/README.md +12 -0
- package/dist/vue2-full.css +1 -0
- package/dist/vue2-full.esm.js +52156 -0
- package/dist/vue3-full.css +1 -0
- package/dist/vue3-full.esm.js +52118 -0
- package/dist/vue3-light.css +1 -0
- package/dist/vue3-light.esm.js +12715 -0
- package/package.json +86 -0
- package/types/app.vue.d.ts +2 -0
- package/types/components/common-submit.vue.d.ts +14 -0
- package/types/components/common-tab.vue.d.ts +24 -0
- package/types/components/date-panel.vue.d.ts +39 -0
- package/types/components/date-picker.vue.d.ts +17 -0
- package/types/components/natural-picker.vue.d.ts +15 -0
- package/types/components/panel-wrapper.vue.d.ts +26 -0
- package/types/components/recent-picker.vue.d.ts +27 -0
- package/types/components/timezone-picker.vue.d.ts +15 -0
- package/types/date-picker.vue.d.ts +70 -0
- package/types/lang/lang.d.ts +62 -0
- package/types/main.d.ts +1 -0
- package/types/typings/constant.d.ts +66 -0
- package/types/typings/cookie.d.ts +1 -0
- package/types/typings/index.d.ts +3 -0
- package/types/typings/store.d.ts +14 -0
- package/types/typings/timezone.d.ts +20 -0
- package/types/typings/types.d.ts +19 -0
- package/types/typings/utils.d.ts +41 -0
- package/types/vue2.d.ts +2 -0
- package/types/vue3.d.ts +4 -0
package/package.json
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@blueking/date-picker",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"packageManager": "pnpm@8.5.0",
|
|
5
|
+
"description": "蓝鲸监控平台日期时间选择",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "Tencent BlueKing",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"dev": "vite",
|
|
10
|
+
"prepublishOnly": "run-p dts build",
|
|
11
|
+
"build": "ts-node --project tsconfig.node.json ./vite.build.ts",
|
|
12
|
+
"preview": "vite preview",
|
|
13
|
+
"dts": "vue-tsc --project tsconfig.dts.json"
|
|
14
|
+
},
|
|
15
|
+
"main": "dist/vue3-full.esm.js",
|
|
16
|
+
"typings": "types/vue3.d.ts",
|
|
17
|
+
"unpkg": "dist/vue3-full.esm.js",
|
|
18
|
+
"files": [
|
|
19
|
+
"dist",
|
|
20
|
+
"types"
|
|
21
|
+
],
|
|
22
|
+
"publishConfig": {
|
|
23
|
+
"access": "public",
|
|
24
|
+
"registry": "https://registry.npmjs.org/"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@types/node": "^20.8.7",
|
|
28
|
+
"@typescript-eslint/eslint-plugin": "^5.20.0",
|
|
29
|
+
"@typescript-eslint/parser": "^5.20.0",
|
|
30
|
+
"@vitejs/plugin-vue": "^4.2.3",
|
|
31
|
+
"bkui-vue": "^0.0.2-beta.71",
|
|
32
|
+
"consola": "^3.2.3",
|
|
33
|
+
"dayjs": "^1.11.10",
|
|
34
|
+
"eslint": "8.26.0",
|
|
35
|
+
"eslint-config-prettier": "^9.0.0",
|
|
36
|
+
"eslint-config-tencent": "^1.0.4",
|
|
37
|
+
"eslint-plugin-codecc": "^0.3.0",
|
|
38
|
+
"eslint-plugin-perfectionist": "^1.5.1",
|
|
39
|
+
"eslint-plugin-prettier": "^5.0.0",
|
|
40
|
+
"eslint-plugin-vue": "^9.17.0",
|
|
41
|
+
"lint-staged": "^15.0.2",
|
|
42
|
+
"npm-run-all": "^4.1.5",
|
|
43
|
+
"picocolors": "^1.0.0",
|
|
44
|
+
"postcss-html": "^1.5.0",
|
|
45
|
+
"postcss-scss": "^4.0.7",
|
|
46
|
+
"prettier": "^3.0.2",
|
|
47
|
+
"rollup": "^4.1.4",
|
|
48
|
+
"sass": "^1.69.2",
|
|
49
|
+
"simple-git-hooks": "^2.9.0",
|
|
50
|
+
"stylelint": "^15.10.3",
|
|
51
|
+
"stylelint-config-recess-order": "^4.3.0",
|
|
52
|
+
"stylelint-config-recommended-vue": "1.5.0",
|
|
53
|
+
"stylelint-config-standard": "^34.0.0",
|
|
54
|
+
"stylelint-order": "^6.0.3",
|
|
55
|
+
"stylelint-scss": "^5.1.0",
|
|
56
|
+
"ts-node": "^10.9.1",
|
|
57
|
+
"tslib": "^2.6.2",
|
|
58
|
+
"typescript": "^5.0.2",
|
|
59
|
+
"vite": "^4.4.5",
|
|
60
|
+
"vite-plugin-style-import": "^2.0.0",
|
|
61
|
+
"vue": "^3.3.6",
|
|
62
|
+
"vue-eslint-parser": "^9.3.2",
|
|
63
|
+
"vue-tsc": "^1.8.5"
|
|
64
|
+
},
|
|
65
|
+
"engines": {
|
|
66
|
+
"node": ">=18.16.0"
|
|
67
|
+
},
|
|
68
|
+
"browserslist": [
|
|
69
|
+
"> 0.5%",
|
|
70
|
+
"last 2 versions",
|
|
71
|
+
"Firefox ESR",
|
|
72
|
+
"not dead"
|
|
73
|
+
],
|
|
74
|
+
"simple-git-hooks": {
|
|
75
|
+
"pre-commit": "lint-staged",
|
|
76
|
+
"commit-msg": "node scripts/verifyCommit.mjs"
|
|
77
|
+
},
|
|
78
|
+
"lint-staged": {
|
|
79
|
+
"*.{js,json}": [
|
|
80
|
+
"prettier --write"
|
|
81
|
+
],
|
|
82
|
+
"*.ts?(x)": [
|
|
83
|
+
"eslint --fix"
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
disabled: {
|
|
3
|
+
type: import("vue").PropType<boolean>;
|
|
4
|
+
};
|
|
5
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
submit: () => void;
|
|
7
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
8
|
+
disabled: {
|
|
9
|
+
type: import("vue").PropType<boolean>;
|
|
10
|
+
};
|
|
11
|
+
}>> & {
|
|
12
|
+
onSubmit?: (() => any) | undefined;
|
|
13
|
+
}, {}, {}>;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { ICommonTabItem } from '../typings';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<{
|
|
4
|
+
modelValue: {
|
|
5
|
+
required: true;
|
|
6
|
+
type: StringConstructor;
|
|
7
|
+
};
|
|
8
|
+
/** panels */
|
|
9
|
+
panels: {
|
|
10
|
+
required: true;
|
|
11
|
+
type: PropType<ICommonTabItem[]>;
|
|
12
|
+
};
|
|
13
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
14
|
+
modelValue: {
|
|
15
|
+
required: true;
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
};
|
|
18
|
+
/** panels */
|
|
19
|
+
panels: {
|
|
20
|
+
required: true;
|
|
21
|
+
type: PropType<ICommonTabItem[]>;
|
|
22
|
+
};
|
|
23
|
+
}>>, {}, {}>;
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import dayjs from 'dayjs';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
modelValue: {
|
|
4
|
+
type: import("vue").PropType<dayjs.Dayjs>;
|
|
5
|
+
};
|
|
6
|
+
format: {
|
|
7
|
+
type: import("vue").PropType<string>;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
isNow: {
|
|
11
|
+
type: import("vue").PropType<boolean>;
|
|
12
|
+
};
|
|
13
|
+
minDate: {
|
|
14
|
+
type: import("vue").PropType<dayjs.Dayjs>;
|
|
15
|
+
};
|
|
16
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
|
+
"update:modelValue": (date: dayjs.Dayjs) => void;
|
|
18
|
+
"update:isNow": (args_0: boolean) => void;
|
|
19
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
20
|
+
modelValue: {
|
|
21
|
+
type: import("vue").PropType<dayjs.Dayjs>;
|
|
22
|
+
};
|
|
23
|
+
format: {
|
|
24
|
+
type: import("vue").PropType<string>;
|
|
25
|
+
default: string;
|
|
26
|
+
};
|
|
27
|
+
isNow: {
|
|
28
|
+
type: import("vue").PropType<boolean>;
|
|
29
|
+
};
|
|
30
|
+
minDate: {
|
|
31
|
+
type: import("vue").PropType<dayjs.Dayjs>;
|
|
32
|
+
};
|
|
33
|
+
}>> & {
|
|
34
|
+
"onUpdate:modelValue"?: ((date: dayjs.Dayjs) => any) | undefined;
|
|
35
|
+
"onUpdate:isNow"?: ((args_0: boolean) => any) | undefined;
|
|
36
|
+
}, {
|
|
37
|
+
format: string;
|
|
38
|
+
}, {}>;
|
|
39
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DateValue } from '../typings';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
value: {
|
|
4
|
+
type: import("vue").PropType<DateValue>;
|
|
5
|
+
required: true;
|
|
6
|
+
};
|
|
7
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
+
change: (value: DateValue) => void;
|
|
9
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10
|
+
value: {
|
|
11
|
+
type: import("vue").PropType<DateValue>;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
}>> & {
|
|
15
|
+
onChange?: ((value: DateValue) => any) | undefined;
|
|
16
|
+
}, {}, {}>;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DateValue, NaturalDateValue } from '../typings';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
value: {
|
|
4
|
+
type: import("vue").PropType<DateValue>;
|
|
5
|
+
};
|
|
6
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
+
change: (value: NaturalDateValue) => void;
|
|
8
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
9
|
+
value: {
|
|
10
|
+
type: import("vue").PropType<DateValue>;
|
|
11
|
+
};
|
|
12
|
+
}>> & {
|
|
13
|
+
onChange?: ((value: NaturalDateValue) => any) | undefined;
|
|
14
|
+
}, {}, {}>;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { DateValue } from '../typings';
|
|
2
|
+
import { ITimezoneItem } from '../typings/timezone';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<{
|
|
4
|
+
defaultValue: {
|
|
5
|
+
type: import("vue").PropType<DateValue>;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
timezone: {
|
|
9
|
+
type: import("vue").PropType<string>;
|
|
10
|
+
};
|
|
11
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
+
change: (value: DateValue) => void;
|
|
13
|
+
"update:timezone": (value: string, timezoneInfo: ITimezoneItem) => void;
|
|
14
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
15
|
+
defaultValue: {
|
|
16
|
+
type: import("vue").PropType<DateValue>;
|
|
17
|
+
required: true;
|
|
18
|
+
};
|
|
19
|
+
timezone: {
|
|
20
|
+
type: import("vue").PropType<string>;
|
|
21
|
+
};
|
|
22
|
+
}>> & {
|
|
23
|
+
onChange?: ((value: DateValue) => any) | undefined;
|
|
24
|
+
"onUpdate:timezone"?: ((value: string, timezoneInfo: ITimezoneItem) => any) | undefined;
|
|
25
|
+
}, {}, {}>;
|
|
26
|
+
export default _default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { DateMode, DateValue, FutureDateValue, RecentDateValue } from '../typings';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
type: {
|
|
4
|
+
type: import("vue").PropType<DateMode.FUTURE | DateMode.RECENT>;
|
|
5
|
+
required: true;
|
|
6
|
+
default: DateMode;
|
|
7
|
+
};
|
|
8
|
+
value: {
|
|
9
|
+
type: import("vue").PropType<DateValue>;
|
|
10
|
+
};
|
|
11
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
+
change: (value: RecentDateValue | FutureDateValue) => void;
|
|
13
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
14
|
+
type: {
|
|
15
|
+
type: import("vue").PropType<DateMode.FUTURE | DateMode.RECENT>;
|
|
16
|
+
required: true;
|
|
17
|
+
default: DateMode;
|
|
18
|
+
};
|
|
19
|
+
value: {
|
|
20
|
+
type: import("vue").PropType<DateValue>;
|
|
21
|
+
};
|
|
22
|
+
}>> & {
|
|
23
|
+
onChange?: ((value: RecentDateValue | FutureDateValue) => any) | undefined;
|
|
24
|
+
}, {
|
|
25
|
+
type: DateMode.FUTURE | DateMode.RECENT;
|
|
26
|
+
}, {}>;
|
|
27
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ITimezoneItem } from '../typings/timezone';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
value: {
|
|
4
|
+
type: import("vue").PropType<string>;
|
|
5
|
+
};
|
|
6
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
+
change: (value: string, info: ITimezoneItem) => void;
|
|
8
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
9
|
+
value: {
|
|
10
|
+
type: import("vue").PropType<string>;
|
|
11
|
+
};
|
|
12
|
+
}>> & {
|
|
13
|
+
onChange?: ((value: string, info: ITimezoneItem) => any) | undefined;
|
|
14
|
+
}, {}, {}>;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import 'bkui-vue/lib/styles/reset.css';
|
|
2
|
+
import dayjs from 'dayjs';
|
|
3
|
+
import { DateValue } from './typings';
|
|
4
|
+
import { ITimezoneItem } from './typings/timezone';
|
|
5
|
+
declare const _default: import("vue").DefineComponent<{
|
|
6
|
+
modelValue: {
|
|
7
|
+
type: import("vue").PropType<string[] | DateValue | undefined>;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
disabled: {
|
|
11
|
+
type: import("vue").PropType<boolean>;
|
|
12
|
+
};
|
|
13
|
+
version: {
|
|
14
|
+
type: import("vue").PropType<string | number>;
|
|
15
|
+
default: string;
|
|
16
|
+
};
|
|
17
|
+
format: {
|
|
18
|
+
type: import("vue").PropType<string>;
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
behavior: {
|
|
22
|
+
type: import("vue").PropType<"normal" | "simplicity">;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
timezone: {
|
|
26
|
+
type: import("vue").PropType<string>;
|
|
27
|
+
};
|
|
28
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
29
|
+
"update:modelValue": (value: string[] | DateValue | undefined, info: {
|
|
30
|
+
dayjs: dayjs.Dayjs;
|
|
31
|
+
formatText: string;
|
|
32
|
+
unix: number;
|
|
33
|
+
}[]) => void;
|
|
34
|
+
"update:timezone": (value: string, timezoneInfo: ITimezoneItem) => void;
|
|
35
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
36
|
+
modelValue: {
|
|
37
|
+
type: import("vue").PropType<string[] | DateValue | undefined>;
|
|
38
|
+
required: true;
|
|
39
|
+
};
|
|
40
|
+
disabled: {
|
|
41
|
+
type: import("vue").PropType<boolean>;
|
|
42
|
+
};
|
|
43
|
+
version: {
|
|
44
|
+
type: import("vue").PropType<string | number>;
|
|
45
|
+
default: string;
|
|
46
|
+
};
|
|
47
|
+
format: {
|
|
48
|
+
type: import("vue").PropType<string>;
|
|
49
|
+
default: string;
|
|
50
|
+
};
|
|
51
|
+
behavior: {
|
|
52
|
+
type: import("vue").PropType<"normal" | "simplicity">;
|
|
53
|
+
default: string;
|
|
54
|
+
};
|
|
55
|
+
timezone: {
|
|
56
|
+
type: import("vue").PropType<string>;
|
|
57
|
+
};
|
|
58
|
+
}>> & {
|
|
59
|
+
"onUpdate:modelValue"?: ((value: string[] | DateValue | undefined, info: {
|
|
60
|
+
dayjs: dayjs.Dayjs;
|
|
61
|
+
formatText: string;
|
|
62
|
+
unix: number;
|
|
63
|
+
}[]) => any) | undefined;
|
|
64
|
+
"onUpdate:timezone"?: ((value: string, timezoneInfo: ITimezoneItem) => any) | undefined;
|
|
65
|
+
}, {
|
|
66
|
+
version: string | number;
|
|
67
|
+
format: string;
|
|
68
|
+
behavior: "normal" | "simplicity";
|
|
69
|
+
}, {}>;
|
|
70
|
+
export default _default;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export declare const langData: {
|
|
2
|
+
readonly 'option-\u4E0A\u5468': "Last week";
|
|
3
|
+
readonly 'option-\u4E0A\u6708': "Last month";
|
|
4
|
+
readonly 'option-\u4ECA\u5929': "Today";
|
|
5
|
+
readonly 'option-\u5206\u949F': "minutes";
|
|
6
|
+
readonly 'option-\u5468': "weeks";
|
|
7
|
+
readonly 'option-\u5929': "days";
|
|
8
|
+
readonly 'option-\u5C0F\u65F6': "hours";
|
|
9
|
+
readonly 'option-\u5E74': "years";
|
|
10
|
+
readonly 'option-\u6628\u5929': "Yesterday";
|
|
11
|
+
readonly 'option-\u6708': "Months";
|
|
12
|
+
readonly 'option-\u672C\u5468': "This week";
|
|
13
|
+
readonly 'option-\u672C\u6708': "This month";
|
|
14
|
+
readonly 'option-\u79D2': "Seconds";
|
|
15
|
+
readonly 上周: "now-1w/w";
|
|
16
|
+
readonly 上月: "now-1M/M";
|
|
17
|
+
readonly 今天: "now/d";
|
|
18
|
+
readonly 分钟: "m";
|
|
19
|
+
readonly 前: "Previous";
|
|
20
|
+
readonly '\u524D N \u5468': "Previous N weeks";
|
|
21
|
+
readonly '\u524D N \u5929': "Previous N days";
|
|
22
|
+
readonly 周: "w";
|
|
23
|
+
readonly 天: "d";
|
|
24
|
+
readonly 将来: "Future";
|
|
25
|
+
readonly 小时: "h";
|
|
26
|
+
readonly 常用时间: "Common";
|
|
27
|
+
readonly 年: "y";
|
|
28
|
+
readonly 开始时间: "Start Time";
|
|
29
|
+
readonly 支持多种时间格式自动转换: "Support multiple time formats for automatic conversion";
|
|
30
|
+
readonly 整: "whole";
|
|
31
|
+
readonly 无匹配数据: "No matching data";
|
|
32
|
+
readonly 日期选择: "Date selection";
|
|
33
|
+
readonly 时区设置: "Timezone setting";
|
|
34
|
+
readonly 时间格式支持: "Time format support";
|
|
35
|
+
readonly 昨天: "now-1d/d";
|
|
36
|
+
readonly 暂无最近使用记录: "No recent records";
|
|
37
|
+
readonly 最近: "Last";
|
|
38
|
+
readonly 最近使用: "Recently";
|
|
39
|
+
readonly 月: "M";
|
|
40
|
+
readonly 未来: "Future";
|
|
41
|
+
readonly 本周: "now/w";
|
|
42
|
+
readonly 本月: "now/M";
|
|
43
|
+
readonly 查看支持格式: "View supported formats";
|
|
44
|
+
readonly 格式: "Format";
|
|
45
|
+
readonly 此刻: "now";
|
|
46
|
+
readonly 浏览器时间: "Browser time";
|
|
47
|
+
readonly 确定: "Confirm";
|
|
48
|
+
readonly 示例: "Example";
|
|
49
|
+
readonly 秒: "s";
|
|
50
|
+
readonly 结束时间: "End Time";
|
|
51
|
+
readonly 自然时段: "Natural period";
|
|
52
|
+
readonly 至今: "so far";
|
|
53
|
+
readonly 请输入: "Please enter";
|
|
54
|
+
readonly '\u8BF7\u8F93\u5165\u641C\u7D22\uFF08\u56FD\u5BB6\uFF0C\u57CE\u5E02\uFF0C\u7B80\u79F0\uFF09': "Please enter search (country, city, abbreviation)";
|
|
55
|
+
readonly 近: "Last ";
|
|
56
|
+
readonly '\uFF08\u81F3\u4ECA\uFF09': "(so far)";
|
|
57
|
+
};
|
|
58
|
+
export type LangKey = keyof typeof langData;
|
|
59
|
+
export type LangValue = (typeof langData)[LangKey];
|
|
60
|
+
export declare const langValueMap: Record<LangValue, "option-上周" | "option-上月" | "option-今天" | "option-分钟" | "option-周" | "option-天" | "option-小时" | "option-年" | "option-昨天" | "option-月" | "option-本周" | "option-本月" | "option-秒" | "上周" | "上月" | "今天" | "分钟" | "前" | "前 N 周" | "前 N 天" | "周" | "天" | "将来" | "小时" | "常用时间" | "年" | "开始时间" | "支持多种时间格式自动转换" | "整" | "无匹配数据" | "日期选择" | "时区设置" | "时间格式支持" | "昨天" | "暂无最近使用记录" | "最近" | "最近使用" | "月" | "未来" | "本周" | "本月" | "查看支持格式" | "格式" | "此刻" | "浏览器时间" | "确定" | "示例" | "秒" | "结束时间" | "自然时段" | "至今" | "请输入" | "请输入搜索(国家,城市,简称)" | "近" | "(至今)">;
|
|
61
|
+
export declare const lang: string;
|
|
62
|
+
export declare const t: (key: LangKey, isOption?: boolean) => "Last week" | "Last month" | "Today" | "minutes" | "weeks" | "days" | "hours" | "years" | "Yesterday" | "Months" | "This week" | "This month" | "Seconds" | "now-1w/w" | "now-1M/M" | "now/d" | "m" | "Previous" | "Previous N weeks" | "Previous N days" | "w" | "d" | "Future" | "h" | "Common" | "y" | "Start Time" | "Support multiple time formats for automatic conversion" | "whole" | "No matching data" | "Date selection" | "Timezone setting" | "Time format support" | "now-1d/d" | "No recent records" | "Last" | "Recently" | "M" | "now/w" | "now/M" | "View supported formats" | "Format" | "now" | "Browser time" | "Confirm" | "Example" | "s" | "End Time" | "Natural period" | "so far" | "Please enter" | "Please enter search (country, city, abbreviation)" | "Last " | "(so far)" | "option-上周" | "option-上月" | "option-今天" | "option-分钟" | "option-周" | "option-天" | "option-小时" | "option-年" | "option-昨天" | "option-月" | "option-本周" | "option-本月" | "option-秒" | "上周" | "上月" | "今天" | "分钟" | "前" | "前 N 周" | "前 N 天" | "周" | "天" | "将来" | "小时" | "常用时间" | "年" | "开始时间" | "支持多种时间格式自动转换" | "整" | "无匹配数据" | "日期选择" | "时区设置" | "时间格式支持" | "昨天" | "暂无最近使用记录" | "最近" | "最近使用" | "月" | "未来" | "本周" | "本月" | "查看支持格式" | "格式" | "此刻" | "浏览器时间" | "确定" | "示例" | "秒" | "结束时间" | "自然时段" | "至今" | "请输入" | "请输入搜索(国家,城市,简称)" | "近" | "(至今)";
|
package/types/main.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { DateMode } from './index';
|
|
2
|
+
export declare const DateUnitList: readonly [{
|
|
3
|
+
readonly id: "s";
|
|
4
|
+
readonly name: "Last week" | "Last month" | "Today" | "minutes" | "weeks" | "days" | "hours" | "years" | "Yesterday" | "Months" | "This week" | "This month" | "Seconds" | "now-1w/w" | "now-1M/M" | "now/d" | "m" | "Previous" | "Previous N weeks" | "Previous N days" | "w" | "d" | "Future" | "h" | "Common" | "y" | "Start Time" | "Support multiple time formats for automatic conversion" | "whole" | "No matching data" | "Date selection" | "Timezone setting" | "Time format support" | "now-1d/d" | "No recent records" | "Last" | "Recently" | "M" | "now/w" | "now/M" | "View supported formats" | "Format" | "now" | "Browser time" | "Confirm" | "Example" | "s" | "End Time" | "Natural period" | "so far" | "Please enter" | "Please enter search (country, city, abbreviation)" | "Last " | "(so far)" | "option-上周" | "option-上月" | "option-今天" | "option-分钟" | "option-周" | "option-天" | "option-小时" | "option-年" | "option-昨天" | "option-月" | "option-本周" | "option-本月" | "option-秒" | "上周" | "上月" | "今天" | "分钟" | "前" | "前 N 周" | "前 N 天" | "周" | "天" | "将来" | "小时" | "常用时间" | "年" | "开始时间" | "支持多种时间格式自动转换" | "整" | "无匹配数据" | "日期选择" | "时区设置" | "时间格式支持" | "昨天" | "暂无最近使用记录" | "最近" | "最近使用" | "月" | "未来" | "本周" | "本月" | "查看支持格式" | "格式" | "此刻" | "浏览器时间" | "确定" | "示例" | "秒" | "结束时间" | "自然时段" | "至今" | "请输入" | "请输入搜索(国家,城市,简称)" | "近" | "(至今)";
|
|
5
|
+
}, {
|
|
6
|
+
readonly id: "m";
|
|
7
|
+
readonly name: "Last week" | "Last month" | "Today" | "minutes" | "weeks" | "days" | "hours" | "years" | "Yesterday" | "Months" | "This week" | "This month" | "Seconds" | "now-1w/w" | "now-1M/M" | "now/d" | "m" | "Previous" | "Previous N weeks" | "Previous N days" | "w" | "d" | "Future" | "h" | "Common" | "y" | "Start Time" | "Support multiple time formats for automatic conversion" | "whole" | "No matching data" | "Date selection" | "Timezone setting" | "Time format support" | "now-1d/d" | "No recent records" | "Last" | "Recently" | "M" | "now/w" | "now/M" | "View supported formats" | "Format" | "now" | "Browser time" | "Confirm" | "Example" | "s" | "End Time" | "Natural period" | "so far" | "Please enter" | "Please enter search (country, city, abbreviation)" | "Last " | "(so far)" | "option-上周" | "option-上月" | "option-今天" | "option-分钟" | "option-周" | "option-天" | "option-小时" | "option-年" | "option-昨天" | "option-月" | "option-本周" | "option-本月" | "option-秒" | "上周" | "上月" | "今天" | "分钟" | "前" | "前 N 周" | "前 N 天" | "周" | "天" | "将来" | "小时" | "常用时间" | "年" | "开始时间" | "支持多种时间格式自动转换" | "整" | "无匹配数据" | "日期选择" | "时区设置" | "时间格式支持" | "昨天" | "暂无最近使用记录" | "最近" | "最近使用" | "月" | "未来" | "本周" | "本月" | "查看支持格式" | "格式" | "此刻" | "浏览器时间" | "确定" | "示例" | "秒" | "结束时间" | "自然时段" | "至今" | "请输入" | "请输入搜索(国家,城市,简称)" | "近" | "(至今)";
|
|
8
|
+
}, {
|
|
9
|
+
readonly id: "h";
|
|
10
|
+
readonly name: "Last week" | "Last month" | "Today" | "minutes" | "weeks" | "days" | "hours" | "years" | "Yesterday" | "Months" | "This week" | "This month" | "Seconds" | "now-1w/w" | "now-1M/M" | "now/d" | "m" | "Previous" | "Previous N weeks" | "Previous N days" | "w" | "d" | "Future" | "h" | "Common" | "y" | "Start Time" | "Support multiple time formats for automatic conversion" | "whole" | "No matching data" | "Date selection" | "Timezone setting" | "Time format support" | "now-1d/d" | "No recent records" | "Last" | "Recently" | "M" | "now/w" | "now/M" | "View supported formats" | "Format" | "now" | "Browser time" | "Confirm" | "Example" | "s" | "End Time" | "Natural period" | "so far" | "Please enter" | "Please enter search (country, city, abbreviation)" | "Last " | "(so far)" | "option-上周" | "option-上月" | "option-今天" | "option-分钟" | "option-周" | "option-天" | "option-小时" | "option-年" | "option-昨天" | "option-月" | "option-本周" | "option-本月" | "option-秒" | "上周" | "上月" | "今天" | "分钟" | "前" | "前 N 周" | "前 N 天" | "周" | "天" | "将来" | "小时" | "常用时间" | "年" | "开始时间" | "支持多种时间格式自动转换" | "整" | "无匹配数据" | "日期选择" | "时区设置" | "时间格式支持" | "昨天" | "暂无最近使用记录" | "最近" | "最近使用" | "月" | "未来" | "本周" | "本月" | "查看支持格式" | "格式" | "此刻" | "浏览器时间" | "确定" | "示例" | "秒" | "结束时间" | "自然时段" | "至今" | "请输入" | "请输入搜索(国家,城市,简称)" | "近" | "(至今)";
|
|
11
|
+
}, {
|
|
12
|
+
readonly id: "d";
|
|
13
|
+
readonly name: "Last week" | "Last month" | "Today" | "minutes" | "weeks" | "days" | "hours" | "years" | "Yesterday" | "Months" | "This week" | "This month" | "Seconds" | "now-1w/w" | "now-1M/M" | "now/d" | "m" | "Previous" | "Previous N weeks" | "Previous N days" | "w" | "d" | "Future" | "h" | "Common" | "y" | "Start Time" | "Support multiple time formats for automatic conversion" | "whole" | "No matching data" | "Date selection" | "Timezone setting" | "Time format support" | "now-1d/d" | "No recent records" | "Last" | "Recently" | "M" | "now/w" | "now/M" | "View supported formats" | "Format" | "now" | "Browser time" | "Confirm" | "Example" | "s" | "End Time" | "Natural period" | "so far" | "Please enter" | "Please enter search (country, city, abbreviation)" | "Last " | "(so far)" | "option-上周" | "option-上月" | "option-今天" | "option-分钟" | "option-周" | "option-天" | "option-小时" | "option-年" | "option-昨天" | "option-月" | "option-本周" | "option-本月" | "option-秒" | "上周" | "上月" | "今天" | "分钟" | "前" | "前 N 周" | "前 N 天" | "周" | "天" | "将来" | "小时" | "常用时间" | "年" | "开始时间" | "支持多种时间格式自动转换" | "整" | "无匹配数据" | "日期选择" | "时区设置" | "时间格式支持" | "昨天" | "暂无最近使用记录" | "最近" | "最近使用" | "月" | "未来" | "本周" | "本月" | "查看支持格式" | "格式" | "此刻" | "浏览器时间" | "确定" | "示例" | "秒" | "结束时间" | "自然时段" | "至今" | "请输入" | "请输入搜索(国家,城市,简称)" | "近" | "(至今)";
|
|
14
|
+
}, {
|
|
15
|
+
readonly id: "w";
|
|
16
|
+
readonly name: "Last week" | "Last month" | "Today" | "minutes" | "weeks" | "days" | "hours" | "years" | "Yesterday" | "Months" | "This week" | "This month" | "Seconds" | "now-1w/w" | "now-1M/M" | "now/d" | "m" | "Previous" | "Previous N weeks" | "Previous N days" | "w" | "d" | "Future" | "h" | "Common" | "y" | "Start Time" | "Support multiple time formats for automatic conversion" | "whole" | "No matching data" | "Date selection" | "Timezone setting" | "Time format support" | "now-1d/d" | "No recent records" | "Last" | "Recently" | "M" | "now/w" | "now/M" | "View supported formats" | "Format" | "now" | "Browser time" | "Confirm" | "Example" | "s" | "End Time" | "Natural period" | "so far" | "Please enter" | "Please enter search (country, city, abbreviation)" | "Last " | "(so far)" | "option-上周" | "option-上月" | "option-今天" | "option-分钟" | "option-周" | "option-天" | "option-小时" | "option-年" | "option-昨天" | "option-月" | "option-本周" | "option-本月" | "option-秒" | "上周" | "上月" | "今天" | "分钟" | "前" | "前 N 周" | "前 N 天" | "周" | "天" | "将来" | "小时" | "常用时间" | "年" | "开始时间" | "支持多种时间格式自动转换" | "整" | "无匹配数据" | "日期选择" | "时区设置" | "时间格式支持" | "昨天" | "暂无最近使用记录" | "最近" | "最近使用" | "月" | "未来" | "本周" | "本月" | "查看支持格式" | "格式" | "此刻" | "浏览器时间" | "确定" | "示例" | "秒" | "结束时间" | "自然时段" | "至今" | "请输入" | "请输入搜索(国家,城市,简称)" | "近" | "(至今)";
|
|
17
|
+
}, {
|
|
18
|
+
readonly id: "M";
|
|
19
|
+
readonly name: "Last week" | "Last month" | "Today" | "minutes" | "weeks" | "days" | "hours" | "years" | "Yesterday" | "Months" | "This week" | "This month" | "Seconds" | "now-1w/w" | "now-1M/M" | "now/d" | "m" | "Previous" | "Previous N weeks" | "Previous N days" | "w" | "d" | "Future" | "h" | "Common" | "y" | "Start Time" | "Support multiple time formats for automatic conversion" | "whole" | "No matching data" | "Date selection" | "Timezone setting" | "Time format support" | "now-1d/d" | "No recent records" | "Last" | "Recently" | "M" | "now/w" | "now/M" | "View supported formats" | "Format" | "now" | "Browser time" | "Confirm" | "Example" | "s" | "End Time" | "Natural period" | "so far" | "Please enter" | "Please enter search (country, city, abbreviation)" | "Last " | "(so far)" | "option-上周" | "option-上月" | "option-今天" | "option-分钟" | "option-周" | "option-天" | "option-小时" | "option-年" | "option-昨天" | "option-月" | "option-本周" | "option-本月" | "option-秒" | "上周" | "上月" | "今天" | "分钟" | "前" | "前 N 周" | "前 N 天" | "周" | "天" | "将来" | "小时" | "常用时间" | "年" | "开始时间" | "支持多种时间格式自动转换" | "整" | "无匹配数据" | "日期选择" | "时区设置" | "时间格式支持" | "昨天" | "暂无最近使用记录" | "最近" | "最近使用" | "月" | "未来" | "本周" | "本月" | "查看支持格式" | "格式" | "此刻" | "浏览器时间" | "确定" | "示例" | "秒" | "结束时间" | "自然时段" | "至今" | "请输入" | "请输入搜索(国家,城市,简称)" | "近" | "(至今)";
|
|
20
|
+
}, {
|
|
21
|
+
readonly id: "y";
|
|
22
|
+
readonly name: "Last week" | "Last month" | "Today" | "minutes" | "weeks" | "days" | "hours" | "years" | "Yesterday" | "Months" | "This week" | "This month" | "Seconds" | "now-1w/w" | "now-1M/M" | "now/d" | "m" | "Previous" | "Previous N weeks" | "Previous N days" | "w" | "d" | "Future" | "h" | "Common" | "y" | "Start Time" | "Support multiple time formats for automatic conversion" | "whole" | "No matching data" | "Date selection" | "Timezone setting" | "Time format support" | "now-1d/d" | "No recent records" | "Last" | "Recently" | "M" | "now/w" | "now/M" | "View supported formats" | "Format" | "now" | "Browser time" | "Confirm" | "Example" | "s" | "End Time" | "Natural period" | "so far" | "Please enter" | "Please enter search (country, city, abbreviation)" | "Last " | "(so far)" | "option-上周" | "option-上月" | "option-今天" | "option-分钟" | "option-周" | "option-天" | "option-小时" | "option-年" | "option-昨天" | "option-月" | "option-本周" | "option-本月" | "option-秒" | "上周" | "上月" | "今天" | "分钟" | "前" | "前 N 周" | "前 N 天" | "周" | "天" | "将来" | "小时" | "常用时间" | "年" | "开始时间" | "支持多种时间格式自动转换" | "整" | "无匹配数据" | "日期选择" | "时区设置" | "时间格式支持" | "昨天" | "暂无最近使用记录" | "最近" | "最近使用" | "月" | "未来" | "本周" | "本月" | "查看支持格式" | "格式" | "此刻" | "浏览器时间" | "确定" | "示例" | "秒" | "结束时间" | "自然时段" | "至今" | "请输入" | "请输入搜索(国家,城市,简称)" | "近" | "(至今)";
|
|
23
|
+
}];
|
|
24
|
+
export type DateUnit = (typeof DateUnitList)[number]['id'];
|
|
25
|
+
export declare const dateUnit: "m" | "w" | "d" | "h" | "y" | "M" | "s";
|
|
26
|
+
export declare enum NaturalOptionType {
|
|
27
|
+
custom = "custom",
|
|
28
|
+
default = "default",
|
|
29
|
+
edit = "edit"
|
|
30
|
+
}
|
|
31
|
+
export declare const CommonNaturalOptions: ({
|
|
32
|
+
id: string;
|
|
33
|
+
name: "Last week" | "Last month" | "Today" | "minutes" | "weeks" | "days" | "hours" | "years" | "Yesterday" | "Months" | "This week" | "This month" | "Seconds" | "now-1w/w" | "now-1M/M" | "now/d" | "m" | "Previous" | "Previous N weeks" | "Previous N days" | "w" | "d" | "Future" | "h" | "Common" | "y" | "Start Time" | "Support multiple time formats for automatic conversion" | "whole" | "No matching data" | "Date selection" | "Timezone setting" | "Time format support" | "now-1d/d" | "No recent records" | "Last" | "Recently" | "M" | "now/w" | "now/M" | "View supported formats" | "Format" | "now" | "Browser time" | "Confirm" | "Example" | "s" | "End Time" | "Natural period" | "so far" | "Please enter" | "Please enter search (country, city, abbreviation)" | "Last " | "(so far)" | "option-上周" | "option-上月" | "option-今天" | "option-分钟" | "option-周" | "option-天" | "option-小时" | "option-年" | "option-昨天" | "option-月" | "option-本周" | "option-本月" | "option-秒" | "上周" | "上月" | "今天" | "分钟" | "前" | "前 N 周" | "前 N 天" | "周" | "天" | "将来" | "小时" | "常用时间" | "年" | "开始时间" | "支持多种时间格式自动转换" | "整" | "无匹配数据" | "日期选择" | "时区设置" | "时间格式支持" | "昨天" | "暂无最近使用记录" | "最近" | "最近使用" | "月" | "未来" | "本周" | "本月" | "查看支持格式" | "格式" | "此刻" | "浏览器时间" | "确定" | "示例" | "秒" | "结束时间" | "自然时段" | "至今" | "请输入" | "请输入搜索(国家,城市,简称)" | "近" | "(至今)";
|
|
34
|
+
type: NaturalOptionType;
|
|
35
|
+
prefix?: undefined;
|
|
36
|
+
suffix?: undefined;
|
|
37
|
+
unit?: undefined;
|
|
38
|
+
} | {
|
|
39
|
+
id: string;
|
|
40
|
+
name: "Last week" | "Last month" | "Today" | "minutes" | "weeks" | "days" | "hours" | "years" | "Yesterday" | "Months" | "This week" | "This month" | "Seconds" | "now-1w/w" | "now-1M/M" | "now/d" | "m" | "Previous" | "Previous N weeks" | "Previous N days" | "w" | "d" | "Future" | "h" | "Common" | "y" | "Start Time" | "Support multiple time formats for automatic conversion" | "whole" | "No matching data" | "Date selection" | "Timezone setting" | "Time format support" | "now-1d/d" | "No recent records" | "Last" | "Recently" | "M" | "now/w" | "now/M" | "View supported formats" | "Format" | "now" | "Browser time" | "Confirm" | "Example" | "s" | "End Time" | "Natural period" | "so far" | "Please enter" | "Please enter search (country, city, abbreviation)" | "Last " | "(so far)" | "option-上周" | "option-上月" | "option-今天" | "option-分钟" | "option-周" | "option-天" | "option-小时" | "option-年" | "option-昨天" | "option-月" | "option-本周" | "option-本月" | "option-秒" | "上周" | "上月" | "今天" | "分钟" | "前" | "前 N 周" | "前 N 天" | "周" | "天" | "将来" | "小时" | "常用时间" | "年" | "开始时间" | "支持多种时间格式自动转换" | "整" | "无匹配数据" | "日期选择" | "时区设置" | "时间格式支持" | "昨天" | "暂无最近使用记录" | "最近" | "最近使用" | "月" | "未来" | "本周" | "本月" | "查看支持格式" | "格式" | "此刻" | "浏览器时间" | "确定" | "示例" | "秒" | "结束时间" | "自然时段" | "至今" | "请输入" | "请输入搜索(国家,城市,简称)" | "近" | "(至今)";
|
|
41
|
+
prefix: "Last week" | "Last month" | "Today" | "minutes" | "weeks" | "days" | "hours" | "years" | "Yesterday" | "Months" | "This week" | "This month" | "Seconds" | "now-1w/w" | "now-1M/M" | "now/d" | "m" | "Previous" | "Previous N weeks" | "Previous N days" | "w" | "d" | "Future" | "h" | "Common" | "y" | "Start Time" | "Support multiple time formats for automatic conversion" | "whole" | "No matching data" | "Date selection" | "Timezone setting" | "Time format support" | "now-1d/d" | "No recent records" | "Last" | "Recently" | "M" | "now/w" | "now/M" | "View supported formats" | "Format" | "now" | "Browser time" | "Confirm" | "Example" | "s" | "End Time" | "Natural period" | "so far" | "Please enter" | "Please enter search (country, city, abbreviation)" | "Last " | "(so far)" | "option-上周" | "option-上月" | "option-今天" | "option-分钟" | "option-周" | "option-天" | "option-小时" | "option-年" | "option-昨天" | "option-月" | "option-本周" | "option-本月" | "option-秒" | "上周" | "上月" | "今天" | "分钟" | "前" | "前 N 周" | "前 N 天" | "周" | "天" | "将来" | "小时" | "常用时间" | "年" | "开始时间" | "支持多种时间格式自动转换" | "整" | "无匹配数据" | "日期选择" | "时区设置" | "时间格式支持" | "昨天" | "暂无最近使用记录" | "最近" | "最近使用" | "月" | "未来" | "本周" | "本月" | "查看支持格式" | "格式" | "此刻" | "浏览器时间" | "确定" | "示例" | "秒" | "结束时间" | "自然时段" | "至今" | "请输入" | "请输入搜索(国家,城市,简称)" | "近" | "(至今)";
|
|
42
|
+
suffix: "Last week" | "Last month" | "Today" | "minutes" | "weeks" | "days" | "hours" | "years" | "Yesterday" | "Months" | "This week" | "This month" | "Seconds" | "now-1w/w" | "now-1M/M" | "now/d" | "m" | "Previous" | "Previous N weeks" | "Previous N days" | "w" | "d" | "Future" | "h" | "Common" | "y" | "Start Time" | "Support multiple time formats for automatic conversion" | "whole" | "No matching data" | "Date selection" | "Timezone setting" | "Time format support" | "now-1d/d" | "No recent records" | "Last" | "Recently" | "M" | "now/w" | "now/M" | "View supported formats" | "Format" | "now" | "Browser time" | "Confirm" | "Example" | "s" | "End Time" | "Natural period" | "so far" | "Please enter" | "Please enter search (country, city, abbreviation)" | "Last " | "(so far)" | "option-上周" | "option-上月" | "option-今天" | "option-分钟" | "option-周" | "option-天" | "option-小时" | "option-年" | "option-昨天" | "option-月" | "option-本周" | "option-本月" | "option-秒" | "上周" | "上月" | "今天" | "分钟" | "前" | "前 N 周" | "前 N 天" | "周" | "天" | "将来" | "小时" | "常用时间" | "年" | "开始时间" | "支持多种时间格式自动转换" | "整" | "无匹配数据" | "日期选择" | "时区设置" | "时间格式支持" | "昨天" | "暂无最近使用记录" | "最近" | "最近使用" | "月" | "未来" | "本周" | "本月" | "查看支持格式" | "格式" | "此刻" | "浏览器时间" | "确定" | "示例" | "秒" | "结束时间" | "自然时段" | "至今" | "请输入" | "请输入搜索(国家,城市,简称)" | "近" | "(至今)";
|
|
43
|
+
type: NaturalOptionType;
|
|
44
|
+
unit: string;
|
|
45
|
+
})[];
|
|
46
|
+
export declare enum NaturalUnit {
|
|
47
|
+
ALL = "all",
|
|
48
|
+
NOW = "now"
|
|
49
|
+
}
|
|
50
|
+
export declare const naturalUnitOptions: readonly [{
|
|
51
|
+
readonly id: NaturalUnit.ALL;
|
|
52
|
+
readonly name: "Last week" | "Last month" | "Today" | "minutes" | "weeks" | "days" | "hours" | "years" | "Yesterday" | "Months" | "This week" | "This month" | "Seconds" | "now-1w/w" | "now-1M/M" | "now/d" | "m" | "Previous" | "Previous N weeks" | "Previous N days" | "w" | "d" | "Future" | "h" | "Common" | "y" | "Start Time" | "Support multiple time formats for automatic conversion" | "whole" | "No matching data" | "Date selection" | "Timezone setting" | "Time format support" | "now-1d/d" | "No recent records" | "Last" | "Recently" | "M" | "now/w" | "now/M" | "View supported formats" | "Format" | "now" | "Browser time" | "Confirm" | "Example" | "s" | "End Time" | "Natural period" | "so far" | "Please enter" | "Please enter search (country, city, abbreviation)" | "Last " | "(so far)" | "option-上周" | "option-上月" | "option-今天" | "option-分钟" | "option-周" | "option-天" | "option-小时" | "option-年" | "option-昨天" | "option-月" | "option-本周" | "option-本月" | "option-秒" | "上周" | "上月" | "今天" | "分钟" | "前" | "前 N 周" | "前 N 天" | "周" | "天" | "将来" | "小时" | "常用时间" | "年" | "开始时间" | "支持多种时间格式自动转换" | "整" | "无匹配数据" | "日期选择" | "时区设置" | "时间格式支持" | "昨天" | "暂无最近使用记录" | "最近" | "最近使用" | "月" | "未来" | "本周" | "本月" | "查看支持格式" | "格式" | "此刻" | "浏览器时间" | "确定" | "示例" | "秒" | "结束时间" | "自然时段" | "至今" | "请输入" | "请输入搜索(国家,城市,简称)" | "近" | "(至今)";
|
|
53
|
+
}, {
|
|
54
|
+
readonly id: NaturalUnit.NOW;
|
|
55
|
+
readonly name: "Last week" | "Last month" | "Today" | "minutes" | "weeks" | "days" | "hours" | "years" | "Yesterday" | "Months" | "This week" | "This month" | "Seconds" | "now-1w/w" | "now-1M/M" | "now/d" | "m" | "Previous" | "Previous N weeks" | "Previous N days" | "w" | "d" | "Future" | "h" | "Common" | "y" | "Start Time" | "Support multiple time formats for automatic conversion" | "whole" | "No matching data" | "Date selection" | "Timezone setting" | "Time format support" | "now-1d/d" | "No recent records" | "Last" | "Recently" | "M" | "now/w" | "now/M" | "View supported formats" | "Format" | "now" | "Browser time" | "Confirm" | "Example" | "s" | "End Time" | "Natural period" | "so far" | "Please enter" | "Please enter search (country, city, abbreviation)" | "Last " | "(so far)" | "option-上周" | "option-上月" | "option-今天" | "option-分钟" | "option-周" | "option-天" | "option-小时" | "option-年" | "option-昨天" | "option-月" | "option-本周" | "option-本月" | "option-秒" | "上周" | "上月" | "今天" | "分钟" | "前" | "前 N 周" | "前 N 天" | "周" | "天" | "将来" | "小时" | "常用时间" | "年" | "开始时间" | "支持多种时间格式自动转换" | "整" | "无匹配数据" | "日期选择" | "时区设置" | "时间格式支持" | "昨天" | "暂无最近使用记录" | "最近" | "最近使用" | "月" | "未来" | "本周" | "本月" | "查看支持格式" | "格式" | "此刻" | "浏览器时间" | "确定" | "示例" | "秒" | "结束时间" | "自然时段" | "至今" | "请输入" | "请输入搜索(国家,城市,简称)" | "近" | "(至今)";
|
|
56
|
+
}];
|
|
57
|
+
export declare const panels: {
|
|
58
|
+
id: string;
|
|
59
|
+
name: "Last week" | "Last month" | "Today" | "minutes" | "weeks" | "days" | "hours" | "years" | "Yesterday" | "Months" | "This week" | "This month" | "Seconds" | "now-1w/w" | "now-1M/M" | "now/d" | "m" | "Previous" | "Previous N weeks" | "Previous N days" | "w" | "d" | "Future" | "h" | "Common" | "y" | "Start Time" | "Support multiple time formats for automatic conversion" | "whole" | "No matching data" | "Date selection" | "Timezone setting" | "Time format support" | "now-1d/d" | "No recent records" | "Last" | "Recently" | "M" | "now/w" | "now/M" | "View supported formats" | "Format" | "now" | "Browser time" | "Confirm" | "Example" | "s" | "End Time" | "Natural period" | "so far" | "Please enter" | "Please enter search (country, city, abbreviation)" | "Last " | "(so far)" | "option-上周" | "option-上月" | "option-今天" | "option-分钟" | "option-周" | "option-天" | "option-小时" | "option-年" | "option-昨天" | "option-月" | "option-本周" | "option-本月" | "option-秒" | "上周" | "上月" | "今天" | "分钟" | "前" | "前 N 周" | "前 N 天" | "周" | "天" | "将来" | "小时" | "常用时间" | "年" | "开始时间" | "支持多种时间格式自动转换" | "整" | "无匹配数据" | "日期选择" | "时区设置" | "时间格式支持" | "昨天" | "暂无最近使用记录" | "最近" | "最近使用" | "月" | "未来" | "本周" | "本月" | "查看支持格式" | "格式" | "此刻" | "浏览器时间" | "确定" | "示例" | "秒" | "结束时间" | "自然时段" | "至今" | "请输入" | "请输入搜索(国家,城市,简称)" | "近" | "(至今)";
|
|
60
|
+
}[];
|
|
61
|
+
export declare const datePickTabList: {
|
|
62
|
+
id: DateMode;
|
|
63
|
+
name: "Last week" | "Last month" | "Today" | "minutes" | "weeks" | "days" | "hours" | "years" | "Yesterday" | "Months" | "This week" | "This month" | "Seconds" | "now-1w/w" | "now-1M/M" | "now/d" | "m" | "Previous" | "Previous N weeks" | "Previous N days" | "w" | "d" | "Future" | "h" | "Common" | "y" | "Start Time" | "Support multiple time formats for automatic conversion" | "whole" | "No matching data" | "Date selection" | "Timezone setting" | "Time format support" | "now-1d/d" | "No recent records" | "Last" | "Recently" | "M" | "now/w" | "now/M" | "View supported formats" | "Format" | "now" | "Browser time" | "Confirm" | "Example" | "s" | "End Time" | "Natural period" | "so far" | "Please enter" | "Please enter search (country, city, abbreviation)" | "Last " | "(so far)" | "option-上周" | "option-上月" | "option-今天" | "option-分钟" | "option-周" | "option-天" | "option-小时" | "option-年" | "option-昨天" | "option-月" | "option-本周" | "option-本月" | "option-秒" | "上周" | "上月" | "今天" | "分钟" | "前" | "前 N 周" | "前 N 天" | "周" | "天" | "将来" | "小时" | "常用时间" | "年" | "开始时间" | "支持多种时间格式自动转换" | "整" | "无匹配数据" | "日期选择" | "时区设置" | "时间格式支持" | "昨天" | "暂无最近使用记录" | "最近" | "最近使用" | "月" | "未来" | "本周" | "本月" | "查看支持格式" | "格式" | "此刻" | "浏览器时间" | "确定" | "示例" | "秒" | "结束时间" | "自然时段" | "至今" | "请输入" | "请输入搜索(国家,城市,简称)" | "近" | "(至今)";
|
|
64
|
+
}[];
|
|
65
|
+
export declare const getStoreKey: (key?: number | string) => string;
|
|
66
|
+
export declare const dateFormatList: string[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getCookieByName: (name: string) => string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DateValue } from '.';
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @param storeKey store key
|
|
5
|
+
* @returns store value list
|
|
6
|
+
*/
|
|
7
|
+
export declare const getStoreDateList: (storeKey: string) => any[];
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* @param val store value
|
|
11
|
+
* @param storeKey store key
|
|
12
|
+
* @returns void
|
|
13
|
+
*/
|
|
14
|
+
export declare const setStoreDateList: (val: DateValue | string[], storeKey: string) => void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface ITimezoneItem {
|
|
2
|
+
abbreviation: string;
|
|
3
|
+
country: string;
|
|
4
|
+
countryCode: string;
|
|
5
|
+
label: string;
|
|
6
|
+
utc: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ITimeZoneGroup {
|
|
9
|
+
label: string;
|
|
10
|
+
options: ITimezoneItem[];
|
|
11
|
+
}
|
|
12
|
+
export declare const getTimezoneDetails: () => ITimeZoneGroup[];
|
|
13
|
+
export declare const getTimezoneInfo: (searchIndex: string) => {
|
|
14
|
+
abbreviation: string;
|
|
15
|
+
country: string;
|
|
16
|
+
countryCode: string;
|
|
17
|
+
utc: string;
|
|
18
|
+
};
|
|
19
|
+
export declare const timezoneDetails: ITimeZoneGroup[];
|
|
20
|
+
export declare const getTimezoneInfoByValue: (value: string) => ITimezoneItem;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DateUnit } from './constant';
|
|
2
|
+
export interface ICommonTabItem {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
}
|
|
6
|
+
export declare enum DateMode {
|
|
7
|
+
Date = "date",
|
|
8
|
+
FUTURE = "now+",
|
|
9
|
+
NATURAL = "natural",
|
|
10
|
+
RECENT = "now-"
|
|
11
|
+
}
|
|
12
|
+
export type RecentValue = `${DateMode.RECENT}${number}${DateUnit}`;
|
|
13
|
+
export type RecentDateValue = [RecentValue, 'now'];
|
|
14
|
+
export type FutureValue = `${DateMode.FUTURE}${number}${DateUnit}`;
|
|
15
|
+
export type FutureDateValue = ['now', FutureValue];
|
|
16
|
+
export type NaturalSelectDate = `${RecentValue}/${DateUnit}`;
|
|
17
|
+
export type NaturalDateValue = [NaturalSelectDate, 'now' | NaturalSelectDate];
|
|
18
|
+
export type CommonDateValue = [string, string];
|
|
19
|
+
export type DateValue = CommonDateValue | FutureDateValue | NaturalDateValue | RecentDateValue;
|