@bash-app/bash-common 30.451.0 → 30.452.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.
|
@@ -13,11 +13,13 @@ export type ServicePendingEditWire = {
|
|
|
13
13
|
updatedAt: string;
|
|
14
14
|
createdAt: string;
|
|
15
15
|
};
|
|
16
|
-
export declare const SERVICE_PENDING_EDIT_SNAPSHOT_KEYS: readonly ["serviceName", "tagline", "description", "place", "googlePlaceId", "street", "city", "state", "zipCode", "country", "latitude", "longitude", "coverPhoto", "backgroundImage", "availableHours", "mission", "communityInvolvement", "contactDetails", "cancellationPolicy", "allowsInstantBooking", "showAvailabilityOnProfile", "bookingIntent", "visibility", "serviceRatesAssociation", "media"];
|
|
16
|
+
export declare const SERVICE_PENDING_EDIT_SNAPSHOT_KEYS: readonly ["serviceName", "tagline", "description", "place", "googlePlaceId", "street", "city", "state", "zipCode", "country", "latitude", "longitude", "coverPhoto", "backgroundImage", "availableHours", "mission", "communityInvolvement", "contactDetails", "cancellationPolicy", "allowsInstantBooking", "showAvailabilityOnProfile", "bookingIntent", "visibility", "serviceRatesAssociation", "media", "exhibitor", "vendor", "venue", "sponsor", "entertainmentService", "eventService", "organization", "volunteerService"];
|
|
17
17
|
export declare function buildServicePendingBaseSnapshot(service: ServiceExt): Record<string, unknown>;
|
|
18
18
|
export declare function countServicePendingTopLevelChanges(changes: DeepPartial<ServiceExt>): number;
|
|
19
19
|
export declare const SERVICE_HIGH_IMPACT_SAVE_KEYS: readonly ["serviceName", "place", "street", "city", "state", "zipCode", "country", "latitude", "longitude", "availableHours", "serviceRatesAssociation", "cancellationPolicy"];
|
|
20
20
|
export declare function servicePendingHasHighImpactChanges(changes: DeepPartial<ServiceExt>): boolean;
|
|
21
|
+
/** High-impact Save confirm copy for published listing wizards. */
|
|
22
|
+
export declare function buildServiceHighImpactConfirmMessage(committed: ServiceExt, pending: DeepPartial<ServiceExt>): string;
|
|
21
23
|
export declare function servicePendingEditLocalStorageKey(serviceId: string, userId: string): string;
|
|
22
24
|
export { BASH_EVENT_PENDING_EDIT_TTL_MS as SERVICE_PENDING_EDIT_TTL_MS };
|
|
23
25
|
//# sourceMappingURL=serviceWizardSave.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serviceWizardSave.d.ts","sourceRoot":"","sources":["../src/serviceWizardSave.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,8BAA8B,EAAE,MAAM,0BAA0B,CAAC;AAE1E,uFAAuF;AACvF,wBAAgB,6BAA6B,CAC3C,gBAAgB,EAAE,gBAAgB,GAAG,IAAI,GAAG,SAAS,GACpD,OAAO,CAET;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,OAAO,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,kCAAkC,
|
|
1
|
+
{"version":3,"file":"serviceWizardSave.d.ts","sourceRoot":"","sources":["../src/serviceWizardSave.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,8BAA8B,EAAE,MAAM,0BAA0B,CAAC;AAE1E,uFAAuF;AACvF,wBAAgB,6BAA6B,CAC3C,gBAAgB,EAAE,gBAAgB,GAAG,IAAI,GAAG,SAAS,GACpD,OAAO,CAET;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,OAAO,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,kCAAkC,qgBAkCrC,CAAC;AAOX,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,UAAU,GAClB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAQzB;AAED,wBAAgB,kCAAkC,CAChD,OAAO,EAAE,WAAW,CAAC,UAAU,CAAC,GAC/B,MAAM,CAGR;AAED,eAAO,MAAM,6BAA6B,gLAahC,CAAC;AAEX,wBAAgB,kCAAkC,CAChD,OAAO,EAAE,WAAW,CAAC,UAAU,CAAC,GAC/B,OAAO,CAET;AAoBD,mEAAmE;AACnE,wBAAgB,oCAAoC,CAClD,SAAS,EAAE,UAAU,EACrB,OAAO,EAAE,WAAW,CAAC,UAAU,CAAC,GAC/B,MAAM,CAkBR;AAED,wBAAgB,iCAAiC,CAC/C,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,GACb,MAAM,CAER;AAED,OAAO,EAAE,8BAA8B,IAAI,2BAA2B,EAAE,CAAC"}
|
|
@@ -30,6 +30,14 @@ export const SERVICE_PENDING_EDIT_SNAPSHOT_KEYS = [
|
|
|
30
30
|
"visibility",
|
|
31
31
|
"serviceRatesAssociation",
|
|
32
32
|
"media",
|
|
33
|
+
"exhibitor",
|
|
34
|
+
"vendor",
|
|
35
|
+
"venue",
|
|
36
|
+
"sponsor",
|
|
37
|
+
"entertainmentService",
|
|
38
|
+
"eventService",
|
|
39
|
+
"organization",
|
|
40
|
+
"volunteerService",
|
|
33
41
|
];
|
|
34
42
|
export function buildServicePendingBaseSnapshot(service) {
|
|
35
43
|
const snap = {};
|
|
@@ -61,6 +69,35 @@ export const SERVICE_HIGH_IMPACT_SAVE_KEYS = [
|
|
|
61
69
|
export function servicePendingHasHighImpactChanges(changes) {
|
|
62
70
|
return SERVICE_HIGH_IMPACT_SAVE_KEYS.some((key) => key in changes);
|
|
63
71
|
}
|
|
72
|
+
const SERVICE_HIGH_IMPACT_FIELD_LABELS = {
|
|
73
|
+
serviceName: "Listing name",
|
|
74
|
+
place: "Location label",
|
|
75
|
+
street: "Street",
|
|
76
|
+
city: "City",
|
|
77
|
+
state: "State",
|
|
78
|
+
zipCode: "ZIP code",
|
|
79
|
+
country: "Country",
|
|
80
|
+
latitude: "Map latitude",
|
|
81
|
+
longitude: "Map longitude",
|
|
82
|
+
availableHours: "Hours",
|
|
83
|
+
serviceRatesAssociation: "Rates and pricing",
|
|
84
|
+
cancellationPolicy: "Cancellation policy",
|
|
85
|
+
};
|
|
86
|
+
/** High-impact Save confirm copy for published listing wizards. */
|
|
87
|
+
export function buildServiceHighImpactConfirmMessage(committed, pending) {
|
|
88
|
+
const lines = SERVICE_HIGH_IMPACT_SAVE_KEYS.filter((key) => key in pending).map((key) => {
|
|
89
|
+
const label = SERVICE_HIGH_IMPACT_FIELD_LABELS[key];
|
|
90
|
+
const before = key in committed
|
|
91
|
+
? String(committed[key] ?? "—")
|
|
92
|
+
: "—";
|
|
93
|
+
const after = String(pending[key] ?? "—");
|
|
94
|
+
return `${label}: ${before} → ${after}`;
|
|
95
|
+
});
|
|
96
|
+
return [
|
|
97
|
+
"These updates change what hosts and bookers see on your public listing.",
|
|
98
|
+
...lines,
|
|
99
|
+
].join("\n");
|
|
100
|
+
}
|
|
64
101
|
export function servicePendingEditLocalStorageKey(serviceId, userId) {
|
|
65
102
|
return `servicePendingEdit:${serviceId}:${userId}`;
|
|
66
103
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serviceWizardSave.js","sourceRoot":"","sources":["../src/serviceWizardSave.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAIlD,OAAO,EAAE,8BAA8B,EAAE,MAAM,0BAA0B,CAAC;AAE1E,uFAAuF;AACvF,MAAM,UAAU,6BAA6B,CAC3C,gBAAqD;IAErD,OAAO,gBAAgB,KAAK,gBAAgB,CAAC,SAAS,CAAC;AACzD,CAAC;AAYD,MAAM,CAAC,MAAM,kCAAkC,GAAG;IAChD,aAAa;IACb,SAAS;IACT,aAAa;IACb,OAAO;IACP,eAAe;IACf,QAAQ;IACR,MAAM;IACN,OAAO;IACP,SAAS;IACT,SAAS;IACT,UAAU;IACV,WAAW;IACX,YAAY;IACZ,iBAAiB;IACjB,gBAAgB;IAChB,SAAS;IACT,sBAAsB;IACtB,gBAAgB;IAChB,oBAAoB;IACpB,sBAAsB;IACtB,2BAA2B;IAC3B,eAAe;IACf,YAAY;IACZ,yBAAyB;IACzB,OAAO;
|
|
1
|
+
{"version":3,"file":"serviceWizardSave.js","sourceRoot":"","sources":["../src/serviceWizardSave.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAIlD,OAAO,EAAE,8BAA8B,EAAE,MAAM,0BAA0B,CAAC;AAE1E,uFAAuF;AACvF,MAAM,UAAU,6BAA6B,CAC3C,gBAAqD;IAErD,OAAO,gBAAgB,KAAK,gBAAgB,CAAC,SAAS,CAAC;AACzD,CAAC;AAYD,MAAM,CAAC,MAAM,kCAAkC,GAAG;IAChD,aAAa;IACb,SAAS;IACT,aAAa;IACb,OAAO;IACP,eAAe;IACf,QAAQ;IACR,MAAM;IACN,OAAO;IACP,SAAS;IACT,SAAS;IACT,UAAU;IACV,WAAW;IACX,YAAY;IACZ,iBAAiB;IACjB,gBAA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K,EAAE,OAAO;IACd,OAAO,EAAE,UAAU;IACnB,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,cAAc;IACxB,SAAS,EAAE,eAAe;IAC1B,cAAc,EAAE,OAAO;IACvB,uBAAuB,EAAE,mBAAmB;IAC5C,kBAAkB,EAAE,qBAAqB;CAC1C,CAAC;AAEF,mEAAmE;AACnE,MAAM,UAAU,oCAAoC,CAClD,SAAqB,EACrB,OAAgC;IAEhC,MAAM,KAAK,GAAG,6BAA6B,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,IAAI,OAAO,CAAC,CAAC,GAAG,CAC7E,CAAC,GAAG,EAAE,EAAE;QACN,MAAM,KAAK,GAAG,gCAAgC,CAAC,GAAG,CAAC,CAAC;QACpD,MAAM,MAAM,GACV,GAAG,IAAI,SAAS;YACd,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,GAAuB,CAAC,IAAI,GAAG,CAAC;YACnD,CAAC,CAAC,GAAG,CAAC;QACV,MAAM,KAAK,GAAG,MAAM,CACjB,OAAmC,CAAC,GAAG,CAAC,IAAI,GAAG,CACjD,CAAC;QACF,OAAO,GAAG,KAAK,KAAK,MAAM,MAAM,KAAK,EAAE,CAAC;IAC1C,CAAC,CACF,CAAC;IACF,OAAO;QACL,yEAAyE;QACzE,GAAG,KAAK;KACT,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC;AAED,MAAM,UAAU,iCAAiC,CAC/C,SAAiB,EACjB,MAAc;IAEd,OAAO,sBAAsB,SAAS,IAAI,MAAM,EAAE,CAAC;AACrD,CAAC;AAED,OAAO,EAAE,8BAA8B,IAAI,2BAA2B,EAAE,CAAC"}
|
package/package.json
CHANGED
package/src/serviceWizardSave.ts
CHANGED
|
@@ -47,6 +47,14 @@ export const SERVICE_PENDING_EDIT_SNAPSHOT_KEYS = [
|
|
|
47
47
|
"visibility",
|
|
48
48
|
"serviceRatesAssociation",
|
|
49
49
|
"media",
|
|
50
|
+
"exhibitor",
|
|
51
|
+
"vendor",
|
|
52
|
+
"venue",
|
|
53
|
+
"sponsor",
|
|
54
|
+
"entertainmentService",
|
|
55
|
+
"eventService",
|
|
56
|
+
"organization",
|
|
57
|
+
"volunteerService",
|
|
50
58
|
] as const;
|
|
51
59
|
|
|
52
60
|
type ServicePendingSnapshotKey = Extract<
|
|
@@ -94,6 +102,48 @@ export function servicePendingHasHighImpactChanges(
|
|
|
94
102
|
return SERVICE_HIGH_IMPACT_SAVE_KEYS.some((key) => key in changes);
|
|
95
103
|
}
|
|
96
104
|
|
|
105
|
+
const SERVICE_HIGH_IMPACT_FIELD_LABELS: Record<
|
|
106
|
+
(typeof SERVICE_HIGH_IMPACT_SAVE_KEYS)[number],
|
|
107
|
+
string
|
|
108
|
+
> = {
|
|
109
|
+
serviceName: "Listing name",
|
|
110
|
+
place: "Location label",
|
|
111
|
+
street: "Street",
|
|
112
|
+
city: "City",
|
|
113
|
+
state: "State",
|
|
114
|
+
zipCode: "ZIP code",
|
|
115
|
+
country: "Country",
|
|
116
|
+
latitude: "Map latitude",
|
|
117
|
+
longitude: "Map longitude",
|
|
118
|
+
availableHours: "Hours",
|
|
119
|
+
serviceRatesAssociation: "Rates and pricing",
|
|
120
|
+
cancellationPolicy: "Cancellation policy",
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
/** High-impact Save confirm copy for published listing wizards. */
|
|
124
|
+
export function buildServiceHighImpactConfirmMessage(
|
|
125
|
+
committed: ServiceExt,
|
|
126
|
+
pending: DeepPartial<ServiceExt>
|
|
127
|
+
): string {
|
|
128
|
+
const lines = SERVICE_HIGH_IMPACT_SAVE_KEYS.filter((key) => key in pending).map(
|
|
129
|
+
(key) => {
|
|
130
|
+
const label = SERVICE_HIGH_IMPACT_FIELD_LABELS[key];
|
|
131
|
+
const before =
|
|
132
|
+
key in committed
|
|
133
|
+
? String(committed[key as keyof ServiceExt] ?? "—")
|
|
134
|
+
: "—";
|
|
135
|
+
const after = String(
|
|
136
|
+
(pending as Record<string, unknown>)[key] ?? "—"
|
|
137
|
+
);
|
|
138
|
+
return `${label}: ${before} → ${after}`;
|
|
139
|
+
}
|
|
140
|
+
);
|
|
141
|
+
return [
|
|
142
|
+
"These updates change what hosts and bookers see on your public listing.",
|
|
143
|
+
...lines,
|
|
144
|
+
].join("\n");
|
|
145
|
+
}
|
|
146
|
+
|
|
97
147
|
export function servicePendingEditLocalStorageKey(
|
|
98
148
|
serviceId: string,
|
|
99
149
|
userId: string
|