@salesforcedevs/dw-components 0.0.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.
Files changed (58) hide show
  1. package/LICENSE +12 -0
  2. package/lwc.config.json +24 -0
  3. package/package.json +26 -0
  4. package/src/modules/dw/blogsGrid/blogsGrid.css +89 -0
  5. package/src/modules/dw/blogsGrid/blogsGrid.html +73 -0
  6. package/src/modules/dw/blogsGrid/blogsGrid.ts +28 -0
  7. package/src/modules/dw/cardBlogPostProvider/cardBlogPostProvider.css +3 -0
  8. package/src/modules/dw/cardBlogPostProvider/cardBlogPostProvider.html +16 -0
  9. package/src/modules/dw/cardBlogPostProvider/cardBlogPostProvider.ts +29 -0
  10. package/src/modules/dw/cardPodcastEpisodeProvider/cardPodcastEpisodeProvider.css +3 -0
  11. package/src/modules/dw/cardPodcastEpisodeProvider/cardPodcastEpisodeProvider.html +12 -0
  12. package/src/modules/dw/cardPodcastEpisodeProvider/cardPodcastEpisodeProvider.ts +29 -0
  13. package/src/modules/dw/codeSamplesGrid/codeSamplesGrid.css +171 -0
  14. package/src/modules/dw/codeSamplesGrid/codeSamplesGrid.html +138 -0
  15. package/src/modules/dw/codeSamplesGrid/codeSamplesGrid.ts +431 -0
  16. package/src/modules/dw/contentArchive/altData.js +3 -0
  17. package/src/modules/dw/contentArchive/contentArchive.css +242 -0
  18. package/src/modules/dw/contentArchive/contentArchive.html +340 -0
  19. package/src/modules/dw/contentArchive/contentArchive.ts +519 -0
  20. package/src/modules/dw/contentArchive/contentArchive.types.ts +98 -0
  21. package/src/modules/dw/contentArchive/utils.ts +193 -0
  22. package/src/modules/dw/deSignupForm/deSignupForm.css +75 -0
  23. package/src/modules/dw/deSignupForm/deSignupForm.html +117 -0
  24. package/src/modules/dw/deSignupForm/deSignupForm.ts +269 -0
  25. package/src/modules/dw/deSignupForm/submitForm.ts +93 -0
  26. package/src/modules/dw/docsGrid/docsGrid.css +83 -0
  27. package/src/modules/dw/docsGrid/docsGrid.html +89 -0
  28. package/src/modules/dw/docsGrid/docsGrid.ts +540 -0
  29. package/src/modules/dw/eventsList/eventsList.css +113 -0
  30. package/src/modules/dw/eventsList/eventsList.html +98 -0
  31. package/src/modules/dw/eventsList/eventsList.ts +192 -0
  32. package/src/modules/dw/instrumentation/instrumentation.html +1 -0
  33. package/src/modules/dw/instrumentation/instrumentation.ts +97 -0
  34. package/src/modules/dw/newsletterForm/newsletterForm.css +74 -0
  35. package/src/modules/dw/newsletterForm/newsletterForm.html +67 -0
  36. package/src/modules/dw/newsletterForm/newsletterForm.ts +233 -0
  37. package/src/modules/dw/podcastSubscription/podcastSubscription.css +91 -0
  38. package/src/modules/dw/podcastSubscription/podcastSubscription.html +24 -0
  39. package/src/modules/dw/podcastSubscription/podcastSubscription.ts +52 -0
  40. package/src/modules/dw/podcastsGrid/podcastsGrid.css +5 -0
  41. package/src/modules/dw/podcastsGrid/podcastsGrid.html +29 -0
  42. package/src/modules/dw/podcastsGrid/podcastsGrid.ts +9 -0
  43. package/src/modules/dw/podcastsPromo/podcastsPromo.css +32 -0
  44. package/src/modules/dw/podcastsPromo/podcastsPromo.html +36 -0
  45. package/src/modules/dw/podcastsPromo/podcastsPromo.ts +3 -0
  46. package/src/modules/dw/rcgTable/altData.ts +78 -0
  47. package/src/modules/dw/rcgTable/getTableData.ts +10 -0
  48. package/src/modules/dw/rcgTable/rcgTable.css +39 -0
  49. package/src/modules/dw/rcgTable/rcgTable.html +31 -0
  50. package/src/modules/dw/rcgTable/rcgTable.ts +34 -0
  51. package/src/modules/dw/slackCta/slackCta.css +47 -0
  52. package/src/modules/dw/slackCta/slackCta.html +17 -0
  53. package/src/modules/dw/slackCta/slackCta.ts +12 -0
  54. package/src/modules/dw/slackSuccess/slackSuccess.css +65 -0
  55. package/src/modules/dw/slackSuccess/slackSuccess.html +32 -0
  56. package/src/modules/dw/slackSuccess/slackSuccess.ts +34 -0
  57. package/src/modules/dwBaseElements/postsGrid/postsGrid.ts +80 -0
  58. package/src/modules/dwHelpers/postsGrid/postsGrid.css +9 -0
