@timardex/cluemart-shared 1.0.15 → 1.0.16
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-CdcH8nqw.d.mts +84 -0
- package/dist/auth-TM_XttY3.d.ts +84 -0
- package/dist/chat-NGx5Emrr.d.mts +27 -0
- package/dist/chat-NGx5Emrr.d.ts +27 -0
- package/dist/chunk-K5NK2CK5.mjs +133 -0
- package/dist/chunk-K5NK2CK5.mjs.map +1 -0
- package/dist/chunk-L2H5WFGC.mjs +100 -0
- package/dist/chunk-L2H5WFGC.mjs.map +1 -0
- package/dist/enums/index.cjs +134 -0
- package/dist/enums/index.cjs.map +1 -0
- package/dist/enums/index.d.mts +75 -0
- package/dist/enums/index.d.ts +75 -0
- package/dist/enums/index.mjs +27 -0
- package/dist/enums/index.mjs.map +1 -0
- package/dist/formFields/index.cjs +888 -0
- package/dist/formFields/index.cjs.map +1 -0
- package/dist/formFields/index.d.mts +60 -0
- package/dist/formFields/index.d.ts +60 -0
- package/dist/formFields/index.mjs +754 -0
- package/dist/formFields/index.mjs.map +1 -0
- package/dist/global-B7gB8cvC.d.ts +338 -0
- package/dist/global-B8kYikwQ.d.mts +338 -0
- package/dist/graphql/index.cjs +1634 -0
- package/dist/graphql/index.cjs.map +1 -0
- package/dist/graphql/index.d.mts +299 -0
- package/dist/graphql/index.d.ts +299 -0
- package/dist/graphql/index.mjs +1558 -0
- package/dist/graphql/index.mjs.map +1 -0
- package/dist/hooks/index.cjs +1090 -0
- package/dist/hooks/index.cjs.map +1 -0
- package/dist/hooks/index.d.mts +78 -0
- package/dist/hooks/index.d.ts +78 -0
- package/dist/hooks/index.mjs +970 -0
- package/dist/hooks/index.mjs.map +1 -0
- package/dist/index.cjs +10 -48
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.mts +1 -287
- package/dist/index.d.ts +1 -287
- package/dist/index.mjs +8 -26
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.cjs +19 -0
- package/dist/types/index.cjs.map +1 -0
- package/dist/types/index.d.mts +12 -0
- package/dist/types/index.d.ts +12 -0
- package/dist/types/index.mjs +1 -0
- package/dist/types/index.mjs.map +1 -0
- package/dist/utils/index.cjs +215 -0
- package/dist/utils/index.cjs.map +1 -0
- package/dist/utils/index.d.mts +66 -0
- package/dist/utils/index.d.ts +66 -0
- package/dist/utils/index.mjs +38 -0
- package/dist/utils/index.mjs.map +1 -0
- package/package.json +37 -4
- package/dist/index.js.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
// src/utils.ts
|
|
1
|
+
// src/utils/index.ts
|
|
2
2
|
import dayjs, { extend } from "dayjs";
|
|
3
3
|
import customParseFormat from "dayjs/plugin/customParseFormat";
|
|
4
|
+
import isSameOrAfter from "dayjs/plugin/isSameOrAfter";
|
|
4
5
|
import timezone from "dayjs/plugin/timezone";
|
|
5
6
|
import utc from "dayjs/plugin/utc";
|
|
6
7
|
|
|
7
|
-
// src/enums.ts
|
|
8
|
+
// src/enums/index.ts
|
|
8
9
|
var EnumInviteStatus = /* @__PURE__ */ ((EnumInviteStatus2) => {
|
|
9
10
|
EnumInviteStatus2["ACCEPTED"] = "Accepted";
|
|
10
11
|
EnumInviteStatus2["COMPLETED"] = "Completed";
|
|
@@ -90,12 +91,13 @@ var EnumUserRole = /* @__PURE__ */ ((EnumUserRole2) => {
|
|
|
90
91
|
return EnumUserRole2;
|
|
91
92
|
})(EnumUserRole || {});
|
|
92
93
|
|
|
93
|
-
// src/utils.ts
|
|
94
|
+
// src/utils/index.ts
|
|
94
95
|
var dateFormat = "DD-MM-YYYY";
|
|
95
96
|
var timeFormat = "HH:mm";
|
|
96
97
|
extend(customParseFormat);
|
|
97
98
|
extend(utc);
|
|
98
99
|
extend(timezone);
|
|
100
|
+
extend(isSameOrAfter);
|
|
99
101
|
var formatDate = (dateStr, display = "datetime", timeStr) => {
|
|
100
102
|
const dateTimeStr = timeStr ? `${dateStr} ${timeStr}` : dateStr;
|
|
101
103
|
const dateTime = timeStr ? dayjs(dateTimeStr, `${dateFormat} ${timeFormat}`) : dayjs(dateStr, dateFormat);
|
|
@@ -274,7 +276,7 @@ import { useForm } from "react-hook-form";
|
|
|
274
276
|
// src/yupSchema/global.ts
|
|
275
277
|
import dayjs2, { extend as extend2 } from "dayjs";
|
|
276
278
|
import customParseFormat2 from "dayjs/plugin/customParseFormat";
|
|
277
|
-
import
|
|
279
|
+
import isSameOrAfter2 from "dayjs/plugin/isSameOrAfter";
|
|
278
280
|
import * as yup from "yup";
|
|
279
281
|
var noLeadingZeros = (fieldName, options = {}) => {
|
|
280
282
|
return function(value, context) {
|
|
@@ -288,7 +290,7 @@ var noLeadingZeros = (fieldName, options = {}) => {
|
|
|
288
290
|
return true;
|
|
289
291
|
};
|
|
290
292
|
};
|
|
291
|
-
extend2(
|
|
293
|
+
extend2(isSameOrAfter2);
|
|
292
294
|
extend2(customParseFormat2);
|
|
293
295
|
var now = dayjs2();
|
|
294
296
|
var endDateNotInPastTest = yup.string().test("not-in-past", "End date cannot be in the past", (value) => {
|
|
@@ -3372,49 +3374,33 @@ export {
|
|
|
3372
3374
|
capitalizeFirstLetter,
|
|
3373
3375
|
categoryColors,
|
|
3374
3376
|
dateFormat,
|
|
3375
|
-
dateTimeSchema,
|
|
3376
3377
|
defaultMarketFormValues,
|
|
3377
3378
|
defaultRegion,
|
|
3378
3379
|
defaultStallholderApplyFormValues,
|
|
3379
3380
|
defaultStallholderFormValues,
|
|
3380
|
-
emailSchema,
|
|
3381
|
-
endDateAfterStartDateTest,
|
|
3382
|
-
endDateNotInPastTest,
|
|
3383
|
-
endTimeMustBeAfterStartTimeTest,
|
|
3384
3381
|
formatDate,
|
|
3385
3382
|
formatTimestamp,
|
|
3386
3383
|
getCurrentAndFutureDates,
|
|
3387
3384
|
getFutureDatesAfterThreshold,
|
|
3388
3385
|
globalDefaultValues,
|
|
3389
|
-
globalResourceSchema,
|
|
3390
|
-
locationSchema,
|
|
3391
3386
|
loginFields,
|
|
3392
|
-
loginSchema,
|
|
3393
3387
|
mapArrayToOptions,
|
|
3394
3388
|
marketBasicInfoFields,
|
|
3395
3389
|
marketEndDateFields,
|
|
3396
3390
|
marketPriceByDateFields,
|
|
3397
|
-
marketSchema,
|
|
3398
3391
|
marketStartDateFields,
|
|
3399
|
-
noLeadingZeros,
|
|
3400
3392
|
packagingOptions,
|
|
3401
|
-
passwordSchema,
|
|
3402
3393
|
paymentMethodOptions,
|
|
3403
3394
|
producedIngOptions,
|
|
3404
3395
|
profileFields,
|
|
3405
3396
|
registerFields,
|
|
3406
|
-
registerSchema,
|
|
3407
3397
|
rejectionPolicyOptions,
|
|
3408
3398
|
removeTypename,
|
|
3409
3399
|
requestPasswordResetFields,
|
|
3410
|
-
requestPasswordResetSchema,
|
|
3411
3400
|
resetPasswordFields,
|
|
3412
|
-
resetPasswordSchema,
|
|
3413
3401
|
sortDatesByProximity,
|
|
3414
3402
|
stallApplicationInfo,
|
|
3415
3403
|
stallApplicationInfoPaymentTarget,
|
|
3416
|
-
stallHolderSchema,
|
|
3417
|
-
stallholderApplyFormSchema,
|
|
3418
3404
|
stallholderBasicInfoFields,
|
|
3419
3405
|
stallholderElectricity,
|
|
3420
3406
|
stallholderEndDateFields,
|
|
@@ -3429,8 +3415,6 @@ export {
|
|
|
3429
3415
|
stallholderStallSize,
|
|
3430
3416
|
stallholderStartDateFields,
|
|
3431
3417
|
stallholderTable,
|
|
3432
|
-
startDateNotInPastTest,
|
|
3433
|
-
startTimeCannotBeInPastTest,
|
|
3434
3418
|
statusOptions,
|
|
3435
3419
|
tagOptions,
|
|
3436
3420
|
timeFormat,
|
|
@@ -3495,8 +3479,6 @@ export {
|
|
|
3495
3479
|
useUserForm,
|
|
3496
3480
|
useValidateToken,
|
|
3497
3481
|
useValidateTokenForm,
|
|
3498
|
-
|
|
3499
|
-
validateTokenFields,
|
|
3500
|
-
validateTokenSchema
|
|
3482
|
+
validateTokenFields
|
|
3501
3483
|
};
|
|
3502
3484
|
//# sourceMappingURL=index.mjs.map
|