@gomusdev/web-components 4.9.0 → 4.9.2
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/README.md +30 -18
- package/dist-js/gomus-webcomponents.iife.js +40 -9
- package/dist-js/gomus-webcomponents.js +40 -9
- package/dist-js/gomus-webcomponents.min.iife.js +32 -32
- package/dist-js/gomus-webcomponents.min.js +1798 -1777
- package/dist-js/src/components/checkoutForm/lib.spec.d.ts +1 -0
- package/dist-js/src/components/ticketSelection/subcomponents/tickets/subcomponents/segment/SegmentDetails.svelte.d.ts +20 -20
- package/dist-js/src/factories/CartItemFactories.d.ts +42 -42
- package/dist-js/src/lib/models/cart/CartItem.d.ts +7 -15
- package/dist-js/src/lib/models/cart/cart.svelte.d.ts +40 -40
- package/dist-js/src/lib/models/cart/localStorage.svelte.d.ts +7 -7
- package/dist-js/src/lib/stores/shop.svelte.d.ts +20 -20
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,31 +1,43 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.9.2 (2026-07-20)
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* **release:** strip gitlab links and issue refs from npm README changelog
|
|
8
|
+
|
|
9
|
+
## 4.9.1 (2026-07-20)
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **checkoutForm:** handle meta.status and payment_data on checkout
|
|
14
|
+
|
|
3
15
|
## 4.9.0 (2026-07-16)
|
|
4
16
|
|
|
5
17
|
### Features
|
|
6
18
|
|
|
7
|
-
* **auth:** add go-set-password to complete the password reset flow
|
|
19
|
+
* **auth:** add go-set-password to complete the password reset flow
|
|
8
20
|
|
|
9
21
|
## 4.8.2 (2026-07-16)
|
|
10
22
|
|
|
11
23
|
### Bug Fixes
|
|
12
24
|
|
|
13
25
|
* **mr2:** expand spec detection to include sibling `spec/` subdirectory
|
|
14
|
-
* **ticket-selection:** derive day-ticket time per ticket, not from first quota (TC-04)
|
|
26
|
+
* **ticket-selection:** derive day-ticket time per ticket, not from first quota (TC-04)
|
|
15
27
|
|
|
16
28
|
## 4.8.1 (2026-07-16)
|
|
17
29
|
|
|
18
30
|
### Bug Fixes
|
|
19
31
|
|
|
20
32
|
* **couponRedemption:** clear stale error when flush() succeeds
|
|
21
|
-
* **forms:** clear form-level api errors on valid submit
|
|
33
|
+
* **forms:** clear form-level api errors on valid submit
|
|
22
34
|
* **forms:** reset stale success message on valid submit
|
|
23
35
|
|
|
24
36
|
## 4.8.0 (2026-07-15)
|
|
25
37
|
|
|
26
38
|
### Features
|
|
27
39
|
|
|
28
|
-
* **forms:** add dateOfBirth field for annual ticket personalization
|
|
40
|
+
* **forms:** add dateOfBirth field for annual ticket personalization
|
|
29
41
|
|
|
30
42
|
### Bug Fixes
|
|
31
43
|
|
|
@@ -35,20 +47,20 @@
|
|
|
35
47
|
|
|
36
48
|
### Features
|
|
37
49
|
|
|
38
|
-
* **accessibility:** derive quantity control labels from event details
|
|
50
|
+
* **accessibility:** derive quantity control labels from event details
|
|
39
51
|
|
|
40
52
|
## 4.6.2 (2026-07-14)
|
|
41
53
|
|
|
42
54
|
### Bug Fixes
|
|
43
55
|
|
|
44
|
-
* **a11y:** derive quantity control name from event title for flat-price rows
|
|
56
|
+
* **a11y:** derive quantity control name from event title for flat-price rows
|
|
45
57
|
* **assets:** shorten /uploads cache to 60s
|
|
46
58
|
|
|
47
59
|
## 4.6.1 (2026-07-14)
|
|
48
60
|
|
|
49
61
|
### Bug Fixes
|
|
50
62
|
|
|
51
|
-
* **go-order:** clear cart and guest session on token change
|
|
63
|
+
* **go-order:** clear cart and guest session on token change
|
|
52
64
|
|
|
53
65
|
## 4.6.0 (2026-07-14)
|
|
54
66
|
|
|
@@ -64,7 +76,7 @@
|
|
|
64
76
|
|
|
65
77
|
### Features
|
|
66
78
|
|
|
67
|
-
* **checkout:** split guest and signed-in checkout, gated by go-if
|
|
79
|
+
* **checkout:** split guest and signed-in checkout, gated by go-if
|
|
68
80
|
|
|
69
81
|
## 4.4.0 (2026-07-13)
|
|
70
82
|
|
|
@@ -76,10 +88,10 @@
|
|
|
76
88
|
|
|
77
89
|
### Features
|
|
78
90
|
|
|
79
|
-
* **cart:** render tour lines in go-cart
|
|
80
|
-
* **cart:** tour product model layer for go.cart.addTour
|
|
81
|
-
* **go:** go.api.cart.addTour for programmatic tour booking
|
|
82
|
-
* **order:** render tour bookings in go-order breakdown
|
|
91
|
+
* **cart:** render tour lines in go-cart
|
|
92
|
+
* **cart:** tour product model layer for go.cart.addTour
|
|
93
|
+
* **go:** go.api.cart.addTour for programmatic tour booking
|
|
94
|
+
* **order:** render tour bookings in go-order breakdown
|
|
83
95
|
|
|
84
96
|
## 4.2.0 (2026-07-09)
|
|
85
97
|
|
|
@@ -93,7 +105,7 @@
|
|
|
93
105
|
|
|
94
106
|
* **forms:** pass required type argument to HTMLAttributes
|
|
95
107
|
* **forms:** resolve remaining typescript-eslint errors in InputAndLabel
|
|
96
|
-
* **forms:** set field.value when a single payment mode is auto-selected
|
|
108
|
+
* **forms:** set field.value when a single payment mode is auto-selected
|
|
97
109
|
* **forms:** type the field snippet map as Record<FieldType, Snippet>
|
|
98
110
|
|
|
99
111
|
## 4.1.0 (2026-07-09)
|
|
@@ -237,7 +249,7 @@
|
|
|
237
249
|
* add audit-code skill — automate the full code-audit pipeline
|
|
238
250
|
* **audit-report:** 'With screenshots' category (auto-populated from .shots dirs)
|
|
239
251
|
* **audit-report:** click-to-peek source excerpts (+/-5 lines) on every link
|
|
240
|
-
* **audit-report:** default 'All findings' section; Overview demoted below it
|
|
252
|
+
* **audit-report:** default 'All findings' section; Overview demoted below it
|
|
241
253
|
* **audit-report:** hover source-code preview + annotated screenshot repro (PoC)
|
|
242
254
|
* **audit-report:** password-protect report.html (password wc-bugs)
|
|
243
255
|
* **audit-report:** per-finding markdown records with live triage state + sidebar-nav fix
|
|
@@ -372,7 +384,7 @@ Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|
|
372
384
|
|
|
373
385
|
* flush unsubmitted coupon token before checkout
|
|
374
386
|
* include 2.1.1 patches from master
|
|
375
|
-
* **shop:** remove dangerous clearCache() that wiped auth and cart
|
|
387
|
+
* **shop:** remove dangerous clearCache() that wiped auth and cart
|
|
376
388
|
* validate coupon on go-after-validation, not just submit
|
|
377
389
|
|
|
378
390
|
### Documentation
|
|
@@ -410,7 +422,7 @@ Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|
|
410
422
|
### Bug Fixes
|
|
411
423
|
|
|
412
424
|
* flush unsubmitted coupon token before checkout
|
|
413
|
-
* **shop:** remove dangerous clearCache() that wiped auth and cart
|
|
425
|
+
* **shop:** remove dangerous clearCache() that wiped auth and cart
|
|
414
426
|
* validate coupon on go-after-validation, not just submit
|
|
415
427
|
|
|
416
428
|
### Documentation
|
|
@@ -847,8 +859,8 @@ Parent and child filters still need to stay consistent — no auto-inference bet
|
|
|
847
859
|
|
|
848
860
|
### Bug Fixes
|
|
849
861
|
|
|
850
|
-
* remove unused
|
|
851
|
-
* remove unused
|
|
862
|
+
* remove unused `#fields` property in FormDetails class
|
|
863
|
+
* remove unused `#fields` property in FormDetails class
|
|
852
864
|
|
|
853
865
|
## 1.33.1 (2026-01-15)
|
|
854
866
|
|
|
@@ -12238,6 +12238,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
12238
12238
|
};
|
|
12239
12239
|
return {
|
|
12240
12240
|
...finalOptions,
|
|
12241
|
+
quantity: finalOptions.quantity ?? 0,
|
|
12242
|
+
time: finalOptions.time ?? "",
|
|
12241
12243
|
type: product.type,
|
|
12242
12244
|
product,
|
|
12243
12245
|
/**
|
|
@@ -12297,7 +12299,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
12297
12299
|
return this.uuid + ":" + this.quantity;
|
|
12298
12300
|
},
|
|
12299
12301
|
get price_cents() {
|
|
12300
|
-
|
|
12302
|
+
const dynamicPrices = "dynamic_prices" in this.product ? this.product.dynamic_prices : null;
|
|
12303
|
+
if (this.time && dynamicPrices?.[this.time] != null) return dynamicPrices[this.time];
|
|
12301
12304
|
return this.product.price_cents;
|
|
12302
12305
|
},
|
|
12303
12306
|
get price_formatted() {
|
|
@@ -12480,10 +12483,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
12480
12483
|
//#region src/lib/models/cart/cart.svelte.ts
|
|
12481
12484
|
var lastUuid = 0;
|
|
12482
12485
|
function createCart(products, contingent = 20) {
|
|
12486
|
+
const items = proxy([]);
|
|
12487
|
+
const coupons = proxy([]);
|
|
12488
|
+
let paymentModeId = /* @__PURE__ */ state(void 0);
|
|
12483
12489
|
const cart = {
|
|
12484
|
-
items
|
|
12485
|
-
coupons
|
|
12486
|
-
paymentModeId
|
|
12490
|
+
items,
|
|
12491
|
+
coupons,
|
|
12492
|
+
get paymentModeId() {
|
|
12493
|
+
return get$2(paymentModeId);
|
|
12494
|
+
},
|
|
12495
|
+
set paymentModeId(value) {
|
|
12496
|
+
set(paymentModeId, value, true);
|
|
12497
|
+
},
|
|
12487
12498
|
uid: `cart-${lastUuid++}`,
|
|
12488
12499
|
get nonEmptyItems() {
|
|
12489
12500
|
return this.items.filter((i) => i.quantity > 0);
|
|
@@ -14695,7 +14706,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14695
14706
|
function AnnualTicketPersonalizationForm($$anchor, $$props) {
|
|
14696
14707
|
push($$props, true);
|
|
14697
14708
|
let token = prop($$props, "token", 7), ticketSaleId = prop($$props, "ticketSaleId", 7);
|
|
14698
|
-
let form;
|
|
14709
|
+
let form = null;
|
|
14699
14710
|
const details = new PersonalizationDetails();
|
|
14700
14711
|
setPersonalizationDetails($$props.$$host, details);
|
|
14701
14712
|
user_effect(() => {
|
|
@@ -14763,12 +14774,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14763
14774
|
} };
|
|
14764
14775
|
const result = await shop.finalizePersonalizations(token(), body);
|
|
14765
14776
|
if (result.error) {
|
|
14766
|
-
form.details.apiErrors = [result.error.error];
|
|
14777
|
+
form.details.apiErrors = result.error.error ? [result.error.error] : [];
|
|
14767
14778
|
return;
|
|
14768
14779
|
}
|
|
14769
14780
|
const beforeSubmit = configStore.config.forms.personalization?.beforeSubmit;
|
|
14770
14781
|
if (beforeSubmit) beforeSubmit(body);
|
|
14771
|
-
|
|
14782
|
+
const submitUrl = configStore.config.urls.annualTicketPersonalizationFormSubmit?.(token());
|
|
14783
|
+
if (submitUrl) configStore.config.navigateTo(submitUrl);
|
|
14772
14784
|
}
|
|
14773
14785
|
let templateForm = null;
|
|
14774
14786
|
let templateBlueprint = null;
|
|
@@ -18511,6 +18523,20 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18511
18523
|
customElements.define("go-cart-counter", create_custom_element(CartCounter, {}, [], []));
|
|
18512
18524
|
//#endregion
|
|
18513
18525
|
//#region src/components/checkoutForm/lib.ts
|
|
18526
|
+
function postToPaymentProvider(paymentData) {
|
|
18527
|
+
const form = document.createElement("form");
|
|
18528
|
+
form.method = "post";
|
|
18529
|
+
form.action = paymentData.url;
|
|
18530
|
+
for (const [key, value] of Object.entries(paymentData.params)) {
|
|
18531
|
+
const input = document.createElement("input");
|
|
18532
|
+
input.type = "hidden";
|
|
18533
|
+
input.name = key;
|
|
18534
|
+
input.value = String(value);
|
|
18535
|
+
form.appendChild(input);
|
|
18536
|
+
}
|
|
18537
|
+
document.body.appendChild(form);
|
|
18538
|
+
form.submit();
|
|
18539
|
+
}
|
|
18514
18540
|
async function finalizeCheckout(form, formId) {
|
|
18515
18541
|
const cart = shop.cart;
|
|
18516
18542
|
if (!cart) return;
|
|
@@ -18523,8 +18549,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18523
18549
|
}
|
|
18524
18550
|
const beforeSubmit = configStore.config.forms[formId]?.beforeSubmit;
|
|
18525
18551
|
if (beforeSubmit) await beforeSubmit(form.details.formData);
|
|
18526
|
-
const
|
|
18527
|
-
configStore.config.navigateTo
|
|
18552
|
+
const meta = checkout.data.meta;
|
|
18553
|
+
const navigateTo = configStore.config.navigateTo;
|
|
18554
|
+
if (meta.status === "success") navigateTo?.(shop.urls.checkoutSuccess(checkout.data.order.token));
|
|
18555
|
+
else if (meta.status === "fail") navigateTo?.(shop.urls.checkoutFailure(""));
|
|
18556
|
+
else if (meta.payment_url) navigateTo?.(meta.payment_url);
|
|
18557
|
+
else if (meta.payment_data) postToPaymentProvider(meta.payment_data);
|
|
18558
|
+
else navigateTo?.(shop.urls.checkoutFailure(""));
|
|
18528
18559
|
}
|
|
18529
18560
|
function setupGuestCheckout(host, custom) {
|
|
18530
18561
|
Forms.defineForm({
|
|
@@ -12237,6 +12237,8 @@ function createCartItem(product, options) {
|
|
|
12237
12237
|
};
|
|
12238
12238
|
return {
|
|
12239
12239
|
...finalOptions,
|
|
12240
|
+
quantity: finalOptions.quantity ?? 0,
|
|
12241
|
+
time: finalOptions.time ?? "",
|
|
12240
12242
|
type: product.type,
|
|
12241
12243
|
product,
|
|
12242
12244
|
/**
|
|
@@ -12296,7 +12298,8 @@ function createCartItem(product, options) {
|
|
|
12296
12298
|
return this.uuid + ":" + this.quantity;
|
|
12297
12299
|
},
|
|
12298
12300
|
get price_cents() {
|
|
12299
|
-
|
|
12301
|
+
const dynamicPrices = "dynamic_prices" in this.product ? this.product.dynamic_prices : null;
|
|
12302
|
+
if (this.time && dynamicPrices?.[this.time] != null) return dynamicPrices[this.time];
|
|
12300
12303
|
return this.product.price_cents;
|
|
12301
12304
|
},
|
|
12302
12305
|
get price_formatted() {
|
|
@@ -12479,10 +12482,18 @@ var defined = (x) => x !== void 0;
|
|
|
12479
12482
|
//#region src/lib/models/cart/cart.svelte.ts
|
|
12480
12483
|
var lastUuid = 0;
|
|
12481
12484
|
function createCart(products, contingent = 20) {
|
|
12485
|
+
const items = proxy([]);
|
|
12486
|
+
const coupons = proxy([]);
|
|
12487
|
+
let paymentModeId = /* @__PURE__ */ state(void 0);
|
|
12482
12488
|
const cart = {
|
|
12483
|
-
items
|
|
12484
|
-
coupons
|
|
12485
|
-
paymentModeId
|
|
12489
|
+
items,
|
|
12490
|
+
coupons,
|
|
12491
|
+
get paymentModeId() {
|
|
12492
|
+
return get$2(paymentModeId);
|
|
12493
|
+
},
|
|
12494
|
+
set paymentModeId(value) {
|
|
12495
|
+
set(paymentModeId, value, true);
|
|
12496
|
+
},
|
|
12486
12497
|
uid: `cart-${lastUuid++}`,
|
|
12487
12498
|
get nonEmptyItems() {
|
|
12488
12499
|
return this.items.filter((i) => i.quantity > 0);
|
|
@@ -14694,7 +14705,7 @@ function errors(fields) {
|
|
|
14694
14705
|
function AnnualTicketPersonalizationForm($$anchor, $$props) {
|
|
14695
14706
|
push($$props, true);
|
|
14696
14707
|
let token = prop($$props, "token", 7), ticketSaleId = prop($$props, "ticketSaleId", 7);
|
|
14697
|
-
let form;
|
|
14708
|
+
let form = null;
|
|
14698
14709
|
const details = new PersonalizationDetails();
|
|
14699
14710
|
setPersonalizationDetails($$props.$$host, details);
|
|
14700
14711
|
user_effect(() => {
|
|
@@ -14762,12 +14773,13 @@ function AnnualTicketPersonalizationForm($$anchor, $$props) {
|
|
|
14762
14773
|
} };
|
|
14763
14774
|
const result = await shop.finalizePersonalizations(token(), body);
|
|
14764
14775
|
if (result.error) {
|
|
14765
|
-
form.details.apiErrors = [result.error.error];
|
|
14776
|
+
form.details.apiErrors = result.error.error ? [result.error.error] : [];
|
|
14766
14777
|
return;
|
|
14767
14778
|
}
|
|
14768
14779
|
const beforeSubmit = configStore.config.forms.personalization?.beforeSubmit;
|
|
14769
14780
|
if (beforeSubmit) beforeSubmit(body);
|
|
14770
|
-
|
|
14781
|
+
const submitUrl = configStore.config.urls.annualTicketPersonalizationFormSubmit?.(token());
|
|
14782
|
+
if (submitUrl) configStore.config.navigateTo(submitUrl);
|
|
14771
14783
|
}
|
|
14772
14784
|
let templateForm = null;
|
|
14773
14785
|
let templateBlueprint = null;
|
|
@@ -18510,6 +18522,20 @@ function CartCounter($$anchor, $$props) {
|
|
|
18510
18522
|
customElements.define("go-cart-counter", create_custom_element(CartCounter, {}, [], []));
|
|
18511
18523
|
//#endregion
|
|
18512
18524
|
//#region src/components/checkoutForm/lib.ts
|
|
18525
|
+
function postToPaymentProvider(paymentData) {
|
|
18526
|
+
const form = document.createElement("form");
|
|
18527
|
+
form.method = "post";
|
|
18528
|
+
form.action = paymentData.url;
|
|
18529
|
+
for (const [key, value] of Object.entries(paymentData.params)) {
|
|
18530
|
+
const input = document.createElement("input");
|
|
18531
|
+
input.type = "hidden";
|
|
18532
|
+
input.name = key;
|
|
18533
|
+
input.value = String(value);
|
|
18534
|
+
form.appendChild(input);
|
|
18535
|
+
}
|
|
18536
|
+
document.body.appendChild(form);
|
|
18537
|
+
form.submit();
|
|
18538
|
+
}
|
|
18513
18539
|
async function finalizeCheckout(form, formId) {
|
|
18514
18540
|
const cart = shop.cart;
|
|
18515
18541
|
if (!cart) return;
|
|
@@ -18522,8 +18548,13 @@ async function finalizeCheckout(form, formId) {
|
|
|
18522
18548
|
}
|
|
18523
18549
|
const beforeSubmit = configStore.config.forms[formId]?.beforeSubmit;
|
|
18524
18550
|
if (beforeSubmit) await beforeSubmit(form.details.formData);
|
|
18525
|
-
const
|
|
18526
|
-
configStore.config.navigateTo
|
|
18551
|
+
const meta = checkout.data.meta;
|
|
18552
|
+
const navigateTo = configStore.config.navigateTo;
|
|
18553
|
+
if (meta.status === "success") navigateTo?.(shop.urls.checkoutSuccess(checkout.data.order.token));
|
|
18554
|
+
else if (meta.status === "fail") navigateTo?.(shop.urls.checkoutFailure(""));
|
|
18555
|
+
else if (meta.payment_url) navigateTo?.(meta.payment_url);
|
|
18556
|
+
else if (meta.payment_data) postToPaymentProvider(meta.payment_data);
|
|
18557
|
+
else navigateTo?.(shop.urls.checkoutFailure(""));
|
|
18527
18558
|
}
|
|
18528
18559
|
function setupGuestCheckout(host, custom) {
|
|
18529
18560
|
Forms.defineForm({
|