@salesforcedevs/docs-components 0.55.4 → 0.55.5-alpha01
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/docs-components",
|
|
3
|
-
"version": "0.55.
|
|
3
|
+
"version": "0.55.5-alpha01",
|
|
4
4
|
"description": "Docs Lightning web components for DSC",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "index.js",
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"@types/lodash.orderby": "^4.6.7",
|
|
25
25
|
"@types/lodash.uniqby": "^4.7.7"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "4629fdd9ca18a13480044ad43515b91945d16aad"
|
|
28
28
|
}
|
|
@@ -150,11 +150,26 @@ export default class Content extends LightningElement {
|
|
|
150
150
|
is: ContentCallout
|
|
151
151
|
});
|
|
152
152
|
const detailEls = calloutEl.querySelectorAll(
|
|
153
|
-
"p, div.data, ol, ul,
|
|
153
|
+
"p, div.data, ol, ul, p+.codeSection, .mediaBd > span.ph"
|
|
154
154
|
);
|
|
155
155
|
detailEls.forEach((detailEl) => {
|
|
156
|
-
|
|
156
|
+
if (detailEl.innerHTML.trim() !== "") {
|
|
157
|
+
calloutCompEl.appendChild(detailEl);
|
|
158
|
+
}
|
|
157
159
|
});
|
|
160
|
+
|
|
161
|
+
let flag = 1;
|
|
162
|
+
for (let i = 0; i < detailEls.length; i++) {
|
|
163
|
+
flag &= detailEls[i].innerHTML.trim() === "";
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
if (flag) {
|
|
167
|
+
const codeEls = calloutEl.querySelectorAll(".codeSection");
|
|
168
|
+
codeEls.forEach((codeEl) => {
|
|
169
|
+
calloutCompEl.appendChild(codeEl);
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
|
|
158
173
|
const type = calloutEl.querySelector("h4").textContent;
|
|
159
174
|
const typeLower = type.toLowerCase();
|
|
160
175
|
Object.assign(calloutCompEl, {
|
|
@@ -182,25 +182,22 @@ export default class DocXmlContent extends LightningElementWithState<{
|
|
|
182
182
|
|
|
183
183
|
private get useOldSidebar(): boolean {
|
|
184
184
|
// Coveo is enabled and the version is greater than 51 (within the latest 3 versions)
|
|
185
|
-
// TODO: we need
|
|
185
|
+
// TODO: we need a better fix for version number check
|
|
186
186
|
return !(
|
|
187
187
|
process.env.COVEO_ORGANIZATION_ID &&
|
|
188
188
|
process.env.COVEO_PUBLIC_ACCESS_TOKEN &&
|
|
189
|
-
|
|
189
|
+
(!this.version?.releaseVersion ||
|
|
190
|
+
(this.version?.releaseVersion &&
|
|
191
|
+
parseInt(this.version.releaseVersion.replace("v", ""), 10) >
|
|
192
|
+
51))
|
|
190
193
|
);
|
|
191
194
|
}
|
|
192
195
|
|
|
193
196
|
private get coveoAdvancedQueryConfig(): CoveoAdvancedQueryXMLConfig {
|
|
194
197
|
return {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
: {
|
|
199
|
-
objecttype: "HTDeveloperDocumentsC",
|
|
200
|
-
sflocale__c: this.languageId,
|
|
201
|
-
sfrelease__c: this.releaseVersionId,
|
|
202
|
-
sfdelivarable__c: this.deliverable
|
|
203
|
-
})
|
|
198
|
+
locale: this.languageId,
|
|
199
|
+
version: this.releaseVersionId,
|
|
200
|
+
topicid: this.deliverable
|
|
204
201
|
};
|
|
205
202
|
}
|
|
206
203
|
|
package/LICENSE
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
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.
|