@salesforcedevs/docs-components 1.3.104 → 1.3.105-image-resizing-2
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": "1.3.
|
|
3
|
+
"version": "1.3.105-image-resizing-2",
|
|
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
|
}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
@import "dxHelpers/text";
|
|
8
8
|
@import "dxHelpers/reset";
|
|
9
9
|
@import "dxHelpers/table";
|
|
10
|
+
@import "docHelpers/imgStyle";
|
|
10
11
|
|
|
11
12
|
.doc-content {
|
|
12
13
|
width: 100%;
|
|
@@ -40,17 +41,10 @@
|
|
|
40
41
|
padding-bottom: var(--dx-g-spacing-sm);
|
|
41
42
|
}
|
|
42
43
|
|
|
43
|
-
img.content-image {
|
|
44
|
-
height: auto;
|
|
45
|
-
display: unset;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
44
|
.image-block .content-image {
|
|
49
45
|
margin-top: var(--dx-g-spacing-lg);
|
|
50
46
|
margin-bottom: var(--dx-g-spacing-sm);
|
|
51
47
|
display: block;
|
|
52
|
-
margin-left: auto;
|
|
53
|
-
margin-right: auto;
|
|
54
48
|
}
|
|
55
49
|
|
|
56
50
|
td > img.content-image:first-child:last-child[alt="Yes"],
|
|
@@ -111,6 +105,10 @@ h6 {
|
|
|
111
105
|
margin: var(--dx-g-spacing-sm) 0 var(--dx-g-spacing-sm) 0;
|
|
112
106
|
}
|
|
113
107
|
|
|
108
|
+
img {
|
|
109
|
+
image-rendering: -webkit-optimize-contrast;
|
|
110
|
+
}
|
|
111
|
+
|
|
114
112
|
p,
|
|
115
113
|
.p {
|
|
116
114
|
font-family: var(--dx-g-font-sans);
|
|
@@ -366,13 +364,30 @@ ul ul ul ul ul ul {
|
|
|
366
364
|
margin: var(--dx-g-spacing-lg) 0;
|
|
367
365
|
}
|
|
368
366
|
|
|
369
|
-
figure
|
|
367
|
+
figure,
|
|
368
|
+
.fig {
|
|
370
369
|
margin: var(--dx-g-spacing-lg) 0;
|
|
370
|
+
text-align: left;
|
|
371
|
+
display: flex;
|
|
372
|
+
flex-direction: column;
|
|
373
|
+
align-items: left;
|
|
374
|
+
justify-content: left;
|
|
371
375
|
}
|
|
372
376
|
|
|
373
|
-
figcaption
|
|
377
|
+
figcaption,
|
|
378
|
+
.figcap {
|
|
379
|
+
display: block;
|
|
374
380
|
font-size: var(--dx-g-text-xs);
|
|
375
|
-
margin
|
|
381
|
+
margin: var(--dx-g-spacing-sm) 0;
|
|
382
|
+
order: 2;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
.figcap .image {
|
|
386
|
+
order: 1;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
.fig.fig-centered {
|
|
390
|
+
text-align: center;
|
|
376
391
|
}
|
|
377
392
|
|
|
378
393
|
code,
|
|
@@ -253,6 +253,7 @@ export default class Content extends LightningElement {
|
|
|
253
253
|
const label = mediaEl.getAttribute("label");
|
|
254
254
|
const width = mediaEl.getAttribute("width");
|
|
255
255
|
const height = mediaEl.getAttribute("height");
|
|
256
|
+
const className = mediaEl.getAttribute("class");
|
|
256
257
|
|
|
257
258
|
if (isImage) {
|
|
258
259
|
src = src.startsWith("/")
|
|
@@ -277,8 +278,11 @@ export default class Content extends LightningElement {
|
|
|
277
278
|
if (width) {
|
|
278
279
|
img.width = parseFloat(width);
|
|
279
280
|
}
|
|
281
|
+
if (className) {
|
|
282
|
+
img.className = className;
|
|
283
|
+
}
|
|
280
284
|
|
|
281
|
-
img.className =
|
|
285
|
+
img.className = `content-image ${img.className}`;
|
|
282
286
|
mediaEl.parentNode!.insertBefore(img, mediaEl);
|
|
283
287
|
} else {
|
|
284
288
|
const contentMediaEl = createElement("doc-content-media", {
|
|
@@ -324,9 +328,8 @@ export default class Content extends LightningElement {
|
|
|
324
328
|
event.preventDefault();
|
|
325
329
|
// eslint-disable-next-line no-use-before-define
|
|
326
330
|
const target = event.currentTarget.dataset.id;
|
|
327
|
-
const [page, docId, deliverable, tempContentDocumentId] =
|
|
328
|
-
"/"
|
|
329
|
-
);
|
|
331
|
+
const [page, docId, deliverable, tempContentDocumentId] =
|
|
332
|
+
target.split("/");
|
|
330
333
|
const [contentDocumentId, hash] = tempContentDocumentId.split("#");
|
|
331
334
|
const newPageReference = {
|
|
332
335
|
page: page,
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
img.content-image {
|
|
2
|
+
height: auto;
|
|
3
|
+
display: unset;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.content-image.image-framed {
|
|
7
|
+
border: 1px solid black;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.content-image.image-framed-light {
|
|
11
|
+
border: 1px solid var(--dx-g-gray-90);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.content-image.image-xxl,
|
|
15
|
+
.content-image.image-full {
|
|
16
|
+
max-width: 1000px;
|
|
17
|
+
width: 100%;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.content-image.image-xl {
|
|
21
|
+
max-width: 750px;
|
|
22
|
+
width: 100%;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.content-image.image-lg {
|
|
26
|
+
max-width: 660px;
|
|
27
|
+
width: 100%;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.content-image.image-md {
|
|
31
|
+
max-width: 500px;
|
|
32
|
+
width: 100%;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.content-image.image-sm {
|
|
36
|
+
max-width: 330px;
|
|
37
|
+
width: 100%;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.content-image.image-xs {
|
|
41
|
+
max-width: 250px;
|
|
42
|
+
width: 100%;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.content-image.image-xxs {
|
|
46
|
+
max-width: 125px;
|
|
47
|
+
width: 100%;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.content-image.image-icon-lg {
|
|
51
|
+
max-width: 32px;
|
|
52
|
+
width: 100%;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.content-image.image-icon-md {
|
|
56
|
+
max-width: 20px;
|
|
57
|
+
width: 100%;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.content-image.image-icon-sm {
|
|
61
|
+
max-width: 16px;
|
|
62
|
+
width: 100%;
|
|
63
|
+
}
|
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.
|