@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
@@ -0,0 +1,540 @@
1
+ import { api, LightningElement } from "lwc";
2
+ import { toJson } from "dxUtils/normalizers";
3
+ import { DocsTile, DropdownItem, Language } from "typings/custom";
4
+ import qs from "query-string";
5
+ import uniqBy from "lodash.uniqby";
6
+ import orderBy from "lodash.orderby";
7
+ import { isGivenLanguageSupported } from "dxUtils/language";
8
+
9
+ const DSC_API_URL = {
10
+ "en-us": "/docs/get_index/en-us/000.0/false/All%20Services/all",
11
+ "ja-jp": "/docs/get_index/ja-jp/000.0/false/All%20Services/all"
12
+ };
13
+ const PRODUCT_FILTER_ALL_SERVICES = "all services";
14
+ const LANGUAGE_FILTER_LABEL = "Language";
15
+ const WAIT_TIME = 500;
16
+
17
+ export default abstract class DocsGrid extends LightningElement {
18
+ searchTerm = "";
19
+ selectedProductFilters: string[] | null = null;
20
+ selectedLanguageFilter = "en-us";
21
+
22
+ page = 1;
23
+ pageSize = 24;
24
+ startingRecord = 1;
25
+ endingRecord = 24;
26
+ totalRecountCount = 0;
27
+ totalPages = 0;
28
+ error: any = undefined;
29
+ dataRetrieved = false;
30
+ showProductFilters = false;
31
+
32
+ private _externalMicrosites?: any[] = [];
33
+ private _otherDocs?: any[] = [];
34
+ private _apiDocs?: any[] = [];
35
+ private _languageList?: any[] = [];
36
+ private _productFiltersList?: any[] = [];
37
+ private matchDesktop!: MediaQueryList;
38
+ private matchMobile!: MediaQueryList;
39
+ private matchMobileSmall!: MediaQueryList;
40
+ private deviceType: "desktop" | "mobile" | "mobile-small" = "desktop";
41
+ private _searchTimeout?: number;
42
+ private _couchDbDocTileExclusions?: Set<any>;
43
+ private _allLanguages: Array<Language> = [];
44
+
45
+ connectedCallback(): void {
46
+ this.retrieveDscApis(true);
47
+
48
+ this.matchDesktop = window.matchMedia("(min-width: 1024px)");
49
+ this.matchDesktop.addEventListener("change", this.handleDesktopView);
50
+
51
+ this.matchMobile = window.matchMedia(
52
+ "(min-width: 401px) and (max-width: 1023px)"
53
+ );
54
+ this.matchMobile.addEventListener("change", this.handleMobileView);
55
+
56
+ this.matchMobileSmall = window.matchMedia("(max-width: 340px)");
57
+ this.matchMobileSmall.addEventListener(
58
+ "change",
59
+ this.handleMobileSmallView
60
+ );
61
+
62
+ if (this.matchMobile.matches) {
63
+ this.deviceType = "mobile";
64
+ }
65
+ if (this.matchMobileSmall.matches) {
66
+ this.deviceType = "mobile-small";
67
+ }
68
+
69
+ window.addEventListener("popstate", this.handleURLStateChange);
70
+ }
71
+
72
+ disconnectedCallback(): void {
73
+ this.matchDesktop.removeEventListener("change", this.handleDesktopView);
74
+ this.matchMobile.removeEventListener("change", this.handleMobileView);
75
+ this.matchMobileSmall.removeEventListener(
76
+ "change",
77
+ this.handleMobileSmallView
78
+ );
79
+ }
80
+
81
+ @api apiDomain = "https://developer.salesforce.com";
82
+
83
+ @api
84
+ get externalMicrosites() {
85
+ return this._externalMicrosites || [];
86
+ }
87
+
88
+ set externalMicrosites(value: any[]) {
89
+ this._externalMicrosites = toJson(value).map((site, index) => {
90
+ return {
91
+ ...site,
92
+ service: site.brand,
93
+ id: `external-site-${index}`,
94
+ target: "_blank"
95
+ };
96
+ });
97
+ }
98
+
99
+ @api
100
+ get otherDocs() {
101
+ return this._otherDocs || [];
102
+ }
103
+
104
+ set otherDocs(value: any) {
105
+ const allDocs = toJson(value);
106
+ this._otherDocs = [];
107
+
108
+ for (const docs of allDocs) {
109
+ for (const project of docs.projects) {
110
+ const firstLink = project.contentTypes[0].href;
111
+
112
+ this._otherDocs.push({
113
+ id: project.id,
114
+ title: project.title,
115
+ description: project.description,
116
+ links: project.contentTypes,
117
+ service: project.meta.brand,
118
+ guidesHref: firstLink,
119
+ locale: docs.locale || "en-us"
120
+ });
121
+ }
122
+ }
123
+ }
124
+
125
+ @api
126
+ get couchDbDocTileExclusions() {
127
+ return this._couchDbDocTileExclusions || new Set<any>();
128
+ }
129
+
130
+ set couchDbDocTileExclusions(value: any) {
131
+ const exclusions = toJson(value);
132
+ this._couchDbDocTileExclusions = new Set(
133
+ exclusions.map((content) => content.toLowerCase())
134
+ );
135
+ }
136
+
137
+ get filteredDocs(): DocsTile[] {
138
+ if (this.selectedLanguageFilter !== "en-us") {
139
+ const sortedDocs = orderBy(
140
+ [
141
+ ...this._apiDocs,
142
+ ...this.getOtherDocsForSelectedLocale(),
143
+ ...this.externalMicrosites
144
+ ],
145
+ "title"
146
+ );
147
+ return this.filterDocs(sortedDocs);
148
+ }
149
+ const sortedDocs = orderBy(
150
+ [
151
+ ...this.getOtherDocsForSelectedLocale(),
152
+ ...this.externalMicrosites,
153
+ ...this._apiDocs
154
+ ],
155
+ "title"
156
+ );
157
+
158
+ return this.filterDocs(sortedDocs);
159
+ }
160
+
161
+ get currentPageDocs(): DocsTile[] {
162
+ return this.filteredDocs.slice(
163
+ this.startingRecord - 1,
164
+ this.endingRecord
165
+ );
166
+ }
167
+
168
+ get languageList(): DropdownItem[] {
169
+ return this._languageList || [];
170
+ }
171
+
172
+ set languageList(value) {
173
+ this._languageList = value.map(({ locale, label }) => ({
174
+ value: locale,
175
+ label: label.toLowerCase()
176
+ }));
177
+ }
178
+
179
+ get productFiltersList(): DropdownItem[] {
180
+ return this._productFiltersList || [];
181
+ }
182
+
183
+ set productFiltersList(value) {
184
+ const externalMicrositesFilters = this.externalMicrosites.map(
185
+ ({ brand }) => this.normalizeProductFilter(brand)
186
+ );
187
+ const otherDocsFilters = this.otherDocs.map(({ service }) =>
188
+ this.normalizeProductFilter(service)
189
+ );
190
+ const apiDocsFilters = value.map(({ name }) =>
191
+ this.normalizeProductFilter(name)
192
+ );
193
+ const filters = [
194
+ ...externalMicrositesFilters,
195
+ ...otherDocsFilters,
196
+ ...apiDocsFilters
197
+ ].filter((filter) => filter.value);
198
+
199
+ this._productFiltersList = orderBy(
200
+ uniqBy(filters, "value"),
201
+ ["value"],
202
+ ["asc"]
203
+ );
204
+ }
205
+
206
+ @api
207
+ get allLanguages(): Array<Language> {
208
+ return this._allLanguages;
209
+ }
210
+
211
+ set allLanguages(value: string) {
212
+ if (value) {
213
+ this._allLanguages = JSON.parse(value);
214
+ }
215
+ }
216
+
217
+ get showEmptyState() {
218
+ return this.dataRetrieved && !this.filteredDocs.length;
219
+ }
220
+
221
+ get languageFilterLabel() {
222
+ const selectedLanguage = this.languageList.find(
223
+ (language) => language.value === this.selectedLanguageFilter
224
+ );
225
+ const label = selectedLanguage && selectedLanguage.label;
226
+ return label || LANGUAGE_FILTER_LABEL;
227
+ }
228
+
229
+ get tileColumns() {
230
+ return this.deviceType === "desktop" ? "three" : "two";
231
+ }
232
+
233
+ get pagesToShow() {
234
+ return this.deviceType === "mobile-small" ? 3 : 5;
235
+ }
236
+
237
+ get hidePagination() {
238
+ return this.totalPages < 2;
239
+ }
240
+
241
+ get emptyStateSubtitle() {
242
+ return (
243
+ "No results" +
244
+ (this.searchTerm !== "" ? ` for "${this.searchTerm}"` : "")
245
+ );
246
+ }
247
+
248
+ getOtherDocsForSelectedLocale() {
249
+ const docsForLocale = this._otherDocs.filter(
250
+ (doc) => doc.locale === this.selectedLanguageFilter
251
+ );
252
+ return docsForLocale || [];
253
+ }
254
+
255
+ handleDesktopView = (e: MediaQueryListEvent | MediaQueryList) => {
256
+ if (e.matches) {
257
+ this.deviceType = "desktop";
258
+ }
259
+ };
260
+
261
+ handleMobileView = (e: MediaQueryListEvent | MediaQueryList) => {
262
+ if (e.matches) {
263
+ this.deviceType = "mobile";
264
+ }
265
+ };
266
+
267
+ handleMobileSmallView = (e: MediaQueryListEvent | MediaQueryList) => {
268
+ if (e.matches) {
269
+ this.deviceType = "mobile-small";
270
+ }
271
+ };
272
+
273
+ async retrieveDscApis(initialCall): Promise<void> {
274
+ const urlParams = this.getSearchParams();
275
+ this.setFilters(urlParams);
276
+
277
+ try {
278
+ const response = await fetch(
279
+ this.apiDomain + DSC_API_URL[this.selectedLanguageFilter]
280
+ );
281
+
282
+ if (response.ok) {
283
+ const json = await response.json();
284
+
285
+ if (json && json.content) {
286
+ this.normalizeApiDocs(json.content);
287
+
288
+ if (json.available_languages && !this.languageList.length) {
289
+ this.languageList = json.available_languages;
290
+ }
291
+
292
+ if (json.available_services) {
293
+ this.productFiltersList = json.available_services;
294
+
295
+ if (!this.selectedProductFilters.length) {
296
+ this.selectedProductFilters =
297
+ this.productFiltersList.map(
298
+ (filter) => filter.value
299
+ );
300
+ }
301
+ }
302
+
303
+ const currentPage = initialCall ? urlParams.page : "1";
304
+ this.calculatePagination(currentPage, true);
305
+ this.showProductFilters = true;
306
+ this.dataRetrieved = true;
307
+ this.error = undefined;
308
+ }
309
+ } else {
310
+ this.error = response.status;
311
+ }
312
+ } catch (error) {
313
+ this.showProductFilters = true;
314
+ this.error = error;
315
+ }
316
+ }
317
+
318
+ normalizeApiDocs(contents: any[]): void {
319
+ this._apiDocs = [];
320
+
321
+ for (const content of contents) {
322
+ if (this.isContentExcluded(content)) {
323
+ continue;
324
+ }
325
+ this._apiDocs.push({
326
+ id: content.id,
327
+ title: content.value.title,
328
+ description: content.value.shortdesc,
329
+ guidesHref: content
330
+ ? "/docs/" +
331
+ content.value._id +
332
+ "/" +
333
+ content.value.default_topic
334
+ : "",
335
+ service: content.value.service
336
+ });
337
+ }
338
+ }
339
+
340
+ isContentExcluded(content: any): boolean {
341
+ return (
342
+ content?.value &&
343
+ content?.value._id &&
344
+ this.couchDbDocTileExclusions.has(content.value._id.toLowerCase())
345
+ );
346
+ }
347
+
348
+ normalizeProductFilter(val) {
349
+ return {
350
+ label: val,
351
+ value: val && val.toLowerCase()
352
+ };
353
+ }
354
+
355
+ goToPage(e: CustomEvent) {
356
+ const page = e.detail;
357
+ this.displayRecordsPerPage(page);
358
+ this.setSearchParams("page", page ? page.toString() : "1");
359
+ this.scrollToTop();
360
+ }
361
+
362
+ displayRecordsPerPage: (page: number) => void = (page: number) => {
363
+ this.page = page;
364
+ this.startingRecord =
365
+ page === 1 ? page : (page - 1) * this.pageSize + 1;
366
+ this.endingRecord = this.pageSize * page;
367
+
368
+ this.endingRecord =
369
+ this.endingRecord > this.totalRecountCount
370
+ ? this.totalRecountCount
371
+ : this.endingRecord;
372
+ };
373
+
374
+ handleSearchChange(event): void {
375
+ const value = event.detail;
376
+ this.searchTerm = value.toLowerCase();
377
+
378
+ window.clearTimeout(this._searchTimeout);
379
+
380
+ this._searchTimeout = window.setTimeout(() => {
381
+ this.calculatePagination();
382
+ }, WAIT_TIME);
383
+ }
384
+
385
+ handleProductFilterChange(event): void {
386
+ if (event.detail.checkedValue === PRODUCT_FILTER_ALL_SERVICES) {
387
+ if (event.detail.checked) {
388
+ this.selectedProductFilters = this.productFiltersList.map(
389
+ (filter) => filter.value
390
+ );
391
+ } else {
392
+ this.selectedProductFilters = [];
393
+ }
394
+ } else {
395
+ let newList = event.detail.value;
396
+
397
+ if (!event.detail.checked) {
398
+ newList = newList.filter(
399
+ (val) => val !== PRODUCT_FILTER_ALL_SERVICES
400
+ );
401
+ }
402
+
403
+ this.selectedProductFilters = newList;
404
+ }
405
+ this.calculatePagination();
406
+ }
407
+
408
+ handleLanguageFilterChange(event): void {
409
+ this.selectedLanguageFilter = event.detail.value;
410
+ this.dataRetrieved = false;
411
+ this.setSearchParams("lang", this.selectedLanguageFilter);
412
+ this.retrieveDscApis(false);
413
+ }
414
+
415
+ filterDocs(docs) {
416
+ const filtered = docs.filter((contentItem) => {
417
+ const matchesSearchTerm =
418
+ this.findWithRegex(
419
+ contentItem.description.toLowerCase(),
420
+ this.searchTerm
421
+ ) ||
422
+ this.findWithRegex(
423
+ contentItem.title.toLowerCase(),
424
+ this.searchTerm
425
+ );
426
+
427
+ const matchesProductFilters =
428
+ !this.selectedProductFilters ||
429
+ !this.selectedProductFilters.length ||
430
+ this.selectedProductFilters.includes(
431
+ PRODUCT_FILTER_ALL_SERVICES
432
+ ) ||
433
+ (typeof contentItem.service === "string" &&
434
+ this.selectedProductFilters.includes(
435
+ contentItem.service.toLowerCase()
436
+ ));
437
+
438
+ return matchesSearchTerm && matchesProductFilters;
439
+ });
440
+ return filtered;
441
+ }
442
+
443
+ findWithRegex(baseString: string, searchWord: string) {
444
+ const regex = new RegExp(searchWord.replace(/\s/, ".*"));
445
+ return !!baseString.match(regex);
446
+ }
447
+
448
+ calculatePagination(page?: string, skipSetSearchParams?) {
449
+ this.page = parseInt(page, 10) || 1;
450
+ this.totalRecountCount = this.filteredDocs.length;
451
+ this.totalPages = Math.ceil(this.totalRecountCount / this.pageSize);
452
+
453
+ this.displayRecordsPerPage(this.page);
454
+
455
+ if (!skipSetSearchParams) {
456
+ this.setSearchParams();
457
+ }
458
+ }
459
+
460
+ scrollToTop() {
461
+ this.template
462
+ .querySelector(".docs-grid-container")
463
+ .scrollIntoView({ behavior: "smooth" });
464
+ }
465
+
466
+ getSearchParams() {
467
+ const { filter_text, service, lang, page } = qs.parse(
468
+ window.location.search
469
+ );
470
+ const params = {
471
+ searchTerm: filter_text,
472
+ productFilters: service,
473
+ languageFilter: lang,
474
+ page
475
+ };
476
+ return params;
477
+ }
478
+
479
+ setSearchParams(key?: string, val?) {
480
+ const service =
481
+ this.selectedProductFilters.length ===
482
+ this.productFiltersList.length
483
+ ? ""
484
+ : this.selectedProductFilters.join(",");
485
+
486
+ const params = {
487
+ filter_text: this.searchTerm,
488
+ service,
489
+ lang: this.selectedLanguageFilter,
490
+ page: this.page.toString()
491
+ };
492
+
493
+ if (key) {
494
+ params[key] = key === "service" ? val.join(",") : val;
495
+ }
496
+
497
+ for (const _key in params) {
498
+ if (!params[_key] || params[_key] === "") {
499
+ delete params[_key];
500
+ }
501
+ }
502
+
503
+ const searchParams = qs.stringify(params);
504
+
505
+ if (window.history.pushState) {
506
+ const { protocol, host, pathname, hash } = window.location;
507
+ const path = `${protocol}//${host}${pathname}?${searchParams}${hash}`;
508
+ window.history.pushState({ path }, "", path);
509
+ }
510
+ }
511
+
512
+ setFilters({
513
+ searchTerm = "",
514
+ productFilters = "",
515
+ languageFilter = "en-us"
516
+ }) {
517
+ this.searchTerm = searchTerm;
518
+ this.selectedProductFilters =
519
+ productFilters === "" ? [] : productFilters.split(",");
520
+
521
+ const isSupportedLocale = isGivenLanguageSupported(
522
+ this.allLanguages,
523
+ languageFilter
524
+ );
525
+ if (isSupportedLocale) {
526
+ this.selectedLanguageFilter = languageFilter;
527
+ }
528
+ }
529
+
530
+ handleURLStateChange = () => {
531
+ const urlParams = this.getSearchParams();
532
+
533
+ if (urlParams.languageFilter !== this.selectedLanguageFilter) {
534
+ this.retrieveDscApis(false);
535
+ } else {
536
+ this.setFilters(urlParams);
537
+ this.calculatePagination(urlParams.page, true);
538
+ }
539
+ };
540
+ }
@@ -0,0 +1,113 @@
1
+ .events-container {
2
+ overflow: hidden;
3
+ }
4
+
5
+ .events-list::part(content),
6
+ .events-list::part(text) {
7
+ z-index: 49;
8
+ }
9
+
10
+ .buffer {
11
+ margin-bottom: 100px;
12
+ }
13
+
14
+ dx-section::part(container) {
15
+ margin: 0 auto;
16
+ max-width: 880px;
17
+ box-sizing: content-box;
18
+ }
19
+
20
+ dx-section.events-action-bar::part(container) {
21
+ --dx-c-section-padding-bottom: 0;
22
+ }
23
+
24
+ dx-section.upcoming-events::part(container)::before {
25
+ content: "";
26
+ background-image: url(/assets/images/events-cloud1.svg);
27
+ width: 146px;
28
+ height: 106px;
29
+ position: absolute;
30
+ left: 0;
31
+ top: 0;
32
+ transform: translate(-100%, 0);
33
+ }
34
+
35
+ dx-section.upcoming-events::part(container)::after {
36
+ content: "";
37
+ background-image: url(/assets/images/events-cloud2.svg);
38
+ width: 152px;
39
+ height: 111px;
40
+ position: absolute;
41
+ right: 0;
42
+ top: 50%;
43
+ transform: translate(100%, -50%);
44
+ }
45
+
46
+ dx-section.past-events::part(container)::before {
47
+ content: "";
48
+ background-image: url(/assets/images/events-gradient-elipse.svg);
49
+ width: 2991px;
50
+ height: 839px;
51
+ position: absolute;
52
+ right: 50%;
53
+ top: 0;
54
+ transform: translate(50%, 0%);
55
+ }
56
+
57
+ dx-section:not(:nth-child(2)).past-events::part(container)::after {
58
+ content: "";
59
+ background-image: url(/assets/images/events-cloud3.svg);
60
+ width: 655px;
61
+ height: 270px;
62
+ position: absolute;
63
+ right: 0;
64
+ top: 0;
65
+ transform: translate(10%, -40%);
66
+ }
67
+
68
+ .events-list dx-card-event {
69
+ margin-bottom: var(--dx-g-spacing-3xl);
70
+ }
71
+
72
+ .records-container {
73
+ float: left;
74
+ display: flex;
75
+ align-items: center;
76
+ height: 32px;
77
+ }
78
+
79
+ .filters-container {
80
+ display: flex;
81
+ justify-content: flex-end;
82
+ }
83
+
84
+ .events-empty {
85
+ background: var(--dx-g-gray-95);
86
+ border-radius: 16px;
87
+ padding: var(--dx-g-spacing-2xl) 0;
88
+ display: flex;
89
+ align-items: center;
90
+ justify-content: center;
91
+ margin: var(--dx-g-spacing-2xl);
92
+ margin-bottom: 0;
93
+ }
94
+
95
+ @media screen and (max-width: 490px) {
96
+ .records-container {
97
+ display: none;
98
+ }
99
+ }
100
+
101
+ @media screen and (max-width: 768px) {
102
+ .events-empty {
103
+ display: block;
104
+ overflow: hidden;
105
+ margin: 0;
106
+ }
107
+ }
108
+
109
+ @media screen and (max-width: 1024px) {
110
+ dx-section.past-events::part(container)::after {
111
+ display: none;
112
+ }
113
+ }