@salesforcedevs/dw-components 0.74.4 → 0.79.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforcedevs/dw-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.79.0",
|
|
4
4
|
"description": "Lightning web components for https://developer.salesforce.com",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
"@types/lodash.orderby": "^4.6.7",
|
|
23
23
|
"@types/lodash.uniqby": "^4.7.7"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "177e8785774cae83a81b6ed9cfca46974eb9ba86"
|
|
26
26
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { api, LightningElement } from "lwc";
|
|
2
|
-
import { DocsTile, DropdownItem, CodeSample } from "typings/custom";
|
|
3
2
|
import qs from "query-string";
|
|
4
3
|
import uniqBy from "lodash.uniqby";
|
|
5
4
|
import orderBy from "lodash.orderby";
|
|
6
5
|
import cloneDeep from "lodash.clonedeep";
|
|
6
|
+
import { DocsTile, DropdownItem, CodeSample } from "typings/custom";
|
|
7
|
+
import { toJson } from "dxUtils/normalizers";
|
|
7
8
|
|
|
8
9
|
const PRODUCT_FILTER_ALL_PRODUCTS = "all products";
|
|
9
10
|
const LANGUAGE_FILTER_LABEL = "Type";
|
|
@@ -114,7 +115,7 @@ export default class CodeSamplesGrid extends LightningElement {
|
|
|
114
115
|
|
|
115
116
|
@api
|
|
116
117
|
set featuredCodeSample(value: string) {
|
|
117
|
-
this._featuredCodeSample =
|
|
118
|
+
this._featuredCodeSample = toJson(value);
|
|
118
119
|
}
|
|
119
120
|
get featuredCodeSample(): CodeSample {
|
|
120
121
|
return this._featuredCodeSample;
|
|
@@ -122,7 +123,8 @@ export default class CodeSamplesGrid extends LightningElement {
|
|
|
122
123
|
|
|
123
124
|
@api
|
|
124
125
|
set samples(value: string) {
|
|
125
|
-
|
|
126
|
+
console.log(value);
|
|
127
|
+
const jsonSamples = toJson(value) || [];
|
|
126
128
|
this._samplesList = jsonSamples.map((sample, i) => ({
|
|
127
129
|
id: i,
|
|
128
130
|
title: sample.title,
|
|
@@ -144,7 +146,7 @@ export default class CodeSamplesGrid extends LightningElement {
|
|
|
144
146
|
|
|
145
147
|
@api
|
|
146
148
|
set products(value: string) {
|
|
147
|
-
const productsFilters =
|
|
149
|
+
const productsFilters = toJson(value).map((sample: string) => ({
|
|
148
150
|
label: sample,
|
|
149
151
|
value: sample.toLowerCase()
|
|
150
152
|
}));
|
|
@@ -167,7 +169,7 @@ export default class CodeSamplesGrid extends LightningElement {
|
|
|
167
169
|
|
|
168
170
|
@api
|
|
169
171
|
set types(value: string) {
|
|
170
|
-
const typesFilter =
|
|
172
|
+
const typesFilter = toJson(value).map((sample: string) => ({
|
|
171
173
|
label: sample,
|
|
172
174
|
value: sample.toLowerCase()
|
|
173
175
|
}));
|
|
@@ -190,7 +192,7 @@ export default class CodeSamplesGrid extends LightningElement {
|
|
|
190
192
|
|
|
191
193
|
@api
|
|
192
194
|
set sources(value: string) {
|
|
193
|
-
const parsedValues =
|
|
195
|
+
const parsedValues = toJson(value);
|
|
194
196
|
this.showSourcesFilter = parsedValues.length > 0;
|
|
195
197
|
const sourcesFilter = parsedValues.map((sample: string) => ({
|
|
196
198
|
label: sample,
|
|
@@ -2,7 +2,7 @@ import { LightningElement } from "lwc";
|
|
|
2
2
|
import { getTableData, RCG_URL } from "./getTableData";
|
|
3
3
|
import altData from "./altData";
|
|
4
4
|
|
|
5
|
-
export default class
|
|
5
|
+
export default class RCGTable extends LightningElement {
|
|
6
6
|
private columnData = null;
|
|
7
7
|
private rowData = null;
|
|
8
8
|
private rcgUrl = RCG_URL;
|