@timardex/cluemart-shared 1.5.493 → 1.5.495
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/{chunk-USQKKCIA.mjs → chunk-534WN2SR.mjs} +7 -3
- package/dist/chunk-534WN2SR.mjs.map +1 -0
- package/dist/{chunk-KYDS4REE.mjs → chunk-F4IWHY4O.mjs} +98 -18
- package/dist/chunk-F4IWHY4O.mjs.map +1 -0
- package/dist/{chunk-GSNFQJBZ.mjs → chunk-KPO6ZYQ4.mjs} +2 -95
- package/dist/chunk-KPO6ZYQ4.mjs.map +1 -0
- package/dist/chunk-QG5DPPZI.mjs +96 -0
- package/dist/chunk-QG5DPPZI.mjs.map +1 -0
- package/dist/{chunk-4LT5GOOP.mjs → chunk-SKWWATIR.mjs} +3 -3
- package/dist/enums/index.cjs +6 -2
- package/dist/enums/index.cjs.map +1 -1
- package/dist/enums/index.d.mts +7 -3
- package/dist/enums/index.d.ts +7 -3
- package/dist/enums/index.mjs +1 -1
- package/dist/formFields/index.cjs +11 -6
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.mjs +4 -3
- package/dist/game-DTrJRy_s.d.mts +120 -0
- package/dist/game-lvz2AUuu.d.ts +120 -0
- package/dist/graphql/index.d.mts +2 -1
- package/dist/graphql/index.d.ts +2 -1
- package/dist/graphql/index.mjs +1 -1
- package/dist/hooks/index.cjs +24 -19
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +2 -1
- package/dist/hooks/index.d.ts +2 -1
- package/dist/hooks/index.mjs +5 -4
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +205 -120
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +17 -4
- package/dist/index.d.ts +17 -4
- package/dist/index.mjs +203 -120
- package/dist/index.mjs.map +1 -1
- package/dist/{post-C67Q-sXR.d.ts → post-DXOToXeT.d.ts} +3 -119
- package/dist/{post-C9rtHepe.d.mts → post-wptsHKVN.d.mts} +3 -119
- package/dist/types/index.d.mts +2 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.mjs +6 -4
- package/dist/utils/index.cjs +174 -15
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.mts +11 -1
- package/dist/utils/index.d.ts +11 -1
- package/dist/utils/index.mjs +7 -2
- package/package.json +1 -1
- package/dist/chunk-GSNFQJBZ.mjs.map +0 -1
- package/dist/chunk-KYDS4REE.mjs.map +0 -1
- package/dist/chunk-USQKKCIA.mjs.map +0 -1
- /package/dist/{chunk-4LT5GOOP.mjs.map → chunk-SKWWATIR.mjs.map} +0 -0
|
@@ -43,9 +43,10 @@ import {
|
|
|
43
43
|
vendorStallSize,
|
|
44
44
|
vendorStartDateFields,
|
|
45
45
|
vendorTable
|
|
46
|
-
} from "../chunk-
|
|
47
|
-
import "../chunk-
|
|
48
|
-
import "../chunk-
|
|
46
|
+
} from "../chunk-SKWWATIR.mjs";
|
|
47
|
+
import "../chunk-F4IWHY4O.mjs";
|
|
48
|
+
import "../chunk-534WN2SR.mjs";
|
|
49
|
+
import "../chunk-QG5DPPZI.mjs";
|
|
49
50
|
export {
|
|
50
51
|
availableCategories,
|
|
51
52
|
availableTagTypes,
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { y as OwnerType } from './global-MMBYi34A.mjs';
|
|
2
|
+
|
|
3
|
+
declare const gameScreenIdentifierList: readonly [{
|
|
4
|
+
readonly clue: "Where your actions turn into a timeline.";
|
|
5
|
+
readonly id: "activities";
|
|
6
|
+
}, {
|
|
7
|
+
readonly clue: "Where conversations happen without speaking.";
|
|
8
|
+
readonly id: "chat";
|
|
9
|
+
}, {
|
|
10
|
+
readonly clue: "The place to redefine who you are.";
|
|
11
|
+
readonly id: "edit-profile";
|
|
12
|
+
}, {
|
|
13
|
+
readonly clue: "A single moment worth showing up for.";
|
|
14
|
+
readonly id: "event";
|
|
15
|
+
}, {
|
|
16
|
+
readonly clue: "What’s happening around you, right now.";
|
|
17
|
+
readonly id: "events-near-me";
|
|
18
|
+
}, {
|
|
19
|
+
readonly clue: "A collection of things worth attending.";
|
|
20
|
+
readonly id: "events";
|
|
21
|
+
}, {
|
|
22
|
+
readonly clue: "What’s happening in a wider area—not just nearby.";
|
|
23
|
+
readonly id: "events/region";
|
|
24
|
+
}, {
|
|
25
|
+
readonly clue: "Where fun becomes a challenge.";
|
|
26
|
+
readonly id: "games";
|
|
27
|
+
}, {
|
|
28
|
+
readonly clue: "Your starting point for everything.";
|
|
29
|
+
readonly id: "home";
|
|
30
|
+
}, {
|
|
31
|
+
readonly clue: "Where the app taps you on the shoulder.";
|
|
32
|
+
readonly id: "notifications";
|
|
33
|
+
}, {
|
|
34
|
+
readonly clue: "Where you fine-tune your experience.";
|
|
35
|
+
readonly id: "options";
|
|
36
|
+
}, {
|
|
37
|
+
readonly clue: "A single collaborator in the ecosystem.";
|
|
38
|
+
readonly id: "partner";
|
|
39
|
+
}, {
|
|
40
|
+
readonly clue: "The network behind the scenes.";
|
|
41
|
+
readonly id: "partners";
|
|
42
|
+
}, {
|
|
43
|
+
readonly clue: "Where you share something with everyone.";
|
|
44
|
+
readonly id: "post";
|
|
45
|
+
}, {
|
|
46
|
+
readonly clue: "Your identity, on display.";
|
|
47
|
+
readonly id: "profile";
|
|
48
|
+
}, {
|
|
49
|
+
readonly clue: "One provider offering something valuable.";
|
|
50
|
+
readonly id: "vendor";
|
|
51
|
+
}, {
|
|
52
|
+
readonly clue: "A marketplace of providers.";
|
|
53
|
+
readonly id: "vendors";
|
|
54
|
+
}, {
|
|
55
|
+
readonly clue: "People who stopped by to see you.";
|
|
56
|
+
readonly id: "visitors";
|
|
57
|
+
}];
|
|
58
|
+
type GamePlacement = (typeof gameScreenIdentifierList)[number]["id"];
|
|
59
|
+
type GamePlacementClue = (typeof gameScreenIdentifierList)[number]["clue"];
|
|
60
|
+
declare enum EnumGameType {
|
|
61
|
+
DAILY_CLUE = "dailyClue"
|
|
62
|
+
}
|
|
63
|
+
declare const gameTypeToDisplayName: Record<EnumGameType, string>;
|
|
64
|
+
type GameDate = {
|
|
65
|
+
startDate: Date;
|
|
66
|
+
endDate: Date;
|
|
67
|
+
};
|
|
68
|
+
type BaseGame = {
|
|
69
|
+
gameDate: GameDate;
|
|
70
|
+
gameSolution: string;
|
|
71
|
+
gameType: EnumGameType;
|
|
72
|
+
};
|
|
73
|
+
type DailyClueGameData = {
|
|
74
|
+
gameFields: BaseGame;
|
|
75
|
+
lastFoundDate: Date | null;
|
|
76
|
+
points: number;
|
|
77
|
+
letterInfo: {
|
|
78
|
+
collected: string[] | null;
|
|
79
|
+
shuffled: string[];
|
|
80
|
+
todaysLetter: string | null;
|
|
81
|
+
todaysClue: GamePlacementClue | null;
|
|
82
|
+
todaysPlacement: GamePlacement | null;
|
|
83
|
+
};
|
|
84
|
+
streak: number;
|
|
85
|
+
};
|
|
86
|
+
type GameDataMap = {
|
|
87
|
+
[EnumGameType.DAILY_CLUE]: DailyClueGameData;
|
|
88
|
+
};
|
|
89
|
+
type GameData = {
|
|
90
|
+
[K in keyof GameDataMap]?: GameDataMap[K] | null;
|
|
91
|
+
};
|
|
92
|
+
declare enum EnumGameStatus {
|
|
93
|
+
GAME_COMPLETED = "GAME_COMPLETED",
|
|
94
|
+
GAME_LEFT = "GAME_LEFT",
|
|
95
|
+
GAME_IN_PROGRESS = "GAME_IN_PROGRESS"
|
|
96
|
+
}
|
|
97
|
+
type GameHistory = {
|
|
98
|
+
gameDate: GameDate;
|
|
99
|
+
gameStatus: EnumGameStatus;
|
|
100
|
+
gameType: EnumGameType;
|
|
101
|
+
pointsEarned: number;
|
|
102
|
+
};
|
|
103
|
+
type GameType = {
|
|
104
|
+
_id: string;
|
|
105
|
+
active: boolean;
|
|
106
|
+
createdAt: Date;
|
|
107
|
+
deletedAt: Date | null;
|
|
108
|
+
gameData: GameData | null;
|
|
109
|
+
gameHistory: GameHistory[] | null;
|
|
110
|
+
owner: OwnerType;
|
|
111
|
+
points: number;
|
|
112
|
+
updatedAt: Date | null;
|
|
113
|
+
};
|
|
114
|
+
type GameLeaderboard = {
|
|
115
|
+
gameHistory: GameHistory[] | null;
|
|
116
|
+
overallPoints: number;
|
|
117
|
+
owner: OwnerType;
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
export { type BaseGame as B, type DailyClueGameData as D, EnumGameStatus as E, type GameType as G, type GameLeaderboard as a, EnumGameType as b, type GameData as c, type GameDate as d, type GameHistory as e, type GamePlacement as f, type GamePlacementClue as g, gameScreenIdentifierList as h, gameTypeToDisplayName as i };
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { y as OwnerType } from './global-B0WdAD-8.js';
|
|
2
|
+
|
|
3
|
+
declare const gameScreenIdentifierList: readonly [{
|
|
4
|
+
readonly clue: "Where your actions turn into a timeline.";
|
|
5
|
+
readonly id: "activities";
|
|
6
|
+
}, {
|
|
7
|
+
readonly clue: "Where conversations happen without speaking.";
|
|
8
|
+
readonly id: "chat";
|
|
9
|
+
}, {
|
|
10
|
+
readonly clue: "The place to redefine who you are.";
|
|
11
|
+
readonly id: "edit-profile";
|
|
12
|
+
}, {
|
|
13
|
+
readonly clue: "A single moment worth showing up for.";
|
|
14
|
+
readonly id: "event";
|
|
15
|
+
}, {
|
|
16
|
+
readonly clue: "What’s happening around you, right now.";
|
|
17
|
+
readonly id: "events-near-me";
|
|
18
|
+
}, {
|
|
19
|
+
readonly clue: "A collection of things worth attending.";
|
|
20
|
+
readonly id: "events";
|
|
21
|
+
}, {
|
|
22
|
+
readonly clue: "What’s happening in a wider area—not just nearby.";
|
|
23
|
+
readonly id: "events/region";
|
|
24
|
+
}, {
|
|
25
|
+
readonly clue: "Where fun becomes a challenge.";
|
|
26
|
+
readonly id: "games";
|
|
27
|
+
}, {
|
|
28
|
+
readonly clue: "Your starting point for everything.";
|
|
29
|
+
readonly id: "home";
|
|
30
|
+
}, {
|
|
31
|
+
readonly clue: "Where the app taps you on the shoulder.";
|
|
32
|
+
readonly id: "notifications";
|
|
33
|
+
}, {
|
|
34
|
+
readonly clue: "Where you fine-tune your experience.";
|
|
35
|
+
readonly id: "options";
|
|
36
|
+
}, {
|
|
37
|
+
readonly clue: "A single collaborator in the ecosystem.";
|
|
38
|
+
readonly id: "partner";
|
|
39
|
+
}, {
|
|
40
|
+
readonly clue: "The network behind the scenes.";
|
|
41
|
+
readonly id: "partners";
|
|
42
|
+
}, {
|
|
43
|
+
readonly clue: "Where you share something with everyone.";
|
|
44
|
+
readonly id: "post";
|
|
45
|
+
}, {
|
|
46
|
+
readonly clue: "Your identity, on display.";
|
|
47
|
+
readonly id: "profile";
|
|
48
|
+
}, {
|
|
49
|
+
readonly clue: "One provider offering something valuable.";
|
|
50
|
+
readonly id: "vendor";
|
|
51
|
+
}, {
|
|
52
|
+
readonly clue: "A marketplace of providers.";
|
|
53
|
+
readonly id: "vendors";
|
|
54
|
+
}, {
|
|
55
|
+
readonly clue: "People who stopped by to see you.";
|
|
56
|
+
readonly id: "visitors";
|
|
57
|
+
}];
|
|
58
|
+
type GamePlacement = (typeof gameScreenIdentifierList)[number]["id"];
|
|
59
|
+
type GamePlacementClue = (typeof gameScreenIdentifierList)[number]["clue"];
|
|
60
|
+
declare enum EnumGameType {
|
|
61
|
+
DAILY_CLUE = "dailyClue"
|
|
62
|
+
}
|
|
63
|
+
declare const gameTypeToDisplayName: Record<EnumGameType, string>;
|
|
64
|
+
type GameDate = {
|
|
65
|
+
startDate: Date;
|
|
66
|
+
endDate: Date;
|
|
67
|
+
};
|
|
68
|
+
type BaseGame = {
|
|
69
|
+
gameDate: GameDate;
|
|
70
|
+
gameSolution: string;
|
|
71
|
+
gameType: EnumGameType;
|
|
72
|
+
};
|
|
73
|
+
type DailyClueGameData = {
|
|
74
|
+
gameFields: BaseGame;
|
|
75
|
+
lastFoundDate: Date | null;
|
|
76
|
+
points: number;
|
|
77
|
+
letterInfo: {
|
|
78
|
+
collected: string[] | null;
|
|
79
|
+
shuffled: string[];
|
|
80
|
+
todaysLetter: string | null;
|
|
81
|
+
todaysClue: GamePlacementClue | null;
|
|
82
|
+
todaysPlacement: GamePlacement | null;
|
|
83
|
+
};
|
|
84
|
+
streak: number;
|
|
85
|
+
};
|
|
86
|
+
type GameDataMap = {
|
|
87
|
+
[EnumGameType.DAILY_CLUE]: DailyClueGameData;
|
|
88
|
+
};
|
|
89
|
+
type GameData = {
|
|
90
|
+
[K in keyof GameDataMap]?: GameDataMap[K] | null;
|
|
91
|
+
};
|
|
92
|
+
declare enum EnumGameStatus {
|
|
93
|
+
GAME_COMPLETED = "GAME_COMPLETED",
|
|
94
|
+
GAME_LEFT = "GAME_LEFT",
|
|
95
|
+
GAME_IN_PROGRESS = "GAME_IN_PROGRESS"
|
|
96
|
+
}
|
|
97
|
+
type GameHistory = {
|
|
98
|
+
gameDate: GameDate;
|
|
99
|
+
gameStatus: EnumGameStatus;
|
|
100
|
+
gameType: EnumGameType;
|
|
101
|
+
pointsEarned: number;
|
|
102
|
+
};
|
|
103
|
+
type GameType = {
|
|
104
|
+
_id: string;
|
|
105
|
+
active: boolean;
|
|
106
|
+
createdAt: Date;
|
|
107
|
+
deletedAt: Date | null;
|
|
108
|
+
gameData: GameData | null;
|
|
109
|
+
gameHistory: GameHistory[] | null;
|
|
110
|
+
owner: OwnerType;
|
|
111
|
+
points: number;
|
|
112
|
+
updatedAt: Date | null;
|
|
113
|
+
};
|
|
114
|
+
type GameLeaderboard = {
|
|
115
|
+
gameHistory: GameHistory[] | null;
|
|
116
|
+
overallPoints: number;
|
|
117
|
+
owner: OwnerType;
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
export { type BaseGame as B, type DailyClueGameData as D, EnumGameStatus as E, type GameType as G, type GameLeaderboard as a, EnumGameType as b, type GameData as c, type GameDate as d, type GameHistory as e, type GamePlacement as f, type GamePlacementClue as g, gameScreenIdentifierList as h, gameTypeToDisplayName as i };
|
package/dist/graphql/index.d.mts
CHANGED
|
@@ -2,7 +2,8 @@ import * as _apollo_client from '@apollo/client';
|
|
|
2
2
|
import { EnumResourceType } from '../enums/index.mjs';
|
|
3
3
|
import { C as ChatType, R as ReportChatUser, N as NotificationCount, a as NotificationType, b as ResourceActivityType } from '../resourceActivities-CqrscA5x.mjs';
|
|
4
4
|
import { E as EventType, c as EventListItemType, d as EventInfoType, e as RelationType, f as ResourceConnectionsType, U as UnregisteredVendorType, V as VendorType, g as VendorInfoType, h as UserLicenceType } from '../global-MMBYi34A.mjs';
|
|
5
|
-
import { U as UserType, P as PartnerType, R as ResourceByUser, A as AdType, E as EnumAdStatus, S as SubscriptionPlansResponse, a as SubscriptionStatusData, b as PostType, c as EnumPostType, d as AppSettingsType
|
|
5
|
+
import { U as UserType, P as PartnerType, R as ResourceByUser, A as AdType, E as EnumAdStatus, S as SubscriptionPlansResponse, a as SubscriptionStatusData, b as PostType, c as EnumPostType, d as AppSettingsType } from '../post-wptsHKVN.mjs';
|
|
6
|
+
import { G as GameType, a as GameLeaderboard } from '../game-DTrJRy_s.mjs';
|
|
6
7
|
import 'react-hook-form';
|
|
7
8
|
|
|
8
9
|
declare const useAdminUpdateResourceType: () => {
|
package/dist/graphql/index.d.ts
CHANGED
|
@@ -2,7 +2,8 @@ import * as _apollo_client from '@apollo/client';
|
|
|
2
2
|
import { EnumResourceType } from '../enums/index.js';
|
|
3
3
|
import { C as ChatType, R as ReportChatUser, N as NotificationCount, a as NotificationType, b as ResourceActivityType } from '../resourceActivities-2FaGRW-i.js';
|
|
4
4
|
import { E as EventType, c as EventListItemType, d as EventInfoType, e as RelationType, f as ResourceConnectionsType, U as UnregisteredVendorType, V as VendorType, g as VendorInfoType, h as UserLicenceType } from '../global-B0WdAD-8.js';
|
|
5
|
-
import { U as UserType, P as PartnerType, R as ResourceByUser, A as AdType, E as EnumAdStatus, S as SubscriptionPlansResponse, a as SubscriptionStatusData, b as PostType, c as EnumPostType, d as AppSettingsType
|
|
5
|
+
import { U as UserType, P as PartnerType, R as ResourceByUser, A as AdType, E as EnumAdStatus, S as SubscriptionPlansResponse, a as SubscriptionStatusData, b as PostType, c as EnumPostType, d as AppSettingsType } from '../post-DXOToXeT.js';
|
|
6
|
+
import { G as GameType, a as GameLeaderboard } from '../game-lvz2AUuu.js';
|
|
6
7
|
import 'react-hook-form';
|
|
7
8
|
|
|
8
9
|
declare const useAdminUpdateResourceType: () => {
|
package/dist/graphql/index.mjs
CHANGED
package/dist/hooks/index.cjs
CHANGED
|
@@ -163,7 +163,7 @@ var React = __toESM(require("react"));
|
|
|
163
163
|
var import_react_hook_form = require("react-hook-form");
|
|
164
164
|
|
|
165
165
|
// src/yupSchema/global.ts
|
|
166
|
-
var
|
|
166
|
+
var import_dayjs3 = __toESM(require("dayjs"));
|
|
167
167
|
var import_customParseFormat2 = __toESM(require("dayjs/plugin/customParseFormat.js"));
|
|
168
168
|
var import_isSameOrAfter2 = __toESM(require("dayjs/plugin/isSameOrAfter.js"));
|
|
169
169
|
var yup = __toESM(require("yup"));
|
|
@@ -276,18 +276,23 @@ var EnumEventDateStatus = /* @__PURE__ */ ((EnumEventDateStatus2) => {
|
|
|
276
276
|
return EnumEventDateStatus2;
|
|
277
277
|
})(EnumEventDateStatus || {});
|
|
278
278
|
|
|
279
|
-
// src/utils/
|
|
279
|
+
// src/utils/dailyClueGame.ts
|
|
280
280
|
var import_dayjs = __toESM(require("dayjs"));
|
|
281
|
+
var import_utc = __toESM(require("dayjs/plugin/utc"));
|
|
282
|
+
import_dayjs.default.extend(import_utc.default);
|
|
283
|
+
|
|
284
|
+
// src/utils/index.ts
|
|
285
|
+
var import_dayjs2 = __toESM(require("dayjs"));
|
|
281
286
|
var import_customParseFormat = __toESM(require("dayjs/plugin/customParseFormat.js"));
|
|
282
287
|
var import_isSameOrAfter = __toESM(require("dayjs/plugin/isSameOrAfter.js"));
|
|
283
288
|
var import_timezone = __toESM(require("dayjs/plugin/timezone.js"));
|
|
284
|
-
var
|
|
289
|
+
var import_utc2 = __toESM(require("dayjs/plugin/utc.js"));
|
|
285
290
|
var dateFormat = "DD-MM-YYYY";
|
|
286
291
|
var timeFormat = "HH:mm";
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
292
|
+
import_dayjs2.default.extend(import_customParseFormat.default);
|
|
293
|
+
import_dayjs2.default.extend(import_utc2.default);
|
|
294
|
+
import_dayjs2.default.extend(import_timezone.default);
|
|
295
|
+
import_dayjs2.default.extend(import_isSameOrAfter.default);
|
|
291
296
|
var mapArrayToOptions = (items) => items.map((item) => ({
|
|
292
297
|
label: item,
|
|
293
298
|
value: item
|
|
@@ -364,8 +369,8 @@ var noLeadingZeros = (fieldName, options = {}) => {
|
|
|
364
369
|
return true;
|
|
365
370
|
};
|
|
366
371
|
};
|
|
367
|
-
|
|
368
|
-
|
|
372
|
+
import_dayjs3.default.extend(import_isSameOrAfter2.default);
|
|
373
|
+
import_dayjs3.default.extend(import_customParseFormat2.default);
|
|
369
374
|
var emailRequiredSchema = yup.string().email("Invalid email address").required("Email is required").label("Email").transform(
|
|
370
375
|
(value) => typeof value === "string" ? value.trim().toLowerCase() : value
|
|
371
376
|
);
|
|
@@ -396,12 +401,12 @@ var contactDetailsSchema = yup.object({
|
|
|
396
401
|
landlinePhone: landlinePhoneSchema
|
|
397
402
|
}).nullable().default(void 0);
|
|
398
403
|
var endDateNotInPastTest = yup.string().test("not-in-past", "End date cannot be in the past", (value) => {
|
|
399
|
-
const now = (0,
|
|
400
|
-
return value ? (0,
|
|
404
|
+
const now = (0, import_dayjs3.default)();
|
|
405
|
+
return value ? (0, import_dayjs3.default)(value, dateFormat, true).isSameOrAfter(now, "day") : false;
|
|
401
406
|
});
|
|
402
407
|
var startDateNotInPastTest = yup.string().test("not-in-past", "Start date cannot be in the past", (value) => {
|
|
403
|
-
const now = (0,
|
|
404
|
-
return value ? (0,
|
|
408
|
+
const now = (0, import_dayjs3.default)();
|
|
409
|
+
return value ? (0, import_dayjs3.default)(value, dateFormat, true).isSameOrAfter(now, "day") : false;
|
|
405
410
|
});
|
|
406
411
|
var endDateAfterStartDateTest = yup.string().test(
|
|
407
412
|
"end-after-start",
|
|
@@ -409,8 +414,8 @@ var endDateAfterStartDateTest = yup.string().test(
|
|
|
409
414
|
function(value) {
|
|
410
415
|
const { startDate } = this.parent;
|
|
411
416
|
if (!startDate || !value) return false;
|
|
412
|
-
return (0,
|
|
413
|
-
(0,
|
|
417
|
+
return (0, import_dayjs3.default)(value, dateFormat, true).isSameOrAfter(
|
|
418
|
+
(0, import_dayjs3.default)(startDate, dateFormat, true),
|
|
414
419
|
"day"
|
|
415
420
|
);
|
|
416
421
|
}
|
|
@@ -421,12 +426,12 @@ var endTimeMustBeAfterStartTimeTest = yup.string().test(
|
|
|
421
426
|
function(value) {
|
|
422
427
|
const { startDate, endDate, startTime } = this.parent;
|
|
423
428
|
if (!startDate || !endDate || !startTime || !value) return false;
|
|
424
|
-
const startDateTime = (0,
|
|
429
|
+
const startDateTime = (0, import_dayjs3.default)(
|
|
425
430
|
`${startDate} ${startTime}`,
|
|
426
431
|
`${dateFormat} ${timeFormat}`,
|
|
427
432
|
true
|
|
428
433
|
);
|
|
429
|
-
const endDateTime = (0,
|
|
434
|
+
const endDateTime = (0, import_dayjs3.default)(
|
|
430
435
|
`${endDate} ${value}`,
|
|
431
436
|
`${dateFormat} ${timeFormat}`,
|
|
432
437
|
true
|
|
@@ -438,10 +443,10 @@ var startTimeCannotBeInPastTest = yup.string().test(
|
|
|
438
443
|
"valid-start-time",
|
|
439
444
|
"Start time cannot be in the past",
|
|
440
445
|
function(value) {
|
|
441
|
-
const now = (0,
|
|
446
|
+
const now = (0, import_dayjs3.default)();
|
|
442
447
|
const { startDate } = this.parent;
|
|
443
448
|
if (!startDate || !value) return false;
|
|
444
|
-
const startDateTime = (0,
|
|
449
|
+
const startDateTime = (0, import_dayjs3.default)(
|
|
445
450
|
`${startDate} ${value}`,
|
|
446
451
|
`${dateFormat} ${timeFormat}`,
|
|
447
452
|
true
|