@timardex/cluemart-shared 1.1.67 → 1.1.69
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/{ad-CNg5-GwQ.d.mts → ad-BUzelhXi.d.mts} +1 -1
- package/dist/{ad-CIIexObo.d.ts → ad-C5w8vya7.d.ts} +1 -1
- package/dist/{auth-D8C8i97l.d.ts → auth-BDkfwR4h.d.ts} +1 -1
- package/dist/{auth-Do4FsRPf.d.mts → auth-D9LVivLv.d.mts} +1 -1
- package/dist/formFields/index.d.mts +1 -1
- package/dist/formFields/index.d.ts +1 -1
- package/dist/{global-B9wwLKaM.d.ts → global-CFyb5Q6s.d.ts} +1 -1
- package/dist/{global-B_d5mdQP.d.mts → global-CRC06bZa.d.mts} +1 -1
- package/dist/graphql/index.d.mts +3 -3
- package/dist/graphql/index.d.ts +3 -3
- package/dist/hooks/index.cjs +16 -17
- 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 +16 -17
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +16 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +16 -17
- package/dist/index.mjs.map +1 -1
- package/dist/{notification-BDyTB052.d.mts → notification-C3ZNy_xm.d.mts} +1 -1
- package/dist/{notification-D7T-_hL5.d.ts → notification-CXIMg_-O.d.ts} +1 -1
- package/dist/types/index.d.mts +4 -4
- package/dist/types/index.d.ts +4 -4
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EnumOSPlatform, EnumResourceType, EnumUserLicence, EnumUserRole } from './enums/index.mjs';
|
|
2
|
-
import { C as Category, w as CreateFormData, o as ResourceImageType, p as SocialMediaType } from './global-
|
|
2
|
+
import { C as Category, w as CreateFormData, o as ResourceImageType, p as SocialMediaType } from './global-CRC06bZa.mjs';
|
|
3
3
|
|
|
4
4
|
interface TestersFormData {
|
|
5
5
|
categories: Category[] | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EnumOSPlatform, EnumResourceType, EnumUserLicence, EnumUserRole } from './enums/index.js';
|
|
2
|
-
import { C as Category, w as CreateFormData, o as ResourceImageType, p as SocialMediaType } from './global-
|
|
2
|
+
import { C as Category, w as CreateFormData, o as ResourceImageType, p as SocialMediaType } from './global-CFyb5Q6s.js';
|
|
3
3
|
|
|
4
4
|
interface TestersFormData {
|
|
5
5
|
categories: Category[] | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FormField, a as FormDateField, O as OptionItem, R as Requirement, S as StallType, C as Category } from '../global-
|
|
1
|
+
import { F as FormField, a as FormDateField, O as OptionItem, R as Requirement, S as StallType, C as Category } from '../global-CRC06bZa.mjs';
|
|
2
2
|
import 'react-hook-form';
|
|
3
3
|
import '../enums/index.mjs';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FormField, a as FormDateField, O as OptionItem, R as Requirement, S as StallType, C as Category } from '../global-
|
|
1
|
+
import { F as FormField, a as FormDateField, O as OptionItem, R as Requirement, S as StallType, C as Category } from '../global-CFyb5Q6s.js';
|
|
2
2
|
import 'react-hook-form';
|
|
3
3
|
import '../enums/index.js';
|
|
4
4
|
|
|
@@ -94,7 +94,7 @@ interface StallholderFormData extends BaseResourceTypeFormData {
|
|
|
94
94
|
categories: Category[];
|
|
95
95
|
locations?: StallholderLocation[] | null;
|
|
96
96
|
multiLocation: boolean;
|
|
97
|
-
products
|
|
97
|
+
products?: string[] | null;
|
|
98
98
|
specialities?: string[] | null;
|
|
99
99
|
}
|
|
100
100
|
type CreateStallholderFormData = CreateFormData<StallholderFormData>;
|
|
@@ -94,7 +94,7 @@ interface StallholderFormData extends BaseResourceTypeFormData {
|
|
|
94
94
|
categories: Category[];
|
|
95
95
|
locations?: StallholderLocation[] | null;
|
|
96
96
|
multiLocation: boolean;
|
|
97
|
-
products
|
|
97
|
+
products?: string[] | null;
|
|
98
98
|
specialities?: string[] | null;
|
|
99
99
|
}
|
|
100
100
|
type CreateStallholderFormData = CreateFormData<StallholderFormData>;
|
package/dist/graphql/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as _apollo_client from '@apollo/client';
|
|
2
|
-
import { C as ChatType, N as NotificationType, a as NotificationCount } from '../notification-
|
|
3
|
-
import { M as MarketType, b as MarketInfoType, c as RelationType, d as ResourceConnectionsType, e as StallholderType, f as StallholderInfoType } from '../global-
|
|
2
|
+
import { C as ChatType, N as NotificationType, a as NotificationCount } from '../notification-C3ZNy_xm.mjs';
|
|
3
|
+
import { M as MarketType, b as MarketInfoType, c as RelationType, d as ResourceConnectionsType, e as StallholderType, f as StallholderInfoType } from '../global-CRC06bZa.mjs';
|
|
4
4
|
import { EnumResourceType } from '../enums/index.mjs';
|
|
5
|
-
import { T as TesterType, U as UserType, A as AdType, E as EnumAdStatus } from '../ad-
|
|
5
|
+
import { T as TesterType, U as UserType, A as AdType, E as EnumAdStatus } from '../ad-BUzelhXi.mjs';
|
|
6
6
|
import 'react-hook-form';
|
|
7
7
|
|
|
8
8
|
declare const useAdminUpdateResourceType: () => {
|
package/dist/graphql/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as _apollo_client from '@apollo/client';
|
|
2
|
-
import { C as ChatType, N as NotificationType, a as NotificationCount } from '../notification-
|
|
3
|
-
import { M as MarketType, b as MarketInfoType, c as RelationType, d as ResourceConnectionsType, e as StallholderType, f as StallholderInfoType } from '../global-
|
|
2
|
+
import { C as ChatType, N as NotificationType, a as NotificationCount } from '../notification-CXIMg_-O.js';
|
|
3
|
+
import { M as MarketType, b as MarketInfoType, c as RelationType, d as ResourceConnectionsType, e as StallholderType, f as StallholderInfoType } from '../global-CFyb5Q6s.js';
|
|
4
4
|
import { EnumResourceType } from '../enums/index.js';
|
|
5
|
-
import { T as TesterType, U as UserType, A as AdType, E as EnumAdStatus } from '../ad-
|
|
5
|
+
import { T as TesterType, U as UserType, A as AdType, E as EnumAdStatus } from '../ad-C5w8vya7.js';
|
|
6
6
|
import 'react-hook-form';
|
|
7
7
|
|
|
8
8
|
declare const useAdminUpdateResourceType: () => {
|
package/dist/hooks/index.cjs
CHANGED
|
@@ -316,13 +316,13 @@ var dateTimeSchema = yup.object().shape({
|
|
|
316
316
|
startTime: yup.string().label("Start Time").concat(startTimeCannotBeInPastTest).required("Start time is required")
|
|
317
317
|
});
|
|
318
318
|
var stallTypesSchema = yup.object({
|
|
319
|
-
label: yup.string().trim().label("Stall
|
|
319
|
+
label: yup.string().trim().label("Stall Type").required("Stall type is required"),
|
|
320
320
|
price: yup.number().label("Stall Price").min(0.1, "Stall price must be at least 0.1").required("Stall price is required").test(
|
|
321
321
|
"no-leading-zeros",
|
|
322
322
|
"",
|
|
323
323
|
noLeadingZeros("Stall price", { allowDecimal: true })
|
|
324
324
|
),
|
|
325
|
-
stallCapacity: yup.number().typeError("Stall capacity must be a number").min(1, "Stall capacity must be at least 1").integer("Stall capacity must be a whole number").required("Stall capacity is required").test("no-leading-zeros", "", noLeadingZeros("Stall capacity")),
|
|
325
|
+
stallCapacity: yup.number().label("Stall Capacity").typeError("Stall capacity must be a number").min(1, "Stall capacity must be at least 1").integer("Stall capacity must be a whole number").required("Stall capacity is required").test("no-leading-zeros", "", noLeadingZeros("Stall capacity")),
|
|
326
326
|
electricity: yup.object({
|
|
327
327
|
selected: yup.boolean().nullable().optional().label("Electricity Available"),
|
|
328
328
|
price: yup.number().transform(
|
|
@@ -395,20 +395,20 @@ var categorySchema = yup.array().of(
|
|
|
395
395
|
var mobileRegex = /^02\d{7,9}$/;
|
|
396
396
|
var landlineRegex = /^(0(3|4|6|7|9)[0-9]{7})$/;
|
|
397
397
|
var contactDetailsSchema = yup.object({
|
|
398
|
-
email: yup.string().nullable().notRequired().transform(
|
|
398
|
+
email: yup.string().label("Email").nullable().notRequired().transform(
|
|
399
399
|
(value) => typeof value === "string" ? value.trim().toLowerCase() : value
|
|
400
400
|
).test(
|
|
401
401
|
"is-valid-email",
|
|
402
402
|
"Invalid email address",
|
|
403
403
|
(value) => !value || yup.string().email().isValidSync(value)
|
|
404
404
|
).label("Email"),
|
|
405
|
-
mobilePhone: yup.string().nullable().notRequired().test(
|
|
405
|
+
mobilePhone: yup.string().label("Mobile Phone").nullable().notRequired().test(
|
|
406
406
|
"mobile-phone",
|
|
407
407
|
"Mobile must start with 02 and be 9\u201311 digits",
|
|
408
408
|
(value) => !value || mobileRegex.test(value)
|
|
409
409
|
// skip empty values
|
|
410
410
|
),
|
|
411
|
-
landlinePhone: yup.string().nullable().notRequired().test(
|
|
411
|
+
landlinePhone: yup.string().label("Landline Phone").nullable().notRequired().test(
|
|
412
412
|
"landline-phone",
|
|
413
413
|
"Landline must start with 03, 04, 06, 07, or 09 (not 090) and have 7 digits after area code",
|
|
414
414
|
(value) => !value || landlineRegex.test(value)
|
|
@@ -465,11 +465,11 @@ var paymentInfoSchema = yup2.object({
|
|
|
465
465
|
});
|
|
466
466
|
var marketInfoSchema = yup2.object().shape({
|
|
467
467
|
contactDetails: contactDetailsSchema,
|
|
468
|
-
applicationDeadlineHours: yup2.number().nullable().transform((value, originalValue) => originalValue === "" ? null : value).typeError("Application deadline hours must be a number").min(1, "Application deadline hours must be at least 1").required("Application deadline hours is required").test("no-leading-zeros", "", noLeadingZeros("Application deadline hours")),
|
|
468
|
+
applicationDeadlineHours: yup2.number().label("Application Deadline Hours").nullable().transform((value, originalValue) => originalValue === "" ? null : value).typeError("Application deadline hours must be a number").min(1, "Application deadline hours must be at least 1").required("Application deadline hours is required").test("no-leading-zeros", "", noLeadingZeros("Application deadline hours")),
|
|
469
469
|
dateTime: yup2.array().of(dateTimeWithPriceSchema).required("DateTime is required"),
|
|
470
470
|
marketId: yup2.string().trim().required("Market ID is required"),
|
|
471
|
-
packInTime: yup2.number().typeError("Pack in time must be a number").min(1, "Pack in time must be at least 1").required("Pack in time is required").test("no-leading-zeros", "", noLeadingZeros("Pack in time")),
|
|
472
|
-
paymentDueHours: yup2.number().typeError("Payment due hours must be a number").min(1, "Payment due hours must be at least 1").required("Payment due hours is required").test("no-leading-zeros", "", noLeadingZeros("Payment due hours")),
|
|
471
|
+
packInTime: yup2.number().label("Pack In Time").typeError("Pack in time must be a number").min(1, "Pack in time must be at least 1").required("Pack in time is required").test("no-leading-zeros", "", noLeadingZeros("Pack in time")),
|
|
472
|
+
paymentDueHours: yup2.number().label("Payment Due Hours").typeError("Payment due hours must be a number").min(1, "Payment due hours must be at least 1").required("Payment due hours is required").test("no-leading-zeros", "", noLeadingZeros("Payment due hours")),
|
|
473
473
|
paymentInfo: yup2.array().of(paymentInfoSchema).min(1, "At least one payment info is required").required("Payment info is required")
|
|
474
474
|
});
|
|
475
475
|
|
|
@@ -477,8 +477,7 @@ var marketInfoSchema = yup2.object().shape({
|
|
|
477
477
|
var yup3 = __toESM(require("yup"));
|
|
478
478
|
var stallHolderSchema = globalResourceSchema.shape({
|
|
479
479
|
categories: categorySchema.min(1, "Category list must contain at least one item").required("Categories are required"),
|
|
480
|
-
multiLocation: yup3.boolean().required("Multi location is required")
|
|
481
|
-
products: yup3.array().of(yup3.string().defined()).min(1, "Product list must contain at least one item").required("Products are required")
|
|
480
|
+
multiLocation: yup3.boolean().required("Multi location is required")
|
|
482
481
|
});
|
|
483
482
|
var stallholderInfoSchema = yup3.object().shape({
|
|
484
483
|
contactDetails: contactDetailsSchema,
|
|
@@ -527,10 +526,10 @@ var yup4 = __toESM(require("yup"));
|
|
|
527
526
|
var userSchema = yup4.object().shape({
|
|
528
527
|
active: yup4.boolean().required("Active is required"),
|
|
529
528
|
email: emailRequiredSchema,
|
|
530
|
-
firstName: yup4.string().required("First name is required"),
|
|
531
|
-
lastName: yup4.string().required("Last name is required"),
|
|
529
|
+
firstName: yup4.string().label("First Name").required("First name is required"),
|
|
530
|
+
lastName: yup4.string().label("Last Name").required("Last name is required"),
|
|
532
531
|
password: passwordSchema,
|
|
533
|
-
preferredRegion: yup4.string().required("Preferred region is required"),
|
|
532
|
+
preferredRegion: yup4.string().label("Preferred Region").required("Preferred region is required"),
|
|
534
533
|
// eslint-disable-next-line sort-keys
|
|
535
534
|
confirmPassword: yup4.string().oneOf([yup4.ref("password")], "Passwords must match").required("Confirm Password is required"),
|
|
536
535
|
role: yup4.mixed().oneOf(Object.values(EnumUserRole)).required("Role is required")
|
|
@@ -734,7 +733,7 @@ var defaultStallholderFormValues = {
|
|
|
734
733
|
categories: [],
|
|
735
734
|
locations: null,
|
|
736
735
|
multiLocation: false,
|
|
737
|
-
products:
|
|
736
|
+
products: null,
|
|
738
737
|
specialities: null
|
|
739
738
|
};
|
|
740
739
|
var defaultStallholderInfoFormValues = {
|
|
@@ -1415,9 +1414,9 @@ var import_react_hook_form12 = require("react-hook-form");
|
|
|
1415
1414
|
var yup8 = __toESM(require("yup"));
|
|
1416
1415
|
var contactUsSchema = yup8.object().shape({
|
|
1417
1416
|
email: emailRequiredSchema,
|
|
1418
|
-
firstName: yup8.string().required("First name is required"),
|
|
1419
|
-
lastName: yup8.string().required("Last name is required"),
|
|
1420
|
-
message: yup8.string().required("Message is required")
|
|
1417
|
+
firstName: yup8.string().label("First Name").required("First name is required"),
|
|
1418
|
+
lastName: yup8.string().label("Last Name").required("Last name is required"),
|
|
1419
|
+
message: yup8.string().label("Message").required("Message is required")
|
|
1421
1420
|
});
|
|
1422
1421
|
|
|
1423
1422
|
// src/hooks/useContactUsForm.ts
|