@yangsaiyam/helper 1.11.3 → 1.11.5

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.
Files changed (111) hide show
  1. package/dist/addressess/index.d.ts +137 -0
  2. package/dist/addressess/index.js +24 -0
  3. package/dist/addressess/index.test.d.ts +1 -0
  4. package/dist/addressess/index.test.js +16 -0
  5. package/dist/assessment-question/index.d.ts +19 -0
  6. package/dist/assessment-question/index.js +22 -0
  7. package/dist/assessment-question/index.test.d.ts +1 -0
  8. package/dist/assessment-question/index.test.js +27 -0
  9. package/dist/career/index.d.ts +132 -0
  10. package/dist/career/index.js +40 -0
  11. package/dist/contact-form/index.d.ts +13 -0
  12. package/dist/contact-form/index.js +13 -0
  13. package/dist/email-template/index.d.ts +13 -0
  14. package/dist/email-template/index.js +5 -0
  15. package/dist/files/index.d.ts +18 -0
  16. package/dist/files/index.js +8 -0
  17. package/dist/index.d.ts +16 -0
  18. package/dist/index.js +16 -0
  19. package/dist/job-applications/index.d.ts +33 -0
  20. package/dist/job-applications/index.js +10 -0
  21. package/dist/locale/index.d.ts +9 -0
  22. package/dist/locale/index.js +4 -0
  23. package/dist/roles/index.d.ts +61 -0
  24. package/dist/roles/index.js +170 -0
  25. package/dist/roles/index.test.d.ts +1 -0
  26. package/dist/roles/index.test.js +80 -0
  27. package/dist/routes/index.d.ts +80 -0
  28. package/dist/routes/index.js +106 -0
  29. package/dist/routes/index.test.d.ts +1 -0
  30. package/dist/routes/index.test.js +92 -0
  31. package/dist/shared/helpers.d.ts +5 -0
  32. package/dist/shared/helpers.js +15 -0
  33. package/dist/shared/types.d.ts +5 -0
  34. package/dist/shared/types.js +1 -0
  35. package/dist/src/addressess/index.d.ts +137 -0
  36. package/dist/src/addressess/index.js +24 -0
  37. package/dist/src/addressess/index.test.d.ts +1 -0
  38. package/dist/src/addressess/index.test.js +16 -0
  39. package/dist/src/assessment-question/index.d.ts +19 -0
  40. package/dist/src/assessment-question/index.js +22 -0
  41. package/dist/src/assessment-question/index.test.d.ts +1 -0
  42. package/dist/src/assessment-question/index.test.js +27 -0
  43. package/dist/src/career/index.d.ts +132 -0
  44. package/dist/src/career/index.js +40 -0
  45. package/dist/src/contact-form/index.d.ts +13 -0
  46. package/dist/src/contact-form/index.js +13 -0
  47. package/dist/src/email-template/index.d.ts +13 -0
  48. package/dist/src/email-template/index.js +5 -0
  49. package/dist/src/files/index.d.ts +18 -0
  50. package/dist/src/files/index.js +8 -0
  51. package/dist/src/index.d.ts +16 -0
  52. package/dist/src/index.js +16 -0
  53. package/dist/src/job-applications/index.d.ts +33 -0
  54. package/dist/src/job-applications/index.js +10 -0
  55. package/dist/src/locale/index.d.ts +9 -0
  56. package/dist/src/locale/index.js +4 -0
  57. package/dist/src/roles/index.d.ts +61 -0
  58. package/dist/src/roles/index.js +170 -0
  59. package/dist/src/roles/index.test.d.ts +1 -0
  60. package/dist/src/roles/index.test.js +80 -0
  61. package/dist/src/routes/index.d.ts +80 -0
  62. package/dist/src/routes/index.js +106 -0
  63. package/dist/src/routes/index.test.d.ts +1 -0
  64. package/dist/src/routes/index.test.js +92 -0
  65. package/dist/src/shared/helpers.d.ts +5 -0
  66. package/dist/src/shared/helpers.js +15 -0
  67. package/dist/src/shared/types.d.ts +5 -0
  68. package/dist/src/shared/types.js +1 -0
  69. package/dist/src/time/index.d.ts +73 -0
  70. package/dist/src/time/index.js +161 -0
  71. package/dist/src/time/index.test.d.ts +1 -0
  72. package/dist/src/time/index.test.js +35 -0
  73. package/dist/src/track/index.d.ts +17 -0
  74. package/dist/src/track/index.js +14 -0
  75. package/dist/src/track/index.test.d.ts +1 -0
  76. package/dist/src/track/index.test.js +7 -0
  77. package/dist/src/url-prefix/index.d.ts +8 -0
  78. package/dist/src/url-prefix/index.js +9 -0
  79. package/dist/src/website/index.d.ts +16 -0
  80. package/dist/src/website/index.js +17 -0
  81. package/dist/time/index.d.ts +73 -0
  82. package/dist/time/index.js +161 -0
  83. package/dist/time/index.test.d.ts +1 -0
  84. package/dist/time/index.test.js +35 -0
  85. package/dist/track/index.d.ts +17 -0
  86. package/dist/track/index.js +14 -0
  87. package/dist/track/index.test.d.ts +1 -0
  88. package/dist/track/index.test.js +7 -0
  89. package/dist/url-prefix/index.d.ts +8 -0
  90. package/dist/url-prefix/index.js +9 -0
  91. package/dist/website/index.d.ts +16 -0
  92. package/dist/website/index.js +17 -0
  93. package/package.json +2 -1
  94. package/src/addressess/index.test.ts +1 -1
  95. package/src/addressess/index.ts +1 -1
  96. package/src/assessment-question/index.test.ts +2 -2
  97. package/src/assessment-question/index.ts +1 -1
  98. package/src/career/index.ts +2 -2
  99. package/src/contact-form/index.ts +1 -1
  100. package/src/files/index.ts +1 -1
  101. package/src/index.ts +16 -17
  102. package/src/locale/index.ts +1 -1
  103. package/src/roles/index.test.ts +1 -1
  104. package/src/roles/index.ts +1 -1
  105. package/src/routes/index.test.ts +1 -1
  106. package/src/shared/helpers.ts +1 -1
  107. package/src/time/index.test.ts +1 -1
  108. package/src/time/index.ts +1 -1
  109. package/src/track/index.test.ts +1 -1
  110. package/src/track/index.ts +1 -1
  111. package/src/url-prefix/index.ts +1 -1
