@kickstartds/ds-agency-premium 1.6.71--canary.50.2251.0 → 1.6.71--canary.50.2253.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.
@@ -3,7 +3,7 @@
3
3
  * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
4
4
  * and run json-schema-to-typescript to regenerate this file.
5
5
  */
6
- import { SectionProps } from "./SectionProps-d60aba86.js";
6
+ import { SectionProps } from "./SectionProps-4e2b2ecf.js";
7
7
  import { BlogTeaserProps } from "./BlogTeaserProps-f5855e93.js";
8
8
  import { CtaProps } from "./CtaProps-789f8508.js";
9
9
  import { SeoProps } from "./SeoProps-f2d6dcaa.js";
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import { BlogHeadProps } from "./BlogHeadProps-c04a5ed8.js";
7
7
  import { BlogAsideProps } from "./BlogAsideProps-c760fd2a.js";
8
- import { SectionProps } from "./SectionProps-d60aba86.js";
8
+ import { SectionProps } from "./SectionProps-4e2b2ecf.js";
9
9
  import { CtaProps } from "./CtaProps-789f8508.js";
10
10
  import { SeoProps } from "./SeoProps-f2d6dcaa.js";
11
11
  /**
@@ -3,7 +3,7 @@
3
3
  * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
4
4
  * and run json-schema-to-typescript to regenerate this file.
5
5
  */
6
- import { SectionProps } from "./SectionProps-d60aba86.js";
6
+ import { SectionProps } from "./SectionProps-4e2b2ecf.js";
7
7
  import { SeoProps } from "./SeoProps-f2d6dcaa.js";
8
8
  /**
9
9
  * Collection of sections (with their contents) to render on the page
@@ -13,7 +13,7 @@ import { FeaturesProps } from "./FeaturesProps-a9041d97.js";
13
13
  import { GalleryProps } from "./GalleryProps-76e7de44.js";
14
14
  import { HeroProps } from "./HeroProps-fec6b267.js";
15
15
  import { HtmlProps } from "./HtmlProps-9d091769.js";
16
- import { ImageStoryProps } from "./ImageStoryProps-e853e1e7.js";
16
+ import { ImageStoryProps } from "./ImageStoryProps-4e2b2ecf.js";
17
17
  import { ImageTextProps } from "./ImageTextProps-9286cca4.js";
18
18
  import { LogosProps } from "./LogosProps-f9474fe2.js";
19
19
  import { MosaicProps } from "./MosaicProps-d52c7151.js";
@@ -10,7 +10,7 @@ import { FeaturesProps } from "./FeaturesProps-a9041d97.js";
10
10
  import { GalleryProps } from "./GalleryProps-76e7de44.js";
11
11
  import { HeroProps } from "./HeroProps-fec6b267.js";
12
12
  import { HtmlProps } from "./HtmlProps-9d091769.js";
13
- import { ImageStoryProps } from "./ImageStoryProps-e853e1e7.js";
13
+ import { ImageStoryProps } from "./ImageStoryProps-4e2b2ecf.js";
14
14
  import { ImageTextProps } from "./ImageTextProps-9286cca4.js";
15
15
  import { LogosProps } from "./LogosProps-f9474fe2.js";
16
16
  import { MosaicProps } from "./MosaicProps-d52c7151.js";
@@ -10,7 +10,7 @@ import { FeaturesProps } from "./FeaturesProps-a9041d97.js";
10
10
  import { GalleryProps } from "./GalleryProps-76e7de44.js";
11
11
  import { HeroProps } from "./HeroProps-fec6b267.js";
12
12
  import { HtmlProps } from "./HtmlProps-9d091769.js";
13
- import { ImageStoryProps } from "./ImageStoryProps-e853e1e7.js";
13
+ import { ImageStoryProps } from "./ImageStoryProps-4e2b2ecf.js";
14
14
  import { ImageTextProps } from "./ImageTextProps-9286cca4.js";
15
15
  import { LogosProps } from "./LogosProps-f9474fe2.js";
16
16
  import { MosaicProps } from "./MosaicProps-d52c7151.js";
@@ -1,4 +1,4 @@
1
- import { BlogOverviewProps } from "../../BlogOverviewProps-9f207f1c.js";
1
+ import { BlogOverviewProps } from "../../BlogOverviewProps-d60aba86.js";
2
2
  import { FC, PropsWithChildren } from "react";
3
3
  declare const BlogOverview: FC<PropsWithChildren<BlogOverviewProps>>;
4
4
  export type { BlogOverviewProps };
@@ -1,4 +1,4 @@
1
- import { BlogPostProps } from "../../BlogPostProps-6b3cff22.js";
1
+ import { BlogPostProps } from "../../BlogPostProps-c760fd2a.js";
2
2
  import { FC, PropsWithChildren } from "react";
3
3
  declare const BlogPost: FC<PropsWithChildren<BlogPostProps>>;
4
4
  export type { BlogPostProps };
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { HTMLAttributes } from "react";
3
- import { ImageStoryProps } from "../../ImageStoryProps-e853e1e7.js";
3
+ import { ImageStoryProps } from "../../ImageStoryProps-4e2b2ecf.js";
4
4
  declare const ImageStoryContextDefault: import("react").ForwardRefExoticComponent<ImageStoryProps & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
5
5
  declare const ImageStoryContext: import("react").Context<import("react").ForwardRefExoticComponent<ImageStoryProps & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>>;
6
6
  declare const ImageStory: import("react").ForwardRefExoticComponent<ImageStoryProps & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
@@ -29,8 +29,8 @@ interface SettingsProps {
29
29
  seo: SeoProps;
30
30
  iconSprite?: IconSprite;
31
31
  }
32
- export * from "../../BlogPostProps-6b3cff22.js";
33
- export * from "../../BlogOverviewProps-9f207f1c.js";
34
- export * from "../../PageProps-aa29c554.js";
32
+ export * from "../../BlogPostProps-c760fd2a.js";
33
+ export * from "../../BlogOverviewProps-d60aba86.js";
34
+ export * from "../../PageProps-d60aba86.js";
35
35
  export { IconSprite, SettingsProps };
36
36
  export * from "../../EventDetailProps-42a7eebe.js";
@@ -1,4 +1,4 @@
1
- import { PageProps } from "../../PageProps-aa29c554.js";
1
+ import { PageProps } from "../../PageProps-d60aba86.js";
2
2
  import { FC, PropsWithChildren } from "react";
3
3
  declare const Page: FC<PropsWithChildren<PageProps>>;
4
4
  export type { PageProps };
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 05 Sep 2025 12:11:42 GMT
3
+ * Generated on Fri, 05 Sep 2025 12:56:39 GMT
4
4
  */
