@timardex/cluemart-shared 1.5.599 → 1.5.600
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-YV2JDG4R.mjs → chunk-3VUHAHP7.mjs} +5 -86
- package/dist/chunk-3VUHAHP7.mjs.map +1 -0
- package/dist/{chunk-HBVPPRHO.mjs → chunk-GSOSJNID.mjs} +22 -21
- package/dist/chunk-GSOSJNID.mjs.map +1 -0
- package/dist/chunk-X4VPNOHX.mjs +88 -0
- package/dist/chunk-X4VPNOHX.mjs.map +1 -0
- package/dist/{chunk-2NQUR2AV.mjs → chunk-ZDDWPO5Y.mjs} +2 -2
- package/dist/formFields/index.mjs +3 -2
- package/dist/hooks/index.mjs +8 -6
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +22 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +20 -6
- package/dist/index.d.ts +20 -6
- package/dist/index.mjs +17 -20
- package/dist/index.mjs.map +1 -1
- package/dist/sharing/index.cjs +63 -22
- package/dist/sharing/index.cjs.map +1 -1
- package/dist/sharing/index.d.mts +20 -6
- package/dist/sharing/index.d.ts +20 -6
- package/dist/sharing/index.mjs +14 -3
- package/dist/utils/index.mjs +13 -11
- package/package.json +1 -1
- package/dist/chunk-HBVPPRHO.mjs.map +0 -1
- package/dist/chunk-YV2JDG4R.mjs.map +0 -1
- /package/dist/{chunk-2NQUR2AV.mjs.map → chunk-ZDDWPO5Y.mjs.map} +0 -0
package/dist/index.cjs
CHANGED
|
@@ -66,6 +66,7 @@ __export(index_exports, {
|
|
|
66
66
|
IMAGE_EXTENSION: () => IMAGE_EXTENSION,
|
|
67
67
|
IOS_URL: () => IOS_URL,
|
|
68
68
|
ImageTypeEnum: () => ImageTypeEnum,
|
|
69
|
+
OG_DESCRIPTION_LINE_BREAK: () => OG_DESCRIPTION_LINE_BREAK,
|
|
69
70
|
POST_SHARE_RESOURCE_TYPES: () => POST_SHARE_RESOURCE_TYPES,
|
|
70
71
|
PROMO_CODE_PREFIX: () => PROMO_CODE_PREFIX,
|
|
71
72
|
PUBLIC_SHARE_PATH_TYPES: () => PUBLIC_SHARE_PATH_TYPES,
|
|
@@ -97,6 +98,7 @@ __export(index_exports, {
|
|
|
97
98
|
buildFacebookShareQuote: () => buildFacebookShareQuote,
|
|
98
99
|
buildInvitationShareDescription: () => buildInvitationShareDescription,
|
|
99
100
|
buildShareOgDescription: () => buildShareOgDescription,
|
|
101
|
+
buildShareOgDescriptionFromSections: () => buildShareOgDescriptionFromSections,
|
|
100
102
|
buildSharePagePath: () => buildSharePagePath,
|
|
101
103
|
buildShareUrl: () => buildShareUrl,
|
|
102
104
|
capitalizeFirstLetter: () => capitalizeFirstLetter,
|
|
@@ -127,6 +129,7 @@ __export(index_exports, {
|
|
|
127
129
|
foodFlavourOptions: () => foodFlavourOptions,
|
|
128
130
|
formatCategoryLabel: () => formatCategoryLabel,
|
|
129
131
|
formatDate: () => formatDate,
|
|
132
|
+
formatShareMarketDate: () => formatShareMarketDate,
|
|
130
133
|
formatShareSectionsForCompactDisplay: () => formatShareSectionsForCompactDisplay,
|
|
131
134
|
formatShareSectionsForMultilineDisplay: () => formatShareSectionsForMultilineDisplay,
|
|
132
135
|
formatStallCapacityLabel: () => formatStallCapacityLabel,
|
|
@@ -143,6 +146,7 @@ __export(index_exports, {
|
|
|
143
146
|
isPostShareResourceType: () => isPostShareResourceType,
|
|
144
147
|
isRelationShareResourceType: () => isRelationShareResourceType,
|
|
145
148
|
joinShareDescriptionSections: () => joinShareDescriptionSections,
|
|
149
|
+
joinShareOgDescriptionSections: () => joinShareOgDescriptionSections,
|
|
146
150
|
licenseNiceNames: () => licenseNiceNames,
|
|
147
151
|
lightColors: () => lightColors,
|
|
148
152
|
loginFields: () => loginFields,
|
|
@@ -177,6 +181,7 @@ __export(index_exports, {
|
|
|
177
181
|
seededShuffle: () => seededShuffle,
|
|
178
182
|
socialMediaFields: () => socialMediaFields,
|
|
179
183
|
sortDatesChronologically: () => sortDatesChronologically,
|
|
184
|
+
splitShareDescriptionSections: () => splitShareDescriptionSections,
|
|
180
185
|
stallTypeOptions: () => stallTypeOptions,
|
|
181
186
|
statusOptions: () => statusOptions,
|
|
182
187
|
tagOptions: () => tagOptions,
|
|
@@ -8841,21 +8846,17 @@ function formatCategoryLabel(category) {
|
|
|
8841
8846
|
// src/sharing/joinShareDescriptionSections.ts
|
|
8842
8847
|
var SHARE_DESCRIPTION_SECTION_SEPARATOR = " \xB7 ";
|
|
8843
8848
|
var SHARE_DESCRIPTION_SECTION_BREAK = "\n\n";
|
|
8849
|
+
var OG_DESCRIPTION_LINE_BREAK = " ";
|
|
8850
|
+
function joinShareOgDescriptionSections(sections) {
|
|
8851
|
+
return sections.map((section) => typeof section === "string" ? section.trim() : "").filter((section) => section.length > 0).join(OG_DESCRIPTION_LINE_BREAK);
|
|
8852
|
+
}
|
|
8844
8853
|
function joinShareDescriptionSections(sections) {
|
|
8845
8854
|
return sections.filter((section) => Boolean(section)).join(SHARE_DESCRIPTION_SECTION_BREAK);
|
|
8846
8855
|
}
|
|
8847
8856
|
|
|
8848
8857
|
// src/sharing/buildRelationShareDescription.ts
|
|
8849
|
-
function
|
|
8850
|
-
|
|
8851
|
-
return new Intl.DateTimeFormat("en-NZ", {
|
|
8852
|
-
day: "numeric",
|
|
8853
|
-
month: "short",
|
|
8854
|
-
year: "numeric"
|
|
8855
|
-
}).format(new Date(isoDate));
|
|
8856
|
-
} catch {
|
|
8857
|
-
return isoDate;
|
|
8858
|
-
}
|
|
8858
|
+
function formatShareMarketDate(dateStr) {
|
|
8859
|
+
return formatDate(dateStr, "date");
|
|
8859
8860
|
}
|
|
8860
8861
|
function formatStallCapacityLabel(stallCapacity) {
|
|
8861
8862
|
return stallCapacity > 0 ? ` (${stallCapacity} spaces available)` : " - Full";
|
|
@@ -8869,7 +8870,7 @@ function buildInvitationShareDescription(event, eventInfo2) {
|
|
|
8869
8870
|
const sections = [
|
|
8870
8871
|
event.location.fullAddress,
|
|
8871
8872
|
...event.dateTime.map((date3) => {
|
|
8872
|
-
const start =
|
|
8873
|
+
const start = formatShareMarketDate(date3.startDate);
|
|
8873
8874
|
return `Market date: ${start}`;
|
|
8874
8875
|
}),
|
|
8875
8876
|
`Application deadline: vendors must apply at least ${eventInfo2.applicationDeadlineHours} hours before each market date.`,
|
|
@@ -9001,14 +9002,7 @@ function formatShareSectionsForCompactDisplay(value) {
|
|
|
9001
9002
|
);
|
|
9002
9003
|
}
|
|
9003
9004
|
function normalizeShareOgDescription(value) {
|
|
9004
|
-
|
|
9005
|
-
if (!trimmed) {
|
|
9006
|
-
return "";
|
|
9007
|
-
}
|
|
9008
|
-
if (/\n\n/.test(trimmed) || trimmed.includes(SHARE_DESCRIPTION_SECTION_SEPARATOR)) {
|
|
9009
|
-
return formatShareSectionsForCompactDisplay(trimmed);
|
|
9010
|
-
}
|
|
9011
|
-
return trimmed.replace(/\s+/g, " ").trim();
|
|
9005
|
+
return joinShareOgDescriptionSections(splitShareDescriptionSections(value));
|
|
9012
9006
|
}
|
|
9013
9007
|
function buildFacebookShareQuote(title, description) {
|
|
9014
9008
|
const titleSection = normalizeShareSection(title);
|
|
@@ -9019,8 +9013,11 @@ function buildFacebookShareQuote(title, description) {
|
|
|
9019
9013
|
const quote = sections.join(SHARE_DESCRIPTION_SECTION_BREAK).trim();
|
|
9020
9014
|
return quote.length > 0 ? quote : void 0;
|
|
9021
9015
|
}
|
|
9016
|
+
function buildShareOgDescriptionFromSections(sections) {
|
|
9017
|
+
return joinShareOgDescriptionSections(sections);
|
|
9018
|
+
}
|
|
9022
9019
|
function buildShareOgDescription(_title, description) {
|
|
9023
|
-
return
|
|
9020
|
+
return joinShareOgDescriptionSections(splitShareDescriptionSections(description));
|
|
9024
9021
|
}
|
|
9025
9022
|
|
|
9026
9023
|
// src/sharing/normalizeShareRouteId.ts
|
|
@@ -9161,6 +9158,7 @@ var gameTypeToDisplayName = {
|
|
|
9161
9158
|
IMAGE_EXTENSION,
|
|
9162
9159
|
IOS_URL,
|
|
9163
9160
|
ImageTypeEnum,
|
|
9161
|
+
OG_DESCRIPTION_LINE_BREAK,
|
|
9164
9162
|
POST_SHARE_RESOURCE_TYPES,
|
|
9165
9163
|
PROMO_CODE_PREFIX,
|
|
9166
9164
|
PUBLIC_SHARE_PATH_TYPES,
|
|
@@ -9192,6 +9190,7 @@ var gameTypeToDisplayName = {
|
|
|
9192
9190
|
buildFacebookShareQuote,
|
|
9193
9191
|
buildInvitationShareDescription,
|
|
9194
9192
|
buildShareOgDescription,
|
|
9193
|
+
buildShareOgDescriptionFromSections,
|
|
9195
9194
|
buildSharePagePath,
|
|
9196
9195
|
buildShareUrl,
|
|
9197
9196
|
capitalizeFirstLetter,
|
|
@@ -9222,6 +9221,7 @@ var gameTypeToDisplayName = {
|
|
|
9222
9221
|
foodFlavourOptions,
|
|
9223
9222
|
formatCategoryLabel,
|
|
9224
9223
|
formatDate,
|
|
9224
|
+
formatShareMarketDate,
|
|
9225
9225
|
formatShareSectionsForCompactDisplay,
|
|
9226
9226
|
formatShareSectionsForMultilineDisplay,
|
|
9227
9227
|
formatStallCapacityLabel,
|
|
@@ -9238,6 +9238,7 @@ var gameTypeToDisplayName = {
|
|
|
9238
9238
|
isPostShareResourceType,
|
|
9239
9239
|
isRelationShareResourceType,
|
|
9240
9240
|
joinShareDescriptionSections,
|
|
9241
|
+
joinShareOgDescriptionSections,
|
|
9241
9242
|
licenseNiceNames,
|
|
9242
9243
|
lightColors,
|
|
9243
9244
|
loginFields,
|
|
@@ -9272,6 +9273,7 @@ var gameTypeToDisplayName = {
|
|
|
9272
9273
|
seededShuffle,
|
|
9273
9274
|
socialMediaFields,
|
|
9274
9275
|
sortDatesChronologically,
|
|
9276
|
+
splitShareDescriptionSections,
|
|
9275
9277
|
stallTypeOptions,
|
|
9276
9278
|
statusOptions,
|
|
9277
9279
|
tagOptions,
|