@progressive-development/pd-spa-helper 1.0.2 → 1.2.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.
@@ -1,7 +1,8 @@
1
1
  import { LitElement, CSSResultGroup } from 'lit';
2
2
  /**
3
3
  * Map of section IDs to their DOM element references.
4
- * Keys must match the `sec` property in MenuElement configuration.
4
+ * Keys are free-form section identifiers; when a MenuElement uses the same
5
+ * string as its `sec` value, the framework wires the menu ref accordingly.
5
6
  */
6
7
  export type SectionRefs = Record<string, HTMLElement | null | undefined>;
7
8
  /**
@@ -10,21 +11,21 @@ export type SectionRefs = Record<string, HTMLElement | null | undefined>;
10
11
  */
11
12
  export type SectionActions = Record<string, () => any>;
12
13
  /**
13
- * Configuration for menu sections.
14
- * Returned by _getMenuSections() to register section elements with the menu.
14
+ * Configuration returned by _getSections() to register section elements
15
+ * with the framework's section registry.
15
16
  */
16
17
  export interface SectionConfig {
17
- /** Page name - should match the route name in NavigationConfig */
18
- name: string;
19
- /** Map of section IDs to element references (keys match MenuElement.sec) */
20
- menuRefs: SectionRefs;
21
- /** Optional: Map of section IDs to action creators (dispatched when section becomes visible) */
18
+ /** Route/page name must match the NavigationPage.name this page renders under */
19
+ pageName: string;
20
+ /** Map of section IDs to element references */
21
+ sections: SectionRefs;
22
+ /** Optional: section IDs action creators (fired once on section visibility) */
22
23
  sectionActions?: SectionActions;
23
24
  }
24
25
  /**
25
26
  * Abstract base class for pages with section-based scroll navigation.
26
27
  *
27
- * Subclasses must implement _getMenuSections() to provide section references.
28
+ * Subclasses must implement _getSections() to provide section references.
28
29
  */
