@timardex/cluemart-shared 1.0.65 → 1.0.66
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/formFields/index.d.mts +1 -1
- package/dist/formFields/index.d.ts +1 -1
- package/dist/{global-CmHtFudt.d.ts → global-BGkMOKi_.d.ts} +3 -3
- package/dist/{global-DFWO619h.d.mts → global-CQkmy_ty.d.mts} +3 -3
- package/dist/graphql/index.d.mts +1 -1
- package/dist/graphql/index.d.ts +1 -1
- package/dist/hooks/index.cjs +17 -1
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.mjs +17 -1
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +17 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.mjs +17 -1
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -199,7 +199,7 @@ type RelationDate = {
|
|
|
199
199
|
interface RelationType {
|
|
200
200
|
_id?: string;
|
|
201
201
|
apiMessage?: string;
|
|
202
|
-
chatId
|
|
202
|
+
chatId?: string;
|
|
203
203
|
createdAt?: string;
|
|
204
204
|
lastUpdateBy: EnumResourceType;
|
|
205
205
|
marketId: string;
|
|
@@ -267,8 +267,8 @@ interface CreateMarketFormData {
|
|
|
267
267
|
watch: UseFormWatch<MarketFormData>;
|
|
268
268
|
}
|
|
269
269
|
interface MarketType extends BaseResourceType {
|
|
270
|
-
dateTime:
|
|
271
|
-
location:
|
|
270
|
+
dateTime: DateTimeType[];
|
|
271
|
+
location: LocationType;
|
|
272
272
|
marketInfoId: string;
|
|
273
273
|
provider: string;
|
|
274
274
|
tags: string[];
|
package/dist/index.d.ts
CHANGED
|
@@ -199,7 +199,7 @@ type RelationDate = {
|
|
|
199
199
|
interface RelationType {
|
|
200
200
|
_id?: string;
|
|
201
201
|
apiMessage?: string;
|
|
202
|
-
chatId
|
|
202
|
+
chatId?: string;
|
|
203
203
|
createdAt?: string;
|
|
204
204
|
lastUpdateBy: EnumResourceType;
|
|
205
205
|
marketId: string;
|
|
@@ -267,8 +267,8 @@ interface CreateMarketFormData {
|
|
|
267
267
|
watch: UseFormWatch<MarketFormData>;
|
|
268
268
|
}
|
|
269
269
|
interface MarketType extends BaseResourceType {
|
|
270
|
-
dateTime:
|
|
271
|
-
location:
|
|
270
|
+
dateTime: DateTimeType[];
|
|
271
|
+
location: LocationType;
|
|
272
272
|
marketInfoId: string;
|
|
273
273
|
provider: string;
|
|
274
274
|
tags: string[];
|
package/dist/index.mjs
CHANGED
|
@@ -423,7 +423,23 @@ var globalResourceSchema = yup.object().shape({
|
|
|
423
423
|
import * as yup2 from "yup";
|
|
424
424
|
var nzBankAccountRegex = /^\d{2}-\d{4}-\d{7}-\d{2}$/;
|
|
425
425
|
var marketSchema = globalResourceSchema.shape({
|
|
426
|
-
dateTime: yup2.array().of(dateTimeSchema).required("DateTime is required")
|
|
426
|
+
dateTime: yup2.array().of(dateTimeSchema).min(1, "At least one Market date required").required("DateTime is required").test(
|
|
427
|
+
"unique-start-date-time",
|
|
428
|
+
"Start Date and Time must be unique",
|
|
429
|
+
function(value) {
|
|
430
|
+
if (!value) return true;
|
|
431
|
+
const seen = /* @__PURE__ */ new Set();
|
|
432
|
+
for (const item of value) {
|
|
433
|
+
if (!item.startDate || !item.startTime) continue;
|
|
434
|
+
const key = `${item.startDate}-${item.startTime}`;
|
|
435
|
+
if (seen.has(key)) {
|
|
436
|
+
return false;
|
|
437
|
+
}
|
|
438
|
+
seen.add(key);
|
|
439
|
+
}
|
|
440
|
+
return true;
|
|
441
|
+
}
|
|
442
|
+
),
|
|
427
443
|
location: locationSchema,
|
|
428
444
|
provider: yup2.string().label("Provider").trim().min(3).required("Provider is required"),
|
|
429
445
|
tags: yup2.array().of(yup2.string().defined()).min(1, "Tags are required").required("Tags are required")
|