@progressive-development/pd-order 0.1.129 → 0.5.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/index.js +12 -0
- package/dist/locales/be.js +10 -0
- package/dist/locales/de.js +14 -4
- package/dist/locales/en.js +10 -0
- package/dist/pd-order-contacts.js +3 -1
- package/dist/pd-order-summary.js +3 -1
- package/dist/src/PdOrderContacts.js +155 -33
- package/dist/src/PdOrderSummary.js +8 -8
- package/package.json +21 -19
- package/dist/node_modules/@progressive-development/pd-contact/pd-contact.js +0 -2
- package/dist/node_modules/@progressive-development/pd-contact/src/PdContact.js +0 -566
- package/dist/node_modules/@progressive-development/pd-content/pd-collapse.js +0 -2
- package/dist/node_modules/@progressive-development/pd-content/pd-edit-content.js +0 -2
- package/dist/node_modules/@progressive-development/pd-content/src/PdCollapse.js +0 -135
- package/dist/node_modules/@progressive-development/pd-content/src/PdEditContent.js +0 -223
- package/dist/node_modules/@progressive-development/pd-dialog/pd-popup.js +0 -2
- package/dist/node_modules/@progressive-development/pd-dialog/src/PdPopup.js +0 -112
- package/dist/node_modules/@progressive-development/pd-forms/pd-checkbox.js +0 -2
- package/dist/node_modules/@progressive-development/pd-forms/pd-form-container.js +0 -2
- package/dist/node_modules/@progressive-development/pd-forms/pd-form-row.js +0 -2
- package/dist/node_modules/@progressive-development/pd-forms/pd-hover-box.js +0 -2
- package/dist/node_modules/@progressive-development/pd-forms/pd-input.js +0 -2
- package/dist/node_modules/@progressive-development/pd-forms/pd-radio-group.js +0 -2
- package/dist/node_modules/@progressive-development/pd-forms/src/PdBaseInputElement.js +0 -86
- package/dist/node_modules/@progressive-development/pd-forms/src/PdBaseUi.js +0 -33
- package/dist/node_modules/@progressive-development/pd-forms/src/PdBaseUiInput.js +0 -229
- package/dist/node_modules/@progressive-development/pd-forms/src/PdCheckbox.js +0 -230
- package/dist/node_modules/@progressive-development/pd-forms/src/PdFormContainer.js +0 -167
- package/dist/node_modules/@progressive-development/pd-forms/src/PdFormRow.js +0 -92
- package/dist/node_modules/@progressive-development/pd-forms/src/PdHoverBox.js +0 -108
- package/dist/node_modules/@progressive-development/pd-forms/src/PdInput.js +0 -79
- package/dist/node_modules/@progressive-development/pd-forms/src/PdRadioGroup.js +0 -72
- package/dist/node_modules/@progressive-development/pd-forms/src/shared-input-field-styles.js +0 -152
- package/dist/node_modules/@progressive-development/pd-forms/src/shared-input-styles.js +0 -64
- package/dist/node_modules/@progressive-development/pd-icon/pd-icon.js +0 -4
- package/dist/node_modules/@progressive-development/pd-icon/src/PdIcon.js +0 -595
- package/dist/node_modules/@progressive-development/pd-price/pd-pricetable.js +0 -2
- package/dist/node_modules/@progressive-development/pd-price/src/PdPricetable.js +0 -149
- package/dist/node_modules/fecha/lib/fecha.js +0 -200
- package/dist/node_modules/lit/node_modules/lit-html/directive.js +0 -27
- package/dist/node_modules/lit/node_modules/lit-html/directives/class-map.js +0 -36
- package/dist/node_modules/lit/node_modules/lit-html/lit-html.js +0 -242
package/dist/index.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PdOrderContacts } from "./src/PdOrderContacts.js";
|
|
2
|
+
import { PdOrderSummary } from "./src/PdOrderSummary.js";
|
|
3
|
+
import { templates } from "./locales/be.js";
|
|
4
|
+
import { templates as templates2 } from "./locales/de.js";
|
|
5
|
+
import { templates as templates3 } from "./locales/en.js";
|
|
6
|
+
export {
|
|
7
|
+
PdOrderContacts,
|
|
8
|
+
PdOrderSummary,
|
|
9
|
+
templates as beTemplates,
|
|
10
|
+
templates2 as deTemplates,
|
|
11
|
+
templates3 as enTemplates
|
|
12
|
+
};
|
package/dist/locales/be.js
CHANGED
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import { html } from "lit";
|
|
2
2
|
const templates = {
|
|
3
|
+
"pd.order.contacts.adminContact.inputHeader": `Adres van de administratie (optioneel)`,
|
|
4
|
+
"pd.order.contacts.adminContact.otherAdminLink": `Nieuw administratieadres toevoegen`,
|
|
5
|
+
"pd.order.contacts.adminContact.sameAdminLink": `Klantadres gebruiken als administratieadres`,
|
|
6
|
+
"pd.order.contacts.adminContact.sameAdminText": `Het administratieadres is hetzelfde als het klantadres.`,
|
|
3
7
|
"pd.order.contacts.billingContact.inputHeader": `Facturatieadres`,
|
|
4
8
|
"pd.order.contacts.billingContact.otherBillingLink": `Gebruik een ander facturatieadres`,
|
|
5
9
|
"pd.order.contacts.billingContact.sameBillingLink": `Gebruik hetzelfde facturatieadres`,
|
|
6
10
|
"pd.order.contacts.billingContact.sameBillingText": `Het adres wordt ook gebruikt als facturatieadres.`,
|
|
7
11
|
"pd.order.contacts.orderContact.inputHeader": `Adres`,
|
|
12
|
+
"pd.order.contacts.propertyContact.checkBox": `Is de klant een verhuurder?`,
|
|
13
|
+
"pd.order.contacts.propertyContact.inputHeader": `Adres van het pand`,
|
|
14
|
+
"pd.order.contacts.summary.adminContact.title": `Administratie`,
|
|
15
|
+
"pd.order.contacts.summary.billingContact.title": `Factuuradres`,
|
|
16
|
+
"pd.order.contacts.summary.orderContact.title": `Adres`,
|
|
17
|
+
"pd.order.contacts.summary.propertyContact.title": `Pand`,
|
|
8
18
|
"pd.order.summary.agree.link": html`Ga akkoord met onze <a @click="${0}" @keypress="${1}">algemene voorwaarden</a>.`,
|
|
9
19
|
"pd.order.summary.agree.required": `Ga akkoord met de algemene voorwaarden om verder te gaan.`,
|
|
10
20
|
"pd.order.summary.billing": `Factuur`,
|
package/dist/locales/de.js
CHANGED
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import { html } from "lit";
|
|
2
2
|
const templates = {
|
|
3
3
|
"pd.order.contacts.orderContact.inputHeader": `Adresse`,
|
|
4
|
-
"pd.order.contacts.billingContact.inputHeader": `Rechnungsadresse`,
|
|
5
|
-
"pd.order.contacts.billingContact.sameBillingLink": `
|
|
6
|
-
"pd.order.contacts.billingContact.sameBillingText": `
|
|
7
|
-
"pd.order.contacts.billingContact.otherBillingLink": `
|
|
4
|
+
"pd.order.contacts.billingContact.inputHeader": `Rechnungsadresse (optional)`,
|
|
5
|
+
"pd.order.contacts.billingContact.sameBillingLink": `Kundenadresse als Rechnungsadresse verwenden`,
|
|
6
|
+
"pd.order.contacts.billingContact.sameBillingText": `Rechnungsadresse entspricht der Kundenadresse.`,
|
|
7
|
+
"pd.order.contacts.billingContact.otherBillingLink": `Neue Rechnungsadresse hinzufügen`,
|
|
8
|
+
"pd.order.contacts.propertyContact.checkBox": `Ist der Kunde Vermieter?`,
|
|
9
|
+
"pd.order.contacts.propertyContact.inputHeader": `Adresse der Immobilie`,
|
|
10
|
+
"pd.order.contacts.adminContact.inputHeader": `Adresse der Verwaltung (optional)`,
|
|
11
|
+
"pd.order.contacts.adminContact.sameAdminLink": `Kundenadresse als Verwaltungsadresse verwenden`,
|
|
12
|
+
"pd.order.contacts.adminContact.sameAdminText": `Verwaltungsadresse entspricht der Kundenadresse.`,
|
|
13
|
+
"pd.order.contacts.adminContact.otherAdminLink": `Neue Verwaltungsadresse hinzufügen`,
|
|
14
|
+
"pd.order.contacts.summary.orderContact.title": `Adresse`,
|
|
15
|
+
"pd.order.contacts.summary.billingContact.title": `Rechnungsadresse`,
|
|
16
|
+
"pd.order.contacts.summary.propertyContact.title": `Immobilie`,
|
|
17
|
+
"pd.order.contacts.summary.adminContact.title": `Verwaltung`,
|
|
8
18
|
"pd.order.summary.title": `Übersicht`,
|
|
9
19
|
"pd.order.summary.billing": `Rechnung`,
|
|
10
20
|
"pd.order.summary.agree.required": `Bitte stimmen Sie den Allgemeinen Geschäftsbedingungen zu, um fortzufahren.`,
|
package/dist/locales/en.js
CHANGED
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import { html } from "lit";
|
|
2
2
|
const templates = {
|
|
3
|
+
"pd.order.contacts.adminContact.inputHeader": `Administration address (optional)`,
|
|
4
|
+
"pd.order.contacts.adminContact.otherAdminLink": `Add a new administration address`,
|
|
5
|
+
"pd.order.contacts.adminContact.sameAdminLink": `Use customer address as administration address`,
|
|
6
|
+
"pd.order.contacts.adminContact.sameAdminText": `The administration address matches the customer address.`,
|
|
3
7
|
"pd.order.contacts.billingContact.inputHeader": `Billing Address`,
|
|
4
8
|
"pd.order.contacts.billingContact.otherBillingLink": `Use a different billing address`,
|
|
5
9
|
"pd.order.contacts.billingContact.sameBillingLink": `Use the same billing address`,
|
|
6
10
|
"pd.order.contacts.billingContact.sameBillingText": `The address will also be used as the billing address.`,
|
|
7
11
|
"pd.order.contacts.orderContact.inputHeader": `Address`,
|
|
12
|
+
"pd.order.contacts.propertyContact.checkBox": `Is the customer a landlord?`,
|
|
13
|
+
"pd.order.contacts.propertyContact.inputHeader": `Property address`,
|
|
14
|
+
"pd.order.contacts.summary.adminContact.title": `Administration`,
|
|
15
|
+
"pd.order.contacts.summary.billingContact.title": `Billing address`,
|
|
16
|
+
"pd.order.contacts.summary.orderContact.title": `Address`,
|
|
17
|
+
"pd.order.contacts.summary.propertyContact.title": `Property`,
|
|
8
18
|
"pd.order.summary.agree.link": html`Agree to our <a @click="${0}" @keypress="${1}">terms and conditions</a>.`,
|
|
9
19
|
"pd.order.summary.agree.required": `Please agree to the terms and conditions to proceed.`,
|
|
10
20
|
"pd.order.summary.billing": `Invoice`,
|
package/dist/pd-order-summary.js
CHANGED
|
@@ -1,13 +1,36 @@
|
|
|
1
1
|
import { LitElement, css, html } from "lit";
|
|
2
2
|
import { msg } from "@lit/localize";
|
|
3
|
-
import "
|
|
4
|
-
import "
|
|
3
|
+
import "@progressive-development/pd-content/pd-collapse";
|
|
4
|
+
import "@progressive-development/pd-contact/pd-contact";
|
|
5
|
+
import "@progressive-development/pd-forms/pd-checkbox";
|
|
6
|
+
import "@progressive-development/pd-forms/pd-form-row";
|
|
7
|
+
import "@progressive-development/pd-forms/pd-radio-group";
|
|
5
8
|
import { PDFontStyles } from "@progressive-development/pd-shared-styles";
|
|
6
9
|
/**
|
|
7
10
|
* @license
|
|
8
11
|
* Copyright (c) 2021 PD Progressive Development UG. All rights reserved.
|
|
9
12
|
*/
|
|
10
13
|
class PdOrderContacts extends LitElement {
|
|
14
|
+
static get properties() {
|
|
15
|
+
return {
|
|
16
|
+
/**
|
|
17
|
+
* List with required contact fields, if not set use default (previous existing values to be consitent during update)
|
|
18
|
+
*/
|
|
19
|
+
summary: { type: Boolean },
|
|
20
|
+
contactTitle: { type: Object },
|
|
21
|
+
requiredFields: { type: Array },
|
|
22
|
+
orderContact: { type: Object },
|
|
23
|
+
billingContact: { type: Object },
|
|
24
|
+
adminContact: { type: Object },
|
|
25
|
+
propertyContact: { type: Object },
|
|
26
|
+
withPayment: { type: Boolean },
|
|
27
|
+
withPropertyOwner: { type: Boolean },
|
|
28
|
+
match: { type: Object },
|
|
29
|
+
_ownBillingContact: { type: Boolean, state: true },
|
|
30
|
+
_ownAdminContact: { type: Boolean, state: true },
|
|
31
|
+
_isPropertyOwner: { type: Boolean, state: true }
|
|
32
|
+
};
|
|
33
|
+
}
|
|
11
34
|
static get styles() {
|
|
12
35
|
return [
|
|
13
36
|
PDFontStyles,
|
|
@@ -43,33 +66,44 @@ class PdOrderContacts extends LitElement {
|
|
|
43
66
|
flex-wrap: wrap;
|
|
44
67
|
gap: 10px;
|
|
45
68
|
}
|
|
46
|
-
|
|
47
|
-
.
|
|
48
|
-
|
|
69
|
+
|
|
70
|
+
.summary-box pd-contact {
|
|
71
|
+
min-width: 150px;
|
|
49
72
|
}
|
|
73
|
+
|
|
74
|
+
.property-owner-box {
|
|
75
|
+
border: 2px solid #007B8F; /* Dezenter, moderner Rahmen in einer angenehmen Farbe */
|
|
76
|
+
border-radius: 8px; /* Abgerundete Ecken für eine weiche Optik */
|
|
77
|
+
padding: 16px; /* Innenabstand, damit der Inhalt nicht direkt am Rahmen klebt */
|
|
78
|
+
margin: 16px 0; /* Abstand nach oben und unten für bessere Trennung */
|
|
79
|
+
background-color: #F8FAFB; /* Heller Hintergrund für visuelle Abgrenzung */
|
|
80
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Leichter Schatten für ein modernes Design */
|
|
81
|
+
}
|
|
82
|
+
|
|
50
83
|
`
|
|
51
84
|
];
|
|
52
85
|
}
|
|
53
|
-
static get properties() {
|
|
54
|
-
return {
|
|
55
|
-
/**
|
|
56
|
-
* List with required contact fields, if not set use default (previous existing values to be consitent during update)
|
|
57
|
-
*/
|
|
58
|
-
requiredFields: { type: Array },
|
|
59
|
-
orderContact: { type: Object },
|
|
60
|
-
billingContact: { type: Object },
|
|
61
|
-
summary: { type: Boolean },
|
|
62
|
-
withPayment: { type: Boolean },
|
|
63
|
-
match: { type: Object },
|
|
64
|
-
_ownBillingContact: { type: Boolean }
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
86
|
constructor() {
|
|
68
87
|
super();
|
|
69
88
|
this._ownBillingContact = false;
|
|
89
|
+
this._ownAdminContact = false;
|
|
90
|
+
this._isPropertyOwner = false;
|
|
70
91
|
this.requiredFields = [];
|
|
92
|
+
this.contactTitle = {};
|
|
71
93
|
this.match = {};
|
|
72
94
|
}
|
|
95
|
+
update(changedProperties) {
|
|
96
|
+
if (changedProperties.has("billingContact")) {
|
|
97
|
+
this._ownBillingContact = this.billingContact !== void 0 && this.billingContact !== null;
|
|
98
|
+
}
|
|
99
|
+
if (changedProperties.has("adminContact")) {
|
|
100
|
+
this._ownAdminContact = this.adminContact !== void 0 && this.adminContact !== null;
|
|
101
|
+
}
|
|
102
|
+
if (changedProperties.has("propertyContact")) {
|
|
103
|
+
this._isPropertyOwner = this.propertyContact !== void 0 && this.propertyContact !== null;
|
|
104
|
+
}
|
|
105
|
+
super.update(changedProperties);
|
|
106
|
+
}
|
|
73
107
|
connectedCallback() {
|
|
74
108
|
super.connectedCallback();
|
|
75
109
|
this.addEventListener("validate-form", this._validateForm);
|
|
@@ -98,9 +132,10 @@ class PdOrderContacts extends LitElement {
|
|
|
98
132
|
return this._renderEditContacts();
|
|
99
133
|
}
|
|
100
134
|
_renderEditContacts() {
|
|
101
|
-
return html`
|
|
135
|
+
return html`
|
|
136
|
+
|
|
102
137
|
<pd-collapse id="orderContactCollapseId" active>
|
|
103
|
-
<div slot="header" class="header">${msg("Adresse", { id: "pd.order.contacts.orderContact.inputHeader" })}</div>
|
|
138
|
+
<div slot="header" class="header">${this.contactTitle.orderInputContact || msg("Adresse", { id: "pd.order.contacts.orderContact.inputHeader" })}</div>
|
|
104
139
|
<pd-contact
|
|
105
140
|
id="orderContactId"
|
|
106
141
|
class="collapse-contact"
|
|
@@ -109,18 +144,18 @@ class PdOrderContacts extends LitElement {
|
|
|
109
144
|
.contact="${this.orderContact}"
|
|
110
145
|
.match="${this.match}"
|
|
111
146
|
></pd-contact>
|
|
112
|
-
</pd-collapse>
|
|
147
|
+
</pd-collapse>
|
|
113
148
|
|
|
114
149
|
${this.withPayment ? html`
|
|
115
150
|
<pd-collapse id="billingContactCollapseId">
|
|
116
|
-
<div slot="header" class="header">${msg("Rechnungsadresse", { id: "pd.order.contacts.billingContact.inputHeader" })}</div>
|
|
151
|
+
<div slot="header" class="header">${this.contactTitle.billingInputContact || msg("Rechnungsadresse (optional)", { id: "pd.order.contacts.billingContact.inputHeader" })}</div>
|
|
117
152
|
<div slot="content">
|
|
118
153
|
${this._ownBillingContact ? html`
|
|
119
154
|
<p>
|
|
120
155
|
<a @click="${() => {
|
|
121
156
|
this._ownBillingContact = false;
|
|
122
157
|
}}">
|
|
123
|
-
${msg("
|
|
158
|
+
${msg("Kundenadresse als Rechnungsadresse verwenden", { id: "pd.order.contacts.billingContact.sameBillingLink" })}
|
|
124
159
|
</a>
|
|
125
160
|
</p>
|
|
126
161
|
<pd-contact
|
|
@@ -130,35 +165,102 @@ class PdOrderContacts extends LitElement {
|
|
|
130
165
|
.contact="${this.billingContact}"
|
|
131
166
|
></pd-contact>
|
|
132
167
|
` : html`
|
|
133
|
-
<p>${msg("
|
|
168
|
+
<p>${msg("Rechnungsadresse entspricht der Kundenadresse.", { id: "pd.order.contacts.billingContact.sameBillingText" })}</p>
|
|
134
169
|
<p>
|
|
135
170
|
<a @click="${() => {
|
|
136
171
|
this._ownBillingContact = true;
|
|
137
172
|
}}">
|
|
138
|
-
${msg("
|
|
173
|
+
${msg("Neue Rechnungsadresse hinzufügen", { id: "pd.order.contacts.billingContact.otherBillingLink" })}
|
|
139
174
|
</a>
|
|
140
175
|
</p>
|
|
141
176
|
`}
|
|
142
177
|
</div>
|
|
143
178
|
</pd-collapse>` : ""}
|
|
144
|
-
|
|
179
|
+
|
|
180
|
+
${this.withPropertyOwner ? html`
|
|
181
|
+
|
|
182
|
+
<div class="property-owner-box">
|
|
183
|
+
|
|
184
|
+
<pd-checkbox id="isPropertyOwnerId" value="${this._isPropertyOwner}"
|
|
185
|
+
@field-change="${(e) => this._isPropertyOwner = e.detail.value === "true"}">${msg("Ist der Kunde Vermieter?", { id: "pd.order.contacts.propertyContact.checkBox" })}</pd-checkbox>
|
|
186
|
+
|
|
187
|
+
${this._isPropertyOwner ? html`
|
|
188
|
+
|
|
189
|
+
<pd-collapse id="propertyContactCollapseId" style="padding-top: 20px;">
|
|
190
|
+
<div slot="header" class="header">${this.contactTitle.propertyInputContact || msg("Adresse der Immobilie", { id: "pd.order.contacts.propertyContact.inputHeader" })}</div>
|
|
191
|
+
<div slot="content">
|
|
192
|
+
<pd-contact
|
|
193
|
+
id="propertyContactId"
|
|
194
|
+
class="collapse-contact"
|
|
195
|
+
.requiredField="${this.requiredFields}"
|
|
196
|
+
.inputFields="${["street", "city", "additionalHint"]}"
|
|
197
|
+
.contact="${this.propertyContact}"
|
|
198
|
+
></pd-contact>
|
|
199
|
+
</div>
|
|
200
|
+
</pd-collapse>
|
|
201
|
+
|
|
202
|
+
<pd-collapse id="adminContactCollapseId">
|
|
203
|
+
<div slot="header" class="header">${this.contactTitle.adminInputContact || msg("Adresse der Verwaltung (optional)", { id: "pd.order.contacts.adminContact.inputHeader" })}</div>
|
|
204
|
+
<div slot="content">
|
|
205
|
+
${this._ownAdminContact ? html`
|
|
206
|
+
<p>
|
|
207
|
+
<a @click="${() => {
|
|
208
|
+
this._ownAdminContact = false;
|
|
209
|
+
}}">
|
|
210
|
+
${msg("Kundenadresse als Verwaltungsadresse verwenden", { id: "pd.order.contacts.adminContact.sameAdminLink" })}
|
|
211
|
+
</a>
|
|
212
|
+
</p>
|
|
213
|
+
<pd-contact
|
|
214
|
+
id="adminContactId"
|
|
215
|
+
class="collapse-contact"
|
|
216
|
+
.requiredField="${this.requiredFields}"
|
|
217
|
+
.contact="${this.adminContact}"
|
|
218
|
+
></pd-contact>
|
|
219
|
+
` : html`
|
|
220
|
+
<p>${msg("Verwaltungsadresse entspricht der Kundenadresse.", { id: "pd.order.contacts.adminContact.sameAdminText" })}</p>
|
|
221
|
+
<p>
|
|
222
|
+
<a @click="${() => {
|
|
223
|
+
this._ownAdminContact = true;
|
|
224
|
+
}}">
|
|
225
|
+
${msg("Neue Verwaltungsadresse hinzufügen", { id: "pd.order.contacts.adminContact.otherAdminLink" })}
|
|
226
|
+
</a>
|
|
227
|
+
</p>
|
|
228
|
+
`}
|
|
229
|
+
</div>
|
|
230
|
+
</pd-collapse>
|
|
231
|
+
` : ""}
|
|
232
|
+
|
|
233
|
+
</div>` : ""}
|
|
234
|
+
`;
|
|
145
235
|
}
|
|
146
236
|
_renderSummary() {
|
|
147
237
|
return html`
|
|
148
238
|
<div class="summary-box">
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
addressTitle="
|
|
239
|
+
${this.orderContact ? html`
|
|
240
|
+
<pd-contact
|
|
241
|
+
addressTitle="${this.contactTitle.orderSummaryContact || msg("Adresse", { id: "pd.order.contacts.summary.orderContact.title" })}"
|
|
152
242
|
.contact="${this.orderContact}"
|
|
153
243
|
summary
|
|
154
|
-
></pd-contact
|
|
244
|
+
></pd-contact>` : ""}
|
|
155
245
|
${this.billingContact ? html`
|
|
156
246
|
<pd-contact
|
|
157
|
-
addressTitle="
|
|
158
|
-
addressRef="adres onderhoud"
|
|
247
|
+
addressTitle="${this.contactTitle.billingSummaryContact || msg("Rechnungsadresse", { id: "pd.order.contacts.summary.billingContact.title" })}"
|
|
159
248
|
.contact="${this.billingContact}"
|
|
160
249
|
summary
|
|
161
250
|
></pd-contact>` : ""}
|
|
251
|
+
${this.propertyContact ? html`
|
|
252
|
+
<pd-contact
|
|
253
|
+
addressTitle="${this.contactTitle.propertySummaryContact || msg("Immobilie", { id: "pd.order.contacts.summary.propertyContact.title" })}"
|
|
254
|
+
.contact="${this.propertyContact}"
|
|
255
|
+
summary
|
|
256
|
+
></pd-contact>` : ""}
|
|
257
|
+
${this.adminContact ? html`
|
|
258
|
+
<pd-contact
|
|
259
|
+
addressTitle="${this.contactTitle.adminSummaryContact || msg("Verwaltung", { id: "pd.order.contacts.summary.adminContact.title" })}"
|
|
260
|
+
.contact="${this.adminContact}"
|
|
261
|
+
summary
|
|
262
|
+
></pd-contact>` : ""}
|
|
263
|
+
|
|
162
264
|
</div>
|
|
163
265
|
`;
|
|
164
266
|
}
|
|
@@ -183,6 +285,26 @@ class PdOrderContacts extends LitElement {
|
|
|
183
285
|
this.shadowRoot.getElementById("billingContactCollapseId").open();
|
|
184
286
|
}
|
|
185
287
|
}
|
|
288
|
+
if (this._isPropertyOwner) {
|
|
289
|
+
this.shadowRoot.getElementById("propertyContactId").dispatchEvent(
|
|
290
|
+
new CustomEvent("validate-form", {
|
|
291
|
+
detail: e.detail
|
|
292
|
+
})
|
|
293
|
+
);
|
|
294
|
+
if (e.detail.errorMap.size > errorSize) {
|
|
295
|
+
this.shadowRoot.getElementById("propertyContactCollapseId").open();
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
if (this._isPropertyOwner && this._ownAdminContact) {
|
|
299
|
+
this.shadowRoot.getElementById("adminContactId").dispatchEvent(
|
|
300
|
+
new CustomEvent("validate-form", {
|
|
301
|
+
detail: e.detail
|
|
302
|
+
})
|
|
303
|
+
);
|
|
304
|
+
if (e.detail.errorMap.size > errorSize) {
|
|
305
|
+
this.shadowRoot.getElementById("adminContactCollapseId").open();
|
|
306
|
+
}
|
|
307
|
+
}
|
|
186
308
|
}
|
|
187
309
|
}
|
|
188
310
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { LitElement, css, html } from "lit";
|
|
2
2
|
import { msg } from "@lit/localize";
|
|
3
|
-
import { format } from "
|
|
4
|
-
import "
|
|
5
|
-
import "
|
|
6
|
-
import "
|
|
7
|
-
import "
|
|
8
|
-
import "
|
|
9
|
-
import "
|
|
10
|
-
import "
|
|
3
|
+
import { format } from "fecha";
|
|
4
|
+
import "@progressive-development/pd-forms/pd-checkbox";
|
|
5
|
+
import "@progressive-development/pd-forms/pd-radio-group";
|
|
6
|
+
import "@progressive-development/pd-forms/pd-form-container";
|
|
7
|
+
import "@progressive-development/pd-forms/pd-form-row";
|
|
8
|
+
import "@progressive-development/pd-price/pd-pricetable";
|
|
9
|
+
import "@progressive-development/pd-dialog/pd-popup";
|
|
10
|
+
import "@progressive-development/pd-content/pd-edit-content";
|
|
11
11
|
import { PDFontStyles, PDColorStyles } from "@progressive-development/pd-shared-styles";
|
|
12
12
|
import "../pd-order-contacts.js";
|
|
13
13
|
/**
|
package/package.json
CHANGED
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
"description": "Progressive Development Order Component",
|
|
4
4
|
"author": "PD Progressive Development",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.5.0",
|
|
7
7
|
"main": "./dist/index.js",
|
|
8
8
|
"module": "./dist/index.js",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": "./dist/index.js",
|
|
11
11
|
"./pd-order-contacts": "./dist/pd-order-contacts.js",
|
|
12
12
|
"./pd-order-summary": "./dist/pd-order-summary.js",
|
|
13
|
-
"./locales/be": "./dist/
|
|
14
|
-
"./locales/de": "./dist/
|
|
15
|
-
"./locales/en": "./dist/
|
|
13
|
+
"./locales/be": "./dist/locales/be.js",
|
|
14
|
+
"./locales/de": "./dist/locales/de.js",
|
|
15
|
+
"./locales/en": "./dist/locales/en.js"
|
|
16
16
|
},
|
|
17
17
|
"files": [
|
|
18
18
|
"dist/",
|
|
@@ -35,32 +35,34 @@
|
|
|
35
35
|
"build-storybook": "storybook build"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@progressive-development/pd-
|
|
39
|
-
"@progressive-development/pd-
|
|
40
|
-
"@progressive-development/pd-
|
|
41
|
-
"@progressive-development/pd-
|
|
42
|
-
"@progressive-development/pd-
|
|
43
|
-
"@progressive-development/pd-price": "^0.1.10",
|
|
38
|
+
"@progressive-development/pd-content": "^0.5.1",
|
|
39
|
+
"@progressive-development/pd-dialog": "^0.5.0",
|
|
40
|
+
"@progressive-development/pd-price": "^0.5.0",
|
|
41
|
+
"@progressive-development/pd-forms": "^0.5.0",
|
|
42
|
+
"@progressive-development/pd-contact": "^0.5.2",
|
|
44
43
|
"@progressive-development/pd-shared-styles": "^0.1.1",
|
|
45
44
|
"fecha": "^4.2.3",
|
|
46
45
|
"lit": "^2.8.0",
|
|
47
|
-
"@lit/localize": "^0.
|
|
46
|
+
"@lit/localize": "^0.12.2"
|
|
48
47
|
},
|
|
49
48
|
"devDependencies": {
|
|
49
|
+
"@chromatic-com/storybook": "^1.3.4",
|
|
50
50
|
"@custom-elements-manifest/analyzer": "^0.4.17",
|
|
51
51
|
"@lit/localize-tools": "^0.7.2",
|
|
52
|
-
"@storybook/addon-essentials": "^
|
|
53
|
-
"@storybook/addon-links": "^
|
|
54
|
-
"@storybook/blocks": "^
|
|
55
|
-
"@storybook/
|
|
56
|
-
"@storybook/web-components
|
|
52
|
+
"@storybook/addon-essentials": "^8.0.10",
|
|
53
|
+
"@storybook/addon-links": "^8.0.10",
|
|
54
|
+
"@storybook/blocks": "^8.0.10",
|
|
55
|
+
"@storybook/test": "^8.0.10",
|
|
56
|
+
"@storybook/web-components": "^8.0.10",
|
|
57
|
+
"@storybook/web-components-vite": "^8.0.10",
|
|
57
58
|
"eslint": "^7.32.0",
|
|
58
59
|
"eslint-config-prettier": "^8.10.0",
|
|
59
|
-
"eslint-plugin-storybook": "^0.
|
|
60
|
+
"eslint-plugin-storybook": "^0.8.0",
|
|
60
61
|
"husky": "^4.3.8",
|
|
61
62
|
"lint-staged": "^10.5.4",
|
|
62
|
-
"prettier": "^2.8.8",
|
|
63
|
-
"
|
|
63
|
+
"prettier": "^2.8.8",
|
|
64
|
+
"rollup-plugin-visualizer": "^5.13.1",
|
|
65
|
+
"storybook": "^8.0.10",
|
|
64
66
|
"vite": "^5.4.11",
|
|
65
67
|
"vitest": "^2.1.8"
|
|
66
68
|
},
|