@cloudtower/eagle 0.27.2-alpha.0 → 0.27.2-calendar
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/dist/components/Calendar/index.d.ts +3 -0
- package/dist/components/Fields/FieldsString/FieldsString.stories.d.ts +1 -1
- package/dist/components/I18nNameTag/index.d.ts +2 -8
- package/dist/components/Loading/style.d.ts +4 -0
- package/dist/components/Metric/metric.d.ts +1 -1
- package/dist/components/Tag/Tag.stories.d.ts +2 -2
- package/dist/components/Tag/style.d.ts +1 -0
- package/dist/components.css +1031 -1071
- package/dist/core/StepProgress/StepProgress.stories.d.ts +8 -0
- package/dist/core/StepProgress/index.d.ts +3 -0
- package/dist/coreX/CronCalendar/CronCalendar.stories.d.ts +6 -0
- package/dist/coreX/CronCalendar/index.d.ts +4 -0
- package/dist/coreX/CronPlan/CronPlan.stories.d.ts +9 -0
- package/dist/coreX/CronPlan/index.d.ts +18 -0
- package/dist/coreX/SwitchWithText/SwitchWithText.stories.d.ts +9 -0
- package/dist/coreX/SwitchWithText/__tests__/h5_css.test.d.ts +1 -0
- package/dist/coreX/SwitchWithText/index.d.ts +4 -0
- package/dist/coreX/common/getCalendarTitle.d.ts +2 -0
- package/dist/esm/index.js +3802 -2635
- package/dist/esm/stats1.html +1 -1
- package/dist/spec/base.d.ts +50 -9
- package/dist/spec/type.d.ts +6 -0
- package/dist/style.css +1448 -1488
- package/dist/umd/index.js +3770 -2604
- package/dist/umd/stats1.html +1 -1
- package/dist/utils/__test__/compute.spec.d.ts +1 -0
- package/dist/utils/__test__/cron-time.spec.d.ts +1 -0
- package/dist/utils/__test__/time.spec.d.ts +1 -0
- package/dist/utils/compute.d.ts +1 -0
- package/dist/utils/cron-time.d.ts +65 -0
- package/dist/utils/icon.d.ts +2 -1
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/time.d.ts +25 -0
- package/dist/variables.scss +2 -0
- package/package.json +6 -6
- package/dist/components/images/index.d.ts +0 -15
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function makeUUID(length?: number): string;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import dayjs from "dayjs";
|
|
2
|
+
type PresetValidator = (args: {
|
|
3
|
+
date: dayjs.Dayjs;
|
|
4
|
+
lastSendAt: dayjs.Dayjs | null;
|
|
5
|
+
args: string[];
|
|
6
|
+
}) => boolean;
|
|
7
|
+
export declare class CronTime {
|
|
8
|
+
source: dayjs.Dayjs | string;
|
|
9
|
+
presetValidation?: PresetValidator;
|
|
10
|
+
presetArgs?: string[];
|
|
11
|
+
presetStep?: number;
|
|
12
|
+
realDate: boolean;
|
|
13
|
+
utcOffset?: number;
|
|
14
|
+
startAt?: dayjs.Dayjs;
|
|
15
|
+
unitMap: Record<string, Record<string, boolean>>;
|
|
16
|
+
lastSendAt: dayjs.Dayjs | null;
|
|
17
|
+
constructor(source: Date | string, startAt?: dayjs.Dayjs, utcOffset?: number);
|
|
18
|
+
/**
|
|
19
|
+
* Calculate the "next" scheduled time
|
|
20
|
+
*/
|
|
21
|
+
sendAt(): dayjs.Dayjs;
|
|
22
|
+
sendAt(i: number): dayjs.Dayjs[];
|
|
23
|
+
/**
|
|
24
|
+
* Get the number of milliseconds in the future at which to fire our callbacks.
|
|
25
|
+
*/
|
|
26
|
+
getTimeout(): number;
|
|
27
|
+
/**
|
|
28
|
+
* writes out a cron string
|
|
29
|
+
*/
|
|
30
|
+
toString(): string;
|
|
31
|
+
/**
|
|
32
|
+
* Json representation of the parsed cron syntax.
|
|
33
|
+
*/
|
|
34
|
+
toJSON(): string[];
|
|
35
|
+
setLastSendAt(date: dayjs.Dayjs): void;
|
|
36
|
+
private parse;
|
|
37
|
+
private parsePrestArgs;
|
|
38
|
+
private parseField;
|
|
39
|
+
private verifyParse;
|
|
40
|
+
private getNextDateFromWithValidation;
|
|
41
|
+
/**
|
|
42
|
+
* Get next date matching the specified cron time.
|
|
43
|
+
*
|
|
44
|
+
* Algorithm:
|
|
45
|
+
* - Start with a start date and a parsed crontime.
|
|
46
|
+
* - Loop until 5 seconds have passed, or we found the next date.
|
|
47
|
+
* - Within the loop:
|
|
48
|
+
* - If it took longer than 5 seconds to select a date, throw an exception.
|
|
49
|
+
* - Find the next month to run at.
|
|
50
|
+
* - Find the next day of the month to run at.
|
|
51
|
+
* - Find the next day of the week to run at.
|
|
52
|
+
* - Find the next hour to run at.
|
|
53
|
+
* - Find the next minute to run at.
|
|
54
|
+
* - Find the next second to run at.
|
|
55
|
+
* - Check that the chosen time does not equal the current execution.
|
|
56
|
+
* - Return the selected date object.
|
|
57
|
+
*/
|
|
58
|
+
private getNextDateFrom;
|
|
59
|
+
/**
|
|
60
|
+
* wildcard, or all params in array (for to string)
|
|
61
|
+
*/
|
|
62
|
+
private wcOrAll;
|
|
63
|
+
private hasAll;
|
|
64
|
+
}
|
|
65
|
+
export {};
|
package/dist/utils/icon.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare function getAlertIcon(type: "success" | "info" | "warning" | "error" | "normal" | undefined): (props: import("react").SVGProps<SVGSVGElement>) => JSX.Element;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import dayjs from "dayjs";
|
|
2
|
+
import { CronTime } from "./cron-time";
|
|
3
|
+
export declare const DEFAULT_TIME: dayjs.Dayjs;
|
|
4
|
+
export declare function getTime(cronTime: CronTime, isUTC?: boolean): dayjs.Dayjs;
|
|
5
|
+
export type CronMode = "day" | "week" | "month";
|
|
6
|
+
export declare function getMode(source: string): CronMode;
|
|
7
|
+
export declare function getDaily(mode: CronMode, source: string, time: dayjs.Dayjs, defaultTime?: dayjs.Dayjs): {
|
|
8
|
+
step: number;
|
|
9
|
+
time: dayjs.Dayjs;
|
|
10
|
+
};
|
|
11
|
+
export declare function toDailyString(step: number, time: dayjs.Dayjs): string;
|
|
12
|
+
export declare function getWeekly(mode: CronMode, source: string, time: dayjs.Dayjs, defaultTime?: dayjs.Dayjs): {
|
|
13
|
+
step: number;
|
|
14
|
+
days: number[];
|
|
15
|
+
time: dayjs.Dayjs;
|
|
16
|
+
};
|
|
17
|
+
export declare function toWeeklyString(step: number, time: dayjs.Dayjs, days: number[]): string;
|
|
18
|
+
export declare function getMonthly(mode: CronMode, month: string, day: string, time: dayjs.Dayjs, defaultTime?: dayjs.Dayjs): {
|
|
19
|
+
step: number;
|
|
20
|
+
days: number[];
|
|
21
|
+
time: dayjs.Dayjs;
|
|
22
|
+
};
|
|
23
|
+
export declare function toMonthlyString(step: number, time: dayjs.Dayjs, days: number[]): string;
|
|
24
|
+
export declare function transformPeriodToLocal(period: string | undefined, start_at?: string): string;
|
|
25
|
+
export declare function transformPeriodToUTC(period: string | undefined, start_at?: string): string;
|
package/dist/variables.scss
CHANGED
|
@@ -492,6 +492,7 @@ $strokes-light-trans-3: rgba(#acbad3, 0.6);
|
|
|
492
492
|
$strokes-light-trans-4: rgba(#6b80a7, 0.6);
|
|
493
493
|
$strokes-light-outstanding-light: rgba(#0088ff, 0.16);
|
|
494
494
|
$strokes-light-serious-light: rgba(#ff4a4a, 0.16);
|
|
495
|
+
$stroke-neutral-trans-2: $gray-a60-3;
|
|
495
496
|
|
|
496
497
|
$strokes-light-opaque-1: $gray-20;
|
|
497
498
|
$strokes-light-opaque-2: $gray-30;
|
|
@@ -500,6 +501,7 @@ $strokes-light-opaque-4: $gray-60;
|
|
|
500
501
|
$strokes-light-outstanding: $blue-60;
|
|
501
502
|
$strokes-light-serious: $red-60;
|
|
502
503
|
|
|
504
|
+
|
|
503
505
|
/* background */
|
|
504
506
|
|
|
505
507
|
$backgrounds-light-primary: $white;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudtower/eagle",
|
|
3
|
-
"version": "0.27.2-
|
|
3
|
+
"version": "0.27.2-calendar",
|
|
4
4
|
"main": "dist/umd/index.js",
|
|
5
5
|
"module": "./dist/esm/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -23,14 +23,13 @@
|
|
|
23
23
|
"test:ci": "vitest run",
|
|
24
24
|
"coverage": "vitest run --coverage",
|
|
25
25
|
"typings": "tsc -v && tsc --emitDeclarationOnly --paths null",
|
|
26
|
-
"generate:images": "node --loader ts-node/esm tools/index.mts",
|
|
27
26
|
"prestorybook": "cd ../.. && yarn turbo run build",
|
|
28
27
|
"storybook": "storybook dev -p 6006",
|
|
29
28
|
"build-storybook": "storybook build"
|
|
30
29
|
},
|
|
31
30
|
"dependencies": {
|
|
32
|
-
"@cloudtower/icons-react": "0.27.2-
|
|
33
|
-
"@cloudtower/parrot": "0.27.2-
|
|
31
|
+
"@cloudtower/icons-react": "0.27.2-calendar",
|
|
32
|
+
"@cloudtower/parrot": "0.27.2-calendar",
|
|
34
33
|
"@cloudtower/rc-notification": "^4.6.1",
|
|
35
34
|
"@linaria/core": "^4.2.2",
|
|
36
35
|
"@linaria/react": "^4.3.0",
|
|
@@ -51,7 +50,7 @@
|
|
|
51
50
|
"@babel/preset-env": "^7.22.15",
|
|
52
51
|
"@babel/preset-react": "^7.22.15",
|
|
53
52
|
"@babel/preset-typescript": "^7.22.15",
|
|
54
|
-
"@cloudtower/icons": "0.27.2-
|
|
53
|
+
"@cloudtower/icons": "0.27.2-calendar",
|
|
55
54
|
"@linaria/babel-preset": "4.4.1",
|
|
56
55
|
"@linaria/rollup": "^4.1.5",
|
|
57
56
|
"@linaria/vite": "^4.2.5",
|
|
@@ -84,6 +83,7 @@
|
|
|
84
83
|
"less": "^4.1.3",
|
|
85
84
|
"linaria": "^4.1.13",
|
|
86
85
|
"mini-css-extract-plugin": "^2.7.2",
|
|
86
|
+
"mockdate": "^3.0.5",
|
|
87
87
|
"postcss": "^8.4.20",
|
|
88
88
|
"postcss-url": "^10.1.3",
|
|
89
89
|
"react": "17.0.2",
|
|
@@ -107,5 +107,5 @@
|
|
|
107
107
|
"vite": "^3.1.7",
|
|
108
108
|
"vitest": "^0.24.1"
|
|
109
109
|
},
|
|
110
|
-
"gitHead": "
|
|
110
|
+
"gitHead": "5d3c203b04b8ac1b16a815eee6395d6d7e2d3440"
|
|
111
111
|
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export { default as arrowChevronDownSmall16Blue } from "./arrow-chevron-down-small-16-blue.svg";
|
|
2
|
-
export { default as arrowChevronDownSmall16Secondary } from "./arrow-chevron-down-small-16-secondary.svg";
|
|
3
|
-
export { default as arrowChevronLeftSmall16BoldBlue } from "./arrow-chevron-left-small-16-bold-blue.svg";
|
|
4
|
-
export { default as arrowChevronUp16BoldSecondary } from "./arrow-chevron-up-16-bold-secondary.svg";
|
|
5
|
-
export { default as checkmarkDoneSuccessCircleFill16Green } from "./checkmark-done-success-circle-fill-16-green.svg";
|
|
6
|
-
export { default as focusIndicator16Blue } from "./focus-indicator-16-blue.svg";
|
|
7
|
-
export { default as infoICircleFill16Blue } from "./info-i-circle-fill-16-blue.svg";
|
|
8
|
-
export { default as infoICircleFill16Secondary } from "./info-i-circle-fill-16-secondary.svg";
|
|
9
|
-
export { default as loading24GradientBlue } from "./loading-24-gradient-blue.png";
|
|
10
|
-
export { default as noticeAttention16Yellow } from "./notice-attention-16-yellow.svg";
|
|
11
|
-
export { default as plusAddCreateNew24GradientGray } from "./plus-add-create-new-24-gradient-gray.svg";
|
|
12
|
-
export { default as settingsGear16GradientBlue } from "./settings-gear-16-gradient-blue.svg";
|
|
13
|
-
export { default as settingsGear16GradientGray } from "./settings-gear-16-gradient-gray.svg";
|
|
14
|
-
export { default as statusUnknownQuestionmark16Red } from "./status-unknown-questionmark-16-red.svg";
|
|
15
|
-
export { default as xmarkFailedSeriousWarningFill16Red } from "./xmark-failed-serious-warning-fill-16-red.svg";
|