@social-mail/social-mail-client 1.2.150 → 1.2.152
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/dist/admin/AdminAppIndex.pack.js +151 -8
- package/dist/admin/AdminAppIndex.pack.js.map +1 -1
- package/dist/admin/AdminAppIndex.pack.min.js +63 -7
- package/dist/admin/AdminAppIndex.pack.min.js.map +1 -1
- package/dist/site-editor/blocks/Carousel.d.ts +9 -0
- package/dist/site-editor/blocks/Carousel.d.ts.map +1 -0
- package/dist/site-editor/blocks/Carousel.js +63 -0
- package/dist/site-editor/blocks/Carousel.js.map +1 -0
- package/dist/site-editor/blocks/ImageGallery.d.ts +9 -0
- package/dist/site-editor/blocks/ImageGallery.d.ts.map +1 -0
- package/dist/site-editor/blocks/ImageGallery.js +67 -0
- package/dist/site-editor/blocks/ImageGallery.js.map +1 -0
- package/dist/site-editor/blocks/VerticalImageBox.d.ts.map +1 -1
- package/dist/site-editor/blocks/VerticalImageBox.js +1 -2
- package/dist/site-editor/blocks/VerticalImageBox.js.map +1 -1
- package/dist/site-editor/editor/HtmlPageEditor.d.ts.map +1 -1
- package/dist/site-editor/editor/HtmlPageEditor.js +11 -3
- package/dist/site-editor/editor/HtmlPageEditor.js.map +1 -1
- package/dist/site-editor/editor/SelectedElement.js +1 -1
- package/dist/site-editor/editor/SelectedElement.js.map +1 -1
- package/dist/site-editor/editor/WebSitePageEditor.js +1 -1
- package/dist/site-editor/editor/WebSitePageEditor.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/web/AppIndex.pack.js +151 -8
- package/dist/web/AppIndex.pack.js.map +1 -1
- package/dist/web/AppIndex.pack.min.js +63 -7
- package/dist/web/AppIndex.pack.min.js.map +1 -1
- package/package.json +1 -1
- package/src/site-editor/blocks/Carousel.tsx +60 -0
- package/src/site-editor/blocks/ImageGallery.tsx +62 -0
- package/src/site-editor/blocks/VerticalImageBox.tsx +1 -2
- package/src/site-editor/editor/HtmlPageEditor.tsx +8 -0
- package/src/site-editor/editor/SelectedElement.tsx +1 -1
- package/src/site-editor/editor/WebSitePageEditor.tsx +1 -1
package/package.json
CHANGED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-namespace */
|
|
3
|
+
import XNode from "@web-atoms/core/dist/core/XNode";
|
|
4
|
+
import { Block } from "./Block";
|
|
5
|
+
import { StylerSets } from "../styler/StylerSets";
|
|
6
|
+
import styled from "@web-atoms/core/dist/style/styled";
|
|
7
|
+
import { defaultImageSrc } from "./defaultImage";
|
|
8
|
+
|
|
9
|
+
declare global {
|
|
10
|
+
namespace JSX {
|
|
11
|
+
interface IntrinsicElements {
|
|
12
|
+
"carousel-slider": any;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
StylerSets.register("low", styled.css `
|
|
18
|
+
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: row;
|
|
21
|
+
|
|
22
|
+
& > *:empty:before {
|
|
23
|
+
background-color: #ddd;
|
|
24
|
+
color: #000;
|
|
25
|
+
font-size: 16px;
|
|
26
|
+
font-weight: bold;
|
|
27
|
+
font-family: 'Courier New', Courier, monospace;
|
|
28
|
+
height: 100%;
|
|
29
|
+
display: flex;
|
|
30
|
+
justify-items: center;
|
|
31
|
+
align-items: center;
|
|
32
|
+
min-height: 30px;
|
|
33
|
+
opacity: 0.3;
|
|
34
|
+
border-radius: 3px;
|
|
35
|
+
white-space: nowrap;
|
|
36
|
+
overflow: hidden;
|
|
37
|
+
text-overflow: ellipsis;
|
|
38
|
+
content: "Container";
|
|
39
|
+
|
|
40
|
+
}
|
|
41
|
+
`.expand("carousel-slider"));
|
|
42
|
+
|
|
43
|
+
export const Carousel = Block({
|
|
44
|
+
className: "fad fa-gallery-thumbnails",
|
|
45
|
+
title: "Add Carousel",
|
|
46
|
+
factory: () => <carousel-slider>
|
|
47
|
+
<section styler-layout="vertical-image-box">
|
|
48
|
+
<img src={defaultImageSrc}/>
|
|
49
|
+
<section></section>
|
|
50
|
+
</section>
|
|
51
|
+
<section styler-layout="vertical-image-box">
|
|
52
|
+
<img src={defaultImageSrc}/>
|
|
53
|
+
<section></section>
|
|
54
|
+
</section>
|
|
55
|
+
<section styler-layout="vertical-image-box">
|
|
56
|
+
<img src={defaultImageSrc}/>
|
|
57
|
+
<section></section>
|
|
58
|
+
</section>
|
|
59
|
+
</carousel-slider>
|
|
60
|
+
});
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-namespace */
|
|
3
|
+
import XNode from "@web-atoms/core/dist/core/XNode";
|
|
4
|
+
import { Block } from "./Block";
|
|
5
|
+
import { StylerSets } from "../styler/StylerSets";
|
|
6
|
+
import styled from "@web-atoms/core/dist/style/styled";
|
|
7
|
+
import { defaultImageSrc } from "./defaultImage";
|
|
8
|
+
|
|
9
|
+
declare global {
|
|
10
|
+
namespace JSX {
|
|
11
|
+
interface IntrinsicElements {
|
|
12
|
+
"image-gallery": any;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
StylerSets.register("low", styled.css `
|
|
18
|
+
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: row;
|
|
21
|
+
flex-wrap: wrap;
|
|
22
|
+
|
|
23
|
+
& > *:empty:before {
|
|
24
|
+
background-color: #ddd;
|
|
25
|
+
color: #000;
|
|
26
|
+
font-size: 16px;
|
|
27
|
+
font-weight: bold;
|
|
28
|
+
font-family: 'Courier New', Courier, monospace;
|
|
29
|
+
height: 100%;
|
|
30
|
+
display: flex;
|
|
31
|
+
justify-items: center;
|
|
32
|
+
align-items: center;
|
|
33
|
+
min-height: 30px;
|
|
34
|
+
opacity: 0.3;
|
|
35
|
+
border-radius: 3px;
|
|
36
|
+
white-space: nowrap;
|
|
37
|
+
overflow: hidden;
|
|
38
|
+
text-overflow: ellipsis;
|
|
39
|
+
content: "Container";
|
|
40
|
+
|
|
41
|
+
}
|
|
42
|
+
`.expand("image-gallery"));
|
|
43
|
+
|
|
44
|
+
StylerSets.register("low", styled.css `
|
|
45
|
+
& image-gallery {
|
|
46
|
+
& > * {
|
|
47
|
+
max-height: 50vh;
|
|
48
|
+
max-width: 50vw;
|
|
49
|
+
margin: 10px;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
`.expand("body[editing]"));
|
|
53
|
+
|
|
54
|
+
export const ImageGallery = Block({
|
|
55
|
+
className: "fad fa-panorama",
|
|
56
|
+
title: "Add Carousel",
|
|
57
|
+
factory: () => <image-gallery>
|
|
58
|
+
<img src={defaultImageSrc}/>
|
|
59
|
+
<img src={defaultImageSrc}/>
|
|
60
|
+
<img src={defaultImageSrc}/>
|
|
61
|
+
</image-gallery>
|
|
62
|
+
});
|
|
@@ -14,11 +14,10 @@ StylerSets.register("low", styled.css `
|
|
|
14
14
|
margin: ${stylerVars.sizeDefault};
|
|
15
15
|
border-radius: ${stylerVars.sizeDefault};
|
|
16
16
|
justify-items: center;
|
|
17
|
-
align-items:
|
|
17
|
+
align-items: center;
|
|
18
18
|
contain: content;
|
|
19
19
|
|
|
20
20
|
& > img {
|
|
21
|
-
align-self: stretch;
|
|
22
21
|
border-radius: ${stylerVars.sizeLarge};
|
|
23
22
|
max-width: 100%;
|
|
24
23
|
}
|
|
@@ -35,6 +35,8 @@ import { PriceTable } from "../blocks/PriceBox";
|
|
|
35
35
|
import { BindableProperty } from "@web-atoms/core/dist/core/BindableProperty";
|
|
36
36
|
import { Billboard } from "../blocks/Billboard";
|
|
37
37
|
import { OutlineText } from "../blocks/OutlineText";
|
|
38
|
+
import { Carousel } from "../blocks/Carousel";
|
|
39
|
+
import { ImageGallery } from "../blocks/ImageGallery";
|
|
38
40
|
|
|
39
41
|
styled.css `
|
|
40
42
|
display: grid;
|
|
@@ -288,6 +290,8 @@ export default class HtmlPageEditor extends AtomControl {
|
|
|
288
290
|
<TypeWriterComponent/>
|
|
289
291
|
<Billboard/>
|
|
290
292
|
<OutlineText/>
|
|
293
|
+
<Carousel/>
|
|
294
|
+
<ImageGallery/>
|
|
291
295
|
</EditorToolbar>
|
|
292
296
|
<div data-element="editor"
|
|
293
297
|
style-max-width={Bind.oneWay(() => this.maxWidth > 768 ? "" : this.maxWidth + "px" )}>
|
|
@@ -532,6 +536,7 @@ export default class HtmlPageEditor extends AtomControl {
|
|
|
532
536
|
const clone = this.htmlDocument.documentElement.cloneNode(true) as HTMLElement;
|
|
533
537
|
const body = clone.querySelector("body");
|
|
534
538
|
body.removeAttribute("contentEditable");
|
|
539
|
+
body.removeAttribute("editing");
|
|
535
540
|
const all = clone.querySelectorAll("*");
|
|
536
541
|
// eslint-disable-next-line @typescript-eslint/prefer-for-of
|
|
537
542
|
for (let index = 0; index < all.length; index++) {
|
|
@@ -582,6 +587,7 @@ export default class HtmlPageEditor extends AtomControl {
|
|
|
582
587
|
this.redoList.insert(this.redoList.length, this.htmlDocument.documentElement.innerHTML);
|
|
583
588
|
this.htmlDocument.documentElement.innerHTML = this.undoList.removeAt(this.undoList.length-1);
|
|
584
589
|
this.htmlDocument.body.contentEditable = "true";
|
|
590
|
+
this.htmlDocument.body.setAttribute("editing", "true");
|
|
585
591
|
}
|
|
586
592
|
|
|
587
593
|
@Action({ onEvent: "redo"})
|
|
@@ -589,6 +595,7 @@ export default class HtmlPageEditor extends AtomControl {
|
|
|
589
595
|
this.undoList.insert(this.undoList.length, this.htmlDocument.documentElement.innerHTML);
|
|
590
596
|
this.htmlDocument.documentElement.innerHTML = this.redoList.removeAt(this.redoList.length-1);
|
|
591
597
|
this.htmlDocument.body.contentEditable = "true";
|
|
598
|
+
this.htmlDocument.body.setAttribute("editing", "true");
|
|
592
599
|
}
|
|
593
600
|
|
|
594
601
|
protected initDocument(v: string) {
|
|
@@ -672,6 +679,7 @@ export default class HtmlPageEditor extends AtomControl {
|
|
|
672
679
|
this.htmlDocument.close();
|
|
673
680
|
|
|
674
681
|
this.htmlDocument.body.contentEditable = "true";
|
|
682
|
+
this.htmlDocument.body.setAttribute("editing", "true");
|
|
675
683
|
|
|
676
684
|
// install styler...
|
|
677
685
|
setTimeout(() => {
|
|
@@ -63,7 +63,7 @@ export class SelectedElement {
|
|
|
63
63
|
|
|
64
64
|
public getDropTarget(dragged: HTMLElement, target: HTMLElement) {
|
|
65
65
|
|
|
66
|
-
const isDropTarget = /^(main|section)$/i;
|
|
66
|
+
const isDropTarget = /^(main|section|carousel\-slider)$/i;
|
|
67
67
|
|
|
68
68
|
// check if dragged has root only....
|
|
69
69
|
if (isDropTarget.test(dragged?.tagName)) {
|
|
@@ -53,7 +53,7 @@ export default class WebSitePageEditor extends HtmlPageEditor {
|
|
|
53
53
|
script.setAttribute("defer", "true");
|
|
54
54
|
this.htmlDocument.head.appendChild(script);
|
|
55
55
|
}
|
|
56
|
-
script.setAttribute("src", "//cdn.jsdelivr.net/npm/@social-mail/web-components@
|
|
56
|
+
script.setAttribute("src", "//cdn.jsdelivr.net/npm/@social-mail/web-components@1.0.24/dist/components.webpack.js");
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
|