taengmo-web-utilities 1.0.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/README.md +1 -0
- package/dist/constants/index.d.ts +6 -0
- package/dist/constants/index.js +6 -0
- package/dist/constants/isoCountryCode.d.ts +3 -0
- package/dist/constants/isoCountryCode.js +2244 -0
- package/dist/constants/isoCurrencyCode.d.ts +3 -0
- package/dist/constants/isoCurrencyCode.js +1011 -0
- package/dist/constants/isoLanguageCode.d.ts +3 -0
- package/dist/constants/isoLanguageCode.js +958 -0
- package/dist/constants/legalEntitySize.d.ts +2 -0
- package/dist/constants/legalEntitySize.js +22 -0
- package/dist/constants/legalEntityTypes.d.ts +2 -0
- package/dist/constants/legalEntityTypes.js +18 -0
- package/dist/constants/sectors.d.ts +2 -0
- package/dist/constants/sectors.js +86 -0
- package/dist/constants/sex.d.ts +2 -0
- package/dist/constants/sex.js +14 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/dist/models/types.d.ts +193 -0
- package/dist/models/types.js +1 -0
- package/dist/uis/buttonsScale.d.ts +9 -0
- package/dist/uis/buttonsScale.js +35 -0
- package/dist/uis/cn.d.ts +2 -0
- package/dist/uis/cn.js +5 -0
- package/dist/uis/index.d.ts +2 -0
- package/dist/uis/index.js +2 -0
- package/dist/utilities/httpError.d.ts +4 -0
- package/dist/utilities/httpError.js +6 -0
- package/dist/utilities/index.d.ts +1 -0
- package/dist/utilities/index.js +1 -0
- package/package.json +40 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export const legalEntitySizeRaw = [
|
|
2
|
+
{
|
|
3
|
+
legal_entity_size_uuid: "019b8382-9534-71ae-81ae-b08c327085eb",
|
|
4
|
+
name: "Micro",
|
|
5
|
+
definition: "Fewer than 10 employees",
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
legal_entity_size_uuid: "019b8382-953b-7d1a-81f7-1397b36664ae",
|
|
9
|
+
name: "Small",
|
|
10
|
+
definition: "10-49 employees",
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
legal_entity_size_uuid: "019b8382-953b-7ed3-8a77-a2ca3bdc303a",
|
|
14
|
+
name: "Medium",
|
|
15
|
+
definition: "50-249 employees",
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
legal_entity_size_uuid: "019b8382-953b-7f68-ad56-e3871ac7eb65",
|
|
19
|
+
name: "Large",
|
|
20
|
+
definition: "250 or more employees",
|
|
21
|
+
},
|
|
22
|
+
];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export const legalEntityTypesRaw = [
|
|
2
|
+
{
|
|
3
|
+
legal_entity_types_uuid: "019b8385-604d-71a2-b024-b05f6f6e8a5e",
|
|
4
|
+
name: "Businesses (For-Profit Companies)",
|
|
5
|
+
},
|
|
6
|
+
{
|
|
7
|
+
legal_entity_types_uuid: "019b8385-604e-7a7d-9405-45d5ec37f0a6",
|
|
8
|
+
name: "Nonprofit Organizations (NPOs, NGOs)",
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
legal_entity_types_uuid: "019b8385-604e-7bb7-b144-793460ab9c8e",
|
|
12
|
+
name: "Government Agencies & Public Institutions",
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
legal_entity_types_uuid: "019b8385-604e-7c9c-8a43-7da70fadc99a",
|
|
16
|
+
name: "Individuals, Freelancers & Independent Contractors",
|
|
17
|
+
},
|
|
18
|
+
];
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
export const sectorsRaw = [
|
|
2
|
+
{
|
|
3
|
+
sectors_uuid: "019b83a5-16d4-71ba-8e18-127f29de3b24",
|
|
4
|
+
name: "Information Technology & Software",
|
|
5
|
+
},
|
|
6
|
+
{
|
|
7
|
+
sectors_uuid: "019b83a5-16d7-7192-8d11-3f33445943a2",
|
|
8
|
+
name: "Healthcare & Medical",
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
sectors_uuid: "019b83a5-16d7-721b-80fe-3f2927dbd062",
|
|
12
|
+
name: "Business, Finance & Legal",
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
sectors_uuid: "019b83a5-16d7-7286-ba34-04e5b9ff4729",
|
|
16
|
+
name: "Engineering & Manufacturing",
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
sectors_uuid: "019b83a5-16d7-72ed-a650-f75de99efabc",
|
|
20
|
+
name: "Education & Training",
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
sectors_uuid: "019b83a5-16d7-7350-9d28-f9d4211c55b9",
|
|
24
|
+
name: "Media, Design & Entertainment",
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
sectors_uuid: "019b83a5-16d7-73b8-8b19-4ebff00daf28",
|
|
28
|
+
name: "Sales, Retail & Customer Service",
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
sectors_uuid: "019b83a5-16d7-7420-be93-48fdd44e8133",
|
|
32
|
+
name: "Construction & Real Estate",
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
sectors_uuid: "019b83a5-16d7-7486-93fa-9f71738f4f7c",
|
|
36
|
+
name: "Hospitality, Travel & Tourism",
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
sectors_uuid: "019b83a5-16d7-74ed-9788-c11e1a2bc8b3",
|
|
40
|
+
name: "Logistics & Transportation",
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
sectors_uuid: "019b83a5-16d7-754f-8bcf-24e166b3419b",
|
|
44
|
+
name: "Government & Public Services",
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
sectors_uuid: "019b83a5-16d7-75db-b5fc-8c80265eef8f",
|
|
48
|
+
name: "Science, Research & Environmental",
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
sectors_uuid: "019b83a5-16d7-7642-8644-47743c25eef0",
|
|
52
|
+
name: "Energy & Utilities",
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
sectors_uuid: "019b83a5-16d7-76a6-a329-86cf7fe56f73",
|
|
56
|
+
name: "Recruiting & Staffing Agencies",
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
sectors_uuid: "019b83a5-16d7-770d-abc6-6962b059e7e6",
|
|
60
|
+
name: "Freelance, Remote & Gig Economy",
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
sectors_uuid: "019b83a5-16d7-7775-ba90-d835f48c4d76",
|
|
64
|
+
name: "Sports, Fitness & Recreation",
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
sectors_uuid: "019b83a5-16d7-77db-be34-ce1c247c39b2",
|
|
68
|
+
name: "Fashion, Beauty & Lifestyle",
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
sectors_uuid: "019b83a5-16d7-7843-b837-ed13ad4cd05c",
|
|
72
|
+
name: "Agriculture, Farming & Veterinary",
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
sectors_uuid: "019b83a5-16d7-78a4-9709-9c80082c1f18",
|
|
76
|
+
name: "Automotive & Mechanical Trades",
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
sectors_uuid: "019b83a5-16d7-790d-a0ce-e9b0e714afed",
|
|
80
|
+
name: "Handicrafts, Trades & Artisans",
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
sectors_uuid: "019b83a5-16d7-797d-bea1-2afaf9bf2f71",
|
|
84
|
+
name: "Others",
|
|
85
|
+
},
|
|
86
|
+
];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export const sexRaw = [
|
|
2
|
+
{
|
|
3
|
+
sex_uuid: "019b83ac-ce10-78de-ac51-a80f373773c0",
|
|
4
|
+
description: "Male",
|
|
5
|
+
},
|
|
6
|
+
{
|
|
7
|
+
sex_uuid: "019b83ac-ce11-74d7-b53d-f0eaed2ad604",
|
|
8
|
+
description: "Female",
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
sex_uuid: "019b83ac-ce11-755d-aad1-db11faae90b4",
|
|
12
|
+
description: "Prefer not to say",
|
|
13
|
+
},
|
|
14
|
+
];
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./types";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./types";
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
export type Email = {
|
|
2
|
+
email: string;
|
|
3
|
+
};
|
|
4
|
+
export type EmailPassword = Email & {
|
|
5
|
+
password: string;
|
|
6
|
+
};
|
|
7
|
+
export type PersonnelCredential = {
|
|
8
|
+
personnel_uuid: string;
|
|
9
|
+
employers_uuid: string;
|
|
10
|
+
access_token: string;
|
|
11
|
+
refresh_token: string;
|
|
12
|
+
is_admin: boolean;
|
|
13
|
+
};
|
|
14
|
+
export type PersonnelAuthen = Omit<PersonnelCredential, "refresh_token">;
|
|
15
|
+
export type DropdownSchema = {
|
|
16
|
+
label: string;
|
|
17
|
+
value: string;
|
|
18
|
+
};
|
|
19
|
+
export type LegalEntityTypes = {
|
|
20
|
+
legal_entity_types_uuid: string;
|
|
21
|
+
name: string;
|
|
22
|
+
};
|
|
23
|
+
export type IsoCountryCode = {
|
|
24
|
+
iso_country_code_uuid: string;
|
|
25
|
+
country: string;
|
|
26
|
+
alpha2: string;
|
|
27
|
+
alpha3: string;
|
|
28
|
+
numeric: number;
|
|
29
|
+
latitude: number;
|
|
30
|
+
longitude: number;
|
|
31
|
+
};
|
|
32
|
+
export type IsoCurrencyCode = {
|
|
33
|
+
iso_currency_code_uuid: string;
|
|
34
|
+
currency: string;
|
|
35
|
+
code: string;
|
|
36
|
+
number: number;
|
|
37
|
+
};
|
|
38
|
+
export type IsoLanguageCode = {
|
|
39
|
+
iso_language_code_uuid: string;
|
|
40
|
+
language: string;
|
|
41
|
+
code: string;
|
|
42
|
+
};
|
|
43
|
+
export type LegalEntitySize = {
|
|
44
|
+
legal_entity_size_uuid: string;
|
|
45
|
+
name: string;
|
|
46
|
+
definition: string;
|
|
47
|
+
};
|
|
48
|
+
export type CommonAuthen = {
|
|
49
|
+
verification_uuid: string;
|
|
50
|
+
reference: number;
|
|
51
|
+
code: number;
|
|
52
|
+
email: string;
|
|
53
|
+
password: string;
|
|
54
|
+
};
|
|
55
|
+
export type NewOrganizationAccount = CommonAuthen & {
|
|
56
|
+
primary_name: string;
|
|
57
|
+
position_title: string;
|
|
58
|
+
legal_entity_types_uuid: string;
|
|
59
|
+
iso_country_code_uuid: string;
|
|
60
|
+
iso_currency_code_uuid: string;
|
|
61
|
+
legal_entity_size_uuid: string;
|
|
62
|
+
};
|
|
63
|
+
export type NewPersonnelAccount = CommonAuthen & {
|
|
64
|
+
primary_name: string;
|
|
65
|
+
position_title: string;
|
|
66
|
+
employers_uuid: string;
|
|
67
|
+
};
|
|
68
|
+
export type PersonnelCreate = {
|
|
69
|
+
primary_name: string;
|
|
70
|
+
position_title: string;
|
|
71
|
+
};
|
|
72
|
+
export type Sex = {
|
|
73
|
+
sex_uuid: string;
|
|
74
|
+
description: string;
|
|
75
|
+
};
|
|
76
|
+
export type Employers = {
|
|
77
|
+
employers_uuid: string;
|
|
78
|
+
iso_country_code_uuid: string;
|
|
79
|
+
iso_currency_code_uuid: string;
|
|
80
|
+
legal_entity_types_uuid: string;
|
|
81
|
+
legal_entity_size_uuid: string;
|
|
82
|
+
founded_at: string | null;
|
|
83
|
+
profile_url: string | null;
|
|
84
|
+
cover_url: string | null;
|
|
85
|
+
about: string;
|
|
86
|
+
contact_info: string;
|
|
87
|
+
invoice_name: string;
|
|
88
|
+
invoice_address: string;
|
|
89
|
+
invoice_contact: string;
|
|
90
|
+
invoice_unique_id: string;
|
|
91
|
+
verified_at: string | null;
|
|
92
|
+
packages_uuid: string;
|
|
93
|
+
created_at: string;
|
|
94
|
+
updated_at: string;
|
|
95
|
+
is_active: boolean;
|
|
96
|
+
};
|
|
97
|
+
export type EmployersName = {
|
|
98
|
+
employers_name_uuid: string;
|
|
99
|
+
employers_uuid: string;
|
|
100
|
+
name: string;
|
|
101
|
+
is_primary: boolean;
|
|
102
|
+
created_at: string;
|
|
103
|
+
updated_at: string;
|
|
104
|
+
};
|
|
105
|
+
export type Personnel = {
|
|
106
|
+
personnel_uuid: string;
|
|
107
|
+
employers_uuid: string;
|
|
108
|
+
email: string;
|
|
109
|
+
is_admin: boolean;
|
|
110
|
+
primary_name: string;
|
|
111
|
+
position_title: string;
|
|
112
|
+
contact_info: string;
|
|
113
|
+
about: string;
|
|
114
|
+
profile_url: string | null;
|
|
115
|
+
is_active: boolean;
|
|
116
|
+
created_at: string;
|
|
117
|
+
updated_at: string;
|
|
118
|
+
latest_login: string;
|
|
119
|
+
};
|
|
120
|
+
export type PlainText = {
|
|
121
|
+
text: string;
|
|
122
|
+
};
|
|
123
|
+
export type PresignResponse = {
|
|
124
|
+
url: string;
|
|
125
|
+
key: string;
|
|
126
|
+
content_type: string;
|
|
127
|
+
expires_in: number;
|
|
128
|
+
};
|
|
129
|
+
export type Coordinate = {
|
|
130
|
+
latitude: number;
|
|
131
|
+
longitude: number;
|
|
132
|
+
};
|
|
133
|
+
export type EmployersLocations = {
|
|
134
|
+
employers_locations_uuid: string;
|
|
135
|
+
employers_uuid: string;
|
|
136
|
+
iso_country_code_uuid: string;
|
|
137
|
+
address: string;
|
|
138
|
+
latitude: number;
|
|
139
|
+
longitude: number;
|
|
140
|
+
created_at: string;
|
|
141
|
+
updated_at: string;
|
|
142
|
+
is_headquarters: boolean;
|
|
143
|
+
};
|
|
144
|
+
export type PhotoUrlStatus = {
|
|
145
|
+
url: string;
|
|
146
|
+
success: boolean;
|
|
147
|
+
};
|
|
148
|
+
export type ErrorWithStatus = {
|
|
149
|
+
message: string;
|
|
150
|
+
status: number;
|
|
151
|
+
};
|
|
152
|
+
export type Sectors = {
|
|
153
|
+
sectors_uuid: string;
|
|
154
|
+
name: string;
|
|
155
|
+
};
|
|
156
|
+
export type EmployersSectors = {
|
|
157
|
+
employers_sectors_uuid: string;
|
|
158
|
+
employers_uuid: string;
|
|
159
|
+
sectors_uuid: string;
|
|
160
|
+
created_at: string;
|
|
161
|
+
name: string;
|
|
162
|
+
};
|
|
163
|
+
export type EmployersSocialUrl = {
|
|
164
|
+
employers_social_url_uuid: string;
|
|
165
|
+
employers_uuid: string;
|
|
166
|
+
url: string;
|
|
167
|
+
label: string;
|
|
168
|
+
created_at: string;
|
|
169
|
+
updated_at: string;
|
|
170
|
+
};
|
|
171
|
+
export type EmployersBenefits = {
|
|
172
|
+
employers_benefits_uuid: string;
|
|
173
|
+
employers_uuid: string;
|
|
174
|
+
description: string;
|
|
175
|
+
created_at: string;
|
|
176
|
+
updated_at: string;
|
|
177
|
+
};
|
|
178
|
+
export type Packages = {
|
|
179
|
+
packages_uuid: string;
|
|
180
|
+
name: string;
|
|
181
|
+
description: string;
|
|
182
|
+
created_at: string;
|
|
183
|
+
updated_at: string;
|
|
184
|
+
};
|
|
185
|
+
export type PersonnelSocialUrl = {
|
|
186
|
+
personnel_social_url_uuid: string;
|
|
187
|
+
personnel_uuid: string;
|
|
188
|
+
employers_uuid: string;
|
|
189
|
+
url: string;
|
|
190
|
+
label: string;
|
|
191
|
+
created_at: string;
|
|
192
|
+
updated_at: string;
|
|
193
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const BUTTON_SIZE: {
|
|
2
|
+
readonly SMALL: "small";
|
|
3
|
+
readonly MEDIUM: "medium";
|
|
4
|
+
readonly LARGE: "large";
|
|
5
|
+
};
|
|
6
|
+
export type ButtonSize = (typeof BUTTON_SIZE)[keyof typeof BUTTON_SIZE];
|
|
7
|
+
export declare function buttonHeight(scale: ButtonSize): string;
|
|
8
|
+
export declare function buttonFontSize(scale: ButtonSize): string;
|
|
9
|
+
export declare function buttonIconSize(scale: ButtonSize): number;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export const BUTTON_SIZE = {
|
|
2
|
+
SMALL: "small",
|
|
3
|
+
MEDIUM: "medium",
|
|
4
|
+
LARGE: "large",
|
|
5
|
+
};
|
|
6
|
+
export function buttonHeight(scale) {
|
|
7
|
+
switch (scale) {
|
|
8
|
+
case BUTTON_SIZE.SMALL:
|
|
9
|
+
return "h-8";
|
|
10
|
+
case BUTTON_SIZE.MEDIUM:
|
|
11
|
+
return "h-10";
|
|
12
|
+
case BUTTON_SIZE.LARGE:
|
|
13
|
+
return "h-14";
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export function buttonFontSize(scale) {
|
|
17
|
+
switch (scale) {
|
|
18
|
+
case BUTTON_SIZE.SMALL:
|
|
19
|
+
return "text-[14px]";
|
|
20
|
+
case BUTTON_SIZE.MEDIUM:
|
|
21
|
+
return "text-[15px]";
|
|
22
|
+
case BUTTON_SIZE.LARGE:
|
|
23
|
+
return "text-[16px]";
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export function buttonIconSize(scale) {
|
|
27
|
+
switch (scale) {
|
|
28
|
+
case BUTTON_SIZE.SMALL:
|
|
29
|
+
return 16;
|
|
30
|
+
case BUTTON_SIZE.MEDIUM:
|
|
31
|
+
return 20;
|
|
32
|
+
case BUTTON_SIZE.LARGE:
|
|
33
|
+
return 24;
|
|
34
|
+
}
|
|
35
|
+
}
|
package/dist/uis/cn.d.ts
ADDED
package/dist/uis/cn.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./httpError";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./httpError";
|
package/package.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "taengmo-web-utilities",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Utility for taengmo-web (TypeScript)",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"taengmo"
|
|
7
|
+
],
|
|
8
|
+
"type": "module",
|
|
9
|
+
"author": "",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"main": "dist/index.js",
|
|
12
|
+
"types": "dist/index.d.ts",
|
|
13
|
+
"sideEffects": false,
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"default": "./dist/index.js"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "tsc",
|
|
25
|
+
"prepare": "npm run build",
|
|
26
|
+
"clean": "rm -rf dist",
|
|
27
|
+
"dev": "tsc -w"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@types/node": "^25.5.0",
|
|
31
|
+
"typescript": "^6.0.2"
|
|
32
|
+
},
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">=18"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"clsx": "^2.1.1",
|
|
38
|
+
"tailwind-merge": "^3.5.0"
|
|
39
|
+
}
|
|
40
|
+
}
|