@salesforcedevs/dw-components 0.79.1 → 1.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 (76) hide show
  1. package/lwc.config.json +10 -1
  2. package/package.json +16 -12
  3. package/src/modules/dw/blogsGrid/blogsGrid.css +14 -7
  4. package/src/modules/dw/blogsGrid/blogsGrid.html +15 -12
  5. package/src/modules/dw/blogsGrid/blogsGrid.ts +23 -9
  6. package/src/modules/dw/browseTrials/browseTrials.css +35 -0
  7. package/src/modules/dw/browseTrials/browseTrials.html +86 -0
  8. package/src/modules/dw/browseTrials/browseTrials.ts +116 -0
  9. package/src/modules/dw/cardBlogPostProvider/cardBlogPostProvider.css +2 -0
  10. package/src/modules/dw/cardBlogPostProvider/cardBlogPostProvider.html +3 -3
  11. package/src/modules/dw/cardPodcastEpisodeProvider/cardPodcastEpisodeProvider.css +2 -0
  12. package/src/modules/dw/cardPodcastEpisodeProvider/cardPodcastEpisodeProvider.html +2 -1
  13. package/src/modules/dw/codeSamplesGrid/codeSamplesGrid.css +85 -9
  14. package/src/modules/dw/codeSamplesGrid/codeSamplesGrid.html +74 -112
  15. package/src/modules/dw/codeSamplesGrid/codeSamplesGrid.ts +14 -376
  16. package/src/modules/dw/contentArchive/contentArchive.css +5 -4
  17. package/src/modules/dw/contentArchive/contentArchive.html +58 -24
  18. package/src/modules/dw/contentArchive/contentArchive.ts +46 -8
  19. package/src/modules/dw/contentArchive/contentArchive.types.ts +8 -4
  20. package/src/modules/dw/contentArchive/utils.ts +30 -14
  21. package/src/modules/dw/deSignupForm/deSignupForm.css +11 -10
  22. package/src/modules/dw/deSignupForm/deSignupForm.html +39 -25
  23. package/src/modules/dw/deSignupForm/deSignupForm.ts +205 -133
  24. package/src/modules/dw/deSignupForm/submitForm.ts +7 -3
  25. package/src/modules/dw/docsGrid/docsGrid.css +0 -1
  26. package/src/modules/dw/docsGrid/docsGrid.html +6 -2
  27. package/src/modules/dw/docsGrid/docsGrid.ts +103 -38
  28. package/src/modules/dw/eventsList/eventsList.css +4 -4
  29. package/src/modules/dw/eventsList/eventsList.html +5 -5
  30. package/src/modules/dw/eventsList/eventsList.ts +47 -48
  31. package/src/modules/dw/j2sCardSequence/j2sCardSequence.css +14 -0
  32. package/src/modules/dw/j2sCardSequence/j2sCardSequence.html +41 -0
  33. package/src/modules/dw/j2sCardSequence/j2sCardSequence.ts +487 -0
  34. package/src/modules/dw/j2sCardSequenceStep/j2sCardSequenceStep.css +76 -0
  35. package/src/modules/dw/j2sCardSequenceStep/j2sCardSequenceStep.html +64 -0
  36. package/src/modules/dw/j2sCardSequenceStep/j2sCardSequenceStep.ts +157 -0
  37. package/src/modules/dw/j2sForm/j2sForm.css +65 -0
  38. package/src/modules/dw/j2sForm/j2sForm.html +217 -0
  39. package/src/modules/dw/j2sForm/j2sForm.ts +371 -0
  40. package/src/modules/dw/j2sForm/mockProps.ts +3102 -0
  41. package/src/modules/dw/languageSelector/languageSelector.css +86 -0
  42. package/src/modules/dw/languageSelector/languageSelector.html +36 -0
  43. package/src/modules/dw/languageSelector/languageSelector.ts +119 -0
  44. package/src/modules/dw/newsletterForm/newsletterForm.css +2 -2
  45. package/src/modules/dw/newsletterForm/newsletterForm.html +35 -10
  46. package/src/modules/dw/newsletterForm/newsletterForm.ts +107 -78
  47. package/src/modules/dw/podcastSubscription/podcastSubscription.css +8 -8
  48. package/src/modules/dw/podcastSubscription/podcastSubscription.html +2 -2
  49. package/src/modules/dw/podcastSubscription/podcastSubscription.ts +4 -4
  50. package/src/modules/dw/podcastsGrid/podcastsGrid.css +7 -0
  51. package/src/modules/dw/podcastsGrid/podcastsGrid.html +6 -1
  52. package/src/modules/dw/podcastsGrid/podcastsGrid.ts +3 -3
  53. package/src/modules/dw/podcastsPromo/podcastsPromo.css +14 -0
  54. package/src/modules/dw/podcastsPromo/podcastsPromo.html +16 -8
  55. package/src/modules/dw/podcastsPromo/podcastsPromo.ts +11 -2
  56. package/src/modules/dw/rcgTable/altData.ts +72 -9
  57. package/src/modules/dw/rcgTable/getTableData.ts +1 -1
  58. package/src/modules/dw/rcgTable/rcgTable.ts +3 -3
  59. package/src/modules/dw/slackCta/slackCta.css +5 -6
  60. package/src/modules/dw/slackCta/slackCta.html +1 -1
  61. package/src/modules/dw/slackSuccess/slackSuccess.css +1 -1
  62. package/src/modules/dw/slackSuccess/slackSuccess.html +2 -2
  63. package/src/modules/dw/tbidLoginMenu/tbidLoginMenu.css +119 -0
  64. package/src/modules/dw/tbidLoginMenu/tbidLoginMenu.html +192 -0
  65. package/src/modules/dw/tbidLoginMenu/tbidLoginMenu.ts +148 -0
  66. package/src/modules/dw/videoGrid/types.ts +12 -0
  67. package/src/modules/dw/videoGrid/videoGrid.css +24 -0
  68. package/src/modules/dw/videoGrid/videoGrid.html +41 -0
  69. package/src/modules/dw/videoGrid/videoGrid.ts +41 -0
  70. package/src/modules/dw/youtubeVideoGrid/types.ts +8 -0
  71. package/src/modules/dw/youtubeVideoGrid/youtubeVideoGrid.css +18 -0
  72. package/src/modules/dw/youtubeVideoGrid/youtubeVideoGrid.html +40 -0
  73. package/src/modules/dw/youtubeVideoGrid/youtubeVideoGrid.ts +66 -0
  74. package/src/modules/dwHelpers/mobileDividers/mobileDividers.css +19 -0
  75. package/src/modules/dwUtils/forms/forms.ts +514 -0
  76. package/src/modules/{dwBaseElements → dwUtils}/postsGrid/postsGrid.ts +10 -13