29
30
  export declare abstract class PdSectionPage extends LitElement {
30
31
  /**
@@ -41,13 +42,13 @@ export declare abstract class PdSectionPage extends LitElement {
41
42
  static styles: CSSResultGroup;
42
43
  /**
43
44
  * Must be implemented by subclass to provide section configuration.
44
- * Called in firstUpdated() to register sections with the menu.
45
+ * Called in firstUpdated() to register sections with the framework.
45
46
  *
46
47
  * @returns SectionConfig with page name and section element references
47
48
  */
48
- protected abstract _getMenuSections(): SectionConfig;
49
+ protected abstract _getSections(): SectionConfig;
49
50
  /**
50
- * Dispatches init-menu-sections event to register section elements.
51
+ * Dispatches pd-spa:register-sections event to register section elements.
51
52
  * Subclasses can override but should call super.firstUpdated().
52
53
  */
53
54
  firstUpdated(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"PdSectionPage.d.ts","sourceRoot":"","sources":["../../../src/components/pd-section-page/PdSectionPage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EAAE,UAAU,EAAO,cAAc,EAAE,MAAM,KAAK,CAAC;AAEtD;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;AAEzE;;;GAGG;AAEH,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,CAAC,CAAC;AAEvD;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,kEAAkE;IAClE,IAAI,EAAE,MAAM,CAAC;IACb,4EAA4E;IAC5E,QAAQ,EAAE,WAAW,CAAC;IACtB,gGAAgG;IAChG,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AAED;;;;GAIG;AACH,8BAAsB,aAAc,SAAQ,UAAU;IACpD;;;;;;;;;;OAUG;IACH,MAAM,CAAC,MAAM,EAAE,cAAc,CAI3B;IAEF;;;;;OAKG;IACH,SAAS,CAAC,QAAQ,CAAC,gBAAgB,IAAI,aAAa;IAEpD;;;OAGG;IACM,YAAY,IAAI,IAAI;CAS9B"}
1
+ {"version":3,"file":"PdSectionPage.d.ts","sourceRoot":"","sources":["../../../src/components/pd-section-page/PdSectionPage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EAAE,UAAU,EAAO,cAAc,EAAE,MAAM,KAAK,CAAC;AAEtD;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;AAEzE;;;GAGG;AAEH,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,CAAC,CAAC;AAEvD;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,mFAAmF;IACnF,QAAQ,EAAE,MAAM,CAAC;IACjB,+CAA+C;IAC/C,QAAQ,EAAE,WAAW,CAAC;IACtB,iFAAiF;IACjF,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AAED;;;;GAIG;AACH,8BAAsB,aAAc,SAAQ,UAAU;IACpD;;;;;;;;;;OAUG;IACH,MAAM,CAAC,MAAM,EAAE,cAAc,CAI3B;IAEF;;;;;OAKG;IACH,SAAS,CAAC,QAAQ,CAAC,YAAY,IAAI,aAAa;IAEhD;;;OAGG;IACM,YAAY,IAAI,IAAI;CAS9B"}
@@ -20,13 +20,13 @@ class PdSectionPage extends LitElement {
20
20
  `;
21
21
  }
22
22
  /**
23
- * Dispatches init-menu-sections event to register section elements.
23
+ * Dispatches pd-spa:register-sections event to register section elements.
24
24
  * Subclasses can override but should call super.firstUpdated().
25
25
  */
26
26
  firstUpdated() {
27
27
  this.dispatchEvent(
28
- new CustomEvent("init-menu-sections", {
29
- detail: this._getMenuSections(),
28
+ new CustomEvent("pd-spa:register-sections", {
29
+ detail: this._getSections(),
30
30
  bubbles: true,
31
31
  composed: true
32
32
  })
@@ -67,7 +67,7 @@ export declare abstract class PdSpaHelper extends LitElement {
67
67
  * Prevents the "teaser appears then collapses" visual glitch.
68
68
  */
69
69
  private _skipTeaserTransition;
70
- /** Pending section ID for navigate-and-scroll (stored until init-menu-sections fires) */
70
+ /** Pending section ID for navigate-and-scroll (stored until the target page registers its sections) */
71
71
  private _pendingScrollSectionId;
72
72
  /** Currently selected locale - must be implemented by subclass */
73
73
  abstract _selectedLocale: string;
@@ -80,7 +80,13 @@ export declare abstract class PdSpaHelper extends LitElement {
80
80
  private _subscription?;
81
81
  /** Track previous auth state to detect real transitions (not initial load) */
82
82
  private _previousAuthState;
83
- /** Map of section IDs to action creator functions */
83
+ /**
84
+ * Per-page map of section ID → DOM element.
85
+ * Single source of truth for section-scroll navigation; populated when a
86
+ * page dispatches pd-spa:register-sections and cleared on route leave.
87
+ */
88
+ private _sectionRegistry;
89
+ /** Map of section IDs to action creator functions (fired once per session on section activation) */
84
90
  private _sectionActions;
85
91
  static styles: CSSResultGroup;
86
92
  constructor();
@@ -163,16 +169,15 @@ export declare abstract class PdSpaHelper extends LitElement {
163
169
  */
164
170
  protected _handlePdAction(e: CustomEvent<PdActionEventDetail>): void;
165
171
  /**
166
- * Scroll to a section by its ID on the current page.
167
- * Uses the existing menu-ref mechanism from init-menu-sections.
172
+ * Scroll to a section by its ID on the current page. O(1) registry lookup;
173
+ * works for any registered section regardless of menu membership.
168
174
  *
169
- * TODO: Navigate-and-scroll for sections on other pages is not yet supported
170
- * via pd-action. Currently only scrolls if the section is on the current page.
171
- * For cross-page section navigation, the calling code should use route-event
172
- * with { route, sectionId } directly — same mechanism pd-menu uses.
175
+ * Cross-page navigate-and-scroll uses `route-event` with `{ route, sectionId }`
176
+ * (same mechanism pd-menu uses) `_pendingScrollSectionId` is applied once
177
+ * the target page dispatches pd-spa:register-sections.
173
178
  */
174
179
  protected _navigateToSection(sectionId: string): void;
175
- private _handleInitMenuSections;
180
+ private _handleRegisterSections;
176
181
  /**
177
182
  * Handle section-activated event from pd-menu.
178
183
  * Dispatches the registered action for a section (once per session).
@@ -188,9 +193,5 @@ export declare abstract class PdSpaHelper extends LitElement {
188
193
  * Scroll to a section element. Collapses teaser if expanded.
189
194
  */
190
195
  private _scrollToSection;
191
- /**
192
- * Find section element by sectionId from current page's menu refs.
193
- */
194
- private _findSectionElement;
195
196
  }
196
197
  //# sourceMappingURL=PdSpaHelper.d.ts.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IAAI,OAAO;IAMlD;;;;OAIG;IACH,SAAS,CAAC,iBAAiB,IAAI,OAAO;IAItC;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,wBAAwB,IAAI,cAAc;IAQpD,OAAO,CAAC,iBAAiB;IAgBzB,OAAO,CAAC,iBAAiB;IAqBzB;;;;;;;OAOG;IACH,SAAS,CAAC,eAAe,CAAC,CAAC,EAAE,WAAW,CAAC,mBAAmB,CAAC,GAAG,IAAI;IAYpE;;;;;;;OAOG;IACH,SAAS,CAAC,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAOrD,OAAO,CAAC,uBAAuB;IA+C/B;;;OAGG;IACH,OAAO,CAAC,uBAAuB;IAS/B,OAAO,CAAC,mBAAmB;IAQ3B,OAAO,CAAC,qBAAqB;IAW7B,OAAO,CAAC,qBAAqB;IA4D7B,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,yBAAyB;IAIjC,OAAO,CAAC,eAAe;IAKvB;;OAEG;IACH,OAAO,CAAC,gBAAgB;CAUzB"}
@@ -71,7 +71,7 @@ class PdSpaHelper extends LitElement {
71
71
  this._query = {};
72
72
  this.teaserCollapsed = false;
73
73
  this._skipTeaserTransition = false;
74
- /** Pending section ID for navigate-and-scroll (stored until init-menu-sections fires) */
74
+ /** Pending section ID for navigate-and-scroll (stored until the target page registers its sections) */
75
75
  this._pendingScrollSectionId = null;
76
76
  this._claims = {};
77
77
  /** Whether to show locale selector in single menu only */
@@ -79,9 +79,15 @@ class PdSpaHelper extends LitElement {
79
79
  /** Track previous auth state to detect real transitions (not initial load) */
80
80
  this._previousAuthState = "unknown";
81
81
  // ---------------------------------------------------------------------------
82
- // Section Actions (lazy loading via section visibility)
82
+ // Section Registry
83
83
  // ---------------------------------------------------------------------------
84
- /** Map of section IDs to action creator functions */
84
+ /**
85
+ * Per-page map of section ID → DOM element.
86
+ * Single source of truth for section-scroll navigation; populated when a
87
+ * page dispatches pd-spa:register-sections and cleared on route leave.
88
+ */
89
+ this._sectionRegistry = /* @__PURE__ */ new Map();
90
+ /** Map of section IDs to action creator functions (fired once per session on section activation) */
85
91
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
86
92
  this._sectionActions = /* @__PURE__ */ new Map();
87
93
  setRouteElement(this);
@@ -158,15 +164,23 @@ class PdSpaHelper extends LitElement {
158
164
  connectedCallback() {
159
165
  super.connectedCallback();
160
166
  pdRouterService.onRouteChange(({ route, params, query }) => {
161
- const isRouteChange = route !== this._route;
167
+ const previousRoute = this._route;
168
+ const isRouteChange = route !== previousRoute;
162
169
  const isLoginModal = route === "login";
163
170
  if (isRouteChange && !isLoginModal) {
164
171
  this.scrollController.scrollToTop();
165
172
  }
173
+ if (isRouteChange && !isLoginModal && previousRoute) {
174
+ this._sectionRegistry.delete(previousRoute);
175
+ }
166
176
  this._route = route;
167
177
  this._params = params;
168
178
  this._query = query;
169
179
  });
180
+ this.addEventListener(
181
+ SPA_EVENTS.REGISTER_SECTIONS,
182
+ this._handleRegisterSections
183
+ );
170
184
  this._subscription = pdStore().select(getLoadingSelector).subscribe((loadingState) => {
171
185
  this._loadingState = loadingState;
172
186
  });
@@ -186,6 +200,10 @@ class PdSpaHelper extends LitElement {
186
200
  SPA_EVENTS.APP_CONFIG,
187
201
  this._handleAppConfigEvent
188
202
  );
203
+ this.removeEventListener(
204
+ SPA_EVENTS.REGISTER_SECTIONS,
205
+ this._handleRegisterSections
206
+ );
189
207
  this.removeEventListener(
190
208
  "section-activated",
191
209
  this._handleSectionActivated
@@ -240,10 +258,7 @@ class PdSpaHelper extends LitElement {
240
258
  ${this._renderSiteHeader(pageConf, showTeaser)}
241
259
  </header>`}
242
260
 
243
- <main
244
- class="${this._getMainClass(pageConf)}"
245
- @init-menu-sections="${this._handleInitMenuSections}"
246
- >
261
+ <main class="${this._getMainClass(pageConf)}">
247
262
  ${this._loadingState.map(
248
263
  (ls) => html`<pd-loading-state
249
264
  .loadingState="${ls}"
@@ -421,38 +436,41 @@ class PdSpaHelper extends LitElement {
421
436
  }
422
437
  }
423
438
  /**
424
- * Scroll to a section by its ID on the current page.
425
- * Uses the existing menu-ref mechanism from init-menu-sections.
439
+ * Scroll to a section by its ID on the current page. O(1) registry lookup;
440
+ * works for any registered section regardless of menu membership.
426
441
  *
427
- * TODO: Navigate-and-scroll for sections on other pages is not yet supported
428
- * via pd-action. Currently only scrolls if the section is on the current page.
429
- * For cross-page section navigation, the calling code should use route-event
430
- * with { route, sectionId } directly — same mechanism pd-menu uses.
442
+ * Cross-page navigate-and-scroll uses `route-event` with `{ route, sectionId }`
443
+ * (same mechanism pd-menu uses) `_pendingScrollSectionId` is applied once
444
+ * the target page dispatches pd-spa:register-sections.
431
445
  */
432
446
  _navigateToSection(sectionId) {
433
- const element = this._findSectionElement(sectionId);
447
+ const element = this._sectionRegistry.get(this._route)?.get(sectionId);
434
448
  if (element) {
435
449
  this._scrollToSection(element);
436
450
  }
437
451
  }
438
- _handleInitMenuSections(e) {
439
- const pageConf = spaConfig.getNavigationPage(this._route);
452
+ _handleRegisterSections(e) {
453
+ const { pageName, sections, sectionActions } = e.detail;
454
+ const pageMap = /* @__PURE__ */ new Map();
455
+ for (const [id, el] of Object.entries(sections)) {
456
+ if (el) pageMap.set(id, el);
457
+ }
458
+ this._sectionRegistry.set(pageName, pageMap);
459
+ const pageConf = spaConfig.getNavigationPage(pageName);
440
460
  if (pageConf?.menu) {
441
461
  pageConf.menu = pageConf.menu.map((menuElement) => ({
442
462
  ...menuElement,
443
- ref: menuElement.sec ? e.detail.menuRefs[menuElement.sec] ?? void 0 : void 0
463
+ ref: menuElement.sec ? pageMap.get(menuElement.sec) : void 0
444
464
  }));
445
465
  this.requestUpdate();
446
466
  }
447
- if (e.detail.sectionActions) {
448
- for (const [sectionId, actionCreator] of Object.entries(
449
- e.detail.sectionActions
450
- )) {
467
+ if (sectionActions) {
468
+ for (const [sectionId, actionCreator] of Object.entries(sectionActions)) {
451
469
  this._sectionActions.set(sectionId, actionCreator);
452
470
  }
453
471
  }
454
- if (this._pendingScrollSectionId) {
455
- const element = this._findSectionElement(this._pendingScrollSectionId);
472
+ if (this._pendingScrollSectionId && pageName === this._route) {
473
+ const element = pageMap.get(this._pendingScrollSectionId);
456
474
  if (element) {
457
475
  requestAnimationFrame(() => {
458
476
  this._scrollToSection(element);
@@ -550,17 +568,6 @@ class PdSpaHelper extends LitElement {
550
568
  }
551
569
  element.scrollIntoView({ behavior: "smooth", block: "start" });
552
570
  }
553
- /**
554
- * Find section element by sectionId from current page's menu refs.
555
- */
556
- _findSectionElement(sectionId) {
557
- const pageConf = spaConfig.getNavigationPage(this._route);
558
- if (!pageConf?.menu) return null;
559
- const menuItem = pageConf.menu.find(
560
- (item) => item.sec === sectionId
561
- );
562
- return menuItem?.ref ?? null;
563
- }
564
571
  // ---------------------------------------------------------------------------
565
572
  // Responsive Handling
566
573
  // ---------------------------------------------------------------------------
@@ -14,8 +14,8 @@ export declare const SPA_EVENTS: {
14
14
  readonly LOGIN_SUCCESS: "pd-spa:login-success";
15
15
  /** Fired when locale changes */
16
16
  readonly LOCALE_CHANGE: "pd-spa:locale-change";
17
- /** Fired to initialize menu sections */
18
- readonly INIT_MENU_SECTIONS: "pd-spa:init-menu-sections";
17
+ /** Fired by pages to register their sections with the framework. */
18
+ readonly REGISTER_SECTIONS: "pd-spa:register-sections";
19
19
  /** Fired to request app configuration */
20
20
  readonly APP_CONFIG: "pd-spa:app-config";
21
21
  };
@@ -57,11 +57,17 @@ export interface LocaleChangeEventDetail {
57
57
  previousLocale?: string;
58
58
  }
59
59
  /**
60
- * Detail for menu section initialization
61
- */
62
- export interface MenuSectionsEventDetail {
63
- /** Map of section IDs to element references (keys match MenuElement.sec) */
64
- menuRefs: Record<string, HTMLElement | null | undefined>;
60
+ * Detail for section registration events dispatched by pages on firstUpdated.
61
+ * Pages advertise their sections; the framework maintains a per-page registry
62
+ * used for both menu-ref propagation and direct section-scroll navigation.
63
+ */
64
+ export interface RegisterSectionsEventDetail {
65
+ /** Route name this page is registering for (must match NavigationPage.name) */
66
+ pageName: string;
67
+ /** Map of section IDs to element references (keys may match MenuElement.sec) */
68
+ sections: Record<string, HTMLElement | null | undefined>;
69
+ /** Optional: action creators dispatched once per section on first visibility */
70
+ sectionActions?: Record<string, () => any>;
65
71
  }
66
72
  /**
67
73
  * Detail for login success events
@@ -102,7 +108,7 @@ export interface SpaEventMap {
102
108
  [SPA_EVENTS.ROUTE]: RouteEventDetail;
103
109
  [SPA_EVENTS.LOGIN_SUCCESS]: LoginSuccessEventDetail;
104
110
  [SPA_EVENTS.LOCALE_CHANGE]: LocaleChangeEventDetail;
105
- [SPA_EVENTS.INIT_MENU_SECTIONS]: MenuSectionsEventDetail;
111
+ [SPA_EVENTS.REGISTER_SECTIONS]: RegisterSectionsEventDetail;
106
112
  [SPA_EVENTS.APP_CONFIG]: AppConfigEventDetail;
107
113
  }
108
114
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"spa-events.d.ts","sourceRoot":"","sources":["../../../src/components/pd-spa-helper/spa-events.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAMrC;;;GAGG;AACH,eAAO,MAAM,UAAU;IACrB,8CAA8C;;IAG9C,yCAAyC;;IAGzC,kCAAkC;;IAGlC,sCAAsC;;IAGtC,gCAAgC;;IAGhC,wCAAwC;;IAGxC,yCAAyC;;CAEjC,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAMxE;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAErD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,+DAA+D;IAC/D,OAAO,EAAE,MAAM,GAAG,cAAc,CAAC;IAEjC,wBAAwB;IACxB,IAAI,EAAE,SAAS,CAAC;IAEhB,4DAA4D;IAC5D,QAA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1
1
  const SPA_EVENTS = {
2
2
  /** Fired when the SPA has been initialized */
3
3
  INIT: "pd-spa:init",
4
+ /** Fired by pages to register their sections with the framework. */
5
+ REGISTER_SECTIONS: "pd-spa:register-sections",
4
6
  /** Fired to request app configuration */
5
7
  APP_CONFIG: "pd-spa:app-config"
6
8
  };
@@ -0,0 +1,98 @@
1
+ export declare const templates: {
2
+ "pd.form.field.checkRequired": string;
3
+ "pd.form.field.invalid.mail": string;
4
+ "pd.form.field.invalid.number": string;
5
+ "pd.form.field.invalid.phone": string;
6
+ "pd.form.field.invalid.vat": string;
7
+ "pd.form.field.rangeRequired": string;
8
+ "pd.form.field.required": string;
9
+ "pd.form.field.selectRequired": string;
10
+ "pd.form.required.missing": string;
11
+ "pd.form.required.valid": string;
12
+ s512f37f2dba563ec: import('@lit/localize').StrResult;
13
+ s8a355eeb33f58c5f: import('@lit/localize').StrResult;
14
+ "pd.suggestion.box.load.data": string;
15
+ "pd.suggestion.box.error.txt": string;
16
+ "pd.suggestion.box.add.new": import('@lit/localize').StrResult;
17
+ "pd.moreInfo.less": string;
18
+ "pd.moreInfo.more": string;
19
+ "pdContent.loadingstate.ariaLabel": string;
20
+ "pdContent.loadingstate.ariaLoading": string;
21
+ "pdContent.loadingstate.pleaseWait": string;
22
+ "pdContent.loadingstate.syncState": string;
23
+ "pd.edit.content.edit": string;
24
+ "pd.panel.viewer.aria.label": string;
25
+ "pd.panel.viewer.prev": string;
26
+ "pd.panel.viewer.next": string;
27
+ "pd.panel.viewer.progress": string;
28
+ "pd.panel.viewer.panel": string;
29
+ "pd.contactus.address.email": string;
30
+ "pd.contactus.address.message": string;
31
+ "pd.contactus.address.name": string;
32
+ "pd.contactus.address.phone": string;
33
+ "pd.contactus.address.send": string;
34
+ "pd.contactus.address.title": string;
35
+ "pd.contactus.title": string;
36
+ "pd.login.email.label": string;
37
+ "pd.login.forgot.back": string;
38
+ "pd.login.forgot.info": string;
39
+ "pd.login.forgot.password": string;
40
+ "pd.login.forgot.submit": string;
41
+ "pd.login.password.label": string;
42
+ "pd.login.submit": string;
43
+ "pdPage.toast.ariaClose": string;
44
+ "pd.footer.nav.aria": string;
45
+ "pd.menu.nav.aria": string;
46
+ "pd.menu.locale.aria": string;
47
+ "pd.menu.burger.aria": string;
48
+ "pd.socialmedia.aria.label": string;
49
+ "pd.socialmedia.empty": string;
50
+ "pd.socialmedia.new.entry": string;
51
+ "pd.socialmedia.placeholder": string;
52
+ "pd.socialmedia.delete": string;
53
+ "pd.socialmedia.cancel": string;
54
+ "pd.socialmedia.save": string;
55
+ "pd.wizard.button.back": string;
56
+ "pd.wizard.button.next": string;
57
+ "pd.wizard.button.send": string;
58
+ "pd.wizard.close.aria": string;
59
+ "pdWizard.close.popup.cancel": string;
60
+ "pdWizard.close.popup.noStorage.content": string;
61
+ "pdWizard.close.popup.ok": string;
62
+ "pdWizard.close.popup.storage.content": string;
63
+ "pdWizard.close.popup.title": string;
64
+ "pdWizard.reload.popup.cancel": string;
65
+ "pdWizard.reload.popup.lastModified": string;
66
+ "pdWizard.reload.popup.ok": string;
67
+ "pdWizard.reload.popup.title": string;
68
+ "pdWizard.storage.close.popup.cancel": string;
69
+ "pdWizard.storage.close.popup.ok": string;
70
+ "pd.steps.aria.label": string;
71
+ "pd.steps.aria.passed": import('@lit/localize').StrResult;
72
+ "pd.steps.aria.current": import('@lit/localize').StrResult;
73
+ "pd.steps.aria.pending": import('@lit/localize').StrResult;
74
+ "pdWizard.reload.popup.warning": string;
75
+ "pd.order.contacts.billingContact.inputHeader": string;
76
+ "pd.order.contacts.orderContact.inputHeader": string;
77
+ "pd.order.contacts.propertyContact.checkBox": string;
78
+ "pd.order.summary.agree.link1": string;
79
+ "pd.order.summary.agree.link2": string;
80
+ "pd.order.summary.agree.required": string;
81
+ "pd.order.summary.billing": string;
82
+ "pd.order.summary.title": string;
83
+ sa84bab91f8a49fe3: string;
84
+ s1d1be881bd7dd5f6: string;
85
+ s6c2e8c3fd63326fa: string;
86
+ s6cfee04ec1ab2f22: string;
87
+ se253c48907431e1f: string;
88
+ sa9bdcc9d5a643bb8: string;
89
+ sec4bd3f10d0782bd: string;
90
+ se52f82757214a82b: string;
91
+ sdd2fffdf86bf5b6e: string;
92
+ s5c9229e6891b5b83: string;
93
+ se1b4ea2cbb1f9bb4: string;
94
+ s3be4da85df39b1c2: string;
95
+ "pd.submit.dialog.closeStay": string;
96
+ "pd.submit.dialog.startPage": string;
97
+ };
98
+ //# sourceMappingURL=be-wrapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"be-wrapper.d.ts","sourceRoot":"","sources":["../../../src/generated/locale-wrapper/be-wrapper.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQrB,CAAC"}
@@ -0,0 +1,98 @@
1
+ export declare const templates: {
2
+ "pd.form.field.required": string;
3
+ "pd.form.field.selectRequired": string;
4
+ "pd.form.field.checkRequired": string;
5
+ "pd.form.field.rangeRequired": string;
6
+ "pd.form.field.invalid.mail": string;
7
+ "pd.form.field.invalid.phone": string;
8
+ "pd.form.field.invalid.vat": string;
9
+ "pd.form.field.invalid.number": string;
10
+ "pd.form.required.valid": string;
11
+ "pd.form.required.missing": string;
12
+ s8a355eeb33f58c5f: import('@lit/localize').StrResult;
13
+ s512f37f2dba563ec: import('@lit/localize').StrResult;
14
+ "pd.suggestion.box.load.data": string;
15
+ "pd.suggestion.box.error.txt": string;
16
+ "pd.suggestion.box.add.new": import('@lit/localize').StrResult;
17
+ "pd.edit.content.edit": string;
18
+ "pd.moreInfo.more": string;
19
+ "pd.moreInfo.less": string;
20
+ "pd.panel.viewer.aria.label": string;
21
+ "pd.panel.viewer.prev": string;
22
+ "pd.panel.viewer.next": string;
23
+ "pd.panel.viewer.progress": string;
24
+ "pd.panel.viewer.panel": string;
25
+ "pdContent.loadingstate.ariaLabel": string;
26
+ "pdContent.loadingstate.ariaLoading": string;
27
+ "pdContent.loadingstate.syncState": string;
28
+ "pdContent.loadingstate.pleaseWait": string;
29
+ "pd.contactus.title": string;
30
+ "pd.contactus.address.title": string;
31
+ "pd.contactus.address.name": string;
32
+ "pd.contactus.address.email": string;
33
+ "pd.contactus.address.phone": string;
34
+ "pd.contactus.address.message": string;
35
+ "pd.contactus.address.send": string;
36
+ "pd.footer.nav.aria": string;
37
+ "pd.login.email.label": string;
38
+ "pd.login.password.label": string;
39
+ "pd.login.forgot.password": string;
40
+ "pd.login.submit": string;
41
+ "pd.login.forgot.info": string;
42
+ "pd.login.forgot.back": string;
43
+ "pd.login.forgot.submit": string;
44
+ "pd.menu.nav.aria": string;
45
+ "pd.menu.locale.aria": string;
46
+ "pd.menu.burger.aria": string;
47
+ "pd.socialmedia.aria.label": string;
48
+ "pd.socialmedia.empty": string;
49
+ "pd.socialmedia.new.entry": string;
50
+ "pd.socialmedia.placeholder": string;
51
+ "pd.socialmedia.delete": string;
52
+ "pd.socialmedia.cancel": string;
53
+ "pd.socialmedia.save": string;
54
+ "pdPage.toast.ariaClose": string;
55
+ "pd.steps.aria.label": string;
56
+ "pd.steps.aria.passed": import('@lit/localize').StrResult;
57
+ "pd.steps.aria.current": import('@lit/localize').StrResult;
58
+ "pd.steps.aria.pending": import('@lit/localize').StrResult;
59
+ "pd.wizard.close.aria": string;
60
+ "pd.wizard.button.back": string;
61
+ "pd.wizard.button.next": string;
62
+ "pd.wizard.button.send": string;
63
+ "pdWizard.reload.popup.title": string;
64
+ "pdWizard.reload.popup.lastModified": string;
65
+ "pdWizard.reload.popup.warning": string;
66
+ "pdWizard.close.popup.title": string;
67
+ "pdWizard.close.popup.storage.content": string;
68
+ "pdWizard.close.popup.noStorage.content": string;
69
+ "pdWizard.storage.close.popup.ok": string;
70
+ "pdWizard.storage.close.popup.cancel": string;
71
+ "pdWizard.close.popup.ok": string;
72
+ "pdWizard.close.popup.cancel": string;
73
+ "pdWizard.reload.popup.ok": string;
74
+ "pdWizard.reload.popup.cancel": string;
75
+ "pd.order.contacts.orderContact.inputHeader": string;
76
+ "pd.order.contacts.billingContact.inputHeader": string;
77
+ sa84bab91f8a49fe3: string;
78
+ s1d1be881bd7dd5f6: string;
79
+ s6c2e8c3fd63326fa: string;
80
+ "pd.order.contacts.propertyContact.checkBox": string;
81
+ s6cfee04ec1ab2f22: string;
82
+ se253c48907431e1f: string;
83
+ sa9bdcc9d5a643bb8: string;
84
+ sec4bd3f10d0782bd: string;
85
+ se52f82757214a82b: string;
86
+ sdd2fffdf86bf5b6e: string;
87
+ s5c9229e6891b5b83: string;
88
+ se1b4ea2cbb1f9bb4: string;
89
+ s3be4da85df39b1c2: string;
90
+ "pd.order.summary.title": string;
91
+ "pd.order.summary.billing": string;
92
+ "pd.order.summary.agree.required": string;
93
+ "pd.order.summary.agree.link1": string;
94
+ "pd.order.summary.agree.link2": string;
95
+ "pd.submit.dialog.closeStay": string;
96
+ "pd.submit.dialog.startPage": string;
97
+ };
98
+ //# sourceMappingURL=de-wrapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"de-wrapper.d.ts","sourceRoot":"","sources":["../../../src/generated/locale-wrapper/de-wrapper.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQrB,CAAC"}
@@ -0,0 +1,98 @@
1
+ export declare const templates: {
2
+ "pd.form.field.checkRequired": string;
3
+ "pd.form.field.invalid.mail": string;
4
+ "pd.form.field.invalid.number": string;
5
+ "pd.form.field.invalid.phone": string;
6
+ "pd.form.field.invalid.vat": string;
7
+ "pd.form.field.rangeRequired": string;
8
+ "pd.form.field.required": string;
9
+ "pd.form.field.selectRequired": string;
10
+ "pd.form.required.missing": string;
11
+ "pd.form.required.valid": string;
12
+ s512f37f2dba563ec: import('@lit/localize').StrResult;
13
+ s8a355eeb33f58c5f: import('@lit/localize').StrResult;
14
+ "pd.suggestion.box.load.data": string;
15
+ "pd.suggestion.box.error.txt": string;
16
+ "pd.suggestion.box.add.new": import('@lit/localize').StrResult;
17
+ "pd.moreInfo.less": string;
18
+ "pd.moreInfo.more": string;
19
+ "pdContent.loadingstate.ariaLabel": string;
20
+ "pdContent.loadingstate.ariaLoading": string;
21
+ "pdContent.loadingstate.pleaseWait": string;
22
+ "pdContent.loadingstate.syncState": string;
23
+ "pd.edit.content.edit": string;
24
+ "pd.panel.viewer.aria.label": string;
25
+ "pd.panel.viewer.prev": string;
26
+ "pd.panel.viewer.next": string;
27
+ "pd.panel.viewer.progress": string;
28
+ "pd.panel.viewer.panel": string;
29
+ "pd.contactus.address.email": string;
30
+ "pd.contactus.address.message": string;
31
+ "pd.contactus.address.name": string;
32
+ "pd.contactus.address.phone": string;
33
+ "pd.contactus.address.send": string;
34
+ "pd.contactus.address.title": string;
35
+ "pd.contactus.title": string;
36
+ "pd.login.email.label": string;
37
+ "pd.login.forgot.back": string;
38
+ "pd.login.forgot.info": string;
39
+ "pd.login.forgot.password": string;
40
+ "pd.login.forgot.submit": string;
41
+ "pd.login.password.label": string;
42
+ "pd.login.submit": string;
43
+ "pdPage.toast.ariaClose": string;
44
+ "pd.footer.nav.aria": string;
45
+ "pd.menu.nav.aria": string;
46
+ "pd.menu.locale.aria": string;
47
+ "pd.menu.burger.aria": string;
48
+ "pd.socialmedia.aria.label": string;
49
+ "pd.socialmedia.empty": string;
50
+ "pd.socialmedia.new.entry": string;
51
+ "pd.socialmedia.placeholder": string;
52
+ "pd.socialmedia.delete": string;
53
+ "pd.socialmedia.cancel": string;
54
+ "pd.socialmedia.save": string;
55
+ "pd.wizard.button.back": string;
56
+ "pd.wizard.button.next": string;
57
+ "pd.wizard.button.send": string;
58
+ "pd.wizard.close.aria": string;
59
+ "pdWizard.close.popup.cancel": string;
60
+ "pdWizard.close.popup.noStorage.content": string;
61
+ "pdWizard.close.popup.ok": string;
62
+ "pdWizard.close.popup.storage.content": string;
63
+ "pdWizard.close.popup.title": string;
64
+ "pdWizard.reload.popup.cancel": string;
65
+ "pdWizard.reload.popup.lastModified": string;
66
+ "pdWizard.reload.popup.ok": string;
67
+ "pdWizard.reload.popup.title": string;
68
+ "pdWizard.reload.popup.warning": string;
69
+ "pdWizard.storage.close.popup.cancel": string;
70
+ "pdWizard.storage.close.popup.ok": string;
71
+ "pd.steps.aria.label": string;
72
+ "pd.steps.aria.passed": import('@lit/localize').StrResult;
73
+ "pd.steps.aria.current": import('@lit/localize').StrResult;
74
+ "pd.steps.aria.pending": import('@lit/localize').StrResult;
75
+ "pd.order.contacts.billingContact.inputHeader": string;
76
+ "pd.order.contacts.orderContact.inputHeader": string;
77
+ "pd.order.contacts.propertyContact.checkBox": string;
78
+ "pd.order.summary.agree.link1": string;
79
+ "pd.order.summary.agree.link2": string;
80
+ "pd.order.summary.agree.required": string;
81
+ "pd.order.summary.billing": string;
82
+ "pd.order.summary.title": string;
83
+ sa84bab91f8a49fe3: string;
84
+ s1d1be881bd7dd5f6: string;
85
+ s6c2e8c3fd63326fa: string;
86
+ s6cfee04ec1ab2f22: string;
87
+ se253c48907431e1f: string;
88
+ sa9bdcc9d5a643bb8: string;
89
+ sec4bd3f10d0782bd: string;
90
+ se52f82757214a82b: string;
91
+ sdd2fffdf86bf5b6e: string;
92
+ s5c9229e6891b5b83: string;
93
+ se1b4ea2cbb1f9bb4: string;
94
+ s3be4da85df39b1c2: string;
95
+ "pd.submit.dialog.closeStay": string;
96
+ "pd.submit.dialog.startPage": string;
97
+ };
98
+ //# sourceMappingURL=en-wrapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"en-wrapper.d.ts","sourceRoot":"","sources":["../../../src/generated/locale-wrapper/en-wrapper.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQrB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { createLogger as createLogger$1 } from '@progressive-development/pd-utils';
2
2
 
3
3
  const isValidLevel = (level) => ["debug", "info", "warn", "error"].includes(level);
4
- const ENV_LOG_LEVEL = "debug";
4
+ const ENV_LOG_LEVEL = undefined ;
5
5
  const IS_DEV = false;
6
6
  const defaultOptions = {
7
7
  level: isValidLevel(ENV_LOG_LEVEL) ? ENV_LOG_LEVEL : "info",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progressive-development/pd-spa-helper",
3
- "version": "1.0.2",
3
+ "version": "1.2.0",
4
4
  "description": "Webcomponent pd-spa-helper following open-wc recommendations",
5
5
  "author": "PD Progressive Development",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -30,16 +30,16 @@
30
30
  "ts-action-operators": "^9.1.2",
31
31
  "universal-router": "^10.0.0",
32
32
  "tslib": "^2.8.1",
33
- "@progressive-development/pd-provider-interfaces": "1.0.1",
34
- "@progressive-development/pd-model": "1.2.4",
35
- "@progressive-development/pd-content": "1.1.4",
36
33
  "@progressive-development/pd-icon": "1.1.4",
34
+ "@progressive-development/pd-order": "1.1.8",
37
35
  "@progressive-development/pd-dialog": "1.1.4",
38
- "@progressive-development/pd-forms": "1.1.4",
39
- "@progressive-development/pd-page": "1.2.2",
36
+ "@progressive-development/pd-page": "1.3.0",
37
+ "@progressive-development/pd-provider-interfaces": "1.0.1",
38
+ "@progressive-development/pd-wizard": "1.1.4",
40
39
  "@progressive-development/pd-utils": "1.1.4",
41
- "@progressive-development/pd-order": "1.1.8",
42
- "@progressive-development/pd-wizard": "1.1.4"
40
+ "@progressive-development/pd-content": "1.1.4",
41
+ "@progressive-development/pd-forms": "1.1.4",
42
+ "@progressive-development/pd-model": "1.2.4"
43
43
  },
44
44
  "customElements": "custom-elements.json",
45
45
  "keywords": [