@kickstartds/ds-agency-premium 1.6.71--canary.50.2251.0 → 1.6.71--canary.50.2257.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/{BlogPostProps-6b3cff22.d.ts → BlogPostProps-d60aba86.d.ts} +1 -1
- package/dist/SectionProps-d60aba86.d.ts +1 -1
- package/dist/SplitEvenProps-789f8508.d.ts +1 -1
- package/dist/SplitWeightedProps-789f8508.d.ts +1 -1
- package/dist/components/blog-aside/index.d.ts +1 -1
- package/dist/components/blog-overview/index.d.ts +1 -1
- package/dist/components/blog-post/index.d.ts +1 -1
- package/dist/components/image-story/index.d.ts +1 -1
- package/dist/components/index/index.d.ts +3 -3
- package/dist/components/page/index.d.ts +1 -1
- package/dist/components/page-wrapper/tokens.css +1 -1
- package/dist/components/search-form/SearchForm.client.d.ts +1 -0
- package/dist/components/search-form/SearchForm.client.js +30 -9
- package/dist/components/search-form/SearchFormPagefind.client.js +21 -12
- package/dist/components/search-form/index.js +2 -1
- package/dist/components/search-modal/index.js +1 -0
- package/dist/tokens/themes.css +4 -4
- package/dist/tokens/tokens.css +1 -1
- package/dist/tokens/tokens.js +1 -1
- package/package.json +1 -1
- /package/dist/{BlogAsideProps-c760fd2a.d.ts → BlogAsideProps-fb0241df.d.ts} +0 -0
- /package/dist/{BlogOverviewProps-9f207f1c.d.ts → BlogOverviewProps-d60aba86.d.ts} +0 -0
- /package/dist/{ImageStoryProps-e853e1e7.d.ts → ImageStoryProps-4e2b2ecf.d.ts} +0 -0
- /package/dist/{PageProps-aa29c554.d.ts → PageProps-d60aba86.d.ts} +0 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* and run json-schema-to-typescript to regenerate this file.
|
|
5
5
|
*/
|
|
6
6
|
import { BlogHeadProps } from "./BlogHeadProps-c04a5ed8.js";
|
|
7
|
-
import { BlogAsideProps } from "./BlogAsideProps-
|
|
7
|
+
import { BlogAsideProps } from "./BlogAsideProps-fb0241df.js";
|
|
8
8
|
import { SectionProps } from "./SectionProps-d60aba86.js";
|
|
9
9
|
import { CtaProps } from "./CtaProps-789f8508.js";
|
|
10
10
|
import { SeoProps } from "./SeoProps-f2d6dcaa.js";
|
|
@@ -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-
|
|
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-
|
|
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-
|
|
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,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { HTMLAttributes } from "react";
|
|
3
|
-
import { BlogAsideProps } from "../../BlogAsideProps-
|
|
3
|
+
import { BlogAsideProps } from "../../BlogAsideProps-fb0241df.js";
|
|
4
4
|
declare const BlogAsideContextDefault: import("react").ForwardRefExoticComponent<BlogAsideProps & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
5
|
declare const BlogAsideContext: import("react").Context<import("react").ForwardRefExoticComponent<BlogAsideProps & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>>;
|
|
6
6
|
declare const BlogAside: import("react").ForwardRefExoticComponent<BlogAsideProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BlogOverviewProps } from "../../BlogOverviewProps-
|
|
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-
|
|
1
|
+
import { BlogPostProps } from "../../BlogPostProps-d60aba86.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-
|
|
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-
|
|
33
|
-
export * from "../../BlogOverviewProps-
|
|
34
|
-
export * from "../../PageProps-
|
|
32
|
+
export * from "../../BlogPostProps-d60aba86.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,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,16 +27,28 @@ const renderResult = (result, element) => {
|
|
|
26
27
|
if (result.image) {
|
|
27
28
|
const image = $("[data-result-image]");
|
|
28
29
|
if (image)
|
|
29
|
-
image.
|
|
30
|
+
image.src = result.image;
|
|
30
31
|
}
|
|
31
32
|
};
|
|
33
|
+
const limitSubResults = (subResults, limit) => {
|
|
34
|
+
if (subResults.length <= limit)
|
|
35
|
+
return subResults;
|
|
36
|
+
const topUrls = [...subResults]
|
|
37
|
+
.sort((a, b) => b.locations.length - a.locations.length)
|
|
38
|
+
.slice(0, limit)
|
|
39
|
+
.map((r) => r.url);
|
|
40
|
+
return subResults.filter((r) => topUrls.includes(r.url));
|
|
41
|
+
};
|
|
32
42
|
class SearchForm extends Component {
|
|
33
43
|
constructor(element) {
|
|
34
44
|
super(element);
|
|
45
|
+
this.lazyResults = new WeakMap();
|
|
35
46
|
this.$searchInput = this.$(".dsa-search-bar__input");
|
|
36
47
|
this.$resultTemplate = this.$("[data-template=result]");
|
|
37
48
|
this.$subresultTemplate = this.$("[data-template=subresult]");
|
|
38
49
|
this.$results = this.$(".dsa-search-form__results");
|
|
50
|
+
const rawSubResultsLimit = Number(element.dataset.maxSubresults);
|
|
51
|
+
const subResultsLimit = isNaN(rawSubResultsLimit) ? 3 : rawSubResultsLimit;
|
|
39
52
|
this.on(element, "submit", (event) => {
|
|
40
53
|
event.preventDefault();
|
|
41
54
|
const url = new URL(element.getAttribute("action") || "", window.location);
|
|
@@ -46,6 +59,21 @@ class SearchForm extends Component {
|
|
|
46
59
|
this.on(window, "hashchange", (event) => {
|
|
47
60
|
window._ks.radio.emit("dsa.search-form.hashchange");
|
|
48
61
|
});
|
|
62
|
+
this.onRadio(events.beforeunveil, async (_, el) => {
|
|
63
|
+
if (this.lazyResults.has(el)) {
|
|
64
|
+
const lazyResult = this.lazyResults.get(el);
|
|
65
|
+
const result = await lazyResult();
|
|
66
|
+
renderResult(result, el);
|
|
67
|
+
const $subResults = this.$("[data-result-subresults]", el);
|
|
68
|
+
const subResults = limitSubResults(result.subResults, subResultsLimit);
|
|
69
|
+
for (const subResult of subResults) {
|
|
70
|
+
const $subResultClone = this.$subresultTemplate.cloneNode(true);
|
|
71
|
+
$subResultClone.setAttribute("href", subResult.url);
|
|
72
|
+
renderResult(subResult, $subResultClone);
|
|
73
|
+
$subResults.appendChild($subResultClone);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
});
|
|
49
77
|
}
|
|
50
78
|
clearResults() {
|
|
51
79
|
this.$results.textContent = "";
|
|
@@ -53,14 +81,7 @@ class SearchForm extends Component {
|
|
|
53
81
|
showResults(results) {
|
|
54
82
|
for (const result of results) {
|
|
55
83
|
const $resultClone = this.$resultTemplate.cloneNode(true);
|
|
56
|
-
|
|
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
|
-
}
|
|
84
|
+
this.lazyResults.set($resultClone, result);
|
|
64
85
|
this.$results.appendChild($resultClone);
|
|
65
86
|
}
|
|
66
87
|
}
|
|
@@ -1,7 +1,26 @@
|
|
|
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 = ({ sub_results, ...result }) => {
|
|
7
|
+
const hasRootSubResult = sub_results?.[0]?.url === (result.meta.url || result.url);
|
|
8
|
+
const subResults = hasRootSubResult
|
|
9
|
+
? sub_results.slice(1)
|
|
10
|
+
: sub_results || [];
|
|
11
|
+
return {
|
|
12
|
+
title: result.meta.title,
|
|
13
|
+
url: result.meta.url || result.url,
|
|
14
|
+
excerpt: result.excerpt,
|
|
15
|
+
image: result.meta.image,
|
|
16
|
+
subResults: subResults.map((subResult) => ({
|
|
17
|
+
title: subResult.title,
|
|
18
|
+
url: subResult.url,
|
|
19
|
+
excerpt: subResult.excerpt,
|
|
20
|
+
locations: subResult.locations,
|
|
21
|
+
})),
|
|
22
|
+
};
|
|
23
|
+
};
|
|
5
24
|
class SearchFormPagefind extends SearchForm {
|
|
6
25
|
constructor(element) {
|
|
7
26
|
super(element);
|
|
@@ -16,19 +35,9 @@ class SearchFormPagefind extends SearchForm {
|
|
|
16
35
|
if (search) {
|
|
17
36
|
if (search.results.length) {
|
|
18
37
|
// TODO: Pagination / Load More
|
|
19
|
-
const results =
|
|
38
|
+
const results = search.results.map((result) => () => result.data().then(pagefindResult2searchResult));
|
|
20
39
|
this.clearResults();
|
|
21
|
-
this.showResults(results
|
|
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
|
-
})));
|
|
40
|
+
this.showResults(results);
|
|
32
41
|
}
|
|
33
42
|
}
|
|
34
43
|
}
|
|
@@ -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,
|
package/dist/tokens/themes.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on Fri, 05 Sep 2025
|
|
3
|
+
* Generated on Fri, 05 Sep 2025 13:51:29 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
|
|
2730
|
+
* Generated on Fri, 05 Sep 2025 13:51:33 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
|
|
5461
|
+
* Generated on Fri, 05 Sep 2025 13:51:31 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
|
|
8462
|
+
* Generated on Fri, 05 Sep 2025 13:51:36 GMT
|
|
8463
8463
|
*/
|
|
8464
8464
|
:root [ks-theme=telekom] {
|
|
8465
8465
|
--ks-background-color-accent-base: var(--ks-color-primary-to-bg-8-base);
|
package/dist/tokens/tokens.css
CHANGED
package/dist/tokens/tokens.js
CHANGED
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|