@timardex/cluemart-shared 1.2.8 → 1.2.11
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/{auth-DNveddIQ.d.mts → ad-DIIPz6Cg.d.mts} +2 -51
- package/dist/{auth-Cp4zKr5d.d.ts → ad-iOu_E7DP.d.ts} +2 -51
- package/dist/auth-b59uXZAI.d.ts +45 -0
- package/dist/auth-zj4ldAg5.d.mts +45 -0
- package/dist/{chunk-JUZHLSQK.mjs → chunk-GATAI5T6.mjs} +3 -3
- package/dist/{chunk-JUZHLSQK.mjs.map → chunk-GATAI5T6.mjs.map} +1 -1
- package/dist/{chunk-4RWXISXJ.mjs → chunk-U6WFPNBJ.mjs} +8 -8
- package/dist/{chunk-4RWXISXJ.mjs.map → chunk-U6WFPNBJ.mjs.map} +1 -1
- package/dist/enums/index.cjs +7 -7
- package/dist/enums/index.cjs.map +1 -1
- package/dist/enums/index.d.mts +7 -7
- package/dist/enums/index.d.ts +7 -7
- package/dist/enums/index.mjs +1 -1
- package/dist/formFields/index.cjs +1 -1
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.d.mts +1 -1
- package/dist/formFields/index.d.ts +1 -1
- package/dist/formFields/index.mjs +2 -2
- package/dist/{global-B42Tds9R.d.ts → global-B0ogdRmU.d.ts} +20 -2
- package/dist/{global-B87BDXpD.d.mts → global-CAQkxPc3.d.mts} +20 -2
- package/dist/graphql/index.cjs +440 -530
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +2 -2
- package/dist/graphql/index.d.ts +2 -2
- package/dist/graphql/index.mjs +389 -479
- package/dist/graphql/index.mjs.map +1 -1
- package/dist/hooks/index.cjs +18 -13
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +3 -3
- package/dist/hooks/index.d.ts +3 -3
- package/dist/hooks/index.mjs +12 -7
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +458 -543
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +25 -23
- package/dist/index.d.ts +25 -23
- package/dist/index.mjs +406 -491
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.d.mts +3 -3
- package/dist/types/index.d.ts +3 -3
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.mjs +2 -2
- package/package.json +1 -1
- package/dist/contactUs-D4YMyStC.d.mts +0 -11
- package/dist/contactUs-gQtGXo7i.d.ts +0 -11
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EnumOSPlatform, EnumResourceType, EnumUserLicence, EnumUserRole } from './enums/index.mjs';
|
|
2
|
-
import { C as Category,
|
|
2
|
+
import { C as Category, x as CreateFormData, o as ResourceImageType, P as PartnerType, T as TermsAgreement, p as SocialMediaType } from './global-CAQkxPc3.mjs';
|
|
3
3
|
|
|
4
4
|
interface TestersFormData {
|
|
5
5
|
categories?: Category[] | null;
|
|
@@ -109,53 +109,4 @@ interface AdType extends AdFormData {
|
|
|
109
109
|
updatedAt: Date;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
type
|
|
113
|
-
appBuildNumber: string;
|
|
114
|
-
appId: string;
|
|
115
|
-
appVersion: string;
|
|
116
|
-
brand: string;
|
|
117
|
-
deviceName: string;
|
|
118
|
-
installationId: string;
|
|
119
|
-
manufacturer: string;
|
|
120
|
-
modelName: string;
|
|
121
|
-
osName: string;
|
|
122
|
-
osVersion: string;
|
|
123
|
-
timestamp: string;
|
|
124
|
-
};
|
|
125
|
-
type TermsAgreement = DeviceInfo & {
|
|
126
|
-
termVersion: string;
|
|
127
|
-
};
|
|
128
|
-
type LoginFormData = {
|
|
129
|
-
email: string;
|
|
130
|
-
isAdminPage?: boolean;
|
|
131
|
-
password: string;
|
|
132
|
-
platform?: EnumOSPlatform;
|
|
133
|
-
};
|
|
134
|
-
type CreateLoginFormData = CreateFormData<LoginFormData>;
|
|
135
|
-
type RegisterFormData = {
|
|
136
|
-
email: string;
|
|
137
|
-
firstName: string;
|
|
138
|
-
lastName: string;
|
|
139
|
-
password: string;
|
|
140
|
-
platform?: EnumOSPlatform;
|
|
141
|
-
preferredRegion: string;
|
|
142
|
-
termsAgreement?: TermsAgreement | null;
|
|
143
|
-
};
|
|
144
|
-
type CreateRegisterFormData = CreateFormData<RegisterFormData>;
|
|
145
|
-
type RequestPasswordResetFormData = {
|
|
146
|
-
email: string;
|
|
147
|
-
};
|
|
148
|
-
type CreateRequestPasswordResetFormData = CreateFormData<RequestPasswordResetFormData>;
|
|
149
|
-
type ResetPasswordFormData = {
|
|
150
|
-
confirmPassword: string;
|
|
151
|
-
email: string;
|
|
152
|
-
password: string;
|
|
153
|
-
};
|
|
154
|
-
type CreateResetPasswordFormData = CreateFormData<ResetPasswordFormData>;
|
|
155
|
-
type ValidateVerificationTokenFormData = {
|
|
156
|
-
email: string;
|
|
157
|
-
verificationToken: string;
|
|
158
|
-
};
|
|
159
|
-
type CreateValidateVerificationTokenFormData = CreateFormData<ValidateVerificationTokenFormData>;
|
|
160
|
-
|
|
161
|
-
export { type AdType as A, type CreateUserFormData as C, type DeviceInfo as D, EnumAdStatus as E, type LoginFormData as L, type RegisterFormData as R, type TesterType as T, type UserType as U, type ValidateVerificationTokenFormData as V, type UserFormData as a, type CreateLoginFormData as b, type CreateRegisterFormData as c, type CreateRequestPasswordResetFormData as d, type CreateValidateVerificationTokenFormData as e, type CreateResetPasswordFormData as f, type TestersFormData as g, type CreateTestersFormData as h, type AdFormData as i, type CreateAdFormData as j, type TermsAgreement as k, type RequestPasswordResetFormData as l, type ResetPasswordFormData as m, EnumAdShowOn as n, EnumAdType as o, EnumAdStyle as p };
|
|
112
|
+
export { type AdType as A, type CreateUserFormData as C, EnumAdStatus as E, type TesterType as T, type UserType as U, type UserFormData as a, type TestersFormData as b, type CreateTestersFormData as c, type AdFormData as d, type CreateAdFormData as e, EnumAdShowOn as f, EnumAdType as g, EnumAdStyle as h };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EnumOSPlatform, EnumResourceType, EnumUserLicence, EnumUserRole } from './enums/index.js';
|
|
2
|
-
import { C as Category,
|
|
2
|
+
import { C as Category, x as CreateFormData, o as ResourceImageType, P as PartnerType, T as TermsAgreement, p as SocialMediaType } from './global-B0ogdRmU.js';
|
|
3
3
|
|
|
4
4
|
interface TestersFormData {
|
|
5
5
|
categories?: Category[] | null;
|
|
@@ -109,53 +109,4 @@ interface AdType extends AdFormData {
|
|
|
109
109
|
updatedAt: Date;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
type
|
|
113
|
-
appBuildNumber: string;
|
|
114
|
-
appId: string;
|
|
115
|
-
appVersion: string;
|
|
116
|
-
brand: string;
|
|
117
|
-
deviceName: string;
|
|
118
|
-
installationId: string;
|
|
119
|
-
manufacturer: string;
|
|
120
|
-
modelName: string;
|
|
121
|
-
osName: string;
|
|
122
|
-
osVersion: string;
|
|
123
|
-
timestamp: string;
|
|
124
|
-
};
|
|
125
|
-
type TermsAgreement = DeviceInfo & {
|
|
126
|
-
termVersion: string;
|
|
127
|
-
};
|
|
128
|
-
type LoginFormData = {
|
|
129
|
-
email: string;
|
|
130
|
-
isAdminPage?: boolean;
|
|
131
|
-
password: string;
|
|
132
|
-
platform?: EnumOSPlatform;
|
|
133
|
-
};
|
|
134
|
-
type CreateLoginFormData = CreateFormData<LoginFormData>;
|
|
135
|
-
type RegisterFormData = {
|
|
136
|
-
email: string;
|
|
137
|
-
firstName: string;
|
|
138
|
-
lastName: string;
|
|
139
|
-
password: string;
|
|
140
|
-
platform?: EnumOSPlatform;
|
|
141
|
-
preferredRegion: string;
|
|
142
|
-
termsAgreement?: TermsAgreement | null;
|
|
143
|
-
};
|
|
144
|
-
type CreateRegisterFormData = CreateFormData<RegisterFormData>;
|
|
145
|
-
type RequestPasswordResetFormData = {
|
|
146
|
-
email: string;
|
|
147
|
-
};
|
|
148
|
-
type CreateRequestPasswordResetFormData = CreateFormData<RequestPasswordResetFormData>;
|
|
149
|
-
type ResetPasswordFormData = {
|
|
150
|
-
confirmPassword: string;
|
|
151
|
-
email: string;
|
|
152
|
-
password: string;
|
|
153
|
-
};
|
|
154
|
-
type CreateResetPasswordFormData = CreateFormData<ResetPasswordFormData>;
|
|
155
|
-
type ValidateVerificationTokenFormData = {
|
|
156
|
-
email: string;
|
|
157
|
-
verificationToken: string;
|
|
158
|
-
};
|
|
159
|
-
type CreateValidateVerificationTokenFormData = CreateFormData<ValidateVerificationTokenFormData>;
|
|
160
|
-
|
|
161
|
-
export { type AdType as A, type CreateUserFormData as C, type DeviceInfo as D, EnumAdStatus as E, type LoginFormData as L, type RegisterFormData as R, type TesterType as T, type UserType as U, type ValidateVerificationTokenFormData as V, type UserFormData as a, type CreateLoginFormData as b, type CreateRegisterFormData as c, type CreateRequestPasswordResetFormData as d, type CreateValidateVerificationTokenFormData as e, type CreateResetPasswordFormData as f, type TestersFormData as g, type CreateTestersFormData as h, type AdFormData as i, type CreateAdFormData as j, type TermsAgreement as k, type RequestPasswordResetFormData as l, type ResetPasswordFormData as m, EnumAdShowOn as n, EnumAdType as o, EnumAdStyle as p };
|
|
112
|
+
export { type AdType as A, type CreateUserFormData as C, EnumAdStatus as E, type TesterType as T, type UserType as U, type UserFormData as a, type TestersFormData as b, type CreateTestersFormData as c, type AdFormData as d, type CreateAdFormData as e, EnumAdShowOn as f, EnumAdType as g, EnumAdStyle as h };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { x as CreateFormData, T as TermsAgreement } from './global-B0ogdRmU.js';
|
|
2
|
+
import { EnumOSPlatform } from './enums/index.js';
|
|
3
|
+
|
|
4
|
+
type ContactUsFormData = {
|
|
5
|
+
email: string;
|
|
6
|
+
firstName: string;
|
|
7
|
+
lastName: string;
|
|
8
|
+
message: string;
|
|
9
|
+
};
|
|
10
|
+
type CreateContactUsFormData = CreateFormData<ContactUsFormData>;
|
|
11
|
+
|
|
12
|
+
type LoginFormData = {
|
|
13
|
+
email: string;
|
|
14
|
+
isAdminPage?: boolean;
|
|
15
|
+
password: string;
|
|
16
|
+
platform?: EnumOSPlatform;
|
|
17
|
+
};
|
|
18
|
+
type CreateLoginFormData = CreateFormData<LoginFormData>;
|
|
19
|
+
type RegisterFormData = {
|
|
20
|
+
email: string;
|
|
21
|
+
firstName: string;
|
|
22
|
+
lastName: string;
|
|
23
|
+
password: string;
|
|
24
|
+
platform?: EnumOSPlatform;
|
|
25
|
+
preferredRegion: string;
|
|
26
|
+
termsAgreement?: TermsAgreement | null;
|
|
27
|
+
};
|
|
28
|
+
type CreateRegisterFormData = CreateFormData<RegisterFormData>;
|
|
29
|
+
type RequestPasswordResetFormData = {
|
|
30
|
+
email: string;
|
|
31
|
+
};
|
|
32
|
+
type CreateRequestPasswordResetFormData = CreateFormData<RequestPasswordResetFormData>;
|
|
33
|
+
type ResetPasswordFormData = {
|
|
34
|
+
confirmPassword: string;
|
|
35
|
+
email: string;
|
|
36
|
+
password: string;
|
|
37
|
+
};
|
|
38
|
+
type CreateResetPasswordFormData = CreateFormData<ResetPasswordFormData>;
|
|
39
|
+
type ValidateVerificationTokenFormData = {
|
|
40
|
+
email: string;
|
|
41
|
+
verificationToken: string;
|
|
42
|
+
};
|
|
43
|
+
type CreateValidateVerificationTokenFormData = CreateFormData<ValidateVerificationTokenFormData>;
|
|
44
|
+
|
|
45
|
+
export type { CreateLoginFormData as C, LoginFormData as L, RegisterFormData as R, ValidateVerificationTokenFormData as V, CreateRegisterFormData as a, CreateRequestPasswordResetFormData as b, CreateValidateVerificationTokenFormData as c, CreateResetPasswordFormData as d, ContactUsFormData as e, CreateContactUsFormData as f, RequestPasswordResetFormData as g, ResetPasswordFormData as h };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { x as CreateFormData, T as TermsAgreement } from './global-CAQkxPc3.mjs';
|
|
2
|
+
import { EnumOSPlatform } from './enums/index.mjs';
|
|
3
|
+
|
|
4
|
+
type ContactUsFormData = {
|
|
5
|
+
email: string;
|
|
6
|
+
firstName: string;
|
|
7
|
+
lastName: string;
|
|
8
|
+
message: string;
|
|
9
|
+
};
|
|
10
|
+
type CreateContactUsFormData = CreateFormData<ContactUsFormData>;
|
|
11
|
+
|
|
12
|
+
type LoginFormData = {
|
|
13
|
+
email: string;
|
|
14
|
+
isAdminPage?: boolean;
|
|
15
|
+
password: string;
|
|
16
|
+
platform?: EnumOSPlatform;
|
|
17
|
+
};
|
|
18
|
+
type CreateLoginFormData = CreateFormData<LoginFormData>;
|
|
19
|
+
type RegisterFormData = {
|
|
20
|
+
email: string;
|
|
21
|
+
firstName: string;
|
|
22
|
+
lastName: string;
|
|
23
|
+
password: string;
|
|
24
|
+
platform?: EnumOSPlatform;
|
|
25
|
+
preferredRegion: string;
|
|
26
|
+
termsAgreement?: TermsAgreement | null;
|
|
27
|
+
};
|
|
28
|
+
type CreateRegisterFormData = CreateFormData<RegisterFormData>;
|
|
29
|
+
type RequestPasswordResetFormData = {
|
|
30
|
+
email: string;
|
|
31
|
+
};
|
|
32
|
+
type CreateRequestPasswordResetFormData = CreateFormData<RequestPasswordResetFormData>;
|
|
33
|
+
type ResetPasswordFormData = {
|
|
34
|
+
confirmPassword: string;
|
|
35
|
+
email: string;
|
|
36
|
+
password: string;
|
|
37
|
+
};
|
|
38
|
+
type CreateResetPasswordFormData = CreateFormData<ResetPasswordFormData>;
|
|
39
|
+
type ValidateVerificationTokenFormData = {
|
|
40
|
+
email: string;
|
|
41
|
+
verificationToken: string;
|
|
42
|
+
};
|
|
43
|
+
type CreateValidateVerificationTokenFormData = CreateFormData<ValidateVerificationTokenFormData>;
|
|
44
|
+
|
|
45
|
+
export type { CreateLoginFormData as C, LoginFormData as L, RegisterFormData as R, ValidateVerificationTokenFormData as V, CreateRegisterFormData as a, CreateRequestPasswordResetFormData as b, CreateValidateVerificationTokenFormData as c, CreateResetPasswordFormData as d, ContactUsFormData as e, CreateContactUsFormData as f, RequestPasswordResetFormData as g, ResetPasswordFormData as h };
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
EnumInviteStatus,
|
|
3
3
|
EnumPaymentMethod,
|
|
4
4
|
EnumRegions
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-U6WFPNBJ.mjs";
|
|
6
6
|
|
|
7
7
|
// src/utils/index.ts
|
|
8
8
|
import dayjs from "dayjs";
|
|
@@ -82,7 +82,7 @@ var truncateText = (text, maxLength = 30) => {
|
|
|
82
82
|
};
|
|
83
83
|
var mapArrayToOptions = (items) => items.map((item) => ({
|
|
84
84
|
label: item.replace(/_/g, " "),
|
|
85
|
-
value: item.replace(/\s+/g, "_")
|
|
85
|
+
value: item.replace(/\s+/g, "_")
|
|
86
86
|
}));
|
|
87
87
|
var capitalizeFirstLetter = (str) => {
|
|
88
88
|
return str.split(" ").map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(" ");
|
|
@@ -136,4 +136,4 @@ export {
|
|
|
136
136
|
paymentMethodOptions,
|
|
137
137
|
normalizeUrl
|
|
138
138
|
};
|
|
139
|
-
//# sourceMappingURL=chunk-
|
|
139
|
+
//# sourceMappingURL=chunk-GATAI5T6.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/utils/index.ts"],"sourcesContent":["import dayjs from \"dayjs\";\nimport customParseFormat from \"dayjs/plugin/customParseFormat.js\";\nimport isSameOrAfter from \"dayjs/plugin/isSameOrAfter.js\";\nimport timezone from \"dayjs/plugin/timezone.js\";\nimport utc from \"dayjs/plugin/utc.js\";\n\nimport { EnumInviteStatus, EnumPaymentMethod, EnumRegions } from \"../enums\";\nimport { OptionItem, Region } from \"../types/global\";\n\nexport const dateFormat = \"DD-MM-YYYY\";\nexport const timeFormat = \"HH:mm\";\n\n// Enable custom format parsing\ndayjs.extend(customParseFormat);\ndayjs.extend(utc);\ndayjs.extend(timezone);\ndayjs.extend(isSameOrAfter);\n\ntype DateFormat = \"date\" | \"time\" | \"datetime\";\n\n/**\n * Format a date string to a more readable format.\n * @param dateStr - the date string\n * @param timeStr - optional time string\n * @param display - 'date' | 'time' | 'datetime'\n * @returns formatted string based on display option\n */\nexport const formatDate = (\n dateStr: string,\n display: DateFormat = \"datetime\",\n timeStr?: string,\n) => {\n // Combine date and time into a single string if time is provided\n const dateTimeStr = timeStr ? `${dateStr} ${timeStr}` : dateStr;\n\n // Parse with formats\n const dateTime = timeStr\n ? dayjs(dateTimeStr, `${dateFormat} ${timeFormat}`)\n : dayjs(dateStr, dateFormat);\n\n // Format parts\n const formattedDate = dateTime.format(\"dddd, D MMMM, YYYY\");\n const formattedTime = dateTime.format(\"h:mm a\");\n\n // Return based on display option\n switch (display) {\n case \"date\":\n return formattedDate;\n case \"time\":\n return formattedTime;\n case \"datetime\":\n return `${formattedDate} at ${formattedTime}`;\n default:\n return formattedDate;\n }\n};\n\nexport const getCurrentAndFutureDates = <\n T extends { startDate: string; startTime: string },\n>(\n dates: T[],\n): T[] => {\n const now = dayjs(); // current date and time\n\n return dates.filter((dateObj) => {\n const dateTime = dayjs(\n `${dateObj.startDate} ${dateObj.startTime}`,\n `${dateFormat} ${timeFormat}`,\n );\n return dateTime.isSameOrAfter(now);\n });\n};\n\nexport const isFutureDatesBeforeThreshold = (\n date: {\n startDate: string;\n startTime: string;\n },\n minHoursFromNow: number,\n): boolean => {\n const threshold = minHoursFromNow\n ? dayjs().add(minHoursFromNow, \"hour\")\n : dayjs().startOf(\"day\");\n\n const dateTime = dayjs(\n `${date.startDate} ${date.startTime}`,\n `${dateFormat} ${timeFormat}`,\n );\n\n return dateTime.isSameOrAfter(threshold);\n};\n\nexport const formatTimestamp = (timestamp: string) => {\n const formattedDate = dayjs(timestamp)\n .tz(\"Pacific/Auckland\")\n .format(dateFormat);\n\n const formattedTime = dayjs(timestamp)\n .tz(\"Pacific/Auckland\")\n .format(timeFormat);\n\n return formatDate(formattedDate, \"date\");\n};\n\nexport const defaultRegion: Region = {\n latitude: -36.8624942, // Default: New Zealand\n latitudeDelta: 5.0,\n longitude: 174.7450494,\n longitudeDelta: 5.0,\n};\n\n/**\n * Function to remove __typename from an object or array of objects.\n * @param obj - The object or array to clean.\n * @returns - The cleaned object or array.\n */\nexport const removeTypename = (obj: any): any => {\n if (Array.isArray(obj)) {\n return obj.map((item) => removeTypename(item)); // Recursively clean arrays\n } else if (obj !== null && typeof obj === \"object\") {\n const { __typename, ...cleanedObj } = obj; // Remove __typename\n return Object.keys(cleanedObj).reduce(\n (acc: { [key: string]: any }, key) => {\n acc[key] = removeTypename(cleanedObj[key]); // Recursively clean nested objects\n return acc;\n },\n {},\n );\n }\n return obj; // Return value as-is if it's not an object/array\n};\n\n/**\n * Truncate text to a specified length and append ellipsis if necessary.\n * @param text\n * @param maxLength\n * @returns\n */\nexport const truncateText = (text: string, maxLength: number = 30): string => {\n return text.length > maxLength ? text.substring(0, maxLength) + \"...\" : text;\n};\n\n/**\n * Convert an array of strings to an array of objects with label and value properties.\n * @param items - The array of strings to convert.\n * @returns - The converted array of objects.\n */\nexport const mapArrayToOptions = (items: string[]): OptionItem[] =>\n items.map((item) => ({\n label: item.replace(/_/g, \" \"),\n value: item.replace(/\\s+/g, \"_\")
|
|
1
|
+
{"version":3,"sources":["../src/utils/index.ts"],"sourcesContent":["import dayjs from \"dayjs\";\nimport customParseFormat from \"dayjs/plugin/customParseFormat.js\";\nimport isSameOrAfter from \"dayjs/plugin/isSameOrAfter.js\";\nimport timezone from \"dayjs/plugin/timezone.js\";\nimport utc from \"dayjs/plugin/utc.js\";\n\nimport { EnumInviteStatus, EnumPaymentMethod, EnumRegions } from \"../enums\";\nimport { OptionItem, Region } from \"../types/global\";\n\nexport const dateFormat = \"DD-MM-YYYY\";\nexport const timeFormat = \"HH:mm\";\n\n// Enable custom format parsing\ndayjs.extend(customParseFormat);\ndayjs.extend(utc);\ndayjs.extend(timezone);\ndayjs.extend(isSameOrAfter);\n\ntype DateFormat = \"date\" | \"time\" | \"datetime\";\n\n/**\n * Format a date string to a more readable format.\n * @param dateStr - the date string\n * @param timeStr - optional time string\n * @param display - 'date' | 'time' | 'datetime'\n * @returns formatted string based on display option\n */\nexport const formatDate = (\n dateStr: string,\n display: DateFormat = \"datetime\",\n timeStr?: string,\n) => {\n // Combine date and time into a single string if time is provided\n const dateTimeStr = timeStr ? `${dateStr} ${timeStr}` : dateStr;\n\n // Parse with formats\n const dateTime = timeStr\n ? dayjs(dateTimeStr, `${dateFormat} ${timeFormat}`)\n : dayjs(dateStr, dateFormat);\n\n // Format parts\n const formattedDate = dateTime.format(\"dddd, D MMMM, YYYY\");\n const formattedTime = dateTime.format(\"h:mm a\");\n\n // Return based on display option\n switch (display) {\n case \"date\":\n return formattedDate;\n case \"time\":\n return formattedTime;\n case \"datetime\":\n return `${formattedDate} at ${formattedTime}`;\n default:\n return formattedDate;\n }\n};\n\nexport const getCurrentAndFutureDates = <\n T extends { startDate: string; startTime: string },\n>(\n dates: T[],\n): T[] => {\n const now = dayjs(); // current date and time\n\n return dates.filter((dateObj) => {\n const dateTime = dayjs(\n `${dateObj.startDate} ${dateObj.startTime}`,\n `${dateFormat} ${timeFormat}`,\n );\n return dateTime.isSameOrAfter(now);\n });\n};\n\nexport const isFutureDatesBeforeThreshold = (\n date: {\n startDate: string;\n startTime: string;\n },\n minHoursFromNow: number,\n): boolean => {\n const threshold = minHoursFromNow\n ? dayjs().add(minHoursFromNow, \"hour\")\n : dayjs().startOf(\"day\");\n\n const dateTime = dayjs(\n `${date.startDate} ${date.startTime}`,\n `${dateFormat} ${timeFormat}`,\n );\n\n return dateTime.isSameOrAfter(threshold);\n};\n\nexport const formatTimestamp = (timestamp: string) => {\n const formattedDate = dayjs(timestamp)\n .tz(\"Pacific/Auckland\")\n .format(dateFormat);\n\n const formattedTime = dayjs(timestamp)\n .tz(\"Pacific/Auckland\")\n .format(timeFormat);\n\n return formatDate(formattedDate, \"date\");\n};\n\nexport const defaultRegion: Region = {\n latitude: -36.8624942, // Default: New Zealand\n latitudeDelta: 5.0,\n longitude: 174.7450494,\n longitudeDelta: 5.0,\n};\n\n/**\n * Function to remove __typename from an object or array of objects.\n * @param obj - The object or array to clean.\n * @returns - The cleaned object or array.\n */\nexport const removeTypename = (obj: any): any => {\n if (Array.isArray(obj)) {\n return obj.map((item) => removeTypename(item)); // Recursively clean arrays\n } else if (obj !== null && typeof obj === \"object\") {\n const { __typename, ...cleanedObj } = obj; // Remove __typename\n return Object.keys(cleanedObj).reduce(\n (acc: { [key: string]: any }, key) => {\n acc[key] = removeTypename(cleanedObj[key]); // Recursively clean nested objects\n return acc;\n },\n {},\n );\n }\n return obj; // Return value as-is if it's not an object/array\n};\n\n/**\n * Truncate text to a specified length and append ellipsis if necessary.\n * @param text\n * @param maxLength\n * @returns\n */\nexport const truncateText = (text: string, maxLength: number = 30): string => {\n return text.length > maxLength ? text.substring(0, maxLength) + \"...\" : text;\n};\n\n/**\n * Convert an array of strings to an array of objects with label and value properties.\n * @param items - The array of strings to convert.\n * @returns - The converted array of objects.\n */\nexport const mapArrayToOptions = (items: string[]): OptionItem[] =>\n items.map((item) => ({\n label: item.replace(/_/g, \" \"),\n value: item.replace(/\\s+/g, \"_\"),\n }));\n\nexport const capitalizeFirstLetter = (str: string): string => {\n return str\n .split(\" \")\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(\" \");\n};\n\nexport const statusOptions = [\n ...Object.values(EnumInviteStatus)\n .map((status) => ({\n label: status,\n value: status,\n }))\n .sort((a, b) => a.label.localeCompare(b.label)), // Sort the options alphabetically\n];\n\n/**\n * Sort an array of date strings by their proximity to the current date.\n * @param dates - The array of date strings to sort.\n * @returns - The sorted array of date strings.\n */\nexport function sortDatesChronologically<\n T extends { startDate: string; startTime: string },\n>(dates: T[]): T[] {\n if (!dates || !dates.length) {\n return [];\n }\n\n return [...dates].sort((a, b) => {\n const dateTimeFormat = `${dateFormat} ${timeFormat}`;\n const dateA = dayjs(`${a.startDate} ${a.startTime}`, dateTimeFormat);\n const dateB = dayjs(`${b.startDate} ${b.startTime}`, dateTimeFormat);\n return dateA.valueOf() - dateB.valueOf(); // chronological order\n });\n}\n\nexport const availableRegionTypes = Object.values(EnumRegions);\nexport const availableRegionOptions: OptionItem[] =\n mapArrayToOptions(availableRegionTypes);\n\nexport const paymentMethodOptions: OptionItem[] = mapArrayToOptions(\n Object.values(EnumPaymentMethod),\n);\n\nexport function normalizeUrl(url: string): string {\n if (!url.startsWith(\"http://\") && !url.startsWith(\"https://\")) {\n return `https://${url}`;\n }\n return url;\n}\n"],"mappings":";;;;;;;AAAA,OAAO,WAAW;AAClB,OAAO,uBAAuB;AAC9B,OAAO,mBAAmB;AAC1B,OAAO,cAAc;AACrB,OAAO,SAAS;AAKT,IAAM,aAAa;AACnB,IAAM,aAAa;AAG1B,MAAM,OAAO,iBAAiB;AAC9B,MAAM,OAAO,GAAG;AAChB,MAAM,OAAO,QAAQ;AACrB,MAAM,OAAO,aAAa;AAWnB,IAAM,aAAa,CACxB,SACA,UAAsB,YACtB,YACG;AAEH,QAAM,cAAc,UAAU,GAAG,OAAO,IAAI,OAAO,KAAK;AAGxD,QAAM,WAAW,UACb,MAAM,aAAa,GAAG,UAAU,IAAI,UAAU,EAAE,IAChD,MAAM,SAAS,UAAU;AAG7B,QAAM,gBAAgB,SAAS,OAAO,oBAAoB;AAC1D,QAAM,gBAAgB,SAAS,OAAO,QAAQ;AAG9C,UAAQ,SAAS;AAAA,IACf,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO,GAAG,aAAa,OAAO,aAAa;AAAA,IAC7C;AACE,aAAO;AAAA,EACX;AACF;AAEO,IAAM,2BAA2B,CAGtC,UACQ;AACR,QAAM,MAAM,MAAM;AAElB,SAAO,MAAM,OAAO,CAAC,YAAY;AAC/B,UAAM,WAAW;AAAA,MACf,GAAG,QAAQ,SAAS,IAAI,QAAQ,SAAS;AAAA,MACzC,GAAG,UAAU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AACT;","names":[]}
|
|
@@ -38,16 +38,16 @@ var EnumResourceType = /* @__PURE__ */ ((EnumResourceType2) => {
|
|
|
38
38
|
return EnumResourceType2;
|
|
39
39
|
})(EnumResourceType || {});
|
|
40
40
|
var EnumEventType = /* @__PURE__ */ ((EnumEventType2) => {
|
|
41
|
-
EnumEventType2["EXPO"] = "
|
|
42
|
-
EnumEventType2["FAIR"] = "
|
|
43
|
-
EnumEventType2["FESTIVAL"] = "
|
|
44
|
-
EnumEventType2["MARKET"] = "
|
|
41
|
+
EnumEventType2["EXPO"] = "Expo";
|
|
42
|
+
EnumEventType2["FAIR"] = "Fair";
|
|
43
|
+
EnumEventType2["FESTIVAL"] = "Festival";
|
|
44
|
+
EnumEventType2["MARKET"] = "Market";
|
|
45
45
|
return EnumEventType2;
|
|
46
46
|
})(EnumEventType || {});
|
|
47
47
|
var EnumVendorType = /* @__PURE__ */ ((EnumVendorType2) => {
|
|
48
|
-
EnumVendorType2["STALLHOLDER"] = "
|
|
49
|
-
EnumVendorType2["SHOP"] = "
|
|
50
|
-
EnumVendorType2["CHARITY"] = "
|
|
48
|
+
EnumVendorType2["STALLHOLDER"] = "Stallholder";
|
|
49
|
+
EnumVendorType2["SHOP"] = "Shop";
|
|
50
|
+
EnumVendorType2["CHARITY"] = "Charity";
|
|
51
51
|
return EnumVendorType2;
|
|
52
52
|
})(EnumVendorType || {});
|
|
53
53
|
var EnumOSPlatform = /* @__PURE__ */ ((EnumOSPlatform2) => {
|
|
@@ -145,4 +145,4 @@ export {
|
|
|
145
145
|
EnumUserRole,
|
|
146
146
|
EnumSocialMedia
|
|
147
147
|
};
|
|
148
|
-
//# sourceMappingURL=chunk-
|
|
148
|
+
//# sourceMappingURL=chunk-U6WFPNBJ.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/enums/index.ts"],"sourcesContent":["export enum EnumInviteStatus {\n ACCEPTED = \"Accepted\",\n COMPLETED = \"Completed\",\n EXPIRED = \"Expired\",\n NO_STATUS = \"No_Status\",\n PAID = \"Paid\",\n PENDING = \"Pending\",\n REJECTED = \"Rejected\",\n UNAVAILABLE = \"Unavailable\",\n WAITING = \"Waiting\",\n}\n\nexport enum EnumChatType {\n GROUP = \"group\",\n PRIVATE = \"private\",\n RELATION = \"relation\",\n}\n\nexport enum EnumPaymentMethod {\n CASH = \"cash\",\n EFTPOS = \"eftpos\",\n BANK_TRANSFER = \"bank_transfer\",\n PAYPAL = \"paypal\",\n STRIPE = \"stripe\",\n}\n\nexport enum EnumFoodFlavor {\n SALTY = \"Salty\",\n SAVOURY = \"Savoury\",\n SPICY = \"Spicy\",\n SWEET = \"Sweet\",\n}\n\nexport enum EnumResourceType {\n EVENT = \"event\",\n VENDOR = \"vendor\",\n}\n\nexport enum EnumEventType {\n EXPO = \"
|
|
1
|
+
{"version":3,"sources":["../src/enums/index.ts"],"sourcesContent":["export enum EnumInviteStatus {\n ACCEPTED = \"Accepted\",\n COMPLETED = \"Completed\",\n EXPIRED = \"Expired\",\n NO_STATUS = \"No_Status\",\n PAID = \"Paid\",\n PENDING = \"Pending\",\n REJECTED = \"Rejected\",\n UNAVAILABLE = \"Unavailable\",\n WAITING = \"Waiting\",\n}\n\nexport enum EnumChatType {\n GROUP = \"group\",\n PRIVATE = \"private\",\n RELATION = \"relation\",\n}\n\nexport enum EnumPaymentMethod {\n CASH = \"cash\",\n EFTPOS = \"eftpos\",\n BANK_TRANSFER = \"bank_transfer\",\n PAYPAL = \"paypal\",\n STRIPE = \"stripe\",\n}\n\nexport enum EnumFoodFlavor {\n SALTY = \"Salty\",\n SAVOURY = \"Savoury\",\n SPICY = \"Spicy\",\n SWEET = \"Sweet\",\n}\n\nexport enum EnumResourceType {\n EVENT = \"event\",\n VENDOR = \"vendor\",\n}\n\nexport enum EnumEventType {\n EXPO = \"Expo\",\n FAIR = \"Fair\",\n FESTIVAL = \"Festival\",\n MARKET = \"Market\",\n}\n\nexport enum EnumVendorType {\n STALLHOLDER = \"Stallholder\",\n SHOP = \"Shop\",\n CHARITY = \"Charity\",\n}\n\nexport enum EnumOSPlatform {\n ANDROID = \"android\",\n IOS = \"ios\",\n WEB = \"web\",\n}\n\nexport enum EnumRelationResource {\n EVENT_INVITE_VENDOR = \"event_invite_vendor\",\n VENDOR_APPLICATION_TO_EVENT = \"vendor_application_to_event\",\n}\n\nexport enum EnumNotificationResourceType {\n ADDED_AS_PARTNER_EVENT = \"added_as_partner_event\",\n ADDED_AS_PARTNER_VENDOR = \"added_as_partner_vendor\",\n APPROVED_EVENT = \"approved_event\",\n APPROVED_VENDOR = \"approved_vendor\",\n CREATED_EVENT = \"created_event\",\n CREATED_VENDOR = \"created_vendor\",\n EVENT_INVITE_VENDOR = EnumRelationResource.EVENT_INVITE_VENDOR,\n NEW_CHAT_MESSAGE = \"new_chat_message\",\n VENDOR_APPLICATION_TO_EVENT = EnumRelationResource.VENDOR_APPLICATION_TO_EVENT,\n}\n\nexport enum EnumNotificationType {\n EVENT = EnumResourceType.EVENT,\n VENDOR = EnumResourceType.VENDOR,\n RELATION = \"relation\",\n CHAT = \"chat\",\n SYSTEM = \"system\",\n}\n\nexport enum EnumRegions {\n Auckland = \"Auckland\",\n BayOfPlentyGisborne = \"Bay of Plenty & Gisborne\",\n Canterbury = \"Canterbury\",\n HawkesBay = \"Hawke's Bay\",\n ManawatuWanganui = \"Manawatu-Wanganui\",\n MarlboroughNelson = \"Marlborough & Nelson\",\n Northland = \"Northland\",\n SouthlandOtago = \"Southland & Otago\",\n Taranaki = \"Taranaki\",\n Waikato = \"Waikato\",\n Wellington = \"Wellington\",\n TasmanWestCoast = \"Tasman & West Coast\",\n}\n\nexport enum ImageTypeEnum {\n AVATAR = \"avatar\",\n COVER = \"cover\",\n IMAGE = \"image\",\n LOGO = \"logo\",\n}\n\nexport enum EnumUserLicence {\n PRO_EVENT = \"pro_event\",\n PRO_PLUS_EVENT = \"pro_plus_event\",\n PRO_PLUS_VENDOR = \"pro_plus_vendor\",\n PRO_VENDOR = \"pro_vendor\",\n STANDARD_EVENT = \"standard_event\",\n STANDARD_VENDOR = \"standard_vendor\",\n}\n\nexport enum EnumUserRole {\n ADMIN = \"admin\",\n CUSTOMER = \"customer\",\n}\n\nexport enum EnumSocialMedia {\n FACEBOOK = \"facebook\",\n INSTAGRAM = \"instagram\",\n TIKTOK = \"tiktok\",\n TWITTER = \"twitter\",\n WEBSITE = \"website\",\n YOUTUBE = \"youtube\",\n}\n"],"mappings":";AAAO,IAAK,mBAAL,kBAAKA,sBAAL;AACL,EAAAA,kBAAA,cAAW;AACX,EAAAA,kBAAA,eAAY;AACZ,EAAAA,kBAAA,aAAU;AACV,EAAAA,kBAAA,eAAY;AACZ,EAAAA,kBAAA,UAAO;AACP,EAAAA,kBAAA,aAAU;AACV,EAAAA,kBAAA,cAAW;AACX,EAAAA,kBAAA,iBAAc;AACd,EAAAA,kBAAA,aAAU;AATA,SAAAA;AAAA,GAAA;AAYL,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,WAAQ;AACR,EAAAA,cAAA,aAAU;AACV,EAAAA,cAAA,cAAW;AAHD,SAAAA;AAAA,GAAA;AAML,IAAK,oBAAL,kBAAKC,uBAAL;AACL,EAAAA,mBAAA,UAAO;AACP,EAAAA,mBAAA,YAAS;AACT,EAAAA,mBAAA,mBAAgB;AAChB,EAAAA,mBAAA,YAAS;AACT,EAAAA,mBAAA,YAAS;AALC,SAAAA;AAAA,GAAA;AAQL,IAAK,iBAAL,kBAAKC,oBAAL;AACL,EAAAA,gBAAA,WAAQ;AACR,EAAAA,gBAAA,aAAU;AACV,EAAAA,gBAAA,WAAQ;AACR,EAAAA,gBAAA,WAAQ;AAJE,SAAAA;AAAA,GAAA;AAOL,IAAK,mBAAL,kBAAKC,sBAAL;AACL,EAAAA,kBAAA,WAAQ;AACR,EAAAA,kBAAA,YAAS;AAFC,SAAAA;AAAA,GAAA;AAKL,IAAK,gBAAL,kBAAKC,mBAAL;AACL,EAAAA,eAAA,UAAO;AAC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;AACjB,EAAAA,aAAA,cAAW;AACX,EAAAA,aAAA,aAAU;AACV,EAAAA,aAAA,gBAAa;AACb,EAAAA,aAAA,qBAAkB;AAZR,SAAAA;AAAA,GAAA;AAeL,IAAK,gBAAL,kBAAKC,mBAAL;AACL,EAAAA,eAAA,YAAS;AACT,EAAAA,eAAA,WAAQ;AACR,EAAAA,eAAA,WAAQ;AACR,EAAAA,eAAA,UAAO;AAJG,SAAAA;AAAA,GAAA;AAOL,IAAK,kBAAL,kBAAKC,qBAAL;AACL,EAAAA,iBAAA,eAAY;AACZ,EAAAA,iBAAA,oBAAiB;AACjB,EAAAA,iBAAA,qBAAkB;AAClB,EAAAA,iBAAA,gBAAa;AACb,EAAAA,iBAAA,oBAAiB;AACjB,EAAAA,iBAAA,qBAAkB;AANR,SAAAA;AAAA,GAAA;AASL,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,WAAQ;AACR,EAAAA,cAAA,cAAW;AAFD,SAAAA;AAAA,GAAA;AAKL,IAAK,kBAAL,kBAAKC,qBAAL;AACL,EAAAA,iBAAA,cAAW;AACX,EAAAA,iBAAA,eAAY;AACZ,EAAAA,iBAAA,YAAS;AACT,EAAAA,iBAAA,aAAU;AACV,EAAAA,iBAAA,aAAU;AACV,EAAAA,iBAAA,aAAU;AANA,SAAAA;AAAA,GAAA;","names":["EnumInviteStatus","EnumChatType","EnumPaymentMethod","EnumFoodFlavor","EnumResourceType","EnumEventType","EnumVendorType","EnumOSPlatform","EnumRelationResource","EnumNotificationResourceType","EnumNotificationType","EnumRegions","ImageTypeEnum","EnumUserLicence","EnumUserRole","EnumSocialMedia"]}
|
package/dist/enums/index.cjs
CHANGED
|
@@ -77,16 +77,16 @@ var EnumResourceType = /* @__PURE__ */ ((EnumResourceType2) => {
|
|
|
77
77
|
return EnumResourceType2;
|
|
78
78
|
})(EnumResourceType || {});
|
|
79
79
|
var EnumEventType = /* @__PURE__ */ ((EnumEventType2) => {
|
|
80
|
-
EnumEventType2["EXPO"] = "
|
|
81
|
-
EnumEventType2["FAIR"] = "
|
|
82
|
-
EnumEventType2["FESTIVAL"] = "
|
|
83
|
-
EnumEventType2["MARKET"] = "
|
|
80
|
+
EnumEventType2["EXPO"] = "Expo";
|
|
81
|
+
EnumEventType2["FAIR"] = "Fair";
|
|
82
|
+
EnumEventType2["FESTIVAL"] = "Festival";
|
|
83
|
+
EnumEventType2["MARKET"] = "Market";
|
|
84
84
|
return EnumEventType2;
|
|
85
85
|
})(EnumEventType || {});
|
|
86
86
|
var EnumVendorType = /* @__PURE__ */ ((EnumVendorType2) => {
|
|
87
|
-
EnumVendorType2["STALLHOLDER"] = "
|
|
88
|
-
EnumVendorType2["SHOP"] = "
|
|
89
|
-
EnumVendorType2["CHARITY"] = "
|
|
87
|
+
EnumVendorType2["STALLHOLDER"] = "Stallholder";
|
|
88
|
+
EnumVendorType2["SHOP"] = "Shop";
|
|
89
|
+
EnumVendorType2["CHARITY"] = "Charity";
|
|
90
90
|
return EnumVendorType2;
|
|
91
91
|
})(EnumVendorType || {});
|
|
92
92
|
var EnumOSPlatform = /* @__PURE__ */ ((EnumOSPlatform2) => {
|
package/dist/enums/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/enums/index.ts"],"sourcesContent":["export enum EnumInviteStatus {\n ACCEPTED = \"Accepted\",\n COMPLETED = \"Completed\",\n EXPIRED = \"Expired\",\n NO_STATUS = \"No_Status\",\n PAID = \"Paid\",\n PENDING = \"Pending\",\n REJECTED = \"Rejected\",\n UNAVAILABLE = \"Unavailable\",\n WAITING = \"Waiting\",\n}\n\nexport enum EnumChatType {\n GROUP = \"group\",\n PRIVATE = \"private\",\n RELATION = \"relation\",\n}\n\nexport enum EnumPaymentMethod {\n CASH = \"cash\",\n EFTPOS = \"eftpos\",\n BANK_TRANSFER = \"bank_transfer\",\n PAYPAL = \"paypal\",\n STRIPE = \"stripe\",\n}\n\nexport enum EnumFoodFlavor {\n SALTY = \"Salty\",\n SAVOURY = \"Savoury\",\n SPICY = \"Spicy\",\n SWEET = \"Sweet\",\n}\n\nexport enum EnumResourceType {\n EVENT = \"event\",\n VENDOR = \"vendor\",\n}\n\nexport enum EnumEventType {\n EXPO = \"
|
|
1
|
+
{"version":3,"sources":["../../src/enums/index.ts"],"sourcesContent":["export enum EnumInviteStatus {\n ACCEPTED = \"Accepted\",\n COMPLETED = \"Completed\",\n EXPIRED = \"Expired\",\n NO_STATUS = \"No_Status\",\n PAID = \"Paid\",\n PENDING = \"Pending\",\n REJECTED = \"Rejected\",\n UNAVAILABLE = \"Unavailable\",\n WAITING = \"Waiting\",\n}\n\nexport enum EnumChatType {\n GROUP = \"group\",\n PRIVATE = \"private\",\n RELATION = \"relation\",\n}\n\nexport enum EnumPaymentMethod {\n CASH = \"cash\",\n EFTPOS = \"eftpos\",\n BANK_TRANSFER = \"bank_transfer\",\n PAYPAL = \"paypal\",\n STRIPE = \"stripe\",\n}\n\nexport enum EnumFoodFlavor {\n SALTY = \"Salty\",\n SAVOURY = \"Savoury\",\n SPICY = \"Spicy\",\n SWEET = \"Sweet\",\n}\n\nexport enum EnumResourceType {\n EVENT = \"event\",\n VENDOR = \"vendor\",\n}\n\nexport enum EnumEventType {\n EXPO = \"Expo\",\n FAIR = \"Fair\",\n FESTIVAL = \"Festival\",\n MARKET = \"Market\",\n}\n\nexport enum EnumVendorType {\n STALLHOLDER = \"Stallholder\",\n SHOP = \"Shop\",\n CHARITY = \"Charity\",\n}\n\nexport enum EnumOSPlatform {\n ANDROID = \"android\",\n IOS = \"ios\",\n WEB = \"web\",\n}\n\nexport enum EnumRelationResource {\n EVENT_INVITE_VENDOR = \"event_invite_vendor\",\n VENDOR_APPLICATION_TO_EVENT = \"vendor_application_to_event\",\n}\n\nexport enum EnumNotificationResourceType {\n ADDED_AS_PARTNER_EVENT = \"added_as_partner_event\",\n ADDED_AS_PARTNER_VENDOR = \"added_as_partner_vendor\",\n APPROVED_EVENT = \"approved_event\",\n APPROVED_VENDOR = \"approved_vendor\",\n CREATED_EVENT = \"created_event\",\n CREATED_VENDOR = \"created_vendor\",\n EVENT_INVITE_VENDOR = EnumRelationResource.EVENT_INVITE_VENDOR,\n NEW_CHAT_MESSAGE = \"new_chat_message\",\n VENDOR_APPLICATION_TO_EVENT = EnumRelationResource.VENDOR_APPLICATION_TO_EVENT,\n}\n\nexport enum EnumNotificationType {\n EVENT = EnumResourceType.EVENT,\n VENDOR = EnumResourceType.VENDOR,\n RELATION = \"relation\",\n CHAT = \"chat\",\n SYSTEM = \"system\",\n}\n\nexport enum EnumRegions {\n Auckland = \"Auckland\",\n BayOfPlentyGisborne = \"Bay of Plenty & Gisborne\",\n Canterbury = \"Canterbury\",\n HawkesBay = \"Hawke's Bay\",\n ManawatuWanganui = \"Manawatu-Wanganui\",\n MarlboroughNelson = \"Marlborough & Nelson\",\n Northland = \"Northland\",\n SouthlandOtago = \"Southland & Otago\",\n Taranaki = \"Taranaki\",\n Waikato = \"Waikato\",\n Wellington = \"Wellington\",\n TasmanWestCoast = \"Tasman & West Coast\",\n}\n\nexport enum ImageTypeEnum {\n AVATAR = \"avatar\",\n COVER = \"cover\",\n IMAGE = \"image\",\n LOGO = \"logo\",\n}\n\nexport enum EnumUserLicence {\n PRO_EVENT = \"pro_event\",\n PRO_PLUS_EVENT = \"pro_plus_event\",\n PRO_PLUS_VENDOR = \"pro_plus_vendor\",\n PRO_VENDOR = \"pro_vendor\",\n STANDARD_EVENT = \"standard_event\",\n STANDARD_VENDOR = \"standard_vendor\",\n}\n\nexport enum EnumUserRole {\n ADMIN = \"admin\",\n CUSTOMER = \"customer\",\n}\n\nexport enum EnumSocialMedia {\n FACEBOOK = \"facebook\",\n INSTAGRAM = \"instagram\",\n TIKTOK = \"tiktok\",\n TWITTER = \"twitter\",\n WEBSITE = \"website\",\n YOUTUBE = \"youtube\",\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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AAQ;AACR,EAAAA,eAAA,WAAQ;AACR,EAAAA,eAAA,UAAO;AAJG,SAAAA;AAAA,GAAA;AAOL,IAAK,kBAAL,kBAAKC,qBAAL;AACL,EAAAA,iBAAA,eAAY;AACZ,EAAAA,iBAAA,oBAAiB;AACjB,EAAAA,iBAAA,qBAAkB;AAClB,EAAAA,iBAAA,gBAAa;AACb,EAAAA,iBAAA,oBAAiB;AACjB,EAAAA,iBAAA,qBAAkB;AANR,SAAAA;AAAA,GAAA;AASL,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,WAAQ;AACR,EAAAA,cAAA,cAAW;AAFD,SAAAA;AAAA,GAAA;AAKL,IAAK,kBAAL,kBAAKC,qBAAL;AACL,EAAAA,iBAAA,cAAW;AACX,EAAAA,iBAAA,eAAY;AACZ,EAAAA,iBAAA,YAAS;AACT,EAAAA,iBAAA,aAAU;AACV,EAAAA,iBAAA,aAAU;AACV,EAAAA,iBAAA,aAAU;AANA,SAAAA;AAAA,GAAA;","names":["EnumInviteStatus","EnumChatType","EnumPaymentMethod","EnumFoodFlavor","EnumResourceType","EnumEventType","EnumVendorType","EnumOSPlatform","EnumRelationResource","EnumNotificationResourceType","EnumNotificationType","EnumRegions","ImageTypeEnum","EnumUserLicence","EnumUserRole","EnumSocialMedia"]}
|
package/dist/enums/index.d.mts
CHANGED
|
@@ -32,15 +32,15 @@ declare enum EnumResourceType {
|
|
|
32
32
|
VENDOR = "vendor"
|
|
33
33
|
}
|
|
34
34
|
declare enum EnumEventType {
|
|
35
|
-
EXPO = "
|
|
36
|
-
FAIR = "
|
|
37
|
-
FESTIVAL = "
|
|
38
|
-
MARKET = "
|
|
35
|
+
EXPO = "Expo",
|
|
36
|
+
FAIR = "Fair",
|
|
37
|
+
FESTIVAL = "Festival",
|
|
38
|
+
MARKET = "Market"
|
|
39
39
|
}
|
|
40
40
|
declare enum EnumVendorType {
|
|
41
|
-
STALLHOLDER = "
|
|
42
|
-
SHOP = "
|
|
43
|
-
CHARITY = "
|
|
41
|
+
STALLHOLDER = "Stallholder",
|
|
42
|
+
SHOP = "Shop",
|
|
43
|
+
CHARITY = "Charity"
|
|
44
44
|
}
|
|
45
45
|
declare enum EnumOSPlatform {
|
|
46
46
|
ANDROID = "android",
|
package/dist/enums/index.d.ts
CHANGED
|
@@ -32,15 +32,15 @@ declare enum EnumResourceType {
|
|
|
32
32
|
VENDOR = "vendor"
|
|
33
33
|
}
|
|
34
34
|
declare enum EnumEventType {
|
|
35
|
-
EXPO = "
|
|
36
|
-
FAIR = "
|
|
37
|
-
FESTIVAL = "
|
|
38
|
-
MARKET = "
|
|
35
|
+
EXPO = "Expo",
|
|
36
|
+
FAIR = "Fair",
|
|
37
|
+
FESTIVAL = "Festival",
|
|
38
|
+
MARKET = "Market"
|
|
39
39
|
}
|
|
40
40
|
declare enum EnumVendorType {
|
|
41
|
-
STALLHOLDER = "
|
|
42
|
-
SHOP = "
|
|
43
|
-
CHARITY = "
|
|
41
|
+
STALLHOLDER = "Stallholder",
|
|
42
|
+
SHOP = "Shop",
|
|
43
|
+
CHARITY = "Charity"
|
|
44
44
|
}
|
|
45
45
|
declare enum EnumOSPlatform {
|
|
46
46
|
ANDROID = "android",
|
package/dist/enums/index.mjs
CHANGED
|
@@ -134,7 +134,7 @@ import_dayjs.default.extend(import_timezone.default);
|
|
|
134
134
|
import_dayjs.default.extend(import_isSameOrAfter.default);
|
|
135
135
|
var mapArrayToOptions = (items) => items.map((item) => ({
|
|
136
136
|
label: item.replace(/_/g, " "),
|
|
137
|
-
value: item.replace(/\s+/g, "_")
|
|
137
|
+
value: item.replace(/\s+/g, "_")
|
|
138
138
|
}));
|
|
139
139
|
var statusOptions = [
|
|
140
140
|
...Object.values(EnumInviteStatus).map((status) => ({
|