@social-mail/social-mail-client 1.2.17 → 1.2.19
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/content/images/svg/html-editor/layouts/card.png +0 -0
- package/content/images/svg/html-editor/layouts/card.svg +77 -0
- package/content/images/svg/html-editor/layouts/column-2.png +0 -0
- package/content/images/svg/html-editor/layouts/column-2.svg +119 -0
- package/content/images/svg/html-editor/layouts/column-3.png +0 -0
- package/content/images/svg/html-editor/layouts/column-3.svg +155 -0
- package/content/images/svg/html-editor/layouts/column.png +0 -0
- package/content/images/svg/html-editor/layouts/column.svg +86 -0
- package/content/images/svg/html-editor/layouts/image.svg +1 -0
- package/content/images/svg/html-editor/layouts/row.png +0 -0
- package/content/images/svg/html-editor/layouts/row.svg +87 -0
- package/content/images/svg/html-editor/layouts/vertical-image-box.png +0 -0
- package/content/images/svg/html-editor/layouts/vertical-image-box.svg +78 -0
- package/dist/admin/AdminAppIndex.pack.js +1878 -619
- package/dist/admin/AdminAppIndex.pack.js.map +1 -1
- package/dist/admin/AdminAppIndex.pack.min.js +545 -51
- package/dist/admin/AdminAppIndex.pack.min.js.map +1 -1
- package/dist/services/files/LocalFileService.d.ts +1 -0
- package/dist/services/files/LocalFileService.d.ts.map +1 -1
- package/dist/services/files/LocalFileService.js +24 -8
- package/dist/services/files/LocalFileService.js.map +1 -1
- package/dist/site-editor/blocks/Block.d.ts +7 -3
- package/dist/site-editor/blocks/Block.d.ts.map +1 -1
- package/dist/site-editor/blocks/Block.js +30 -9
- package/dist/site-editor/blocks/Block.js.map +1 -1
- package/dist/site-editor/blocks/Card.d.ts +2 -0
- package/dist/site-editor/blocks/Card.d.ts.map +1 -0
- package/dist/site-editor/blocks/Card.js +28 -0
- package/dist/site-editor/blocks/Card.js.map +1 -0
- package/dist/site-editor/blocks/ColumnBox.d.ts +4 -0
- package/dist/site-editor/blocks/ColumnBox.d.ts.map +1 -0
- package/dist/site-editor/blocks/ColumnBox.js +42 -0
- package/dist/site-editor/blocks/ColumnBox.js.map +1 -0
- package/dist/site-editor/blocks/FeatureBlock.d.ts.map +1 -1
- package/dist/site-editor/blocks/FeatureBlock.js +8 -8
- package/dist/site-editor/blocks/FeatureBlock.js.map +1 -1
- package/dist/site-editor/blocks/Image.d.ts +2 -0
- package/dist/site-editor/blocks/Image.d.ts.map +1 -0
- package/dist/site-editor/blocks/Image.js +24 -0
- package/dist/site-editor/blocks/Image.js.map +1 -0
- package/dist/site-editor/blocks/ImageBox.d.ts +3 -0
- package/dist/site-editor/blocks/ImageBox.d.ts.map +1 -0
- package/dist/site-editor/blocks/ImageBox.js +38 -0
- package/dist/site-editor/blocks/ImageBox.js.map +1 -0
- package/dist/site-editor/blocks/ImageCard.d.ts +2 -0
- package/dist/site-editor/blocks/ImageCard.d.ts.map +1 -0
- package/dist/site-editor/blocks/ImageCard.js +26 -0
- package/dist/site-editor/blocks/ImageCard.js.map +1 -0
- package/dist/site-editor/blocks/List.d.ts +2 -0
- package/dist/site-editor/blocks/List.d.ts.map +1 -0
- package/dist/site-editor/blocks/List.js +20 -0
- package/dist/site-editor/blocks/List.js.map +1 -0
- package/dist/site-editor/blocks/RowBox.d.ts +2 -0
- package/dist/site-editor/blocks/RowBox.d.ts.map +1 -0
- package/dist/site-editor/blocks/RowBox.js +24 -0
- package/dist/site-editor/blocks/RowBox.js.map +1 -0
- package/dist/site-editor/blocks/TextBox.d.ts +2 -0
- package/dist/site-editor/blocks/TextBox.d.ts.map +1 -0
- package/dist/site-editor/blocks/TextBox.js +24 -0
- package/dist/site-editor/blocks/TextBox.js.map +1 -0
- package/dist/site-editor/blocks/VerticalImageBox.d.ts +2 -0
- package/dist/site-editor/blocks/VerticalImageBox.d.ts.map +1 -0
- package/dist/site-editor/blocks/VerticalImageBox.js +29 -0
- package/dist/site-editor/blocks/VerticalImageBox.js.map +1 -0
- package/dist/site-editor/blocks/WrapGrid.d.ts.map +1 -1
- package/dist/site-editor/blocks/WrapGrid.js +8 -8
- package/dist/site-editor/blocks/WrapGrid.js.map +1 -1
- package/dist/site-editor/blocks/defaultImage.d.ts +2 -0
- package/dist/site-editor/blocks/defaultImage.d.ts.map +1 -0
- package/dist/site-editor/blocks/defaultImage.js +12 -0
- package/dist/site-editor/blocks/defaultImage.js.map +1 -0
- package/dist/site-editor/editor/HtmlPageEditor.d.ts +5 -0
- package/dist/site-editor/editor/HtmlPageEditor.d.ts.map +1 -1
- package/dist/site-editor/editor/HtmlPageEditor.js +100 -5
- package/dist/site-editor/editor/HtmlPageEditor.js.map +1 -1
- package/dist/site-editor/editor/WebSitePageEditor.d.ts +2 -0
- package/dist/site-editor/editor/WebSitePageEditor.d.ts.map +1 -1
- package/dist/site-editor/editor/WebSitePageEditor.js +32 -18
- package/dist/site-editor/editor/WebSitePageEditor.js.map +1 -1
- package/dist/site-editor/properties/controls/PropertyEditor.d.ts.map +1 -1
- package/dist/site-editor/properties/controls/PropertyEditor.js +35 -6
- package/dist/site-editor/properties/controls/PropertyEditor.js.map +1 -1
- package/dist/site-editor/properties/groups/LayoutEditor.d.ts.map +1 -1
- package/dist/site-editor/properties/groups/LayoutEditor.js +3 -0
- package/dist/site-editor/properties/groups/LayoutEditor.js.map +1 -1
- package/dist/site-editor/styler/Styler.d.ts +72 -0
- package/dist/site-editor/styler/Styler.d.ts.map +1 -1
- package/dist/site-editor/styler/Styler.js +19 -1
- package/dist/site-editor/styler/Styler.js.map +1 -1
- package/dist/site-editor/styler/StylerSet.d.ts +1 -0
- package/dist/site-editor/styler/StylerSet.d.ts.map +1 -1
- package/dist/site-editor/styler/StylerSet.js +13 -10
- package/dist/site-editor/styler/StylerSet.js.map +1 -1
- package/dist/site-editor/styler/properties/color-sets/stylerColorSets.d.ts +3 -0
- package/dist/site-editor/styler/properties/color-sets/stylerColorSets.d.ts.map +1 -0
- package/dist/site-editor/styler/properties/color-sets/stylerColorSets.js +60 -0
- package/dist/site-editor/styler/properties/color-sets/stylerColorSets.js.map +1 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutBlock.d.ts +2 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutBlock.d.ts.map +1 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutBlock.js +22 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutBlock.js.map +1 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutCard.d.ts +2 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutCard.d.ts.map +1 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutCard.js +82 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutCard.js.map +1 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutColumn.d.ts +2 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutColumn.d.ts.map +1 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutColumn.js +50 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutColumn.js.map +1 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutColumn2Box.d.ts +2 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutColumn2Box.d.ts.map +1 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutColumn2Box.js +58 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutColumn2Box.js.map +1 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutColumn3Box.d.ts +2 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutColumn3Box.d.ts.map +1 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutColumn3Box.js +58 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutColumn3Box.js.map +1 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutFloatingNavBar.d.ts +2 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutFloatingNavBar.d.ts.map +1 -0
- package/dist/site-editor/styler/properties/{layout/layout.js → layouts/blocks/layoutFloatingNavBar.js} +8 -65
- package/dist/site-editor/styler/properties/layouts/blocks/layoutFloatingNavBar.js.map +1 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutImageBlock.d.ts +2 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutImageBlock.d.ts.map +1 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutImageBlock.js +56 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutImageBlock.js.map +1 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutImageBox.d.ts +2 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutImageBox.d.ts.map +1 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutImageBox.js +63 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutImageBox.js.map +1 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutImageCard.d.ts +2 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutImageCard.d.ts.map +1 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutImageCard.js +115 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutImageCard.js.map +1 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutNavBar.d.ts +2 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutNavBar.d.ts.map +1 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutNavBar.js +32 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutNavBar.js.map +1 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutRightImageBox.d.ts +2 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutRightImageBox.d.ts.map +1 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutRightImageBox.js +63 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutRightImageBox.js.map +1 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutRow.d.ts +2 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutRow.d.ts.map +1 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutRow.js +59 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutRow.js.map +1 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutTextBox.d.ts +2 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutTextBox.d.ts.map +1 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutTextBox.js +47 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutTextBox.js.map +1 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutWrapList.d.ts +2 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutWrapList.d.ts.map +1 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutWrapList.js +44 -0
- package/dist/site-editor/styler/properties/layouts/blocks/layoutWrapList.js.map +1 -0
- package/dist/site-editor/styler/properties/layouts/display.d.ts.map +1 -0
- package/dist/site-editor/styler/properties/layouts/display.js.map +1 -0
- package/dist/site-editor/styler/properties/layouts/flex/flex.d.ts.map +1 -0
- package/dist/site-editor/styler/properties/layouts/flex/flex.js.map +1 -0
- package/dist/site-editor/styler/properties/layouts/items-position/itemsPosition.d.ts.map +1 -0
- package/dist/site-editor/styler/properties/layouts/items-position/itemsPosition.js.map +1 -0
- package/dist/site-editor/styler/properties/layouts/layout.d.ts.map +1 -0
- package/dist/site-editor/styler/properties/layouts/layout.js +40 -0
- package/dist/site-editor/styler/properties/layouts/layout.js.map +1 -0
- package/dist/site-editor/toolbars/EditorToolbar.d.ts.map +1 -1
- package/dist/site-editor/toolbars/EditorToolbar.js +1 -0
- package/dist/site-editor/toolbars/EditorToolbar.js.map +1 -1
- package/dist/site-editor/toolbars/UndoRedoToolbar.d.ts.map +1 -1
- package/dist/site-editor/toolbars/UndoRedoToolbar.js +4 -12
- package/dist/site-editor/toolbars/UndoRedoToolbar.js.map +1 -1
- package/dist/style/GlobalStyle.js +1 -1
- package/dist/style/GlobalStyle.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/web/AppIndex.pack.js +1615 -356
- package/dist/web/AppIndex.pack.js.map +1 -1
- package/dist/web/AppIndex.pack.min.js +526 -32
- package/dist/web/AppIndex.pack.min.js.map +1 -1
- package/dist/web/page/files/media/ChooseMediaPage.d.ts.map +1 -1
- package/dist/web/page/files/media/ChooseMediaPage.js +23 -4
- package/dist/web/page/files/media/ChooseMediaPage.js.map +1 -1
- package/dist/web/page/files/service/CloudFileService.d.ts +5 -4
- package/dist/web/page/files/service/CloudFileService.d.ts.map +1 -1
- package/dist/web/page/files/service/CloudFileService.js +12 -13
- package/dist/web/page/files/service/CloudFileService.js.map +1 -1
- package/package.json +1 -1
- package/src/services/files/LocalFileService.tsx +25 -7
- package/src/site-editor/blocks/Block.tsx +35 -10
- package/src/site-editor/blocks/Card.tsx +12 -0
- package/src/site-editor/blocks/ColumnBox.tsx +39 -0
- package/src/site-editor/blocks/FeatureBlock.tsx +1 -5
- package/src/site-editor/blocks/Image.tsx +9 -0
- package/src/site-editor/blocks/ImageBox.tsx +27 -0
- package/src/site-editor/blocks/ImageCard.tsx +13 -0
- package/src/site-editor/blocks/List.tsx +11 -0
- package/src/site-editor/blocks/RowBox.tsx +13 -0
- package/src/site-editor/blocks/{ImageBlock.tsx → TextBox.tsx} +9 -9
- package/src/site-editor/blocks/VerticalImageBox.tsx +14 -0
- package/src/site-editor/blocks/WrapGrid.tsx +2 -5
- package/src/site-editor/blocks/defaultImage.ts +2 -0
- package/src/site-editor/editor/HtmlPageEditor.tsx +90 -3
- package/src/site-editor/editor/WebSitePageEditor.tsx +34 -14
- package/src/site-editor/properties/controls/PropertyEditor.tsx +39 -7
- package/src/site-editor/properties/groups/LayoutEditor.tsx +1 -0
- package/src/site-editor/styler/Styler.ts +21 -0
- package/src/site-editor/styler/StylerSet.ts +6 -4
- package/src/site-editor/styler/properties/color-sets/stylerColorSets.ts +50 -0
- package/src/site-editor/styler/properties/layouts/blocks/layoutBlock.ts +10 -0
- package/src/site-editor/styler/properties/layouts/blocks/layoutCard.ts +70 -0
- package/src/site-editor/styler/properties/layouts/blocks/layoutColumn.ts +38 -0
- package/src/site-editor/styler/properties/layouts/blocks/layoutColumn2Box.ts +46 -0
- package/src/site-editor/styler/properties/layouts/blocks/layoutColumn3Box.ts +46 -0
- package/src/site-editor/styler/properties/{layout/layout.ts → layouts/blocks/layoutFloatingNavBar.ts} +6 -65
- package/src/site-editor/styler/properties/layouts/blocks/layoutImageBlock.ts +44 -0
- package/src/site-editor/styler/properties/layouts/blocks/layoutImageBox.ts +51 -0
- package/src/site-editor/styler/properties/layouts/blocks/layoutImageCard.ts +103 -0
- package/src/site-editor/styler/properties/layouts/blocks/layoutNavBar.ts +20 -0
- package/src/site-editor/styler/properties/layouts/blocks/layoutRightImageBox.ts +51 -0
- package/src/site-editor/styler/properties/layouts/blocks/layoutRow.ts +47 -0
- package/src/site-editor/styler/properties/layouts/blocks/layoutTextBox.ts +35 -0
- package/src/site-editor/styler/properties/layouts/blocks/layoutWrapList.ts +32 -0
- package/src/site-editor/styler/properties/layouts/layout.ts +30 -0
- package/src/site-editor/toolbars/EditorToolbar.tsx +1 -0
- package/src/site-editor/toolbars/UndoRedoToolbar.tsx +2 -8
- package/src/style/GlobalStyle.ts +1 -1
- package/src/web/page/files/media/ChooseMediaPage.tsx +23 -7
- package/src/web/page/files/service/CloudFileService.ts +31 -13
- package/dist/site-editor/blocks/ImageBlock.d.ts +0 -2
- package/dist/site-editor/blocks/ImageBlock.d.ts.map +0 -1
- package/dist/site-editor/blocks/ImageBlock.js +0 -23
- package/dist/site-editor/blocks/ImageBlock.js.map +0 -1
- package/dist/site-editor/styler/properties/layout/display.d.ts.map +0 -1
- package/dist/site-editor/styler/properties/layout/display.js.map +0 -1
- package/dist/site-editor/styler/properties/layout/flex/flex.d.ts.map +0 -1
- package/dist/site-editor/styler/properties/layout/flex/flex.js.map +0 -1
- package/dist/site-editor/styler/properties/layout/items-position/itemsPosition.d.ts.map +0 -1
- package/dist/site-editor/styler/properties/layout/items-position/itemsPosition.js.map +0 -1
- package/dist/site-editor/styler/properties/layout/layout.d.ts.map +0 -1
- package/dist/site-editor/styler/properties/layout/layout.js.map +0 -1
- /package/dist/site-editor/styler/properties/{layout → layouts}/display.d.ts +0 -0
- /package/dist/site-editor/styler/properties/{layout → layouts}/display.js +0 -0
- /package/dist/site-editor/styler/properties/{layout → layouts}/flex/flex.d.ts +0 -0
- /package/dist/site-editor/styler/properties/{layout → layouts}/flex/flex.js +0 -0
- /package/dist/site-editor/styler/properties/{layout → layouts}/items-position/itemsPosition.d.ts +0 -0
- /package/dist/site-editor/styler/properties/{layout → layouts}/items-position/itemsPosition.js +0 -0
- /package/dist/site-editor/styler/properties/{layout → layouts}/layout.d.ts +0 -0
- /package/src/site-editor/styler/properties/{layout → layouts}/display.ts +0 -0
- /package/src/site-editor/styler/properties/{layout → layouts}/flex/flex.ts +0 -0
- /package/src/site-editor/styler/properties/{layout → layouts}/items-position/itemsPosition.ts +0 -0
|
@@ -1,84 +1,25 @@
|
|
|
1
1
|
import styled from "@web-atoms/core/dist/style/styled";
|
|
2
|
-
import
|
|
3
|
-
import { StylerProperty, stylerVars } from "../../Styler";
|
|
2
|
+
import { stylerVars } from "../../../Styler";
|
|
4
3
|
|
|
5
4
|
const svg = `<svg xmlns="http://www.w3.org/2000/svg" height="16" width="14" viewBox="0 0 448 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"/></svg>`;
|
|
6
5
|
|
|
7
6
|
const svgCross = `<svg xmlns="http://www.w3.org/2000/svg" height="16" width="12" viewBox="0 0 384 512"><!--!Font Awesome Pro 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2024 Fonticons, Inc.--><path class="fa-secondary" opacity=".4" d="M297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6z"/><path class="fa-primary" d=""/></svg>`;
|
|
8
7
|
|
|
9
|
-
export const stylerLayout = StylerProperty.create( "styler-layout", {
|
|
10
|
-
"wrap-list": styled.css `
|
|
11
|
-
display: flex;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
flex-wrap: wrap;
|
|
14
|
-
gap: ${stylerVars.sizeDefault};
|
|
15
|
-
padding: ${stylerVars.sizeDefault};
|
|
16
|
-
margin: ${stylerVars.sizeDefault};
|
|
17
|
-
&:empty:before {
|
|
18
|
-
background-color: #ddd;
|
|
19
|
-
color: #000;
|
|
20
|
-
font-size: 16px;
|
|
21
|
-
font-weight: bold;
|
|
22
|
-
font-family: 'Courier New', Courier, monospace;
|
|
23
|
-
height: 100%;
|
|
24
|
-
display: flex;
|
|
25
|
-
justify-items: center;
|
|
26
|
-
align-items: center;
|
|
27
|
-
min-height: 30px;
|
|
28
|
-
opacity: 0.3;
|
|
29
|
-
border-radius: 3px;
|
|
30
|
-
white-space: nowrap;
|
|
31
|
-
overflow: hidden;
|
|
32
|
-
text-overflow: ellipsis;
|
|
33
|
-
content: "Container";
|
|
34
|
-
}
|
|
35
|
-
`,
|
|
36
|
-
|
|
37
|
-
"column": styled.css `
|
|
38
|
-
display: flex;
|
|
39
|
-
flex-direction: column;
|
|
40
|
-
flex-wrap: nowrap;
|
|
41
|
-
gap: ${stylerVars.sizeDefault};
|
|
42
|
-
padding: ${stylerVars.sizeDefault};
|
|
43
|
-
margin: ${stylerVars.sizeDefault};
|
|
44
|
-
`,
|
|
45
|
-
|
|
46
|
-
"row": styled.css `
|
|
47
|
-
display: flex;
|
|
48
|
-
flex-direction: row;
|
|
49
|
-
flex-wrap: nowrap;
|
|
50
|
-
gap: ${stylerVars.sizeDefault};
|
|
51
|
-
padding: ${stylerVars.sizeDefault};
|
|
52
|
-
margin: ${stylerVars.sizeDefault};
|
|
53
|
-
`,
|
|
54
8
|
|
|
55
|
-
|
|
56
|
-
display: block;
|
|
57
|
-
padding: ${stylerVars.sizeDefault};
|
|
58
|
-
margin: ${stylerVars.sizeDefault};
|
|
59
|
-
`,
|
|
60
|
-
"nav-bar": styled.css `
|
|
61
|
-
display: flex;
|
|
62
|
-
padding: ${stylerVars.sizeSmall};
|
|
63
|
-
margin: ${stylerVars.sizeDefault};
|
|
64
|
-
border-radius: ${stylerVars.sizeLarge};
|
|
65
|
-
align-items: center;
|
|
66
|
-
justify-content: space-between;
|
|
67
|
-
& > h1, & > h2, & > h3, & > h5, & > h6 {
|
|
68
|
-
margin-block-start: 0;
|
|
69
|
-
margin-block-end: 0;
|
|
70
|
-
}
|
|
71
|
-
`,
|
|
9
|
+
export const layoutFloatingNavBar: any = {
|
|
72
10
|
|
|
73
11
|
"floating-nav-bar": styled.css `
|
|
74
12
|
display: flex;
|
|
75
13
|
padding: ${stylerVars.sizeSmall};
|
|
14
|
+
padding-left: ${stylerVars.sizeLarge};
|
|
15
|
+
padding-right: ${stylerVars.sizeLarge};
|
|
76
16
|
margin: ${stylerVars.sizeDefault};
|
|
77
17
|
position: sticky;
|
|
78
18
|
top: ${stylerVars.sizeDefault};
|
|
79
19
|
border-radius: ${stylerVars.sizeLarge};
|
|
80
20
|
align-items: center;
|
|
81
21
|
justify-content: space-between;
|
|
22
|
+
z-index: 20;
|
|
82
23
|
& > h1, & > h2, & > h3, & > h5, & > h6 {
|
|
83
24
|
margin-block-start: 0;
|
|
84
25
|
margin-block-end: 0;
|
|
@@ -134,4 +75,4 @@ export const stylerLayout = StylerProperty.create( "styler-layout", {
|
|
|
134
75
|
|
|
135
76
|
}
|
|
136
77
|
`,
|
|
137
|
-
}
|
|
78
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import styled from "@web-atoms/core/dist/style/styled";
|
|
2
|
+
import { stylerVars } from "../../../Styler";
|
|
3
|
+
|
|
4
|
+
export const layoutImageBlock: any = {
|
|
5
|
+
"image-block": styled.css `
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: row;
|
|
8
|
+
gap: ${stylerVars.sizeDefault};
|
|
9
|
+
padding: ${stylerVars.sizeDefault};
|
|
10
|
+
margin: ${stylerVars.sizeDefault};
|
|
11
|
+
border-radius: ${stylerVars.sizeDefault};
|
|
12
|
+
justify-items: center;
|
|
13
|
+
align-items: stretch;
|
|
14
|
+
contain: content;
|
|
15
|
+
|
|
16
|
+
& > img {
|
|
17
|
+
align-self: center;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
& > * {
|
|
21
|
+
padding: ${stylerVars.sizeDefault};
|
|
22
|
+
flex: 1 1 100%;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
& > *:empty:before {
|
|
26
|
+
background-color: #ddd;
|
|
27
|
+
color: #000;
|
|
28
|
+
font-size: 16px;
|
|
29
|
+
font-weight: bold;
|
|
30
|
+
font-family: 'Courier New', Courier, monospace;
|
|
31
|
+
height: 100%;
|
|
32
|
+
display: flex;
|
|
33
|
+
justify-items: center;
|
|
34
|
+
align-items: center;
|
|
35
|
+
min-height: 30px;
|
|
36
|
+
opacity: 0.3;
|
|
37
|
+
border-radius: 3px;
|
|
38
|
+
white-space: nowrap;
|
|
39
|
+
overflow: hidden;
|
|
40
|
+
text-overflow: ellipsis;
|
|
41
|
+
content: "Container";
|
|
42
|
+
}
|
|
43
|
+
`,
|
|
44
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import styled from "@web-atoms/core/dist/style/styled";
|
|
2
|
+
import { stylerVars } from "../../../Styler";
|
|
3
|
+
|
|
4
|
+
export const layoutImageBox: any = {
|
|
5
|
+
"image-box": styled.css `
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
gap: ${stylerVars.sizeDefault};
|
|
9
|
+
padding: ${stylerVars.sizeDefault};
|
|
10
|
+
margin: ${stylerVars.sizeDefault};
|
|
11
|
+
border-radius: ${stylerVars.sizeDefault};
|
|
12
|
+
justify-items: center;
|
|
13
|
+
align-items: stretch;
|
|
14
|
+
contain: content;
|
|
15
|
+
|
|
16
|
+
@media (min-width: 600px) {
|
|
17
|
+
& {
|
|
18
|
+
flex-direction: row;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
& > img {
|
|
23
|
+
align-self: center;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
& > * {
|
|
27
|
+
padding: ${stylerVars.sizeDefault};
|
|
28
|
+
flex: 1 1 100%;
|
|
29
|
+
max-width: 50%;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
& > *:empty:before {
|
|
33
|
+
background-color: #ddd;
|
|
34
|
+
color: #000;
|
|
35
|
+
font-size: 16px;
|
|
36
|
+
font-weight: bold;
|
|
37
|
+
font-family: 'Courier New', Courier, monospace;
|
|
38
|
+
height: 100%;
|
|
39
|
+
display: flex;
|
|
40
|
+
justify-items: center;
|
|
41
|
+
align-items: center;
|
|
42
|
+
min-height: 30px;
|
|
43
|
+
opacity: 0.3;
|
|
44
|
+
border-radius: 3px;
|
|
45
|
+
white-space: nowrap;
|
|
46
|
+
overflow: hidden;
|
|
47
|
+
text-overflow: ellipsis;
|
|
48
|
+
content: "Container";
|
|
49
|
+
}
|
|
50
|
+
`,
|
|
51
|
+
};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import styled from "@web-atoms/core/dist/style/styled";
|
|
2
|
+
import { stylerVars } from "../../../Styler";
|
|
3
|
+
|
|
4
|
+
export const layoutImageCard: any = {
|
|
5
|
+
"image-card": styled.css `
|
|
6
|
+
display: grid;
|
|
7
|
+
margin: ${stylerVars.sizeDefault};
|
|
8
|
+
border-radius: ${stylerVars.sizeDefault};
|
|
9
|
+
grid-template-columns: 1fr;
|
|
10
|
+
grid-template-rows: auto 1fr 1fr;
|
|
11
|
+
justify-items: stretch;
|
|
12
|
+
align-items: stretch;
|
|
13
|
+
contain: content;
|
|
14
|
+
|
|
15
|
+
& > h4 {
|
|
16
|
+
max-width: 100%;
|
|
17
|
+
padding: ${stylerVars.sizeDefault};
|
|
18
|
+
grid-column: 1;
|
|
19
|
+
grid-row: 1;
|
|
20
|
+
margin-top: 0;
|
|
21
|
+
margin-bottom: 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
& > img {
|
|
25
|
+
padding: ${stylerVars.sizeDefault};
|
|
26
|
+
margin: ${stylerVars.sizeDefault};
|
|
27
|
+
align-self: center;
|
|
28
|
+
max-width: 100%;
|
|
29
|
+
grid-column: 1;
|
|
30
|
+
grid-row: 2;
|
|
31
|
+
}
|
|
32
|
+
& > section {
|
|
33
|
+
max-width: 100%;
|
|
34
|
+
margin: ${stylerVars.sizeDefault};
|
|
35
|
+
padding: ${stylerVars.sizeDefault};
|
|
36
|
+
border-radius: ${stylerVars.sizeDefault};
|
|
37
|
+
grid-column: 1;
|
|
38
|
+
grid-row: 3;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@media (min-width: 600px) {
|
|
42
|
+
& {
|
|
43
|
+
grid-template-columns: 1fr 1fr;
|
|
44
|
+
grid-template-rows: auto 1fr;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
& > h4 {
|
|
48
|
+
max-width: 100%;
|
|
49
|
+
grid-column: 1 / span 2;
|
|
50
|
+
grid-row: 1;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
& > img {
|
|
54
|
+
padding: ${stylerVars.sizeDefault};
|
|
55
|
+
max-width: 100%;
|
|
56
|
+
grid-column: 1;
|
|
57
|
+
grid-row: 2;
|
|
58
|
+
}
|
|
59
|
+
& > section {
|
|
60
|
+
max-width: 100%;
|
|
61
|
+
grid-column: 2;
|
|
62
|
+
grid-row: 2;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
& > section:empty:before {
|
|
67
|
+
background-color: #ddd;
|
|
68
|
+
color: #000;
|
|
69
|
+
font-size: 16px;
|
|
70
|
+
font-weight: bold;
|
|
71
|
+
font-family: 'Courier New', Courier, monospace;
|
|
72
|
+
height: 100%;
|
|
73
|
+
display: flex;
|
|
74
|
+
justify-items: center;
|
|
75
|
+
align-items: center;
|
|
76
|
+
min-height: 30px;
|
|
77
|
+
opacity: 0.3;
|
|
78
|
+
border-radius: 3px;
|
|
79
|
+
white-space: nowrap;
|
|
80
|
+
overflow: hidden;
|
|
81
|
+
text-overflow: ellipsis;
|
|
82
|
+
content: "Container";
|
|
83
|
+
}
|
|
84
|
+
& > h4:empty:before {
|
|
85
|
+
background-color: #ddd;
|
|
86
|
+
color: #000;
|
|
87
|
+
font-size: 16px;
|
|
88
|
+
font-weight: bold;
|
|
89
|
+
font-family: 'Courier New', Courier, monospace;
|
|
90
|
+
height: 100%;
|
|
91
|
+
display: flex;
|
|
92
|
+
justify-items: center;
|
|
93
|
+
align-items: center;
|
|
94
|
+
min-height: 30px;
|
|
95
|
+
opacity: 0.3;
|
|
96
|
+
border-radius: 3px;
|
|
97
|
+
white-space: nowrap;
|
|
98
|
+
overflow: hidden;
|
|
99
|
+
text-overflow: ellipsis;
|
|
100
|
+
content: "Title";
|
|
101
|
+
}
|
|
102
|
+
`
|
|
103
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import styled from "@web-atoms/core/dist/style/styled";
|
|
2
|
+
import { stylerVars } from "../../../Styler";
|
|
3
|
+
|
|
4
|
+
export const layoutNavBar: any = {
|
|
5
|
+
"nav-bar": styled.css `
|
|
6
|
+
display: flex;
|
|
7
|
+
padding: ${stylerVars.sizeSmall};
|
|
8
|
+
padding-left: ${stylerVars.sizeLarge};
|
|
9
|
+
padding-right: ${stylerVars.sizeLarge};
|
|
10
|
+
border-radius: ${stylerVars.sizeDefault};
|
|
11
|
+
margin: ${stylerVars.sizeDefault};
|
|
12
|
+
border-radius: ${stylerVars.sizeLarge};
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: space-between;
|
|
15
|
+
& > h1, & > h2, & > h3, & > h5, & > h6 {
|
|
16
|
+
margin-block-start: 0;
|
|
17
|
+
margin-block-end: 0;
|
|
18
|
+
}
|
|
19
|
+
`,
|
|
20
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import styled from "@web-atoms/core/dist/style/styled";
|
|
2
|
+
import { stylerVars } from "../../../Styler";
|
|
3
|
+
|
|
4
|
+
export const layoutRightImageBox: any = {
|
|
5
|
+
"right-image-box": styled.css `
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
gap: ${stylerVars.sizeDefault};
|
|
9
|
+
padding: ${stylerVars.sizeDefault};
|
|
10
|
+
margin: ${stylerVars.sizeDefault};
|
|
11
|
+
border-radius: ${stylerVars.sizeDefault};
|
|
12
|
+
justify-items: center;
|
|
13
|
+
align-items: stretch;
|
|
14
|
+
contain: content;
|
|
15
|
+
|
|
16
|
+
@media (min-width: 600px) {
|
|
17
|
+
& {
|
|
18
|
+
flex-direction: row-reverse;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
& > * {
|
|
23
|
+
padding: ${stylerVars.sizeDefault};
|
|
24
|
+
flex: 1 1 100%;
|
|
25
|
+
max-width: 50%;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
& > img {
|
|
29
|
+
align-self: center;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
& > *:empty:before {
|
|
33
|
+
background-color: #ddd;
|
|
34
|
+
color: #000;
|
|
35
|
+
font-size: 16px;
|
|
36
|
+
font-weight: bold;
|
|
37
|
+
font-family: 'Courier New', Courier, monospace;
|
|
38
|
+
height: 100%;
|
|
39
|
+
display: flex;
|
|
40
|
+
justify-items: center;
|
|
41
|
+
align-items: center;
|
|
42
|
+
min-height: 30px;
|
|
43
|
+
opacity: 0.3;
|
|
44
|
+
border-radius: 3px;
|
|
45
|
+
white-space: nowrap;
|
|
46
|
+
overflow: hidden;
|
|
47
|
+
text-overflow: ellipsis;
|
|
48
|
+
content: "Container";
|
|
49
|
+
}
|
|
50
|
+
`,
|
|
51
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import styled from "@web-atoms/core/dist/style/styled";
|
|
2
|
+
import { stylerVars } from "../../../Styler";
|
|
3
|
+
|
|
4
|
+
export const layoutRow: any = {
|
|
5
|
+
"row": styled.css `
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: row;
|
|
8
|
+
flex-wrap: wrap;
|
|
9
|
+
gap: ${stylerVars.sizeDefault};
|
|
10
|
+
padding: ${stylerVars.sizeDefault};
|
|
11
|
+
margin: ${stylerVars.sizeDefault};
|
|
12
|
+
border-radius: ${stylerVars.sizeDefault};
|
|
13
|
+
justify-items: center;
|
|
14
|
+
align-items: center;
|
|
15
|
+
|
|
16
|
+
& > * {
|
|
17
|
+
padding: ${stylerVars.sizeDefault};
|
|
18
|
+
flex: 1 1 100%;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@media (min-width: 600px) {
|
|
23
|
+
& {
|
|
24
|
+
flex-direction: row;
|
|
25
|
+
flex-wrap: nowrap;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
& > *:empty:before {
|
|
29
|
+
background-color: #ddd;
|
|
30
|
+
color: #000;
|
|
31
|
+
font-size: 16px;
|
|
32
|
+
font-weight: bold;
|
|
33
|
+
font-family: 'Courier New', Courier, monospace;
|
|
34
|
+
height: 100%;
|
|
35
|
+
display: flex;
|
|
36
|
+
justify-items: center;
|
|
37
|
+
align-items: center;
|
|
38
|
+
min-height: 30px;
|
|
39
|
+
opacity: 0.3;
|
|
40
|
+
border-radius: 3px;
|
|
41
|
+
white-space: nowrap;
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
text-overflow: ellipsis;
|
|
44
|
+
content: "Container";
|
|
45
|
+
}
|
|
46
|
+
`,
|
|
47
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import styled from "@web-atoms/core/dist/style/styled";
|
|
2
|
+
import { stylerVars } from "../../../Styler";
|
|
3
|
+
|
|
4
|
+
export const layoutTextBox: any = {
|
|
5
|
+
"text-box": styled.css `
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: row;
|
|
8
|
+
gap: ${stylerVars.sizeDefault};
|
|
9
|
+
padding: ${stylerVars.sizeDefault};
|
|
10
|
+
margin: ${stylerVars.sizeDefault};
|
|
11
|
+
border-radius: ${stylerVars.sizeDefault};
|
|
12
|
+
justify-items: center;
|
|
13
|
+
align-items: stretch;
|
|
14
|
+
|
|
15
|
+
& > p:empty:before {
|
|
16
|
+
background-color: #ddd;
|
|
17
|
+
color: #000;
|
|
18
|
+
font-size: 16px;
|
|
19
|
+
font-weight: bold;
|
|
20
|
+
font-family: 'Courier New', Courier, monospace;
|
|
21
|
+
height: 100%;
|
|
22
|
+
display: flex;
|
|
23
|
+
justify-items: center;
|
|
24
|
+
align-items: center;
|
|
25
|
+
min-height: 30px;
|
|
26
|
+
opacity: 0.3;
|
|
27
|
+
border-radius: 3px;
|
|
28
|
+
white-space: nowrap;
|
|
29
|
+
overflow: hidden;
|
|
30
|
+
text-overflow: ellipsis;
|
|
31
|
+
content: "Container";
|
|
32
|
+
|
|
33
|
+
}
|
|
34
|
+
`
|
|
35
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import styled from "@web-atoms/core/dist/style/styled";
|
|
2
|
+
import { stylerVars } from "../../../Styler";
|
|
3
|
+
|
|
4
|
+
export const layoutWrapList: any = {
|
|
5
|
+
"wrap-list": styled.css `
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
flex-wrap: wrap;
|
|
9
|
+
gap: ${stylerVars.sizeDefault};
|
|
10
|
+
padding: ${stylerVars.sizeDefault};
|
|
11
|
+
margin: ${stylerVars.sizeDefault};
|
|
12
|
+
border-radius: ${stylerVars.sizeDefault};
|
|
13
|
+
&:empty:before {
|
|
14
|
+
background-color: #ddd;
|
|
15
|
+
color: #000;
|
|
16
|
+
font-size: 16px;
|
|
17
|
+
font-weight: bold;
|
|
18
|
+
font-family: 'Courier New', Courier, monospace;
|
|
19
|
+
height: 100%;
|
|
20
|
+
display: flex;
|
|
21
|
+
justify-items: center;
|
|
22
|
+
align-items: center;
|
|
23
|
+
min-height: 30px;
|
|
24
|
+
opacity: 0.3;
|
|
25
|
+
border-radius: 3px;
|
|
26
|
+
white-space: nowrap;
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
text-overflow: ellipsis;
|
|
29
|
+
content: "Container";
|
|
30
|
+
}
|
|
31
|
+
`,
|
|
32
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { StylerProperty } from "../../Styler";
|
|
2
|
+
import { layoutTextBox } from "./blocks/layoutTextBox";
|
|
3
|
+
import { layoutWrapList } from "./blocks/layoutWrapList";
|
|
4
|
+
import { layoutImageBox } from "./blocks/layoutImageBox";
|
|
5
|
+
import { layoutRightImageBox } from "./blocks/layoutRightImageBox";
|
|
6
|
+
import { layoutColumn2Box } from "./blocks/layoutColumn2Box";
|
|
7
|
+
import { layoutColumn } from "./blocks/layoutColumn";
|
|
8
|
+
import { layoutRow } from "./blocks/layoutRow";
|
|
9
|
+
import { layoutBox } from "./blocks/layoutBlock";
|
|
10
|
+
import { layoutNavBar } from "./blocks/layoutNavBar";
|
|
11
|
+
import { layoutFloatingNavBar } from "./blocks/layoutFloatingNavBar";
|
|
12
|
+
import { layoutColumn3Box } from "./blocks/layoutColumn3Box";
|
|
13
|
+
import { layoutImageCard } from "./blocks/layoutImageCard";
|
|
14
|
+
import { layoutCard } from "./blocks/layoutCard";
|
|
15
|
+
|
|
16
|
+
export const stylerLayout = StylerProperty.create( "styler-layout", {
|
|
17
|
+
... layoutTextBox,
|
|
18
|
+
... layoutWrapList,
|
|
19
|
+
... layoutImageCard,
|
|
20
|
+
... layoutImageBox,
|
|
21
|
+
... layoutRightImageBox,
|
|
22
|
+
... layoutColumn2Box,
|
|
23
|
+
... layoutColumn3Box,
|
|
24
|
+
... layoutColumn,
|
|
25
|
+
... layoutRow,
|
|
26
|
+
... layoutBox,
|
|
27
|
+
... layoutNavBar,
|
|
28
|
+
... layoutFloatingNavBar,
|
|
29
|
+
... layoutCard
|
|
30
|
+
});
|
|
@@ -8,18 +8,12 @@ export default function UndoRedoToolbar() {
|
|
|
8
8
|
return <EditorToolbar
|
|
9
9
|
data-element="undo">
|
|
10
10
|
<i
|
|
11
|
-
|
|
12
|
-
editor.redoList.insert(editor.redoList.length, editor.htmlDocument.documentElement.innerHTML);
|
|
13
|
-
editor.htmlDocument.documentElement.innerHTML = editor.undoList.removeAt(editor.undoList.length-1);
|
|
14
|
-
})}
|
|
11
|
+
data-click-event="undo"
|
|
15
12
|
title="Undo"
|
|
16
13
|
data-disabled={Bind.oneWay((editor: HtmlPageEditor) => editor.undoList.length === 0)}
|
|
17
14
|
class="fas fa-undo" />
|
|
18
15
|
<i
|
|
19
|
-
|
|
20
|
-
editor.undoList.insert(editor.undoList.length, editor.htmlDocument.documentElement.innerHTML);
|
|
21
|
-
editor.htmlDocument.documentElement.innerHTML = editor.redoList.removeAt(editor.redoList.length-1);
|
|
22
|
-
})}
|
|
16
|
+
data-click-event="redo"
|
|
23
17
|
title="Redo"
|
|
24
18
|
data-disabled={Bind.oneWay((editor: HtmlPageEditor) => editor.redoList.length === 0)}
|
|
25
19
|
class="fas fa-redo" />
|
package/src/style/GlobalStyle.ts
CHANGED
|
@@ -31,7 +31,7 @@ function addLinkTag(href, integrity?, rel = "stylesheet") {
|
|
|
31
31
|
|
|
32
32
|
addLinkTag("https://fonts.googleapis.com/css2?family=Source+Sans+Pro:ital,wght@0,400;0,600;0,700;1,400;1,600;1,700&display=swap");
|
|
33
33
|
addLinkTag("https://npm-git.azureedge.net/npm/package/@c8private/fa-icons@6.5.1/css/all.min.css");
|
|
34
|
-
addLinkTag("https://
|
|
34
|
+
addLinkTag("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0");
|
|
35
35
|
|
|
36
36
|
styled.css `
|
|
37
37
|
|
|
@@ -9,6 +9,7 @@ import CloudFileService from "../service/CloudFileService";
|
|
|
9
9
|
import styled from "@web-atoms/core/dist/style/styled";
|
|
10
10
|
import { FilesDragDrop } from "../../../../common/controls/drag-drop/FilesDragDrop";
|
|
11
11
|
import Action from "@web-atoms/core/dist/view-model/Action";
|
|
12
|
+
import UploadEvent from "@web-atoms/web-controls/dist/basic/UploadEvent";
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
const css = styled.css `
|
|
@@ -111,13 +112,28 @@ export default class ChooseMediaPage extends PopupWindowPage<{folder: IAppFile,
|
|
|
111
112
|
</div>
|
|
112
113
|
</div>;
|
|
113
114
|
|
|
114
|
-
this.footerRenderer = () => <div
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
115
|
+
this.footerRenderer = () => <div data-layout="frame-vertical-flex">
|
|
116
|
+
<div
|
|
117
|
+
data-layout="row">
|
|
118
|
+
<button
|
|
119
|
+
data-layout="accent-icon-button"
|
|
120
|
+
{ ... UploadEvent.AttachUploadAction({
|
|
121
|
+
multiple: true,
|
|
122
|
+
extra: Bind.oneWay(() => JSON.stringify({ parentID: this.selectedFolder?.appFileID})),
|
|
123
|
+
accept
|
|
124
|
+
})}>
|
|
125
|
+
<i class="fas fa-upload"/>
|
|
126
|
+
Upload
|
|
127
|
+
</button>
|
|
128
|
+
</div>
|
|
129
|
+
<div
|
|
130
|
+
style-display={Bind.oneWay(() => this.selectedFile !== null)}
|
|
131
|
+
data-layout="row">
|
|
132
|
+
<input type="range" min="100" max="2000" step="100" value={Bind.twoWaysImmediate(() => this.size)} />
|
|
133
|
+
<span text={Bind.oneWay(() => `${this.size}px`)}/>
|
|
134
|
+
<button data-click-event="select-file" text="Save"/>
|
|
135
|
+
</div>
|
|
136
|
+
</div> ;
|
|
121
137
|
|
|
122
138
|
}
|
|
123
139
|
|
|
@@ -7,13 +7,18 @@ import { CancelToken } from "@web-atoms/core/dist/core/types";
|
|
|
7
7
|
import { Sql } from "../../../../common/Sql";
|
|
8
8
|
import SocialMailApp from "../../../../common/SocialMailApp";
|
|
9
9
|
import FetchBuilder from "@web-atoms/core/dist/services/FetchBuilder";
|
|
10
|
+
import LocalFileService from "../../../../services/files/LocalFileService";
|
|
10
11
|
|
|
11
12
|
const hideActivityIndicator = true;
|
|
12
13
|
|
|
13
14
|
export type ISaveFileModel = ({
|
|
14
15
|
parentID: number;
|
|
15
16
|
folder?: string;
|
|
16
|
-
|
|
17
|
+
appFileID?: never;
|
|
18
|
+
} | {
|
|
19
|
+
appFileID: number;
|
|
20
|
+
parentID?: never;
|
|
21
|
+
}) & { content: File };
|
|
17
22
|
|
|
18
23
|
@DISingleton()
|
|
19
24
|
export default class CloudFileService {
|
|
@@ -21,6 +26,9 @@ export default class CloudFileService {
|
|
|
21
26
|
@Inject
|
|
22
27
|
private entityService: EntityService;
|
|
23
28
|
|
|
29
|
+
@Inject
|
|
30
|
+
private localFileService: LocalFileService;
|
|
31
|
+
|
|
24
32
|
async top(site: boolean = false) {
|
|
25
33
|
const userID = SocialMailApp.user.userID;
|
|
26
34
|
let q = this.entityService.query(AppFile)
|
|
@@ -234,19 +242,29 @@ export default class CloudFileService {
|
|
|
234
242
|
return results;
|
|
235
243
|
}
|
|
236
244
|
|
|
245
|
+
children(parentID: number, name?: string, sha256?: string) {
|
|
246
|
+
return this.entityService.query(AppFile, "children", parentID, name, sha256);
|
|
247
|
+
}
|
|
248
|
+
|
|
237
249
|
async saveFile(fm: ISaveFileModel) {
|
|
238
|
-
|
|
239
|
-
const
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
+
|
|
251
|
+
const { appFileID, content, parentID } = fm;
|
|
252
|
+
return this.localFileService.uploadFile(content, { appFileID, parentID });
|
|
253
|
+
|
|
254
|
+
// check if file exists...
|
|
255
|
+
|
|
256
|
+
// const { appFileID, content, parentID } = fm;
|
|
257
|
+
// const sp = new URLSearchParams();
|
|
258
|
+
// if (appFileID) {
|
|
259
|
+
// sp.append("appFileID", appFileID.toString());
|
|
260
|
+
// }
|
|
261
|
+
// if (parentID) {
|
|
262
|
+
// sp.append("parentID", parentID.toString());
|
|
263
|
+
// }
|
|
264
|
+
// const url = `/api/upload?${sp.toString()}`;
|
|
265
|
+
// return FetchBuilder.post(url)
|
|
266
|
+
// .form("file", content, content.name)
|
|
267
|
+
// .responseAsJson<{ url: string; appFileID: number; }>();
|
|
250
268
|
}
|
|
251
269
|
|
|
252
270
|
async save(file: IAppFile) {
|