@trackunit/shared-utils 0.0.57 → 0.0.59-alpha-26d41cfe4c9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs.js +31 -13
- package/index.esm.js +30 -13
- package/package.json +2 -2
- package/src/DateTimeFormat.d.ts +33 -14
package/index.cjs.js
CHANGED
|
@@ -10,19 +10,36 @@ exports.HoursAndMinutesFormat = void 0;
|
|
|
10
10
|
HoursAndMinutesFormat["HOURS_MIN"] = "HOURS_MIN";
|
|
11
11
|
HoursAndMinutesFormat["HOURS_LONG"] = "HOURS_LONG";
|
|
12
12
|
})(exports.HoursAndMinutesFormat || (exports.HoursAndMinutesFormat = {}));
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
13
|
+
const DateTimeFormat = {
|
|
14
|
+
DATE: {
|
|
15
|
+
selectFormat: "dateOnly",
|
|
16
|
+
dateFormat: "short",
|
|
17
|
+
},
|
|
18
|
+
DATE_LONG: {
|
|
19
|
+
selectFormat: "dateOnly",
|
|
20
|
+
dateFormat: "long",
|
|
21
|
+
},
|
|
22
|
+
DATE_LONG_TIME: {
|
|
23
|
+
dateFormat: "long",
|
|
24
|
+
timeFormat: "short",
|
|
25
|
+
},
|
|
26
|
+
DATE_SHORT: {
|
|
27
|
+
selectFormat: "dateOnly",
|
|
28
|
+
dateFormat: "medium",
|
|
29
|
+
},
|
|
30
|
+
DATE_SHORT_TIME: {
|
|
31
|
+
dateFormat: "medium",
|
|
32
|
+
timeFormat: "short",
|
|
33
|
+
},
|
|
34
|
+
TIME_SHORT: {
|
|
35
|
+
selectFormat: "timeOnly",
|
|
36
|
+
timeFormat: "short",
|
|
37
|
+
},
|
|
38
|
+
TIME_LONG: {
|
|
39
|
+
selectFormat: "timeOnly",
|
|
40
|
+
timeFormat: "medium",
|
|
41
|
+
},
|
|
42
|
+
};
|
|
26
43
|
|
|
27
44
|
/**
|
|
28
45
|
* @description Converts a date to a string in ISO format.
|
|
@@ -1064,6 +1081,7 @@ const isSorted = (sortInput) => {
|
|
|
1064
1081
|
return originalKeys.every((key, index) => key === sortedKeys[index]);
|
|
1065
1082
|
};
|
|
1066
1083
|
|
|
1084
|
+
exports.DateTimeFormat = DateTimeFormat;
|
|
1067
1085
|
exports.align = align;
|
|
1068
1086
|
exports.alphabeticallySort = alphabeticallySort;
|
|
1069
1087
|
exports.arrayLengthCompare = arrayLengthCompare;
|
package/index.esm.js
CHANGED
|
@@ -6,19 +6,36 @@ var HoursAndMinutesFormat;
|
|
|
6
6
|
HoursAndMinutesFormat["HOURS_MIN"] = "HOURS_MIN";
|
|
7
7
|
HoursAndMinutesFormat["HOURS_LONG"] = "HOURS_LONG";
|
|
8
8
|
})(HoursAndMinutesFormat || (HoursAndMinutesFormat = {}));
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
9
|
+
const DateTimeFormat = {
|
|
10
|
+
DATE: {
|
|
11
|
+
selectFormat: "dateOnly",
|
|
12
|
+
dateFormat: "short",
|
|
13
|
+
},
|
|
14
|
+
DATE_LONG: {
|
|
15
|
+
selectFormat: "dateOnly",
|
|
16
|
+
dateFormat: "long",
|
|
17
|
+
},
|
|
18
|
+
DATE_LONG_TIME: {
|
|
19
|
+
dateFormat: "long",
|
|
20
|
+
timeFormat: "short",
|
|
21
|
+
},
|
|
22
|
+
DATE_SHORT: {
|
|
23
|
+
selectFormat: "dateOnly",
|
|
24
|
+
dateFormat: "medium",
|
|
25
|
+
},
|
|
26
|
+
DATE_SHORT_TIME: {
|
|
27
|
+
dateFormat: "medium",
|
|
28
|
+
timeFormat: "short",
|
|
29
|
+
},
|
|
30
|
+
TIME_SHORT: {
|
|
31
|
+
selectFormat: "timeOnly",
|
|
32
|
+
timeFormat: "short",
|
|
33
|
+
},
|
|
34
|
+
TIME_LONG: {
|
|
35
|
+
selectFormat: "timeOnly",
|
|
36
|
+
timeFormat: "medium",
|
|
37
|
+
},
|
|
38
|
+
};
|
|
22
39
|
|
|
23
40
|
/**
|
|
24
41
|
* @description Converts a date to a string in ISO format.
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/shared-utils",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.59-alpha-26d41cfe4c9.0",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
7
|
-
"node": ">=
|
|
7
|
+
"node": ">=20.x"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {},
|
|
10
10
|
"module": "./index.esm.js",
|
package/src/DateTimeFormat.d.ts
CHANGED
|
@@ -5,17 +5,36 @@ export declare enum HoursAndMinutesFormat {
|
|
|
5
5
|
HOURS_MIN = "HOURS_MIN",// h[h] m[m]
|
|
6
6
|
HOURS_LONG = "HOURS_LONG"
|
|
7
7
|
}
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
8
|
+
export declare const DateTimeFormat: {
|
|
9
|
+
readonly DATE: {
|
|
10
|
+
readonly selectFormat: "dateOnly";
|
|
11
|
+
readonly dateFormat: "short";
|
|
12
|
+
};
|
|
13
|
+
readonly DATE_LONG: {
|
|
14
|
+
readonly selectFormat: "dateOnly";
|
|
15
|
+
readonly dateFormat: "long";
|
|
16
|
+
};
|
|
17
|
+
readonly DATE_LONG_TIME: {
|
|
18
|
+
readonly dateFormat: "long";
|
|
19
|
+
readonly timeFormat: "short";
|
|
20
|
+
};
|
|
21
|
+
readonly DATE_SHORT: {
|
|
22
|
+
readonly selectFormat: "dateOnly";
|
|
23
|
+
readonly dateFormat: "medium";
|
|
24
|
+
};
|
|
25
|
+
readonly DATE_SHORT_TIME: {
|
|
26
|
+
readonly dateFormat: "medium";
|
|
27
|
+
readonly timeFormat: "short";
|
|
28
|
+
};
|
|
29
|
+
readonly TIME_SHORT: {
|
|
30
|
+
readonly selectFormat: "timeOnly";
|
|
31
|
+
readonly timeFormat: "short";
|
|
32
|
+
};
|
|
33
|
+
readonly TIME_LONG: {
|
|
34
|
+
readonly selectFormat: "timeOnly";
|
|
35
|
+
readonly timeFormat: "medium";
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
type DateTimeFormatKey = keyof typeof DateTimeFormat;
|
|
39
|
+
export type DateTimeFormatType = (typeof DateTimeFormat)[DateTimeFormatKey];
|
|
40
|
+
export {};
|