@@ -0,0 +1,17 @@
1
+ export var Website;
2
+ (function (Website) {
3
+ Website[Website["KORRE"] = 1] = "KORRE";
4
+ Website[Website["KORRE_LABS"] = 2] = "KORRE_LABS";
5
+ })(Website || (Website = {}));
6
+ export const WEBSITES = {
7
+ [Website.KORRE]: {
8
+ id: Website.KORRE,
9
+ name: "Korre Evolution",
10
+ url: "https://public.korre.site/images/korre-evo.png",
11
+ },
12
+ [Website.KORRE_LABS]: {
13
+ id: Website.KORRE_LABS,
14
+ name: "Korre Labs",
15
+ url: "https://public.korre.site/images/korre-labs.png",
16
+ },
17
+ };
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@yangsaiyam/helper",
3
- "version": "1.11.3",
3
+ "version": "1.11.5",
4
+ "type": "module",
4
5
  "main": "./dist/index.js",
5
6
  "types": "./dist/index.d.ts",
6
7
  "exports": {
@@ -1,6 +1,6 @@
1
1
  import assert from "node:assert/strict";
2
2
 
3
- import { COUNTRY_CODE, MALAYSIA_STATE } from "./index";
3
+ import { COUNTRY_CODE, MALAYSIA_STATE } from "./index.js";
4
4
 
5
5
  assert.deepEqual(COUNTRY_CODE, [
6
6
  { key: 1, value: "MY", i18nKey: "country.code.1" },
@@ -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 COUNTRY_CODE = [
4
4
  { key: 1, value: "MY", i18nKey: "country.code.1" },
@@ -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
  {
@@ -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 QuestionType = {
4
4
  Subjective: 1,
@@ -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[];
@@ -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 CONTACT_FORM_ENQUIRY_TYPE = [
4
4
  {
@@ -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 FILE_STATUS = [
4
4
  { key: 1, value: "pending", i18nKey: "files.status.1" },
package/src/index.ts CHANGED
@@ -1,17 +1,16 @@
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";
@@ -1,4 +1,4 @@
1
- import { MappingOption } from "../shared/types";
1
+ import { MappingOption } from "../shared/types.js";
2
2
 
3
3
  export const LOCALE = [
4
4
  { key: 1, value: "en", i18nKey: "locale.en" },
@@ -10,7 +10,7 @@ import {
10
10
  permissionLabelKey,
11
11
  roleLabelKey,
12
12
  roleToId,
13
- } from "./index";
13
+ } from "./index.js";
14
14
 
15
15
  assert.equal(normalizeRole(0), "super-admin");
16
16
  assert.equal(normalizeRole("admin"), "admin");
@@ -1,4 +1,4 @@
1
- import type { MappingOption } from "../shared/types";
1
+ import type { MappingOption } from "../shared/types.js";
2
2
 
3
3
  export type CanonicalRole =
4
4
  | "super-admin"
@@ -7,7 +7,7 @@ import {
7
7
  buildLocalizedRoute,
8
8
  routeLabelKey,
9
9
  routePathKey,
10
- } from "./index";
10
+ } from "./index.js";
11
11
 
12
12
  assert.deepEqual(ROUTES, [
13
13
  {
@@ -1,4 +1,4 @@
1
- import type { MappingOption } from "./types";
1
+ import type { MappingOption } from "./types.js";
2
2
 
3
3
  export function getOptionByKey<T extends MappingOption>(
4
4
  options: readonly T[],
@@ -8,7 +8,7 @@ import {
8
8
  normalizeTimezone,
9
9
  timezoneLabelKey,
10
10
  timezoneToUtc,
11
- } from "./index";
11
+ } from "./index.js";
12
12
 
13
13
  assert.equal(normalizeTimezone("UTC"), "UTC");
14
14
  assert.equal(normalizeTimezone("utc"), "UTC");
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);
@@ -1,6 +1,6 @@
1
1
  import assert from "node:assert/strict";
2
2
 
3
- import { ORIGIN } from "./index";
3
+ import { ORIGIN } from "./index.js";
4
4
 
5
5
  assert.deepEqual(ORIGIN[0], {
6
6
  key: 0,
@@ -1,4 +1,4 @@
1
- import { MappingOption } from "../shared/types";
1
+ import { MappingOption } from "../shared/types.js";
2
2
 
3
3
  export const ORIGIN = [
4
4
  {
@@ -1,4 +1,4 @@
1
- import { Website } from "../website";
1
+ import { Website } from "../website/index.js";
2
2
 
3
3
  export const URL_PREFIXES = {
4
4
  [Website.KORRE]: {