@yangsaiyam/helper 1.11.4 → 1.12.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/dist/addressess/index.test.js +1 -1
- package/dist/assessment-question/index.test.js +2 -2
- package/dist/email-history/index.d.ts +17 -0
- package/dist/email-history/index.js +6 -0
- package/dist/index.d.ts +17 -16
- package/dist/index.js +17 -16
- package/dist/roles/index.test.js +1 -1
- package/dist/routes/index.test.js +1 -1
- package/dist/shared/helpers.d.ts +1 -1
- package/dist/time/index.test.js +1 -1
- package/dist/track/index.test.js +1 -1
- package/dist/url-prefix/index.js +1 -1
- package/package.json +2 -1
- package/src/addressess/index.test.ts +1 -1
- package/src/addressess/index.ts +1 -1
- package/src/assessment-question/index.test.ts +2 -2
- package/src/assessment-question/index.ts +1 -1
- package/src/career/index.ts +2 -2
- package/src/contact-form/index.ts +1 -1
- package/src/email-history/index.ts +6 -0
- package/src/files/index.ts +1 -1
- package/src/index.ts +17 -17
- package/src/locale/index.ts +1 -1
- package/src/roles/index.test.ts +1 -1
- package/src/roles/index.ts +1 -1
- package/src/routes/index.test.ts +1 -1
- package/src/shared/helpers.ts +1 -1
- package/src/time/index.test.ts +1 -1
- package/src/time/index.ts +1 -1
- package/src/track/index.test.ts +1 -1
- package/src/track/index.ts +1 -1
- package/src/url-prefix/index.ts +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import assert from "node:assert/strict";
|
|
2
|
-
import { ASSESSMENT_QUESTION_TYPE, QuestionType, } from "./index";
|
|
3
|
-
import { getI18nKeyByKey, getLabelByKey, getOptionByKey } from "../shared/helpers";
|
|
2
|
+
import { ASSESSMENT_QUESTION_TYPE, QuestionType, } from "./index.js";
|
|
3
|
+
import { getI18nKeyByKey, getLabelByKey, getOptionByKey } from "../shared/helpers.js";
|
|
4
4
|
assert.deepEqual(ASSESSMENT_QUESTION_TYPE, [
|
|
5
5
|
{
|
|
6
6
|
key: QuestionType.Subjective,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const EMAIL_HISTORY_STATUS: readonly [{
|
|
2
|
+
readonly key: 0;
|
|
3
|
+
readonly value: "Scheduled";
|
|
4
|
+
readonly i18nKey: "emailHistory.status.0";
|
|
5
|
+
}, {
|
|
6
|
+
readonly key: 1;
|
|
7
|
+
readonly value: "Delivering";
|
|
8
|
+
readonly i18nKey: "emailHistory.status.1";
|
|
9
|
+
}, {
|
|
10
|
+
readonly key: 2;
|
|
11
|
+
readonly value: "Sent";
|
|
12
|
+
readonly i18nKey: "emailHistory.status.2";
|
|
13
|
+
}, {
|
|
14
|
+
readonly key: 3;
|
|
15
|
+
readonly value: "Failed";
|
|
16
|
+
readonly i18nKey: "emailHistory.status.3";
|
|
17
|
+
}];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export const EMAIL_HISTORY_STATUS = [
|
|
2
|
+
{ key: 0, value: "Scheduled", i18nKey: "emailHistory.status.0" },
|
|
3
|
+
{ key: 1, value: "Delivering", i18nKey: "emailHistory.status.1" },
|
|
4
|
+
{ key: 2, value: "Sent", i18nKey: "emailHistory.status.2" },
|
|
5
|
+
{ key: 3, value: "Failed", i18nKey: "emailHistory.status.3" },
|
|
6
|
+
];
|
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
export * from "./assessment-question/index";
|
|
2
|
-
export * from "./career/index";
|
|
3
|
-
export * from "./contact-form/index";
|
|
4
|
-
export * from "./files/index";
|
|
5
|
-
export * from "./locale/index";
|
|
6
|
-
export * from "./roles/index";
|
|
7
|
-
export * from "./routes/index";
|
|
8
|
-
export * from "./shared/helpers";
|
|
9
|
-
export * from "./shared/types";
|
|
10
|
-
export * from "./time/index";
|
|
11
|
-
export * from "./track/index";
|
|
12
|
-
export * from "./url-prefix/index";
|
|
13
|
-
export * from "./website/index";
|
|
14
|
-
export * from "./addressess/index";
|
|
15
|
-
export * from "./job-applications/index";
|
|
16
|
-
export * from "./email-template/index";
|
|
1
|
+
export * from "./assessment-question/index.js";
|
|
2
|
+
export * from "./career/index.js";
|
|
3
|
+
export * from "./contact-form/index.js";
|
|
4
|
+
export * from "./files/index.js";
|
|
5
|
+
export * from "./locale/index.js";
|
|
6
|
+
export * from "./roles/index.js";
|
|
7
|
+
export * from "./routes/index.js";
|
|
8
|
+
export * from "./shared/helpers.js";
|
|
9
|
+
export * from "./shared/types.js";
|
|
10
|
+
export * from "./time/index.js";
|
|
11
|
+
export * from "./track/index.js";
|
|
12
|
+
export * from "./url-prefix/index.js";
|
|
13
|
+
export * from "./website/index.js";
|
|
14
|
+
export * from "./addressess/index.js";
|
|
15
|
+
export * from "./job-applications/index.js";
|
|
16
|
+
export * from "./email-template/index.js";
|
|
17
|
+
export * from "./email-history/index.js";
|
package/dist/index.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
export * from "./assessment-question/index";
|
|
2
|
-
export * from "./career/index";
|
|
3
|
-
export * from "./contact-form/index";
|
|
4
|
-
export * from "./files/index";
|
|
5
|
-
export * from "./locale/index";
|
|
6
|
-
export * from "./roles/index";
|
|
7
|
-
export * from "./routes/index";
|
|
8
|
-
export * from "./shared/helpers";
|
|
9
|
-
export * from "./shared/types";
|
|
10
|
-
export * from "./time/index";
|
|
11
|
-
export * from "./track/index";
|
|
12
|
-
export * from "./url-prefix/index";
|
|
13
|
-
export * from "./website/index";
|
|
14
|
-
export * from "./addressess/index";
|
|
15
|
-
export * from "./job-applications/index";
|
|
16
|
-
export * from "./email-template/index";
|
|
1
|
+
export * from "./assessment-question/index.js";
|
|
2
|
+
export * from "./career/index.js";
|
|
3
|
+
export * from "./contact-form/index.js";
|
|
4
|
+
export * from "./files/index.js";
|
|
5
|
+
export * from "./locale/index.js";
|
|
6
|
+
export * from "./roles/index.js";
|
|
7
|
+
export * from "./routes/index.js";
|
|
8
|
+
export * from "./shared/helpers.js";
|
|
9
|
+
export * from "./shared/types.js";
|
|
10
|
+
export * from "./time/index.js";
|
|
11
|
+
export * from "./track/index.js";
|
|
12
|
+
export * from "./url-prefix/index.js";
|
|
13
|
+
export * from "./website/index.js";
|
|
14
|
+
export * from "./addressess/index.js";
|
|
15
|
+
export * from "./job-applications/index.js";
|
|
16
|
+
export * from "./email-template/index.js";
|
|
17
|
+
export * from "./email-history/index.js";
|
package/dist/roles/index.test.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import assert from "node:assert/strict";
|
|
2
|
-
import { PERMISSION_I18N_KEY, Permission, ROLE, ROLE_PERMISSIONS, hasPermission, normalizeRole, permissionLabelKey, roleLabelKey, roleToId, } from "./index";
|
|
2
|
+
import { PERMISSION_I18N_KEY, Permission, ROLE, ROLE_PERMISSIONS, hasPermission, normalizeRole, permissionLabelKey, roleLabelKey, roleToId, } from "./index.js";
|
|
3
3
|
assert.equal(normalizeRole(0), "super-admin");
|
|
4
4
|
assert.equal(normalizeRole("admin"), "admin");
|
|
5
5
|
assert.equal(normalizeRole(2), "staff");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import assert from "node:assert/strict";
|
|
2
|
-
import { ROUTE, ROUTES, buildRoutePathName, buildLocalizedRoute, routeLabelKey, routePathKey, } from "./index";
|
|
2
|
+
import { ROUTE, ROUTES, buildRoutePathName, buildLocalizedRoute, routeLabelKey, routePathKey, } from "./index.js";
|
|
3
3
|
assert.deepEqual(ROUTES, [
|
|
4
4
|
{
|
|
5
5
|
key: "home",
|
package/dist/shared/helpers.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MappingOption } from "./types";
|
|
1
|
+
import type { MappingOption } from "./types.js";
|
|
2
2
|
export declare function getOptionByKey<T extends MappingOption>(options: readonly T[], key?: number | null): T | undefined;
|
|
3
3
|
export declare function getLabelByKey<T extends MappingOption>(options: readonly T[], key?: number | null, fallback?: string): string;
|
|
4
4
|
export declare function getI18nKeyByKey<T extends MappingOption>(options: readonly T[], key?: number | null, fallback?: string): string;
|
package/dist/time/index.test.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import assert from "node:assert/strict";
|
|
2
|
-
import { convertTimestampToTimezone, TIMEZONE, TIMEZONE_CURRENT_UTC_OFFSET, TIMEZONE_TO_UTC, normalizeTimezone, timezoneLabelKey, timezoneToUtc, } from "./index";
|
|
2
|
+
import { convertTimestampToTimezone, TIMEZONE, TIMEZONE_CURRENT_UTC_OFFSET, TIMEZONE_TO_UTC, normalizeTimezone, timezoneLabelKey, timezoneToUtc, } from "./index.js";
|
|
3
3
|
assert.equal(normalizeTimezone("UTC"), "UTC");
|
|
4
4
|
assert.equal(normalizeTimezone("utc"), "UTC");
|
|
5
5
|
assert.equal(normalizeTimezone("Etc/UTC"), "UTC");
|
package/dist/track/index.test.js
CHANGED
package/dist/url-prefix/index.js
CHANGED
package/package.json
CHANGED
package/src/addressess/index.ts
CHANGED
|
@@ -3,8 +3,8 @@ import assert from "node:assert/strict";
|
|
|
3
3
|
import {
|
|
4
4
|
ASSESSMENT_QUESTION_TYPE,
|
|
5
5
|
QuestionType,
|
|
6
|
-
} from "./index";
|
|
7
|
-
import { getI18nKeyByKey, getLabelByKey, getOptionByKey } from "../shared/helpers";
|
|
6
|
+
} from "./index.js";
|
|
7
|
+
import { getI18nKeyByKey, getLabelByKey, getOptionByKey } from "../shared/helpers.js";
|
|
8
8
|
|
|
9
9
|
assert.deepEqual(ASSESSMENT_QUESTION_TYPE, [
|
|
10
10
|
{
|
package/src/career/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MappingOption } from "../shared/types";
|
|
1
|
+
import type { MappingOption } from "../shared/types.js";
|
|
2
2
|
|
|
3
3
|
export const CAREER_JOB_TYPE = [
|
|
4
4
|
{ key: 1, value: "Full-time", i18nKey: "career.jobType.1" },
|
|
@@ -42,4 +42,4 @@ export const CAREER_LOCATION = [
|
|
|
42
42
|
{ key: 13, value: "Melaka", i18nKey: "career.location.13" },
|
|
43
43
|
{ key: 14, value: "Putrajaya", i18nKey: "career.location.14" },
|
|
44
44
|
{ key: 15, value: "Labuan", i18nKey: "career.location.15" },
|
|
45
|
-
] as const satisfies readonly MappingOption[];
|
|
45
|
+
] as const satisfies readonly MappingOption[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export const EMAIL_HISTORY_STATUS = [
|
|
2
|
+
{ key: 0, value: "Scheduled", i18nKey: "emailHistory.status.0" },
|
|
3
|
+
{ key: 1, value: "Delivering", i18nKey: "emailHistory.status.1" },
|
|
4
|
+
{ key: 2, value: "Sent", i18nKey: "emailHistory.status.2" },
|
|
5
|
+
{ key: 3, value: "Failed", i18nKey: "emailHistory.status.3" },
|
|
6
|
+
] as const satisfies readonly { key: number; value: string; i18nKey: string }[];
|
package/src/files/index.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export * from "./assessment-question/index";
|
|
2
|
-
export * from "./career/index";
|
|
3
|
-
export * from "./contact-form/index";
|
|
4
|
-
export * from "./files/index";
|
|
5
|
-
export * from "./locale/index";
|
|
6
|
-
export * from "./roles/index";
|
|
7
|
-
export * from "./routes/index";
|
|
8
|
-
export * from "./shared/helpers";
|
|
9
|
-
export * from "./shared/types";
|
|
10
|
-
export * from "./time/index";
|
|
11
|
-
export * from "./track/index";
|
|
12
|
-
export * from "./url-prefix/index";
|
|
13
|
-
export * from "./website/index";
|
|
14
|
-
export * from "./addressess/index";
|
|
15
|
-
export * from "./job-applications/index";
|
|
16
|
-
export * from "./email-template/index";
|
|
17
|
-
|
|
1
|
+
export * from "./assessment-question/index.js";
|
|
2
|
+
export * from "./career/index.js";
|
|
3
|
+
export * from "./contact-form/index.js";
|
|
4
|
+
export * from "./files/index.js";
|
|
5
|
+
export * from "./locale/index.js";
|
|
6
|
+
export * from "./roles/index.js";
|
|
7
|
+
export * from "./routes/index.js";
|
|
8
|
+
export * from "./shared/helpers.js";
|
|
9
|
+
export * from "./shared/types.js";
|
|
10
|
+
export * from "./time/index.js";
|
|
11
|
+
export * from "./track/index.js";
|
|
12
|
+
export * from "./url-prefix/index.js";
|
|
13
|
+
export * from "./website/index.js";
|
|
14
|
+
export * from "./addressess/index.js";
|
|
15
|
+
export * from "./job-applications/index.js";
|
|
16
|
+
export * from "./email-template/index.js";
|
|
17
|
+
export * from "./email-history/index.js";
|
package/src/locale/index.ts
CHANGED
package/src/roles/index.test.ts
CHANGED
package/src/roles/index.ts
CHANGED
package/src/routes/index.test.ts
CHANGED
package/src/shared/helpers.ts
CHANGED
package/src/time/index.test.ts
CHANGED
package/src/time/index.ts
CHANGED
|
@@ -2,7 +2,7 @@ import dayjs from "dayjs";
|
|
|
2
2
|
import timezone from "dayjs/plugin/timezone.js";
|
|
3
3
|
import utc from "dayjs/plugin/utc.js";
|
|
4
4
|
|
|
5
|
-
import type { MappingOption } from "../shared/types";
|
|
5
|
+
import type { MappingOption } from "../shared/types.js";
|
|
6
6
|
|
|
7
7
|
dayjs.extend(utc);
|
|
8
8
|
dayjs.extend(timezone);
|
package/src/track/index.test.ts
CHANGED
package/src/track/index.ts
CHANGED
package/src/url-prefix/index.ts
CHANGED