@ticketlayer/elements 0.4.0 → 1.0.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/cjs/{index-I9CoYv3k.js → index-DanPUX0s.js} +1 -1
- package/dist/cjs/index.cjs.js +2 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/ticket-selector-BYVL13k_.js +3623 -0
- package/dist/cjs/ticketlayer-elements.cjs.js +2 -2
- package/dist/cjs/tl-buy-modal.cjs.entry.js +3 -3
- package/dist/cjs/tl-buy-tickets-button.cjs.entry.js +89 -74
- package/dist/cjs/tl-buy-tickets-wrapper.cjs.entry.js +61 -30
- package/dist/cjs/tl-cart-badge.cjs.entry.js +74 -61
- package/dist/cjs/tl-cart-drawer.cjs.entry.js +51 -23
- package/dist/cjs/tl-cart.cjs.entry.js +71 -103
- package/dist/cjs/tl-checkout-wrapper.cjs.entry.js +51 -29
- package/dist/cjs/tl-event-card.cjs.entry.js +43 -105
- package/dist/cjs/tl-event-list.cjs.entry.js +72 -35
- package/dist/cjs/tl-login.cjs.entry.js +74 -141
- package/dist/cjs/tl-my-orders.cjs.entry.js +52 -92
- package/dist/cjs/tl-occurrence-selector_2.cjs.entry.js +153 -921
- package/dist/cjs/tl-order-confirmation.cjs.entry.js +71 -107
- package/dist/cjs/tl-order-tickets_2.cjs.entry.js +48 -74
- package/dist/cjs/tl-promo-code.cjs.entry.js +50 -47
- package/dist/cjs/tl-seat-map.cjs.entry.js +3 -3
- package/dist/cjs/web-query-Ce73jB4k.js +16 -0
- package/dist/collection/components/tl-buy-modal/tl-buy-modal.js +2 -2
- package/dist/collection/components/tl-buy-tickets-button/tl-buy-tickets-button.css +37 -0
- package/dist/collection/components/tl-buy-tickets-button/tl-buy-tickets-button.js +105 -79
- package/dist/collection/components/tl-buy-tickets-wrapper/tl-buy-tickets-wrapper.js +73 -30
- package/dist/collection/components/tl-cart/tl-cart.js +82 -107
- package/dist/collection/components/tl-cart-badge/tl-cart-badge.js +62 -62
- package/dist/collection/components/tl-cart-drawer/tl-cart-drawer.js +56 -24
- package/dist/collection/components/tl-checkout-wrapper/tl-checkout-wrapper.js +61 -29
- package/dist/collection/components/tl-event-card/event-card-adapter.js +11 -23
- package/dist/collection/components/tl-event-card/tl-event-card.js +51 -84
- package/dist/collection/components/tl-event-list/tl-event-list.js +82 -38
- package/dist/collection/components/tl-login/tl-login.js +83 -147
- package/dist/collection/components/tl-my-orders/tl-my-orders.js +58 -96
- package/dist/collection/components/tl-occurrence-selector/tl-occurrence-selector.js +137 -516
- package/dist/collection/components/tl-order-confirmation/tl-order-confirmation.js +81 -115
- package/dist/collection/components/tl-order-tickets/tl-order-tickets.js +57 -92
- package/dist/collection/components/tl-promo-code/tl-promo-code.js +55 -50
- package/dist/collection/components/tl-seat-map/tl-seat-map.js +2 -2
- package/dist/collection/components/tl-ticket-selector/tl-ticket-selector.js +34 -20
- package/dist/collection/utils/order-summary.js +15 -135
- package/dist/collection/utils/testing/deep-text.js +29 -0
- package/dist/collection/utils/testing/fixtures.js +290 -0
- package/dist/collection/utils/testing/mock-sdk.js +13 -2
- package/dist/collection/utils/web-query.js +12 -0
- package/dist/collection/utils/web-storage.js +22 -0
- package/dist/components/ticket-selector.js +1 -0
- package/dist/components/tl-buy-modal.js +1 -1
- package/dist/components/tl-buy-tickets-button.js +1 -1
- package/dist/components/tl-buy-tickets-wrapper2.js +1 -1
- package/dist/components/tl-cart-badge.js +1 -1
- package/dist/components/tl-cart-drawer.js +1 -1
- package/dist/components/tl-cart2.js +1 -1
- package/dist/components/tl-checkout-wrapper2.js +1 -1
- package/dist/components/tl-event-card2.js +1 -1
- package/dist/components/tl-event-list.js +1 -1
- package/dist/components/tl-login2.js +1 -1
- package/dist/components/tl-my-orders.js +1 -1
- package/dist/components/tl-occurrence-selector2.js +1 -1
- package/dist/components/tl-order-confirmation.js +1 -1
- package/dist/components/tl-order-tickets2.js +1 -1
- package/dist/components/tl-promo-code.js +1 -1
- package/dist/components/tl-seat-map.js +1 -1
- package/dist/components/tl-ticket-selector2.js +1 -1
- package/dist/components/web-query.js +1 -0
- package/dist/elements.docs.json +34 -34
- package/dist/esm/{index-OoYV1faY.js → index-imfxp765.js} +1 -1
- package/dist/esm/index.js +2 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/ticket-selector-BwChnHVC.js +3606 -0
- package/dist/esm/ticketlayer-elements.js +3 -3
- package/dist/esm/tl-buy-modal.entry.js +3 -3
- package/dist/esm/tl-buy-tickets-button.entry.js +90 -75
- package/dist/esm/tl-buy-tickets-wrapper.entry.js +62 -31
- package/dist/esm/tl-cart-badge.entry.js +75 -62
- package/dist/esm/tl-cart-drawer.entry.js +52 -24
- package/dist/esm/tl-cart.entry.js +72 -104
- package/dist/esm/tl-checkout-wrapper.entry.js +52 -30
- package/dist/esm/tl-event-card.entry.js +44 -106
- package/dist/esm/tl-event-list.entry.js +73 -36
- package/dist/esm/tl-login.entry.js +75 -142
- package/dist/esm/tl-my-orders.entry.js +53 -93
- package/dist/esm/tl-occurrence-selector_2.entry.js +152 -920
- package/dist/esm/tl-order-confirmation.entry.js +72 -108
- package/dist/esm/tl-order-tickets_2.entry.js +49 -75
- package/dist/esm/tl-promo-code.entry.js +51 -48
- package/dist/esm/tl-seat-map.entry.js +3 -3
- package/dist/esm/web-query-Bdbb2lk5.js +14 -0
- package/dist/ticketlayer-elements/index.esm.js +1 -1
- package/dist/ticketlayer-elements/p-45923d2c.entry.js +1 -0
- package/dist/ticketlayer-elements/p-492adc77.entry.js +1 -0
- package/dist/ticketlayer-elements/p-4cfc9e53.entry.js +1 -0
- package/dist/ticketlayer-elements/{p-ac264adc.entry.js → p-5135630e.entry.js} +1 -1
- package/dist/ticketlayer-elements/p-5bbce3b5.entry.js +1 -0
- package/dist/ticketlayer-elements/p-7d547721.entry.js +1 -0
- package/dist/ticketlayer-elements/p-7fe7b6ba.entry.js +1 -0
- package/dist/ticketlayer-elements/p-8122f0c1.entry.js +1 -0
- package/dist/ticketlayer-elements/p-98d40869.entry.js +1 -0
- package/dist/ticketlayer-elements/p-Bdbb2lk5.js +1 -0
- package/dist/ticketlayer-elements/p-BwChnHVC.js +1 -0
- package/dist/ticketlayer-elements/p-abec290a.entry.js +1 -0
- package/dist/ticketlayer-elements/p-ac79a3f6.entry.js +1 -0
- package/dist/ticketlayer-elements/p-d01f4429.entry.js +1 -0
- package/dist/ticketlayer-elements/p-d7ffaf46.entry.js +1 -0
- package/dist/ticketlayer-elements/p-e7170f3c.entry.js +1 -0
- package/dist/ticketlayer-elements/p-e787e862.entry.js +1 -0
- package/dist/ticketlayer-elements/p-f1ff931f.entry.js +1 -0
- package/dist/ticketlayer-elements/p-imfxp765.js +3 -0
- package/dist/ticketlayer-elements/ticketlayer-elements.css +1 -1
- package/dist/ticketlayer-elements/ticketlayer-elements.esm.js +1 -1
- package/dist/types/components/tl-buy-tickets-button/tl-buy-tickets-button.d.ts +40 -8
- package/dist/types/components/tl-buy-tickets-wrapper/tl-buy-tickets-wrapper.d.ts +20 -1
- package/dist/types/components/tl-cart/tl-cart.d.ts +40 -42
- package/dist/types/components/tl-cart-badge/tl-cart-badge.d.ts +22 -7
- package/dist/types/components/tl-cart-drawer/tl-cart-drawer.d.ts +28 -5
- package/dist/types/components/tl-checkout-wrapper/tl-checkout-wrapper.d.ts +18 -1
- package/dist/types/components/tl-event-card/event-card-adapter.d.ts +9 -20
- package/dist/types/components/tl-event-card/tl-event-card.d.ts +25 -28
- package/dist/types/components/tl-event-list/tl-event-list.d.ts +46 -6
- package/dist/types/components/tl-login/tl-login.d.ts +68 -22
- package/dist/types/components/tl-my-orders/tl-my-orders.d.ts +30 -12
- package/dist/types/components/tl-occurrence-selector/tl-occurrence-selector.d.ts +73 -161
- package/dist/types/components/tl-order-confirmation/tl-order-confirmation.d.ts +48 -15
- package/dist/types/components/tl-order-tickets/tl-order-tickets.d.ts +29 -31
- package/dist/types/components/tl-promo-code/tl-promo-code.d.ts +28 -10
- package/dist/types/components/tl-ticket/tl-ticket.d.ts +2 -11
- package/dist/types/components/tl-ticket-selector/tl-ticket-selector.d.ts +22 -4
- package/dist/types/components.d.ts +270 -62
- package/dist/types/utils/order-summary.d.ts +14 -97
- package/dist/types/utils/testing/deep-text.d.ts +13 -0
- package/dist/types/utils/testing/fixtures.d.ts +225 -0
- package/dist/types/utils/testing/mock-sdk.d.ts +14 -1
- package/dist/types/utils/web-query.d.ts +18 -0
- package/dist/types/utils/web-storage.d.ts +16 -0
- package/elements.catalogue.json +602 -50
- package/package.json +8 -6
- package/dist/cjs/money-BtmM2gt-.js +0 -118
- package/dist/cjs/order-summary-X3TlZxc2.js +0 -150
- package/dist/components/money.js +0 -1
- package/dist/components/order-summary.js +0 -1
- package/dist/esm/money-4ig0-WB6.js +0 -112
- package/dist/esm/order-summary-DiDtvfZM.js +0 -136
- package/dist/ticketlayer-elements/p-0814420f.entry.js +0 -1
- package/dist/ticketlayer-elements/p-0acabc26.entry.js +0 -1
- package/dist/ticketlayer-elements/p-109a3feb.entry.js +0 -1
- package/dist/ticketlayer-elements/p-1a4ba71c.entry.js +0 -1
- package/dist/ticketlayer-elements/p-318965c1.entry.js +0 -1
- package/dist/ticketlayer-elements/p-347c7fd1.entry.js +0 -1
- package/dist/ticketlayer-elements/p-3649c26d.entry.js +0 -1
- package/dist/ticketlayer-elements/p-40260cc9.entry.js +0 -1
- package/dist/ticketlayer-elements/p-4ig0-WB6.js +0 -1
- package/dist/ticketlayer-elements/p-55fd2f9f.entry.js +0 -1
- package/dist/ticketlayer-elements/p-62ee659b.entry.js +0 -1
- package/dist/ticketlayer-elements/p-7d4ecc2b.entry.js +0 -1
- package/dist/ticketlayer-elements/p-7f0abf95.entry.js +0 -1
- package/dist/ticketlayer-elements/p-BXpVGW51.js +0 -1
- package/dist/ticketlayer-elements/p-OoYV1faY.js +0 -3
- package/dist/ticketlayer-elements/p-a3c1b26c.entry.js +0 -1
- package/dist/ticketlayer-elements/p-aeb4c6fb.entry.js +0 -1
- package/dist/ticketlayer-elements/p-ba62541f.entry.js +0 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
|
2
|
-
import { w as whenSDK } from './sdk-connector-CqhvfyKV.js';
|
|
3
|
-
import {
|
|
4
|
-
import './money-4ig0-WB6.js';
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-imfxp765.js';
|
|
2
|
+
import { w as whenSDK, g as getSDK } from './sdk-connector-CqhvfyKV.js';
|
|
3
|
+
import { c as createElement, m as myOrdersCore } from './ticket-selector-BwChnHVC.js';
|
|
5
4
|
|
|
6
5
|
const tlMyOrdersCss = () => `:host{display:block;font-family:var(--tl-font-family);color:var(--tl-foreground)}.orders{display:flex;flex-direction:column;gap:var(--tl-spacing-4)}.order-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:var(--tl-spacing-3)}.order{background:var(--tl-background);border:1px solid var(--tl-border);border-radius:var(--tl-radius-lg);overflow:hidden;transition:border-color 0.2s ease, box-shadow 0.2s ease}.order:hover,.order.expanded{border-color:var(--tl-primary);box-shadow:0 1px 3px rgba(0, 0, 0, 0.08)}.order-row{display:flex;align-items:center;justify-content:space-between;gap:var(--tl-spacing-4);width:100%;padding:var(--tl-spacing-4);font:inherit;color:inherit;text-align:left;background:none;border:none;cursor:pointer}.order-main{display:flex;flex-direction:column;gap:var(--tl-spacing-1);min-width:0}.order-number{font-size:0.75rem;font-weight:500;text-transform:uppercase;letter-spacing:0.05em;color:var(--tl-muted-foreground)}.order-event{font-size:1rem;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.order-meta{display:flex;flex-wrap:wrap;gap:var(--tl-spacing-3);font-size:0.8125rem;color:var(--tl-muted-foreground)}.order-side{display:flex;align-items:center;gap:var(--tl-spacing-3);flex-shrink:0}.order-total{font-weight:600}.status{padding:0.125rem 0.5rem;font-size:0.75rem;font-weight:500;border-radius:9999px;background:var(--tl-secondary);color:var(--tl-secondary-foreground)}.status-success{background:var(--tl-success);color:var(--tl-success-foreground)}.status-info{background:var(--tl-primary);color:var(--tl-primary-foreground)}.status-warning{background:var(--tl-warning);color:var(--tl-warning-foreground)}.status-error{background:var(--tl-error);color:var(--tl-error-foreground)}.chevron{width:1.125rem;height:1.125rem;color:var(--tl-muted-foreground);transition:transform 0.2s ease}.expanded .chevron{transform:rotate(90deg)}.order-tickets{padding:0 var(--tl-spacing-4) var(--tl-spacing-4);border-top:1px solid var(--tl-border);padding-top:var(--tl-spacing-4)}@media (max-width: 480px){.order-row{flex-direction:column;align-items:stretch}.order-side{justify-content:space-between}}.signin{text-align:center}.signin-title,.state-title{margin:0;font-size:1.125rem;font-weight:600}.signin-text,.state-text{margin:var(--tl-spacing-1) 0 0;font-size:0.875rem;color:var(--tl-muted-foreground)}.state{padding:var(--tl-spacing-8) var(--tl-spacing-4);text-align:center;background:var(--tl-background);border:1px solid var(--tl-border);border-radius:var(--tl-radius-lg)}.state.error .state-title{color:var(--tl-error)}.empty-icon{width:3rem;height:3rem;margin:0 auto var(--tl-spacing-3);color:var(--tl-primary)}.skeleton{height:5rem;background:var(--tl-secondary);border-radius:var(--tl-radius-lg);animation:pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite}@keyframes pulse{0%,100%{opacity:1}50%{opacity:0.5}}`;
|
|
7
6
|
|
|
@@ -14,108 +13,69 @@ const TlMyOrders = class {
|
|
|
14
13
|
this.emptyMessage = "When you buy tickets they'll show up here, ready to view and download.";
|
|
15
14
|
/** Columns for the expanded ticket grid. */
|
|
16
15
|
this.columns = 2;
|
|
17
|
-
this.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
this.
|
|
16
|
+
this.element = createElement(myOrdersCore, {
|
|
17
|
+
client: () => getSDK(),
|
|
18
|
+
clientReady: () => whenSDK(),
|
|
19
|
+
emit: (event, detail) => this.forward(event, detail),
|
|
20
|
+
});
|
|
21
|
+
/** The core's whole view. Assigning it is what makes Stencil re-render. */
|
|
22
|
+
this.view = this.element.view;
|
|
24
23
|
}
|
|
25
|
-
|
|
26
|
-
this.
|
|
27
|
-
if (!this.sdk) {
|
|
28
|
-
this.loading = false;
|
|
29
|
-
this.error = 'Orders are not available right now';
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
// Older SDKs have no auth accessor: try the list and let a 401 decide.
|
|
33
|
-
const auth = this.sdk.getAuthManager?.();
|
|
34
|
-
this.authenticated = auth ? auth.authenticated : true;
|
|
35
|
-
// The session hydrates after the SDK publishes; follow both signals.
|
|
36
|
-
this.unsubscribes.push(this.sdk.on('auth:changed', () => this.syncAuth()));
|
|
37
|
-
this.unsubscribes.push(this.sdk.on('session:changed', () => this.syncAuth()));
|
|
38
|
-
if (this.authenticated) {
|
|
39
|
-
await this.load();
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
this.loading = false;
|
|
43
|
-
}
|
|
24
|
+
syncProps() {
|
|
25
|
+
this.element.setProps({ emptyMessage: this.emptyMessage, columns: this.columns });
|
|
44
26
|
}
|
|
45
|
-
|
|
46
|
-
this.
|
|
47
|
-
this.
|
|
27
|
+
connectedCallback() {
|
|
28
|
+
this.syncProps();
|
|
29
|
+
this.unsubscribe ?? (this.unsubscribe = this.element.subscribe((view) => {
|
|
30
|
+
this.view = view;
|
|
31
|
+
}));
|
|
32
|
+
this.view = this.element.view;
|
|
33
|
+
this.teardown = this.element.mount();
|
|
48
34
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
this.orders = [];
|
|
60
|
-
this.expandedId = null;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
async load() {
|
|
64
|
-
if (!this.sdk)
|
|
65
|
-
return;
|
|
66
|
-
try {
|
|
67
|
-
this.loading = true;
|
|
68
|
-
this.error = null;
|
|
69
|
-
const orders = this.sdk.getOrdersManager?.();
|
|
70
|
-
if (!orders)
|
|
71
|
-
throw new Error('Orders are not available');
|
|
72
|
-
const list = (await orders.mine());
|
|
73
|
-
this.orders = list ?? [];
|
|
74
|
-
this.authenticated = true;
|
|
75
|
-
}
|
|
76
|
-
catch (err) {
|
|
77
|
-
if (isAuthError(err)) {
|
|
78
|
-
// Not signed in: fall through to the inline login rather than an error.
|
|
79
|
-
this.authenticated = false;
|
|
80
|
-
this.orders = [];
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
console.error('[tl-my-orders] Failed to load orders:', err);
|
|
84
|
-
this.error = errorMessage(err, 'Failed to load your orders');
|
|
85
|
-
this.tlError.emit({ message: this.error });
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
finally {
|
|
89
|
-
this.loading = false;
|
|
90
|
-
}
|
|
35
|
+
/**
|
|
36
|
+
* Off screen: run the mount's teardown, which drops both auth
|
|
37
|
+
* subscriptions. Not `destroy()`: Stencil calls this for a DOM move as well
|
|
38
|
+
* as a removal, and a destroyed core never mounts again.
|
|
39
|
+
*/
|
|
40
|
+
disconnectedCallback() {
|
|
41
|
+
this.teardown?.();
|
|
42
|
+
this.teardown = undefined;
|
|
43
|
+
this.unsubscribe?.();
|
|
44
|
+
this.unsubscribe = undefined;
|
|
91
45
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
if (
|
|
96
|
-
this.
|
|
46
|
+
forward(event, detail) {
|
|
47
|
+
if (event === 'tlOrderSelect')
|
|
48
|
+
this.tlOrderSelect.emit(detail);
|
|
49
|
+
else if (event === 'tlError')
|
|
50
|
+
this.tlError.emit(detail);
|
|
97
51
|
}
|
|
98
|
-
renderRow(
|
|
99
|
-
|
|
100
|
-
const count = ticketCount(order);
|
|
101
|
-
const tone = statusTone(order.status);
|
|
102
|
-
return (h("li", { class: { order: true, expanded }, key: order.id }, h("button", { type: "button", class: "order-row", "aria-expanded": expanded ? 'true' : 'false', onClick: () => this.toggle(order.id) }, h("span", { class: "order-main" }, h("span", { class: "order-number" }, "Order ", order.orderNumber), h("span", { class: "order-event" }, orderEventName(order) ?? 'Order'), h("span", { class: "order-meta" }, order.createdAt && h("span", null, formatDate(order.createdAt)), h("span", null, count, " ticket", count === 1 ? '' : 's'))), h("span", { class: "order-side" }, h("span", { class: "order-total" }, formatPrice(order.total, order.currency)), h("span", { class: `status status-${tone}` }, statusLabel(order.status)), h("svg", { class: "chevron", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "aria-hidden": "true" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M9 18l6-6-6-6" })))), expanded && (h("div", { class: "order-tickets" }, h("tl-order-tickets", { orderId: order.id, columns: this.columns })))));
|
|
52
|
+
renderRow(row) {
|
|
53
|
+
return (h("li", { class: { order: true, expanded: row.expanded }, key: row.id }, h("button", { type: "button", class: "order-row", "aria-expanded": row.expanded ? 'true' : 'false', onClick: () => this.element.actions.toggle(row.id) }, h("span", { class: "order-main" }, h("span", { class: "order-number" }, row.numberLabel), h("span", { class: "order-event" }, row.eventName), h("span", { class: "order-meta" }, row.dateLabel && h("span", null, row.dateLabel), h("span", null, row.countLabel))), h("span", { class: "order-side" }, h("span", { class: "order-total" }, row.totalLabel), h("span", { class: `status status-${row.statusTone}` }, row.statusLabel), h("svg", { class: "chevron", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "aria-hidden": "true" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M9 18l6-6-6-6" })))), row.expanded && (h("div", { class: "order-tickets" }, h("tl-order-tickets", { orderId: row.id, columns: this.columns })))));
|
|
103
54
|
}
|
|
104
55
|
render() {
|
|
105
|
-
|
|
56
|
+
const { status, strings, state, derived } = this.view;
|
|
57
|
+
if (status === 'loading') {
|
|
106
58
|
return (h("div", { class: "orders" }, [0, 1, 2].map((i) => (h("div", { class: "skeleton", key: i })))));
|
|
107
59
|
}
|
|
108
|
-
if (
|
|
109
|
-
return (h("div", { class: "orders" }, h("div", { class: "signin" }, h("p", { class: "signin-title" },
|
|
60
|
+
if (status === 'signed-out') {
|
|
61
|
+
return (h("div", { class: "orders" }, h("div", { class: "signin" }, h("p", { class: "signin-title" }, strings.signInTitle), h("p", { class: "signin-text" }, strings.signInText)), h("tl-login", null)));
|
|
110
62
|
}
|
|
111
|
-
if (
|
|
112
|
-
return (h("div", { class: "orders" }, h("div", { class: "state error" }, h("p", { class: "state-title" },
|
|
63
|
+
if (status === 'error') {
|
|
64
|
+
return (h("div", { class: "orders" }, h("div", { class: "state error" }, h("p", { class: "state-title" }, strings.errorTitle), h("p", { class: "state-text" }, state.error))));
|
|
113
65
|
}
|
|
114
|
-
if (
|
|
115
|
-
return (h("div", { class: "orders" }, h("div", { class: "state empty" }, h("svg", { class: "empty-icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "aria-hidden": "true" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "1.5", d: "M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z" }), h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "1.5", d: "M13 5v2M13 17v2M13 11v2" })), h("p", { class: "state-title" },
|
|
66
|
+
if (status === 'empty') {
|
|
67
|
+
return (h("div", { class: "orders" }, h("div", { class: "state empty" }, h("svg", { class: "empty-icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "aria-hidden": "true" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "1.5", d: "M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z" }), h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "1.5", d: "M13 5v2M13 17v2M13 11v2" })), h("p", { class: "state-title" }, strings.emptyTitle), h("p", { class: "state-text" }, this.emptyMessage))));
|
|
116
68
|
}
|
|
117
|
-
return (h("div", { class: "orders" }, h("ul", { class: "order-list" },
|
|
69
|
+
return (h("div", { class: "orders" }, h("ul", { class: "order-list" }, derived.rows.map((row) => this.renderRow(row)))));
|
|
118
70
|
}
|
|
71
|
+
static get watchers() { return {
|
|
72
|
+
"emptyMessage": [{
|
|
73
|
+
"syncProps": 0
|
|
74
|
+
}],
|
|
75
|
+
"columns": [{
|
|
76
|
+
"syncProps": 0
|
|
77
|
+
}]
|
|
78
|
+
}; }
|
|
119
79
|
};
|
|
120
80
|
TlMyOrders.style = tlMyOrdersCss();
|
|
121
81
|
|