@vanillabp/bc-shared 0.0.3
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 +101 -0
- package/dist/chunk-YH4NJHER.js +58 -0
- package/dist/components/Badge.d.ts +12 -0
- package/dist/components/Badge.js +84 -0
- package/dist/components/CircleButton.d.ts +5 -0
- package/dist/components/CircleButton.js +47 -0
- package/dist/components/CopyClipboard.d.ts +21 -0
- package/dist/components/CopyClipboard.js +110 -0
- package/dist/components/DefaultListCell.d.ts +44 -0
- package/dist/components/DefaultListCell.js +179 -0
- package/dist/components/DefaultListHeader.d.ts +22 -0
- package/dist/components/DefaultListHeader.js +110 -0
- package/dist/components/Link.d.ts +10 -0
- package/dist/components/Link.js +34 -0
- package/dist/components/LoadingIndicator.d.ts +4 -0
- package/dist/components/LoadingIndicator.js +48 -0
- package/dist/components/ModalDialog.d.ts +16 -0
- package/dist/components/ModalDialog.js +108 -0
- package/dist/components/SseProvider.d.ts +46 -0
- package/dist/components/SseProvider.js +134 -0
- package/dist/components/Toast.d.ts +22 -0
- package/dist/components/Toast.js +30 -0
- package/dist/components/UserTaskAppLayout.d.ts +9 -0
- package/dist/components/UserTaskAppLayout.js +47 -0
- package/dist/components/WarningListCell.d.ts +6 -0
- package/dist/components/WarningListCell.js +39 -0
- package/dist/components/index.d.ts +20 -0
- package/dist/components/index.js +12 -0
- package/dist/index.d.ts +36 -0
- package/dist/index.js +4 -0
- package/dist/stories/LoadingIndicator.stories.d.ts +9 -0
- package/dist/stories/LoadingIndicator.stories.js +18 -0
- package/dist/theme/index.d.ts +5 -0
- package/dist/theme/index.js +168 -0
- package/dist/types/BcUserTask.d.ts +12 -0
- package/dist/types/BcUserTask.js +1 -0
- package/dist/types/BcWorkflow.d.ts +11 -0
- package/dist/types/BcWorkflow.js +1 -0
- package/dist/types/ListCell.d.ts +30 -0
- package/dist/types/ListCell.js +15 -0
- package/dist/types/UserTaskForm.d.ts +10 -0
- package/dist/types/UserTaskForm.js +0 -0
- package/dist/types/UserTaskListCell.d.ts +16 -0
- package/dist/types/UserTaskListCell.js +0 -0
- package/dist/types/WorkflowListCell.d.ts +17 -0
- package/dist/types/WorkflowListCell.js +0 -0
- package/dist/types/WorkflowPage.d.ts +11 -0
- package/dist/types/WorkflowPage.js +0 -0
- package/dist/types/index.d.ts +14 -0
- package/dist/types/index.js +8 -0
- package/dist/types/translate.d.ts +3 -0
- package/dist/types/translate.js +0 -0
- package/dist/utils/clickOutside.d.ts +6 -0
- package/dist/utils/clickOutside.js +20 -0
- package/dist/utils/debounce.d.ts +9 -0
- package/dist/utils/debounce.js +27 -0
- package/dist/utils/fetchApi.d.ts +10 -0
- package/dist/utils/fetchApi.js +76 -0
- package/dist/utils/i18n.d.ts +3 -0
- package/dist/utils/i18n.js +5 -0
- package/dist/utils/index.d.ts +13 -0
- package/dist/utils/index.js +8 -0
- package/dist/utils/now-hook.d.ts +7 -0
- package/dist/utils/now-hook.js +30 -0
- package/dist/utils/objectUtils.d.ts +5 -0
- package/dist/utils/objectUtils.js +95 -0
- package/dist/utils/responsiveUtils.d.ts +13 -0
- package/dist/utils/responsiveUtils.js +18 -0
- package/dist/utils/timeUtils.d.ts +14 -0
- package/dist/utils/timeUtils.js +107 -0
- package/package.json +76 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare let now: Date;
|
|
2
|
+
declare type EachSecondHook = (lastNow: Date) => void;
|
|
3
|
+
declare const useKeepNowUpToDate: () => void;
|
|
4
|
+
declare const registerEachSecondHook: (eachSecondHook: EachSecondHook) => void;
|
|
5
|
+
declare const unregisterEachSecondHook: (eachSecondHook: EachSecondHook) => void;
|
|
6
|
+
|
|
7
|
+
export { now, registerEachSecondHook, unregisterEachSecondHook, useKeepNowUpToDate };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import "../chunk-YH4NJHER.js";
|
|
2
|
+
import { useEffect } from "react";
|
|
3
|
+
let now = /* @__PURE__ */ new Date();
|
|
4
|
+
const hooks = new Array();
|
|
5
|
+
const useKeepNowUpToDate = () => {
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
const timer = window.setInterval(() => {
|
|
8
|
+
now = /* @__PURE__ */ new Date();
|
|
9
|
+
hooks.forEach((hook) => {
|
|
10
|
+
const lastNow = hook.lastNow;
|
|
11
|
+
hook.lastNow = now;
|
|
12
|
+
hook.hook(lastNow);
|
|
13
|
+
});
|
|
14
|
+
}, 1e3);
|
|
15
|
+
return () => window.clearInterval(timer);
|
|
16
|
+
}, []);
|
|
17
|
+
};
|
|
18
|
+
const registerEachSecondHook = (eachSecondHook) => {
|
|
19
|
+
hooks.push({ hook: eachSecondHook, lastNow: now });
|
|
20
|
+
};
|
|
21
|
+
const unregisterEachSecondHook = (eachSecondHook) => {
|
|
22
|
+
const hookIndex = hooks.findIndex((hook) => hook.hook === eachSecondHook);
|
|
23
|
+
hooks.splice(hookIndex, 1);
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
now,
|
|
27
|
+
registerEachSecondHook,
|
|
28
|
+
unregisterEachSecondHook,
|
|
29
|
+
useKeepNowUpToDate
|
|
30
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
declare const getObjectProperty: (object: any, path: string, defaultValue?: string) => any | undefined;
|
|
2
|
+
declare const mergeTwoSortedArrays: <T>(array1: T[], array2: T[], compare?: (first: T, second: T) => boolean) => T[];
|
|
3
|
+
declare const keepOldItemsInArray: <T>(newArray: T[], oldArray: T[], getId?: (item: T) => any, map?: (newItem: T | undefined, oldItem: T | undefined, index: number) => T, isFirstBeforeSecond?: (first: T, second: T) => boolean) => T[];
|
|
4
|
+
|
|
5
|
+
export { getObjectProperty, keepOldItemsInArray, mergeTwoSortedArrays };
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import "../chunk-YH4NJHER.js";
|
|
2
|
+
const getObjectProperty = (object, path, defaultValue) => {
|
|
3
|
+
if (!Boolean(object)) {
|
|
4
|
+
return defaultValue;
|
|
5
|
+
}
|
|
6
|
+
const parts = path.split(".");
|
|
7
|
+
return parts.reduce((object2, key) => object2 == null ? void 0 : object2[key], object);
|
|
8
|
+
};
|
|
9
|
+
const mergeTwoSortedArrays = (array1, array2, compare = (f, s) => f < s) => {
|
|
10
|
+
let merged = [];
|
|
11
|
+
let index1 = 0;
|
|
12
|
+
let index2 = 0;
|
|
13
|
+
let current = 0;
|
|
14
|
+
while (current < array1.length + array2.length) {
|
|
15
|
+
let isArr1Depleted = index1 >= array1.length;
|
|
16
|
+
let isArr2Depleted = index2 >= array2.length;
|
|
17
|
+
if (!isArr1Depleted && (isArr2Depleted || compare(array1[index1], array2[index2]))) {
|
|
18
|
+
merged[current] = array1[index1];
|
|
19
|
+
index1++;
|
|
20
|
+
} else {
|
|
21
|
+
merged[current] = array2[index2];
|
|
22
|
+
index2++;
|
|
23
|
+
}
|
|
24
|
+
current++;
|
|
25
|
+
}
|
|
26
|
+
return merged;
|
|
27
|
+
};
|
|
28
|
+
const keepOldItemsInArray = (newArray, oldArray, getId = (item) => item, map = (i, oi, idx) => i || oi, isFirstBeforeSecond = (f, s) => f < s) => {
|
|
29
|
+
let merged = [];
|
|
30
|
+
let indexNew = 0;
|
|
31
|
+
let indexOld = 0;
|
|
32
|
+
while (indexNew < newArray.length || indexOld < oldArray.length) {
|
|
33
|
+
if (indexNew < newArray.length) {
|
|
34
|
+
let idOfNewItem = getId(newArray[indexNew]);
|
|
35
|
+
let toBeMerged = indexOld;
|
|
36
|
+
while (toBeMerged < oldArray.length && getId(oldArray[toBeMerged]) !== idOfNewItem) {
|
|
37
|
+
++toBeMerged;
|
|
38
|
+
}
|
|
39
|
+
if (toBeMerged < oldArray.length) {
|
|
40
|
+
while (indexOld < toBeMerged) {
|
|
41
|
+
merged.push(map(void 0, oldArray[indexOld], merged.length));
|
|
42
|
+
++indexOld;
|
|
43
|
+
}
|
|
44
|
+
if (indexOld < oldArray.length) {
|
|
45
|
+
merged.push(map(newArray[indexNew], oldArray[indexOld], merged.length));
|
|
46
|
+
++indexOld;
|
|
47
|
+
}
|
|
48
|
+
++indexNew;
|
|
49
|
+
} else {
|
|
50
|
+
let lookAheadIndexNew = indexNew + 1;
|
|
51
|
+
toBeMerged = indexOld;
|
|
52
|
+
while (lookAheadIndexNew < newArray.length) {
|
|
53
|
+
idOfNewItem = getId(newArray[lookAheadIndexNew]);
|
|
54
|
+
while (toBeMerged < oldArray.length && getId(oldArray[toBeMerged]) !== idOfNewItem) {
|
|
55
|
+
++toBeMerged;
|
|
56
|
+
}
|
|
57
|
+
if (toBeMerged != oldArray.length) {
|
|
58
|
+
lookAheadIndexNew = newArray.length;
|
|
59
|
+
} else {
|
|
60
|
+
toBeMerged = indexOld;
|
|
61
|
+
}
|
|
62
|
+
++lookAheadIndexNew;
|
|
63
|
+
}
|
|
64
|
+
while (indexOld < toBeMerged) {
|
|
65
|
+
if (isFirstBeforeSecond(oldArray[indexOld], newArray[indexNew])) {
|
|
66
|
+
merged.push(map(void 0, oldArray[indexOld], merged.length));
|
|
67
|
+
++indexOld;
|
|
68
|
+
} else {
|
|
69
|
+
toBeMerged = indexOld;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
if (idOfNewItem !== void 0) {
|
|
73
|
+
if (indexOld < oldArray.length && isFirstBeforeSecond(oldArray[indexOld], newArray[indexNew])) {
|
|
74
|
+
merged.push(map(void 0, oldArray[indexOld], merged.length));
|
|
75
|
+
++indexOld;
|
|
76
|
+
} else {
|
|
77
|
+
merged.push(map(newArray[indexNew], void 0, merged.length));
|
|
78
|
+
++indexNew;
|
|
79
|
+
}
|
|
80
|
+
} else {
|
|
81
|
+
++indexNew;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
} else {
|
|
85
|
+
merged.push(map(void 0, oldArray[indexOld], merged.length));
|
|
86
|
+
++indexOld;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return merged;
|
|
90
|
+
};
|
|
91
|
+
export {
|
|
92
|
+
getObjectProperty,
|
|
93
|
+
keepOldItemsInArray,
|
|
94
|
+
mergeTwoSortedArrays
|
|
95
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare type Screen = 'phone' | 'tablet' | 'computer';
|
|
2
|
+
declare type CurrentScreen = {
|
|
3
|
+
isPhone: boolean;
|
|
4
|
+
isNotPhone: boolean;
|
|
5
|
+
isTablet: boolean;
|
|
6
|
+
isNotTablet: boolean;
|
|
7
|
+
isComputer: boolean;
|
|
8
|
+
isNotComputer: boolean;
|
|
9
|
+
currentScreen: Screen;
|
|
10
|
+
};
|
|
11
|
+
declare const useResponsiveScreen: () => CurrentScreen;
|
|
12
|
+
|
|
13
|
+
export { useResponsiveScreen };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import "../chunk-YH4NJHER.js";
|
|
2
|
+
import { ResponsiveContext } from "grommet";
|
|
3
|
+
import { useContext } from "react";
|
|
4
|
+
const useResponsiveScreen = () => {
|
|
5
|
+
const size = useContext(ResponsiveContext);
|
|
6
|
+
return {
|
|
7
|
+
isPhone: size === "small",
|
|
8
|
+
isNotPhone: size !== "small",
|
|
9
|
+
isTablet: size === "medium",
|
|
10
|
+
isNotTablet: size !== "medium",
|
|
11
|
+
isComputer: size === "large",
|
|
12
|
+
isNotComputer: size !== "large",
|
|
13
|
+
currentScreen: size === "small" ? "phone" : size === "medium" ? "tablet" : "computer"
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
useResponsiveScreen
|
|
18
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare const isValidLocalDate: (localDate: string) => boolean;
|
|
2
|
+
declare const parseLocalDate: (localDate: string | undefined) => Date | undefined;
|
|
3
|
+
declare const parseLocalDateToIsoString: (localDate: string | undefined | null) => string | undefined;
|
|
4
|
+
declare const toLocalDateString: (date?: Date) => string | undefined;
|
|
5
|
+
declare const toLocaleTimeStringWithoutSeconds: (date?: Date) => string | undefined;
|
|
6
|
+
declare const toLocaleDateString: (date?: Date) => string | undefined;
|
|
7
|
+
declare const toLocaleStringWithoutSeconds: (date?: Date) => string | undefined;
|
|
8
|
+
declare const currentHour: () => Date;
|
|
9
|
+
declare const nextHours: (from: Date, hours: number, history: boolean) => Date;
|
|
10
|
+
declare const hoursBetween: (from: Date, to: Date) => Array<Date>;
|
|
11
|
+
declare const numberOfHoursBetween: (from: Date, to: Date) => number;
|
|
12
|
+
declare const timeAsString: (date: Date) => string;
|
|
13
|
+
|
|
14
|
+
export { currentHour, hoursBetween, isValidLocalDate, nextHours, numberOfHoursBetween, parseLocalDate, parseLocalDateToIsoString, timeAsString, toLocalDateString, toLocaleDateString, toLocaleStringWithoutSeconds, toLocaleTimeStringWithoutSeconds };
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import "../chunk-YH4NJHER.js";
|
|
2
|
+
const LOCAL_DATE_FORMAT = /^([0-9]{4})-([0-9]{2})-([0-9]{2})$/;
|
|
3
|
+
const isValidLocalDate = (localDate) => {
|
|
4
|
+
try {
|
|
5
|
+
parseLocalDate(localDate);
|
|
6
|
+
return true;
|
|
7
|
+
} catch (error) {
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
const parseLocalDate = (localDate) => {
|
|
12
|
+
if (!Boolean(localDate)) {
|
|
13
|
+
return void 0;
|
|
14
|
+
}
|
|
15
|
+
const result = localDate.match(LOCAL_DATE_FORMAT);
|
|
16
|
+
if (result == null) {
|
|
17
|
+
throw new Error(`Unsupported date format '${localDate}'`);
|
|
18
|
+
}
|
|
19
|
+
const year = parseInt(result[1]);
|
|
20
|
+
const month = parseInt(result[2]) - 1;
|
|
21
|
+
const day = parseInt(result[3]);
|
|
22
|
+
return new Date(year, month, day);
|
|
23
|
+
};
|
|
24
|
+
const parseLocalDateToIsoString = (localDate) => {
|
|
25
|
+
if (!Boolean(localDate)) {
|
|
26
|
+
return void 0;
|
|
27
|
+
}
|
|
28
|
+
return new Date(localDate).toISOString();
|
|
29
|
+
};
|
|
30
|
+
const toLocalDateString = (date) => {
|
|
31
|
+
if (!Boolean(date)) {
|
|
32
|
+
return void 0;
|
|
33
|
+
}
|
|
34
|
+
return String(date.getFullYear()).padStart(4, "0") + "-" + String(date.getMonth() + 1).padStart(2, "0") + "-" + String(date.getDate()).padStart(2, "0");
|
|
35
|
+
};
|
|
36
|
+
const toLocaleTimeStringWithoutSeconds = (date) => {
|
|
37
|
+
if (!Boolean(date)) {
|
|
38
|
+
return void 0;
|
|
39
|
+
}
|
|
40
|
+
return date.toLocaleTimeString(window.navigator.language).replace(/:[0-9]{2}(?: |$)/, "");
|
|
41
|
+
};
|
|
42
|
+
const toLocaleDateString = (date) => {
|
|
43
|
+
if (!Boolean(date)) {
|
|
44
|
+
return void 0;
|
|
45
|
+
}
|
|
46
|
+
return date.toLocaleDateString(window.navigator.language);
|
|
47
|
+
};
|
|
48
|
+
const toLocaleStringWithoutSeconds = (date) => {
|
|
49
|
+
if (!Boolean(date)) {
|
|
50
|
+
return void 0;
|
|
51
|
+
}
|
|
52
|
+
return `${toLocaleDateString(date)} ${toLocaleTimeStringWithoutSeconds(date)}`;
|
|
53
|
+
};
|
|
54
|
+
const currentHour = () => {
|
|
55
|
+
const now = /* @__PURE__ */ new Date();
|
|
56
|
+
return new Date(
|
|
57
|
+
now.getFullYear(),
|
|
58
|
+
now.getMonth(),
|
|
59
|
+
now.getDate(),
|
|
60
|
+
now.getHours()
|
|
61
|
+
);
|
|
62
|
+
};
|
|
63
|
+
const nextHours = (from, hours, history) => {
|
|
64
|
+
return new Date(
|
|
65
|
+
from.getFullYear(),
|
|
66
|
+
from.getMonth(),
|
|
67
|
+
from.getDate(),
|
|
68
|
+
from.getHours() + hours * (history ? -1 : 1)
|
|
69
|
+
);
|
|
70
|
+
};
|
|
71
|
+
const hoursBetween = (from, to) => {
|
|
72
|
+
const result = [];
|
|
73
|
+
let current = new Date(
|
|
74
|
+
from.getFullYear(),
|
|
75
|
+
from.getMonth(),
|
|
76
|
+
from.getDate(),
|
|
77
|
+
from.getHours()
|
|
78
|
+
);
|
|
79
|
+
if (current.getTime() < from.getTime()) {
|
|
80
|
+
current = new Date(current.getTime() + 36e5);
|
|
81
|
+
}
|
|
82
|
+
while (current.getTime() < to.getTime()) {
|
|
83
|
+
result.push(current);
|
|
84
|
+
current = new Date(current.getTime() + 36e5);
|
|
85
|
+
}
|
|
86
|
+
return result;
|
|
87
|
+
};
|
|
88
|
+
const numberOfHoursBetween = (from, to) => {
|
|
89
|
+
return Math.abs(from.getTime() - to.getTime()) / 36e5;
|
|
90
|
+
};
|
|
91
|
+
const timeAsString = (date) => {
|
|
92
|
+
return String(date.getHours()).padStart(2, "0") + ":" + String(date.getMinutes()).padStart(2, "0");
|
|
93
|
+
};
|
|
94
|
+
export {
|
|
95
|
+
currentHour,
|
|
96
|
+
hoursBetween,
|
|
97
|
+
isValidLocalDate,
|
|
98
|
+
nextHours,
|
|
99
|
+
numberOfHoursBetween,
|
|
100
|
+
parseLocalDate,
|
|
101
|
+
parseLocalDateToIsoString,
|
|
102
|
+
timeAsString,
|
|
103
|
+
toLocalDateString,
|
|
104
|
+
toLocaleDateString,
|
|
105
|
+
toLocaleStringWithoutSeconds,
|
|
106
|
+
toLocaleTimeStringWithoutSeconds
|
|
107
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vanillabp/bc-shared",
|
|
3
|
+
"version": "0.0.3",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "https://github.com/vanillabp/business-cockpit.git"
|
|
7
|
+
},
|
|
8
|
+
"homepage": "https://github.com/vanillabp/business-cockpit",
|
|
9
|
+
"sideEffects": false,
|
|
10
|
+
"type": "module",
|
|
11
|
+
"main": "dist/index.js",
|
|
12
|
+
"module": "dist/index.js",
|
|
13
|
+
"types": "dist/index.d.ts",
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"package.json"
|
|
17
|
+
],
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@microsoft/fetch-event-source": "2.0.1",
|
|
20
|
+
"@vanillabp/bc-official-gui-client": "0.0.3",
|
|
21
|
+
"react-cookie": "4.1.1",
|
|
22
|
+
"usehooks-ts": "2.7.1"
|
|
23
|
+
},
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"@fontsource/roboto": "4.5.8",
|
|
26
|
+
"grommet": "2.33.2",
|
|
27
|
+
"grommet-icons": "4.10.0",
|
|
28
|
+
"react": "18.2.0",
|
|
29
|
+
"react-dom": "18.2.0",
|
|
30
|
+
"react-jsx": "1.0.0",
|
|
31
|
+
"styled-components": "5.3.3"
|
|
32
|
+
},
|
|
33
|
+
"optionalDependencies": {
|
|
34
|
+
"i18next": "22.0.3",
|
|
35
|
+
"react-i18next": "12.0.0"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@babel/preset-env": "7.21.4",
|
|
39
|
+
"@babel/preset-react": "7.18.6",
|
|
40
|
+
"@babel/preset-typescript": "7.21.4",
|
|
41
|
+
"@storybook/addon-essentials": "7.0.6",
|
|
42
|
+
"@storybook/addon-interactions": "7.0.6",
|
|
43
|
+
"@storybook/addon-links": "7.0.6",
|
|
44
|
+
"@storybook/blocks": "7.0.6",
|
|
45
|
+
"@storybook/react": "7.0.6",
|
|
46
|
+
"@storybook/react-webpack5": "7.0.6",
|
|
47
|
+
"@storybook/testing-library": "0.0.14-next.2",
|
|
48
|
+
"@types/jest": "^29.5.11",
|
|
49
|
+
"@types/node": "16.18.23",
|
|
50
|
+
"@types/react": "18.0.21",
|
|
51
|
+
"@types/react-dom": "18.0.6",
|
|
52
|
+
"@types/styled-components": "5.1.24",
|
|
53
|
+
"@types/web": "0.0.61",
|
|
54
|
+
"cross-env": "7.0.3",
|
|
55
|
+
"http-proxy-middleware": "2.0.6",
|
|
56
|
+
"jest": "^29.7.0",
|
|
57
|
+
"prop-types": "15.8.1",
|
|
58
|
+
"react": "18.2.0",
|
|
59
|
+
"react-dom": "18.2.0",
|
|
60
|
+
"storybook": "7.0.6",
|
|
61
|
+
"ts-jest": "^29.1.1",
|
|
62
|
+
"tsup": "6.7.0",
|
|
63
|
+
"typescript": "4.8.4"
|
|
64
|
+
},
|
|
65
|
+
"scripts": {
|
|
66
|
+
"storybook": "echo 'Run with sudo on Linux for HMR!' && storybook dev -p 6006",
|
|
67
|
+
"build-storybook": "storybook build",
|
|
68
|
+
"start": "tsup --watch",
|
|
69
|
+
"build": "tsup",
|
|
70
|
+
"test": "jest",
|
|
71
|
+
"unpublish:snapshot": "npm unpublish --force",
|
|
72
|
+
"publish:snapshot": "npm publish --tag snapshot",
|
|
73
|
+
"version:snapshot": "npm version ${npm_config_newversion} --no-git-tag-version",
|
|
74
|
+
"publish:release": "npm publish --access public"
|
|
75
|
+
}
|
|
76
|
+
}
|