@social-mail/social-mail-client 1.2.151 → 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 +81 -5
- package/dist/admin/AdminAppIndex.pack.js.map +1 -1
- package/dist/admin/AdminAppIndex.pack.min.js +37 -4
- package/dist/admin/AdminAppIndex.pack.min.js.map +1 -1
- 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/editor/HtmlPageEditor.d.ts.map +1 -1
- package/dist/site-editor/editor/HtmlPageEditor.js +9 -3
- package/dist/site-editor/editor/HtmlPageEditor.js.map +1 -1
- package/dist/site-editor/editor/WebSitePageEditor.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/web/AppIndex.pack.js +81 -5
- package/dist/web/AppIndex.pack.js.map +1 -1
- package/dist/web/AppIndex.pack.min.js +37 -4
- package/dist/web/AppIndex.pack.min.js.map +1 -1
- package/package.json +1 -1
- package/src/site-editor/blocks/ImageGallery.tsx +62 -0
- package/src/site-editor/editor/HtmlPageEditor.tsx +6 -0
- package/src/site-editor/editor/WebSitePageEditor.tsx +1 -1
package/package.json
CHANGED
|
@@ -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
|
+
});
|
|
@@ -36,6 +36,7 @@ import { BindableProperty } from "@web-atoms/core/dist/core/BindableProperty";
|
|
|
36
36
|
import { Billboard } from "../blocks/Billboard";
|
|
37
37
|
import { OutlineText } from "../blocks/OutlineText";
|
|
38
38
|
import { Carousel } from "../blocks/Carousel";
|
|
39
|
+
import { ImageGallery } from "../blocks/ImageGallery";
|
|
39
40
|
|
|
40
41
|
styled.css `
|
|
41
42
|
display: grid;
|
|
@@ -290,6 +291,7 @@ export default class HtmlPageEditor extends AtomControl {
|
|
|
290
291
|
<Billboard/>
|
|
291
292
|
<OutlineText/>
|
|
292
293
|
<Carousel/>
|
|
294
|
+
<ImageGallery/>
|
|
293
295
|
</EditorToolbar>
|
|
294
296
|
<div data-element="editor"
|
|
295
297
|
style-max-width={Bind.oneWay(() => this.maxWidth > 768 ? "" : this.maxWidth + "px" )}>
|
|
@@ -534,6 +536,7 @@ export default class HtmlPageEditor extends AtomControl {
|
|
|
534
536
|
const clone = this.htmlDocument.documentElement.cloneNode(true) as HTMLElement;
|
|
535
537
|
const body = clone.querySelector("body");
|
|
536
538
|
body.removeAttribute("contentEditable");
|
|
539
|
+
body.removeAttribute("editing");
|
|
537
540
|
const all = clone.querySelectorAll("*");
|
|
538
541
|
// eslint-disable-next-line @typescript-eslint/prefer-for-of
|
|
539
542
|
for (let index = 0; index < all.length; index++) {
|
|
@@ -584,6 +587,7 @@ export default class HtmlPageEditor extends AtomControl {
|
|
|
584
587
|
this.redoList.insert(this.redoList.length, this.htmlDocument.documentElement.innerHTML);
|
|
585
588
|
this.htmlDocument.documentElement.innerHTML = this.undoList.removeAt(this.undoList.length-1);
|
|
586
589
|
this.htmlDocument.body.contentEditable = "true";
|
|
590
|
+
this.htmlDocument.body.setAttribute("editing", "true");
|
|
587
591
|
}
|
|
588
592
|
|
|
589
593
|
@Action({ onEvent: "redo"})
|
|
@@ -591,6 +595,7 @@ export default class HtmlPageEditor extends AtomControl {
|
|
|
591
595
|
this.undoList.insert(this.undoList.length, this.htmlDocument.documentElement.innerHTML);
|
|
592
596
|
this.htmlDocument.documentElement.innerHTML = this.redoList.removeAt(this.redoList.length-1);
|
|
593
597
|
this.htmlDocument.body.contentEditable = "true";
|
|
598
|
+
this.htmlDocument.body.setAttribute("editing", "true");
|
|
594
599
|
}
|
|
595
600
|
|
|
596
601
|
protected initDocument(v: string) {
|
|
@@ -674,6 +679,7 @@ export default class HtmlPageEditor extends AtomControl {
|
|
|
674
679
|
this.htmlDocument.close();
|
|
675
680
|
|
|
676
681
|
this.htmlDocument.body.contentEditable = "true";
|
|
682
|
+
this.htmlDocument.body.setAttribute("editing", "true");
|
|
677
683
|
|
|
678
684
|
// install styler...
|
|
679
685
|
setTimeout(() => {
|
|
@@ -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@1.0.
|
|
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
|
|