@timardex/cluemart-shared 1.5.530 → 1.5.532
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-534WN2SR.mjs → chunk-73ULMQM6.mjs} +2 -2
- package/dist/chunk-73ULMQM6.mjs.map +1 -0
- package/dist/{chunk-XEIQR6NA.mjs → chunk-QZE7FORG.mjs} +3 -3
- package/dist/{chunk-LZ2KFVBV.mjs → chunk-RRNJ54MF.mjs} +2 -2
- package/dist/chunk-TXHYVMOH.mjs +97 -0
- package/dist/chunk-TXHYVMOH.mjs.map +1 -0
- package/dist/enums/index.cjs +1 -1
- package/dist/enums/index.cjs.map +1 -1
- package/dist/enums/index.d.mts +1 -1
- package/dist/enums/index.d.ts +1 -1
- package/dist/enums/index.mjs +1 -1
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.mjs +3 -3
- package/dist/graphql/index.mjs +1 -1
- package/dist/hooks/index.cjs +67 -9
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.mjs +4 -4
- package/dist/images/apple-maps-icon.webp +0 -0
- package/dist/images/banner-horizontal.webp +0 -0
- package/dist/images/banner-vertical.webp +0 -0
- package/dist/images/cluiTui.webp +0 -0
- package/dist/images/corporate.webp +0 -0
- package/dist/images/corporate.webp.d.ts +2 -0
- package/dist/images/facebook.webp +0 -0
- package/dist/images/facebook.webp.d.ts +2 -0
- package/dist/images/google-maps-icon.webp +0 -0
- package/dist/images/google-maps-icon.webp.d.ts +2 -0
- package/dist/images/googleMaps-logo-dark.webp +0 -0
- package/dist/images/googleMaps-logo-dark.webp.d.ts +2 -0
- package/dist/images/googleMaps-logo-light.webp +0 -0
- package/dist/images/googleMaps-logo-light.webp.d.ts +2 -0
- package/dist/images/index.cjs +99 -11
- package/dist/images/index.cjs.map +1 -1
- package/dist/images/index.d.mts +36 -19
- package/dist/images/index.d.ts +36 -19
- package/dist/images/index.mjs +33 -3
- package/dist/images/instagram.webp +0 -0
- package/dist/images/instagram.webp.d.ts +2 -0
- package/dist/images/logo-atr.webp +0 -0
- package/dist/images/logo-atr.webp.d.ts +2 -0
- package/dist/images/logo.webp +0 -0
- package/dist/images/logo.webp.d.ts +2 -0
- package/dist/images/meet.webp +0 -0
- package/dist/images/meet.webp.d.ts +2 -0
- package/dist/images/node.cjs +32 -9
- package/dist/images/node.d.ts +35 -7
- package/dist/images/node.mjs +39 -9
- package/dist/images/poll.webp +0 -0
- package/dist/images/poll.webp.d.ts +2 -0
- package/dist/images/poster1.webp +0 -0
- package/dist/images/poster1.webp.d.ts +2 -0
- package/dist/images/poster2.webp +0 -0
- package/dist/images/poster2.webp.d.ts +2 -0
- package/dist/images/poster3.webp +0 -0
- package/dist/images/poster3.webp.d.ts +2 -0
- package/dist/images/private.webp +0 -0
- package/dist/images/private.webp.d.ts +2 -0
- package/dist/images/qr-code.webp +0 -0
- package/dist/images/qr-code.webp.d.ts +2 -0
- package/dist/images/school.webp +0 -0
- package/dist/images/school.webp.d.ts +2 -0
- package/dist/images/sima.webp +0 -0
- package/dist/images/sima.webp.d.ts +2 -0
- package/dist/images/store-android.webp +0 -0
- package/dist/images/store-android.webp.d.ts +2 -0
- package/dist/images/store-ios.webp +0 -0
- package/dist/images/store-ios.webp.d.ts +2 -0
- package/dist/images/tablas.webp +0 -0
- package/dist/images/tablas.webp.d.ts +2 -0
- package/dist/images/telefonos.webp +0 -0
- package/dist/images/telefonos.webp.d.ts +2 -0
- package/dist/images/tiktok.webp +0 -0
- package/dist/images/tiktok.webp.d.ts +2 -0
- package/dist/images/tip.webp +0 -0
- package/dist/images/tip.webp.d.ts +2 -0
- package/dist/images/ugralos.webp +0 -0
- package/dist/images/ugralos.webp.d.ts +2 -0
- package/dist/images/waze-maps-icon.webp +0 -0
- package/dist/images/waze-maps-icon.webp.d.ts +2 -0
- package/dist/images/website.webp +0 -0
- package/dist/images/website.webp.d.ts +2 -0
- package/dist/images/youtube.webp +0 -0
- package/dist/images/youtube.webp.d.ts +2 -0
- package/dist/index.cjs +100 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +37 -20
- package/dist/index.d.ts +37 -20
- package/dist/index.mjs +84 -11
- package/dist/index.mjs.map +1 -1
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-4PJQMQVX.mjs +0 -24
- package/dist/chunk-4PJQMQVX.mjs.map +0 -1
- package/dist/chunk-534WN2SR.mjs.map +0 -1
- package/dist/images/cluiTui.png +0 -0
- package/dist/images/poster1.png +0 -0
- package/dist/images/poster2.png +0 -0
- package/dist/images/poster3.png +0 -0
- /package/dist/{chunk-XEIQR6NA.mjs.map → chunk-QZE7FORG.mjs.map} +0 -0
- /package/dist/{chunk-LZ2KFVBV.mjs.map → chunk-RRNJ54MF.mjs.map} +0 -0
- /package/dist/images/{cluiTui.png.d.ts → apple-maps-icon.webp.d.ts} +0 -0
- /package/dist/images/{poster1.png.d.ts → banner-horizontal.webp.d.ts} +0 -0
- /package/dist/images/{poster2.png.d.ts → banner-vertical.webp.d.ts} +0 -0
- /package/dist/images/{poster3.png.d.ts → cluiTui.webp.d.ts} +0 -0
package/dist/images/node.mjs
CHANGED
|
@@ -1,14 +1,32 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
basename,
|
|
3
|
+
dirname,
|
|
4
|
+
isAbsolute,
|
|
5
|
+
relative,
|
|
6
|
+
resolve,
|
|
7
|
+
sep,
|
|
8
|
+
} from "node:path";
|
|
2
9
|
import { fileURLToPath } from "node:url";
|
|
3
10
|
|
|
4
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
badgeFiles,
|
|
13
|
+
cluiFiles,
|
|
14
|
+
iconFiles,
|
|
15
|
+
otherImagesFiles,
|
|
16
|
+
logoFiles,
|
|
17
|
+
posterFiles,
|
|
18
|
+
} from "./index.mjs";
|
|
5
19
|
|
|
6
20
|
const ALLOWED_BASENAMES = new Set([
|
|
7
21
|
...Object.values(posterFiles),
|
|
8
|
-
...Object.values(
|
|
22
|
+
...Object.values(cluiFiles),
|
|
23
|
+
...Object.values(iconFiles),
|
|
24
|
+
...Object.values(badgeFiles),
|
|
25
|
+
...Object.values(logoFiles),
|
|
26
|
+
...Object.values(otherImagesFiles),
|
|
9
27
|
]);
|
|
10
28
|
|
|
11
|
-
/** Directory containing this module and the shipped
|
|
29
|
+
/** Directory containing this module and the shipped images (`dist/images/` in the published package). */
|
|
12
30
|
export function getSharedImagesDir() {
|
|
13
31
|
return dirname(fileURLToPath(import.meta.url));
|
|
14
32
|
}
|
|
@@ -32,11 +50,23 @@ function assertSafeImageBasename(fileName) {
|
|
|
32
50
|
}
|
|
33
51
|
|
|
34
52
|
function resolveToBasename(ref) {
|
|
35
|
-
if (Object.
|
|
53
|
+
if (Object.prototype.hasOwnProperty.call(posterFiles, ref)) {
|
|
36
54
|
return posterFiles[ref];
|
|
37
55
|
}
|
|
38
|
-
if (Object.
|
|
39
|
-
return
|
|
56
|
+
if (Object.prototype.hasOwnProperty.call(cluiFiles, ref)) {
|
|
57
|
+
return cluiFiles[ref];
|
|
58
|
+
}
|
|
59
|
+
if (Object.prototype.hasOwnProperty.call(iconFiles, ref)) {
|
|
60
|
+
return iconFiles[ref];
|
|
61
|
+
}
|
|
62
|
+
if (Object.prototype.hasOwnProperty.call(badgeFiles, ref)) {
|
|
63
|
+
return badgeFiles[ref];
|
|
64
|
+
}
|
|
65
|
+
if (Object.prototype.hasOwnProperty.call(logoFiles, ref)) {
|
|
66
|
+
return logoFiles[ref];
|
|
67
|
+
}
|
|
68
|
+
if (Object.prototype.hasOwnProperty.call(otherImagesFiles, ref)) {
|
|
69
|
+
return otherImagesFiles[ref];
|
|
40
70
|
}
|
|
41
71
|
return assertSafeImageBasename(ref);
|
|
42
72
|
}
|
|
@@ -44,8 +74,8 @@ function resolveToBasename(ref) {
|
|
|
44
74
|
function resolvedPathUnderRoot(rootDir, baseName) {
|
|
45
75
|
const rootResolved = resolve(rootDir);
|
|
46
76
|
const resolved = resolve(rootResolved, baseName);
|
|
47
|
-
const
|
|
48
|
-
if (
|
|
77
|
+
const rel = relative(rootResolved, resolved);
|
|
78
|
+
if (rel === ".." || rel.startsWith(`..${sep}`) || isAbsolute(rel)) {
|
|
49
79
|
throw new TypeError(
|
|
50
80
|
"resolved path must stay under the shared images directory",
|
|
51
81
|
);
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/index.cjs
CHANGED
|
@@ -62,6 +62,7 @@ __export(index_exports, {
|
|
|
62
62
|
EnumUserRole: () => EnumUserRole,
|
|
63
63
|
EnumVendorType: () => EnumVendorType,
|
|
64
64
|
EnumVerificationType: () => EnumVerificationType,
|
|
65
|
+
IMAGE_EXTENSION: () => IMAGE_EXTENSION,
|
|
65
66
|
IOS_URL: () => IOS_URL,
|
|
66
67
|
ImageTypeEnum: () => ImageTypeEnum,
|
|
67
68
|
SAVED_EMAIL_KEY: () => SAVED_EMAIL_KEY,
|
|
@@ -73,9 +74,15 @@ __export(index_exports, {
|
|
|
73
74
|
availableRegionOptions: () => availableRegionOptions,
|
|
74
75
|
availableRegionTypes: () => availableRegionTypes,
|
|
75
76
|
availableTagTypes: () => availableTagTypes,
|
|
77
|
+
badgeFiles: () => badgeFiles,
|
|
78
|
+
badgeIds: () => badgeIds,
|
|
79
|
+
badges: () => badges,
|
|
76
80
|
capitalizeFirstLetter: () => capitalizeFirstLetter,
|
|
77
81
|
categoryColors: () => categoryColors,
|
|
78
82
|
cluemartSocialMedia: () => cluemartSocialMedia,
|
|
83
|
+
cluiFiles: () => cluiFiles,
|
|
84
|
+
cluiIds: () => cluiIds,
|
|
85
|
+
cluiImages: () => cluiImages,
|
|
79
86
|
companyContactFields: () => companyContactFields,
|
|
80
87
|
computeDailyClueState: () => computeDailyClueState,
|
|
81
88
|
contactUsFields: () => contactUsFields,
|
|
@@ -102,21 +109,29 @@ __export(index_exports, {
|
|
|
102
109
|
gameTypeToDisplayName: () => gameTypeToDisplayName,
|
|
103
110
|
getCurrentAndFutureDates: () => getCurrentAndFutureDates,
|
|
104
111
|
globalDefaultValues: () => globalDefaultValues,
|
|
112
|
+
iconFiles: () => iconFiles,
|
|
113
|
+
iconIds: () => iconIds,
|
|
114
|
+
icons: () => icons,
|
|
105
115
|
isFutureDatesBeforeThreshold: () => isFutureDatesBeforeThreshold,
|
|
106
116
|
isIsoDateString: () => isIsoDateString,
|
|
107
117
|
licenseNiceNames: () => licenseNiceNames,
|
|
108
118
|
lightColors: () => lightColors,
|
|
109
119
|
loginFields: () => loginFields,
|
|
120
|
+
logoFiles: () => logoFiles,
|
|
121
|
+
logoIds: () => logoIds,
|
|
122
|
+
logos: () => logos,
|
|
110
123
|
mapArrayToOptions: () => mapArrayToOptions,
|
|
111
124
|
mapBaseResourceTypeToFormData: () => mapBaseResourceTypeToFormData,
|
|
112
125
|
normalizeUrl: () => normalizeUrl,
|
|
113
126
|
nzStartOfDay: () => nzStartOfDay,
|
|
114
|
-
otherFiles: () => otherFiles,
|
|
115
127
|
otherImages: () => otherImages,
|
|
128
|
+
otherImagesFiles: () => otherImagesFiles,
|
|
129
|
+
otherImagesIds: () => otherImagesIds,
|
|
116
130
|
packagingOptions: () => packagingOptions,
|
|
117
131
|
partnerBasicInfoFields: () => partnerBasicInfoFields,
|
|
118
132
|
paymentMethodOptions: () => paymentMethodOptions,
|
|
119
133
|
posterFiles: () => posterFiles,
|
|
134
|
+
posterIds: () => posterIds,
|
|
120
135
|
posters: () => posters,
|
|
121
136
|
priceUnits: () => priceUnits,
|
|
122
137
|
producedIngOptions: () => producedIngOptions,
|
|
@@ -441,7 +456,7 @@ var EnumNotificationResourceType = /* @__PURE__ */ ((EnumNotificationResourceTyp
|
|
|
441
456
|
EnumNotificationResourceType2["DECLINED_EVENT"] = "declined_event";
|
|
442
457
|
EnumNotificationResourceType2["DECLINED_PARTNER"] = "declined_partner";
|
|
443
458
|
EnumNotificationResourceType2["DECLINED_VENDOR"] = "declined_vendor";
|
|
444
|
-
EnumNotificationResourceType2["
|
|
459
|
+
EnumNotificationResourceType2["DAILY_CLUE_GAME"] = "daily_clue_game";
|
|
445
460
|
EnumNotificationResourceType2["EVENT_INVITE_VENDOR"] = "event_invite_vendor" /* EVENT_INVITE_VENDOR */;
|
|
446
461
|
EnumNotificationResourceType2["EVENT_STARTING_SOON"] = "event_starting_soon";
|
|
447
462
|
EnumNotificationResourceType2["EXPIRATION_REMINDER_EVENT"] = "expiration_reminder_event";
|
|
@@ -8485,19 +8500,77 @@ function useSchoolForm(data) {
|
|
|
8485
8500
|
|
|
8486
8501
|
// src/images/index.ts
|
|
8487
8502
|
var PKG = "@timardex/cluemart-shared";
|
|
8488
|
-
var
|
|
8489
|
-
|
|
8490
|
-
|
|
8491
|
-
|
|
8492
|
-
|
|
8493
|
-
var
|
|
8494
|
-
|
|
8495
|
-
|
|
8503
|
+
var IMAGE_EXTENSION = ".webp";
|
|
8504
|
+
var posterIds = ["poster1", "poster2", "poster3"];
|
|
8505
|
+
var posterFiles = Object.fromEntries(
|
|
8506
|
+
posterIds.map((id) => [id, `${id}${IMAGE_EXTENSION}`])
|
|
8507
|
+
);
|
|
8508
|
+
var cluiIds = [
|
|
8509
|
+
"cluiTui",
|
|
8510
|
+
"sima",
|
|
8511
|
+
"tablas",
|
|
8512
|
+
"telefonos",
|
|
8513
|
+
"ugralos"
|
|
8514
|
+
];
|
|
8515
|
+
var cluiFiles = Object.fromEntries(
|
|
8516
|
+
cluiIds.map((id) => [id, `${id}${IMAGE_EXTENSION}`])
|
|
8517
|
+
);
|
|
8518
|
+
var iconIds = [
|
|
8519
|
+
"apple-maps-icon",
|
|
8520
|
+
"facebook",
|
|
8521
|
+
"google-maps-icon",
|
|
8522
|
+
"instagram",
|
|
8523
|
+
"meet",
|
|
8524
|
+
"poll",
|
|
8525
|
+
"tiktok",
|
|
8526
|
+
"tip",
|
|
8527
|
+
"waze-maps-icon",
|
|
8528
|
+
"website",
|
|
8529
|
+
"youtube"
|
|
8530
|
+
];
|
|
8531
|
+
var iconFiles = Object.fromEntries(
|
|
8532
|
+
iconIds.map((id) => [id, `${id}${IMAGE_EXTENSION}`])
|
|
8533
|
+
);
|
|
8534
|
+
var badgeIds = ["corporate", "private", "school"];
|
|
8535
|
+
var badgeFiles = Object.fromEntries(
|
|
8536
|
+
badgeIds.map((id) => [id, `${id}${IMAGE_EXTENSION}`])
|
|
8537
|
+
);
|
|
8538
|
+
var logoIds = [
|
|
8539
|
+
"googleMaps-logo-dark",
|
|
8540
|
+
"googleMaps-logo-light",
|
|
8541
|
+
"logo",
|
|
8542
|
+
"logo-atr"
|
|
8543
|
+
];
|
|
8544
|
+
var logoFiles = Object.fromEntries(
|
|
8545
|
+
logoIds.map((id) => [id, `${id}${IMAGE_EXTENSION}`])
|
|
8546
|
+
);
|
|
8547
|
+
var otherImagesIds = [
|
|
8548
|
+
"banner-horizontal",
|
|
8549
|
+
"banner-vertical",
|
|
8550
|
+
"qr-code",
|
|
8551
|
+
"store-android",
|
|
8552
|
+
"store-ios"
|
|
8553
|
+
];
|
|
8554
|
+
var otherImagesFiles = Object.fromEntries(
|
|
8555
|
+
otherImagesIds.map((id) => [id, `${id}${IMAGE_EXTENSION}`])
|
|
8556
|
+
);
|
|
8496
8557
|
var posters = Object.fromEntries(
|
|
8497
8558
|
Object.entries(posterFiles).map(([key, file]) => [key, `${PKG}/images/${file}`])
|
|
8498
8559
|
);
|
|
8560
|
+
var cluiImages = Object.fromEntries(
|
|
8561
|
+
Object.entries(cluiFiles).map(([key, file]) => [key, `${PKG}/images/${file}`])
|
|
8562
|
+
);
|
|
8563
|
+
var icons = Object.fromEntries(
|
|
8564
|
+
Object.entries(iconFiles).map(([key, file]) => [key, `${PKG}/images/${file}`])
|
|
8565
|
+
);
|
|
8566
|
+
var badges = Object.fromEntries(
|
|
8567
|
+
Object.entries(badgeFiles).map(([key, file]) => [key, `${PKG}/images/${file}`])
|
|
8568
|
+
);
|
|
8569
|
+
var logos = Object.fromEntries(
|
|
8570
|
+
Object.entries(logoFiles).map(([key, file]) => [key, `${PKG}/images/${file}`])
|
|
8571
|
+
);
|
|
8499
8572
|
var otherImages = Object.fromEntries(
|
|
8500
|
-
Object.entries(
|
|
8573
|
+
Object.entries(otherImagesFiles).map(([key, file]) => [key, `${PKG}/images/${file}`])
|
|
8501
8574
|
);
|
|
8502
8575
|
|
|
8503
8576
|
// src/storage/index.ts
|
|
@@ -8595,6 +8668,7 @@ var EnumActivity = /* @__PURE__ */ ((EnumActivity2) => {
|
|
|
8595
8668
|
EnumUserRole,
|
|
8596
8669
|
EnumVendorType,
|
|
8597
8670
|
EnumVerificationType,
|
|
8671
|
+
IMAGE_EXTENSION,
|
|
8598
8672
|
IOS_URL,
|
|
8599
8673
|
ImageTypeEnum,
|
|
8600
8674
|
SAVED_EMAIL_KEY,
|
|
@@ -8606,9 +8680,15 @@ var EnumActivity = /* @__PURE__ */ ((EnumActivity2) => {
|
|
|
8606
8680
|
availableRegionOptions,
|
|
8607
8681
|
availableRegionTypes,
|
|
8608
8682
|
availableTagTypes,
|
|
8683
|
+
badgeFiles,
|
|
8684
|
+
badgeIds,
|
|
8685
|
+
badges,
|
|
8609
8686
|
capitalizeFirstLetter,
|
|
8610
8687
|
categoryColors,
|
|
8611
8688
|
cluemartSocialMedia,
|
|
8689
|
+
cluiFiles,
|
|
8690
|
+
cluiIds,
|
|
8691
|
+
cluiImages,
|
|
8612
8692
|
companyContactFields,
|
|
8613
8693
|
computeDailyClueState,
|
|
8614
8694
|
contactUsFields,
|
|
@@ -8635,21 +8715,29 @@ var EnumActivity = /* @__PURE__ */ ((EnumActivity2) => {
|
|
|
8635
8715
|
gameTypeToDisplayName,
|
|
8636
8716
|
getCurrentAndFutureDates,
|
|
8637
8717
|
globalDefaultValues,
|
|
8718
|
+
iconFiles,
|
|
8719
|
+
iconIds,
|
|
8720
|
+
icons,
|
|
8638
8721
|
isFutureDatesBeforeThreshold,
|
|
8639
8722
|
isIsoDateString,
|
|
8640
8723
|
licenseNiceNames,
|
|
8641
8724
|
lightColors,
|
|
8642
8725
|
loginFields,
|
|
8726
|
+
logoFiles,
|
|
8727
|
+
logoIds,
|
|
8728
|
+
logos,
|
|
8643
8729
|
mapArrayToOptions,
|
|
8644
8730
|
mapBaseResourceTypeToFormData,
|
|
8645
8731
|
normalizeUrl,
|
|
8646
8732
|
nzStartOfDay,
|
|
8647
|
-
otherFiles,
|
|
8648
8733
|
otherImages,
|
|
8734
|
+
otherImagesFiles,
|
|
8735
|
+
otherImagesIds,
|
|
8649
8736
|
packagingOptions,
|
|
8650
8737
|
partnerBasicInfoFields,
|
|
8651
8738
|
paymentMethodOptions,
|
|
8652
8739
|
posterFiles,
|
|
8740
|
+
posterIds,
|
|
8653
8741
|
posters,
|
|
8654
8742
|
priceUnits,
|
|
8655
8743
|
producedIngOptions,
|