@progressive-development/pd-order 0.1.125 → 0.1.126

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.
@@ -1,105 +0,0 @@
1
- import { html } from 'lit';
2
- import '../pd-order-contacts.js';
3
-
4
- export default {
5
- title: 'PdOrder/Order Contacts',
6
- component: 'pd-order-contacts',
7
- argTypes: {
8
-
9
- },
10
- };
11
-
12
- function Template({ summary, orderContact, billingContact, withPayment, requiredFields }) {
13
- return html`
14
- <pd-order-contacts id="testOrderId"
15
- ?summary="${summary}"
16
- .orderContact="${orderContact}"
17
- .billingContact="${billingContact}"
18
- ?withPayment="${withPayment}"
19
- .requiredFields=${requiredFields}
20
- ></pd-order-contacts>
21
-
22
- <h2>Test Validation</h2>
23
- <button @click="${() => {
24
-
25
- document.getElementById("testOrderId").validateInput();
26
-
27
- }}">Test Validate</button>
28
- `;
29
- }
30
-
31
- export const OrderContacts = Template.bind({});
32
- OrderContacts.args = {
33
- summary: false,
34
- };
35
-
36
- export const OrderContactsRequiredFields = Template.bind({});
37
- OrderContactsRequiredFields.args = {
38
- summary: false,
39
- requiredFields: [
40
- "email",
41
- "phone1",
42
- "street",
43
- "streetNr",
44
- "firstName",
45
- "lastName",
46
- "companyName",
47
- "zip",
48
- "city",
49
- ]
50
- };
51
-
52
- export const OrderContactsWithBilling = Template.bind({});
53
- OrderContactsWithBilling.args = {
54
- summary: false,
55
- withPayment: true,
56
-
57
- };
58
-
59
- export const OrderContactsView = Template.bind({});
60
- OrderContactsView.args = {
61
- summary: true,
62
- orderContact: {
63
- firstName: 'Peter',
64
- lastName: 'Musterman',
65
- street: 'Musterstrasse',
66
- streetNr: '34a',
67
- zip: '6041',
68
- city: 'Gent',
69
- phone1: '0221/9923443',
70
- mobil: '0175/9923443',
71
- email: 'peter@muster.be'
72
- },
73
- billingContact: {
74
- firstName: 'Peter',
75
- lastName: 'Billing',
76
- street: 'Billinggäßchen',
77
- streetNr: '12',
78
- zip: '6039',
79
- city: 'Gent'
80
- }
81
- };
82
-
83
- export const OrderContactsPrepared = Template.bind({});
84
- OrderContactsPrepared.args = {
85
- summary: false,
86
- orderContact: {
87
- firstName: 'Peter',
88
- lastName: 'Musterman',
89
- street: 'Musterstrasse',
90
- streetNr: '34a',
91
- zip: '6041',
92
- city: 'Gent',
93
- phone1: '+49123 123456',
94
- email: 'peter@muster.be'
95
- },
96
- billingContact: {
97
- firstName: 'Peter',
98
- lastName: 'Billing',
99
- street: 'Billinggäßchen',
100
- streetNr: '12',
101
- zip: '6039',
102
- city: 'Gent'
103
- }
104
- };
105
-
@@ -1,103 +0,0 @@
1
- import { html } from 'lit';
2
- import '../pd-order-summary.js';
3
-
4
- export default {
5
- title: 'PdOrder/Order Summary',
6
- component: 'pd-order-summary',
7
- argTypes: {},
8
- };
9
-
10
- const agb = html`
11
- <h1>AGB</h1>
12
- <p>Text zu der Einleitung der AGBs.</p>
13
- <h2>Sub Title</h2>
14
- <p>Text zu der Einleitung der AGBs.</p>
15
- <h3>Detail Punkt</h3>
16
- <p>Text zu der Einleitung der AGBs.</p>
17
- `;
18
-
19
- function Template({ orderContact, billingContact }) {
20
- const heatingData = [
21
- { name: 'Period:', val: '24 maanden' },
22
- { name: 'Brand:', val: 'Bosch' },
23
- { name: 'Type:', val: '--' },
24
- { name: 'House age:', val: '> 10 Years' },
25
- { name: 'Description:', val: 'Heating is defect, not warm' },
26
- ];
27
- return html`
28
- <pd-order-summary
29
- id="testSummaryId"
30
- withAgreement
31
- withPayment
32
- .order="${{
33
- contacts: { orderContact, billingContact },
34
- priceData: {
35
- tax: 0.1,
36
- articles: [
37
- {
38
- name: 'Maintenance Bronze (heating support for 2 years)',
39
- price: 123.5,
40
- },
41
- ],
42
- },
43
- zip: 9060,
44
- selectedDate: new Date(Date.now()),
45
- }}"
46
- .orderSteps="${[
47
- { key: 'booking', name: 'Date' },
48
- { key: 'heating', name: 'Heating', data: heatingData },
49
- { key: 'contacts', name: 'Address' },
50
- ]}"
51
- >
52
- <span slot="legal">${agb}</span>
53
- </pd-order-summary>
54
-
55
- <h2>Test Validation</h2>
56
- <button
57
- @click="${() => {
58
- document.getElementById('testSummaryId').validateInput();
59
- }}"
60
- >
61
- Test Validate
62
- </button>
63
- `;
64
- }
65
-
66
- export const OrderSummary = Template.bind({});
67
- OrderSummary.args = {
68
- orderContact: {
69
- firstName: 'Peter',
70
- lastName: 'Musterman',
71
- street: 'Musterstrasse',
72
- streetNr: '34a',
73
- zip: '6041',
74
- city: 'Gent',
75
- phone: '0221/9923443',
76
- mobil: '0175/9923443',
77
- email: 'peter@muster.be',
78
- },
79
- billingContact: {
80
- firstName: 'Peter',
81
- lastName: 'Billing',
82
- street: 'Billinggäßchen',
83
- streetNr: '12',
84
- zip: '6039',
85
- city: 'Gent',
86
- },
87
- };
88
-
89
- export const OrderSummaryEmptyBilling = Template.bind({});
90
- OrderSummaryEmptyBilling.args = {
91
- summary: true,
92
- orderContact: {
93
- firstName: 'Peter',
94
- lastName: 'Musterman',
95
- street: 'Musterstrasse',
96
- streetNr: '34a',
97
- zip: '6041',
98
- city: 'Gent',
99
- phone: '0221/9923443',
100
- mobil: '0175/9923443',
101
- email: 'peter@muster.be',
102
- },
103
- };
package/vite.config.js DELETED
@@ -1,25 +0,0 @@
1
- import { defineConfig } from 'vite';
2
- import { dependencies } from './package.json';
3
-
4
- export default defineConfig({
5
- build: {
6
- lib: {
7
- entry: {
8
- 'pd-order-contacts': './pd-order-contacts.js',
9
- 'pd-order-summary': './pd-order-summary.js',
10
- },
11
- formats: ['es'], // Nur ESModule, kein UMD
12
- },
13
- rollupOptions: {
14
- external: Object.keys(dependencies), // Alle Abhängigkeiten aus package.json ausschließen
15
- output: {
16
- entryFileNames: '[name].js', // Keine Hashes, klare Dateinamen
17
- chunkFileNames: '[name]-chunk.js', // Benenne Chunks klar und konsistent
18
- globals: {
19
- lit: 'Lit',
20
- },
21
- },
22
- },
23
- minify: false, // Keine Minifizierung
24
- },
25
- });