@salesforcedevs/dw-components 0.75.2 → 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/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.
|
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": {
|
|
@@ -21,5 +21,6 @@
|
|
|
21
21
|
"@types/lodash.clonedeep": "^4.5.7",
|
|
22
22
|
"@types/lodash.orderby": "^4.6.7",
|
|
23
23
|
"@types/lodash.uniqby": "^4.7.7"
|
|
24
|
-
}
|
|
24
|
+
},
|
|
25
|
+
"gitHead": "177e8785774cae83a81b6ed9cfca46974eb9ba86"
|
|
25
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,
|