@progressive-development/pd-order 0.7.11 → 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/LICENSE +21 -2
- package/README.md +31 -57
- package/dist/generated/locales/be.d.ts +2 -1
- package/dist/generated/locales/be.d.ts.map +1 -1
- package/dist/generated/locales/de.d.ts +2 -1
- package/dist/generated/locales/de.d.ts.map +1 -1
- package/dist/generated/locales/en.d.ts +2 -1
- package/dist/generated/locales/en.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -12
- package/dist/locales/be.js +4 -6
- package/dist/locales/de.js +4 -7
- package/dist/locales/en.js +4 -6
- package/dist/pd-order-contacts/PdOrderContacts.d.ts +50 -0
- package/dist/pd-order-contacts/PdOrderContacts.d.ts.map +1 -0
- package/dist/pd-order-contacts/PdOrderContacts.js +383 -0
- package/dist/pd-order-contacts/pd-order-contacts.d.ts +3 -0
- package/dist/pd-order-contacts/pd-order-contacts.d.ts.map +1 -0
- package/dist/pd-order-contacts/pd-order-contacts.stories.d.ts +65 -0
- package/dist/pd-order-contacts/pd-order-contacts.stories.d.ts.map +1 -0
- package/dist/pd-order-contacts.d.ts +2 -45
- package/dist/pd-order-contacts.js +6 -387
- package/dist/pd-order-summary/PdOrderSummary.d.ts +39 -0
- package/dist/pd-order-summary/PdOrderSummary.d.ts.map +1 -0
- package/dist/pd-order-summary/PdOrderSummary.js +241 -0
- package/dist/pd-order-summary/pd-order-summary.d.ts +3 -0
- package/dist/pd-order-summary/pd-order-summary.d.ts.map +1 -0
- package/dist/pd-order-summary/pd-order-summary.stories.d.ts +59 -0
- package/dist/pd-order-summary/pd-order-summary.stories.d.ts.map +1 -0
- package/dist/pd-order-summary.d.ts +2 -38
- package/dist/pd-order-summary.js +6 -248
- package/dist/stories/test-impl/test-summary.d.ts +1 -1
- package/dist/stories/test-impl/test-summary.d.ts.map +1 -1
- package/package.json +34 -52
- package/dist/pd-order-contacts.d.ts.map +0 -1
- package/dist/pd-order-summary.d.ts.map +0 -1
- package/dist/stories/pd-order-contacts.stories.d.ts +0 -17
- package/dist/stories/pd-order-contacts.stories.d.ts.map +0 -1
- package/dist/stories/pd-order-summary.stories.d.ts +0 -13
- package/dist/stories/pd-order-summary.stories.d.ts.map +0 -1
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/web-components-vite';
|
|
2
|
+
import { PdContactData } from '@progressive-development/pd-contact';
|
|
3
|
+
import { PdOrderStep } from '../types.js';
|
|
4
|
+
/**
|
|
5
|
+
* Story arguments interface for pd-order-summary component.
|
|
6
|
+
* Maps to the component's public API for order summary display.
|
|
7
|
+
*/
|
|
8
|
+
interface PdOrderSummaryArgs {
|
|
9
|
+
/** Show payment/pricing section */
|
|
10
|
+
withPayment: boolean;
|
|
11
|
+
/** Show terms agreement checkbox with validation */
|
|
12
|
+
withAgreement: boolean;
|
|
13
|
+
/** Order steps to display in summary */
|
|
14
|
+
orderSteps: PdOrderStep[];
|
|
15
|
+
/** Primary order contact data */
|
|
16
|
+
orderContact: PdContactData;
|
|
17
|
+
/** Optional billing contact data */
|
|
18
|
+
billingContact?: PdContactData;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* ## pd-order-summary
|
|
22
|
+
*
|
|
23
|
+
* Order summary component that displays configurable steps, pricing information,
|
|
24
|
+
* and an optional terms-and-conditions agreement.
|
|
25
|
+
*
|
|
26
|
+
* ### Features
|
|
27
|
+
* - Configurable order steps with edit-content integration
|
|
28
|
+
* - Automatic contact summary rendering for "contacts" step key
|
|
29
|
+
* - Price table with tax calculation via pd-pricetable
|
|
30
|
+
* - Terms and conditions agreement checkbox with popup
|
|
31
|
+
* - Named slots for custom step content and legal text
|
|
32
|
+
* - Fires `go-to` event when user clicks edit on a step
|
|
33
|
+
*
|
|
34
|
+
* ### Slots
|
|
35
|
+
* - `legal` — Terms and conditions content (shown in popup)
|
|
36
|
+
* - `[stepKey]` — Named slots for custom step content
|
|
37
|
+
*
|
|
38
|
+
* ### Usage Note
|
|
39
|
+
* Stories use `pd-order-summary-test` (a test wrapper that extends PdOrderSummary)
|
|
40
|
+
* to provide a concrete implementation for demo purposes.
|
|
41
|
+
*/
|
|
42
|
+
declare const meta: Meta<PdOrderSummaryArgs>;
|
|
43
|
+
export default meta;
|
|
44
|
+
type Story = StoryObj<PdOrderSummaryArgs>;
|
|
45
|
+
/** Default order summary with payment and agreement enabled. Interactive via Controls panel. */
|
|
46
|
+
export declare const Default: Story;
|
|
47
|
+
/** Order summary showing separate billing contact alongside order contact. */
|
|
48
|
+
export declare const WithBillingContact: Story;
|
|
49
|
+
/** Order summary without the pricing/payment section — for non-billable orders. */
|
|
50
|
+
export declare const WithoutPayment: Story;
|
|
51
|
+
/** Order summary without the terms agreement checkbox — when agreement is handled elsewhere. */
|
|
52
|
+
export declare const WithoutAgreement: Story;
|
|
53
|
+
/** Minimal order summary without payment and agreement — just the order steps and contacts. */
|
|
54
|
+
export declare const Minimal: Story;
|
|
55
|
+
/** All summary configurations side by side for comparison. */
|
|
56
|
+
export declare const AllConfigurations: Story;
|
|
57
|
+
/** CSS Custom Properties — Branded and Redesigned payment section variants. */
|
|
58
|
+
export declare const CustomStyling: Story;
|
|
59
|
+
//# sourceMappingURL=pd-order-summary.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pd-order-summary.stories.d.ts","sourceRoot":"","sources":["../../src/pd-order-summary/pd-order-summary.stories.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAGrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,6CAA6C,CAAC;AAErD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG/C,OAAO,sCAAsC,CAAC;AAM9C;;;GAGG;AACH,UAAU,kBAAkB;IAC1B,mCAAmC;IACnC,WAAW,EAAE,OAAO,CAAC;IACrB,oDAAoD;IACpD,aAAa,EAAE,OAAO,CAAC;IACvB,wCAAwC;IACxC,UAAU,EAAE,WAAW,EAAE,CAAC;IAC1B,iCAAiC;IACjC,YAAY,EAAE,aAAa,CAAC;IAC5B,oCAAoC;IACpC,cAAc,CAAC,EAAE,aAAa,CAAC;CAChC;AA4FD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,kBAAkB,CAiGlC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,kBAAkB,CAAC,CAAC;AAM1C,gGAAgG;AAChG,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAMjC,8EAA8E;AAC9E,eAAO,MAAM,kBAAkB,EAAE,KAIhC,CAAC;AAMF,mFAAmF;AACnF,eAAO,MAAM,cAAc,EAAE,KAI5B,CAAC;AAMF,gGAAgG;AAChG,eAAO,MAAM,gBAAgB,EAAE,KAI9B,CAAC;AAMF,+FAA+F;AAC/F,eAAO,MAAM,OAAO,EAAE,KAYrB,CAAC;AAMF,8DAA8D;AAC9D,eAAO,MAAM,iBAAiB,EAAE,KAqD/B,CAAC;AAMF,+EAA+E;AAC/E,eAAO,MAAM,aAAa,EAAE,KAwE3B,CAAC"}
|
|
@@ -1,38 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Komponente zur Darstellung der Bestellübersicht
|
|
5
|
-
*
|
|
6
|
-
* @fires go-to - Wird ausgelöst, wenn der Benutzer "edit-content" aktiviert
|
|
7
|
-
* @slot legal - Slot für die AGB-Inhalte
|
|
8
|
-
*/
|
|
9
|
-
export declare class PdOrderSummary extends LitElement {
|
|
10
|
-
/**
|
|
11
|
-
* Die Liste der Bestellschritte (z.B. Buchung, Kontaktdaten, etc.),
|
|
12
|
-
* wie sie in der Zusammenfassung gerendert werden.
|
|
13
|
-
*/
|
|
14
|
-
orderSteps: PdOrderStep[];
|
|
15
|
-
/**
|
|
16
|
-
* Gibt an, ob ein Zahlungsabschnitt mit Preisdetails angezeigt werden soll.
|
|
17
|
-
*/
|
|
18
|
-
withPayment: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Gibt an, ob eine Checkbox zur Zustimmung zu den AGB angezeigt und validiert werden soll.
|
|
21
|
-
*/
|
|
22
|
-
withAgreement: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Die vollständigen Bestelldaten inklusive Postleitzahl, Kontakten und Preisinformationen.
|
|
25
|
-
*/
|
|
26
|
-
order?: any;
|
|
27
|
-
private _agreeForm;
|
|
28
|
-
static styles: CSSResultGroup;
|
|
29
|
-
firstUpdated(): void;
|
|
30
|
-
render(): TemplateResult<1>;
|
|
31
|
-
get valid(): boolean;
|
|
32
|
-
triggerValidate(): Promise<boolean>;
|
|
33
|
-
protected _mapOrderStepSummary(step: PdOrderStep, index: number): TemplateResult;
|
|
34
|
-
protected _renderCustomOrderStepSummary(step: PdOrderStep, index: number): TemplateResult | null;
|
|
35
|
-
protected _getContactsSummary(index: number, step: PdOrderStep): TemplateResult<1>;
|
|
36
|
-
private _openTermsAndConditions;
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=pd-order-summary.d.ts.map
|
|
1
|
+
export * from './pd-order-summary/pd-order-summary'
|
|
2
|
+
export {}
|
package/dist/pd-order-summary.js
CHANGED
|
@@ -1,250 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { property, query, customElement } from "lit/decorators.js";
|
|
3
|
-
import { localized, msg } from "@lit/localize";
|
|
4
|
-
import "@progressive-development/pd-forms/pd-form-container";
|
|
5
|
-
import "@progressive-development/pd-forms/pd-form-row";
|
|
6
|
-
import "@progressive-development/pd-forms/pd-checkbox";
|
|
7
|
-
import "@progressive-development/pd-price/pd-pricetable";
|
|
8
|
-
import "@progressive-development/pd-dialog/pd-popup";
|
|
9
|
-
import "@progressive-development/pd-content/pd-edit-content";
|
|
10
|
-
import { PdFontStyles, PdColorStyles } from "@progressive-development/pd-shared-styles";
|
|
11
|
-
import "./pd-order-contacts.js";
|
|
12
|
-
var __defProp = Object.defineProperty;
|
|
13
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
14
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
15
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
16
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
17
|
-
if (decorator = decorators[i])
|
|
18
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
19
|
-
if (kind && result) __defProp(target, key, result);
|
|
20
|
-
return result;
|
|
21
|
-
};
|
|
22
|
-
let PdOrderSummary = class extends LitElement {
|
|
23
|
-
constructor() {
|
|
24
|
-
super(...arguments);
|
|
25
|
-
this.orderSteps = [];
|
|
26
|
-
this.withPayment = false;
|
|
27
|
-
this.withAgreement = false;
|
|
28
|
-
}
|
|
29
|
-
firstUpdated() {
|
|
30
|
-
this.addEventListener("edit-content", (e) => {
|
|
31
|
-
this.dispatchEvent(
|
|
32
|
-
new CustomEvent("go-to", {
|
|
33
|
-
detail: { step: e.detail.step },
|
|
34
|
-
bubbles: true,
|
|
35
|
-
composed: true
|
|
36
|
-
})
|
|
37
|
-
);
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
render() {
|
|
41
|
-
if (!this.order) return html`<p>No order is set</p>`;
|
|
42
|
-
return html`
|
|
43
|
-
<h3>${msg("Übersicht", { id: "pd.order.summary.title" })}</h3>
|
|
44
|
-
<div class="edit-summary-container">
|
|
45
|
-
${this.orderSteps.map(
|
|
46
|
-
(step, index) => this._mapOrderStepSummary(step, index)
|
|
47
|
-
)}
|
|
48
|
-
</div>
|
|
1
|
+
import { PdOrderSummary } from './pd-order-summary/PdOrderSummary.js';
|
|
49
2
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
class="pricetable"
|
|
55
|
-
.priceData="${this.order.priceData}"
|
|
56
|
-
></pd-pricetable>
|
|
57
|
-
</div>
|
|
58
|
-
` : ""}
|
|
59
|
-
${this.withAgreement ? html`
|
|
60
|
-
<pd-form-container id="submitSummaryFormId">
|
|
61
|
-
<pd-form-row>
|
|
62
|
-
<pd-checkbox
|
|
63
|
-
id="agreeConditionsId"
|
|
64
|
-
valueName="agreeId"
|
|
65
|
-
class="agree-box"
|
|
66
|
-
required
|
|
67
|
-
requiredMsg="${msg(
|
|
68
|
-
"Bitte stimmen Sie den Allgemeinen Geschäftsbedingungen zu, um fortzufahren.",
|
|
69
|
-
{ id: "pd.order.summary.agree.required" }
|
|
70
|
-
)}"
|
|
71
|
-
>
|
|
72
|
-
${msg(
|
|
73
|
-
html`Stimmen Sie unseren
|
|
74
|
-
<a
|
|
75
|
-
@click="${this._openTermsAndConditions}"
|
|
76
|
-
@keypress="${this._openTermsAndConditions}"
|
|
77
|
-
>Allgemeinen Geschäftsbedingungen</a
|
|
78
|
-
>
|
|
79
|
-
zu`,
|
|
80
|
-
{ id: "pd.order.summary.agree.link" }
|
|
81
|
-
)}
|
|
82
|
-
</pd-checkbox>
|
|
83
|
-
</pd-form-row>
|
|
84
|
-
</pd-form-container>
|
|
3
|
+
const tag = "pd-order-summary";
|
|
4
|
+
if (!customElements.get(tag)) {
|
|
5
|
+
customElements.define(tag, PdOrderSummary);
|
|
6
|
+
}
|
|
85
7
|
|
|
86
|
-
|
|
87
|
-
<div slot="content"><slot name="legal"></slot></div>
|
|
88
|
-
</pd-popup>
|
|
89
|
-
` : ""}
|
|
90
|
-
`;
|
|
91
|
-
}
|
|
92
|
-
get valid() {
|
|
93
|
-
var _a;
|
|
94
|
-
return !this.withAgreement || ((_a = this._agreeForm) == null ? void 0 : _a.valid) === true;
|
|
95
|
-
}
|
|
96
|
-
async triggerValidate() {
|
|
97
|
-
var _a;
|
|
98
|
-
return (_a = this._agreeForm) == null ? void 0 : _a.triggerValidate();
|
|
99
|
-
}
|
|
100
|
-
/*
|
|
101
|
-
For Booking:
|
|
102
|
-
case "zip":
|
|
103
|
-
case "booking":
|
|
104
|
-
return this._getBookingSummary(index + 1, step);
|
|
105
|
-
|
|
106
|
-
private _getBookingSummary(index: number, step: PdOrderStep) {
|
|
107
|
-
const date = this.order?.selectedDate
|
|
108
|
-
? format(this.order.selectedDate, "DD/MM/YYYY")
|
|
109
|
-
: undefined;
|
|
110
|
-
const bookingData = [{ name: "Postcode:", val: this.order?.zip }];
|
|
111
|
-
if (date) {
|
|
112
|
-
bookingData.push({ name: "Datum van herstelling:", val: date });
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
return html`
|
|
116
|
-
<pd-edit-content
|
|
117
|
-
contentTitle="${step.name}"
|
|
118
|
-
stepNumber="${index}"
|
|
119
|
-
.data="${bookingData}"
|
|
120
|
-
></pd-edit-content>
|
|
121
|
-
`;
|
|
122
|
-
}
|
|
123
|
-
*/
|
|
124
|
-
_mapOrderStepSummary(step, index) {
|
|
125
|
-
const custom = this._renderCustomOrderStepSummary(step, index);
|
|
126
|
-
if (custom) {
|
|
127
|
-
return custom;
|
|
128
|
-
}
|
|
129
|
-
return html`
|
|
130
|
-
<pd-edit-content
|
|
131
|
-
contentTitle="${step.name}"
|
|
132
|
-
stepNumber="${index + 1}"
|
|
133
|
-
.data="${step.data}"
|
|
134
|
-
>
|
|
135
|
-
<slot name="${step.key}"></slot>
|
|
136
|
-
</pd-edit-content>
|
|
137
|
-
`;
|
|
138
|
-
}
|
|
139
|
-
_renderCustomOrderStepSummary(step, index) {
|
|
140
|
-
switch (step.key) {
|
|
141
|
-
case "contacts":
|
|
142
|
-
return this._getContactsSummary(index + 1, step);
|
|
143
|
-
default:
|
|
144
|
-
return null;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
// ?editDisabled="${this.order?.withLogin}" => Alter code, von ticomi-web
|
|
148
|
-
_getContactsSummary(index, step) {
|
|
149
|
-
var _a;
|
|
150
|
-
const contactData = (_a = this.order) == null ? void 0 : _a.contacts;
|
|
151
|
-
return html`
|
|
152
|
-
<pd-edit-content contentTitle="${step.name}" stepNumber="${index}">
|
|
153
|
-
${contactData ? html`
|
|
154
|
-
<pd-order-contacts
|
|
155
|
-
?withPayment="${this.withPayment}"
|
|
156
|
-
.orderContact="${contactData.orderContact}"
|
|
157
|
-
.billingContact="${contactData.billingContact}"
|
|
158
|
-
.adminContact="${contactData.adminContact}"
|
|
159
|
-
.propertyContact="${contactData.propertyContact}"
|
|
160
|
-
summary
|
|
161
|
-
></pd-order-contacts>
|
|
162
|
-
` : ""}
|
|
163
|
-
</pd-edit-content>
|
|
164
|
-
`;
|
|
165
|
-
}
|
|
166
|
-
_openTermsAndConditions(e) {
|
|
167
|
-
var _a;
|
|
168
|
-
e.stopPropagation();
|
|
169
|
-
const popup = (_a = this.shadowRoot) == null ? void 0 : _a.getElementById(
|
|
170
|
-
"agreePopupId"
|
|
171
|
-
);
|
|
172
|
-
popup == null ? void 0 : popup.showPopup();
|
|
173
|
-
}
|
|
174
|
-
};
|
|
175
|
-
PdOrderSummary.styles = [
|
|
176
|
-
PdFontStyles,
|
|
177
|
-
PdColorStyles,
|
|
178
|
-
css`
|
|
179
|
-
:host {
|
|
180
|
-
display: block;
|
|
181
|
-
}
|
|
182
|
-
h3 {
|
|
183
|
-
color: var(--pd-default-font-title-col);
|
|
184
|
-
font-family: var(--pd-default-font-title-family);
|
|
185
|
-
font-size: 1.5em;
|
|
186
|
-
}
|
|
187
|
-
.edit-summary-container {
|
|
188
|
-
display: flex;
|
|
189
|
-
flex-flow: column;
|
|
190
|
-
flex-wrap: wrap;
|
|
191
|
-
gap: 1em;
|
|
192
|
-
}
|
|
193
|
-
.payment {
|
|
194
|
-
margin-top: 30px;
|
|
195
|
-
padding: 5px;
|
|
196
|
-
background-color: var(
|
|
197
|
-
--pd-order-summary-payment-bg-col,
|
|
198
|
-
var(--pd-default-light-col)
|
|
199
|
-
);
|
|
200
|
-
}
|
|
201
|
-
.pay-logo-box {
|
|
202
|
-
display: flex;
|
|
203
|
-
}
|
|
204
|
-
.pay-logo {
|
|
205
|
-
max-width: 6rem;
|
|
206
|
-
}
|
|
207
|
-
.pricetable {
|
|
208
|
-
padding-top: 20px;
|
|
209
|
-
}
|
|
210
|
-
a {
|
|
211
|
-
cursor: pointer;
|
|
212
|
-
font-family: var(--pd-default-font-link-family);
|
|
213
|
-
font-size: var(--pd-default-font-link-size);
|
|
214
|
-
color: var(--pd-default-font-link-col);
|
|
215
|
-
}
|
|
216
|
-
a:hover {
|
|
217
|
-
color: var(--pd-default-font-link-col-hover);
|
|
218
|
-
}
|
|
219
|
-
.agree-box {
|
|
220
|
-
padding-top: 20px;
|
|
221
|
-
}
|
|
222
|
-
@media (max-width: 380px) {
|
|
223
|
-
.pay-logo {
|
|
224
|
-
max-width: 5rem;
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
`
|
|
228
|
-
];
|
|
229
|
-
__decorateClass([
|
|
230
|
-
property({ type: Array })
|
|
231
|
-
], PdOrderSummary.prototype, "orderSteps", 2);
|
|
232
|
-
__decorateClass([
|
|
233
|
-
property({ type: Boolean })
|
|
234
|
-
], PdOrderSummary.prototype, "withPayment", 2);
|
|
235
|
-
__decorateClass([
|
|
236
|
-
property({ type: Boolean })
|
|
237
|
-
], PdOrderSummary.prototype, "withAgreement", 2);
|
|
238
|
-
__decorateClass([
|
|
239
|
-
property({ type: Object })
|
|
240
|
-
], PdOrderSummary.prototype, "order", 2);
|
|
241
|
-
__decorateClass([
|
|
242
|
-
query("#submitSummaryFormId")
|
|
243
|
-
], PdOrderSummary.prototype, "_agreeForm", 2);
|
|
244
|
-
PdOrderSummary = __decorateClass([
|
|
245
|
-
customElement("pd-order-summary"),
|
|
246
|
-
localized()
|
|
247
|
-
], PdOrderSummary);
|
|
248
|
-
export {
|
|
249
|
-
PdOrderSummary
|
|
250
|
-
};
|
|
8
|
+
export { PdOrderSummary };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TemplateResult } from 'lit';
|
|
2
|
-
import { PdOrderSummary } from '../../pd-order-summary';
|
|
2
|
+
import { PdOrderSummary } from '../../pd-order-summary/pd-order-summary';
|
|
3
3
|
import { PdOrderStep } from '../../types';
|
|
4
4
|
export declare class TestSummary extends PdOrderSummary {
|
|
5
5
|
_renderCustomOrderStepSummary(step: PdOrderStep, index: number): TemplateResult | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-summary.d.ts","sourceRoot":"","sources":["../../../src/stories/test-impl/test-summary.ts"],"names":[],"mappings":"AACA,OAAO,EAAQ,cAAc,EAAE,MAAM,KAAK,CAAC;AAI3C,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"test-summary.d.ts","sourceRoot":"","sources":["../../../src/stories/test-impl/test-summary.ts"],"names":[],"mappings":"AACA,OAAO,EAAQ,cAAc,EAAE,MAAM,KAAK,CAAC;AAI3C,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,qBACa,WAAY,SAAQ,cAAc;IACpC,6BAA6B,CACpC,IAAI,EAAE,WAAW,EACjB,KAAK,EAAE,MAAM,GACZ,cAAc,GAAG,IAAI;IAYxB,OAAO,CAAC,kBAAkB;CAiB3B"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progressive-development/pd-order",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Progressive Development Order Component",
|
|
5
5
|
"author": "PD Progressive Development",
|
|
6
|
-
"license": "
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"access": "public"
|
|
9
|
+
},
|
|
7
10
|
"main": "./dist/index.js",
|
|
8
11
|
"module": "./dist/index.js",
|
|
12
|
+
"type": "module",
|
|
9
13
|
"types": "./dist/index.d.ts",
|
|
10
14
|
"exports": {
|
|
11
15
|
".": "./dist/index.js",
|
|
@@ -21,57 +25,17 @@
|
|
|
21
25
|
"README.md",
|
|
22
26
|
"LICENSE"
|
|
23
27
|
],
|
|
24
|
-
"scripts": {
|
|
25
|
-
"analyze": "cem analyze --litelement --exclude dist,demo",
|
|
26
|
-
"start": "vite",
|
|
27
|
-
"build": "vite build",
|
|
28
|
-
"preview": "vite preview",
|
|
29
|
-
"clean": "rm -rf dist",
|
|
30
|
-
"lint": "eslint --ext .ts,.html src --ignore-path .gitignore && prettier \"**/*.ts\" --check --ignore-path .gitignore",
|
|
31
|
-
"format": "eslint --ext .ts,.html src --fix --ignore-path .gitignore && prettier \"**/*.ts\" --write --ignore-path .gitignore",
|
|
32
|
-
"test": "vitest run --coverage",
|
|
33
|
-
"test:watch": "vitest --watch",
|
|
34
|
-
"check": "npm run lint && npm run build",
|
|
35
|
-
"prepublishOnly": "npm run clean && npm run check",
|
|
36
|
-
"localizeExtract": "lit-localize extract",
|
|
37
|
-
"localizeBuild": "lit-localize build",
|
|
38
|
-
"storybook": "storybook dev -p 6006",
|
|
39
|
-
"build-storybook": "storybook build"
|
|
40
|
-
},
|
|
41
28
|
"dependencies": {
|
|
29
|
+
"lit": "^3.3.1",
|
|
42
30
|
"@lit/localize": "^0.12.2",
|
|
43
|
-
"@progressive-development/pd-calendar": "^0.6.8",
|
|
44
|
-
"@progressive-development/pd-contact": "^0.6.26",
|
|
45
|
-
"@progressive-development/pd-content": "^0.7.17",
|
|
46
|
-
"@progressive-development/pd-dialog": "^0.6.24",
|
|
47
|
-
"@progressive-development/pd-forms": "^0.8.7",
|
|
48
|
-
"@progressive-development/pd-price": "^0.6.3",
|
|
49
|
-
"@progressive-development/pd-shared-styles": "^0.2.5",
|
|
50
31
|
"fecha": "^4.2.3",
|
|
51
|
-
"
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
"@
|
|
55
|
-
"@
|
|
56
|
-
"@
|
|
57
|
-
"@
|
|
58
|
-
"@storybook/addon-links": "^8.6.14",
|
|
59
|
-
"@storybook/blocks": "^8.0.10",
|
|
60
|
-
"@storybook/test": "^8.6.14",
|
|
61
|
-
"@storybook/web-components": "^8.0.10",
|
|
62
|
-
"@storybook/web-components-vite": "^8.6.14",
|
|
63
|
-
"@typescript-eslint/eslint-plugin": "^8.32.1",
|
|
64
|
-
"@typescript-eslint/parser": "^8.32.1",
|
|
65
|
-
"eslint": "^8.57.1",
|
|
66
|
-
"eslint-config-prettier": "^9.1.0",
|
|
67
|
-
"eslint-plugin-storybook": "^0.8.0",
|
|
68
|
-
"prettier": "^3.5.3",
|
|
69
|
-
"rollup-plugin-visualizer": "^5.14.0",
|
|
70
|
-
"storybook": "^8.6.14",
|
|
71
|
-
"typescript": "^5.8.3",
|
|
72
|
-
"vite": "^5.4.19",
|
|
73
|
-
"vite-plugin-dts": "^4.5.4",
|
|
74
|
-
"vitest": "^2.1.9"
|
|
32
|
+
"tslib": "^2.8.1",
|
|
33
|
+
"@progressive-development/pd-shared-styles": "0.3.1",
|
|
34
|
+
"@progressive-development/pd-contact": "1.0.0",
|
|
35
|
+
"@progressive-development/pd-content": "1.0.0",
|
|
36
|
+
"@progressive-development/pd-forms": "1.0.0",
|
|
37
|
+
"@progressive-development/pd-dialog": "1.0.0",
|
|
38
|
+
"@progressive-development/pd-price": "1.0.0"
|
|
75
39
|
},
|
|
76
40
|
"customElements": "custom-elements.json",
|
|
77
41
|
"keywords": [
|
|
@@ -82,5 +46,23 @@
|
|
|
82
46
|
"booking",
|
|
83
47
|
"summary",
|
|
84
48
|
"steps"
|
|
85
|
-
]
|
|
86
|
-
|
|
49
|
+
],
|
|
50
|
+
"scripts": {
|
|
51
|
+
"analyze": "cem analyze --litelement --exclude dist,demo",
|
|
52
|
+
"start": "vite",
|
|
53
|
+
"build": "pnpm run analyze && vite build",
|
|
54
|
+
"preview": "vite preview",
|
|
55
|
+
"clean": "rm -rf dist",
|
|
56
|
+
"clean:all": "rm -rf dist node_modules pnpm-lock.yaml",
|
|
57
|
+
"lint": "eslint --ext .ts,.html src --ignore-path ../../../.eslintignore && prettier \"**/*.ts\" --check --ignore-path ../../../.eslintignore",
|
|
58
|
+
"lint:lit": "lit-analyzer",
|
|
59
|
+
"format": "eslint --ext .ts,.html src --fix --ignore-path ../../../.eslintignore && prettier \"**/*.ts\" --write --ignore-path ../../../.eslintignore",
|
|
60
|
+
"test": "vitest run --coverage",
|
|
61
|
+
"test:watch": "vitest --watch",
|
|
62
|
+
"check": "pnpm run lint && pnpm run lint:lit && pnpm run build",
|
|
63
|
+
"localizeExtract": "lit-localize extract",
|
|
64
|
+
"localizeBuild": "lit-localize build",
|
|
65
|
+
"storybook": "storybook dev -p 6006",
|
|
66
|
+
"build-storybook": "storybook build"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pd-order-contacts.d.ts","sourceRoot":"","sources":["../src/pd-order-contacts.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAIV,cAAc,EACd,cAAc,EACf,MAAM,KAAK,CAAC;AAIb,OAAO,uDAAuD,CAAC;AAC/D,OAAO,iDAAiD,CAAC;AACzD,OAAO,gDAAgD,CAAC;AACxD,OAAO,+CAA+C,CAAC;AAKvD,OAAO,EAEL,aAAa,EACb,cAAc,EACf,MAAM,qCAAqC,CAAC;AAE7C;;;;;;GAMG;AACH,qBAEa,eAAgB,SAAQ,UAAU;IAC7C,gEAAgE;IAEhE,OAAO,UAAS;IAEhB,uDAAuD;IAEvD,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAM;IAE1C,6EAA6E;IAE7E,cAAc,EAAE,MAAM,EAAE,CAAM;IAE9B,uCAAuC;IAEvC,YAAY,CAAC,EAAE,aAAa,CAAC;IAE7B,0CAA0C;IAE1C,cAAc,CAAC,EAAE,aAAa,CAAC;IAE/B,mCAAmC;IAEnC,YAAY,CAAC,EAAE,aAAa,CAAC;IAE7B,8CAA8C;IAE9C,eAAe,CAAC,EAAE,aAAa,CAAC;IAEhC,0DAA0D;IAE1D,WAAW,UAAS;IAEpB,qEAAqE;IAErE,iBAAiB,UAAS;IAG1B,gBAAgB,UAAS;IAEzB,0EAA0E;IAE1E,KAAK,CAAC,EAAE,cAAc,CAAC;IAGvB,OAAO,CAAC,kBAAkB,CAAS;IAGnC,OAAO,CAAC,gBAAgB,CAAS;IAGjC,OAAO,CAAC,gBAAgB,CAAS;IAEjC,OAAgB,MAAM,EAAE,cAAc,CAgDpC;IAEO,MAAM,CAAC,YAAY,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAazD,SAAS,CAAC,MAAM;IAIhB,OAAO,CAAC,mBAAmB;IAiK3B,OAAO,CAAC,cAAc;IA+CtB,IAAI,KAAK,IAAI,OAAO,CASnB;IAEY,eAAe,IAAI,OAAO,CAAC,OAAO,CAAC;IAkCzC,SAAS;IAWhB,OAAO,CAAC,eAAe;CAoBxB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pd-order-summary.d.ts","sourceRoot":"","sources":["../src/pd-order-summary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAI5E,OAAO,qDAAqD,CAAC;AAC7D,OAAO,+CAA+C,CAAC;AACvD,OAAO,+CAA+C,CAAC;AAEvD,OAAO,iDAAiD,CAAC;AACzD,OAAO,6CAA6C,CAAC;AACrD,OAAO,qDAAqD,CAAC;AAO7D,OAAO,EAAsB,WAAW,EAAE,MAAM,YAAY,CAAC;AAE7D,OAAO,wBAAwB,CAAC;AAGhC;;;;;GAKG;AACH,qBAEa,cAAe,SAAQ,UAAU;IAC5C;;;OAGG;IAEH,UAAU,EAAE,WAAW,EAAE,CAAM;IAE/B;;OAEG;IAEH,WAAW,UAAS;IAEpB;;OAEG;IAEH,aAAa,UAAS;IAEtB;;OAEG;IAEH,KAAK,CAAC,EAAE,GAAG,CAAC;IAGZ,OAAO,CAAC,UAAU,CAAmB;IAErC,OAAgB,MAAM,EAAE,cAAc,CAqDpC;IAEO,YAAY,IAAI,IAAI;IAYpB,MAAM;IA0Df,IAAI,KAAK,YAER;IAEY,eAAe,IAAI,OAAO,CAAC,OAAO,CAAC;IA6BhD,SAAS,CAAC,oBAAoB,CAC5B,IAAI,EAAE,WAAW,EACjB,KAAK,EAAE,MAAM,GACZ,cAAc;IAkBjB,SAAS,CAAC,6BAA6B,CACrC,IAAI,EAAE,WAAW,EACjB,KAAK,EAAE,MAAM,GACZ,cAAc,GAAG,IAAI;IAUxB,SAAS,CAAC,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW;IAoB9D,OAAO,CAAC,uBAAuB;CAOhC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryFn } from '@storybook/web-components';
|
|
2
|
-
import { PdOrderContacts } from '../pd-order-contacts';
|
|
3
|
-
declare const _default: Meta<PdOrderContacts>;
|
|
4
|
-
export default _default;
|
|
5
|
-
export declare const Default: StoryFn<PdOrderContacts>;
|
|
6
|
-
export declare const WithPropertyDate: StoryFn<PdOrderContacts>;
|
|
7
|
-
export declare const RequiredFields: StoryFn<PdOrderContacts>;
|
|
8
|
-
export declare const WithBilling: StoryFn<PdOrderContacts>;
|
|
9
|
-
export declare const WithBillingAndAdmin: StoryFn<PdOrderContacts>;
|
|
10
|
-
export declare const WithBillingAdminPropertyDate: StoryFn<PdOrderContacts>;
|
|
11
|
-
export declare const ViewOnly: StoryFn<PdOrderContacts>;
|
|
12
|
-
export declare const ViewWithBilling: StoryFn<PdOrderContacts>;
|
|
13
|
-
export declare const ViewWithBillingAndAdmin: StoryFn<PdOrderContacts>;
|
|
14
|
-
export declare const Filled: StoryFn<PdOrderContacts>;
|
|
15
|
-
export declare const FilledWithAdmin: StoryFn<PdOrderContacts>;
|
|
16
|
-
export declare const FilledWithAdminAndDate: StoryFn<PdOrderContacts>;
|
|
17
|
-
//# sourceMappingURL=pd-order-contacts.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pd-order-contacts.stories.d.ts","sourceRoot":"","sources":["../../src/stories/pd-order-contacts.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,sBAAsB,CAAC;wBAMzB,IAAI,CAAC,eAAe,CAAC;AAJ1B,wBAI2B;AA8E3B,eAAO,MAAM,OAAO,0BAAoB,CAAC;AAKzC,eAAO,MAAM,gBAAgB,0BAAoB,CAAC;AAMlD,eAAO,MAAM,cAAc,0BAAoB,CAAC;AAiBhD,eAAO,MAAM,WAAW,0BAAoB,CAAC;AAM7C,eAAO,MAAM,mBAAmB,0BAAoB,CAAC;AAOrD,eAAO,MAAM,4BAA4B,0BAAoB,CAAC;AAQ9D,eAAO,MAAM,QAAQ,0BAAoB,CAAC;AAM1C,eAAO,MAAM,eAAe,0BAAoB,CAAC;AAOjD,eAAO,MAAM,uBAAuB,0BAAoB,CAAC;AASzD,eAAO,MAAM,MAAM,0BAAoB,CAAC;AAQxC,eAAO,MAAM,eAAe,0BAAoB,CAAC;AAWjD,eAAO,MAAM,sBAAsB,0BAAoB,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryFn } from '@storybook/web-components';
|
|
2
|
-
import { TestSummary } from './test-impl/test-summary.js';
|
|
3
|
-
declare const _default: Meta<TestSummary>;
|
|
4
|
-
export default _default;
|
|
5
|
-
export declare const OrderSummary: StoryFn<TestSummary & {
|
|
6
|
-
orderContact: any;
|
|
7
|
-
billingContact?: any;
|
|
8
|
-
}>;
|
|
9
|
-
export declare const OrderSummaryEmptyBilling: StoryFn<TestSummary & {
|
|
10
|
-
orderContact: any;
|
|
11
|
-
billingContact?: any;
|
|
12
|
-
}>;
|
|
13
|
-
//# sourceMappingURL=pd-order-summary.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pd-order-summary.stories.d.ts","sourceRoot":"","sources":["../../src/stories/pd-order-summary.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAI/D,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,6BAA6B,CAAC;wBAMhC,IAAI,CAAC,WAAW,CAAC;AAJtB,wBAIuB;AA0EvB,eAAO,MAAM,YAAY;kBAxCP,GAAG;qBACA,GAAG;EAuCqB,CAAC;AAuB9C,eAAO,MAAM,wBAAwB;kBA/DnB,GAAG;qBACA,GAAG;EA8DiC,CAAC"}
|