@@ -1,142 +1,45 @@
1
1
  import { api, LightningElement } from "lwc";
2
- import qs from "query-string";
3
- import uniqBy from "lodash.uniqby";
4
- import orderBy from "lodash.orderby";
5
- import cloneDeep from "lodash.clonedeep";
6
- import { DocsTile, DropdownItem, CodeSample } from "typings/custom";
2
+
3
+ import { CodeSample } from "typings/custom";
7
4
  import { toJson } from "dxUtils/normalizers";
8
5
 
9
- const PRODUCT_FILTER_ALL_PRODUCTS = "all products";
10
- const LANGUAGE_FILTER_LABEL = "Type";
11
- const WAIT_TIME = 500;
12
6
  const DEFAULT_BUTTON_TEXT = "Explore on GitHub";
13
7
  export default class CodeSamplesGrid extends LightningElement {
14
- private searchTerm = "";
15
- private selectedProductFilter: string[] | null = null;
16
- private selectedTypeFilter: string[] | null = null;
17
- private selectedSourceFilter: string[] | null = null;
18
- private page = 1;
19
- private pageSize = 9;
20
- private startingRecord = 1;
21
- private endingRecord = 24;
22
- private totalRecountCount = 0;
23
- private totalPages = 1;
24
8
  private _featuredCodeSample?: CodeSample = undefined;
25
- private _samplesList?: CodeSample[] = [];
26
- private _typesFiltersList?: DropdownItem[] = [];
27
- private _sourceFiltersList?: DropdownItem[] = [];
28
- private _productFiltersList?: DropdownItem[] = [];
29
- private matchDesktop!: MediaQueryList;
30
- private matchMobile!: MediaQueryList;
31
- private matchMobileSmall!: MediaQueryList;
9
+ private _samplesList: CodeSample[] = [];
32
10
  private deviceType: "desktop" | "mobile" | "mobile-small" = "desktop";
33
- private _searchTimeout?: number;
34
11
  private target = "_blank";
35
12
  private isDesktop = "(min-width: 1024px)";
36
13
  private isMobile = "(min-width: 401px) and (max-width: 1023px)";
37
14
  private isMobileSmall = "(max-width: 400px)";
38
- private showSourcesFilter = false;
39
- private filtersDefaultValue = {
40
- selectedSourceFilter: [],
41
- selectedTypeFilter: [],
42
- selectedProductFilter: [],
43
- searchTerm: "",
44
- page: "1"
45
- };
46
15
 
47
16
  connectedCallback(): void {
48
- this.matchDesktop = window.matchMedia(this.isDesktop);
49
- this.matchDesktop.addEventListener("change", this.handleView);
50
-
51
- this.matchMobile = window.matchMedia(this.isMobile);
52
- this.matchMobile.addEventListener("change", this.handleView);
53
-
54
- this.matchMobileSmall = window.matchMedia(this.isMobileSmall);
55
- this.matchMobileSmall.addEventListener("change", this.handleView);
56
- window.addEventListener("popstate", this.handleURLStateChange);
57
- if (this.matchDesktop.matches) {
58
- this.deviceType = "desktop";
59
- }
60
- if (this.matchMobile.matches) {
61
- this.deviceType = "mobile";
62
- }
63
- if (this.matchMobileSmall.matches) {
64
- this.deviceType = "mobile-small";
65
- }
66
- this.evaluateQueryParams(false);
67
- }
68
-
69
- handleURLStateChange(): void {
70
- this.evaluateQueryParams(true);
71
- this.scrollToTop();
72
- }
73
-
74
- evaluateQueryParams(resetFilters: boolean): void {
75
- let page = "1";
76
- if (resetFilters) {
77
- this.selectedSourceFilter =
78
- this.filtersDefaultValue.selectedSourceFilter;
79
- this.selectedTypeFilter =
80
- this.filtersDefaultValue.selectedTypeFilter;
81
- this.selectedProductFilter =
82
- this.filtersDefaultValue.selectedProductFilter;
83
- }
84
- const urlParams = new URLSearchParams(window.location.search);
85
- if (urlParams.toString()) {
86
- if (urlParams.has("source")) {
87
- this.selectedSourceFilter = urlParams.getAll("source");
88
- }
89
- if (urlParams.has("type")) {
90
- this.selectedTypeFilter = urlParams.getAll("type");
91
- }
92
- if (urlParams.get("service")) {
93
- this.selectedProductFilter = urlParams
94
- .get("service")
95
- .split(",");
96
- }
97
- if (urlParams.get("filter_text")) {
98
- this.searchTerm = (
99
- urlParams.get("filter_text") || ""
100
- ).toLowerCase();
101
- }
102
- if (urlParams.has("page")) {
103
- page = urlParams.get("page");
104
- }
105
- }
106
- this.calculatePagination(page, true);
107
- }
108
-
109
- disconnectedCallback(): void {
110
- this.matchDesktop.removeEventListener("change", this.handleView);
111
- this.matchMobile.removeEventListener("change", this.handleView);
112
- this.matchMobileSmall.removeEventListener("change", this.handleView);
113
- window.removeEventListener("popstate", this.handleURLStateChange);
17
+ console.log(this._samplesList);
114
18
  }
115
19
 
116
20
  @api
117
21
  set featuredCodeSample(value: string) {
118
22
  this._featuredCodeSample = toJson(value);
119
23
  }
120
- get featuredCodeSample(): CodeSample {
24
+ get featuredCodeSample(): CodeSample | undefined {
121
25
  return this._featuredCodeSample;
122
26
  }
123
27
 
124
28
  @api
125
29
  set samples(value: string) {
126
- console.log(value);
127
30
  const jsonSamples = toJson(value) || [];
128
- this._samplesList = jsonSamples.map((sample, i) => ({
31
+ this._samplesList = jsonSamples.map((sample: any, i: number) => ({
129
32
  id: i,
130
33
  title: sample.title,
131
34
  body: sample.body,
132
35
  buttonText: DEFAULT_BUTTON_TEXT,
133
- href: sample.href,
134
- imgSrc: sample.imgSrc,
135
- product: sample.product,
136
- type: sample.type,
137
- // source: sample.source,
138
- source: "none",
139
- target: this.target
36
+ githubLink: sample.githubLink,
37
+ trailheadLink: sample.trailheadLink,
38
+ img: sample.img,
39
+ tags: sample.tags,
40
+ target: this.target,
41
+ ctaOne: sample.ctaOne,
42
+ ctaTwo: sample.ctaTwo
140
43
  }));
141
44
  }
142
45
 
@@ -144,125 +47,8 @@ export default class CodeSamplesGrid extends LightningElement {
144
47
  return this._samplesList;
145
48
  }
146
49
 
147
- @api
148
- set products(value: string) {
149
- const productsFilters = toJson(value).map((sample: string) => ({
150
- label: sample,
151
- value: sample.toLowerCase()
152
- }));
153
-
154
- this._productFiltersList = orderBy(
155
- uniqBy([...productsFilters], "value"),
156
- ["value"],
157
- ["asc"]
158
- );
159
- this.selectedProductFilter = this._productFiltersList.map(
160
- (filter) => filter.value
161
- );
162
- this.filtersDefaultValue.selectedProductFilter = cloneDeep(
163
- this.selectedProductFilter
164
- );
165
- }
166
- get products(): DropdownItem[] {
167
- return this._productFiltersList;
168
- }
169
-
170
- @api
171
- set types(value: string) {
172
- const typesFilter = toJson(value).map((sample: string) => ({
173
- label: sample,
174
- value: sample.toLowerCase()
175
- }));
176
-
177
- this._typesFiltersList = orderBy(
178
- uniqBy([...typesFilter], "value"),
179
- ["value"],
180
- ["asc"]
181
- );
182
- this.selectedTypeFilter = this._typesFiltersList.map(
183
- (filter) => filter.value
184
- );
185
- this.filtersDefaultValue.selectedTypeFilter = cloneDeep(
186
- this.selectedTypeFilter
187
- );
188
- }
189
- get types(): DropdownItem[] {
190
- return this._typesFiltersList;
191
- }
192
-
193
- @api
194
- set sources(value: string) {
195
- const parsedValues = toJson(value);
196
- this.showSourcesFilter = parsedValues.length > 0;
197
- const sourcesFilter = parsedValues.map((sample: string) => ({
198
- label: sample,
199
- value: sample.toLowerCase()
200
- }));
201
-
202
- this._sourceFiltersList = orderBy(
203
- uniqBy([...sourcesFilter], "value"),
204
- ["value"],
205
- ["asc"]
206
- );
207
- this.selectedSourceFilter = this._sourceFiltersList.map(
208
- (filter) => filter.value
209
- );
210
- this.filtersDefaultValue.selectedSourceFilter = cloneDeep(
211
- this.selectedSourceFilter
212
- );
213
- }
214
- get sources(): DropdownItem[] {
215
- return this._sourceFiltersList;
216
- }
217
-
218
- get filteredSamples(): CodeSample[] {
219
- return this.filterSamples([...this.samples]);
220
- }
221
-
222
- get currentPageSamples(): DocsTile[] {
223
- return this.filteredSamples.slice(
224
- this.startingRecord - 1,
225
- this.endingRecord
226
- );
227
- }
228
-
229
- get typesList(): DropdownItem[] {
230
- return this._typesFiltersList || [];
231
- }
232
-
233
- get productFiltersList(): DropdownItem[] {
234
- return this._productFiltersList || [];
235
- }
236
-
237
- get showEmptyState(): boolean {
238
- return !this.filteredSamples.length;
239
- }
240
-
241
- get typeFilterLabel(): string {
242
- const selectedLanguage = this.typesList.find(
243
- (language) => language.value === this.selectedTypeFilter
244
- );
245
- const label = selectedLanguage && selectedLanguage.label;
246
- return label || LANGUAGE_FILTER_LABEL;
247
- }
248
-
249
50
  get tileColumns(): string {
250
- return this.deviceType === "desktop" ? "three" : "two";
251
- }
252
-
253
- get pagesToShow(): number {
254
- return this.deviceType === "mobile-small" ? 3 : 5;
255
- }
256
-
257
- get hidePagination(): boolean {
258
- return this.totalPages < 2;
259
- }
260
-
261
- get emptyStateSubtitle(): string {
262
- return (
263
- "No results" +
264
- (this.searchTerm !== "" ? ` for "${this.searchTerm}"` : "")
265
- );
51
+ return this.deviceType === "desktop" ? "two" : "one";
266
52
  }
267
53
 
268
54
  handleView = (e: MediaQueryListEvent | MediaQueryList): void => {
@@ -280,152 +66,4 @@ export default class CodeSamplesGrid extends LightningElement {
280
66
  this.deviceType = "mobile-small";
281
67
  }
282
68
  };
283
-
284
- goToPage(e: CustomEvent): void {
285
- const page = e.detail;
286
- this.displayRecordsPerPage(page);
287
- this.setSearchParams("page", page ? page.toString() : "1");
288
- this.scrollToTop();
289
- }
290
-
291
- displayRecordsPerPage(page: number): void {
292
- this.page = page;
293
- this.startingRecord =
294
- page === 1 ? page : (page - 1) * this.pageSize + 1;
295
- this.endingRecord = this.pageSize * page;
296
- this.endingRecord =
297
- this.endingRecord > this.totalRecountCount
298
- ? this.totalRecountCount
299
- : this.endingRecord;
300
- }
301
-
302
- handleSearchChange(event: CustomEvent): void {
303
- const value = event.detail;
304
- this.searchTerm = value.toLowerCase();
305
- window.clearTimeout(this._searchTimeout);
306
- this._searchTimeout = window.setTimeout(() => {
307
- this.calculatePagination();
308
- }, WAIT_TIME);
309
- }
310
-
311
- handleSourceFilterChange(event: CustomEvent): void {
312
- this.selectedSourceFilter = event.detail.value;
313
- this.calculatePagination();
314
- }
315
-
316
- handleTypeFilterChange(event: CustomEvent): void {
317
- this.selectedTypeFilter = event.detail.value;
318
- this.calculatePagination();
319
- }
320
-
321
- handleProductFilterChange(event: CustomEvent): void {
322
- if (event.detail.checkedValue === PRODUCT_FILTER_ALL_PRODUCTS) {
323
- if (event.detail.checked) {
324
- this.selectedProductFilter = this.productFiltersList.map(
325
- (filter) => filter.value
326
- );
327
- } else {
328
- this.selectedProductFilter = [];
329
- }
330
- } else {
331
- let newList = event.detail.value;
332
- if (!event.detail.checked) {
333
- newList = newList.filter(
334
- (val) => val !== PRODUCT_FILTER_ALL_PRODUCTS
335
- );
336
- }
337
- this.selectedProductFilter = newList;
338
- }
339
- this.calculatePagination();
340
- }
341
-
342
- handleLanguageFilterChange(event: CustomEvent): void {
343
- this.selectedTypeFilter = event.detail.value;
344
- this.setSearchParams("type", this.selectedTypeFilter);
345
- }
346
-
347
- filterSamples(samples: CodeSample[]): CodeSample[] {
348
- const filtered = samples
349
- .filter((contentItem) => {
350
- const matchesSearchTerm =
351
- contentItem.body.toLowerCase().includes(this.searchTerm) ||
352
- contentItem.title.toLowerCase().includes(this.searchTerm);
353
- const matchesProductFilters =
354
- !this.selectedProductFilter ||
355
- !this.selectedProductFilter.length ||
356
- this.selectedProductFilter.includes(
357
- PRODUCT_FILTER_ALL_PRODUCTS
358
- ) ||
359
- (typeof contentItem.product === "string" &&
360
- this.selectedProductFilter.includes(
361
- contentItem.product.toLowerCase()
362
- ));
363
- const matchesTypeFilters =
364
- !this.selectedTypeFilter ||
365
- !this.selectedTypeFilter.length ||
366
- (typeof contentItem.type === "string" &&
367
- this.selectedTypeFilter.includes(
368
- contentItem.type.toLowerCase()
369
- ));
370
- const matchesSourceFilters =
371
- !this.selectedSourceFilter ||
372
- !this.selectedSourceFilter.length ||
373
- (typeof contentItem.source === "string" &&
374
- this.selectedSourceFilter.includes(
375
- contentItem.source.toLowerCase()
376
- ));
377
-
378
- return (
379
- matchesSearchTerm &&
380
- matchesProductFilters &&
381
- matchesTypeFilters &&
382
- matchesSourceFilters
383
- );
384
- })
385
- .sort((a: CodeSample, b: CodeSample) => {
386
- return a.title.localeCompare(b.title);
387
- });
388
- return filtered;
389
- }
390
-
391
- calculatePagination(page?: string, skipSetSearchParams = false): void {
392
- this.page = +parseInt(page, 10) || 1;
393
- this.totalRecountCount = this.filteredSamples.length;
394
- this.totalPages = Math.ceil(this.totalRecountCount / this.pageSize);
395
- this.displayRecordsPerPage(this.page);
396
- if (!skipSetSearchParams) {
397
- this.setSearchParams();
398
- }
399
- }
400
-
401
- scrollToTop(): void {
402
- this.template
403
- .querySelector(".docs-grid-container")
404
- .scrollIntoView({ behavior: "smooth" });
405
- }
406
-
407
- setSearchParams(key?: string, val?: string[]): void {
408
- const service =
409
- this.selectedProductFilter.length === this.productFiltersList.length
410
- ? ""
411
- : this.selectedProductFilter.join(",");
412
- const params = {
413
- filter_text: this.searchTerm,
414
- service,
415
- type: this.selectedTypeFilter,
416
- page: this.page.toString(),
417
- source: this.selectedSourceFilter
418
- };
419
- if (key) {
420
- params[key] = key === "service" ? val.join(",") : val;
421
- }
422
- for (const _key in params) {
423
- if (!params[_key]) {
424
- delete params[_key];
425
- }
426
- }
427
- const searchParams = qs.stringify(params);
428
- const newurl = `${window.location.pathname}?${searchParams}`;
429
- window.history.pushState({ path: newurl }, "", newurl);
430
- }
431
69
  }
@@ -101,7 +101,7 @@ button:active {
101
101
  }
102
102
 
103
103
  .empty-state-container {
104
- background-image: url(/assets/svg/no-results-combined.svg);
104
+ background-image: url("https://a.sfdcstatic.com/developer-website/images/no-results-combined.svg");
105
105
  background-repeat: no-repeat;
106
106
  background-position: center;
107
107
  background-size: contain;
@@ -121,6 +121,7 @@ button:active {
121
121
  }
122
122
 
123
123
  .filter-title {
124
+ color: var(--dx-g-text-heading-color);
124
125
  font-family: var(--dx-g-font-display);
125
126
  font-size: var(--dx-g-text-lg);
126
127
  }
@@ -181,13 +182,13 @@ dx-filter-menu {
181
182
 
182
183
  .chip-title {
183
184
  font-weight: bold;
184
- color: rgb(24, 24, 24);
185
+ color: rgb(24 24 24);
185
186
  }
186
187
 
187
188
  .chip-item {
188
- border: 2px solid rgb(92, 92, 92);
189
+ border: 2px solid rgb(92 92 92);
189
190
  border-radius: 4px;
190
- color: rgb(92, 92, 92);
191
+ color: rgb(92 92 92);
191
192
  font-weight: 600;
192
193
  padding: 2px 4px;
193
194
  }
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <dx-featured-content-header
3
3
  class="documentation_header"
4
- title="Content Archive"
4
+ header="Content Archive"
5
5
  body="Learn more about the topics that interest you most by exploring the full collection of Salesforce Developers blog and podcast content."
6
6
  dark="true"
7
7
  no-swoop={isMobile}
@@ -11,7 +11,7 @@
11
11
  <dx-modal-drawer open={modalOpen} onclickclose={toggleModal}>
12
12
  <img
13
13
  if:true={filtersLoading}
14
- src="/assets/svg/sidebar-loading.svg"
14
+ src="https://a.sfdcstatic.com/developer-website/images/sidebar-loading.svg"
15
15
  alt="loading"
16
16
  class="modal-loading"
17
17
  />
@@ -27,13 +27,13 @@
27
27
  </div>
28
28
  <dx-filter-menu
29
29
  name="content-type"
30
- title={contentTypeTitle}
30
+ header={contentTypeTitle}
31
31
  options={contentTypeList}
32
32
  onchange={handleUpdateSiteFilter}
33
33
  ></dx-filter-menu>
34
34
  <dx-filter-menu
35
35
  name="dates"
36
- title={dateTitle}
36
+ header={dateTitle}
37
37
  options={dateList}
38
38
  variant="nested"
39
39
  filters-dates-loading={filtersDatesLoading}
@@ -42,17 +42,23 @@
42
42
  <template if:false={hideBlogFilters}>
43
43
  <dx-filter-menu
44
44
  name="authors"
45
- title={authorTitle}
45
+ header={authorTitle}
46
46
  options={authorList}
47
47
  onchange={handleFiltersEvent}
48
48
  ></dx-filter-menu>
49
49
  </template>
50
50
  <dx-filter-menu
51
51
  name="categories"
52
- title={categoryTitle}
52
+ header={categoryTitle}
53
53
  options={categoryList}
54
54
  onchange={handleFiltersEvent}
55
55
  ></dx-filter-menu>
56
+ <dx-filter-menu
57
+ name="language"
58
+ header={languageTitle}
59
+ options={languagesList}
60
+ onchange={handleFiltersEvent}
61
+ ></dx-filter-menu>
56
62
  </template>
57
63
  </dx-modal-drawer>
58
64
  </template>
@@ -60,7 +66,7 @@
60
66
  <template if:false={isMobile}>
61
67
  <img
62
68
  if:true={filtersLoading}
63
- src="/assets/svg/sidebar-loading.svg"
69
+ src="https://a.sfdcstatic.com/developer-website/images/sidebar-loading.svg"
64
70
  alt="loading"
65
71
  />
66
72
  <template if:false={filtersLoading}>
@@ -75,13 +81,13 @@
75
81
  </div>
76
82
  <dx-filter-menu
77
83
  name="contentType"
78
- title={contentTypeTitle}
84
+ header={contentTypeTitle}
79
85
  options={contentTypeList}
80
86
  onchange={handleUpdateSiteFilter}
81
87
  ></dx-filter-menu>
82
88
  <dx-filter-menu
83
89
  name="dates"
84
- title={dateTitle}
90
+ header={dateTitle}
85
91
  options={dateList}
86
92
  filters-dates-loading={filtersDatesLoading}
87
93
  variant="nested"
@@ -90,17 +96,23 @@
90
96
  <template if:false={hideBlogFilters}>
91
97
  <dx-filter-menu
92
98
  name="authors"
93
- title={authorTitle}
99
+ header={authorTitle}
94
100
  options={authorList}
95
101
  onchange={handleFiltersEvent}
96
102
  ></dx-filter-menu>
97
103
  </template>
98
104
  <dx-filter-menu
99
105
  name="categories"
100
- title={categoryTitle}
106
+ header={categoryTitle}
101
107
  options={categoryList}
102
108
  onchange={handleFiltersEvent}
103
109
  ></dx-filter-menu>
110
+ <dx-filter-menu
111
+ name="language"
112
+ header={languageTitle}
113
+ options={languagesList}
114
+ onchange={handleFiltersEvent}
115
+ ></dx-filter-menu>
104
116
  </template>
105
117
  </template>
106
118
  <template if:true={isMobile}>
@@ -180,6 +192,27 @@
180
192
  </template>
181
193
  </div>
182
194
  </template>
195
+ <template if:true={selectedFilterMenuData.language.length}>
196
+ <div class="chip-item-container">
197
+ <p class="chip-title">Language</p>
198
+ <template
199
+ for:each={selectedFilterMenuData.language}
200
+ for:item="lang"
201
+ >
202
+ <span class="chip-item" key={lang}>
203
+ {lang.name}
204
+ <dx-button
205
+ name="language"
206
+ onclick={removeFilterItem}
207
+ value={lang}
208
+ variant="inline"
209
+ >
210
+ &#10005;
211
+ </dx-button>
212
+ </span>
213
+ </template>
214
+ </div>
215
+ </template>
183
216
  <template if:true={selectedFilterMenuData.dates.length}>
184
217
  <div class="chip-item-container">
185
218
  <p class="chip-title">Date</p>
@@ -245,7 +278,7 @@
245
278
  </template>
246
279
  </div>
247
280
  <h3 class="results-heading" if:false={loading}>{resultsHeading}</h3>
248
- <hr />
281
+ <hr if:false={isEmptyState} />
249
282
  <template if:true={loading}>
250
283
  <template if:false={modalOpen}>
251
284
  <div class="spinner-container">
@@ -279,7 +312,7 @@
279
312
  <dx-card-minimal
280
313
  key={post.id}
281
314
  content-type={post.contentType}
282
- title={post.title}
315
+ header={post.title}
283
316
  href={post.href}
284
317
  ></dx-card-minimal>
285
318
  </template>
@@ -288,24 +321,23 @@
288
321
  </template>
289
322
  <template for:each={posts} for:item="post">
290
323
  <template if:false={isMinimalCard}>
291
- <template if:true={post.author}>
324
+ <template if:true={post.authors}>
292
325
  <dx-card-expanded
293
326
  key={post.id}
294
- title={post.title}
327
+ header={post.title}
295
328
  content-type={post.contentType}
296
329
  href={post.href}
297
330
  date={post.date}
298
331
  body={post.excerpt}
299
- author-img-src={post.authorImgSrc}
300
- author-label={post.author.name}
332
+ authors={post.authors}
301
333
  topics={post.topics}
302
334
  length={post.duration}
303
335
  ></dx-card-expanded>
304
336
  </template>
305
- <template if:false={post.author}>
337
+ <template if:false={post.authors}>
306
338
  <dx-card-expanded
307
339
  key={post.id}
308
- title={post.title}
340
+ header={post.title}
309
341
  content-type={post.contentType}
310
342
  href={post.href}
311
343
  date={post.date}
@@ -329,11 +361,13 @@
329
361
  </template>
330
362
  </template>
331
363
  <template if:true={isEmptyState}>
332
- <div class="empty-state-container">
333
- <p class="empty-state-text">
334
- Please try a different filter selection.
335
- </p>
336
- </div>
364
+ <dx-empty-state
365
+ variant="alt"
366
+ header="Beep boop. That did not compute."
367
+ subtitle={emptyStateSubtitle}
368
+ body={emptyStateBody}
369
+ suggestions={emptyStateSuggestions}
370
+ ></dx-empty-state>
337
371
  </template>
338
372
  </div>
339
373
  </div>