5
5
  :root, [ks-theme] {
6
6
  --ks-background-color-accent-base: var(--ks-color-fg-to-bg-9-base);
@@ -1,6 +1,7 @@
1
1
  declare class SearchForm {
2
2
  static identifier: string;
3
3
  constructor(element: any);
4
+ lazyResults: WeakMap<object, any>;
4
5
  $searchInput: any;
5
6
  $resultTemplate: any;
6
7
  $subresultTemplate: any;
@@ -1,4 +1,5 @@
1
1
  import { define, Component } from '@kickstartds/core/lib/component';
2
+ import { events } from '@kickstartds/core/lib/core';
2
3
 
3
4
  const parser = new DOMParser();
4
5
  const renderResult = (result, element) => {
@@ -26,12 +27,13 @@ const renderResult = (result, element) => {
26
27
  if (result.image) {
27
28
  const image = $("[data-result-image]");
28
29
  if (image)
29
- image.dataset.src = result.image;
30
+ image.src = result.image;
30
31
  }
31
32
  };
32
33
  class SearchForm extends Component {
33
34
  constructor(element) {
34
35
  super(element);
36
+ this.lazyResults = new WeakMap();
35
37
  this.$searchInput = this.$(".dsa-search-bar__input");
36
38
  this.$resultTemplate = this.$("[data-template=result]");
37
39
  this.$subresultTemplate = this.$("[data-template=subresult]");
@@ -46,6 +48,19 @@ class SearchForm extends Component {
46
48
  this.on(window, "hashchange", (event) => {
47
49
  window._ks.radio.emit("dsa.search-form.hashchange");
48
50
  });
51
+ this.onRadio(events.beforeunveil, async (_, el) => {
52
+ if (this.lazyResults.has(el)) {
53
+ const result = await this.lazyResults.get(el);
54
+ renderResult(result, el);
55
+ const $subResults = this.$("[data-result-subresults]", el);
56
+ for (const subResult of result.subResults) {
57
+ const $subResultClone = this.$subresultTemplate.cloneNode(true);
58
+ $subResultClone.setAttribute("href", subResult.url);
59
+ renderResult(subResult, $subResultClone);
60
+ $subResults.appendChild($subResultClone);
61
+ }
62
+ }
63
+ });
49
64
  }
50
65
  clearResults() {
51
66
  this.$results.textContent = "";
@@ -53,14 +68,7 @@ class SearchForm extends Component {
53
68
  showResults(results) {
54
69
  for (const result of results) {
55
70
  const $resultClone = this.$resultTemplate.cloneNode(true);
56
- renderResult(result, $resultClone);
57
- const $subResultsContainer = this.$("[data-result-subresults]", $resultClone);
58
- for (const subResult of result.subResults) {
59
- const $subResultClone = this.$subresultTemplate.cloneNode(true);
60
- $subResultClone.setAttribute("href", subResult.url);
61
- renderResult(subResult, $subResultClone);
62
- $subResultsContainer.appendChild($subResultClone);
63
- }
71
+ this.lazyResults.set($resultClone, result);
64
72
  this.$results.appendChild($resultClone);
65
73
  }
66
74
  }
@@ -1,7 +1,19 @@
1
1
  import { define } from '@kickstartds/core/lib/component';
2
2
  import SearchForm from './SearchForm.client.js';
3
+ import '@kickstartds/core/lib/core';
3
4
 
4
5
  const staticPageFindPath = "/pagefind/pagefind.js";
6
+ const pagefindResult2searchResult = (result) => ({
7
+ title: result.meta.title,
8
+ url: result.url,
9
+ excerpt: result.excerpt,
10
+ image: result.meta.image,
11
+ subResults: (result.sub_results || []).map((subResult) => ({
12
+ title: subResult.title,
13
+ url: subResult.url,
14
+ excerpt: subResult.excerpt,
15
+ })),
16
+ });
5
17
  class SearchFormPagefind extends SearchForm {
6
18
  constructor(element) {
7
19
  super(element);
@@ -16,19 +28,9 @@ class SearchFormPagefind extends SearchForm {
16
28
  if (search) {
17
29
  if (search.results.length) {
18
30
  // TODO: Pagination / Load More
19
- const results = await Promise.all(search.results.map((result) => result.data()));
31
+ const results = search.results.map((result) => result.data().then(pagefindResult2searchResult));
20
32
  this.clearResults();
21
- this.showResults(results.map((result) => ({
22
- title: result.meta.title,
23
- url: result.url,
24
- excerpt: result.excerpt,
25
- image: result.meta.image,
26
- subResults: (result.sub_results || []).map((subResult) => ({
27
- title: subResult.title,
28
- url: subResult.url,
29
- excerpt: subResult.excerpt,
30
- })),
31
- })));
33
+ this.showResults(results);
32
34
  }
33
35
  }
34
36
  }
@@ -15,7 +15,8 @@ import '@kickstartds/base/lib/rich-text';
15
15
  import '@kickstartds/base/lib/picture';
16
16
  import '@kickstartds/core/lib/container';
17
17
  import '@kickstartds/core/lib/component';
18
+ import '@kickstartds/core/lib/core';
18
19
 
19
- const SearchForm = ({ className, component = "dsa.search-form", ...props }) => (jsxs("form", { className: classnames("dsa-search-form", className), "ks-component": component, ...props, children: [jsx(SearchBar, { alternativeText: "", alternativeResult: "", hint: "" }), jsxs("div", { hidden: true, children: [jsx("li", { "data-template": "result", children: jsx(SearchResult, { previewImage: {} }) }), jsx(SearchResultMatch, { "data-template": "subresult" })] }), jsx("ol", { className: "dsa-search-form__results" })] }));
20
+ const SearchForm = ({ className, component = "dsa.search-form", ...props }) => (jsxs("form", { className: classnames("dsa-search-form", className), "ks-component": component, ...props, children: [jsx(SearchBar, { alternativeText: "", alternativeResult: "", hint: "" }), jsxs("div", { hidden: true, children: [jsx("li", { "data-template": "result", className: "lazyload", children: jsx(SearchResult, { previewImage: {} }) }), jsx(SearchResultMatch, { "data-template": "subresult" })] }), jsx("ol", { className: "dsa-search-form__results" })] }));
20
21
 
21
22
  export { SearchForm };
@@ -23,6 +23,7 @@ import '@kickstartds/base/lib/picture';
23
23
  import '@kickstartds/core/lib/container';
24
24
  import '../search-result-match/index.js';
25
25
  import '../search-form/SearchForm.client.js';
26
+ import '@kickstartds/core/lib/core';
26
27
 
27
28
  const SearchModal = ({ headline = "Search", closeAriaLabel = "close", formComponent, }) => (jsx("dialog", { "ks-component": "dsa.search-modal", className: "dsa-search-modal", children: jsx(Section, { headline: {
28
29
  text: headline,
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { HTMLAttributes, FC, PropsWithChildren } from "react";
3
- import { SectionProps } from "../../SectionProps-d60aba86.js";
3
+ import { SectionProps } from "../../SectionProps-4e2b2ecf.js";
4
4
  declare const SectionContextDefault: import("react").ForwardRefExoticComponent<SectionProps & Omit<HTMLAttributes<HTMLElement>, "style" | "content"> & import("react").RefAttributes<HTMLDivElement>>;
5
5
  declare const SectionContext: import("react").Context<import("react").ForwardRefExoticComponent<SectionProps & Omit<HTMLAttributes<HTMLElement>, "style" | "content"> & import("react").RefAttributes<HTMLDivElement>>>;
6
6
  declare const Section: import("react").ForwardRefExoticComponent<SectionProps & Omit<HTMLAttributes<HTMLElement>, "style" | "content"> & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 05 Sep 2025 12:11:44 GMT
3
+ * Generated on Fri, 05 Sep 2025 12:56:41 GMT
4
4
  */
5
5
  :root [ks-theme=business] {
6
6
  --ks-background-color-accent-base: var(--ks-color-primary-to-bg-8-base);
@@ -2727,7 +2727,7 @@
2727
2727
  }
2728
2728
  /**
2729
2729
  * Do not edit directly
2730
- * Generated on Fri, 05 Sep 2025 12:11:48 GMT
2730
+ * Generated on Fri, 05 Sep 2025 12:56:46 GMT
2731
2731
  */
2732
2732
  :root [ks-theme=google] {
2733
2733
  --ks-background-color-accent-base: var(--ks-color-primary-to-bg-8-base);
@@ -5458,7 +5458,7 @@
5458
5458
  }
5459
5459
  /**
5460
5460
  * Do not edit directly
5461
- * Generated on Fri, 05 Sep 2025 12:11:46 GMT
5461
+ * Generated on Fri, 05 Sep 2025 12:56:44 GMT
5462
5462
  */
5463
5463
  :root [ks-theme=ngo] {
5464
5464
  --ks-background-color-accent-base: var(--ks-color-primary-to-bg-8-base);
@@ -8459,7 +8459,7 @@
8459
8459
  }
8460
8460
  /**
8461
8461
  * Do not edit directly
8462
- * Generated on Fri, 05 Sep 2025 12:11:50 GMT
8462
+ * Generated on Fri, 05 Sep 2025 12:56:48 GMT
8463
8463
  */
8464
8464
  :root [ks-theme=telekom] {
8465
8465
  --ks-background-color-accent-base: var(--ks-color-primary-to-bg-8-base);
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 05 Sep 2025 12:11:42 GMT
3
+ * Generated on Fri, 05 Sep 2025 12:56:39 GMT
4
4
  */
5
5
 
6
6
  :root, [ks-theme] {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 05 Sep 2025 12:11:42 GMT
3
+ * Generated on Fri, 05 Sep 2025 12:56:39 GMT
4
4
  */
5
5
 
6
6
  export const KsBackgroundColorAccentBase = "#f3f3f4";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kickstartds/ds-agency-premium",
3
- "version": "1.6.71--canary.50.2251.0",
3
+ "version": "1.6.71--canary.50.2253.0",
4
4
  "description": "",
5
5
  "homepage": "https://github.com/kickstartDS/ds-agency-premium#readme",
6
6
  "bugs": {