@progressive-development/pd-page 0.6.3 → 0.6.5

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 +1 @@
1
- {"version":3,"file":"pd-contact-us.d.ts","sourceRoot":"","sources":["../src/pd-contact-us.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAa,cAAc,EAAE,MAAM,KAAK,CAAC;AAI5D,OAAO,6CAA6C,CAAC;AACrD,OAAO,qDAAqD,CAAC;AAC7D,OAAO,+CAA+C,CAAC;AACvD,OAAO,4CAA4C,CAAC;AACpD,OAAO,iDAAiD,CAAC;AACzD,OAAO,gDAAgD,CAAC;AAMxD,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE;;;;GAIG;AACH,qBAEa,WAAY,SAAQ,UAAU;IACzC;;OAEG;IAEH,OAAO,EAAE,aAAa,CAAM;IAE5B,OAAgB,MAAM,EAAE,cAAc,CAsEpC;IAEF,MAAM;IAwFN,KAAK,IAAI,IAAI;IAOb,OAAO,CAAC,SAAS;CA0BlB"}
1
+ {"version":3,"file":"pd-contact-us.d.ts","sourceRoot":"","sources":["../src/pd-contact-us.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAa,cAAc,EAAE,MAAM,KAAK,CAAC;AAS5D,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,wDAAwD,CAAC;AAChE,OAAO,qDAAqD,CAAC;AAC7D,OAAO,+CAA+C,CAAC;AACvD,OAAO,4CAA4C,CAAC;AACpD,OAAO,iDAAiD,CAAC;AACzD,OAAO,gDAAgD,CAAC;AAIxD;;;;GAIG;AACH,qBAEa,WAAY,SAAQ,UAAU;IACzC;;OAEG;IAEH,OAAO,EAAE,aAAa,CAAM;IAE5B,OAAgB,MAAM,EAAE,cAAc,CAsEpC;IAEF,MAAM;IAgGN,KAAK,IAAI,IAAI;IAOb,OAAO,CAAC,SAAS;CAclB"}
@@ -1,13 +1,14 @@
1
1
  import { css, LitElement, html } from "lit";
2
2
  import { localized, msg } from "@lit/localize";
3
3
  import { property, customElement } from "lit/decorators.js";
4
- import "@progressive-development/pd-forms/pd-button";
4
+ import { PdColorStyles, PdFontStyles } from "@progressive-development/pd-shared-styles";
5
+ import "@progressive-development/pd-forms/pd-icon-panel-button";
5
6
  import "@progressive-development/pd-forms/pd-form-container";
6
7
  import "@progressive-development/pd-forms/pd-form-row";
7
8
  import "@progressive-development/pd-forms/pd-input";
8
9
  import "@progressive-development/pd-forms/pd-input-area";
9
10
  import "@progressive-development/pd-contact/pd-contact";
10
- import { PdColorStyles, PdFontStyles } from "@progressive-development/pd-shared-styles";
11
+ import { pdIcons } from "@progressive-development/pd-icon";
11
12
  var __defProp = Object.defineProperty;
12
13
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
13
14
  var __decorateClass = (decorators, target, key, kind) => {
@@ -27,6 +28,7 @@ let PdContactUs = class extends LitElement {
27
28
  return html`
28
29
  <div class="content-block">
29
30
  <h2>${msg("Kontakt", { id: "pd.contactus.title" })}</h2>
31
+
30
32
  <div class="contact-block">
31
33
  <div class="left-content">
32
34
  <pd-contact
@@ -45,6 +47,8 @@ let PdContactUs = class extends LitElement {
45
47
  <pd-input
46
48
  id="nameInputId"
47
49
  class="quarter3"
50
+ minlength="3"
51
+ maxlength="100"
48
52
  placeHolder="${msg("Name", {
49
53
  id: "pd.contactus.address.name"
50
54
  })}"
@@ -61,10 +65,10 @@ let PdContactUs = class extends LitElement {
61
65
  placeHolder="${msg("Email", {
62
66
  id: "pd.contactus.address.email"
63
67
  })}"
64
- valueName="mail"
68
+ valueName="email"
65
69
  autoCompleteName="email"
66
70
  name="email"
67
- field-type="mail"
71
+ fieldType="mail"
68
72
  required
69
73
  ></pd-input>
70
74
  </pd-form-row>
@@ -77,7 +81,7 @@ let PdContactUs = class extends LitElement {
77
81
  id: "pd.contactus.address.phone"
78
82
  })}"
79
83
  valueName="phone"
80
- field-type="phone"
84
+ fieldType="phone"
81
85
  autoCompleteName="tel"
82
86
  required
83
87
  ></pd-input>
@@ -87,22 +91,27 @@ let PdContactUs = class extends LitElement {
87
91
  <pd-input-area
88
92
  id="msgInputId"
89
93
  class="quarter3-area"
94
+ minlength="6"
95
+ maxlength="500"
90
96
  placeHolder="${msg("Nachricht", {
91
97
  id: "pd.contactus.address.message"
92
98
  })}"
93
- rows="15"
99
+ rows="8"
94
100
  required
95
- valueName="msg"
101
+ valueName="msg1"
96
102
  ></pd-input-area>
97
103
  </pd-form-row>
98
104
 
99
105
  <pd-form-row>
100
- <pd-button
106
+ <pd-icon-panel-button
101
107
  class="quarter3"
102
- text="${msg("Absenden", { id: "pd.contactus.address.send" })}"
108
+ pdButtonIcon="${pdIcons.ICON_MAIL}"
109
+ buttonText="${msg("Absenden", {
110
+ id: "pd.contactus.address.send"
111
+ })}"
103
112
  @click="${this._sendMail}"
104
113
  primary
105
- ></pd-button>
114
+ ></pd-icon-panel-button>
106
115
  </pd-form-row>
107
116
  </pd-form-container>
108
117
  </div>
@@ -118,21 +127,19 @@ let PdContactUs = class extends LitElement {
118
127
  (_l = (_k = (_j = this.shadowRoot) == null ? void 0 : _j.getElementById("msgInputId")) == null ? void 0 : _k["clear"]) == null ? void 0 : _l.call(_k);
119
128
  }
120
129
  _sendMail() {
121
- var _a, _b, _c, _d, _e, _f, _g, _h, _i;
122
- const detail = { errorMap: /* @__PURE__ */ new Map() };
123
- const form = (_a = this.shadowRoot) == null ? void 0 : _a.getElementById("contactFormId");
124
- form == null ? void 0 : form.dispatchEvent(new CustomEvent("validate-form", { detail }));
125
- if (detail.errorMap.size === 0) {
126
- const name = (_c = (_b = this.shadowRoot) == null ? void 0 : _b.getElementById("nameInputId")) == null ? void 0 : _c.value;
127
- const email = (_e = (_d = this.shadowRoot) == null ? void 0 : _d.getElementById("mailInputId")) == null ? void 0 : _e.value;
128
- const phone = (_g = (_f = this.shadowRoot) == null ? void 0 : _f.getElementById("phoneInputId")) == null ? void 0 : _g.value;
129
- const msg1 = (_i = (_h = this.shadowRoot) == null ? void 0 : _h.getElementById("msgInputId")) == null ? void 0 : _i.value;
130
- this.dispatchEvent(
131
- new CustomEvent("send-contact-request", {
132
- detail: { msgObj: { name, email, phone, msg1 } }
133
- })
134
- );
135
- }
130
+ var _a;
131
+ const form = (_a = this.shadowRoot) == null ? void 0 : _a.getElementById(
132
+ "contactFormId"
133
+ );
134
+ form.triggerValidate().then((result) => {
135
+ if (result) {
136
+ this.dispatchEvent(
137
+ new CustomEvent("send-contact-request", {
138
+ detail: { msgObj: form.getValues() }
139
+ })
140
+ );
141
+ }
142
+ });
136
143
  }
137
144
  };
138
145
  PdContactUs.styles = [
package/dist/pd-footer.js CHANGED
@@ -19,10 +19,11 @@ let PdFooter = class extends LitElement {
19
19
  this.footerLinks = [];
20
20
  }
21
21
  render() {
22
+ var _a;
22
23
  return html`
23
24
  <div class="footer-links">
24
25
  <ul>
25
- ${this.footerLinks.map(
26
+ ${(_a = this.footerLinks) == null ? void 0 : _a.map(
26
27
  (link) => html`
27
28
  <li>
28
29
  <a @click=${this._footerLinkClicked} data-link=${link.key}
@@ -55,9 +56,10 @@ let PdFooter = class extends LitElement {
55
56
  }
56
57
  }
57
58
  _footerLinkClicked(e) {
59
+ var _a;
58
60
  const target = e.currentTarget;
59
61
  const linkKey = target.dataset.link;
60
- const linkObj = this.footerLinks.find((fl) => fl.key === linkKey);
62
+ const linkObj = (_a = this.footerLinks) == null ? void 0 : _a.find((fl) => fl.key === linkKey);
61
63
  if (linkObj) {
62
64
  this.dispatchEvent(
63
65
  new CustomEvent("footer-link", {
package/dist/pd-menu.d.ts CHANGED
@@ -17,6 +17,10 @@ export declare class PdMenu extends LitElement {
17
17
  * Aktuell ausgewählte Sprache
18
18
  */
19
19
  selectedLocale: string;
20
+ /**
21
+ * Aktuell ausgewählte Sprache
22
+ */
23
+ logoRoute?: string;
20
24
  /**
21
25
  * Liste verfügbarer Sprachen
22
26
  */
@@ -1 +1 @@
1
- {"version":3,"file":"pd-menu.d.ts","sourceRoot":"","sources":["../src/pd-menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,cAAc,EAAE,MAAM,KAAK,CAAC;AAW5D,OAAO,0CAA0C,CAAC;AAElD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;;;;GAOG;AACH,qBACa,MAAO,SAAQ,UAAU;IACpC;;OAEG;IAEH,WAAW,SAAM;IAEjB;;OAEG;IAEH,cAAc,SAAM;IAEpB;;OAEG;IAEH,OAAO,EAAE,MAAM,EAAE,CAAM;IAEvB;;OAEG;IAEH,SAAS,EAAE,UAAU,EAAE,CAAM;IAE7B;;OAEG;IAEH,YAAY,EAAE,UAAU,EAAE,CAAM;IAEhC;;OAEG;IAEH,YAAY,UAAS;IAErB;;OAEG;IAEH,UAAU,SAAK;IAEf;;OAEG;IAEH,OAAO,CAAC,eAAe,CAAK;IAE5B;;OAEG;IAEH,OAAO,CAAC,iBAAiB,CAAS;IAElC;;OAEG;IAEH,OAAO,CAAC,iBAAiB,CAAS;IAElC;;OAEG;IAEH,OAAO,CAAC,YAAY,CAAS;IAE7B,OAAgB,MAAM,EAAE,cAAc,CA0PpC;IAEF,SAAS,CAAC,YAAY;IAmCtB,MAAM;IAqEN,OAAO,CAAC,YAAY;IAiCpB,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,sBAAsB;IAI9B,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,gBAAgB;IA8BxB,OAAO,CAAC,YAAY;IAWpB,OAAO,CAAC,MAAM,CAAC,YAAY;CAG5B"}
1
+ {"version":3,"file":"pd-menu.d.ts","sourceRoot":"","sources":["../src/pd-menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,cAAc,EAAE,MAAM,KAAK,CAAC;AAY5D,OAAO,0CAA0C,CAAC;AAElD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;;;;GAOG;AACH,qBACa,MAAO,SAAQ,UAAU;IACpC;;OAEG;IAEH,WAAW,SAAM;IAEjB;;OAEG;IAEH,cAAc,SAAM;IAEpB;;OAEG;IAEH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IAEH,OAAO,EAAE,MAAM,EAAE,CAAM;IAEvB;;OAEG;IAEH,SAAS,EAAE,UAAU,EAAE,CAAM;IAE7B;;OAEG;IAEH,YAAY,EAAE,UAAU,EAAE,CAAM;IAEhC;;OAEG;IAEH,YAAY,UAAS;IAErB;;OAEG;IAEH,UAAU,SAAK;IAEf;;OAEG;IAEH,OAAO,CAAC,eAAe,CAAK;IAE5B;;OAEG;IAEH,OAAO,CAAC,iBAAiB,CAAS;IAElC;;OAEG;IAEH,OAAO,CAAC,iBAAiB,CAAS;IAElC;;OAEG;IAEH,OAAO,CAAC,YAAY,CAAS;IAE7B,OAAgB,MAAM,EAAE,cAAc,CA0PpC;IAEF,SAAS,CAAC,YAAY;IAmCtB,MAAM;IAqEN,OAAO,CAAC,YAAY;IAiCpB,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,sBAAsB;IAI9B,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,gBAAgB;IA8BxB,OAAO,CAAC,YAAY;IAgBpB,OAAO,CAAC,MAAM,CAAC,YAAY;CAG5B"}
package/dist/pd-menu.js CHANGED
@@ -179,13 +179,17 @@ let PdMenu = class extends LitElement {
179
179
  }
180
180
  _logoClicked() {
181
181
  PdMenu._scrollToTop();
182
- this.dispatchEvent(
183
- new CustomEvent("route-event", {
184
- detail: { route: "/" },
185
- bubbles: true,
186
- composed: true
187
- })
188
- );
182
+ if (this.logoRoute) {
183
+ this.dispatchEvent(
184
+ new CustomEvent("route-event", {
185
+ detail: {
186
+ route: this.logoRoute
187
+ },
188
+ bubbles: true,
189
+ composed: true
190
+ })
191
+ );
192
+ }
189
193
  }
190
194
  static _scrollToTop() {
191
195
  window.scrollTo({ top: 0, behavior: "smooth" });
@@ -448,6 +452,9 @@ __decorateClass([
448
452
  __decorateClass([
449
453
  property({ type: String })
450
454
  ], PdMenu.prototype, "selectedLocale", 2);
455
+ __decorateClass([
456
+ property({ type: String })
457
+ ], PdMenu.prototype, "logoRoute", 2);
451
458
  __decorateClass([
452
459
  property({ type: Array })
453
460
  ], PdMenu.prototype, "locales", 2);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progressive-development/pd-page",
3
- "version": "0.6.3",
3
+ "version": "0.6.5",
4
4
  "description": "Progressive development page helper, teaser, menu, footer.",
5
5
  "author": "PD Progressive Development",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -41,11 +41,11 @@
41
41
  },
42
42
  "dependencies": {
43
43
  "@lit/localize": "^0.12.2",
44
- "@progressive-development/pd-contact": "^0.6.3",
45
- "@progressive-development/pd-dialog": "^0.6.2",
46
- "@progressive-development/pd-forms": "^0.6.4",
47
- "@progressive-development/pd-icon": "^0.6.1",
48
- "@progressive-development/pd-shared-styles": "^0.2.1",
44
+ "@progressive-development/pd-contact": "^0.6.6",
45
+ "@progressive-development/pd-dialog": "^0.6.4",
46
+ "@progressive-development/pd-forms": "^0.6.14",
47
+ "@progressive-development/pd-icon": "^0.7.3",
48
+ "@progressive-development/pd-shared-styles": "^0.2.4",
49
49
  "lit": "^3.3.0",
50
50
  "pwa-helpers": "^0.9.1"
51
51
  },