riverbankcms 0.28.1 → 0.30.0
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/acceptance/matrix.mjs +17 -3
- package/dist/cli/index.mjs +74927 -30650
- package/dist/cli/init-docs/content/cli-reference.md +22 -0
- package/dist/{entryCommands-CrfobcW7.mjs → entryCommands-DqqGit0l.mjs} +15338 -10507
- package/dist/{eventUpsertInputSchema-R2GbOsj2.mjs → eventUpsertInputSchema-EGy8zFUx.mjs} +24 -107
- package/dist/load-config-3e2Npz2O.mjs +4 -0
- package/dist/{load-config-DTbiJyCf.mjs → load-config-Dgw0C6y3.mjs} +2 -2
- package/dist/{plan-DJfyedxU.mjs → plan-cE7TKMc1.mjs} +1 -1
- package/dist/scaffold/index.mjs +2 -2
- package/dist/sdk-event-upsert-mPJpEQ2x.mjs +15022 -0
- package/dist/{src-nzVzuMR1.mjs → src-DOwrYdTk.mjs} +141 -128
- package/dist/testing.mjs +4 -4
- package/package.json +1 -1
- package/dist/load-config-BB5L2u1y.mjs +0 -4
- package/dist/sdk-event-upsert-4Dn75Ui9.mjs +0 -56803
|
@@ -1860,6 +1860,8 @@ const LIVE_CONTRACT_STATUSES = {
|
|
|
1860
1860
|
function isLiveOrderInstalmentPlanStatus(status) {
|
|
1861
1861
|
return LIVE_PLAN_STATUSES[status];
|
|
1862
1862
|
}
|
|
1863
|
+
/** The live plan statuses as a list, for queries that select plans to collect. */
|
|
1864
|
+
const LIVE_ORDER_INSTALMENT_PLAN_STATUSES = Object.keys(LIVE_PLAN_STATUSES).filter(isLiveOrderInstalmentPlanStatus);
|
|
1863
1865
|
function isLiveFlexibleBalanceContractStatus(status) {
|
|
1864
1866
|
return LIVE_CONTRACT_STATUSES[status];
|
|
1865
1867
|
}
|
|
@@ -3462,6 +3464,16 @@ const locationAddressSchema = z.strictObject({
|
|
|
3462
3464
|
postalCode: addressPart,
|
|
3463
3465
|
country: addressPart.transform((value) => value?.length === 2 ? value.toUpperCase() : value)
|
|
3464
3466
|
}).readonly().transform((address) => Object.values(address).some((part) => part !== null) ? address : null);
|
|
3467
|
+
/** Town, then county, then a complete UK postcode's outward half. Never geocodes. */
|
|
3468
|
+
function deriveLocationArea(address) {
|
|
3469
|
+
if (address === null) return null;
|
|
3470
|
+
const namedArea = [address.locality, address.region].map(trimmedStringOrNull).find((part) => part !== null);
|
|
3471
|
+
if (namedArea !== undefined) return namedArea;
|
|
3472
|
+
if (address.country !== null && !sameLocationCountry(address.country, "GB")) return null;
|
|
3473
|
+
const postcode = address.postalCode?.trim().toUpperCase() ?? "";
|
|
3474
|
+
const match = /^((?:[A-PR-UWYZ][0-9][0-9A-HJKPSTUW]?|[A-PR-UWYZ][A-HK-Y][0-9][0-9ABEHMNPRVWXY]?)|GIR)\s*[0-9][ABD-HJLNP-UW-Z]{2}$/.exec(postcode);
|
|
3475
|
+
return match?.[1] ?? null;
|
|
3476
|
+
}
|
|
3465
3477
|
const locationAddressMatchSchema = z.strictObject({
|
|
3466
3478
|
point: locationPinSchema,
|
|
3467
3479
|
precision: z.enum([
|
|
@@ -3601,6 +3613,47 @@ function resolvePermittedLocation(permission, location, siteCountry) {
|
|
|
3601
3613
|
};
|
|
3602
3614
|
}
|
|
3603
3615
|
|
|
3616
|
+
//#endregion
|
|
3617
|
+
//#region ../core/src/venue-location.ts
|
|
3618
|
+
const venueLocationAudience = Symbol("venue-location-audience");
|
|
3619
|
+
/** Eligibility to read the venue is decided by the resource owner before disclosure. */
|
|
3620
|
+
function decidePublicVenueLocation(venue, siteCountry) {
|
|
3621
|
+
const audience = { [venueLocationAudience]: "public" };
|
|
3622
|
+
if (venue.location === null) return {
|
|
3623
|
+
...audience,
|
|
3624
|
+
kind: "none",
|
|
3625
|
+
name: venue.name
|
|
3626
|
+
};
|
|
3627
|
+
if (venue.addressVisibility === "booked") {
|
|
3628
|
+
return {
|
|
3629
|
+
...audience,
|
|
3630
|
+
kind: "area",
|
|
3631
|
+
name: venue.name,
|
|
3632
|
+
area: deriveLocationArea(venue.location.address)
|
|
3633
|
+
};
|
|
3634
|
+
}
|
|
3635
|
+
return {
|
|
3636
|
+
...audience,
|
|
3637
|
+
kind: "full",
|
|
3638
|
+
name: venue.name,
|
|
3639
|
+
...projectPublicLocation(venue.location, siteCountry)
|
|
3640
|
+
};
|
|
3641
|
+
}
|
|
3642
|
+
/** Caller must already hold confirmed-booking or staff authorisation. */
|
|
3643
|
+
function decideArrivalVenueLocation(venue, siteCountry) {
|
|
3644
|
+
const audience = { [venueLocationAudience]: "arrival" };
|
|
3645
|
+
return venue.location === null ? {
|
|
3646
|
+
...audience,
|
|
3647
|
+
kind: "none",
|
|
3648
|
+
name: venue.name
|
|
3649
|
+
} : {
|
|
3650
|
+
...audience,
|
|
3651
|
+
kind: "full",
|
|
3652
|
+
name: venue.name,
|
|
3653
|
+
...projectPublicLocation(venue.location, siteCountry)
|
|
3654
|
+
};
|
|
3655
|
+
}
|
|
3656
|
+
|
|
3604
3657
|
//#endregion
|
|
3605
3658
|
//#region ../core/src/locationLinks.ts
|
|
3606
3659
|
/** Both outbound actions use the arrival pin, never match evidence. */
|
|
@@ -3767,65 +3820,21 @@ function planLocationOpeningEvidence(previous, evidence) {
|
|
|
3767
3820
|
}
|
|
3768
3821
|
|
|
3769
3822
|
//#endregion
|
|
3770
|
-
//#region ../core/src/location-
|
|
3771
|
-
/**
|
|
3772
|
-
const
|
|
3773
|
-
const
|
|
3823
|
+
//#region ../core/src/location-conversion.ts
|
|
3824
|
+
/** Shared by the business address input and the offline location data migration. */
|
|
3825
|
+
const conversionText = z.string().nullable().optional();
|
|
3826
|
+
const conversionCoordinatesSchema = z.strictObject({
|
|
3774
3827
|
lat: z.number().min(-90).max(90).nullable().optional(),
|
|
3775
3828
|
lng: z.number().min(-180).max(180).nullable().optional()
|
|
3776
3829
|
}).superRefine((value, context) => {
|
|
3777
3830
|
if (value.lat == null !== (value.lng == null)) {
|
|
3778
3831
|
context.addIssue({
|
|
3779
3832
|
code: "custom",
|
|
3780
|
-
message: "
|
|
3833
|
+
message: "The pin is incomplete."
|
|
3781
3834
|
});
|
|
3782
3835
|
}
|
|
3783
3836
|
});
|
|
3784
|
-
|
|
3785
|
-
street: legacyText,
|
|
3786
|
-
line1: legacyText,
|
|
3787
|
-
line2: legacyText,
|
|
3788
|
-
city: legacyText,
|
|
3789
|
-
state: legacyText,
|
|
3790
|
-
region: legacyText,
|
|
3791
|
-
postalCode: legacyText,
|
|
3792
|
-
postal_code: legacyText,
|
|
3793
|
-
postcode: legacyText,
|
|
3794
|
-
country: legacyText,
|
|
3795
|
-
formatted: legacyText,
|
|
3796
|
-
summary: legacyText
|
|
3797
|
-
}).superRefine((value, context) => {
|
|
3798
|
-
const aliases = [
|
|
3799
|
-
[value.street, value.line1],
|
|
3800
|
-
[value.state, value.region],
|
|
3801
|
-
[
|
|
3802
|
-
value.postalCode,
|
|
3803
|
-
value.postal_code,
|
|
3804
|
-
value.postcode
|
|
3805
|
-
],
|
|
3806
|
-
[value.formatted, value.summary]
|
|
3807
|
-
];
|
|
3808
|
-
aliases.forEach((parts) => {
|
|
3809
|
-
const meaningful = parts.filter((part) => displayComparison(part) !== "");
|
|
3810
|
-
if (meaningful.some((part) => displayComparison(part) !== displayComparison(meaningful[0]))) {
|
|
3811
|
-
context.addIssue({
|
|
3812
|
-
code: "custom",
|
|
3813
|
-
message: "Legacy address aliases disagree."
|
|
3814
|
-
});
|
|
3815
|
-
}
|
|
3816
|
-
});
|
|
3817
|
-
}).nullable();
|
|
3818
|
-
const businessAddressSchema = legacyCoordinatesSchema.safeExtend({
|
|
3819
|
-
addressLine1: legacyText,
|
|
3820
|
-
addressLine2: legacyText,
|
|
3821
|
-
locality: legacyText,
|
|
3822
|
-
region: legacyText,
|
|
3823
|
-
postalCode: legacyText,
|
|
3824
|
-
countryCode: legacyText,
|
|
3825
|
-
displayAddress: legacyText
|
|
3826
|
-
});
|
|
3827
|
-
const customLocationSchema = legacyCoordinatesSchema.safeExtend({ addressText: legacyText });
|
|
3828
|
-
function finishConversion(address, coordinates) {
|
|
3837
|
+
function finishLocationConversion(address, coordinates) {
|
|
3829
3838
|
const parsedAddress = locationAddressSchema.nullable().safeParse(address);
|
|
3830
3839
|
if (!parsedAddress.success) return err({
|
|
3831
3840
|
kind: "invalid_legacy_location",
|
|
@@ -3847,34 +3856,6 @@ function finishConversion(address, coordinates) {
|
|
|
3847
3856
|
issues: result.error.issues
|
|
3848
3857
|
});
|
|
3849
3858
|
}
|
|
3850
|
-
function convertVenue(input) {
|
|
3851
|
-
const address = venueAddressSchema.safeParse(input.addressJson ?? null);
|
|
3852
|
-
const coordinates = legacyCoordinatesSchema.safeParse(input.locationJson ?? {});
|
|
3853
|
-
if (!address.success) return err({
|
|
3854
|
-
kind: "invalid_legacy_location",
|
|
3855
|
-
issues: address.error.issues
|
|
3856
|
-
});
|
|
3857
|
-
if (!coordinates.success) return err({
|
|
3858
|
-
kind: "invalid_legacy_location",
|
|
3859
|
-
issues: coordinates.error.issues
|
|
3860
|
-
});
|
|
3861
|
-
const result = finishConversion(mapVenueAddress(address.data), coordinates.data);
|
|
3862
|
-
return checkDisplayText(result, firstText(address.data?.formatted, address.data?.summary));
|
|
3863
|
-
}
|
|
3864
|
-
const displayComparison = (text) => (text ?? "").trim().replace(/\s+/g, " ").toLowerCase();
|
|
3865
|
-
const firstText = (...parts) => parts.find((part) => part != null && part.trim().length > 0)?.trim() ?? null;
|
|
3866
|
-
function mapVenueAddress(address) {
|
|
3867
|
-
if (address === null) return null;
|
|
3868
|
-
const structured = {
|
|
3869
|
-
street: firstText(address.street, address.line1),
|
|
3870
|
-
unit: address.line2,
|
|
3871
|
-
locality: address.city,
|
|
3872
|
-
region: firstText(address.state, address.region),
|
|
3873
|
-
postalCode: firstText(address.postalCode, address.postal_code, address.postcode),
|
|
3874
|
-
country: address.country
|
|
3875
|
-
};
|
|
3876
|
-
return Object.values(structured).some((part) => displayComparison(part) !== "") ? structured : { street: firstText(address.formatted, address.summary) };
|
|
3877
|
-
}
|
|
3878
3859
|
const displayTokens = (text) => (text ?? "").toLowerCase().match(/[\p{L}\p{N}]+/gu) ?? [];
|
|
3879
3860
|
/** Only redundant trailing country text is disposable; ordered address words must all survive. */
|
|
3880
3861
|
function comparableDisplay(text, countries) {
|
|
@@ -3882,7 +3863,8 @@ function comparableDisplay(text, countries) {
|
|
|
3882
3863
|
const suffixIndex = tokens.findIndex((_token, index) => countries.some((country) => sameLocationCountry(tokens.slice(index).join(" "), country)));
|
|
3883
3864
|
return (suffixIndex < 0 ? tokens : tokens.slice(0, suffixIndex)).join(" ");
|
|
3884
3865
|
}
|
|
3885
|
-
|
|
3866
|
+
/** Refuses a conversion whose formatted address loses words from the stored display text. */
|
|
3867
|
+
function checkConvertedDisplayText(result, text, siteCountry) {
|
|
3886
3868
|
if (!result.ok) return result;
|
|
3887
3869
|
const original = text?.trim() ?? "";
|
|
3888
3870
|
const derived = formatLocationAddress(result.value?.address ?? null);
|
|
@@ -3893,39 +3875,6 @@ function checkDisplayText(result, text, siteCountry) {
|
|
|
3893
3875
|
derived
|
|
3894
3876
|
}) : result;
|
|
3895
3877
|
}
|
|
3896
|
-
function convertBusiness(value, siteCountry) {
|
|
3897
|
-
if (value == null) return ok(null);
|
|
3898
|
-
const parsed = businessAddressSchema.safeParse(value);
|
|
3899
|
-
if (!parsed.success) return err({
|
|
3900
|
-
kind: "invalid_legacy_location",
|
|
3901
|
-
issues: parsed.error.issues
|
|
3902
|
-
});
|
|
3903
|
-
const result = finishConversion({
|
|
3904
|
-
street: parsed.data.addressLine1,
|
|
3905
|
-
unit: parsed.data.addressLine2,
|
|
3906
|
-
locality: parsed.data.locality,
|
|
3907
|
-
region: parsed.data.region,
|
|
3908
|
-
postalCode: parsed.data.postalCode,
|
|
3909
|
-
country: parsed.data.countryCode
|
|
3910
|
-
}, parsed.data);
|
|
3911
|
-
return checkDisplayText(result, parsed.data.displayAddress, siteCountry);
|
|
3912
|
-
}
|
|
3913
|
-
function convertCustom(value) {
|
|
3914
|
-
if (value == null) return ok(null);
|
|
3915
|
-
const parsed = customLocationSchema.safeParse(value);
|
|
3916
|
-
return parsed.success ? finishConversion({ street: parsed.data.addressText }, parsed.data) : err({
|
|
3917
|
-
kind: "invalid_legacy_location",
|
|
3918
|
-
issues: parsed.error.issues
|
|
3919
|
-
});
|
|
3920
|
-
}
|
|
3921
|
-
/** Preserve pins exactly; never split free text or fabricate match evidence. */
|
|
3922
|
-
function convertLegacyLocation(input) {
|
|
3923
|
-
switch (input.kind) {
|
|
3924
|
-
case "venue": return convertVenue(input);
|
|
3925
|
-
case "business": return convertBusiness(input.value, input.siteCountry);
|
|
3926
|
-
case "custom": return convertCustom(input.value);
|
|
3927
|
-
}
|
|
3928
|
-
}
|
|
3929
3878
|
|
|
3930
3879
|
//#endregion
|
|
3931
3880
|
//#region ../core/src/business-address.ts
|
|
@@ -4054,10 +4003,7 @@ function editBusinessPin(previous, address) {
|
|
|
4054
4003
|
}) : err({ kind: "invalid_location" });
|
|
4055
4004
|
}
|
|
4056
4005
|
function convertLegacyBusinessEdit(previous, address) {
|
|
4057
|
-
const converted =
|
|
4058
|
-
kind: "business",
|
|
4059
|
-
value: address
|
|
4060
|
-
});
|
|
4006
|
+
const converted = businessAddressToLocation(address);
|
|
4061
4007
|
if (!converted.ok || converted.value === null) return converted;
|
|
4062
4008
|
return editLocationValue(previous, {
|
|
4063
4009
|
address: converted.value.address,
|
|
@@ -4092,6 +4038,32 @@ function businessPinErrors(lat, lng) {
|
|
|
4092
4038
|
const longitude = lng === null ? ["missing_longitude"] : !isLongitude(lng) ? ["invalid_longitude"] : [];
|
|
4093
4039
|
return [...latitude, ...longitude];
|
|
4094
4040
|
}
|
|
4041
|
+
const businessAddressSchema = conversionCoordinatesSchema.safeExtend({
|
|
4042
|
+
addressLine1: conversionText,
|
|
4043
|
+
addressLine2: conversionText,
|
|
4044
|
+
locality: conversionText,
|
|
4045
|
+
region: conversionText,
|
|
4046
|
+
postalCode: conversionText,
|
|
4047
|
+
countryCode: conversionText,
|
|
4048
|
+
displayAddress: conversionText
|
|
4049
|
+
});
|
|
4050
|
+
function businessAddressToLocation(value, siteCountry) {
|
|
4051
|
+
if (value == null) return ok(null);
|
|
4052
|
+
const parsed = businessAddressSchema.safeParse(value);
|
|
4053
|
+
if (!parsed.success) return err({
|
|
4054
|
+
kind: "invalid_legacy_location",
|
|
4055
|
+
issues: parsed.error.issues
|
|
4056
|
+
});
|
|
4057
|
+
const result = finishLocationConversion({
|
|
4058
|
+
street: parsed.data.addressLine1,
|
|
4059
|
+
unit: parsed.data.addressLine2,
|
|
4060
|
+
locality: parsed.data.locality,
|
|
4061
|
+
region: parsed.data.region,
|
|
4062
|
+
postalCode: parsed.data.postalCode,
|
|
4063
|
+
country: parsed.data.countryCode
|
|
4064
|
+
}, parsed.data);
|
|
4065
|
+
return checkConvertedDisplayText(result, parsed.data.displayAddress, siteCountry);
|
|
4066
|
+
}
|
|
4095
4067
|
|
|
4096
4068
|
//#endregion
|
|
4097
4069
|
//#region ../core/src/try-async.ts
|
|
@@ -6010,30 +5982,34 @@ const centredSectionKinds = [
|
|
|
6010
5982
|
"opening-hours",
|
|
6011
5983
|
"social-links",
|
|
6012
5984
|
"engagement",
|
|
6013
|
-
"legal",
|
|
6014
|
-
"legal
|
|
5985
|
+
"legal-navigation",
|
|
5986
|
+
"legal"
|
|
6015
5987
|
];
|
|
6016
5988
|
/** Section ownership is exhaustive for both arrangements; content never changes placement. */
|
|
6017
5989
|
const rowSectionGroups = {
|
|
6018
5990
|
brand: "identity",
|
|
6019
5991
|
"supporting-text": "identity",
|
|
6020
|
-
"social-links": "
|
|
5992
|
+
"social-links": "contact",
|
|
6021
5993
|
navigation: "main-navigation",
|
|
6022
5994
|
"business-address": "visit",
|
|
6023
|
-
contact: "
|
|
6024
|
-
"opening-hours": "
|
|
5995
|
+
contact: "contact",
|
|
5996
|
+
"opening-hours": "hours",
|
|
6025
5997
|
engagement: "engagement",
|
|
6026
5998
|
"legal-navigation": "legal-ending",
|
|
6027
5999
|
legal: "legal-ending"
|
|
6028
6000
|
};
|
|
6029
6001
|
const centredSectionGroups = {
|
|
6030
6002
|
...rowSectionGroups,
|
|
6003
|
+
contact: "visit",
|
|
6004
|
+
"opening-hours": "visit",
|
|
6031
6005
|
"social-links": "social"
|
|
6032
6006
|
};
|
|
6033
6007
|
const rowGroupOrder = [
|
|
6034
6008
|
"identity",
|
|
6035
6009
|
"main-navigation",
|
|
6036
6010
|
"visit",
|
|
6011
|
+
"hours",
|
|
6012
|
+
"contact",
|
|
6037
6013
|
"engagement",
|
|
6038
6014
|
"legal-ending"
|
|
6039
6015
|
];
|
|
@@ -6049,6 +6025,8 @@ const groupSlots = {
|
|
|
6049
6025
|
identity: "head",
|
|
6050
6026
|
"main-navigation": "navigation",
|
|
6051
6027
|
visit: "contact",
|
|
6028
|
+
hours: "contact",
|
|
6029
|
+
contact: "contact",
|
|
6052
6030
|
social: "social",
|
|
6053
6031
|
engagement: "panel",
|
|
6054
6032
|
"legal-ending": "base"
|
|
@@ -6063,20 +6041,25 @@ function footerArrangementPolicy(input) {
|
|
|
6063
6041
|
const arrangement = input.arrangement ?? "simple";
|
|
6064
6042
|
return {
|
|
6065
6043
|
arrangement,
|
|
6066
|
-
kind: arrangement === "centred" || input.legalRegion === "separate" ? "separate-legal-region" : "integrated-legal",
|
|
6067
6044
|
navigationLayout: effectiveFooterNavigationLayout(arrangement, normalizeFooterNavigationLayout(input.storedNavigationLayout))
|
|
6068
6045
|
};
|
|
6069
6046
|
}
|
|
6047
|
+
/** Address and hours pair up only in row arrangements, and only when both have content. */
|
|
6048
|
+
function placementFor(kind, sections, policy) {
|
|
6049
|
+
if (kind === "engagement" || kind === "main-navigation" && policy.navigationLayout === "inline-wrap") return "full-row";
|
|
6050
|
+
const paired = policy.arrangement !== "centred" && (kind === "visit" || kind === "hours") && sections.some((section) => section.kind === "business-address") && sections.some((section) => section.kind === "opening-hours");
|
|
6051
|
+
return paired ? "paired-column" : "column";
|
|
6052
|
+
}
|
|
6070
6053
|
function buildGroups(sections, policy) {
|
|
6071
6054
|
const centred = policy.arrangement === "centred";
|
|
6072
6055
|
const order = centred ? centredGroupOrder : rowGroupOrder;
|
|
6073
6056
|
const owners = centred ? centredSectionGroups : rowSectionGroups;
|
|
6074
|
-
const sectionOrder = centred ? centredSectionKinds : sectionKinds;
|
|
6057
|
+
const sectionOrder = centred ? centredSectionKinds : [...sectionKinds.filter((kind) => kind !== "social-links"), "social-links"];
|
|
6075
6058
|
return order.flatMap((kind) => {
|
|
6076
6059
|
const groupSections = sections.filter((section) => owners[section.kind] === kind).sort((left, right) => sectionOrder.indexOf(left.kind) - sectionOrder.indexOf(right.kind));
|
|
6077
6060
|
return groupSections.length === 0 ? [] : [{
|
|
6078
6061
|
kind,
|
|
6079
|
-
|
|
6062
|
+
placement: placementFor(kind, sections, policy),
|
|
6080
6063
|
sections: groupSections,
|
|
6081
6064
|
...centred ? { slot: groupSlots[kind] } : {}
|
|
6082
6065
|
}];
|
|
@@ -6091,7 +6074,7 @@ function footerMembershipKey(sections) {
|
|
|
6091
6074
|
}
|
|
6092
6075
|
function renderRegion(kind, groups, policy) {
|
|
6093
6076
|
if (groups.length === 0) return [];
|
|
6094
|
-
const columns = kind !== "main" || policy.arrangement === "centred" ? 1 : Math.max(1, Math.min(groups.filter((group) => group.
|
|
6077
|
+
const columns = kind !== "main" || policy.arrangement === "centred" ? 1 : Math.max(1, Math.min(groups.filter((group) => group.placement !== "full-row").length, 5));
|
|
6095
6078
|
return [{
|
|
6096
6079
|
kind,
|
|
6097
6080
|
columns,
|
|
@@ -6104,9 +6087,9 @@ function planFooterArrangement(renderableSections, policy) {
|
|
|
6104
6087
|
const groups = buildGroups(selectedSections, policy);
|
|
6105
6088
|
const separateEngagement = groups.filter((group) => group.kind === "engagement" && group.sections.some((section) => section.kind === "engagement" && section.treatment === "separate-row"));
|
|
6106
6089
|
const layoutGroups = groups.filter((group) => !separateEngagement.includes(group));
|
|
6107
|
-
const legalGroups =
|
|
6090
|
+
const legalGroups = layoutGroups.filter((group) => group.kind === "legal-ending");
|
|
6108
6091
|
const unsortedMainGroups = layoutGroups.filter((group) => !legalGroups.includes(group));
|
|
6109
|
-
const mainGroups = policy.arrangement === "centred" ? unsortedMainGroups : [...unsortedMainGroups.filter((group) => group.
|
|
6092
|
+
const mainGroups = policy.arrangement === "centred" ? unsortedMainGroups : [...unsortedMainGroups.filter((group) => group.placement !== "full-row"), ...unsortedMainGroups.filter((group) => group.placement === "full-row")];
|
|
6110
6093
|
return {
|
|
6111
6094
|
membershipKey: footerMembershipKey(selectedSections),
|
|
6112
6095
|
regions: [
|
|
@@ -10402,6 +10385,26 @@ const EMAIL_DEFINITIONS = {
|
|
|
10402
10385
|
perEvent: false,
|
|
10403
10386
|
templateStorage: false
|
|
10404
10387
|
},
|
|
10388
|
+
venue_claim_link: {
|
|
10389
|
+
wording: "fixed",
|
|
10390
|
+
perEvent: false,
|
|
10391
|
+
templateStorage: false
|
|
10392
|
+
},
|
|
10393
|
+
venue_claim_submitted: {
|
|
10394
|
+
wording: "fixed",
|
|
10395
|
+
perEvent: false,
|
|
10396
|
+
templateStorage: false
|
|
10397
|
+
},
|
|
10398
|
+
venue_claim_updated: {
|
|
10399
|
+
wording: "fixed",
|
|
10400
|
+
perEvent: false,
|
|
10401
|
+
templateStorage: false
|
|
10402
|
+
},
|
|
10403
|
+
venue_claim_removed: {
|
|
10404
|
+
wording: "fixed",
|
|
10405
|
+
perEvent: false,
|
|
10406
|
+
templateStorage: false
|
|
10407
|
+
},
|
|
10405
10408
|
support_ticket_notification: {
|
|
10406
10409
|
wording: "fixed",
|
|
10407
10410
|
perEvent: false,
|
|
@@ -10547,6 +10550,16 @@ const OFFLINE_PAYMENT_METHODS = [
|
|
|
10547
10550
|
"card_machine",
|
|
10548
10551
|
"other"
|
|
10549
10552
|
];
|
|
10553
|
+
/** Reads a stored method; anything unrecognised (including null) is null. */
|
|
10554
|
+
function parseOfflinePaymentMethod(value) {
|
|
10555
|
+
return OFFLINE_PAYMENT_METHODS.find((method) => method === value) ?? null;
|
|
10556
|
+
}
|
|
10557
|
+
const OFFLINE_PAYMENT_METHOD_LABELS = {
|
|
10558
|
+
cash: "Cash",
|
|
10559
|
+
bank_transfer: "Bank transfer",
|
|
10560
|
+
card_machine: "Card machine",
|
|
10561
|
+
other: "Other"
|
|
10562
|
+
};
|
|
10550
10563
|
|
|
10551
10564
|
//#endregion
|
|
10552
|
-
export {
|
|
10565
|
+
export { locationMapLinks as $, unsafeAsSiteId as $n, isPublicEventPricingOptionDisplayable as $t, parseMailingListContentVersionId as A, parseDatedOfferingCapacityHoldId as An, resolveBookingTimeZoneId as At, footerNavigationLayouts as B, unsafeAsSafeDownloadFilename as Bn, addIntervalPreservingMonthAnchor as Bt, resolveWholeSeriesBookingPhase as C, unsafeAsStaffMemberId as Cn, getBookingLocalDateKey as Ct, parseManagementKey as D, unsafeAsEntitlementId as Dn, parseBookingLocalDate as Dt, exposeSecret as E, parseMembershipId as En, localScheduleTimePattern as Et, parseMailingListGlobalForm as F, unsafeAsFileChecksumSha256 as Fn, BOOKING_COURSE_INSTALMENT_DEADLINES as Ft, formatOpeningHoursRows as G, unsafeAsProductId as Gn, omitZeroAmountFutureRows as Gt, DEFAULT_MAILING_LIST_TARGETING as H, unsafeAsStorageBucketName as Hn, getBookingInstalmentDepositRefundability as Ht, DEFAULT_MAILING_LIST_PRIVACY_NOTE as I, unsafeAsMediaAssetId as In, validateBookingPaymentOptionKinds as It, assertAllowedPublicUrl as J, parsePageId as Jn, resolveFlexibleBalanceInitialPaymentCents as Jt, parsePublicContactDetails as K, unsafeAsCheckoutLineId as Kn, splitAmountWithRemainderInFirst as Kt, DEFAULT_MAILING_LIST_SUCCESS_MESSAGE as L, unsafeAsOriginalFilename as Ln, isLiveOrderInstalmentPlanStatus as Lt, parseMailingListRuntimeContext as M, parseMediaAssetId as Mn, parseBookingTimeZone as Mt, assessMailingListTargeting as N, unsafeAsDeclaredMimeType as Nn, parseUtcIsoDateTimeString as Nt, slugify as O, unsafeAsPassId as On, parseLocalScheduleTime as Ot, parseConfiguredMailingListProvider as P, unsafeAsDetectedMimeType as Pn, toUtcIsoDateTimeString as Pt, stableJsonStringify as Q, parseUserId as Qn, formatEventPricing as Qt, parseMailingListProviderScope as R, unsafeAsPositiveByteCount as Rn, isSettleableFlexibleBalanceContractStatus as Rt, orderedLiveRunSessions as S, unsafeAsAppointmentResourceId as Sn, formatLocalScheduleTime as St, createSecret as T, parseSiteTermsVersionId as Tn, getLocalScheduleTime as Tt, planMailingListChoicePresentation as U, unsafeAsStoragePath as Un, getBookingInstalmentPlanIntervalCount as Ut, parseMailingListPlacementTargeting as V, unsafeAsSiteScopedStoragePath as Vn, clampConfiguredAmount as Vt, isCanonicalRichTextDoc as W, unsafeAsUploadSessionId as Wn, getBookingInstalmentProtectedDepositAmountCents as Wt, SENSITIVE_COLLECTION_MODES as X, parseApiKeyId as Xn, parseEventPageSurfaceSubject as Xt, SENSITIVE_COLLECTION_CONFIRMATION_VERSION as Y, unsafeAsSiteFontId as Yn, deriveTotalTicketQuantity as Yt, decideLocationSave as Z, parseSiteId as Zn, formatBookingPriceDisplay as Zt, WHOLE_SERIES_EVENT_PRESET_VALUES as _, parseCurrencyCode as _n, resolveBookingDisplayContext as _t, resolveEventCatalogue as a, resolvePricingOptionsPriceDisplay as an, unsafeAsEventSeriesId as ar, toLocationCoordinates as at, CANCELLED_SESSION_STATUS as b, unsafeAsBookingRequirementId as bn, compareLocalScheduleDates as bt, areConfiguredBookingVerticalConfigsEqual as c, mapReadonlyNonEmptyArray as cn, err as cr, mapDrawingSchema as ct, parseVerticalPresetId as d, parsePositiveCents as dn, formatDateRange as dt, publicEventPricingCurrency as en, unsafeAsUserId as er, locationValueSchema as et, resolveSiteVerticalBookingConfig as f, toCents as fn, formatDateTime as ft, SURFACE_EVENT_PRESET_VALUES as g, formatCurrencyAmount as gn, inferSiteDateLocale as gt, ORDINARY_EVENT_PRESET_VALUES as h, unsafeAsPositiveCents as hn, formatTimeRange as ht, authoredValuesEqual as i, resolveExactOrFreePriceDisplay as in, unsafeAsEventOfferingId as ir, publicLocationSchema as it, parseMailingListSignedSourceToken as j, unsafeAsBookingSessionId as jn, toBookingTimeZone as jt, parseMailingListBlockId as k, parseDatedOfferingCapacityHoldAuditRef as kn, resolveBookingBusinessTimeZone as kt, canonicalizeConfiguredBookingVerticalConfig as l, isNonNegativeWholeCents as ln, ok as lr, selectCategoryView as lt, EVENT_PRESET_VALUES as m, unsafeAsNonNegativeCents as mn, formatTime as mt, committedWriteProofSchema as n, publicEventPricingOptions as nn, parseRetiredCourseId as nr, parseLocationValue as nt, EVENT_PRESET_VOCABULARY as o, fromArray as on, unsafeAsOccurrenceId as or, isPresent as ot, DEFAULT_EVENT_TYPE_PRESETS as p, toNonNegativeCents as pn, formatDateTimeRange as pt, parseWeeklyOpeningHours as q, parseEditorSessionGeneration as qn, resolveFlexibleBalanceDueAt as qt, isRecord as r, publicEventPricingType as rn, unsafeAsEventInstanceId as rr, projectPublicLocation as rt, NAVIGATION_LOCATIONS as s, mapNonEmptyArray as sn, unsafeAsPricingOptionId as sr, trimmedStringOrNull as st, OFFLINE_PAYMENT_METHODS as t, publicEventPricingDisplay as tn, parseEventSeriesId as tr, normalizeLocationAddressText as tt, parseVerticalId as u, parseNonNegativeCents as un, blockInteractionContextSchema as ur, formatDate as ut, getPublicReadCachePolicy as v, assertNever as vn, toScheduledBookingDateTime as vt, resolveWholeSeriesRunLifecycle as w, parseCustomerId as wn, getLocalScheduleDate as wt, nextLiveRunSessionStartMs as x, unsafeAsDemoCapability as xn, formatLocalScheduleDate as xt, publicReadFreshnessSeconds as y, formatDurationUnitLabel as yn, buildBookingUtcDateWindow as yt, parseFooterCompositionV1 as z, unsafeAsPositiveSeconds as zn, isSettleableOrderInstalmentPlanStatus as zt };
|
package/dist/testing.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "./sdk-event-upsert-
|
|
3
|
-
import "./src-
|
|
4
|
-
import {
|
|
5
|
-
import "./load-config-
|
|
2
|
+
import "./sdk-event-upsert-mPJpEQ2x.mjs";
|
|
3
|
+
import "./src-DOwrYdTk.mjs";
|
|
4
|
+
import { G as syncLocalMediaForPull, Gt as applyPushConfigPlan, Jt as preparePushConfigTarget, Mn as createOutput, W as syncLocalMediaForPush, at as readEntries, ht as writeMediaManifest, o as executeEntryCommandPlanAsSyncResult, t as compileEntryPushCommands, z as calculateEntryDiffs } from "./entryCommands-DqqGit0l.mjs";
|
|
5
|
+
import "./load-config-Dgw0C6y3.mjs";
|
|
6
6
|
|
|
7
7
|
export { applyPushConfigPlan, calculateEntryDiffs, compileEntryPushCommands, createOutput, executeEntryCommandPlanAsSyncResult, preparePushConfigTarget, readEntries, syncLocalMediaForPull, syncLocalMediaForPush, writeMediaManifest };
|
package/package.json
CHANGED