@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,233 @@
1
+ import { LightningElement, api } from "lwc";
2
+ import { track } from "dxUtils/analytics";
3
+ import { CountryOptions, CheckboxTextSet } from "typings/custom";
4
+
5
+ const ANALYTICS_INFO = {
6
+ itemTitle: "newsletter sign up submit",
7
+ formName: "newsletter",
8
+ formType: "newsletter",
9
+ method: "email",
10
+ destinationType: "internal",
11
+ clickText: "Subscribe Now",
12
+ clickUrl: "/newsletter/success",
13
+ elementType: "button",
14
+ ctaClick: true
15
+ };
16
+
17
+ export default class Form extends LightningElement {
18
+ @api checkboxTextSet: string = "";
19
+ @api countries: string = "";
20
+
21
+ private firstName: string = "";
22
+ private lastName: string = "";
23
+ private email: string = "";
24
+ private country: string = "";
25
+
26
+ private showLegalText: boolean = false;
27
+ private showLegalCheckbox: boolean = false;
28
+ private legalText: string = "";
29
+ private marketingText: string | null = null;
30
+ private hasRendered: boolean = false;
31
+
32
+ renderedCallback() {
33
+ if (!this.hasRendered) {
34
+ // Focus the first input in the form
35
+ this.template.querySelector("dx-input")?.focus();
36
+
37
+ this.setInitialEmail();
38
+ this.hasRendered = true;
39
+ } else if (this.hasRendered && this.showLegalCheckbox) {
40
+ // Grab the legal checkbox and append the legal text as innerHTML (text has anchor links in it)
41
+ const legalCheckboxElement = this.template.querySelector(
42
+ "dx-checkbox.legal-checkbox"
43
+ );
44
+ const legalCheckboxSpan = document.createElement("span");
45
+ this.setInnerHtml(legalCheckboxSpan, this.legalText);
46
+
47
+ if (legalCheckboxElement) {
48
+ legalCheckboxElement.appendChild(legalCheckboxSpan);
49
+ }
50
+ }
51
+ }
52
+
53
+ handleKeyDown(e: KeyboardEvent) {
54
+ if (e.key === "Enter") {
55
+ this.handleSubmit(e);
56
+ }
57
+ }
58
+
59
+ handleChange(e: any) {
60
+ switch (e.target.name) {
61
+ case "fname":
62
+ this.firstName = e.target.value;
63
+ break;
64
+ case "lname":
65
+ this.lastName = e.target.value;
66
+ break;
67
+ case "email":
68
+ this.email = e.target.value;
69
+ break;
70
+ case "country":
71
+ this.country = e.target.value;
72
+ this.handleConsent(e.target);
73
+ break;
74
+ default:
75
+ break;
76
+ }
77
+ }
78
+
79
+ handleSubmit(e: Event) {
80
+ e.preventDefault();
81
+
82
+ const allFormElements = Array.from(
83
+ this.template.querySelectorAll<HTMLFormElement>(
84
+ "dx-input, dx-select, dx-checkbox"
85
+ )
86
+ );
87
+
88
+ const legalCheckboxElement = this.template.querySelector(
89
+ "dx-checkbox.legal-checkbox"
90
+ ) as HTMLFormElement;
91
+
92
+ if (legalCheckboxElement) {
93
+ allFormElements.push(legalCheckboxElement);
94
+ }
95
+
96
+ const passed = !allFormElements
97
+ .map((formElement) => formElement.reportValidity())
98
+ .includes(false);
99
+
100
+ // All fields passed validation
101
+ if (passed) {
102
+ this.sendFormData();
103
+ }
104
+ }
105
+
106
+ setInitialEmail() {
107
+ // Set email if provided in the query param
108
+ const queryString = window.location.search;
109
+ const urlParams = new URLSearchParams(queryString);
110
+
111
+ const subscriberEmail = urlParams.get("subscriberEmail");
112
+
113
+ if (subscriberEmail) {
114
+ this.email = subscriberEmail;
115
+ }
116
+ }
117
+
118
+ getFormData() {
119
+ const date = new Date().toISOString();
120
+
121
+ return {
122
+ InfoEmail: true,
123
+ "First Name": this.firstName,
124
+ "Last Name": this.lastName,
125
+ Consent: "Implied",
126
+ "Email Status Update": date,
127
+ email: this.email,
128
+ Country: this.country,
129
+ "Privacy Policy": true,
130
+ referrer: "footer"
131
+ };
132
+ }
133
+
134
+ async sendFormData() {
135
+ const formData = this.getFormData();
136
+ const errorMsg = "Error while subscribing to newsletter";
137
+ const submitButtonEl = this.template.querySelector(
138
+ ".form-submit"
139
+ ) as HTMLFormElement;
140
+
141
+ submitButtonEl.setAttribute("disabled", "true");
142
+ submitButtonEl.textContent = "...Processing request";
143
+
144
+ try {
145
+ const res = await fetch("/pages/pardot/footer_optin", {
146
+ method: "POST",
147
+ headers: {
148
+ "Content-Type": "application/json"
149
+ },
150
+ body: JSON.stringify(formData)
151
+ });
152
+
153
+ if (!res.ok) {
154
+ throw new Error(errorMsg);
155
+ }
156
+
157
+ const data = await res.json();
158
+
159
+ if (!data.success) {
160
+ throw new Error(errorMsg);
161
+ }
162
+
163
+ // GTM event
164
+ track(submitButtonEl, "custEv_formCompletion", ANALYTICS_INFO);
165
+
166
+ window.location.assign("/newsletter/success");
167
+ } catch (error) {
168
+ if (submitButtonEl) {
169
+ submitButtonEl.setAttribute("disabled", "false");
170
+ submitButtonEl.textContent = "Subscribe Now";
171
+ }
172
+ console.error(error);
173
+ }
174
+ }
175
+
176
+ handleConsent(countrySelectElement: any) {
177
+ if (this.checkboxTextSet) {
178
+ const countryOptions = countrySelectElement.options.find(
179
+ (option: any) => option.value === countrySelectElement.value
180
+ );
181
+
182
+ this.setLegalAndMarketingData(countryOptions);
183
+ }
184
+ }
185
+
186
+ setLegalAndMarketingData(countryOptions: CountryOptions) {
187
+ // Parse the text sets for the checkbox info
188
+ const parsedCheckboxTextSet = JSON.parse(this.checkboxTextSet);
189
+
190
+ // Check for alternate text set or set to default
191
+ const checkboxTextSet = countryOptions.checkboxTextSet
192
+ ? parsedCheckboxTextSet[countryOptions.checkboxTextSet]
193
+ : parsedCheckboxTextSet.default;
194
+
195
+ // Set the checkbox text
196
+ this.setCheckboxTextSet(checkboxTextSet);
197
+
198
+ // Toggle visibility of legal/marketing data
199
+ this.toggleLegalAndMarketingVisibility(
200
+ countryOptions.showLegalText,
201
+ countryOptions.showLegalCheckbox
202
+ );
203
+
204
+ // Grab the legal text paragraph element and set inner html (this is due to text having html elements in the string)
205
+ const legalTextElement = this.template.querySelector(".legal-text");
206
+
207
+ if (legalTextElement && this.showLegalText) {
208
+ this.setInnerHtml(legalTextElement, this.legalText);
209
+ } else if (legalTextElement && !this.showLegalText) {
210
+ // Clear legal text
211
+ this.setInnerHtml(legalTextElement, "");
212
+ }
213
+ }
214
+
215
+ setCheckboxTextSet(checkboxTextSet: CheckboxTextSet) {
216
+ this.legalText = checkboxTextSet.legalText;
217
+ this.marketingText = checkboxTextSet.marketingText;
218
+ }
219
+
220
+ toggleLegalAndMarketingVisibility(
221
+ showLegalText: boolean,
222
+ showLegalCheckbox: boolean
223
+ ) {
224
+ this.showLegalText = showLegalText;
225
+ this.showLegalCheckbox = showLegalCheckbox;
226
+ }
227
+
228
+ setInnerHtml(element: HTMLElement, value: string) {
229
+ // disable lwc warning because text received from json has HTML
230
+ // eslint-disable-next-line @lwc/lwc/no-inner-html
231
+ element.innerHTML = value;
232
+ }
233
+ }
@@ -0,0 +1,91 @@
1
+ @import "dxHelpers/reset";
2
+ @import "dxHelpers/text";
3
+
4
+ .container {
5
+ background-repeat: no-repeat;
6
+ background-position: center;
7
+ display: flex;
8
+ flex-direction: column;
9
+ flex-wrap: wrap;
10
+ align-items: center;
11
+ justify-content: center;
12
+ text-align: center;
13
+ }
14
+
15
+ @media screen and (max-width: 768px) {
16
+ .container {
17
+ background-image: url("/assets/svg/podcast-subscription-clouds-small.svg");
18
+ background-size: auto 200px;
19
+ }
20
+
21
+ .dx-text-heading-4 {
22
+ max-width: 28ex;
23
+ font-size: var(--dx-g-text-lg);
24
+ }
25
+
26
+ .badges {
27
+ margin: 8px auto 6px auto;
28
+ text-align: center;
29
+ }
30
+
31
+ .badges a {
32
+ display: inline-block;
33
+ margin: 4px auto;
34
+ }
35
+
36
+ .badges img {
37
+ width: 164px;
38
+ }
39
+
40
+ .secondary-links {
41
+ display: none;
42
+ }
43
+
44
+ .or-wherever {
45
+ margin-top: 2px;
46
+ }
47
+ }
48
+
49
+ @media screen and (min-width: 768px) {
50
+ .container {
51
+ background-image: url("/assets/svg/podcast-subscription-clouds.svg");
52
+ min-height: 230px;
53
+ }
54
+
55
+ .badges {
56
+ display: flex;
57
+ flex-direction: row;
58
+ }
59
+
60
+ .badges a {
61
+ display: inline-block;
62
+ margin: 22px 13px 8px 13px;
63
+ }
64
+
65
+ .badges img {
66
+ height: 40px;
67
+ }
68
+
69
+ .or-wherever {
70
+ display: none;
71
+ }
72
+
73
+ .secondary-links {
74
+ display: flex;
75
+ flex-direction: row;
76
+ justify-content: space-between;
77
+ }
78
+
79
+ .secondary-links li {
80
+ margin: 9px 6px;
81
+ }
82
+
83
+ .secondary-links a {
84
+ color: var(--dx-g-blue-vibrant-50);
85
+ text-decoration: none;
86
+ }
87
+
88
+ .secondary-links a:hover {
89
+ text-decoration: underline;
90
+ }
91
+ }
@@ -0,0 +1,24 @@
1
+ <template>
2
+ <div class="container">
3
+ <h2 class="dx-text-heading-4">
4
+ Tune in to the Salesforce Developers Podcast
5
+ </h2>
6
+ <ul class="badges">
7
+ <template for:each={badgeLinks} for:item="badgeLink">
8
+ <li key={badgeLink.href}>
9
+ <a href={badgeLink.href}>
10
+ <img src={badgeLink.imgSrc} alt={badgeLink.imgAlt} />
11
+ </a>
12
+ </li>
13
+ </template>
14
+ </ul>
15
+ <p class="or-wherever">Or wherever you listen to podcasts!</p>
16
+ <ul class="secondary-links">
17
+ <template for:each={secondaryLinks} for:item="secondaryLink">
18
+ <li key={secondaryLink.href}>
19
+ <a href={secondaryLink.href}>{secondaryLink.text}</a>
20
+ </li>
21
+ </template>
22
+ </ul>
23
+ </div>
24
+ </template>
@@ -0,0 +1,52 @@
1
+ import { LightningElement } from "lwc";
2
+
3
+ export default class PodcastSubscription extends LightningElement {
4
+ badgeLinks = [
5
+ {
6
+ href: "https://podcasts.apple.com/us/podcast/salesforce-developer-podcast/id1482325260",
7
+ imgAlt: "Listen on Apple Podcasts",
8
+ imgSrc: "/assets/svg/podcasts-subscription-apple.svg"
9
+ },
10
+ {
11
+ href: "https://www.google.com/podcasts?feed=aHR0cHM6Ly9zYWxlc2ZvcmNlZGV2cG9kY2FzdC5saWJzeW4uY29tL3Jzcw%3D%3D",
12
+ imgAlt: "Listen on Google Podcasts",
13
+ imgSrc: "/assets/svg/podcasts-subscription-google.svg"
14
+ },
15
+ {
16
+ imgSrc: "/assets/svg/podcasts-subscription-spotify.svg",
17
+ imgAlt: "Listen on Spotify",
18
+ href: "https://open.spotify.com/show/75y378cB3FM6RQ8MGUDJ5M"
19
+ }
20
+ ];
21
+
22
+ secondaryLinks = [
23
+ {
24
+ href: "https://app.stitcher.com/browse/feed/470480/details",
25
+ text: "Stitcher"
26
+ },
27
+ {
28
+ href: "https://www.amazon.com/Emerald-City-Productions-Salesforce-Developer/dp/B082PPXMLN/",
29
+ text: "Alexa"
30
+ },
31
+ {
32
+ href: "https://www.pandora.com/podcast/salesforce-developer-podcast/PC:34746",
33
+ text: "Pandora"
34
+ },
35
+ {
36
+ href: "https://www.iheart.com/podcast/263-salesforce-developer-podca-56252827",
37
+ text: "iHeartRadio"
38
+ },
39
+ {
40
+ href: "https://tunein.com/podcasts/Technology-Podcasts/Salesforce-Developer-Podcast-p1255006/",
41
+ text: "Tune-in"
42
+ },
43
+ {
44
+ href: "https://player.fm/series/salesforce-developer-podcast",
45
+ text: "PlayerFM"
46
+ },
47
+ {
48
+ href: "https://dev.to/salesforce_developers_podcast",
49
+ text: "dev.to"
50
+ }
51
+ ];
52
+ }
@@ -0,0 +1,5 @@
1
+ @import "dwHelpers/postsGrid";
2
+
3
+ :host {
4
+ --dx-c-post-list-padding-horizontal: var(--dx-g-page-padding-horizontal-lg);
5
+ }
@@ -0,0 +1,29 @@
1
+ <template>
2
+ <div class="container">
3
+ <dx-grid columns={columns}>
4
+ <template for:each={postList} for:item="podcast">
5
+ <dx-card-podcast-episode
6
+ body={podcast.body}
7
+ datetime={podcast.datetime}
8
+ href={podcast.href}
9
+ key={podcast.id}
10
+ length={podcast.length}
11
+ title={podcast.title}
12
+ ></dx-card-podcast-episode>
13
+ </template>
14
+ </dx-grid>
15
+ <dx-hr
16
+ if:true={showLoadMore}
17
+ onclick={onClick}
18
+ variant="load-more"
19
+ text="LOAD MORE"
20
+ ></dx-hr>
21
+ <dx-hr
22
+ if:true={showArchives}
23
+ onclick={onClick}
24
+ variant="link"
25
+ href="/content-archive?content-type=Podcasts"
26
+ text="VIEW ARCHIVES"
27
+ ></dx-hr>
28
+ </div>
29
+ </template>
@@ -0,0 +1,9 @@
1
+ import { normalizeEpisode } from "dxUtils/normalizers";
2
+ import { NormalizedPost, WordpressPost } from "typings/custom";
3
+ import { PostsGrid } from "dwBaseElements/postsGrid";
4
+
5
+ export default class PodcastsGrid extends PostsGrid {
6
+ normalizePost(post: WordpressPost): NormalizedPost {
7
+ return normalizeEpisode(post);
8
+ }
9
+ }
@@ -0,0 +1,32 @@
1
+ /* PODCAST INFO SECTION */
2
+
3
+ .info-container {
4
+ display: flex;
5
+ flex-direction: column;
6
+ }
7
+
8
+ .info-container > * {
9
+ width: 100%;
10
+ }
11
+
12
+ .info-link {
13
+ margin-bottom: var(--dx-g-spacing-lg);
14
+ }
15
+
16
+ .info-link img {
17
+ /* following should be replaced with DX helpers/card.css class */
18
+ border-radius: 16px;
19
+ box-shadow: var(--dx-g-box-shadow-sm);
20
+ }
21
+
22
+ dx-hr {
23
+ --dx-c-hr-padding-horizontal: 0;
24
+ }
25
+
26
+ /* TABLET */
27
+
28
+ @media screen and (max-width: 1024px) {
29
+ .info-container {
30
+ margin-bottom: var(--dx-g-spacing-lg);
31
+ }
32
+ }
@@ -0,0 +1,36 @@
1
+ <template>
2
+ <dx-section title="Developer Podcast" part="section">
3
+ <slot name="section"></slot>
4
+ <dx-grid columns="one">
5
+ <dx-grid columns="two-slim-left">
6
+ <div class="info-container">
7
+ <a href="/podcast" class="info-link">
8
+ <img
9
+ src="/assets/images/dsc-home-podcast-art.svg"
10
+ loading="lazy"
11
+ alt="Developer Podcast"
12
+ style="width: 100%"
13
+ />
14
+ </a>
15
+ <span class="dx-text-body-2">
16
+ Tune in to the Developer Podcast to hear short and
17
+ insightful stories for developers, from developers. Join
18
+ Joshua Birk, Developer Evangelist and Godfather of
19
+ Trailhead, as he hosts developer trailblazers from
20
+ around the world as they share their stories of
21
+ learning, building, and integrating with Salesforce.
22
+ </span>
23
+ </div>
24
+ <dx-grid columns="one">
25
+ <slot></slot>
26
+ </dx-grid>
27
+ </dx-grid>
28
+ <dx-hr
29
+ part="hr"
30
+ variant="link"
31
+ href="/podcast"
32
+ text="More Episodes"
33
+ ></dx-hr>
34
+ </dx-grid>
35
+ </dx-section>
36
+ </template>
@@ -0,0 +1,3 @@
1
+ import { LightningElement } from "lwc";
2
+
3
+ export default class PodcastsPromo extends LightningElement {}
@@ -0,0 +1,78 @@
1
+ export default {
2
+ COLUMNS: [
3
+ {
4
+ label: "Package Type",
5
+ fieldName: "type",
6
+ type: "richText",
7
+ wrapText: true,
8
+ initialWidth: 220,
9
+ hideDefaultActions: true
10
+ },
11
+ {
12
+ label: "Version",
13
+ fieldName: "version",
14
+ type: "richText",
15
+ wrapText: true,
16
+ initialWidth: 110,
17
+ hideDefaultActions: true,
18
+ cellAttributes: {
19
+ alignment: "left"
20
+ }
21
+ },
22
+ {
23
+ label: "Description",
24
+ fieldName: "description",
25
+ type: "richText",
26
+ wrapText: true,
27
+ columnWidthsMode: "auto",
28
+ hideDefaultActions: true,
29
+ typeAttributes: {
30
+ tooltip: {
31
+ fieldName: "description"
32
+ }
33
+ }
34
+ },
35
+ {
36
+ label: "Link",
37
+ fieldName: "link",
38
+ type: "url",
39
+ wrapText: true,
40
+ initialWidth: 110,
41
+ hideDefaultActions: true,
42
+ typeAttributes: {
43
+ label: "Download",
44
+ target: "_self"
45
+ }
46
+ }
47
+ ],
48
+ DATA: [
49
+ {
50
+ id: "1",
51
+ type: "Mobility Packages Checksum",
52
+ version: "234_all",
53
+ description: "RCG Mobility Packages SHA256 Checksums",
54
+ link: "/mobility_packages_checksum.sha256"
55
+ },
56
+ {
57
+ id: "2",
58
+ type: "Modeler Installer",
59
+ version: "234.00010.0.0",
60
+ description: "Initial RCG Mobility Modeler Installer v234 release",
61
+ link: "/Modeler/modeler-build-000010-2021-09-29T15-34/CGCloudModelerSetup.v234.10.0.zip"
62
+ },
63
+ {
64
+ id: "3",
65
+ type: "Modeler Update Package",
66
+ version: "234.00010.0.0",
67
+ description: "Initial RCG Mobility Modeler MUP v234 release",
68
+ link: "/Modeler/modeler-build-000010-2021-09-29T15-34/MUP.v234.10.0.zip"
69
+ },
70
+ {
71
+ id: "4",
72
+ type: "Framework Update Package",
73
+ version: "234.0003.00",
74
+ description: "Initial RCG Mobility Modeler FUP v234 release",
75
+ link: "/FUP/FUP-234.0003.00/FUP.234.0003.00.zip"
76
+ }
77
+ ]
78
+ };
@@ -0,0 +1,10 @@
1
+ export const RCG_URL = "https://rcg-mobility-modeler-artefacts.herokuapp.com";
2
+
3
+ export const getTableData = () => {
4
+ return fetch(`${RCG_URL}/setupdata.json`).then((res) => {
5
+ if (res.ok) {
6
+ return res.json();
7
+ }
8
+ return {};
9
+ });
10
+ };
@@ -0,0 +1,39 @@
1
+ @import "dxHelpers/table";
2
+
3
+ table {
4
+ margin-top: 60px;
5
+ margin-bottom: 90px;
6
+ overflow-x: unset;
7
+ }
8
+
9
+ thead {
10
+ font-weight: bold;
11
+ }
12
+
13
+ caption {
14
+ display: none;
15
+ }
16
+
17
+ td {
18
+ white-space: nowrap;
19
+ }
20
+
21
+ .center {
22
+ text-align: center;
23
+ }
24
+
25
+ .quarter-width {
26
+ width: 25%;
27
+ }
28
+
29
+ @media screen and (max-width: 820px) {
30
+ td {
31
+ white-space: normal;
32
+ }
33
+ }
34
+
35
+ @media screen and (max-width: 480px) {
36
+ table {
37
+ overflow-x: scroll;
38
+ }
39
+ }
@@ -0,0 +1,31 @@
1
+ <template>
2
+ <table>
3
+ <caption>RCG Table</caption>
4
+ <thead id="table-head">
5
+ <tr>
6
+ <template for:each={columnData} for:item="column">
7
+ <th key={column.label}>{column.label}</th>
8
+ </template>
9
+ </tr>
10
+ </thead>
11
+ <tbody id="table-body">
12
+ <template for:each={rowData} for:item="row">
13
+ <tr key={row.id}>
14
+ <td>{row.type}</td>
15
+ <td>{row.version}</td>
16
+ <td>{row.description}</td>
17
+ <td class="quarter-width">
18
+ <dx-button
19
+ variant="inline"
20
+ href={row.link}
21
+ download="true"
22
+ icon-symbol="download"
23
+ >
24
+ Download
25
+ </dx-button>
26
+ </td>
27
+ </tr>
28
+ </template>
29
+ </tbody>
30
+ </table>
31
+ </template>