package/LICENSE ADDED
@@ -0,0 +1,12 @@
1
+ Copyright (c) 2020, Salesforce.com, Inc.
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
5
+
6
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7
+
8
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
9
+
10
+ * Neither the name of Salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
11
+
12
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,24 @@
1
+ {
2
+ "modules": [
3
+ { "dir": "src/modules" },
4
+ { "npm": "@salesforcedevs/dx-components" }
5
+ ],
6
+ "expose": [
7
+ "dw/blogsGrid",
8
+ "dw/cardBlogPostProvider",
9
+ "dw/cardPodcastEpisodeProvider",
10
+ "dw/codeSamplesGrid",
11
+ "dw/contentArchive",
12
+ "dw/deSignupForm",
13
+ "dw/docsGrid",
14
+ "dw/eventsList",
15
+ "dw/instrumentation",
16
+ "dw/newsletterForm",
17
+ "dw/podcastSubscription",
18
+ "dw/podcastsGrid",
19
+ "dw/podcastsPromo",
20
+ "dw/rcgTable",
21
+ "dw/slackCta",
22
+ "dw/slackSuccess"
23
+ ]
24
+ }
package/package.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "@salesforcedevs/dw-components",
3
+ "version": "0.0.0",
4
+ "description": "Lightning web components for https://developer.salesforce.com",
5
+ "license": "MIT",
6
+ "engines": {
7
+ "node": ">= 14.x"
8
+ },
9
+ "publishConfig": {
10
+ "access": "public"
11
+ },
12
+ "dependencies": {
13
+ "classnames": "^2.2.6",
14
+ "lodash.clonedeep": "^4.5.0",
15
+ "lodash.orderby": "^4.6.0",
16
+ "lodash.uniqby": "^4.7.0",
17
+ "query-string": "^7.1.1"
18
+ },
19
+ "devDependencies": {
20
+ "@types/classnames": "^2.2.10",
21
+ "@types/lodash.clonedeep": "^4.5.7",
22
+ "@types/lodash.orderby": "^4.6.7",
23
+ "@types/lodash.uniqby": "^4.7.7"
24
+ },
25
+ "gitHead": "28224ddff4bbcb00044ecca05aea6f6511b4eccc"
26
+ }
@@ -0,0 +1,89 @@
1
+ @import "dwHelpers/postsGrid";
2
+
3
+ :host {
4
+ --dx-c-post-list-padding-horizontal: var(--dx-g-page-padding-horizontal);
5
+ }
6
+
7
+ .title {
8
+ font-family: var(--dx-g-font-display);
9
+ color: var(--dx-g-blue-vibrant-20);
10
+ font-weight: 500;
11
+ text-align: center;
12
+ }
13
+
14
+ dx-section.section-reduced-padding {
15
+ --dx-c-section-padding-vertical: unset;
16
+ }
17
+
18
+ @media only screen and (min-width: 640px) {
19
+ .title {
20
+ font-size: 24px;
21
+ height: 64px;
22
+ letter-spacing: -0.5px;
23
+ line-height: 32px;
24
+ width: 500px;
25
+ }
26
+
27
+ .box {
28
+ height: 162px;
29
+ }
30
+ }
31
+
32
+ @media only screen and (max-width: 640px) {
33
+ .title {
34
+ font-size: 20px;
35
+ height: 84px;
36
+ letter-spacing: -0.4px;
37
+ line-height: 28px;
38
+ width: 321px;
39
+ }
40
+
41
+ .box {
42
+ height: 162px;
43
+ background-position: 0% 25%, 90% 75%;
44
+ }
45
+ }
46
+
47
+ .button {
48
+ font-size: 14px;
49
+ font-weight: 500;
50
+ letter-spacing: 0;
51
+ height: 48px;
52
+ padding: 10px;
53
+ }
54
+
55
+ .subscription-box {
56
+ align-items: center;
57
+ display: flex;
58
+ flex-direction: column;
59
+ }
60
+
61
+ .content {
62
+ align-items: center;
63
+ display: flex;
64
+ flex-direction: column;
65
+ }
66
+
67
+ .cta-container {
68
+ width: 100%;
69
+ display: flex;
70
+ align-items: center;
71
+ justify-content: center;
72
+ }
73
+
74
+ .box {
75
+ background-image: url("/assets/svg/subscribe-background-left.svg"),
76
+ url("/assets/svg/subscribe-background-right.svg");
77
+ background-position: 4% 25%, 90% 60%;
78
+ background-repeat: no-repeat;
79
+ width: 100%;
80
+ }
81
+
82
+ .icon {
83
+ float: right;
84
+ margin-left: 6px;
85
+ }
86
+
87
+ h2 {
88
+ padding: 0;
89
+ }
@@ -0,0 +1,73 @@
1
+ <template>
2
+ <dx-hr spacing="2xl"></dx-hr>
3
+
4
+ <dx-section class="section-padding-lg section-reduced-padding">
5
+ <div class="subscription-box">
6
+ <div class="box">
7
+ <div class="content">
8
+ <h2 class="title">
9
+ Get the latest Salesforce Developer blog posts and
10
+ podcast episodes via Slack or RSS.
11
+ </h2>
12
+ <div class="cta-container">
13
+ <dx-button
14
+ size="small"
15
+ variant="secondary"
16
+ icon-symbol="slack"
17
+ icon-sprite="salesforcebrand"
18
+ icon-position="left"
19
+ href="/slack/install"
20
+ class="button"
21
+ >
22
+ Add to Slack
23
+ </dx-button>
24
+ <dx-button
25
+ size="small"
26
+ variant="secondary"
27
+ icon-symbol="rss"
28
+ icon-position="left"
29
+ icon-sprite="general"
30
+ href="https://developer.salesforce.com/blogs/feed"
31
+ class="button"
32
+ >
33
+ Subscribe to RSS
34
+ </dx-button>
35
+ </div>
36
+ </div>
37
+ </div>
38
+ </div>
39
+ </dx-section>
40
+
41
+ <dx-hr spacing="2xl"></dx-hr>
42
+
43
+ <div class="container">
44
+ <dx-grid columns={columns}>
45
+ <template for:each={postList} for:item="post">
46
+ <dx-card-blog-post
47
+ author-img-src={post.authorImgSrc}
48
+ author-label={post.authorName}
49
+ body={post.body}
50
+ datetime={post.datetime}
51
+ href={post.href}
52
+ img-alt={post.imgAlt}
53
+ img-src={post.imgSrc}
54
+ key={post.id}
55
+ title={post.title}
56
+ ></dx-card-blog-post>
57
+ </template>
58
+ </dx-grid>
59
+ <dx-hr
60
+ if:true={showLoadMore}
61
+ onclick={onClick}
62
+ variant="load-more"
63
+ text="SHOW MORE"
64
+ ></dx-hr>
65
+ <dx-hr
66
+ if:true={showArchives}
67
+ onclick={onClick}
68
+ variant="link"
69
+ href="/content-archive?content-type=Blogs"
70
+ text="VIEW ARCHIVES"
71
+ ></dx-hr>
72
+ </div>
73
+ </template>
@@ -0,0 +1,28 @@
1
+ import { normalizePost } from "dxUtils/normalizers";
2
+ import { track } from "dxUtils/analytics";
3
+ import { WordpressBlogPost, NormalizedPost } from "typings/custom";
4
+ import { PostsGrid } from "dwBaseElements/postsGrid";
5
+
6
+ const BLOG_SUBSCRIBE_HREF = "https://developer.salesforce.com/blogs/feed";
7
+
8
+ const ANALYTICS_INFO = {
9
+ itemTitle: "Blogs RSS Subscribe Button",
10
+ elementType: "button",
11
+ destinationType: "internal",
12
+ clickText: "Subscribe",
13
+ clickUrl: BLOG_SUBSCRIBE_HREF,
14
+ ctaClick: true
15
+ };
16
+
17
+ export default class BlogsGrid extends PostsGrid {
18
+ _loadMoreAmount = 21;
19
+
20
+ normalizePost(post: WordpressBlogPost): NormalizedPost {
21
+ return normalizePost(post);
22
+ }
23
+
24
+ rssOnClick(event: Event): void {
25
+ track(event.target!, "custEv_ctaButtonClick", ANALYTICS_INFO);
26
+ window.location.href = BLOG_SUBSCRIBE_HREF;
27
+ }
28
+ }
@@ -0,0 +1,3 @@
1
+ :host {
2
+ display: contents;
3
+ }
@@ -0,0 +1,16 @@
1
+ <template>
2
+ <template for:each={posts} for:item="post">
3
+ <dx-card-blog-post
4
+ label="BLOG POST"
5
+ author-img-src={post.authorImgSrc}
6
+ author-label={post.authorName}
7
+ body={post.body}
8
+ datetime={post.datetime}
9
+ href={post.href}
10
+ img-alt={post.imgAlt}
11
+ img-src={post.imgSrc}
12
+ key={post.id}
13
+ title={post.title}
14
+ ></dx-card-blog-post>
15
+ </template>
16
+ </template>
@@ -0,0 +1,29 @@
1
+ import { LightningElement, api, track } from "lwc";
2
+ import { fetchWordpressPosts } from "dxUtils/wordpress";
3
+ import { normalizePost } from "dxUtils/normalizers";
4
+
5
+ type BlogPost = {
6
+ body: string;
7
+ datetime: string;
8
+ href: string;
9
+ id: string;
10
+ title: string;
11
+ };
12
+
13
+ export default class CardBlogPostProvider extends LightningElement {
14
+ @api count?: string;
15
+
16
+ @track posts: BlogPost[] = [];
17
+
18
+ private fetchPosts = async () => {
19
+ this.posts = await fetchWordpressPosts(
20
+ "/blogs/api",
21
+ normalizePost,
22
+ this.count
23
+ );
24
+ };
25
+
26
+ connectedCallback() {
27
+ this.fetchPosts();
28
+ }
29
+ }
@@ -0,0 +1,3 @@
1
+ :host {
2
+ display: contents;
3
+ }
@@ -0,0 +1,12 @@
1
+ <template>
2
+ <template for:each={episodes} for:item="episode">
3
+ <dx-card-podcast-episode
4
+ body={episode.body}
5
+ datetime={episode.datetime}
6
+ href={episode.href}
7
+ key={episode.id}
8
+ length={episode.length}
9
+ title={episode.title}
10
+ ></dx-card-podcast-episode>
11
+ </template>
12
+ </template>
@@ -0,0 +1,29 @@
1
+ import { LightningElement, api, track } from "lwc";
2
+ import { fetchWordpressPosts } from "dxUtils/wordpress";
3
+ import { normalizeEpisode } from "dxUtils/normalizers";
4
+
5
+ type PodcastEpisode = {
6
+ body: string;
7
+ datetime: string;
8
+ href: string;
9
+ id: string;
10
+ length: string;
11
+ title: string;
12
+ };
13
+ export default class CardPodcastEpisodeProvider extends LightningElement {
14
+ @api count?: string;
15
+
16
+ @track episodes: PodcastEpisode[] = [];
17
+
18
+ private fetchEpisodes = async () => {
19
+ this.episodes = await fetchWordpressPosts(
20
+ "/podcast/api",
21
+ normalizeEpisode,
22
+ this.count
23
+ );
24
+ };
25
+
26
+ connectedCallback() {
27
+ this.fetchEpisodes();
28
+ }
29
+ }
@@ -0,0 +1,171 @@
1
+ dx-section:first-of-type {
2
+ --dx-c-section-padding-bottom: 0;
3
+ }
4
+
5
+ .badge-link-container {
6
+ padding-top: var(--dx-g-spacing-md);
7
+ }
8
+
9
+ .badge-container {
10
+ padding-top: 0;
11
+ }
12
+
13
+ .external-link-container {
14
+ padding-top: var(--dx-g-spacing-md);
15
+ }
16
+
17
+ .item-container {
18
+ display: flex;
19
+ flex-direction: column;
20
+ justify-content: space-between;
21
+ }
22
+
23
+ .featured-demo {
24
+ --dx-c-featured-content-header-background-color: unset;
25
+ --dx-c-featured-content-header-padding-horizontal: unset;
26
+ }
27
+
28
+ .code-samples-feature {
29
+ --dx-c-feature-img-box-shadow: unset;
30
+ --dx-c-feature-description-left-img-src: unset;
31
+ --dx-c-feature-description-max-width: 100%;
32
+ --dx-c-feature-description-font-size: 20px;
33
+ --dx-c-feature-img-margin-left: -40px;
34
+ --dx-c-feature-img-container-padding: 0;
35
+ --dx-c-feature-image-max-width: 120%;
36
+ }
37
+
38
+ .card-content {
39
+ --dx-c-body-max-lines: 3;
40
+
41
+ height: unset;
42
+ }
43
+
44
+ .docs-action-bar {
45
+ display: flex;
46
+ justify-content: space-between;
47
+ align-items: flex-end;
48
+ padding: var(--dx-g-spacing-md) 0 var(--dx-g-spacing-lg);
49
+ }
50
+
51
+ .docs-action-bar > .records-container {
52
+ margin-right: auto;
53
+ }
54
+
55
+ .docs-action-bar .filters-container {
56
+ display: flex;
57
+ }
58
+
59
+ .filter-checkbox-group,
60
+ .filter-button::part(container) {
61
+ --dx-c-checkbox-text-transform: capitalize;
62
+
63
+ text-transform: var(--dx-c-checkbox-text-transform);
64
+ }
65
+
66
+ .docs-action-bar .filters-container > *:not(:first-child),
67
+ .docs-search-input {
68
+ margin-left: var(--dx-g-spacing-sm);
69
+ }
70
+
71
+ .docs-search-input {
72
+ --dx-c-input-width: 285px;
73
+ }
74
+
75
+ .docs-card {
76
+ --dx-c-body-max-lines: 4;
77
+ --dx-c-heading-max-lines: 2;
78
+ }
79
+
80
+ .pagination-container {
81
+ max-width: fit-content;
82
+ max-width: -moz-fit-content;
83
+ margin: 50px auto;
84
+ }
85
+
86
+ dx-type-badge.platform {
87
+ --dx-c-type-badge-color: var(--dx-g-green-vibrant-40);
88
+ --dx-c-type-badge-background: var(--dx-g-green-vibrant-90);
89
+ }
90
+
91
+ @media screen and (max-width: 1024px) {
92
+ .code-samples-feature {
93
+ --dx-c-feature-description-font-size: 14px;
94
+ }
95
+
96
+ .docs-card {
97
+ --dx-c-body-max-lines: 3;
98
+ }
99
+ }
100
+
101
+ @media screen and (max-width: 767px) {
102
+ .badge-link-container {
103
+ display: flex;
104
+ }
105
+
106
+ .docs-action-bar {
107
+ flex-direction: column-reverse;
108
+ width: 100%;
109
+ padding: 0;
110
+ }
111
+
112
+ .docs-search-input {
113
+ --dx-c-input-width: 100%;
114
+
115
+ width: 100%;
116
+ margin-bottom: var(--dx-g-spacing-md);
117
+ }
118
+
119
+ .docs-action-bar .records-container {
120
+ transform: translateY(-100%);
121
+ }
122
+
123
+ .item-container:not(:nth-child(1)) {
124
+ margin-top: var(--dx-g-spacing-3xl);
125
+ }
126
+
127
+ .external-link-container {
128
+ padding: 0 0 0 8px;
129
+ margin-top: -4px;
130
+ }
131
+ }
132
+
133
+ @media screen and (max-width: 600px) {
134
+ .pagination-container {
135
+ width: 100%;
136
+ overflow: hidden;
137
+ }
138
+
139
+ .pagination-container > * {
140
+ position: absolute;
141
+ left: 50%;
142
+ transform: translateX(-50%);
143
+ }
144
+ }
145
+
146
+ @media screen and (max-width: 460px) {
147
+ .item-container:not(:nth-child(1)) {
148
+ margin-top: 45px;
149
+ }
150
+
151
+ .docs-action-bar .records-container {
152
+ transform: initial;
153
+ padding: var(--dx-g-spacing-md) 0;
154
+ }
155
+
156
+ .docs-action-bar {
157
+ align-items: flex-start;
158
+ }
159
+ }
160
+
161
+ @media screen and (min-width: 1025px) {
162
+ .item-container:not(:nth-child(1)):not(:nth-child(2)):not(:nth-child(3)) {
163
+ margin-top: 70px;
164
+ }
165
+ }
166
+
167
+ @media screen and (max-width: 1024px) and (min-width: 768px) {
168
+ .item-container:not(:nth-child(1)):not(:nth-child(2)) {
169
+ margin-top: 51px;
170
+ }
171
+ }
@@ -0,0 +1,138 @@
1
+ <template>
2
+ <dx-section>
3
+ <dx-feature
4
+ title={featuredCodeSample.title}
5
+ button-href={featuredCodeSample.href}
6
+ button-label="Explore on GitHub"
7
+ image-src={featuredCodeSample.imgSrc}
8
+ variant="display"
9
+ label="Featured Demo"
10
+ is-external-link
11
+ class="code-samples-feature"
12
+ >
13
+ {featuredCodeSample.body}
14
+ </dx-feature>
15
+ </dx-section>
16
+
17
+ <dx-section title="Browse Demos">
18
+ <div class="docs-action-bar">
19
+ <div class="records-container">
20
+ <span if:true={endingRecord}>
21
+ Showing { startingRecord } to { endingRecord } of {
22
+ filteredSamples.length }
23
+ </span>
24
+ </div>
25
+ <div class="filters-container">
26
+ <dx-popover if:true={showSourcesFilter} width="max-content">
27
+ <dx-button
28
+ class="filter-button"
29
+ variant="tertiary"
30
+ icon-symbol="chevrondown"
31
+ slot="control"
32
+ >
33
+ Source
34
+ </dx-button>
35
+ <dx-checkbox-group
36
+ legend="Source"
37
+ options={sources}
38
+ slot="content"
39
+ onchange={handleSourceFilterChange}
40
+ value={selectedSourceFilter}
41
+ class="filter-checkbox-group"
42
+ ></dx-checkbox-group>
43
+ </dx-popover>
44
+ <dx-popover width="max-content">
45
+ <dx-button
46
+ class="filter-button"
47
+ variant="tertiary"
48
+ icon-symbol="chevrondown"
49
+ slot="control"
50
+ >
51
+ Type
52
+ </dx-button>
53
+ <dx-checkbox-group
54
+ legend="Type"
55
+ options={types}
56
+ slot="content"
57
+ onchange={handleTypeFilterChange}
58
+ value={selectedTypeFilter}
59
+ class="filter-checkbox-group"
60
+ ></dx-checkbox-group>
61
+ </dx-popover>
62
+ <dx-popover width="max-content">
63
+ <dx-button
64
+ class="filter-button"
65
+ variant="tertiary"
66
+ icon-symbol="chevrondown"
67
+ slot="control"
68
+ >
69
+ Products
70
+ </dx-button>
71
+ <dx-checkbox-group
72
+ legend="Products"
73
+ options={products}
74
+ slot="content"
75
+ onchange={handleProductFilterChange}
76
+ value={selectedProductFilter}
77
+ class="filter-checkbox-group"
78
+ ></dx-checkbox-group>
79
+ </dx-popover>
80
+ </div>
81
+ <dx-input
82
+ size="small"
83
+ placeholder="Search..."
84
+ icon-symbol="search"
85
+ shortcut-key="j"
86
+ class="docs-search-input"
87
+ onchange={handleSearchChange}
88
+ value={searchTerm}
89
+ ></dx-input>
90
+ </div>
91
+ <dx-grid columns={tileColumns} if:false={showEmptyState}>
92
+ <dx-card-docs
93
+ class="content-card"
94
+ for:each={currentPageSamples}
95
+ for:item="item"
96
+ for:index="i"
97
+ key={item.id}
98
+ body={item.body}
99
+ label={item.type}
100
+ title={item.title}
101
+ href={item.href}
102
+ >
103
+ <div class="badge-link-container">
104
+ <div class="badge-container">
105
+ <dx-type-badge
106
+ value={item.product}
107
+ class={item.product}
108
+ ></dx-type-badge>
109
+ </div>
110
+ <div class="external-link-container">
111
+ <dx-button
112
+ target={target}
113
+ icon-symbol="new_window"
114
+ variant="inline"
115
+ href={item.href}
116
+ >
117
+ {item.buttonText}
118
+ </dx-button>
119
+ </div>
120
+ </div>
121
+ </dx-card-docs>
122
+ </dx-grid>
123
+ <div if:false={hidePagination} class="pagination-container">
124
+ <dx-pagination
125
+ if:false={showEmptyState}
126
+ current-page={page}
127
+ total-pages={totalPages}
128
+ pages-to-show={pagesToShow}
129
+ onpagechange={goToPage}
130
+ ></dx-pagination>
131
+ </div>
132
+ <dx-empty-state
133
+ title="Beep boop. That did not compute."
134
+ subtitle={emptyStateSubtitle}
135
+ if:true={showEmptyState}
136
+ ></dx-empty-state>
137
+ </dx-section>
138
+ </template>