@timardex/cluemart-shared 1.5.598 → 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-YOWTDF2C.mjs → chunk-GSOSJNID.mjs} +22 -25
- 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 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +24 -10
- package/dist/index.d.ts +24 -10
- package/dist/index.mjs +17 -24
- package/dist/index.mjs.map +1 -1
- package/dist/sharing/index.cjs +63 -26
- package/dist/sharing/index.cjs.map +1 -1
- package/dist/sharing/index.d.mts +24 -10
- package/dist/sharing/index.d.ts +24 -10
- package/dist/sharing/index.mjs +14 -3
- package/dist/utils/index.mjs +13 -11
- package/package.json +1 -1
- package/dist/chunk-YOWTDF2C.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,12 +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
|
-
|
|
9024
|
-
if (multiline) {
|
|
9025
|
-
return multiline;
|
|
9026
|
-
}
|
|
9027
|
-
return normalizeShareOgDescription(description);
|
|
9020
|
+
return joinShareOgDescriptionSections(splitShareDescriptionSections(description));
|
|
9028
9021
|
}
|
|
9029
9022
|
|
|
9030
9023
|
// src/sharing/normalizeShareRouteId.ts
|
|
@@ -9165,6 +9158,7 @@ var gameTypeToDisplayName = {
|
|
|
9165
9158
|
IMAGE_EXTENSION,
|
|
9166
9159
|
IOS_URL,
|
|
9167
9160
|
ImageTypeEnum,
|
|
9161
|
+
OG_DESCRIPTION_LINE_BREAK,
|
|
9168
9162
|
POST_SHARE_RESOURCE_TYPES,
|
|
9169
9163
|
PROMO_CODE_PREFIX,
|
|
9170
9164
|
PUBLIC_SHARE_PATH_TYPES,
|
|
@@ -9196,6 +9190,7 @@ var gameTypeToDisplayName = {
|
|
|
9196
9190
|
buildFacebookShareQuote,
|
|
9197
9191
|
buildInvitationShareDescription,
|
|
9198
9192
|
buildShareOgDescription,
|
|
9193
|
+
buildShareOgDescriptionFromSections,
|
|
9199
9194
|
buildSharePagePath,
|
|
9200
9195
|
buildShareUrl,
|
|
9201
9196
|
capitalizeFirstLetter,
|
|
@@ -9226,6 +9221,7 @@ var gameTypeToDisplayName = {
|
|
|
9226
9221
|
foodFlavourOptions,
|
|
9227
9222
|
formatCategoryLabel,
|
|
9228
9223
|
formatDate,
|
|
9224
|
+
formatShareMarketDate,
|
|
9229
9225
|
formatShareSectionsForCompactDisplay,
|
|
9230
9226
|
formatShareSectionsForMultilineDisplay,
|
|
9231
9227
|
formatStallCapacityLabel,
|
|
@@ -9242,6 +9238,7 @@ var gameTypeToDisplayName = {
|
|
|
9242
9238
|
isPostShareResourceType,
|
|
9243
9239
|
isRelationShareResourceType,
|
|
9244
9240
|
joinShareDescriptionSections,
|
|
9241
|
+
joinShareOgDescriptionSections,
|
|
9245
9242
|
licenseNiceNames,
|
|
9246
9243
|
lightColors,
|
|
9247
9244
|
loginFields,
|
|
@@ -9276,6 +9273,7 @@ var gameTypeToDisplayName = {
|
|
|
9276
9273
|
seededShuffle,
|
|
9277
9274
|
socialMediaFields,
|
|
9278
9275
|
sortDatesChronologically,
|
|
9276
|
+
splitShareDescriptionSections,
|
|
9279
9277
|
stallTypeOptions,
|
|
9280
9278
|
statusOptions,
|
|
9281
9279
|
tagOptions,
|