@social-mail/social-mail-client 1.2.132 → 1.2.134
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/editor/edit.html +3 -3
- package/dist/admin/AdminAppIndex.pack.js +98 -159
- package/dist/admin/AdminAppIndex.pack.js.map +1 -1
- package/dist/admin/AdminAppIndex.pack.min.js +13 -6
- package/dist/admin/AdminAppIndex.pack.min.js.map +1 -1
- package/dist/common/controls/html/grapes-js/GrapesJSEditor.d.ts.map +1 -1
- package/dist/common/controls/html/grapes-js/GrapesJSEditor.js +18 -1
- package/dist/common/controls/html/grapes-js/GrapesJSEditor.js.map +1 -1
- package/dist/common/pages/websites/studio/WebSiteStudioPage.d.ts.map +1 -1
- package/dist/common/pages/websites/studio/WebSiteStudioPage.js +13 -10
- package/dist/common/pages/websites/studio/WebSiteStudioPage.js.map +1 -1
- package/dist/public/components/typewriter/TypeWriter.d.ts +9 -0
- package/dist/public/components/typewriter/TypeWriter.d.ts.map +1 -0
- package/dist/public/components/typewriter/TypeWriter.js +78 -0
- package/dist/public/components/typewriter/TypeWriter.js.map +1 -0
- package/dist/site-editor/blocks/Block.js +7 -0
- package/dist/site-editor/blocks/Block.js.map +1 -1
- package/dist/site-editor/blocks/Components.d.ts +1 -0
- package/dist/site-editor/blocks/Components.d.ts.map +1 -1
- package/dist/site-editor/blocks/Components.js +12 -1
- package/dist/site-editor/blocks/Components.js.map +1 -1
- package/dist/site-editor/editor/HtmlPageEditor.d.ts +1 -3
- package/dist/site-editor/editor/HtmlPageEditor.d.ts.map +1 -1
- package/dist/site-editor/editor/HtmlPageEditor.js +44 -39
- package/dist/site-editor/editor/HtmlPageEditor.js.map +1 -1
- package/dist/site-editor/properties/controls/SizeEditorControl.d.ts +3 -23
- package/dist/site-editor/properties/controls/SizeEditorControl.d.ts.map +1 -1
- package/dist/site-editor/properties/controls/SizeEditorControl.js +6 -101
- package/dist/site-editor/properties/controls/SizeEditorControl.js.map +1 -1
- package/dist/site-editor/properties/groups/PositionGroupEditor.d.ts.map +1 -1
- package/dist/site-editor/properties/groups/PositionGroupEditor.js +6 -8
- package/dist/site-editor/properties/groups/PositionGroupEditor.js.map +1 -1
- package/dist/site-editor/properties/groups/SizeGroupEditor.d.ts.map +1 -1
- package/dist/site-editor/properties/groups/SizeGroupEditor.js.map +1 -1
- package/dist/site-editor/style-editor/StyleEditor.d.ts +2 -0
- package/dist/site-editor/style-editor/StyleEditor.d.ts.map +1 -0
- package/dist/site-editor/style-editor/StyleEditor.js +24 -0
- package/dist/site-editor/style-editor/StyleEditor.js.map +1 -0
- package/dist/site-editor/styler/StylerSet.d.ts.map +1 -1
- package/dist/site-editor/styler/StylerSet.js +10 -0
- package/dist/site-editor/styler/StylerSet.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/web/AppIndex.pack.js +98 -159
- package/dist/web/AppIndex.pack.js.map +1 -1
- package/dist/web/AppIndex.pack.min.js +13 -6
- package/dist/web/AppIndex.pack.min.js.map +1 -1
- package/package.json +1 -1
- package/src/common/controls/html/grapes-js/GrapesJSEditor.tsx +19 -1
- package/src/common/pages/websites/studio/WebSiteStudioPage.tsx +24 -12
- package/src/public/components/typewriter/TypeWriter.tsx +74 -0
- package/src/site-editor/blocks/Block.tsx +7 -0
- package/src/site-editor/blocks/Components.tsx +14 -1
- package/src/site-editor/editor/HtmlPageEditor.tsx +64 -49
- package/src/site-editor/properties/controls/SizeEditorControl.tsx +108 -104
- package/src/site-editor/properties/groups/PositionGroupEditor.tsx +21 -22
- package/src/site-editor/properties/groups/SizeGroupEditor.tsx +0 -1
- package/src/site-editor/style-editor/StyleEditor.tsx +22 -0
- package/src/site-editor/styler/StylerSet.ts +10 -0
package/content/editor/edit.html
CHANGED
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
}
|
|
11
11
|
</style>
|
|
12
12
|
<body>
|
|
13
|
-
<link href="https://cdn.jsdelivr.net/npm/grapesjs@0.21.
|
|
14
|
-
<script src="https://cdn.jsdelivr.net/npm/grapesjs@0.21.
|
|
13
|
+
<link href="https://cdn.jsdelivr.net/npm/grapesjs@0.21.10/dist/css/grapes.min.css" rel="stylesheet"/>
|
|
14
|
+
<script src="https://cdn.jsdelivr.net/npm/grapesjs@0.21.10/dist/grapes.min.js"></script>
|
|
15
15
|
<script src="https://cdn.jsdelivr.net/npm/grapesjs-preset-webpage@1.0.3/dist/index.js"></script>
|
|
16
|
-
<script src="https://cdn.jsdelivr.net/npm/grapesjs-preset-webpage@1.0.2"></script>
|
|
16
|
+
<!-- <script src="https://cdn.jsdelivr.net/npm/grapesjs-preset-webpage@1.0.2"></script> -->
|
|
17
17
|
<script src="https://cdn.jsdelivr.net/npm/grapesjs-blocks-basic@1.0.1"></script>
|
|
18
18
|
<script src="https://cdn.jsdelivr.net/npm/grapesjs-plugin-forms@2.0.5"></script>
|
|
19
19
|
<script src="https://cdn.jsdelivr.net/npm/grapesjs-component-countdown@1.0.1"></script>
|
|
@@ -39411,6 +39411,13 @@ System.register(["@web-atoms/core/dist/core/XNode", "@web-atoms/core/dist/web/co
|
|
|
39411
39411
|
}
|
|
39412
39412
|
}
|
|
39413
39413
|
|
|
39414
|
+
&[styler-full-screen] {
|
|
39415
|
+
width: 100%;
|
|
39416
|
+
max-width: 100%;
|
|
39417
|
+
padding: 0;
|
|
39418
|
+
margin: 0;
|
|
39419
|
+
}
|
|
39420
|
+
|
|
39414
39421
|
`.expand("[styler-layout=main]"));
|
|
39415
39422
|
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>`;
|
|
39416
39423
|
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>`;
|
|
@@ -40203,6 +40210,12 @@ System.register(["./Styler", "./properties/stylerBorder", "./properties/layouts/
|
|
|
40203
40210
|
}
|
|
40204
40211
|
}
|
|
40205
40212
|
return `
|
|
40213
|
+
|
|
40214
|
+
html, body {
|
|
40215
|
+
margin: 0;
|
|
40216
|
+
padding: 0;
|
|
40217
|
+
}
|
|
40218
|
+
|
|
40206
40219
|
* {
|
|
40207
40220
|
box-sizing: border-box;
|
|
40208
40221
|
}
|
|
@@ -40215,6 +40228,10 @@ System.register(["./Styler", "./properties/stylerBorder", "./properties/layouts/
|
|
|
40215
40228
|
background-color: var(--body-color);
|
|
40216
40229
|
color: var(--default-text-color);
|
|
40217
40230
|
}
|
|
40231
|
+
|
|
40232
|
+
img {
|
|
40233
|
+
object-fit: none;
|
|
40234
|
+
}
|
|
40218
40235
|
|
|
40219
40236
|
${StylerSets.low.join("\n")}
|
|
40220
40237
|
|
|
@@ -40314,112 +40331,17 @@ System.register(["@web-atoms/core/dist/core/XNode", "../controls/PropertyEditor"
|
|
|
40314
40331
|
|
|
40315
40332
|
AmdLoader.instance.setup("@social-mail/social-mail-client/dist/site-editor/properties/groups/LayoutEditor");
|
|
40316
40333
|
|
|
40317
|
-
System.register(["
|
|
40334
|
+
System.register(["./PropertyEditor"], function (_export, _context) {
|
|
40318
40335
|
"use strict";
|
|
40319
40336
|
|
|
40320
|
-
var
|
|
40321
|
-
_export("default", void 0);
|
|
40337
|
+
var DropDownProperty, SizeEditorControl;
|
|
40322
40338
|
return {
|
|
40323
|
-
setters: [function (
|
|
40324
|
-
|
|
40325
|
-
__decorate = _tslib.__decorate;
|
|
40326
|
-
__metadata = _tslib.__metadata;
|
|
40327
|
-
}, function (_webAtomsCoreDistCoreBindableProperty) {
|
|
40328
|
-
BindableProperty = _webAtomsCoreDistCoreBindableProperty.BindableProperty;
|
|
40329
|
-
}, function (_webAtomsCoreDistWebControlsAtomControl) {
|
|
40330
|
-
AtomControl = _webAtomsCoreDistWebControlsAtomControl.AtomControl;
|
|
40331
|
-
}, function (_webAtomsCoreDistCoreXNode) {
|
|
40332
|
-
XNode = _webAtomsCoreDistCoreXNode.default;
|
|
40333
|
-
}, function (_webAtomsCoreDistCoreBind) {
|
|
40334
|
-
Bind = _webAtomsCoreDistCoreBind.default;
|
|
40335
|
-
}, function (_webAtomsCoreDistCoreAtomBinder) {
|
|
40336
|
-
AtomBinder = _webAtomsCoreDistCoreAtomBinder.AtomBinder;
|
|
40339
|
+
setters: [function (_PropertyEditor) {
|
|
40340
|
+
DropDownProperty = _PropertyEditor.DropDownProperty;
|
|
40337
40341
|
}],
|
|
40338
40342
|
execute: function () {
|
|
40339
|
-
|
|
40340
|
-
_export("default", SizeEditorControl
|
|
40341
|
-
constructor() {
|
|
40342
|
-
super(...arguments);
|
|
40343
|
-
this._value = "";
|
|
40344
|
-
this._isChanging = false;
|
|
40345
|
-
this._old = "";
|
|
40346
|
-
}
|
|
40347
|
-
get isCustom() {
|
|
40348
|
-
return this.propertyValue === "custom";
|
|
40349
|
-
}
|
|
40350
|
-
set isCustom(v) {
|
|
40351
|
-
if (v) {
|
|
40352
|
-
this.propertyValue = "custom";
|
|
40353
|
-
} else {
|
|
40354
|
-
this.propertyValue = this._old;
|
|
40355
|
-
}
|
|
40356
|
-
}
|
|
40357
|
-
get propertyValue() {
|
|
40358
|
-
return this._value;
|
|
40359
|
-
}
|
|
40360
|
-
set propertyValue(v) {
|
|
40361
|
-
if (this._isChanging) {
|
|
40362
|
-
return;
|
|
40363
|
-
}
|
|
40364
|
-
this._isChanging = true;
|
|
40365
|
-
this._old = v && v !== "custom" ? this._value : this._old;
|
|
40366
|
-
this._value = v;
|
|
40367
|
-
AtomBinder.refreshValue(this, "propertyValue");
|
|
40368
|
-
AtomBinder.refreshValue(this, "valueAsNumber");
|
|
40369
|
-
AtomBinder.refreshValue(this, "isCustom");
|
|
40370
|
-
this._isChanging = false;
|
|
40371
|
-
}
|
|
40372
|
-
get valueAsNumber() {
|
|
40373
|
-
var _a;
|
|
40374
|
-
const v = this.propertyValue;
|
|
40375
|
-
if (!v || v === "custom") {
|
|
40376
|
-
return 0;
|
|
40377
|
-
}
|
|
40378
|
-
return (_a = this.values.findIndex(item => item.name === v)) !== null && _a !== void 0 ? _a : 0;
|
|
40379
|
-
}
|
|
40380
|
-
set valueAsNumber(v) {
|
|
40381
|
-
var _a;
|
|
40382
|
-
this.propertyValue = ((_a = this.values[v]) === null || _a === void 0 ? void 0 : _a.name) || this._old;
|
|
40383
|
-
}
|
|
40384
|
-
init() {
|
|
40385
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
40386
|
-
const parent = this.parent;
|
|
40387
|
-
const pv = parent.selection.style(this.property.key);
|
|
40388
|
-
this.values = this.property.values.filter(x => x.name !== "custom");
|
|
40389
|
-
this.render(XNode.create("div", {
|
|
40390
|
-
propertyValue: Bind.sourceTwoWays(pv, x => x.source.value),
|
|
40391
|
-
custom: Bind.sourceTwoWays(pv, x => x.source.custom),
|
|
40392
|
-
"data-element": "property-editor",
|
|
40393
|
-
"data-display": "flex",
|
|
40394
|
-
"data-justify-items": "stretch"
|
|
40395
|
-
}, XNode.create("div", {
|
|
40396
|
-
"data-layout": "row"
|
|
40397
|
-
}, XNode.create("label", {
|
|
40398
|
-
"data-font-size": "small",
|
|
40399
|
-
text: Bind.oneWay(() => this.label)
|
|
40400
|
-
}), XNode.create("input", {
|
|
40401
|
-
type: "checkbox",
|
|
40402
|
-
checked: Bind.twoWaysImmediate(() => this.isCustom)
|
|
40403
|
-
})), XNode.create("div", null, XNode.create("input", {
|
|
40404
|
-
"style-display": Bind.oneWay(() => !this.isCustom),
|
|
40405
|
-
type: "range",
|
|
40406
|
-
min: 0,
|
|
40407
|
-
max: this.values.length - 2,
|
|
40408
|
-
value: Bind.twoWays(() => this.valueAsNumber)
|
|
40409
|
-
}), XNode.create("input", {
|
|
40410
|
-
"style-display": Bind.oneWay(() => this.isCustom),
|
|
40411
|
-
type: "text",
|
|
40412
|
-
value: Bind.twoWaysImmediate(() => this.custom)
|
|
40413
|
-
}))));
|
|
40414
|
-
});
|
|
40415
|
-
}
|
|
40416
|
-
preCreate() {
|
|
40417
|
-
this.runAfterInit(() => this.app.runAsync(() => this.init()));
|
|
40418
|
-
}
|
|
40419
|
-
});
|
|
40420
|
-
__decorate([BindableProperty, __metadata("design:type", String)], SizeEditorControl.prototype, "label", void 0);
|
|
40421
|
-
__decorate([BindableProperty, __metadata("design:type", Function)], SizeEditorControl.prototype, "property", void 0);
|
|
40422
|
-
__decorate([BindableProperty, __metadata("design:type", String)], SizeEditorControl.prototype, "custom", void 0);
|
|
40343
|
+
SizeEditorControl = DropDownProperty;
|
|
40344
|
+
_export("default", SizeEditorControl);
|
|
40423
40345
|
}
|
|
40424
40346
|
};
|
|
40425
40347
|
});
|
|
@@ -40649,43 +40571,41 @@ System.register(["@web-atoms/core/dist/core/XNode", "../controls/PropertyEditor"
|
|
|
40649
40571
|
System.register(["@web-atoms/core/dist/core/XNode", "../controls/PropertyEditor", "../../styler/StylerSet", "../controls/SizeEditorControl"], function (_export, _context) {
|
|
40650
40572
|
"use strict";
|
|
40651
40573
|
|
|
40652
|
-
var XNode, DropDownProperty, ExpanderPropertyEditor, StylerSet, SizeEditorControl,
|
|
40574
|
+
var XNode, BindEditor, DropDownProperty, ExpanderPropertyEditor, StylerSet, SizeEditorControl, properties;
|
|
40653
40575
|
function PositionGroupEditor() {
|
|
40654
40576
|
return XNode.create(ExpanderPropertyEditor, {
|
|
40655
40577
|
label: "Position"
|
|
40656
40578
|
}, XNode.create(DropDownProperty, {
|
|
40657
40579
|
label: "Position",
|
|
40658
40580
|
property: properties.stylerPosition
|
|
40659
|
-
}), XNode.create(
|
|
40581
|
+
}), XNode.create("section", {
|
|
40582
|
+
"style-display": BindEditor.oneWay(e => /relative|fixed|absolute|sticky/i.test(e.selection.currentStyle.position))
|
|
40583
|
+
}, XNode.create(SizeEditorControl, {
|
|
40660
40584
|
label: "Left",
|
|
40661
|
-
"style-display": BindSizeEditor.oneWay(e => /relative|fixed|absolute|sticky/i.test(e.parent.selection.currentStyle.position)),
|
|
40662
40585
|
property: properties.stylerLeft
|
|
40663
40586
|
}), XNode.create(SizeEditorControl, {
|
|
40664
40587
|
label: "Top",
|
|
40665
|
-
"style-display": BindSizeEditor.oneWay(e => /relative|fixed|absolute|sticky/i.test(e.parent.selection.currentStyle.position)),
|
|
40666
40588
|
property: properties.stylerTop
|
|
40667
40589
|
}), XNode.create(SizeEditorControl, {
|
|
40668
40590
|
label: "Right",
|
|
40669
|
-
"style-display": BindSizeEditor.oneWay(e => /relative|fixed|absolute|sticky/i.test(e.parent.selection.currentStyle.position)),
|
|
40670
40591
|
property: properties.stylerRight
|
|
40671
40592
|
}), XNode.create(SizeEditorControl, {
|
|
40672
40593
|
label: "Bottom",
|
|
40673
|
-
"style-display": BindSizeEditor.oneWay(e => /relative|fixed|absolute|sticky/i.test(e.parent.selection.currentStyle.position)),
|
|
40674
40594
|
property: properties.stylerBottom
|
|
40675
|
-
}));
|
|
40595
|
+
})));
|
|
40676
40596
|
}
|
|
40677
40597
|
_export("default", PositionGroupEditor);
|
|
40678
40598
|
return {
|
|
40679
40599
|
setters: [function (_webAtomsCoreDistCoreXNode) {
|
|
40680
40600
|
XNode = _webAtomsCoreDistCoreXNode.default;
|
|
40681
40601
|
}, function (_controlsPropertyEditor) {
|
|
40602
|
+
BindEditor = _controlsPropertyEditor.BindEditor;
|
|
40682
40603
|
DropDownProperty = _controlsPropertyEditor.DropDownProperty;
|
|
40683
40604
|
ExpanderPropertyEditor = _controlsPropertyEditor.ExpanderPropertyEditor;
|
|
40684
40605
|
}, function (_stylerStylerSet) {
|
|
40685
40606
|
StylerSet = _stylerStylerSet.StylerSet;
|
|
40686
40607
|
}, function (_controlsSizeEditorControl) {
|
|
40687
40608
|
SizeEditorControl = _controlsSizeEditorControl.default;
|
|
40688
|
-
BindSizeEditor = _controlsSizeEditorControl.BindSizeEditor;
|
|
40689
40609
|
}],
|
|
40690
40610
|
execute: function () {
|
|
40691
40611
|
({
|
|
@@ -41706,7 +41626,7 @@ System.register(["@web-atoms/core/dist/core/XNode", "./Block"], function (_expor
|
|
|
41706
41626
|
System.register(["@web-atoms/core/dist/core/XNode", "./Block", "../styler/StylerSets", "@web-atoms/core/dist/style/styled", "../styler/Styler"], function (_export, _context) {
|
|
41707
41627
|
"use strict";
|
|
41708
41628
|
|
|
41709
|
-
var XNode, Block, StylerSets, styled, stylerVars, BlogComponent;
|
|
41629
|
+
var XNode, Block, StylerSets, styled, stylerVars, BlogComponent, TypeWriterComponent;
|
|
41710
41630
|
return {
|
|
41711
41631
|
setters: [function (_webAtomsCoreDistCoreXNode) {
|
|
41712
41632
|
XNode = _webAtomsCoreDistCoreXNode.default;
|
|
@@ -41757,6 +41677,17 @@ System.register(["@web-atoms/core/dist/core/XNode", "./Block", "../styler/Styler
|
|
|
41757
41677
|
"data-view": "dist/public/channel/ChannelView"
|
|
41758
41678
|
})
|
|
41759
41679
|
}));
|
|
41680
|
+
_export("TypeWriterComponent", TypeWriterComponent = Block({
|
|
41681
|
+
className: "fad fa-input-text",
|
|
41682
|
+
title: "Add TypeWriter Component",
|
|
41683
|
+
factory: () => XNode.create("section", {
|
|
41684
|
+
"styler-layout": "component",
|
|
41685
|
+
"data-package": "@social-mail/social-mail-client",
|
|
41686
|
+
"data-host": "true",
|
|
41687
|
+
"data-view": "dist/public/components/TypeWriter",
|
|
41688
|
+
"data-json-args": `["Passionate Actor", "Method Actor", "Teleprompter"]`
|
|
41689
|
+
})
|
|
41690
|
+
}));
|
|
41760
41691
|
}
|
|
41761
41692
|
};
|
|
41762
41693
|
});
|
|
@@ -42282,7 +42213,7 @@ System.register(["@web-atoms/core/dist/core/XNode", "./Block", "@web-atoms/core/
|
|
|
42282
42213
|
System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/dist/core/sleep", "@web-atoms/core/dist/style/styled", "@web-atoms/core/dist/view-model/Action", "@web-atoms/core/dist/web/controls/AtomControl", "../drag-drop/DragDropHelper", "../toolbars/UndoRedoToolbar", "../blocks/WrapGrid", "../toolbars/EditorToolbar", "../properties/Properties", "../styler/StylerSet", "./SelectedElement", "@web-atoms/core/dist/core/AtomBinder", "../styler/Styler", "../blocks/ImageBox", "../blocks/RowBox", "../blocks/ColumnBox", "../blocks/VerticalImageBox", "../blocks/Image", "../blocks/ImageCard", "../blocks/TextBox", "../blocks/Card", "../blocks/List", "../blocks/Components", "@web-atoms/core/dist/core/types", "../blocks/Buttons", "../blocks/Columns2", "../blocks/Columns3", "../blocks/RightImageBox", "@web-atoms/core/dist/web/core/AtomUI", "../blocks/PriceBox", "@web-atoms/core/dist/core/BindableProperty"], function (_export, _context) {
|
|
42283
42214
|
"use strict";
|
|
42284
42215
|
|
|
42285
|
-
var __awaiter, __decorate, __metadata, Bind, XNode, sleep, styled, Action, AtomControl, InstallDragDropHelper, UndoRedoToolbar, WrapGrid, EditorToolbar, Properties, StylerSet, SelectedElement, AtomBinder, StylerVariable, ImageBox, RowBox, ColumnBox, VerticalImageBox, Image, ImageCard, TextBox, Card, List, BlogComponent, UMD, ImageLink, LinkButton, Columns2, Columns3, RightImageBox, descendentElementIterator, PriceTable, BindableProperty, HtmlPageEditor, desktopWidth, tabletWidth, mobileWidth;
|
|
42216
|
+
var __awaiter, __decorate, __metadata, Bind, XNode, sleep, styled, Action, AtomControl, InstallDragDropHelper, UndoRedoToolbar, WrapGrid, EditorToolbar, Properties, StylerSet, SelectedElement, AtomBinder, StylerVariable, ImageBox, RowBox, ColumnBox, VerticalImageBox, Image, ImageCard, TextBox, Card, List, BlogComponent, TypeWriterComponent, UMD, ImageLink, LinkButton, Columns2, Columns3, RightImageBox, descendentElementIterator, PriceTable, BindableProperty, HtmlPageEditor, desktopWidth, tabletWidth, mobileWidth;
|
|
42286
42217
|
_export("default", void 0);
|
|
42287
42218
|
return {
|
|
42288
42219
|
setters: [function (_tslib) {
|
|
@@ -42339,6 +42270,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
|
|
|
42339
42270
|
List = _blocksList.List;
|
|
42340
42271
|
}, function (_blocksComponents) {
|
|
42341
42272
|
BlogComponent = _blocksComponents.BlogComponent;
|
|
42273
|
+
TypeWriterComponent = _blocksComponents.TypeWriterComponent;
|
|
42342
42274
|
}, function (_webAtomsCoreDistCoreTypes) {
|
|
42343
42275
|
UMD = _webAtomsCoreDistCoreTypes.UMD;
|
|
42344
42276
|
}, function (_blocksButtons) {
|
|
@@ -42478,29 +42410,37 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
|
|
|
42478
42410
|
tabletWidth = 768;
|
|
42479
42411
|
mobileWidth = 480;
|
|
42480
42412
|
_export("default", HtmlPageEditor = class HtmlPageEditor extends AtomControl {
|
|
42481
|
-
get
|
|
42482
|
-
|
|
42413
|
+
get htmlPage() {
|
|
42414
|
+
var _a, _b;
|
|
42415
|
+
return (_b = (_a = this.htmlDocument) === null || _a === void 0 ? void 0 : _a.documentElement) === null || _b === void 0 ? void 0 : _b.outerHTML;
|
|
42483
42416
|
}
|
|
42484
|
-
set
|
|
42417
|
+
set htmlPage(v) {
|
|
42485
42418
|
if (!this.element) {
|
|
42486
42419
|
return;
|
|
42487
42420
|
}
|
|
42488
42421
|
if (!this.ready) {
|
|
42489
42422
|
setTimeout(() => {
|
|
42490
|
-
this.
|
|
42423
|
+
this.htmlPage = v;
|
|
42491
42424
|
}, 100);
|
|
42492
42425
|
return;
|
|
42493
42426
|
}
|
|
42494
|
-
|
|
42495
|
-
|
|
42496
|
-
|
|
42497
|
-
|
|
42498
|
-
|
|
42499
|
-
|
|
42500
|
-
|
|
42501
|
-
|
|
42502
|
-
|
|
42503
|
-
|
|
42427
|
+
void this.ready.then(() => {
|
|
42428
|
+
const dom = new DOMParser();
|
|
42429
|
+
const doc = dom.parseFromString(v, "text/html");
|
|
42430
|
+
let baseElement = doc.querySelector("base");
|
|
42431
|
+
if (baseElement) {
|
|
42432
|
+
const href = baseElement.getAttribute("href");
|
|
42433
|
+
if (href !== this.baseUrl) {
|
|
42434
|
+
this.originalBaseUrl = href;
|
|
42435
|
+
baseElement.setAttribute("href", this.baseUrl);
|
|
42436
|
+
}
|
|
42437
|
+
} else {
|
|
42438
|
+
baseElement = doc.createElement("base");
|
|
42439
|
+
baseElement.setAttribute("href", this.baseUrl);
|
|
42440
|
+
doc.head.insertAdjacentElement("afterbegin", baseElement);
|
|
42441
|
+
}
|
|
42442
|
+
return this.initDocument(doc.documentElement.outerHTML);
|
|
42443
|
+
});
|
|
42504
42444
|
}
|
|
42505
42445
|
constructor(app, e) {
|
|
42506
42446
|
super(app, e);
|
|
@@ -42539,7 +42479,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
|
|
|
42539
42479
|
class: "fa-solid fa-code"
|
|
42540
42480
|
}))), XNode.create(EditorToolbar, {
|
|
42541
42481
|
"data-element": "left"
|
|
42542
|
-
}, XNode.create(TextBox, null), XNode.create(Image, null), XNode.create(WrapGrid, null), XNode.create(VerticalImageBox, null), XNode.create(ImageBox, null), XNode.create(RightImageBox, null), XNode.create(Card, null), XNode.create(ImageCard, null), XNode.create(RowBox, null), XNode.create(ColumnBox, null), XNode.create(Columns2, null), XNode.create(Columns3, null), XNode.create(List, null), XNode.create(BlogComponent, null), XNode.create(ImageLink, null), XNode.create(LinkButton, null), XNode.create(PriceTable, null)), XNode.create("div", {
|
|
42482
|
+
}, XNode.create(TextBox, null), XNode.create(Image, null), XNode.create(WrapGrid, null), XNode.create(VerticalImageBox, null), XNode.create(ImageBox, null), XNode.create(RightImageBox, null), XNode.create(Card, null), XNode.create(ImageCard, null), XNode.create(RowBox, null), XNode.create(ColumnBox, null), XNode.create(Columns2, null), XNode.create(Columns3, null), XNode.create(List, null), XNode.create(BlogComponent, null), XNode.create(ImageLink, null), XNode.create(LinkButton, null), XNode.create(PriceTable, null), XNode.create(TypeWriterComponent, null)), XNode.create("div", {
|
|
42543
42483
|
"data-element": "editor",
|
|
42544
42484
|
"style-max-width": Bind.oneWay(() => this.maxWidth > 768 ? "" : this.maxWidth + "px")
|
|
42545
42485
|
}, XNode.create("div", {
|
|
@@ -42771,16 +42711,6 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
|
|
|
42771
42711
|
const clone = this.htmlDocument.documentElement.cloneNode(true);
|
|
42772
42712
|
const body = clone.querySelector("body");
|
|
42773
42713
|
body.removeAttribute("contentEditable");
|
|
42774
|
-
if (this.baseUrl) {
|
|
42775
|
-
if (!this.originalBaseUrl) {
|
|
42776
|
-
(_a = clone.querySelector("base")) === null || _a === void 0 ? void 0 : _a.remove();
|
|
42777
|
-
} else {
|
|
42778
|
-
const baseUrl = clone.querySelector("base");
|
|
42779
|
-
if (baseUrl) {
|
|
42780
|
-
baseUrl.setAttribute("href", this.originalBaseUrl);
|
|
42781
|
-
}
|
|
42782
|
-
}
|
|
42783
|
-
}
|
|
42784
42714
|
const all = clone.querySelectorAll("*");
|
|
42785
42715
|
for (let index = 0; index < all.length; index++) {
|
|
42786
42716
|
const element = all[index];
|
|
@@ -42806,6 +42736,16 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
|
|
|
42806
42736
|
}
|
|
42807
42737
|
this.undoList.add(this.lastHtml);
|
|
42808
42738
|
this.lastHtml = currentHtml;
|
|
42739
|
+
if (this.baseUrl) {
|
|
42740
|
+
if (!this.originalBaseUrl) {
|
|
42741
|
+
(_a = clone.querySelector("base")) === null || _a === void 0 ? void 0 : _a.remove();
|
|
42742
|
+
} else {
|
|
42743
|
+
const baseUrl = clone.querySelector("base");
|
|
42744
|
+
if (baseUrl) {
|
|
42745
|
+
baseUrl.setAttribute("href", this.originalBaseUrl);
|
|
42746
|
+
}
|
|
42747
|
+
}
|
|
42748
|
+
}
|
|
42809
42749
|
this.element.dispatchEvent(new CustomEvent("htmlPageChanged", {
|
|
42810
42750
|
detail: clone.outerHTML,
|
|
42811
42751
|
bubbles: true
|
|
@@ -42826,10 +42766,12 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
|
|
|
42826
42766
|
this.htmlDocument.documentElement.innerHTML = this.redoList.removeAt(this.redoList.length - 1);
|
|
42827
42767
|
this.htmlDocument.body.contentEditable = "true";
|
|
42828
42768
|
}
|
|
42829
|
-
initDocument() {
|
|
42769
|
+
initDocument(v) {
|
|
42830
42770
|
void this.ready.then(() => __awaiter(this, void 0, void 0, function* () {
|
|
42831
|
-
|
|
42832
|
-
|
|
42771
|
+
this.htmlDocument = void 0;
|
|
42772
|
+
yield this.loadContentDocument();
|
|
42773
|
+
this.htmlDocument.open();
|
|
42774
|
+
this.htmlDocument.write(v);
|
|
42833
42775
|
this.htmlDocument.addEventListener("click", e => {
|
|
42834
42776
|
const target = e.target;
|
|
42835
42777
|
const previous = this.selection.element;
|
|
@@ -42906,6 +42848,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
|
|
|
42906
42848
|
}
|
|
42907
42849
|
});
|
|
42908
42850
|
InstallDragDropHelper(this);
|
|
42851
|
+
this.htmlDocument.close();
|
|
42909
42852
|
this.htmlDocument.body.contentEditable = "true";
|
|
42910
42853
|
setTimeout(() => {
|
|
42911
42854
|
this.app.runAsync(() => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -42942,20 +42885,13 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
|
|
|
42942
42885
|
};
|
|
42943
42886
|
this.pageVariables = StylerSet.instance.vars.map(x => new StylerVariable(x.name, x.value, this.htmlDocument, onChange));
|
|
42944
42887
|
}
|
|
42945
|
-
loadContentDocument(
|
|
42946
|
-
var _a;
|
|
42888
|
+
loadContentDocument() {
|
|
42947
42889
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42948
|
-
|
|
42949
|
-
|
|
42950
|
-
}
|
|
42951
|
-
for (;;) {
|
|
42890
|
+
this.contentEditor = this.element.querySelector(`[data-element="content-editor"]`);
|
|
42891
|
+
while (!this.htmlDocument) {
|
|
42952
42892
|
this.htmlDocument = this.contentEditor.contentDocument;
|
|
42953
|
-
if (((_a = this.htmlDocument) === null || _a === void 0 ? void 0 : _a.readyState) === "complete") {
|
|
42954
|
-
break;
|
|
42955
|
-
}
|
|
42956
42893
|
yield sleep(100);
|
|
42957
42894
|
}
|
|
42958
|
-
this.htmlDocument.body.contentEditable = "true";
|
|
42959
42895
|
});
|
|
42960
42896
|
}
|
|
42961
42897
|
});
|
|
@@ -43792,14 +43728,14 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
|
|
|
43792
43728
|
this.pageContent = "";
|
|
43793
43729
|
}
|
|
43794
43730
|
init() {
|
|
43795
|
-
var _a, _b
|
|
43796
|
-
var
|
|
43731
|
+
var _a, _b;
|
|
43732
|
+
var _c;
|
|
43797
43733
|
return __awaiter(this, void 0, void 0, function* () {
|
|
43798
43734
|
this.search = "";
|
|
43799
43735
|
this.root = yield this.cloudFileService.root(this.parameters);
|
|
43800
43736
|
this.title = this.root.name;
|
|
43801
43737
|
this.webSite = yield this.websiteService.get(this.root.appFileID);
|
|
43802
|
-
(_a = (
|
|
43738
|
+
(_a = (_c = this.root).children) !== null && _a !== void 0 ? _a : _c.children = [];
|
|
43803
43739
|
this.root.children.remove(x => x.isDeleted || !(/^(text\/(html|css))$/i.test(x.contentType) || x.isFolder));
|
|
43804
43740
|
this.root.children.sort((a, b) => a.isFolder ? -1 : 0);
|
|
43805
43741
|
yield this.onItemExpanded(this.root);
|
|
@@ -43809,11 +43745,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
|
|
|
43809
43745
|
}
|
|
43810
43746
|
const indexHtml = this.root.children.find(x => x.name === "index.html");
|
|
43811
43747
|
this.selectedFile = indexHtml;
|
|
43812
|
-
|
|
43813
|
-
const firstHost = (_c = this.webSite.hosts) === null || _c === void 0 ? void 0 : _c[0];
|
|
43814
|
-
if (firstHost) {
|
|
43815
|
-
baseUrl = `https://draft-${firstHost.host}`;
|
|
43816
|
-
}
|
|
43748
|
+
const baseUrl = `/api/site/draft/${this.root.appFileID}/`;
|
|
43817
43749
|
this.titleRenderer = () => XNode.create("div", {
|
|
43818
43750
|
"data-layout": "row"
|
|
43819
43751
|
}, XNode.create("div", {
|
|
@@ -43844,7 +43776,13 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
|
|
|
43844
43776
|
"data-click-event": "view-website",
|
|
43845
43777
|
icon: "fad fa-globe-pointer",
|
|
43846
43778
|
text: "View Site"
|
|
43847
|
-
}),
|
|
43779
|
+
}), XNode.create("a", {
|
|
43780
|
+
href: `/api/site/draft/${this.webSite.folderID}`,
|
|
43781
|
+
target: "_blank"
|
|
43782
|
+
}, XNode.create(EditIconTextButton, {
|
|
43783
|
+
icon: "fad fa-globe-pointer",
|
|
43784
|
+
text: "Preview Draft"
|
|
43785
|
+
})), this.parameters.templates && XNode.create("div", {
|
|
43848
43786
|
"data-layout": "row",
|
|
43849
43787
|
"style-display": Bind.oneWay(() => this.selectedFile.appFileID > 0)
|
|
43850
43788
|
}, XNode.create("i", {
|
|
@@ -43877,10 +43815,11 @@ System.register(["tslib", "@web-atoms/core/dist/core/InjectProperty", "@web-atom
|
|
|
43877
43815
|
}
|
|
43878
43816
|
}), XNode.create(WebSitePageEditor, {
|
|
43879
43817
|
class: "file-list",
|
|
43818
|
+
baseUrl: baseUrl,
|
|
43880
43819
|
folder: this.root,
|
|
43881
43820
|
presenter: Bind.presenter(c => this.htmlEditor = c),
|
|
43882
43821
|
"event-html-page-changed": ce => this.pageContent = ce.detail,
|
|
43883
|
-
|
|
43822
|
+
htmlPage: Bind.oneWayAsync((s, e, cancelToken) => this.selectedFile ? FetchBuilder.get(this.selectedFile.downloadUrl).cancelToken(cancelToken).responseAsText(true) : void 0)
|
|
43884
43823
|
}));
|
|
43885
43824
|
this.footerRenderer = () => XNode.create("div", {
|
|
43886
43825
|
"data-layout": "command-row",
|