@lit-pigeon/editor 0.3.3 → 0.3.4
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/index.js +1040 -1390
- package/dist/pigeon-brand-tab.js +1 -1
- package/dist/pigeon-saved-tab.js +1 -1
- package/dist/pigeon-stock-tab.js +1 -1
- package/dist/rich-text-bridge.js +328 -8
- package/dist/rich-text.js +1871 -1928
- package/dist/templates.js +58 -326
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { css as
|
|
2
|
-
import { property as p, state as
|
|
3
|
-
import { t as s,
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
const Kt = b`
|
|
1
|
+
import { css as g, LitElement as d, html as l, nothing as J } from "lit";
|
|
2
|
+
import { property as p, state as c, customElement as h } from "lit/decorators.js";
|
|
3
|
+
import { t as s, l as Ge, r as Pt, c as ct, a as Tt } from "./rich-text-bridge.js";
|
|
4
|
+
import { getAllBlockDefinitions as St, getBlockDefinition as Je, updateBlock as Ke, createBlock as Ee, insertBlock as oe, createColumn as fe, insertRow as G, createRow as me, cloneRowWithNewIds as dt, createBodySelection as ht, deleteBlock as Ot, deleteRow as gt, duplicateBlock as Et, duplicateRow as ut, generateId as bt, EditorState as vt, createHistoryPlugin as ft, undo as Dt, redo as Bt, InMemoryTemplateStorage as jt, InMemoryRowLibraryStorage as Rt, SYSTEM_LINK_TYPES as Lt, createDocStep as Ne, createDefaultDocument as zt, HISTORY_PLUGIN_NAME as mt, canUndo as Mt, canRedo as At, createBlockSelection as We, createRowSelection as _t, createColumnSelection as Ft, moveRow as Ht, moveBlock as Ut, updateRowAttributes as Kt, addColumn as Nt, removeColumn as Wt, resizeColumns as qt } from "@lit-pigeon/core";
|
|
5
|
+
import { unsafeHTML as $t } from "lit/directives/unsafe-html.js";
|
|
6
|
+
import { createRef as ie, ref as re } from "lit/directives/ref.js";
|
|
7
|
+
import { styleMap as Yt } from "lit/directives/style-map.js";
|
|
8
|
+
import { PigeonTemplatePicker as Ni } from "./templates.js";
|
|
9
|
+
const yt = g`
|
|
11
10
|
/* base palette */
|
|
12
11
|
--pigeon-bg: #0f172a; /* slate-900 */
|
|
13
12
|
--pigeon-surface: #1e293b; /* slate-800 */
|
|
@@ -43,7 +42,7 @@ const Kt = b`
|
|
|
43
42
|
0 2px 4px -2px rgb(0 0 0 / 0.4);
|
|
44
43
|
--pigeon-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5),
|
|
45
44
|
0 4px 6px -4px rgb(0 0 0 / 0.5);
|
|
46
|
-
`,
|
|
45
|
+
`, Vt = g`
|
|
47
46
|
:host {
|
|
48
47
|
/* base palette */
|
|
49
48
|
--pigeon-bg: #ffffff;
|
|
@@ -104,21 +103,21 @@ const Kt = b`
|
|
|
104
103
|
}
|
|
105
104
|
|
|
106
105
|
:host(.pigeon-dark) {
|
|
107
|
-
${
|
|
106
|
+
${yt}
|
|
108
107
|
}
|
|
109
108
|
|
|
110
109
|
@media (prefers-color-scheme: dark) {
|
|
111
110
|
:host(.pigeon-auto) {
|
|
112
|
-
${
|
|
111
|
+
${yt}
|
|
113
112
|
}
|
|
114
113
|
}
|
|
115
114
|
`;
|
|
116
|
-
var
|
|
117
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
115
|
+
var Xt = Object.defineProperty, Jt = Object.getOwnPropertyDescriptor, he = (e, t, o, r) => {
|
|
116
|
+
for (var i = r > 1 ? void 0 : r ? Jt(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
118
117
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
119
|
-
return r && i &&
|
|
118
|
+
return r && i && Xt(t, o, i), i;
|
|
120
119
|
};
|
|
121
|
-
let
|
|
120
|
+
let H = class extends d {
|
|
122
121
|
constructor() {
|
|
123
122
|
super(...arguments), this.canUndo = !1, this.canRedo = !1, this.device = "desktop", this.fullscreen = !1, this._exportMenuOpen = !1;
|
|
124
123
|
}
|
|
@@ -343,7 +342,7 @@ let V = class extends g {
|
|
|
343
342
|
}));
|
|
344
343
|
}
|
|
345
344
|
};
|
|
346
|
-
|
|
345
|
+
H.styles = g`
|
|
347
346
|
:host {
|
|
348
347
|
display: flex;
|
|
349
348
|
align-items: center;
|
|
@@ -473,52 +472,52 @@ V.styles = b`
|
|
|
473
472
|
font-weight: 400;
|
|
474
473
|
}
|
|
475
474
|
`;
|
|
476
|
-
|
|
475
|
+
he([
|
|
477
476
|
p({ type: Boolean, attribute: "can-undo" })
|
|
478
|
-
],
|
|
479
|
-
|
|
477
|
+
], H.prototype, "canUndo", 2);
|
|
478
|
+
he([
|
|
480
479
|
p({ type: Boolean, attribute: "can-redo" })
|
|
481
|
-
],
|
|
482
|
-
|
|
480
|
+
], H.prototype, "canRedo", 2);
|
|
481
|
+
he([
|
|
483
482
|
p({ type: String })
|
|
484
|
-
],
|
|
485
|
-
|
|
483
|
+
], H.prototype, "device", 2);
|
|
484
|
+
he([
|
|
486
485
|
p({ type: Boolean })
|
|
487
|
-
],
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
],
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
],
|
|
494
|
-
let
|
|
495
|
-
function
|
|
496
|
-
|
|
486
|
+
], H.prototype, "fullscreen", 2);
|
|
487
|
+
he([
|
|
488
|
+
c()
|
|
489
|
+
], H.prototype, "_exportMenuOpen", 2);
|
|
490
|
+
H = he([
|
|
491
|
+
h("pigeon-toolbar")
|
|
492
|
+
], H);
|
|
493
|
+
let Ze = null;
|
|
494
|
+
function Gt(e) {
|
|
495
|
+
Ze = e;
|
|
497
496
|
}
|
|
498
|
-
function
|
|
499
|
-
return
|
|
497
|
+
function _e() {
|
|
498
|
+
return Ze;
|
|
500
499
|
}
|
|
501
|
-
function
|
|
502
|
-
|
|
500
|
+
function Be() {
|
|
501
|
+
Ze = null;
|
|
503
502
|
}
|
|
504
|
-
function
|
|
505
|
-
e.dataTransfer && (e.dataTransfer.setData("application/json", JSON.stringify(t)), e.dataTransfer.effectAllowed = "move"),
|
|
503
|
+
function Qe(e, t) {
|
|
504
|
+
e.dataTransfer && (e.dataTransfer.setData("application/json", JSON.stringify(t)), e.dataTransfer.effectAllowed = "move"), Gt(t);
|
|
506
505
|
}
|
|
507
|
-
function
|
|
506
|
+
function Hi(e) {
|
|
508
507
|
if (e.dataTransfer)
|
|
509
508
|
try {
|
|
510
509
|
const t = e.dataTransfer.getData("application/json");
|
|
511
510
|
if (t) return JSON.parse(t);
|
|
512
511
|
} catch {
|
|
513
512
|
}
|
|
514
|
-
return
|
|
513
|
+
return _e();
|
|
515
514
|
}
|
|
516
|
-
var
|
|
517
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
515
|
+
var Zt = Object.defineProperty, Qt = Object.getOwnPropertyDescriptor, ge = (e, t, o, r) => {
|
|
516
|
+
for (var i = r > 1 ? void 0 : r ? Qt(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
518
517
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
519
|
-
return r && i &&
|
|
518
|
+
return r && i && Zt(t, o, i), i;
|
|
520
519
|
};
|
|
521
|
-
const
|
|
520
|
+
const eo = {
|
|
522
521
|
text: "T",
|
|
523
522
|
image: "[]",
|
|
524
523
|
button: "[B]",
|
|
@@ -527,12 +526,12 @@ const Ro = {
|
|
|
527
526
|
social: "@",
|
|
528
527
|
html: "</>"
|
|
529
528
|
};
|
|
530
|
-
let
|
|
529
|
+
let U = class extends d {
|
|
531
530
|
constructor() {
|
|
532
531
|
super(...arguments), this.label = "", this.icon = "", this.dragType = "palette-block", this.blockType = "", this.columnCount = 1, this._didDrag = !1;
|
|
533
532
|
}
|
|
534
533
|
render() {
|
|
535
|
-
const e =
|
|
534
|
+
const e = eo[this.icon] ?? this.icon ?? "?", t = this.dragType === "palette-row" ? "Add layout" : "Add block";
|
|
536
535
|
return l`
|
|
537
536
|
<div
|
|
538
537
|
class="item"
|
|
@@ -575,7 +574,7 @@ let Y = class extends g {
|
|
|
575
574
|
);
|
|
576
575
|
}
|
|
577
576
|
_onDragStart(e) {
|
|
578
|
-
this._didDrag = !0,
|
|
577
|
+
this._didDrag = !0, Qe(e, {
|
|
579
578
|
type: this.dragType,
|
|
580
579
|
blockType: this.blockType || void 0,
|
|
581
580
|
columnCount: this.columnCount
|
|
@@ -600,7 +599,7 @@ let Y = class extends g {
|
|
|
600
599
|
}));
|
|
601
600
|
}
|
|
602
601
|
};
|
|
603
|
-
|
|
602
|
+
U.styles = g`
|
|
604
603
|
:host {
|
|
605
604
|
display: block;
|
|
606
605
|
}
|
|
@@ -658,30 +657,30 @@ Y.styles = b`
|
|
|
658
657
|
color: var(--pigeon-text, #1e293b);
|
|
659
658
|
}
|
|
660
659
|
`;
|
|
661
|
-
|
|
660
|
+
ge([
|
|
662
661
|
p({ type: String })
|
|
663
|
-
],
|
|
664
|
-
|
|
662
|
+
], U.prototype, "label", 2);
|
|
663
|
+
ge([
|
|
665
664
|
p({ type: String })
|
|
666
|
-
],
|
|
667
|
-
|
|
665
|
+
], U.prototype, "icon", 2);
|
|
666
|
+
ge([
|
|
668
667
|
p({ type: String, attribute: "drag-type" })
|
|
669
|
-
],
|
|
670
|
-
|
|
668
|
+
], U.prototype, "dragType", 2);
|
|
669
|
+
ge([
|
|
671
670
|
p({ type: String, attribute: "block-type" })
|
|
672
|
-
],
|
|
673
|
-
|
|
671
|
+
], U.prototype, "blockType", 2);
|
|
672
|
+
ge([
|
|
674
673
|
p({ type: Number, attribute: "column-count" })
|
|
675
|
-
],
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
],
|
|
679
|
-
var
|
|
680
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
674
|
+
], U.prototype, "columnCount", 2);
|
|
675
|
+
U = ge([
|
|
676
|
+
h("pigeon-palette-item")
|
|
677
|
+
], U);
|
|
678
|
+
var to = Object.defineProperty, oo = Object.getOwnPropertyDescriptor, et = (e, t, o, r) => {
|
|
679
|
+
for (var i = r > 1 ? void 0 : r ? oo(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
681
680
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
682
|
-
return r && i &&
|
|
681
|
+
return r && i && to(t, o, i), i;
|
|
683
682
|
};
|
|
684
|
-
const
|
|
683
|
+
const io = {
|
|
685
684
|
text: "T",
|
|
686
685
|
image: "Img",
|
|
687
686
|
button: "Btn",
|
|
@@ -692,7 +691,7 @@ const Ho = {
|
|
|
692
691
|
hero: "H",
|
|
693
692
|
navbar: "Nav"
|
|
694
693
|
};
|
|
695
|
-
let
|
|
694
|
+
let ye = class extends d {
|
|
696
695
|
constructor() {
|
|
697
696
|
super(...arguments), this.selection = null;
|
|
698
697
|
}
|
|
@@ -725,7 +724,7 @@ let De = class extends g {
|
|
|
725
724
|
}
|
|
726
725
|
_renderBlock(e, t, o) {
|
|
727
726
|
var a;
|
|
728
|
-
const r = ((a = this.selection) == null ? void 0 : a.type) === "block" && this.selection.blockId === e.id, i =
|
|
727
|
+
const r = ((a = this.selection) == null ? void 0 : a.type) === "block" && this.selection.blockId === e.id, i = io[e.type] ?? "?", n = e.type.charAt(0).toUpperCase() + e.type.slice(1);
|
|
729
728
|
return l`
|
|
730
729
|
<div
|
|
731
730
|
class="tree-item indent-3 ${r ? "selected" : ""}"
|
|
@@ -751,7 +750,7 @@ let De = class extends g {
|
|
|
751
750
|
}));
|
|
752
751
|
}
|
|
753
752
|
};
|
|
754
|
-
|
|
753
|
+
ye.styles = g`
|
|
755
754
|
:host {
|
|
756
755
|
display: block;
|
|
757
756
|
font-family: var(--pigeon-font);
|
|
@@ -815,44 +814,44 @@ De.styles = b`
|
|
|
815
814
|
padding: 8px 8px 4px;
|
|
816
815
|
}
|
|
817
816
|
`;
|
|
818
|
-
|
|
817
|
+
et([
|
|
819
818
|
p({ type: Object })
|
|
820
|
-
],
|
|
821
|
-
|
|
819
|
+
], ye.prototype, "doc", 2);
|
|
820
|
+
et([
|
|
822
821
|
p({ type: Object })
|
|
823
|
-
],
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
],
|
|
827
|
-
var
|
|
828
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
822
|
+
], ye.prototype, "selection", 2);
|
|
823
|
+
ye = et([
|
|
824
|
+
h("pigeon-layers")
|
|
825
|
+
], ye);
|
|
826
|
+
var ro = Object.defineProperty, no = Object.getOwnPropertyDescriptor, L = (e, t, o, r) => {
|
|
827
|
+
for (var i = r > 1 ? void 0 : r ? no(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
829
828
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
830
|
-
return r && i &&
|
|
829
|
+
return r && i && ro(t, o, i), i;
|
|
831
830
|
};
|
|
832
|
-
let
|
|
833
|
-
function
|
|
834
|
-
return
|
|
831
|
+
let qe = null;
|
|
832
|
+
function ao() {
|
|
833
|
+
return qe || (qe = import("./pigeon-brand-tab.js")), qe;
|
|
835
834
|
}
|
|
836
|
-
let
|
|
837
|
-
function
|
|
838
|
-
return
|
|
835
|
+
let Ye = null;
|
|
836
|
+
function so() {
|
|
837
|
+
return Ye || (Ye = import("./pigeon-saved-tab.js")), Ye;
|
|
839
838
|
}
|
|
840
|
-
const
|
|
839
|
+
const lo = [
|
|
841
840
|
{ labelKey: "palette.layout.1-col", columns: 1, icon: "[=]" },
|
|
842
841
|
{ labelKey: "palette.layout.2-col", columns: 2, icon: "[||]" },
|
|
843
842
|
{ labelKey: "palette.layout.3-col", columns: 3, icon: "[|||]" },
|
|
844
843
|
{ labelKey: "palette.layout.4-col", columns: 4, icon: "[||||]" }
|
|
845
844
|
];
|
|
846
|
-
let
|
|
845
|
+
let k = class extends d {
|
|
847
846
|
constructor() {
|
|
848
847
|
super(...arguments), this.selection = null, this.brandKit = null, this.rowLibrary = null, this._blockDefs = [], this._activeTab = "content", this._brandTabLoaded = !1, this._savedTabLoaded = !1, this._handleBrandTabClick = async () => {
|
|
849
|
-
this._activeTab = "brand", this._brandTabLoaded || (await
|
|
848
|
+
this._activeTab = "brand", this._brandTabLoaded || (await ao(), this._brandTabLoaded = !0);
|
|
850
849
|
}, this._handleSavedTabClick = async () => {
|
|
851
|
-
this._activeTab = "saved", this._savedTabLoaded || (await
|
|
850
|
+
this._activeTab = "saved", this._savedTabLoaded || (await so(), this._savedTabLoaded = !0);
|
|
852
851
|
};
|
|
853
852
|
}
|
|
854
853
|
connectedCallback() {
|
|
855
|
-
super.connectedCallback(), this._blockDefs =
|
|
854
|
+
super.connectedCallback(), this._blockDefs = St();
|
|
856
855
|
}
|
|
857
856
|
updated(e) {
|
|
858
857
|
e.has("brandKit") && !this.brandKit && this._activeTab === "brand" && (this._activeTab = "content");
|
|
@@ -926,7 +925,7 @@ let T = class extends g {
|
|
|
926
925
|
<div class="section">
|
|
927
926
|
<div class="section-header">${s("palette.layout.section-layout")}</div>
|
|
928
927
|
<div class="items">
|
|
929
|
-
${
|
|
928
|
+
${lo.map((e) => l`
|
|
930
929
|
<pigeon-palette-item part="palette-item"
|
|
931
930
|
label="${s(e.labelKey)}"
|
|
932
931
|
icon="${e.icon}"
|
|
@@ -953,7 +952,7 @@ let T = class extends g {
|
|
|
953
952
|
return this._savedTabLoaded ? l`<pigeon-saved-tab .storage=${this.rowLibrary}></pigeon-saved-tab>` : l``;
|
|
954
953
|
}
|
|
955
954
|
};
|
|
956
|
-
|
|
955
|
+
k.styles = g`
|
|
957
956
|
:host {
|
|
958
957
|
display: block;
|
|
959
958
|
width: var(--pigeon-palette-width, 240px);
|
|
@@ -1032,34 +1031,34 @@ T.styles = b`
|
|
|
1032
1031
|
gap: 6px;
|
|
1033
1032
|
}
|
|
1034
1033
|
`;
|
|
1035
|
-
|
|
1034
|
+
L([
|
|
1036
1035
|
p({ type: Object })
|
|
1037
|
-
],
|
|
1038
|
-
|
|
1036
|
+
], k.prototype, "doc", 2);
|
|
1037
|
+
L([
|
|
1039
1038
|
p({ type: Object })
|
|
1040
|
-
],
|
|
1041
|
-
|
|
1039
|
+
], k.prototype, "selection", 2);
|
|
1040
|
+
L([
|
|
1042
1041
|
p({ attribute: !1 })
|
|
1043
|
-
],
|
|
1044
|
-
|
|
1042
|
+
], k.prototype, "brandKit", 2);
|
|
1043
|
+
L([
|
|
1045
1044
|
p({ attribute: !1 })
|
|
1046
|
-
],
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
],
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
],
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
],
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
],
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
],
|
|
1062
|
-
function
|
|
1045
|
+
], k.prototype, "rowLibrary", 2);
|
|
1046
|
+
L([
|
|
1047
|
+
c()
|
|
1048
|
+
], k.prototype, "_blockDefs", 2);
|
|
1049
|
+
L([
|
|
1050
|
+
c()
|
|
1051
|
+
], k.prototype, "_activeTab", 2);
|
|
1052
|
+
L([
|
|
1053
|
+
c()
|
|
1054
|
+
], k.prototype, "_brandTabLoaded", 2);
|
|
1055
|
+
L([
|
|
1056
|
+
c()
|
|
1057
|
+
], k.prototype, "_savedTabLoaded", 2);
|
|
1058
|
+
k = L([
|
|
1059
|
+
h("pigeon-palette")
|
|
1060
|
+
], k);
|
|
1061
|
+
function po(e, t) {
|
|
1063
1062
|
if (t.length === 0) return 0;
|
|
1064
1063
|
for (let o = 0; o < t.length; o++) {
|
|
1065
1064
|
const r = t[o].getBoundingClientRect(), i = r.top + r.height / 2;
|
|
@@ -1068,7 +1067,7 @@ function qo(e, t) {
|
|
|
1068
1067
|
}
|
|
1069
1068
|
return t.length;
|
|
1070
1069
|
}
|
|
1071
|
-
function
|
|
1070
|
+
function co(e, t) {
|
|
1072
1071
|
if (t.length === 0) return 0;
|
|
1073
1072
|
for (let o = 0; o < t.length; o++) {
|
|
1074
1073
|
const r = t[o].getBoundingClientRect(), i = r.top + r.height / 2;
|
|
@@ -1077,15 +1076,15 @@ function Vo(e, t) {
|
|
|
1077
1076
|
}
|
|
1078
1077
|
return t.length;
|
|
1079
1078
|
}
|
|
1080
|
-
function
|
|
1079
|
+
function kt(e, t) {
|
|
1081
1080
|
return e < 0 || t === e || t === e + 1 ? null : t > e ? t - 1 : t;
|
|
1082
1081
|
}
|
|
1083
|
-
var
|
|
1084
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
1082
|
+
var ho = Object.defineProperty, go = Object.getOwnPropertyDescriptor, Ct = (e, t, o, r) => {
|
|
1083
|
+
for (var i = r > 1 ? void 0 : r ? go(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
1085
1084
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
1086
|
-
return r && i &&
|
|
1085
|
+
return r && i && ho(t, o, i), i;
|
|
1087
1086
|
};
|
|
1088
|
-
let
|
|
1087
|
+
let je = class extends d {
|
|
1089
1088
|
constructor() {
|
|
1090
1089
|
super(...arguments), this.visible = !1;
|
|
1091
1090
|
}
|
|
@@ -1098,7 +1097,7 @@ let Ge = class extends g {
|
|
|
1098
1097
|
`;
|
|
1099
1098
|
}
|
|
1100
1099
|
};
|
|
1101
|
-
|
|
1100
|
+
je.styles = g`
|
|
1102
1101
|
:host {
|
|
1103
1102
|
display: block;
|
|
1104
1103
|
height: 4px;
|
|
@@ -1142,18 +1141,18 @@ Ge.styles = b`
|
|
|
1142
1141
|
right: 4px;
|
|
1143
1142
|
}
|
|
1144
1143
|
`;
|
|
1145
|
-
|
|
1144
|
+
Ct([
|
|
1146
1145
|
p({ type: Boolean, reflect: !0 })
|
|
1147
|
-
],
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
],
|
|
1151
|
-
var
|
|
1152
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
1146
|
+
], je.prototype, "visible", 2);
|
|
1147
|
+
je = Ct([
|
|
1148
|
+
h("pigeon-drop-indicator")
|
|
1149
|
+
], je);
|
|
1150
|
+
var uo = Object.defineProperty, bo = Object.getOwnPropertyDescriptor, Le = (e, t, o, r) => {
|
|
1151
|
+
for (var i = r > 1 ? void 0 : r ? bo(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
1153
1152
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
1154
|
-
return r && i &&
|
|
1153
|
+
return r && i && uo(t, o, i), i;
|
|
1155
1154
|
};
|
|
1156
|
-
let
|
|
1155
|
+
let ne = class extends d {
|
|
1157
1156
|
constructor() {
|
|
1158
1157
|
super(...arguments), this.selected = !1, this.editing = !1, this._editor = null, this._editorHost = null;
|
|
1159
1158
|
}
|
|
@@ -1181,7 +1180,7 @@ let de = class extends g {
|
|
|
1181
1180
|
const e = this.renderRoot.querySelector(".content");
|
|
1182
1181
|
if (!e) return;
|
|
1183
1182
|
this._editorHost = e;
|
|
1184
|
-
const t = await
|
|
1183
|
+
const t = await Ge();
|
|
1185
1184
|
!this.editing || !this._editorHost || (this._editor = t.createEditor({
|
|
1186
1185
|
element: this._editorHost,
|
|
1187
1186
|
initialHTML: this.block.values.content,
|
|
@@ -1221,7 +1220,7 @@ let de = class extends g {
|
|
|
1221
1220
|
}));
|
|
1222
1221
|
}
|
|
1223
1222
|
};
|
|
1224
|
-
|
|
1223
|
+
ne.styles = g`
|
|
1225
1224
|
:host {
|
|
1226
1225
|
display: block;
|
|
1227
1226
|
cursor: pointer;
|
|
@@ -1261,24 +1260,24 @@ de.styles = b`
|
|
|
1261
1260
|
outline: none;
|
|
1262
1261
|
}
|
|
1263
1262
|
`;
|
|
1264
|
-
|
|
1263
|
+
Le([
|
|
1265
1264
|
p({ type: Object })
|
|
1266
|
-
],
|
|
1267
|
-
|
|
1265
|
+
], ne.prototype, "block", 2);
|
|
1266
|
+
Le([
|
|
1268
1267
|
p({ type: Boolean, reflect: !0 })
|
|
1269
|
-
],
|
|
1270
|
-
|
|
1268
|
+
], ne.prototype, "selected", 2);
|
|
1269
|
+
Le([
|
|
1271
1270
|
p({ type: Boolean, reflect: !0 })
|
|
1272
|
-
],
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
],
|
|
1276
|
-
var
|
|
1277
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
1271
|
+
], ne.prototype, "editing", 2);
|
|
1272
|
+
ne = Le([
|
|
1273
|
+
h("pigeon-text-block")
|
|
1274
|
+
], ne);
|
|
1275
|
+
var vo = Object.defineProperty, fo = Object.getOwnPropertyDescriptor, tt = (e, t, o, r) => {
|
|
1276
|
+
for (var i = r > 1 ? void 0 : r ? fo(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
1278
1277
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
1279
|
-
return r && i &&
|
|
1278
|
+
return r && i && vo(t, o, i), i;
|
|
1280
1279
|
};
|
|
1281
|
-
let
|
|
1280
|
+
let xe = class extends d {
|
|
1282
1281
|
constructor() {
|
|
1283
1282
|
super(...arguments), this.selected = !1;
|
|
1284
1283
|
}
|
|
@@ -1316,7 +1315,7 @@ let Ae = class extends g {
|
|
|
1316
1315
|
}));
|
|
1317
1316
|
}
|
|
1318
1317
|
};
|
|
1319
|
-
|
|
1318
|
+
xe.styles = g`
|
|
1320
1319
|
:host {
|
|
1321
1320
|
display: block;
|
|
1322
1321
|
cursor: pointer;
|
|
@@ -1364,21 +1363,21 @@ Ae.styles = b`
|
|
|
1364
1363
|
opacity: 0.5;
|
|
1365
1364
|
}
|
|
1366
1365
|
`;
|
|
1367
|
-
|
|
1366
|
+
tt([
|
|
1368
1367
|
p({ type: Object })
|
|
1369
|
-
],
|
|
1370
|
-
|
|
1368
|
+
], xe.prototype, "block", 2);
|
|
1369
|
+
tt([
|
|
1371
1370
|
p({ type: Boolean, reflect: !0 })
|
|
1372
|
-
],
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
],
|
|
1376
|
-
var
|
|
1377
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
1371
|
+
], xe.prototype, "selected", 2);
|
|
1372
|
+
xe = tt([
|
|
1373
|
+
h("pigeon-image-block")
|
|
1374
|
+
], xe);
|
|
1375
|
+
var mo = Object.defineProperty, _o = Object.getOwnPropertyDescriptor, ze = (e, t, o, r) => {
|
|
1376
|
+
for (var i = r > 1 ? void 0 : r ? _o(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
1378
1377
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
1379
|
-
return r && i &&
|
|
1378
|
+
return r && i && mo(t, o, i), i;
|
|
1380
1379
|
};
|
|
1381
|
-
let
|
|
1380
|
+
let ae = class extends d {
|
|
1382
1381
|
constructor() {
|
|
1383
1382
|
super(...arguments), this.selected = !1, this.editing = !1, this._editor = null, this._editorHost = null;
|
|
1384
1383
|
}
|
|
@@ -1404,7 +1403,7 @@ let he = class extends g {
|
|
|
1404
1403
|
href="${e.href}"
|
|
1405
1404
|
style="${i}"
|
|
1406
1405
|
@click=${this._preventNav}
|
|
1407
|
-
>${this.editing ? l`` :
|
|
1406
|
+
>${this.editing ? l`` : $t(n)}</a>
|
|
1408
1407
|
</div>
|
|
1409
1408
|
`;
|
|
1410
1409
|
}
|
|
@@ -1418,7 +1417,7 @@ let he = class extends g {
|
|
|
1418
1417
|
const e = this.renderRoot.querySelector(".button");
|
|
1419
1418
|
if (!e) return;
|
|
1420
1419
|
this._editorHost = e;
|
|
1421
|
-
const t = await
|
|
1420
|
+
const t = await Ge();
|
|
1422
1421
|
!this.editing || !this._editorHost || (this._editor = t.createEditor({
|
|
1423
1422
|
element: this._editorHost,
|
|
1424
1423
|
initialHTML: this.block.values.content,
|
|
@@ -1465,7 +1464,7 @@ let he = class extends g {
|
|
|
1465
1464
|
}));
|
|
1466
1465
|
}
|
|
1467
1466
|
};
|
|
1468
|
-
|
|
1467
|
+
ae.styles = g`
|
|
1469
1468
|
:host {
|
|
1470
1469
|
display: block;
|
|
1471
1470
|
cursor: pointer;
|
|
@@ -1516,24 +1515,24 @@ he.styles = b`
|
|
|
1516
1515
|
display: inline;
|
|
1517
1516
|
}
|
|
1518
1517
|
`;
|
|
1519
|
-
|
|
1518
|
+
ze([
|
|
1520
1519
|
p({ type: Object })
|
|
1521
|
-
],
|
|
1522
|
-
|
|
1520
|
+
], ae.prototype, "block", 2);
|
|
1521
|
+
ze([
|
|
1523
1522
|
p({ type: Boolean, reflect: !0 })
|
|
1524
|
-
],
|
|
1525
|
-
|
|
1523
|
+
], ae.prototype, "selected", 2);
|
|
1524
|
+
ze([
|
|
1526
1525
|
p({ type: Boolean, reflect: !0 })
|
|
1527
|
-
],
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
],
|
|
1531
|
-
var
|
|
1532
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
1526
|
+
], ae.prototype, "editing", 2);
|
|
1527
|
+
ae = ze([
|
|
1528
|
+
h("pigeon-button-block")
|
|
1529
|
+
], ae);
|
|
1530
|
+
var yo = Object.defineProperty, xo = Object.getOwnPropertyDescriptor, ot = (e, t, o, r) => {
|
|
1531
|
+
for (var i = r > 1 ? void 0 : r ? xo(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
1533
1532
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
1534
|
-
return r && i &&
|
|
1533
|
+
return r && i && yo(t, o, i), i;
|
|
1535
1534
|
};
|
|
1536
|
-
let
|
|
1535
|
+
let we = class extends d {
|
|
1537
1536
|
constructor() {
|
|
1538
1537
|
super(...arguments), this.selected = !1;
|
|
1539
1538
|
}
|
|
@@ -1561,7 +1560,7 @@ let Be = class extends g {
|
|
|
1561
1560
|
}));
|
|
1562
1561
|
}
|
|
1563
1562
|
};
|
|
1564
|
-
|
|
1563
|
+
we.styles = g`
|
|
1565
1564
|
:host {
|
|
1566
1565
|
display: block;
|
|
1567
1566
|
cursor: pointer;
|
|
@@ -1588,21 +1587,21 @@ Be.styles = b`
|
|
|
1588
1587
|
margin: 0;
|
|
1589
1588
|
}
|
|
1590
1589
|
`;
|
|
1591
|
-
|
|
1590
|
+
ot([
|
|
1592
1591
|
p({ type: Object })
|
|
1593
|
-
],
|
|
1594
|
-
|
|
1592
|
+
], we.prototype, "block", 2);
|
|
1593
|
+
ot([
|
|
1595
1594
|
p({ type: Boolean, reflect: !0 })
|
|
1596
|
-
],
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
],
|
|
1600
|
-
var
|
|
1601
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
1595
|
+
], we.prototype, "selected", 2);
|
|
1596
|
+
we = ot([
|
|
1597
|
+
h("pigeon-divider-block")
|
|
1598
|
+
], we);
|
|
1599
|
+
var wo = Object.defineProperty, $o = Object.getOwnPropertyDescriptor, it = (e, t, o, r) => {
|
|
1600
|
+
for (var i = r > 1 ? void 0 : r ? $o(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
1602
1601
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
1603
|
-
return r && i &&
|
|
1602
|
+
return r && i && wo(t, o, i), i;
|
|
1604
1603
|
};
|
|
1605
|
-
let
|
|
1604
|
+
let $e = class extends d {
|
|
1606
1605
|
constructor() {
|
|
1607
1606
|
super(...arguments), this.selected = !1;
|
|
1608
1607
|
}
|
|
@@ -1627,7 +1626,7 @@ let je = class extends g {
|
|
|
1627
1626
|
}));
|
|
1628
1627
|
}
|
|
1629
1628
|
};
|
|
1630
|
-
|
|
1629
|
+
$e.styles = g`
|
|
1631
1630
|
:host {
|
|
1632
1631
|
display: block;
|
|
1633
1632
|
cursor: pointer;
|
|
@@ -1669,21 +1668,21 @@ je.styles = b`
|
|
|
1669
1668
|
opacity: 1;
|
|
1670
1669
|
}
|
|
1671
1670
|
`;
|
|
1672
|
-
|
|
1671
|
+
it([
|
|
1673
1672
|
p({ type: Object })
|
|
1674
|
-
],
|
|
1675
|
-
|
|
1673
|
+
], $e.prototype, "block", 2);
|
|
1674
|
+
it([
|
|
1676
1675
|
p({ type: Boolean, reflect: !0 })
|
|
1677
|
-
],
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
],
|
|
1681
|
-
var
|
|
1682
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
1676
|
+
], $e.prototype, "selected", 2);
|
|
1677
|
+
$e = it([
|
|
1678
|
+
h("pigeon-spacer-block")
|
|
1679
|
+
], $e);
|
|
1680
|
+
var ko = Object.defineProperty, Co = Object.getOwnPropertyDescriptor, rt = (e, t, o, r) => {
|
|
1681
|
+
for (var i = r > 1 ? void 0 : r ? Co(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
1683
1682
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
1684
|
-
return r && i &&
|
|
1683
|
+
return r && i && ko(t, o, i), i;
|
|
1685
1684
|
};
|
|
1686
|
-
const
|
|
1685
|
+
const Io = {
|
|
1687
1686
|
facebook: "f",
|
|
1688
1687
|
twitter: "𝕏",
|
|
1689
1688
|
instagram: "ig",
|
|
@@ -1691,7 +1690,7 @@ const li = {
|
|
|
1691
1690
|
youtube: "▶",
|
|
1692
1691
|
tiktok: "♪",
|
|
1693
1692
|
custom: "★"
|
|
1694
|
-
},
|
|
1693
|
+
}, Po = {
|
|
1695
1694
|
facebook: "#1877F2",
|
|
1696
1695
|
twitter: "#000000",
|
|
1697
1696
|
instagram: "#E4405F",
|
|
@@ -1700,7 +1699,7 @@ const li = {
|
|
|
1700
1699
|
tiktok: "#000000",
|
|
1701
1700
|
custom: "#6b7280"
|
|
1702
1701
|
};
|
|
1703
|
-
let
|
|
1702
|
+
let ke = class extends d {
|
|
1704
1703
|
constructor() {
|
|
1705
1704
|
super(...arguments), this.selected = !1;
|
|
1706
1705
|
}
|
|
@@ -1720,7 +1719,7 @@ let Me = class extends g {
|
|
|
1720
1719
|
${e.icons.length === 0 ? l`<div class="empty-state">Add social icons in properties</div>` : l`
|
|
1721
1720
|
<div class="icons-container" style="justify-content: ${o[e.alignment]}; gap: ${e.spacing}px;">
|
|
1722
1721
|
${e.icons.map((r) => {
|
|
1723
|
-
const i =
|
|
1722
|
+
const i = Po[r.type] ?? "#6b7280", n = Io[r.type] ?? "?";
|
|
1724
1723
|
return l`
|
|
1725
1724
|
<a
|
|
1726
1725
|
class="social-icon"
|
|
@@ -1747,7 +1746,7 @@ let Me = class extends g {
|
|
|
1747
1746
|
}));
|
|
1748
1747
|
}
|
|
1749
1748
|
};
|
|
1750
|
-
|
|
1749
|
+
ke.styles = g`
|
|
1751
1750
|
:host {
|
|
1752
1751
|
display: block;
|
|
1753
1752
|
cursor: pointer;
|
|
@@ -1795,21 +1794,21 @@ Me.styles = b`
|
|
|
1795
1794
|
font-size: 13px;
|
|
1796
1795
|
}
|
|
1797
1796
|
`;
|
|
1798
|
-
|
|
1797
|
+
rt([
|
|
1799
1798
|
p({ type: Object })
|
|
1800
|
-
],
|
|
1801
|
-
|
|
1799
|
+
], ke.prototype, "block", 2);
|
|
1800
|
+
rt([
|
|
1802
1801
|
p({ type: Boolean, reflect: !0 })
|
|
1803
|
-
],
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
],
|
|
1807
|
-
var
|
|
1808
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
1802
|
+
], ke.prototype, "selected", 2);
|
|
1803
|
+
ke = rt([
|
|
1804
|
+
h("pigeon-social-block")
|
|
1805
|
+
], ke);
|
|
1806
|
+
var To = Object.defineProperty, So = Object.getOwnPropertyDescriptor, nt = (e, t, o, r) => {
|
|
1807
|
+
for (var i = r > 1 ? void 0 : r ? So(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
1809
1808
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
1810
|
-
return r && i &&
|
|
1809
|
+
return r && i && To(t, o, i), i;
|
|
1811
1810
|
};
|
|
1812
|
-
let
|
|
1811
|
+
let Ce = class extends d {
|
|
1813
1812
|
constructor() {
|
|
1814
1813
|
super(...arguments), this.selected = !1;
|
|
1815
1814
|
}
|
|
@@ -1848,7 +1847,7 @@ let Re = class extends g {
|
|
|
1848
1847
|
}));
|
|
1849
1848
|
}
|
|
1850
1849
|
};
|
|
1851
|
-
|
|
1850
|
+
Ce.styles = g`
|
|
1852
1851
|
:host {
|
|
1853
1852
|
display: block;
|
|
1854
1853
|
cursor: pointer;
|
|
@@ -1890,21 +1889,21 @@ Re.styles = b`
|
|
|
1890
1889
|
font-size: 13px;
|
|
1891
1890
|
}
|
|
1892
1891
|
`;
|
|
1893
|
-
|
|
1892
|
+
nt([
|
|
1894
1893
|
p({ type: Object })
|
|
1895
|
-
],
|
|
1896
|
-
|
|
1894
|
+
], Ce.prototype, "block", 2);
|
|
1895
|
+
nt([
|
|
1897
1896
|
p({ type: Boolean, reflect: !0 })
|
|
1898
|
-
],
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
],
|
|
1902
|
-
var
|
|
1903
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
1897
|
+
], Ce.prototype, "selected", 2);
|
|
1898
|
+
Ce = nt([
|
|
1899
|
+
h("pigeon-html-block")
|
|
1900
|
+
], Ce);
|
|
1901
|
+
var Oo = Object.defineProperty, Eo = Object.getOwnPropertyDescriptor, Me = (e, t, o, r) => {
|
|
1902
|
+
for (var i = r > 1 ? void 0 : r ? Eo(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
1904
1903
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
1905
|
-
return r && i &&
|
|
1904
|
+
return r && i && Oo(t, o, i), i;
|
|
1906
1905
|
};
|
|
1907
|
-
let
|
|
1906
|
+
let se = class extends d {
|
|
1908
1907
|
constructor() {
|
|
1909
1908
|
super(...arguments), this.selected = !1, this.editing = !1, this._editor = null, this._editorHost = null;
|
|
1910
1909
|
}
|
|
@@ -1914,7 +1913,7 @@ let ge = class extends g {
|
|
|
1914
1913
|
top: "flex-start",
|
|
1915
1914
|
middle: "center",
|
|
1916
1915
|
bottom: "flex-end"
|
|
1917
|
-
}, i = e.backgroundUrl ? `background-image: url(${e.backgroundUrl}); background-position: ${e.backgroundPosition};` : `background-color: ${e.backgroundColor};`, n = e.mode === "fixed-height" ? `height: ${e.height}px;` : `min-height: ${e.height}px;`, a = e.backgroundUrl || e.content,
|
|
1916
|
+
}, i = e.backgroundUrl ? `background-image: url(${e.backgroundUrl}); background-position: ${e.backgroundPosition};` : `background-color: ${e.backgroundColor};`, n = e.mode === "fixed-height" ? `height: ${e.height}px;` : `min-height: ${e.height}px;`, a = e.backgroundUrl || e.content, u = this.editing;
|
|
1918
1917
|
return l`
|
|
1919
1918
|
<div
|
|
1920
1919
|
class="wrapper"
|
|
@@ -1922,7 +1921,7 @@ let ge = class extends g {
|
|
|
1922
1921
|
@click=${this._handleClick}
|
|
1923
1922
|
@dblclick=${this._handleDblClick}
|
|
1924
1923
|
>
|
|
1925
|
-
${
|
|
1924
|
+
${u ? l`<div class="content" style="${o}"></div>` : a ? l`<div class="content" style="${o}" .innerHTML=${e.content}></div>` : l`
|
|
1926
1925
|
<div class="empty-state">
|
|
1927
1926
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
|
|
1928
1927
|
<rect x="2" y="2" width="20" height="20" rx="2"/>
|
|
@@ -1945,7 +1944,7 @@ let ge = class extends g {
|
|
|
1945
1944
|
const e = this.renderRoot.querySelector(".content");
|
|
1946
1945
|
if (!e) return;
|
|
1947
1946
|
this._editorHost = e;
|
|
1948
|
-
const t = await
|
|
1947
|
+
const t = await Ge();
|
|
1949
1948
|
!this.editing || !this._editorHost || (this._editor = t.createEditor({
|
|
1950
1949
|
element: this._editorHost,
|
|
1951
1950
|
initialHTML: this.block.values.content || "<p></p>",
|
|
@@ -1989,7 +1988,7 @@ let ge = class extends g {
|
|
|
1989
1988
|
}));
|
|
1990
1989
|
}
|
|
1991
1990
|
};
|
|
1992
|
-
|
|
1991
|
+
se.styles = g`
|
|
1993
1992
|
:host {
|
|
1994
1993
|
display: block;
|
|
1995
1994
|
cursor: pointer;
|
|
@@ -2049,24 +2048,24 @@ ge.styles = b`
|
|
|
2049
2048
|
outline: none;
|
|
2050
2049
|
}
|
|
2051
2050
|
`;
|
|
2052
|
-
|
|
2051
|
+
Me([
|
|
2053
2052
|
p({ type: Object })
|
|
2054
|
-
],
|
|
2055
|
-
|
|
2053
|
+
], se.prototype, "block", 2);
|
|
2054
|
+
Me([
|
|
2056
2055
|
p({ type: Boolean, reflect: !0 })
|
|
2057
|
-
],
|
|
2058
|
-
|
|
2056
|
+
], se.prototype, "selected", 2);
|
|
2057
|
+
Me([
|
|
2059
2058
|
p({ type: Boolean, reflect: !0 })
|
|
2060
|
-
],
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
],
|
|
2064
|
-
var
|
|
2065
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
2059
|
+
], se.prototype, "editing", 2);
|
|
2060
|
+
se = Me([
|
|
2061
|
+
h("pigeon-hero-block")
|
|
2062
|
+
], se);
|
|
2063
|
+
var Do = Object.defineProperty, Bo = Object.getOwnPropertyDescriptor, at = (e, t, o, r) => {
|
|
2064
|
+
for (var i = r > 1 ? void 0 : r ? Bo(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
2066
2065
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
2067
|
-
return r && i &&
|
|
2066
|
+
return r && i && Do(t, o, i), i;
|
|
2068
2067
|
};
|
|
2069
|
-
let
|
|
2068
|
+
let Ie = class extends d {
|
|
2070
2069
|
constructor() {
|
|
2071
2070
|
super(...arguments), this.selected = !1;
|
|
2072
2071
|
}
|
|
@@ -2109,7 +2108,7 @@ let Le = class extends g {
|
|
|
2109
2108
|
}));
|
|
2110
2109
|
}
|
|
2111
2110
|
};
|
|
2112
|
-
|
|
2111
|
+
Ie.styles = g`
|
|
2113
2112
|
:host {
|
|
2114
2113
|
display: block;
|
|
2115
2114
|
cursor: pointer;
|
|
@@ -2157,21 +2156,21 @@ Le.styles = b`
|
|
|
2157
2156
|
font-size: 13px;
|
|
2158
2157
|
}
|
|
2159
2158
|
`;
|
|
2160
|
-
|
|
2159
|
+
at([
|
|
2161
2160
|
p({ type: Object })
|
|
2162
|
-
],
|
|
2163
|
-
|
|
2161
|
+
], Ie.prototype, "block", 2);
|
|
2162
|
+
at([
|
|
2164
2163
|
p({ type: Boolean, reflect: !0 })
|
|
2165
|
-
],
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
],
|
|
2169
|
-
var
|
|
2170
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
2164
|
+
], Ie.prototype, "selected", 2);
|
|
2165
|
+
Ie = at([
|
|
2166
|
+
h("pigeon-navbar-block")
|
|
2167
|
+
], Ie);
|
|
2168
|
+
var jo = Object.defineProperty, Ro = Object.getOwnPropertyDescriptor, q = (e, t, o, r) => {
|
|
2169
|
+
for (var i = r > 1 ? void 0 : r ? Ro(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
2171
2170
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
2172
|
-
return r && i &&
|
|
2171
|
+
return r && i && jo(t, o, i), i;
|
|
2173
2172
|
};
|
|
2174
|
-
let
|
|
2173
|
+
let O = class extends d {
|
|
2175
2174
|
constructor() {
|
|
2176
2175
|
super(...arguments), this.rowId = "", this.selection = null, this.editingBlockId = null, this._dropIndex = -1, this._isDragOver = !1, this._draggingBlockId = null;
|
|
2177
2176
|
}
|
|
@@ -2257,7 +2256,7 @@ let A = class extends g {
|
|
|
2257
2256
|
* failing with "Unknown block type".
|
|
2258
2257
|
*/
|
|
2259
2258
|
_renderCustomBlock(e, t) {
|
|
2260
|
-
const o =
|
|
2259
|
+
const o = Je(e.type), r = e, i = o != null && o.renderCanvas ? $t(o.renderCanvas(r)) : l`<span class="custom-block__label"
|
|
2261
2260
|
>${(o == null ? void 0 : o.label) ?? e.type}</span
|
|
2262
2261
|
>`;
|
|
2263
2262
|
return l`<div
|
|
@@ -2280,7 +2279,7 @@ let A = class extends g {
|
|
|
2280
2279
|
);
|
|
2281
2280
|
}
|
|
2282
2281
|
_onDragOver(e) {
|
|
2283
|
-
const t =
|
|
2282
|
+
const t = _e();
|
|
2284
2283
|
if (!t || t.type !== "palette-block" && t.type !== "existing-block") return;
|
|
2285
2284
|
e.preventDefault(), e.stopPropagation(), e.dataTransfer && (e.dataTransfer.dropEffect = t.type === "existing-block" ? "move" : "copy"), this._isDragOver = !0;
|
|
2286
2285
|
const o = Array.from(
|
|
@@ -2288,19 +2287,19 @@ let A = class extends g {
|
|
|
2288
2287
|
"pigeon-text-block, pigeon-image-block, pigeon-button-block, pigeon-divider-block, pigeon-spacer-block, pigeon-social-block, pigeon-html-block, pigeon-hero-block, pigeon-navbar-block, .custom-block"
|
|
2289
2288
|
)
|
|
2290
2289
|
);
|
|
2291
|
-
this._dropIndex =
|
|
2290
|
+
this._dropIndex = co(e.clientY, o);
|
|
2292
2291
|
}
|
|
2293
2292
|
_onDragLeave(e) {
|
|
2294
2293
|
const t = this.getBoundingClientRect();
|
|
2295
2294
|
e.clientX >= t.left && e.clientX <= t.right && e.clientY >= t.top && e.clientY <= t.bottom || (this._isDragOver = !1, this._dropIndex = -1);
|
|
2296
2295
|
}
|
|
2297
2296
|
_onDrop(e) {
|
|
2298
|
-
const t =
|
|
2297
|
+
const t = _e();
|
|
2299
2298
|
if (!t || t.type !== "palette-block" && t.type !== "existing-block") return;
|
|
2300
2299
|
e.preventDefault(), e.stopPropagation();
|
|
2301
2300
|
let o = this._dropIndex >= 0 ? this._dropIndex : this.column.blocks.length;
|
|
2302
2301
|
if (t.type === "existing-block" && t.rowId === this.rowId && t.columnId === this.column.id) {
|
|
2303
|
-
const r = this.column.blocks.findIndex((n) => n.id === t.blockId), i =
|
|
2302
|
+
const r = this.column.blocks.findIndex((n) => n.id === t.blockId), i = kt(r, o);
|
|
2304
2303
|
if (i === null) {
|
|
2305
2304
|
this._resetDragState();
|
|
2306
2305
|
return;
|
|
@@ -2319,10 +2318,10 @@ let A = class extends g {
|
|
|
2319
2318
|
})), this._resetDragState();
|
|
2320
2319
|
}
|
|
2321
2320
|
_resetDragState() {
|
|
2322
|
-
this._isDragOver = !1, this._dropIndex = -1,
|
|
2321
|
+
this._isDragOver = !1, this._dropIndex = -1, Be();
|
|
2323
2322
|
}
|
|
2324
2323
|
_onBlockDragStart(e, t) {
|
|
2325
|
-
if (
|
|
2324
|
+
if (Qe(e, {
|
|
2326
2325
|
type: "existing-block",
|
|
2327
2326
|
blockId: t,
|
|
2328
2327
|
rowId: this.rowId,
|
|
@@ -2334,10 +2333,10 @@ let A = class extends g {
|
|
|
2334
2333
|
this._draggingBlockId = t;
|
|
2335
2334
|
}
|
|
2336
2335
|
_onBlockDragEnd() {
|
|
2337
|
-
this._draggingBlockId = null,
|
|
2336
|
+
this._draggingBlockId = null, Be();
|
|
2338
2337
|
}
|
|
2339
2338
|
};
|
|
2340
|
-
|
|
2339
|
+
O.styles = g`
|
|
2341
2340
|
:host {
|
|
2342
2341
|
display: block;
|
|
2343
2342
|
min-height: 40px;
|
|
@@ -2453,36 +2452,36 @@ A.styles = b`
|
|
|
2453
2452
|
text-align: center;
|
|
2454
2453
|
}
|
|
2455
2454
|
`;
|
|
2456
|
-
|
|
2455
|
+
q([
|
|
2457
2456
|
p({ type: Object })
|
|
2458
|
-
],
|
|
2459
|
-
|
|
2457
|
+
], O.prototype, "column", 2);
|
|
2458
|
+
q([
|
|
2460
2459
|
p({ type: String, attribute: "row-id" })
|
|
2461
|
-
],
|
|
2462
|
-
|
|
2460
|
+
], O.prototype, "rowId", 2);
|
|
2461
|
+
q([
|
|
2463
2462
|
p({ type: Object })
|
|
2464
|
-
],
|
|
2465
|
-
|
|
2463
|
+
], O.prototype, "selection", 2);
|
|
2464
|
+
q([
|
|
2466
2465
|
p({ type: String, attribute: "editing-block-id" })
|
|
2467
|
-
],
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
],
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
],
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
],
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
],
|
|
2480
|
-
var
|
|
2481
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
2466
|
+
], O.prototype, "editingBlockId", 2);
|
|
2467
|
+
q([
|
|
2468
|
+
c()
|
|
2469
|
+
], O.prototype, "_dropIndex", 2);
|
|
2470
|
+
q([
|
|
2471
|
+
c()
|
|
2472
|
+
], O.prototype, "_isDragOver", 2);
|
|
2473
|
+
q([
|
|
2474
|
+
c()
|
|
2475
|
+
], O.prototype, "_draggingBlockId", 2);
|
|
2476
|
+
O = q([
|
|
2477
|
+
h("pigeon-column")
|
|
2478
|
+
], O);
|
|
2479
|
+
var Lo = Object.defineProperty, zo = Object.getOwnPropertyDescriptor, Y = (e, t, o, r) => {
|
|
2480
|
+
for (var i = r > 1 ? void 0 : r ? zo(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
2482
2481
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
2483
|
-
return r && i &&
|
|
2482
|
+
return r && i && Lo(t, o, i), i;
|
|
2484
2483
|
};
|
|
2485
|
-
let
|
|
2484
|
+
let E = class extends d {
|
|
2486
2485
|
constructor() {
|
|
2487
2486
|
super(...arguments), this.index = 0, this.totalRows = 0, this.selection = null, this.editingBlockId = null, this.showActions = !1, this._dragging = !1;
|
|
2488
2487
|
}
|
|
@@ -2499,10 +2498,10 @@ let B = class extends g {
|
|
|
2499
2498
|
<div class="row-label">Row</div>
|
|
2500
2499
|
|
|
2501
2500
|
<div class="columns">
|
|
2502
|
-
${this.row.columns.map((a,
|
|
2503
|
-
const
|
|
2501
|
+
${this.row.columns.map((a, u) => {
|
|
2502
|
+
const y = (this.row.columnRatios[u] ?? 1) / 12 * 100;
|
|
2504
2503
|
return l`
|
|
2505
|
-
<div class="column-wrapper" style="width: ${
|
|
2504
|
+
<div class="column-wrapper" style="width: ${y}%;">
|
|
2506
2505
|
<pigeon-column
|
|
2507
2506
|
.column=${a}
|
|
2508
2507
|
row-id="${this.row.id}"
|
|
@@ -2629,7 +2628,7 @@ let B = class extends g {
|
|
|
2629
2628
|
}));
|
|
2630
2629
|
}
|
|
2631
2630
|
_onDragStart(e) {
|
|
2632
|
-
if (
|
|
2631
|
+
if (Qe(e, {
|
|
2633
2632
|
type: "existing-row",
|
|
2634
2633
|
rowId: this.row.id
|
|
2635
2634
|
}), e.dataTransfer) {
|
|
@@ -2639,10 +2638,10 @@ let B = class extends g {
|
|
|
2639
2638
|
this._dragging = !0;
|
|
2640
2639
|
}
|
|
2641
2640
|
_onDragEnd() {
|
|
2642
|
-
this._dragging = !1,
|
|
2641
|
+
this._dragging = !1, Be();
|
|
2643
2642
|
}
|
|
2644
2643
|
};
|
|
2645
|
-
|
|
2644
|
+
E.styles = g`
|
|
2646
2645
|
:host {
|
|
2647
2646
|
display: block;
|
|
2648
2647
|
position: relative;
|
|
@@ -2773,36 +2772,36 @@ B.styles = b`
|
|
|
2773
2772
|
opacity: 1;
|
|
2774
2773
|
}
|
|
2775
2774
|
`;
|
|
2776
|
-
|
|
2775
|
+
Y([
|
|
2777
2776
|
p({ type: Object })
|
|
2778
|
-
],
|
|
2779
|
-
|
|
2777
|
+
], E.prototype, "row", 2);
|
|
2778
|
+
Y([
|
|
2780
2779
|
p({ type: Number })
|
|
2781
|
-
],
|
|
2782
|
-
|
|
2780
|
+
], E.prototype, "index", 2);
|
|
2781
|
+
Y([
|
|
2783
2782
|
p({ type: Number, attribute: "total-rows" })
|
|
2784
|
-
],
|
|
2785
|
-
|
|
2783
|
+
], E.prototype, "totalRows", 2);
|
|
2784
|
+
Y([
|
|
2786
2785
|
p({ type: Object })
|
|
2787
|
-
],
|
|
2788
|
-
|
|
2786
|
+
], E.prototype, "selection", 2);
|
|
2787
|
+
Y([
|
|
2789
2788
|
p({ type: String, attribute: "editing-block-id" })
|
|
2790
|
-
],
|
|
2791
|
-
|
|
2789
|
+
], E.prototype, "editingBlockId", 2);
|
|
2790
|
+
Y([
|
|
2792
2791
|
p({ type: Boolean, attribute: "show-actions", reflect: !0 })
|
|
2793
|
-
],
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
],
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
],
|
|
2800
|
-
var
|
|
2801
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
2792
|
+
], E.prototype, "showActions", 2);
|
|
2793
|
+
Y([
|
|
2794
|
+
c()
|
|
2795
|
+
], E.prototype, "_dragging", 2);
|
|
2796
|
+
E = Y([
|
|
2797
|
+
h("pigeon-row")
|
|
2798
|
+
], E);
|
|
2799
|
+
var Mo = Object.defineProperty, Ao = Object.getOwnPropertyDescriptor, z = (e, t, o, r) => {
|
|
2800
|
+
for (var i = r > 1 ? void 0 : r ? Ao(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
2802
2801
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
2803
|
-
return r && i &&
|
|
2802
|
+
return r && i && Mo(t, o, i), i;
|
|
2804
2803
|
};
|
|
2805
|
-
let
|
|
2804
|
+
let C = class extends d {
|
|
2806
2805
|
constructor() {
|
|
2807
2806
|
super(...arguments), this.selection = null, this.editingBlockId = null, this.previewWidth = 0, this.device = "desktop", this._rowDropIndex = -1, this._isDragOver = !1, this._hoveredRowId = null, this._onPointerOverRow = (e) => {
|
|
2808
2807
|
var r;
|
|
@@ -2870,13 +2869,13 @@ let P = class extends g {
|
|
|
2870
2869
|
` : l`
|
|
2871
2870
|
<div class="rows-container">
|
|
2872
2871
|
${o.map(
|
|
2873
|
-
(a,
|
|
2872
|
+
(a, u) => l`
|
|
2874
2873
|
<pigeon-drop-indicator
|
|
2875
|
-
?visible=${this._isDragOver && this._rowDropIndex ===
|
|
2874
|
+
?visible=${this._isDragOver && this._rowDropIndex === u}
|
|
2876
2875
|
></pigeon-drop-indicator>
|
|
2877
2876
|
<pigeon-row
|
|
2878
2877
|
.row=${a}
|
|
2879
|
-
.index=${
|
|
2878
|
+
.index=${u}
|
|
2880
2879
|
.totalRows=${o.length}
|
|
2881
2880
|
.selection=${this.selection}
|
|
2882
2881
|
.editingBlockId=${this.editingBlockId}
|
|
@@ -2901,12 +2900,12 @@ let P = class extends g {
|
|
|
2901
2900
|
}));
|
|
2902
2901
|
}
|
|
2903
2902
|
_onDragOver(e) {
|
|
2904
|
-
const t =
|
|
2903
|
+
const t = _e();
|
|
2905
2904
|
if (t && (e.preventDefault(), e.dataTransfer && (e.dataTransfer.dropEffect = t.type === "existing-row" ? "move" : "copy"), this._isDragOver = !0, t.type === "palette-row" || t.type === "existing-row" || t.type === "library-row" || this.doc.body.rows.length === 0)) {
|
|
2906
2905
|
const o = Array.from(
|
|
2907
2906
|
this.renderRoot.querySelectorAll("pigeon-row")
|
|
2908
2907
|
);
|
|
2909
|
-
this._rowDropIndex =
|
|
2908
|
+
this._rowDropIndex = po(e.clientY, o);
|
|
2910
2909
|
}
|
|
2911
2910
|
}
|
|
2912
2911
|
_onDragLeave(e) {
|
|
@@ -2916,7 +2915,7 @@ let P = class extends g {
|
|
|
2916
2915
|
}
|
|
2917
2916
|
_onDrop(e) {
|
|
2918
2917
|
e.preventDefault();
|
|
2919
|
-
const t =
|
|
2918
|
+
const t = _e();
|
|
2920
2919
|
if (!t) {
|
|
2921
2920
|
this._resetDragState();
|
|
2922
2921
|
return;
|
|
@@ -2939,7 +2938,7 @@ let P = class extends g {
|
|
|
2939
2938
|
composed: !0
|
|
2940
2939
|
}));
|
|
2941
2940
|
} else if (t.type === "existing-row" && t.rowId) {
|
|
2942
|
-
const o = this.doc.body.rows.findIndex((n) => n.id === t.rowId), r = this._rowDropIndex >= 0 ? this._rowDropIndex : this.doc.body.rows.length, i =
|
|
2941
|
+
const o = this.doc.body.rows.findIndex((n) => n.id === t.rowId), r = this._rowDropIndex >= 0 ? this._rowDropIndex : this.doc.body.rows.length, i = kt(o, r);
|
|
2943
2942
|
i !== null && this.dispatchEvent(new CustomEvent("row-move", {
|
|
2944
2943
|
detail: { rowId: t.rowId, toIndex: i },
|
|
2945
2944
|
bubbles: !0,
|
|
@@ -2956,10 +2955,10 @@ let P = class extends g {
|
|
|
2956
2955
|
this._resetDragState();
|
|
2957
2956
|
}
|
|
2958
2957
|
_resetDragState() {
|
|
2959
|
-
this._isDragOver = !1, this._rowDropIndex = -1,
|
|
2958
|
+
this._isDragOver = !1, this._rowDropIndex = -1, Be();
|
|
2960
2959
|
}
|
|
2961
2960
|
};
|
|
2962
|
-
|
|
2961
|
+
C.styles = g`
|
|
2963
2962
|
:host {
|
|
2964
2963
|
display: block;
|
|
2965
2964
|
flex: 1;
|
|
@@ -3088,383 +3087,34 @@ P.styles = b`
|
|
|
3088
3087
|
border-radius: var(--pigeon-radius, 6px);
|
|
3089
3088
|
}
|
|
3090
3089
|
`;
|
|
3091
|
-
|
|
3090
|
+
z([
|
|
3092
3091
|
p({ type: Object })
|
|
3093
|
-
],
|
|
3094
|
-
|
|
3092
|
+
], C.prototype, "doc", 2);
|
|
3093
|
+
z([
|
|
3095
3094
|
p({ type: Object })
|
|
3096
|
-
],
|
|
3097
|
-
|
|
3095
|
+
], C.prototype, "selection", 2);
|
|
3096
|
+
z([
|
|
3098
3097
|
p({ type: String, attribute: "editing-block-id" })
|
|
3099
|
-
],
|
|
3100
|
-
|
|
3098
|
+
], C.prototype, "editingBlockId", 2);
|
|
3099
|
+
z([
|
|
3101
3100
|
p({ type: Number, attribute: "preview-width" })
|
|
3102
|
-
],
|
|
3103
|
-
|
|
3101
|
+
], C.prototype, "previewWidth", 2);
|
|
3102
|
+
z([
|
|
3104
3103
|
p({ type: String })
|
|
3105
|
-
],
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
],
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
],
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
],
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
],
|
|
3118
|
-
|
|
3119
|
-
* @license
|
|
3120
|
-
* Copyright 2017 Google LLC
|
|
3121
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
3122
|
-
*/
|
|
3123
|
-
const Se = globalThis, Wt = (e) => e, Je = Se.trustedTypes, qt = Je ? Je.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, io = "$lit$", q = `lit$${Math.random().toFixed(9).slice(2)}$`, ro = "?" + q, $i = `<${ro}>`, ne = document, Ze = () => ne.createComment(""), ze = (e) => e === null || typeof e != "object" && typeof e != "function", Et = Array.isArray, wi = (e) => Et(e) || typeof (e == null ? void 0 : e[Symbol.iterator]) == "function", bt = `[
|
|
3124
|
-
\f\r]`, Pe = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Vt = /-->/g, Yt = />/g, ie = RegExp(`>|${bt}(?:([^\\s"'>=/]+)(${bt}*=${bt}*(?:[^
|
|
3125
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), Xt = /'/g, Gt = /"/g, no = /^(?:script|style|textarea|title)$/i, He = Symbol.for("lit-noChange"), y = Symbol.for("lit-nothing"), Jt = /* @__PURE__ */ new WeakMap(), re = ne.createTreeWalker(ne, 129);
|
|
3126
|
-
function ao(e, t) {
|
|
3127
|
-
if (!Et(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
3128
|
-
return qt !== void 0 ? qt.createHTML(t) : t;
|
|
3129
|
-
}
|
|
3130
|
-
const ki = (e, t) => {
|
|
3131
|
-
const o = e.length - 1, r = [];
|
|
3132
|
-
let i, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", a = Pe;
|
|
3133
|
-
for (let h = 0; h < o; h++) {
|
|
3134
|
-
const c = e[h];
|
|
3135
|
-
let v, m, f = -1, R = 0;
|
|
3136
|
-
for (; R < c.length && (a.lastIndex = R, m = a.exec(c), m !== null); ) R = a.lastIndex, a === Pe ? m[1] === "!--" ? a = Vt : m[1] !== void 0 ? a = Yt : m[2] !== void 0 ? (no.test(m[2]) && (i = RegExp("</" + m[2], "g")), a = ie) : m[3] !== void 0 && (a = ie) : a === ie ? m[0] === ">" ? (a = i ?? Pe, f = -1) : m[1] === void 0 ? f = -2 : (f = a.lastIndex - m[2].length, v = m[1], a = m[3] === void 0 ? ie : m[3] === '"' ? Gt : Xt) : a === Gt || a === Xt ? a = ie : a === Vt || a === Yt ? a = Pe : (a = ie, i = void 0);
|
|
3137
|
-
const W = a === ie && e[h + 1].startsWith("/>") ? " " : "";
|
|
3138
|
-
n += a === Pe ? c + $i : f >= 0 ? (r.push(v), c.slice(0, f) + io + c.slice(f) + q + W) : c + q + (f === -2 ? h : W);
|
|
3139
|
-
}
|
|
3140
|
-
return [ao(e, n + (e[o] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
|
|
3141
|
-
};
|
|
3142
|
-
class Fe {
|
|
3143
|
-
constructor({ strings: t, _$litType$: o }, r) {
|
|
3144
|
-
let i;
|
|
3145
|
-
this.parts = [];
|
|
3146
|
-
let n = 0, a = 0;
|
|
3147
|
-
const h = t.length - 1, c = this.parts, [v, m] = ki(t, o);
|
|
3148
|
-
if (this.el = Fe.createElement(v, r), re.currentNode = this.el.content, o === 2 || o === 3) {
|
|
3149
|
-
const f = this.el.content.firstChild;
|
|
3150
|
-
f.replaceWith(...f.childNodes);
|
|
3151
|
-
}
|
|
3152
|
-
for (; (i = re.nextNode()) !== null && c.length < h; ) {
|
|
3153
|
-
if (i.nodeType === 1) {
|
|
3154
|
-
if (i.hasAttributes()) for (const f of i.getAttributeNames()) if (f.endsWith(io)) {
|
|
3155
|
-
const R = m[a++], W = i.getAttribute(f).split(q), qe = /([.?@])?(.*)/.exec(R);
|
|
3156
|
-
c.push({ type: 1, index: n, name: qe[2], strings: W, ctor: qe[1] === "." ? Ii : qe[1] === "?" ? Ti : qe[1] === "@" ? Pi : nt }), i.removeAttribute(f);
|
|
3157
|
-
} else f.startsWith(q) && (c.push({ type: 6, index: n }), i.removeAttribute(f));
|
|
3158
|
-
if (no.test(i.tagName)) {
|
|
3159
|
-
const f = i.textContent.split(q), R = f.length - 1;
|
|
3160
|
-
if (R > 0) {
|
|
3161
|
-
i.textContent = Je ? Je.emptyScript : "";
|
|
3162
|
-
for (let W = 0; W < R; W++) i.append(f[W], Ze()), re.nextNode(), c.push({ type: 2, index: ++n });
|
|
3163
|
-
i.append(f[R], Ze());
|
|
3164
|
-
}
|
|
3165
|
-
}
|
|
3166
|
-
} else if (i.nodeType === 8) if (i.data === ro) c.push({ type: 2, index: n });
|
|
3167
|
-
else {
|
|
3168
|
-
let f = -1;
|
|
3169
|
-
for (; (f = i.data.indexOf(q, f + 1)) !== -1; ) c.push({ type: 7, index: n }), f += q.length - 1;
|
|
3170
|
-
}
|
|
3171
|
-
n++;
|
|
3172
|
-
}
|
|
3173
|
-
}
|
|
3174
|
-
static createElement(t, o) {
|
|
3175
|
-
const r = ne.createElement("template");
|
|
3176
|
-
return r.innerHTML = t, r;
|
|
3177
|
-
}
|
|
3178
|
-
}
|
|
3179
|
-
function ue(e, t, o = e, r) {
|
|
3180
|
-
var a, h;
|
|
3181
|
-
if (t === He) return t;
|
|
3182
|
-
let i = r !== void 0 ? (a = o._$Co) == null ? void 0 : a[r] : o._$Cl;
|
|
3183
|
-
const n = ze(t) ? void 0 : t._$litDirective$;
|
|
3184
|
-
return (i == null ? void 0 : i.constructor) !== n && ((h = i == null ? void 0 : i._$AO) == null || h.call(i, !1), n === void 0 ? i = void 0 : (i = new n(e), i._$AT(e, o, r)), r !== void 0 ? (o._$Co ?? (o._$Co = []))[r] = i : o._$Cl = i), i !== void 0 && (t = ue(e, i._$AS(e, t.values), i, r)), t;
|
|
3185
|
-
}
|
|
3186
|
-
class Ci {
|
|
3187
|
-
constructor(t, o) {
|
|
3188
|
-
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = o;
|
|
3189
|
-
}
|
|
3190
|
-
get parentNode() {
|
|
3191
|
-
return this._$AM.parentNode;
|
|
3192
|
-
}
|
|
3193
|
-
get _$AU() {
|
|
3194
|
-
return this._$AM._$AU;
|
|
3195
|
-
}
|
|
3196
|
-
u(t) {
|
|
3197
|
-
const { el: { content: o }, parts: r } = this._$AD, i = ((t == null ? void 0 : t.creationScope) ?? ne).importNode(o, !0);
|
|
3198
|
-
re.currentNode = i;
|
|
3199
|
-
let n = re.nextNode(), a = 0, h = 0, c = r[0];
|
|
3200
|
-
for (; c !== void 0; ) {
|
|
3201
|
-
if (a === c.index) {
|
|
3202
|
-
let v;
|
|
3203
|
-
c.type === 2 ? v = new rt(n, n.nextSibling, this, t) : c.type === 1 ? v = new c.ctor(n, c.name, c.strings, this, t) : c.type === 6 && (v = new Si(n, this, t)), this._$AV.push(v), c = r[++h];
|
|
3204
|
-
}
|
|
3205
|
-
a !== (c == null ? void 0 : c.index) && (n = re.nextNode(), a++);
|
|
3206
|
-
}
|
|
3207
|
-
return re.currentNode = ne, i;
|
|
3208
|
-
}
|
|
3209
|
-
p(t) {
|
|
3210
|
-
let o = 0;
|
|
3211
|
-
for (const r of this._$AV) r !== void 0 && (r.strings !== void 0 ? (r._$AI(t, r, o), o += r.strings.length - 2) : r._$AI(t[o])), o++;
|
|
3212
|
-
}
|
|
3213
|
-
}
|
|
3214
|
-
class rt {
|
|
3215
|
-
get _$AU() {
|
|
3216
|
-
var t;
|
|
3217
|
-
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
|
3218
|
-
}
|
|
3219
|
-
constructor(t, o, r, i) {
|
|
3220
|
-
this.type = 2, this._$AH = y, this._$AN = void 0, this._$AA = t, this._$AB = o, this._$AM = r, this.options = i, this._$Cv = (i == null ? void 0 : i.isConnected) ?? !0;
|
|
3221
|
-
}
|
|
3222
|
-
get parentNode() {
|
|
3223
|
-
let t = this._$AA.parentNode;
|
|
3224
|
-
const o = this._$AM;
|
|
3225
|
-
return o !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = o.parentNode), t;
|
|
3226
|
-
}
|
|
3227
|
-
get startNode() {
|
|
3228
|
-
return this._$AA;
|
|
3229
|
-
}
|
|
3230
|
-
get endNode() {
|
|
3231
|
-
return this._$AB;
|
|
3232
|
-
}
|
|
3233
|
-
_$AI(t, o = this) {
|
|
3234
|
-
t = ue(this, t, o), ze(t) ? t === y || t == null || t === "" ? (this._$AH !== y && this._$AR(), this._$AH = y) : t !== this._$AH && t !== He && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : wi(t) ? this.k(t) : this._(t);
|
|
3235
|
-
}
|
|
3236
|
-
O(t) {
|
|
3237
|
-
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
3238
|
-
}
|
|
3239
|
-
T(t) {
|
|
3240
|
-
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
3241
|
-
}
|
|
3242
|
-
_(t) {
|
|
3243
|
-
this._$AH !== y && ze(this._$AH) ? this._$AA.nextSibling.data = t : this.T(ne.createTextNode(t)), this._$AH = t;
|
|
3244
|
-
}
|
|
3245
|
-
$(t) {
|
|
3246
|
-
var n;
|
|
3247
|
-
const { values: o, _$litType$: r } = t, i = typeof r == "number" ? this._$AC(t) : (r.el === void 0 && (r.el = Fe.createElement(ao(r.h, r.h[0]), this.options)), r);
|
|
3248
|
-
if (((n = this._$AH) == null ? void 0 : n._$AD) === i) this._$AH.p(o);
|
|
3249
|
-
else {
|
|
3250
|
-
const a = new Ci(i, this), h = a.u(this.options);
|
|
3251
|
-
a.p(o), this.T(h), this._$AH = a;
|
|
3252
|
-
}
|
|
3253
|
-
}
|
|
3254
|
-
_$AC(t) {
|
|
3255
|
-
let o = Jt.get(t.strings);
|
|
3256
|
-
return o === void 0 && Jt.set(t.strings, o = new Fe(t)), o;
|
|
3257
|
-
}
|
|
3258
|
-
k(t) {
|
|
3259
|
-
Et(this._$AH) || (this._$AH = [], this._$AR());
|
|
3260
|
-
const o = this._$AH;
|
|
3261
|
-
let r, i = 0;
|
|
3262
|
-
for (const n of t) i === o.length ? o.push(r = new rt(this.O(Ze()), this.O(Ze()), this, this.options)) : r = o[i], r._$AI(n), i++;
|
|
3263
|
-
i < o.length && (this._$AR(r && r._$AB.nextSibling, i), o.length = i);
|
|
3264
|
-
}
|
|
3265
|
-
_$AR(t = this._$AA.nextSibling, o) {
|
|
3266
|
-
var r;
|
|
3267
|
-
for ((r = this._$AP) == null ? void 0 : r.call(this, !1, !0, o); t !== this._$AB; ) {
|
|
3268
|
-
const i = Wt(t).nextSibling;
|
|
3269
|
-
Wt(t).remove(), t = i;
|
|
3270
|
-
}
|
|
3271
|
-
}
|
|
3272
|
-
setConnected(t) {
|
|
3273
|
-
var o;
|
|
3274
|
-
this._$AM === void 0 && (this._$Cv = t, (o = this._$AP) == null || o.call(this, t));
|
|
3275
|
-
}
|
|
3276
|
-
}
|
|
3277
|
-
class nt {
|
|
3278
|
-
get tagName() {
|
|
3279
|
-
return this.element.tagName;
|
|
3280
|
-
}
|
|
3281
|
-
get _$AU() {
|
|
3282
|
-
return this._$AM._$AU;
|
|
3283
|
-
}
|
|
3284
|
-
constructor(t, o, r, i, n) {
|
|
3285
|
-
this.type = 1, this._$AH = y, this._$AN = void 0, this.element = t, this.name = o, this._$AM = i, this.options = n, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = y;
|
|
3286
|
-
}
|
|
3287
|
-
_$AI(t, o = this, r, i) {
|
|
3288
|
-
const n = this.strings;
|
|
3289
|
-
let a = !1;
|
|
3290
|
-
if (n === void 0) t = ue(this, t, o, 0), a = !ze(t) || t !== this._$AH && t !== He, a && (this._$AH = t);
|
|
3291
|
-
else {
|
|
3292
|
-
const h = t;
|
|
3293
|
-
let c, v;
|
|
3294
|
-
for (t = n[0], c = 0; c < n.length - 1; c++) v = ue(this, h[r + c], o, c), v === He && (v = this._$AH[c]), a || (a = !ze(v) || v !== this._$AH[c]), v === y ? t = y : t !== y && (t += (v ?? "") + n[c + 1]), this._$AH[c] = v;
|
|
3295
|
-
}
|
|
3296
|
-
a && !i && this.j(t);
|
|
3297
|
-
}
|
|
3298
|
-
j(t) {
|
|
3299
|
-
t === y ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
3300
|
-
}
|
|
3301
|
-
}
|
|
3302
|
-
class Ii extends nt {
|
|
3303
|
-
constructor() {
|
|
3304
|
-
super(...arguments), this.type = 3;
|
|
3305
|
-
}
|
|
3306
|
-
j(t) {
|
|
3307
|
-
this.element[this.name] = t === y ? void 0 : t;
|
|
3308
|
-
}
|
|
3309
|
-
}
|
|
3310
|
-
class Ti extends nt {
|
|
3311
|
-
constructor() {
|
|
3312
|
-
super(...arguments), this.type = 4;
|
|
3313
|
-
}
|
|
3314
|
-
j(t) {
|
|
3315
|
-
this.element.toggleAttribute(this.name, !!t && t !== y);
|
|
3316
|
-
}
|
|
3317
|
-
}
|
|
3318
|
-
class Pi extends nt {
|
|
3319
|
-
constructor(t, o, r, i, n) {
|
|
3320
|
-
super(t, o, r, i, n), this.type = 5;
|
|
3321
|
-
}
|
|
3322
|
-
_$AI(t, o = this) {
|
|
3323
|
-
if ((t = ue(this, t, o, 0) ?? y) === He) return;
|
|
3324
|
-
const r = this._$AH, i = t === y && r !== y || t.capture !== r.capture || t.once !== r.once || t.passive !== r.passive, n = t !== y && (r === y || i);
|
|
3325
|
-
i && this.element.removeEventListener(this.name, this, r), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
3326
|
-
}
|
|
3327
|
-
handleEvent(t) {
|
|
3328
|
-
var o;
|
|
3329
|
-
typeof this._$AH == "function" ? this._$AH.call(((o = this.options) == null ? void 0 : o.host) ?? this.element, t) : this._$AH.handleEvent(t);
|
|
3330
|
-
}
|
|
3331
|
-
}
|
|
3332
|
-
class Si {
|
|
3333
|
-
constructor(t, o, r) {
|
|
3334
|
-
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = o, this.options = r;
|
|
3335
|
-
}
|
|
3336
|
-
get _$AU() {
|
|
3337
|
-
return this._$AM._$AU;
|
|
3338
|
-
}
|
|
3339
|
-
_$AI(t) {
|
|
3340
|
-
ue(this, t);
|
|
3341
|
-
}
|
|
3342
|
-
}
|
|
3343
|
-
const vt = Se.litHtmlPolyfillSupport;
|
|
3344
|
-
vt == null || vt(Fe, rt), (Se.litHtmlVersions ?? (Se.litHtmlVersions = [])).push("3.3.3");
|
|
3345
|
-
/**
|
|
3346
|
-
* @license
|
|
3347
|
-
* Copyright 2020 Google LLC
|
|
3348
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
3349
|
-
*/
|
|
3350
|
-
const Oi = (e) => e.strings === void 0;
|
|
3351
|
-
/**
|
|
3352
|
-
* @license
|
|
3353
|
-
* Copyright 2017 Google LLC
|
|
3354
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
3355
|
-
*/
|
|
3356
|
-
const Ei = { CHILD: 2 }, Di = (e) => (...t) => ({ _$litDirective$: e, values: t });
|
|
3357
|
-
class Ai {
|
|
3358
|
-
constructor(t) {
|
|
3359
|
-
}
|
|
3360
|
-
get _$AU() {
|
|
3361
|
-
return this._$AM._$AU;
|
|
3362
|
-
}
|
|
3363
|
-
_$AT(t, o, r) {
|
|
3364
|
-
this._$Ct = t, this._$AM = o, this._$Ci = r;
|
|
3365
|
-
}
|
|
3366
|
-
_$AS(t, o) {
|
|
3367
|
-
return this.update(t, o);
|
|
3368
|
-
}
|
|
3369
|
-
update(t, o) {
|
|
3370
|
-
return this.render(...o);
|
|
3371
|
-
}
|
|
3372
|
-
}
|
|
3373
|
-
/**
|
|
3374
|
-
* @license
|
|
3375
|
-
* Copyright 2017 Google LLC
|
|
3376
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
3377
|
-
*/
|
|
3378
|
-
const Oe = (e, t) => {
|
|
3379
|
-
var r;
|
|
3380
|
-
const o = e._$AN;
|
|
3381
|
-
if (o === void 0) return !1;
|
|
3382
|
-
for (const i of o) (r = i._$AO) == null || r.call(i, t, !1), Oe(i, t);
|
|
3383
|
-
return !0;
|
|
3384
|
-
}, Qe = (e) => {
|
|
3385
|
-
let t, o;
|
|
3386
|
-
do {
|
|
3387
|
-
if ((t = e._$AM) === void 0) break;
|
|
3388
|
-
o = t._$AN, o.delete(e), e = t;
|
|
3389
|
-
} while ((o == null ? void 0 : o.size) === 0);
|
|
3390
|
-
}, so = (e) => {
|
|
3391
|
-
for (let t; t = e._$AM; e = t) {
|
|
3392
|
-
let o = t._$AN;
|
|
3393
|
-
if (o === void 0) t._$AN = o = /* @__PURE__ */ new Set();
|
|
3394
|
-
else if (o.has(e)) break;
|
|
3395
|
-
o.add(e), Mi(t);
|
|
3396
|
-
}
|
|
3397
|
-
};
|
|
3398
|
-
function Bi(e) {
|
|
3399
|
-
this._$AN !== void 0 ? (Qe(this), this._$AM = e, so(this)) : this._$AM = e;
|
|
3400
|
-
}
|
|
3401
|
-
function ji(e, t = !1, o = 0) {
|
|
3402
|
-
const r = this._$AH, i = this._$AN;
|
|
3403
|
-
if (i !== void 0 && i.size !== 0) if (t) if (Array.isArray(r)) for (let n = o; n < r.length; n++) Oe(r[n], !1), Qe(r[n]);
|
|
3404
|
-
else r != null && (Oe(r, !1), Qe(r));
|
|
3405
|
-
else Oe(this, e);
|
|
3406
|
-
}
|
|
3407
|
-
const Mi = (e) => {
|
|
3408
|
-
e.type == Ei.CHILD && (e._$AP ?? (e._$AP = ji), e._$AQ ?? (e._$AQ = Bi));
|
|
3409
|
-
};
|
|
3410
|
-
class Ri extends Ai {
|
|
3411
|
-
constructor() {
|
|
3412
|
-
super(...arguments), this._$AN = void 0;
|
|
3413
|
-
}
|
|
3414
|
-
_$AT(t, o, r) {
|
|
3415
|
-
super._$AT(t, o, r), so(this), this.isConnected = t._$AU;
|
|
3416
|
-
}
|
|
3417
|
-
_$AO(t, o = !0) {
|
|
3418
|
-
var r, i;
|
|
3419
|
-
t !== this.isConnected && (this.isConnected = t, t ? (r = this.reconnected) == null || r.call(this) : (i = this.disconnected) == null || i.call(this)), o && (Oe(this, t), Qe(this));
|
|
3420
|
-
}
|
|
3421
|
-
setValue(t) {
|
|
3422
|
-
if (Oi(this._$Ct)) this._$Ct._$AI(t, this);
|
|
3423
|
-
else {
|
|
3424
|
-
const o = [...this._$Ct._$AH];
|
|
3425
|
-
o[this._$Ci] = t, this._$Ct._$AI(o, this, 0);
|
|
3426
|
-
}
|
|
3427
|
-
}
|
|
3428
|
-
disconnected() {
|
|
3429
|
-
}
|
|
3430
|
-
reconnected() {
|
|
3431
|
-
}
|
|
3432
|
-
}
|
|
3433
|
-
/**
|
|
3434
|
-
* @license
|
|
3435
|
-
* Copyright 2020 Google LLC
|
|
3436
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
3437
|
-
*/
|
|
3438
|
-
const be = () => new Li();
|
|
3439
|
-
class Li {
|
|
3440
|
-
}
|
|
3441
|
-
const ft = /* @__PURE__ */ new WeakMap(), ve = Di(class extends Ri {
|
|
3442
|
-
render(e) {
|
|
3443
|
-
return y;
|
|
3444
|
-
}
|
|
3445
|
-
update(e, [t]) {
|
|
3446
|
-
var r;
|
|
3447
|
-
const o = t !== this.G;
|
|
3448
|
-
return o && this.rt(void 0), (o || this.lt !== this.ct) && (this.G = t, this.ht = (r = e.options) == null ? void 0 : r.host, this.rt(this.ct = e.element)), y;
|
|
3449
|
-
}
|
|
3450
|
-
rt(e) {
|
|
3451
|
-
if (this.G !== void 0) if (this.isConnected || (e = void 0), typeof this.G == "function") {
|
|
3452
|
-
const t = this.ht ?? globalThis;
|
|
3453
|
-
let o = ft.get(t);
|
|
3454
|
-
o === void 0 && (o = /* @__PURE__ */ new WeakMap(), ft.set(t, o)), o.get(this.G) !== void 0 && this.G.call(this.ht, void 0), o.set(this.G, e), e !== void 0 && this.G.call(this.ht, e);
|
|
3455
|
-
} else this.G.value = e;
|
|
3456
|
-
}
|
|
3457
|
-
get lt() {
|
|
3458
|
-
var e, t;
|
|
3459
|
-
return typeof this.G == "function" ? (e = ft.get(this.ht ?? globalThis)) == null ? void 0 : e.get(this.G) : (t = this.G) == null ? void 0 : t.value;
|
|
3460
|
-
}
|
|
3461
|
-
disconnected() {
|
|
3462
|
-
this.lt === this.ct && this.rt(void 0);
|
|
3463
|
-
}
|
|
3464
|
-
reconnected() {
|
|
3465
|
-
this.rt(this.ct);
|
|
3466
|
-
}
|
|
3467
|
-
}), I = b`
|
|
3104
|
+
], C.prototype, "device", 2);
|
|
3105
|
+
z([
|
|
3106
|
+
c()
|
|
3107
|
+
], C.prototype, "_rowDropIndex", 2);
|
|
3108
|
+
z([
|
|
3109
|
+
c()
|
|
3110
|
+
], C.prototype, "_isDragOver", 2);
|
|
3111
|
+
z([
|
|
3112
|
+
c()
|
|
3113
|
+
], C.prototype, "_hoveredRowId", 2);
|
|
3114
|
+
C = z([
|
|
3115
|
+
h("pigeon-canvas")
|
|
3116
|
+
], C);
|
|
3117
|
+
const $ = g`
|
|
3468
3118
|
:host {
|
|
3469
3119
|
display: block;
|
|
3470
3120
|
}
|
|
@@ -3680,12 +3330,12 @@ const ft = /* @__PURE__ */ new WeakMap(), ve = Di(class extends Ri {
|
|
|
3680
3330
|
box-shadow: var(--pigeon-ring-shadow);
|
|
3681
3331
|
}
|
|
3682
3332
|
`;
|
|
3683
|
-
var
|
|
3684
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
3333
|
+
var Fo = Object.defineProperty, Ho = Object.getOwnPropertyDescriptor, st = (e, t, o, r) => {
|
|
3334
|
+
for (var i = r > 1 ? void 0 : r ? Ho(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
3685
3335
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
3686
|
-
return r && i &&
|
|
3336
|
+
return r && i && Fo(t, o, i), i;
|
|
3687
3337
|
};
|
|
3688
|
-
let
|
|
3338
|
+
let Pe = class extends d {
|
|
3689
3339
|
constructor() {
|
|
3690
3340
|
super(...arguments), this.label = "Alignment", this.value = "left";
|
|
3691
3341
|
}
|
|
@@ -3743,7 +3393,7 @@ let Ne = class extends g {
|
|
|
3743
3393
|
}));
|
|
3744
3394
|
}
|
|
3745
3395
|
};
|
|
3746
|
-
|
|
3396
|
+
Pe.styles = g`
|
|
3747
3397
|
:host {
|
|
3748
3398
|
display: block;
|
|
3749
3399
|
margin-bottom: 12px;
|
|
@@ -3806,21 +3456,21 @@ Ne.styles = b`
|
|
|
3806
3456
|
height: 16px;
|
|
3807
3457
|
}
|
|
3808
3458
|
`;
|
|
3809
|
-
|
|
3459
|
+
st([
|
|
3810
3460
|
p({ type: String })
|
|
3811
|
-
],
|
|
3812
|
-
|
|
3461
|
+
], Pe.prototype, "label", 2);
|
|
3462
|
+
st([
|
|
3813
3463
|
p({ type: String })
|
|
3814
|
-
],
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
],
|
|
3818
|
-
var
|
|
3819
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
3464
|
+
], Pe.prototype, "value", 2);
|
|
3465
|
+
Pe = st([
|
|
3466
|
+
h("pigeon-alignment-picker")
|
|
3467
|
+
], Pe);
|
|
3468
|
+
var Uo = Object.defineProperty, Ko = Object.getOwnPropertyDescriptor, lt = (e, t, o, r) => {
|
|
3469
|
+
for (var i = r > 1 ? void 0 : r ? Ko(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
3820
3470
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
3821
|
-
return r && i &&
|
|
3471
|
+
return r && i && Uo(t, o, i), i;
|
|
3822
3472
|
};
|
|
3823
|
-
let
|
|
3473
|
+
let Te = class extends d {
|
|
3824
3474
|
constructor() {
|
|
3825
3475
|
super(...arguments), this.label = "Padding", this.value = { top: 0, right: 0, bottom: 0, left: 0 };
|
|
3826
3476
|
}
|
|
@@ -3878,7 +3528,7 @@ let Ue = class extends g {
|
|
|
3878
3528
|
}));
|
|
3879
3529
|
}
|
|
3880
3530
|
};
|
|
3881
|
-
|
|
3531
|
+
Te.styles = g`
|
|
3882
3532
|
:host {
|
|
3883
3533
|
display: block;
|
|
3884
3534
|
margin-bottom: 14px;
|
|
@@ -3963,21 +3613,21 @@ Ue.styles = b`
|
|
|
3963
3613
|
-moz-appearance: textfield;
|
|
3964
3614
|
}
|
|
3965
3615
|
`;
|
|
3966
|
-
|
|
3616
|
+
lt([
|
|
3967
3617
|
p({ type: String })
|
|
3968
|
-
],
|
|
3969
|
-
|
|
3618
|
+
], Te.prototype, "label", 2);
|
|
3619
|
+
lt([
|
|
3970
3620
|
p({ type: Object })
|
|
3971
|
-
],
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
],
|
|
3975
|
-
var
|
|
3976
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
3621
|
+
], Te.prototype, "value", 2);
|
|
3622
|
+
Te = lt([
|
|
3623
|
+
h("pigeon-spacing-input")
|
|
3624
|
+
], Te);
|
|
3625
|
+
var No = Object.defineProperty, Wo = Object.getOwnPropertyDescriptor, ee = (e, t, o, r) => {
|
|
3626
|
+
for (var i = r > 1 ? void 0 : r ? Wo(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
3977
3627
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
3978
|
-
return r && i &&
|
|
3628
|
+
return r && i && No(t, o, i), i;
|
|
3979
3629
|
};
|
|
3980
|
-
let
|
|
3630
|
+
let j = class extends d {
|
|
3981
3631
|
constructor() {
|
|
3982
3632
|
super(...arguments), this.label = "", this.value = 0, this.min = 0, this.max = 100, this.step = 1, this.unit = "px";
|
|
3983
3633
|
}
|
|
@@ -4024,7 +3674,7 @@ let L = class extends g {
|
|
|
4024
3674
|
}));
|
|
4025
3675
|
}
|
|
4026
3676
|
};
|
|
4027
|
-
|
|
3677
|
+
j.styles = g`
|
|
4028
3678
|
:host {
|
|
4029
3679
|
display: block;
|
|
4030
3680
|
margin-bottom: 12px;
|
|
@@ -4124,33 +3774,33 @@ L.styles = b`
|
|
|
4124
3774
|
-moz-appearance: textfield;
|
|
4125
3775
|
}
|
|
4126
3776
|
`;
|
|
4127
|
-
|
|
3777
|
+
ee([
|
|
4128
3778
|
p({ type: String })
|
|
4129
|
-
],
|
|
4130
|
-
|
|
3779
|
+
], j.prototype, "label", 2);
|
|
3780
|
+
ee([
|
|
4131
3781
|
p({ type: Number })
|
|
4132
|
-
],
|
|
4133
|
-
|
|
3782
|
+
], j.prototype, "value", 2);
|
|
3783
|
+
ee([
|
|
4134
3784
|
p({ type: Number })
|
|
4135
|
-
],
|
|
4136
|
-
|
|
3785
|
+
], j.prototype, "min", 2);
|
|
3786
|
+
ee([
|
|
4137
3787
|
p({ type: Number })
|
|
4138
|
-
],
|
|
4139
|
-
|
|
3788
|
+
], j.prototype, "max", 2);
|
|
3789
|
+
ee([
|
|
4140
3790
|
p({ type: Number })
|
|
4141
|
-
],
|
|
4142
|
-
|
|
3791
|
+
], j.prototype, "step", 2);
|
|
3792
|
+
ee([
|
|
4143
3793
|
p({ type: String })
|
|
4144
|
-
],
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
],
|
|
4148
|
-
var
|
|
4149
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
3794
|
+
], j.prototype, "unit", 2);
|
|
3795
|
+
j = ee([
|
|
3796
|
+
h("pigeon-slider-input")
|
|
3797
|
+
], j);
|
|
3798
|
+
var qo = Object.defineProperty, Yo = Object.getOwnPropertyDescriptor, ue = (e, t, o, r) => {
|
|
3799
|
+
for (var i = r > 1 ? void 0 : r ? Yo(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
4150
3800
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
4151
|
-
return r && i &&
|
|
3801
|
+
return r && i && qo(t, o, i), i;
|
|
4152
3802
|
};
|
|
4153
|
-
let
|
|
3803
|
+
let K = class extends d {
|
|
4154
3804
|
constructor() {
|
|
4155
3805
|
super(...arguments), this.tags = [], this.open = !1, this.x = 0, this.y = 0, this._search = "";
|
|
4156
3806
|
}
|
|
@@ -4206,7 +3856,7 @@ let X = class extends g {
|
|
|
4206
3856
|
})), this.open = !1, this._search = "";
|
|
4207
3857
|
}
|
|
4208
3858
|
};
|
|
4209
|
-
|
|
3859
|
+
K.styles = g`
|
|
4210
3860
|
:host {
|
|
4211
3861
|
display: none;
|
|
4212
3862
|
}
|
|
@@ -4297,32 +3947,32 @@ X.styles = b`
|
|
|
4297
3947
|
font-size: 13px;
|
|
4298
3948
|
}
|
|
4299
3949
|
`;
|
|
4300
|
-
|
|
3950
|
+
ue([
|
|
4301
3951
|
p({ type: Array })
|
|
4302
|
-
],
|
|
4303
|
-
|
|
3952
|
+
], K.prototype, "tags", 2);
|
|
3953
|
+
ue([
|
|
4304
3954
|
p({ type: Boolean, reflect: !0 })
|
|
4305
|
-
],
|
|
4306
|
-
|
|
3955
|
+
], K.prototype, "open", 2);
|
|
3956
|
+
ue([
|
|
4307
3957
|
p({ type: Number })
|
|
4308
|
-
],
|
|
4309
|
-
|
|
3958
|
+
], K.prototype, "x", 2);
|
|
3959
|
+
ue([
|
|
4310
3960
|
p({ type: Number })
|
|
4311
|
-
],
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
],
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
],
|
|
4318
|
-
var
|
|
4319
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
3961
|
+
], K.prototype, "y", 2);
|
|
3962
|
+
ue([
|
|
3963
|
+
c()
|
|
3964
|
+
], K.prototype, "_search", 2);
|
|
3965
|
+
K = ue([
|
|
3966
|
+
h("pigeon-merge-tag-picker")
|
|
3967
|
+
], K);
|
|
3968
|
+
var Vo = Object.defineProperty, Xo = Object.getOwnPropertyDescriptor, M = (e, t, o, r) => {
|
|
3969
|
+
for (var i = r > 1 ? void 0 : r ? Xo(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
4320
3970
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
4321
|
-
return r && i &&
|
|
3971
|
+
return r && i && Vo(t, o, i), i;
|
|
4322
3972
|
};
|
|
4323
|
-
let
|
|
3973
|
+
let I = class extends d {
|
|
4324
3974
|
constructor() {
|
|
4325
|
-
super(...arguments), this.rowId = "", this.columnId = "", this.mergeTags = [], this.requestMergeTags = !1, this._pickerOpen = !1, this._pickerX = 0, this._pickerY = 0, this._textareaRef =
|
|
3975
|
+
super(...arguments), this.rowId = "", this.columnId = "", this.mergeTags = [], this.requestMergeTags = !1, this._pickerOpen = !1, this._pickerX = 0, this._pickerY = 0, this._textareaRef = ie(), this._triggerRef = ie();
|
|
4326
3976
|
}
|
|
4327
3977
|
render() {
|
|
4328
3978
|
if (!this.block) return l``;
|
|
@@ -4334,13 +3984,13 @@ let S = class extends g {
|
|
|
4334
3984
|
<div class="label-row">
|
|
4335
3985
|
<label>${s("panel.common.contentHtml")}</label>
|
|
4336
3986
|
${t || this.requestMergeTags ? l`
|
|
4337
|
-
<button class="tag-btn" ${
|
|
3987
|
+
<button class="tag-btn" ${re(this._triggerRef)} @click=${this._togglePicker} title=${s("panel.common.insertMergeTag")}>
|
|
4338
3988
|
${s("panel.common.tagBtn")}
|
|
4339
3989
|
</button>
|
|
4340
3990
|
` : ""}
|
|
4341
3991
|
</div>
|
|
4342
3992
|
<textarea
|
|
4343
|
-
${
|
|
3993
|
+
${re(this._textareaRef)}
|
|
4344
3994
|
.value=${e.content}
|
|
4345
3995
|
@change=${this._onContentChange}
|
|
4346
3996
|
></textarea>
|
|
@@ -4397,18 +4047,18 @@ let S = class extends g {
|
|
|
4397
4047
|
}
|
|
4398
4048
|
}
|
|
4399
4049
|
_onMergeTagInsert(e) {
|
|
4400
|
-
const t =
|
|
4050
|
+
const t = Pt.getActive();
|
|
4401
4051
|
if (t && !t.isDestroyed) {
|
|
4402
|
-
const
|
|
4403
|
-
t.chain().focus().insertContent({ type: "mergeTag", attrs: { name:
|
|
4052
|
+
const y = this._extractTagName(e.detail.tag.name);
|
|
4053
|
+
t.chain().focus().insertContent({ type: "mergeTag", attrs: { name: y } }).run(), this._pickerOpen = !1;
|
|
4404
4054
|
return;
|
|
4405
4055
|
}
|
|
4406
4056
|
const o = this._textareaRef.value;
|
|
4407
4057
|
if (!o) return;
|
|
4408
|
-
const r = o.selectionStart, i = o.selectionEnd, n = o.value, a = e.detail.tag.name,
|
|
4409
|
-
o.value =
|
|
4410
|
-
const
|
|
4411
|
-
o.setSelectionRange(
|
|
4058
|
+
const r = o.selectionStart, i = o.selectionEnd, n = o.value, a = e.detail.tag.name, u = n.substring(0, r) + a + n.substring(i);
|
|
4059
|
+
o.value = u;
|
|
4060
|
+
const b = r + a.length;
|
|
4061
|
+
o.setSelectionRange(b, b), o.focus(), this._emit({ content: u }), this._pickerOpen = !1;
|
|
4412
4062
|
}
|
|
4413
4063
|
/** Strip `{{` and `}}` from a tag name string. */
|
|
4414
4064
|
_extractTagName(e) {
|
|
@@ -4442,9 +4092,9 @@ let S = class extends g {
|
|
|
4442
4092
|
this._emit({ padding: e.detail.value });
|
|
4443
4093
|
}
|
|
4444
4094
|
};
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4095
|
+
I.styles = [
|
|
4096
|
+
$,
|
|
4097
|
+
g`
|
|
4448
4098
|
/* Content textarea uses the monospace face so the HTML payload is
|
|
4449
4099
|
readable to authors editing the raw markup. */
|
|
4450
4100
|
textarea {
|
|
@@ -4487,47 +4137,47 @@ S.styles = [
|
|
|
4487
4137
|
}
|
|
4488
4138
|
`
|
|
4489
4139
|
];
|
|
4490
|
-
|
|
4140
|
+
M([
|
|
4491
4141
|
p({ type: Object })
|
|
4492
|
-
],
|
|
4493
|
-
|
|
4142
|
+
], I.prototype, "block", 2);
|
|
4143
|
+
M([
|
|
4494
4144
|
p({ type: String })
|
|
4495
|
-
],
|
|
4496
|
-
|
|
4145
|
+
], I.prototype, "rowId", 2);
|
|
4146
|
+
M([
|
|
4497
4147
|
p({ type: String })
|
|
4498
|
-
],
|
|
4499
|
-
|
|
4148
|
+
], I.prototype, "columnId", 2);
|
|
4149
|
+
M([
|
|
4500
4150
|
p({ type: Array })
|
|
4501
|
-
],
|
|
4502
|
-
|
|
4151
|
+
], I.prototype, "mergeTags", 2);
|
|
4152
|
+
M([
|
|
4503
4153
|
p({ attribute: !1 })
|
|
4504
|
-
],
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
],
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
],
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
],
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
],
|
|
4517
|
-
var
|
|
4518
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
4154
|
+
], I.prototype, "requestMergeTags", 2);
|
|
4155
|
+
M([
|
|
4156
|
+
c()
|
|
4157
|
+
], I.prototype, "_pickerOpen", 2);
|
|
4158
|
+
M([
|
|
4159
|
+
c()
|
|
4160
|
+
], I.prototype, "_pickerX", 2);
|
|
4161
|
+
M([
|
|
4162
|
+
c()
|
|
4163
|
+
], I.prototype, "_pickerY", 2);
|
|
4164
|
+
I = M([
|
|
4165
|
+
h("pigeon-text-panel")
|
|
4166
|
+
], I);
|
|
4167
|
+
var Jo = Object.defineProperty, Go = Object.getOwnPropertyDescriptor, _ = (e, t, o, r) => {
|
|
4168
|
+
for (var i = r > 1 ? void 0 : r ? Go(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
4519
4169
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
4520
|
-
return r && i &&
|
|
4170
|
+
return r && i && Jo(t, o, i), i;
|
|
4521
4171
|
};
|
|
4522
|
-
let
|
|
4523
|
-
function
|
|
4524
|
-
return
|
|
4172
|
+
let Ve = null;
|
|
4173
|
+
function Zo() {
|
|
4174
|
+
return Ve || (Ve = import("./pigeon-stock-tab.js")), Ve;
|
|
4525
4175
|
}
|
|
4526
|
-
const
|
|
4527
|
-
let
|
|
4176
|
+
const Qo = 250, De = "__all__";
|
|
4177
|
+
let f = class extends d {
|
|
4528
4178
|
constructor() {
|
|
4529
|
-
super(...arguments), this.config = {}, this.open = !1, this._tab = null, this._stockTabLoaded = !1, this._dragOver = !1, this._uploading = !1, this._progress = 0, this._error = "", this._urlInput = "", this._folder =
|
|
4530
|
-
this._tab = "stock", this._stockTabLoaded || (await
|
|
4179
|
+
super(...arguments), this.config = {}, this.open = !1, this._tab = null, this._stockTabLoaded = !1, this._dragOver = !1, this._uploading = !1, this._progress = 0, this._error = "", this._urlInput = "", this._folder = De, this._search = "", this._selectedTags = [], this._folders = [], this._assets = [], this._libraryLoading = !1, this._libraryError = "", this._searchTimer = null, this._libraryToken = 0, this._handleStockTabClick = async () => {
|
|
4180
|
+
this._tab = "stock", this._stockTabLoaded || (await Zo(), this._stockTabLoaded = !0);
|
|
4531
4181
|
};
|
|
4532
4182
|
}
|
|
4533
4183
|
/* ----------------------------------------------------------------- */
|
|
@@ -4557,7 +4207,7 @@ let x = class extends g {
|
|
|
4557
4207
|
<h3>${e ? s("asset.title") : s("asset.title-upload")}</h3>
|
|
4558
4208
|
<button class="close-btn" @click=${this._close} aria-label=${s("asset.close")}>×</button>
|
|
4559
4209
|
</div>
|
|
4560
|
-
${t ? this._renderTabs(e) :
|
|
4210
|
+
${t ? this._renderTabs(e) : J}
|
|
4561
4211
|
<div class="body">
|
|
4562
4212
|
${this._activeTab === "stock" && this._hasStock ? this._renderStock() : e && this._activeTab === "library" ? this._renderLibrary() : this._renderUpload()}
|
|
4563
4213
|
</div>
|
|
@@ -4573,7 +4223,7 @@ let x = class extends g {
|
|
|
4573
4223
|
role="tab"
|
|
4574
4224
|
aria-selected=${t === "library"}
|
|
4575
4225
|
@click=${() => this._tab = "library"}
|
|
4576
|
-
>${s("asset.tab.library")}</button>` :
|
|
4226
|
+
>${s("asset.tab.library")}</button>` : J}
|
|
4577
4227
|
<button
|
|
4578
4228
|
class="tab ${t === "upload" ? "active" : ""}"
|
|
4579
4229
|
role="tab"
|
|
@@ -4587,7 +4237,7 @@ let x = class extends g {
|
|
|
4587
4237
|
role="tab"
|
|
4588
4238
|
aria-selected=${t === "stock"}
|
|
4589
4239
|
@click=${this._handleStockTabClick}
|
|
4590
|
-
>${s("asset.tab.stock")}</button>` :
|
|
4240
|
+
>${s("asset.tab.stock")}</button>` : J}
|
|
4591
4241
|
</div>
|
|
4592
4242
|
`;
|
|
4593
4243
|
}
|
|
@@ -4605,7 +4255,7 @@ let x = class extends g {
|
|
|
4605
4255
|
.value=${this._folder}
|
|
4606
4256
|
@change=${this._onFolderChange}
|
|
4607
4257
|
>
|
|
4608
|
-
<option value=${
|
|
4258
|
+
<option value=${De}>${s("asset.folder.all")}</option>
|
|
4609
4259
|
${this._folders.map(
|
|
4610
4260
|
(e) => l`<option value=${e} ?selected=${this._folder === e}>${e}</option>`
|
|
4611
4261
|
)}
|
|
@@ -4626,10 +4276,10 @@ let x = class extends g {
|
|
|
4626
4276
|
@click=${() => this._toggleTag(e)}
|
|
4627
4277
|
>${e}</button>`
|
|
4628
4278
|
)}
|
|
4629
|
-
</div>` :
|
|
4630
|
-
${this._libraryError ? l`<div class="error">${this._libraryError}</div>` :
|
|
4279
|
+
</div>` : J}
|
|
4280
|
+
${this._libraryError ? l`<div class="error">${this._libraryError}</div>` : J}
|
|
4631
4281
|
${this._libraryLoading ? l`<div class="library-spinner">${s("asset.loading")}</div>` : this._assets.length === 0 ? l`<div class="empty-library">
|
|
4632
|
-
${this._search || this._selectedTags.length > 0 || this._folder !==
|
|
4282
|
+
${this._search || this._selectedTags.length > 0 || this._folder !== De ? s("asset.empty.filtered") : s("asset.empty.no-assets")}
|
|
4633
4283
|
</div>` : l`<div class="asset-grid">
|
|
4634
4284
|
${this._assets.map((e) => this._renderAssetCard(e))}
|
|
4635
4285
|
</div>`}
|
|
@@ -4672,9 +4322,9 @@ let x = class extends g {
|
|
|
4672
4322
|
|
|
4673
4323
|
${this._uploading ? l`<div class="progress-bar">
|
|
4674
4324
|
<div class="progress-fill" style="width: ${this._progress}%"></div>
|
|
4675
|
-
</div>` :
|
|
4325
|
+
</div>` : J}
|
|
4676
4326
|
|
|
4677
|
-
${this._error ? l`<div class="error">${this._error}</div>` :
|
|
4327
|
+
${this._error ? l`<div class="error">${this._error}</div>` : J}
|
|
4678
4328
|
|
|
4679
4329
|
<div class="separator">${s("asset.url.separator")}</div>
|
|
4680
4330
|
|
|
@@ -4707,7 +4357,7 @@ let x = class extends g {
|
|
|
4707
4357
|
this._libraryLoading = !0, this._libraryError = "";
|
|
4708
4358
|
try {
|
|
4709
4359
|
const t = await this.storage.list({
|
|
4710
|
-
folder: this._folder ===
|
|
4360
|
+
folder: this._folder === De ? void 0 : this._folder,
|
|
4711
4361
|
search: this._search.trim() || void 0,
|
|
4712
4362
|
tags: this._selectedTags.length > 0 ? this._selectedTags : void 0
|
|
4713
4363
|
});
|
|
@@ -4732,7 +4382,7 @@ let x = class extends g {
|
|
|
4732
4382
|
this._folder = e.target.value, this._loadAssets();
|
|
4733
4383
|
}
|
|
4734
4384
|
_onSearchInput(e) {
|
|
4735
|
-
this._search = e.target.value, this._searchTimer && clearTimeout(this._searchTimer), this._searchTimer = setTimeout(() => this._loadAssets(),
|
|
4385
|
+
this._search = e.target.value, this._searchTimer && clearTimeout(this._searchTimer), this._searchTimer = setTimeout(() => this._loadAssets(), Qo);
|
|
4736
4386
|
}
|
|
4737
4387
|
_toggleTag(e) {
|
|
4738
4388
|
this._selectedTags = this._selectedTags.includes(e) ? this._selectedTags.filter((t) => t !== e) : [...this._selectedTags, e], this._loadAssets();
|
|
@@ -4808,15 +4458,15 @@ let x = class extends g {
|
|
|
4808
4458
|
const i = await this.config.presignedUpload.getUploadParams(e);
|
|
4809
4459
|
this._progress = 40;
|
|
4810
4460
|
const n = i.method ?? "PUT", a = { ...i.headers ?? {} };
|
|
4811
|
-
let
|
|
4461
|
+
let u;
|
|
4812
4462
|
if (n === "POST") {
|
|
4813
|
-
const
|
|
4814
|
-
for (const [
|
|
4815
|
-
|
|
4463
|
+
const y = new FormData();
|
|
4464
|
+
for (const [X, pt] of Object.entries(i.fields ?? {})) y.append(X, pt);
|
|
4465
|
+
y.append("file", e), u = y;
|
|
4816
4466
|
} else
|
|
4817
|
-
|
|
4818
|
-
const
|
|
4819
|
-
if (this._progress = 90, !
|
|
4467
|
+
u = e, Object.keys(a).some((X) => X.toLowerCase() === "content-type") || (a["Content-Type"] = e.type);
|
|
4468
|
+
const b = await fetch(i.uploadUrl, { method: n, headers: a, body: u });
|
|
4469
|
+
if (this._progress = 90, !b.ok) throw new Error(`Upload failed: ${b.status} ${b.statusText}`);
|
|
4820
4470
|
this._progress = 100, this._selectAsset(i.publicUrl);
|
|
4821
4471
|
} catch (i) {
|
|
4822
4472
|
this._error = i instanceof Error ? i.message : "Upload failed";
|
|
@@ -4836,9 +4486,9 @@ let x = class extends g {
|
|
|
4836
4486
|
body: i
|
|
4837
4487
|
});
|
|
4838
4488
|
if (this._progress = 80, !n.ok) throw new Error(`Upload failed: ${n.statusText}`);
|
|
4839
|
-
const a = await n.json(),
|
|
4840
|
-
if (!
|
|
4841
|
-
this._progress = 100, this._selectAsset(
|
|
4489
|
+
const a = await n.json(), u = a.url || a.src || a.location;
|
|
4490
|
+
if (!u) throw new Error("No URL in upload response");
|
|
4491
|
+
this._progress = 100, this._selectAsset(u);
|
|
4842
4492
|
} catch (i) {
|
|
4843
4493
|
this._error = i instanceof Error ? i.message : "Upload failed";
|
|
4844
4494
|
} finally {
|
|
@@ -4864,7 +4514,7 @@ let x = class extends g {
|
|
|
4864
4514
|
), this._close();
|
|
4865
4515
|
}
|
|
4866
4516
|
};
|
|
4867
|
-
|
|
4517
|
+
f.styles = g`
|
|
4868
4518
|
:host {
|
|
4869
4519
|
display: none;
|
|
4870
4520
|
}
|
|
@@ -5195,66 +4845,66 @@ x.styles = b`
|
|
|
5195
4845
|
margin-top: 8px;
|
|
5196
4846
|
}
|
|
5197
4847
|
`;
|
|
5198
|
-
|
|
4848
|
+
_([
|
|
5199
4849
|
p({ type: Object })
|
|
5200
|
-
],
|
|
5201
|
-
|
|
4850
|
+
], f.prototype, "config", 2);
|
|
4851
|
+
_([
|
|
5202
4852
|
p({ attribute: !1 })
|
|
5203
|
-
],
|
|
5204
|
-
|
|
4853
|
+
], f.prototype, "storage", 2);
|
|
4854
|
+
_([
|
|
5205
4855
|
p({ type: Boolean, reflect: !0 })
|
|
5206
|
-
],
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
],
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
],
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
],
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
],
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
],
|
|
5222
|
-
|
|
5223
|
-
|
|
5224
|
-
],
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
],
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
],
|
|
5231
|
-
|
|
5232
|
-
|
|
5233
|
-
],
|
|
5234
|
-
|
|
5235
|
-
|
|
5236
|
-
],
|
|
5237
|
-
|
|
5238
|
-
|
|
5239
|
-
],
|
|
5240
|
-
|
|
5241
|
-
|
|
5242
|
-
],
|
|
5243
|
-
|
|
5244
|
-
|
|
5245
|
-
],
|
|
5246
|
-
|
|
5247
|
-
|
|
5248
|
-
],
|
|
5249
|
-
|
|
5250
|
-
|
|
5251
|
-
],
|
|
5252
|
-
var
|
|
5253
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
4856
|
+
], f.prototype, "open", 2);
|
|
4857
|
+
_([
|
|
4858
|
+
c()
|
|
4859
|
+
], f.prototype, "_tab", 2);
|
|
4860
|
+
_([
|
|
4861
|
+
c()
|
|
4862
|
+
], f.prototype, "_stockTabLoaded", 2);
|
|
4863
|
+
_([
|
|
4864
|
+
c()
|
|
4865
|
+
], f.prototype, "_dragOver", 2);
|
|
4866
|
+
_([
|
|
4867
|
+
c()
|
|
4868
|
+
], f.prototype, "_uploading", 2);
|
|
4869
|
+
_([
|
|
4870
|
+
c()
|
|
4871
|
+
], f.prototype, "_progress", 2);
|
|
4872
|
+
_([
|
|
4873
|
+
c()
|
|
4874
|
+
], f.prototype, "_error", 2);
|
|
4875
|
+
_([
|
|
4876
|
+
c()
|
|
4877
|
+
], f.prototype, "_urlInput", 2);
|
|
4878
|
+
_([
|
|
4879
|
+
c()
|
|
4880
|
+
], f.prototype, "_folder", 2);
|
|
4881
|
+
_([
|
|
4882
|
+
c()
|
|
4883
|
+
], f.prototype, "_search", 2);
|
|
4884
|
+
_([
|
|
4885
|
+
c()
|
|
4886
|
+
], f.prototype, "_selectedTags", 2);
|
|
4887
|
+
_([
|
|
4888
|
+
c()
|
|
4889
|
+
], f.prototype, "_folders", 2);
|
|
4890
|
+
_([
|
|
4891
|
+
c()
|
|
4892
|
+
], f.prototype, "_assets", 2);
|
|
4893
|
+
_([
|
|
4894
|
+
c()
|
|
4895
|
+
], f.prototype, "_libraryLoading", 2);
|
|
4896
|
+
_([
|
|
4897
|
+
c()
|
|
4898
|
+
], f.prototype, "_libraryError", 2);
|
|
4899
|
+
f = _([
|
|
4900
|
+
h("pigeon-asset-manager")
|
|
4901
|
+
], f);
|
|
4902
|
+
var ei = Object.defineProperty, ti = Object.getOwnPropertyDescriptor, te = (e, t, o, r) => {
|
|
4903
|
+
for (var i = r > 1 ? void 0 : r ? ti(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
5254
4904
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
5255
|
-
return r && i &&
|
|
4905
|
+
return r && i && ei(t, o, i), i;
|
|
5256
4906
|
};
|
|
5257
|
-
let
|
|
4907
|
+
let R = class extends d {
|
|
5258
4908
|
constructor() {
|
|
5259
4909
|
super(...arguments), this.rowId = "", this.columnId = "", this._assetManagerOpen = !1;
|
|
5260
4910
|
}
|
|
@@ -5375,41 +5025,41 @@ let z = class extends g {
|
|
|
5375
5025
|
this._emit({ src: e.detail.url }), this._assetManagerOpen = !1;
|
|
5376
5026
|
}
|
|
5377
5027
|
};
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
|
|
5028
|
+
R.styles = [
|
|
5029
|
+
$,
|
|
5030
|
+
g`
|
|
5381
5031
|
.upload-btn {
|
|
5382
5032
|
margin-top: 6px;
|
|
5383
5033
|
}
|
|
5384
5034
|
`
|
|
5385
5035
|
];
|
|
5386
|
-
|
|
5036
|
+
te([
|
|
5387
5037
|
p({ type: Object })
|
|
5388
|
-
],
|
|
5389
|
-
|
|
5038
|
+
], R.prototype, "block", 2);
|
|
5039
|
+
te([
|
|
5390
5040
|
p({ type: String })
|
|
5391
|
-
],
|
|
5392
|
-
|
|
5041
|
+
], R.prototype, "rowId", 2);
|
|
5042
|
+
te([
|
|
5393
5043
|
p({ type: String })
|
|
5394
|
-
],
|
|
5395
|
-
|
|
5044
|
+
], R.prototype, "columnId", 2);
|
|
5045
|
+
te([
|
|
5396
5046
|
p({ type: Object })
|
|
5397
|
-
],
|
|
5398
|
-
|
|
5047
|
+
], R.prototype, "assetManagerConfig", 2);
|
|
5048
|
+
te([
|
|
5399
5049
|
p({ attribute: !1 })
|
|
5400
|
-
],
|
|
5401
|
-
|
|
5402
|
-
|
|
5403
|
-
],
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
],
|
|
5407
|
-
var
|
|
5408
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
5050
|
+
], R.prototype, "assetStorage", 2);
|
|
5051
|
+
te([
|
|
5052
|
+
c()
|
|
5053
|
+
], R.prototype, "_assetManagerOpen", 2);
|
|
5054
|
+
R = te([
|
|
5055
|
+
h("pigeon-image-panel")
|
|
5056
|
+
], R);
|
|
5057
|
+
var oi = Object.defineProperty, ii = Object.getOwnPropertyDescriptor, Ae = (e, t, o, r) => {
|
|
5058
|
+
for (var i = r > 1 ? void 0 : r ? ii(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
5409
5059
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
5410
|
-
return r && i &&
|
|
5060
|
+
return r && i && oi(t, o, i), i;
|
|
5411
5061
|
};
|
|
5412
|
-
let
|
|
5062
|
+
let le = class extends d {
|
|
5413
5063
|
constructor() {
|
|
5414
5064
|
super(...arguments), this.label = s("control.color.label"), this.value = "#000000", this.swatches = [];
|
|
5415
5065
|
}
|
|
@@ -5428,7 +5078,7 @@ let fe = class extends g {
|
|
|
5428
5078
|
type="button"
|
|
5429
5079
|
title=${`${e.name} (${e.value})`}
|
|
5430
5080
|
aria-label=${e.name}
|
|
5431
|
-
style=${
|
|
5081
|
+
style=${Yt({ background: e.value })}
|
|
5432
5082
|
@click=${() => this._applySwatch(e.value)}
|
|
5433
5083
|
></button>`
|
|
5434
5084
|
)}
|
|
@@ -5454,7 +5104,7 @@ let fe = class extends g {
|
|
|
5454
5104
|
}));
|
|
5455
5105
|
}
|
|
5456
5106
|
};
|
|
5457
|
-
|
|
5107
|
+
le.styles = g`
|
|
5458
5108
|
:host {
|
|
5459
5109
|
display: block;
|
|
5460
5110
|
margin-bottom: 12px;
|
|
@@ -5549,24 +5199,24 @@ fe.styles = b`
|
|
|
5549
5199
|
box-shadow: var(--pigeon-ring-shadow);
|
|
5550
5200
|
}
|
|
5551
5201
|
`;
|
|
5552
|
-
|
|
5202
|
+
Ae([
|
|
5553
5203
|
p({ type: String })
|
|
5554
|
-
],
|
|
5555
|
-
|
|
5204
|
+
], le.prototype, "label", 2);
|
|
5205
|
+
Ae([
|
|
5556
5206
|
p({ type: String })
|
|
5557
|
-
],
|
|
5558
|
-
|
|
5207
|
+
], le.prototype, "value", 2);
|
|
5208
|
+
Ae([
|
|
5559
5209
|
p({ attribute: !1 })
|
|
5560
|
-
],
|
|
5561
|
-
|
|
5562
|
-
|
|
5563
|
-
],
|
|
5564
|
-
var
|
|
5565
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
5210
|
+
], le.prototype, "swatches", 2);
|
|
5211
|
+
le = Ae([
|
|
5212
|
+
h("pigeon-color-picker")
|
|
5213
|
+
], le);
|
|
5214
|
+
var ri = Object.defineProperty, ni = Object.getOwnPropertyDescriptor, be = (e, t, o, r) => {
|
|
5215
|
+
for (var i = r > 1 ? void 0 : r ? ni(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
5566
5216
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
5567
|
-
return r && i &&
|
|
5217
|
+
return r && i && ri(t, o, i), i;
|
|
5568
5218
|
};
|
|
5569
|
-
let
|
|
5219
|
+
let N = class extends d {
|
|
5570
5220
|
constructor() {
|
|
5571
5221
|
super(...arguments), this.rowId = "", this.columnId = "", this.swatches = [], this.linkTypes = [];
|
|
5572
5222
|
}
|
|
@@ -5728,31 +5378,31 @@ let G = class extends g {
|
|
|
5728
5378
|
this._emit({ innerPadding: e.detail.value });
|
|
5729
5379
|
}
|
|
5730
5380
|
};
|
|
5731
|
-
|
|
5732
|
-
|
|
5381
|
+
N.styles = $;
|
|
5382
|
+
be([
|
|
5733
5383
|
p({ type: Object })
|
|
5734
|
-
],
|
|
5735
|
-
|
|
5384
|
+
], N.prototype, "block", 2);
|
|
5385
|
+
be([
|
|
5736
5386
|
p({ type: String })
|
|
5737
|
-
],
|
|
5738
|
-
|
|
5387
|
+
], N.prototype, "rowId", 2);
|
|
5388
|
+
be([
|
|
5739
5389
|
p({ type: String })
|
|
5740
|
-
],
|
|
5741
|
-
|
|
5390
|
+
], N.prototype, "columnId", 2);
|
|
5391
|
+
be([
|
|
5742
5392
|
p({ attribute: !1 })
|
|
5743
|
-
],
|
|
5744
|
-
|
|
5393
|
+
], N.prototype, "swatches", 2);
|
|
5394
|
+
be([
|
|
5745
5395
|
p({ attribute: !1 })
|
|
5746
|
-
],
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
],
|
|
5750
|
-
var
|
|
5751
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
5396
|
+
], N.prototype, "linkTypes", 2);
|
|
5397
|
+
N = be([
|
|
5398
|
+
h("pigeon-button-panel")
|
|
5399
|
+
], N);
|
|
5400
|
+
var ai = Object.defineProperty, si = Object.getOwnPropertyDescriptor, It = (e, t, o, r) => {
|
|
5401
|
+
for (var i = r > 1 ? void 0 : r ? si(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
5752
5402
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
5753
|
-
return r && i &&
|
|
5403
|
+
return r && i && ai(t, o, i), i;
|
|
5754
5404
|
};
|
|
5755
|
-
let
|
|
5405
|
+
let Re = class extends d {
|
|
5756
5406
|
get _layouts() {
|
|
5757
5407
|
return [
|
|
5758
5408
|
{ label: s("panel.row.layout1col"), ratios: [12] },
|
|
@@ -5871,9 +5521,9 @@ let et = class extends g {
|
|
|
5871
5521
|
this._emitRowUpdate({ condition: t || void 0 });
|
|
5872
5522
|
}
|
|
5873
5523
|
};
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
|
|
5524
|
+
Re.styles = [
|
|
5525
|
+
$,
|
|
5526
|
+
g`
|
|
5877
5527
|
.hint {
|
|
5878
5528
|
margin: 4px 0 0;
|
|
5879
5529
|
font-size: 11px;
|
|
@@ -5942,18 +5592,18 @@ et.styles = [
|
|
|
5942
5592
|
}
|
|
5943
5593
|
`
|
|
5944
5594
|
];
|
|
5945
|
-
|
|
5595
|
+
It([
|
|
5946
5596
|
p({ type: Object })
|
|
5947
|
-
],
|
|
5948
|
-
|
|
5949
|
-
|
|
5950
|
-
],
|
|
5951
|
-
var
|
|
5952
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
5597
|
+
], Re.prototype, "row", 2);
|
|
5598
|
+
Re = It([
|
|
5599
|
+
h("pigeon-row-panel")
|
|
5600
|
+
], Re);
|
|
5601
|
+
var li = Object.defineProperty, pi = Object.getOwnPropertyDescriptor, Fe = (e, t, o, r) => {
|
|
5602
|
+
for (var i = r > 1 ? void 0 : r ? pi(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
5953
5603
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
5954
|
-
return r && i &&
|
|
5604
|
+
return r && i && li(t, o, i), i;
|
|
5955
5605
|
};
|
|
5956
|
-
const
|
|
5606
|
+
const xt = [
|
|
5957
5607
|
{ label: "Arial", value: "Arial, Helvetica, sans-serif" },
|
|
5958
5608
|
{ label: "Georgia", value: "Georgia, Times, serif" },
|
|
5959
5609
|
{ label: "Courier New", value: "'Courier New', Courier, monospace" },
|
|
@@ -5962,13 +5612,13 @@ const Zt = [
|
|
|
5962
5612
|
{ label: "Trebuchet MS", value: "'Trebuchet MS', sans-serif" },
|
|
5963
5613
|
{ label: "Times New Roman", value: "'Times New Roman', Times, serif" }
|
|
5964
5614
|
];
|
|
5965
|
-
let
|
|
5615
|
+
let pe = class extends d {
|
|
5966
5616
|
constructor() {
|
|
5967
5617
|
super(...arguments), this.label = s("control.fontPicker.label"), this.value = "", this.brandFonts = [];
|
|
5968
5618
|
}
|
|
5969
5619
|
get _options() {
|
|
5970
|
-
const e = new Set(
|
|
5971
|
-
return [...
|
|
5620
|
+
const e = new Set(xt.map((o) => o.value)), t = this.brandFonts.filter((o) => !e.has(o.family)).map((o) => ({ label: o.name, value: o.family }));
|
|
5621
|
+
return [...xt, ...t];
|
|
5972
5622
|
}
|
|
5973
5623
|
render() {
|
|
5974
5624
|
return l`
|
|
@@ -5990,7 +5640,7 @@ let me = class extends g {
|
|
|
5990
5640
|
);
|
|
5991
5641
|
}
|
|
5992
5642
|
};
|
|
5993
|
-
|
|
5643
|
+
pe.styles = g`
|
|
5994
5644
|
:host {
|
|
5995
5645
|
display: block;
|
|
5996
5646
|
margin-bottom: 12px;
|
|
@@ -6016,26 +5666,26 @@ me.styles = b`
|
|
|
6016
5666
|
box-sizing: border-box;
|
|
6017
5667
|
}
|
|
6018
5668
|
`;
|
|
6019
|
-
|
|
5669
|
+
Fe([
|
|
6020
5670
|
p({ type: String })
|
|
6021
|
-
],
|
|
6022
|
-
|
|
5671
|
+
], pe.prototype, "label", 2);
|
|
5672
|
+
Fe([
|
|
6023
5673
|
p({ type: String })
|
|
6024
|
-
],
|
|
6025
|
-
|
|
5674
|
+
], pe.prototype, "value", 2);
|
|
5675
|
+
Fe([
|
|
6026
5676
|
p({ attribute: !1 })
|
|
6027
|
-
],
|
|
6028
|
-
|
|
6029
|
-
|
|
6030
|
-
],
|
|
6031
|
-
var
|
|
6032
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
5677
|
+
], pe.prototype, "brandFonts", 2);
|
|
5678
|
+
pe = Fe([
|
|
5679
|
+
h("pigeon-font-picker")
|
|
5680
|
+
], pe);
|
|
5681
|
+
var ci = Object.defineProperty, di = Object.getOwnPropertyDescriptor, A = (e, t, o, r) => {
|
|
5682
|
+
for (var i = r > 1 ? void 0 : r ? di(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
6033
5683
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
6034
|
-
return r && i &&
|
|
5684
|
+
return r && i && ci(t, o, i), i;
|
|
6035
5685
|
};
|
|
6036
|
-
let
|
|
5686
|
+
let P = class extends d {
|
|
6037
5687
|
constructor() {
|
|
6038
|
-
super(...arguments), this.mergeTags = [], this.requestMergeTags = !1, this.swatches = [], this.brandFonts = [], this._pickerOpen = !1, this._pickerX = 0, this._pickerY = 0, this._previewInputRef =
|
|
5688
|
+
super(...arguments), this.mergeTags = [], this.requestMergeTags = !1, this.swatches = [], this.brandFonts = [], this._pickerOpen = !1, this._pickerX = 0, this._pickerY = 0, this._previewInputRef = ie(), this._triggerRef = ie();
|
|
6039
5689
|
}
|
|
6040
5690
|
render() {
|
|
6041
5691
|
if (!this.doc) return l``;
|
|
@@ -6093,14 +5743,14 @@ let O = class extends g {
|
|
|
6093
5743
|
<div class="label-row">
|
|
6094
5744
|
<label>${s("panel.body.previewText")}</label>
|
|
6095
5745
|
${this.mergeTags.length > 0 || this.requestMergeTags ? l`
|
|
6096
|
-
<button class="tag-btn" ${
|
|
5746
|
+
<button class="tag-btn" ${re(this._triggerRef)} @click=${this._togglePicker} title=${s("panel.common.insertMergeTag")}>
|
|
6097
5747
|
${s("panel.common.tagBtn")}
|
|
6098
5748
|
</button>
|
|
6099
5749
|
` : ""}
|
|
6100
5750
|
</div>
|
|
6101
5751
|
<input
|
|
6102
5752
|
type="text"
|
|
6103
|
-
${
|
|
5753
|
+
${re(this._previewInputRef)}
|
|
6104
5754
|
.value=${this.doc.metadata.previewText ?? ""}
|
|
6105
5755
|
placeholder=${s("panel.body.previewTextPlaceholder")}
|
|
6106
5756
|
@change=${this._onPreviewTextChange}
|
|
@@ -6166,9 +5816,9 @@ let O = class extends g {
|
|
|
6166
5816
|
this._emit({ metaField: "previewText", value: e.target.value });
|
|
6167
5817
|
}
|
|
6168
5818
|
};
|
|
6169
|
-
|
|
6170
|
-
|
|
6171
|
-
|
|
5819
|
+
P.styles = [
|
|
5820
|
+
$,
|
|
5821
|
+
g`
|
|
6172
5822
|
.alignment-buttons {
|
|
6173
5823
|
display: flex;
|
|
6174
5824
|
gap: 0;
|
|
@@ -6240,39 +5890,39 @@ O.styles = [
|
|
|
6240
5890
|
}
|
|
6241
5891
|
`
|
|
6242
5892
|
];
|
|
6243
|
-
|
|
5893
|
+
A([
|
|
6244
5894
|
p({ type: Object })
|
|
6245
|
-
],
|
|
6246
|
-
|
|
5895
|
+
], P.prototype, "doc", 2);
|
|
5896
|
+
A([
|
|
6247
5897
|
p({ type: Array })
|
|
6248
|
-
],
|
|
6249
|
-
|
|
5898
|
+
], P.prototype, "mergeTags", 2);
|
|
5899
|
+
A([
|
|
6250
5900
|
p({ attribute: !1 })
|
|
6251
|
-
],
|
|
6252
|
-
|
|
5901
|
+
], P.prototype, "requestMergeTags", 2);
|
|
5902
|
+
A([
|
|
6253
5903
|
p({ attribute: !1 })
|
|
6254
|
-
],
|
|
6255
|
-
|
|
5904
|
+
], P.prototype, "swatches", 2);
|
|
5905
|
+
A([
|
|
6256
5906
|
p({ attribute: !1 })
|
|
6257
|
-
],
|
|
6258
|
-
|
|
6259
|
-
|
|
6260
|
-
],
|
|
6261
|
-
|
|
6262
|
-
|
|
6263
|
-
],
|
|
6264
|
-
|
|
6265
|
-
|
|
6266
|
-
],
|
|
6267
|
-
|
|
6268
|
-
|
|
6269
|
-
],
|
|
6270
|
-
var
|
|
6271
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
5907
|
+
], P.prototype, "brandFonts", 2);
|
|
5908
|
+
A([
|
|
5909
|
+
c()
|
|
5910
|
+
], P.prototype, "_pickerOpen", 2);
|
|
5911
|
+
A([
|
|
5912
|
+
c()
|
|
5913
|
+
], P.prototype, "_pickerX", 2);
|
|
5914
|
+
A([
|
|
5915
|
+
c()
|
|
5916
|
+
], P.prototype, "_pickerY", 2);
|
|
5917
|
+
P = A([
|
|
5918
|
+
h("pigeon-body-panel")
|
|
5919
|
+
], P);
|
|
5920
|
+
var hi = Object.defineProperty, gi = Object.getOwnPropertyDescriptor, V = (e, t, o, r) => {
|
|
5921
|
+
for (var i = r > 1 ? void 0 : r ? gi(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
6272
5922
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
6273
|
-
return r && i &&
|
|
5923
|
+
return r && i && hi(t, o, i), i;
|
|
6274
5924
|
};
|
|
6275
|
-
let
|
|
5925
|
+
let D = class extends d {
|
|
6276
5926
|
constructor() {
|
|
6277
5927
|
super(...arguments), this.rowId = "", this.columnId = "", this.swatches = [], this._assetManagerOpen = !1;
|
|
6278
5928
|
}
|
|
@@ -6425,37 +6075,37 @@ let j = class extends g {
|
|
|
6425
6075
|
this._emit({ backgroundUrl: e.detail.url }), this._assetManagerOpen = !1;
|
|
6426
6076
|
}
|
|
6427
6077
|
};
|
|
6428
|
-
|
|
6429
|
-
|
|
6078
|
+
D.styles = [$];
|
|
6079
|
+
V([
|
|
6430
6080
|
p({ type: Object })
|
|
6431
|
-
],
|
|
6432
|
-
|
|
6081
|
+
], D.prototype, "block", 2);
|
|
6082
|
+
V([
|
|
6433
6083
|
p({ type: String })
|
|
6434
|
-
],
|
|
6435
|
-
|
|
6084
|
+
], D.prototype, "rowId", 2);
|
|
6085
|
+
V([
|
|
6436
6086
|
p({ type: String })
|
|
6437
|
-
],
|
|
6438
|
-
|
|
6087
|
+
], D.prototype, "columnId", 2);
|
|
6088
|
+
V([
|
|
6439
6089
|
p({ type: Object })
|
|
6440
|
-
],
|
|
6441
|
-
|
|
6090
|
+
], D.prototype, "assetManagerConfig", 2);
|
|
6091
|
+
V([
|
|
6442
6092
|
p({ attribute: !1 })
|
|
6443
|
-
],
|
|
6444
|
-
|
|
6093
|
+
], D.prototype, "assetStorage", 2);
|
|
6094
|
+
V([
|
|
6445
6095
|
p({ attribute: !1 })
|
|
6446
|
-
],
|
|
6447
|
-
|
|
6448
|
-
|
|
6449
|
-
],
|
|
6450
|
-
|
|
6451
|
-
|
|
6452
|
-
],
|
|
6453
|
-
var
|
|
6454
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
6096
|
+
], D.prototype, "swatches", 2);
|
|
6097
|
+
V([
|
|
6098
|
+
c()
|
|
6099
|
+
], D.prototype, "_assetManagerOpen", 2);
|
|
6100
|
+
D = V([
|
|
6101
|
+
h("pigeon-hero-panel")
|
|
6102
|
+
], D);
|
|
6103
|
+
var ui = Object.defineProperty, bi = Object.getOwnPropertyDescriptor, Se = (e, t, o, r) => {
|
|
6104
|
+
for (var i = r > 1 ? void 0 : r ? bi(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
6455
6105
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
6456
|
-
return r && i &&
|
|
6106
|
+
return r && i && ui(t, o, i), i;
|
|
6457
6107
|
};
|
|
6458
|
-
let
|
|
6108
|
+
let Z = class extends d {
|
|
6459
6109
|
constructor() {
|
|
6460
6110
|
super(...arguments), this.rowId = "", this.columnId = "", this.swatches = [];
|
|
6461
6111
|
}
|
|
@@ -6592,9 +6242,9 @@ let ae = class extends g {
|
|
|
6592
6242
|
this._emit({ padding: e.detail.value });
|
|
6593
6243
|
}
|
|
6594
6244
|
};
|
|
6595
|
-
|
|
6596
|
-
|
|
6597
|
-
|
|
6245
|
+
Z.styles = [
|
|
6246
|
+
$,
|
|
6247
|
+
g`
|
|
6598
6248
|
h4 {
|
|
6599
6249
|
margin: 0 0 8px;
|
|
6600
6250
|
font-size: 12px;
|
|
@@ -6652,27 +6302,27 @@ ae.styles = [
|
|
|
6652
6302
|
}
|
|
6653
6303
|
`
|
|
6654
6304
|
];
|
|
6655
|
-
|
|
6305
|
+
Se([
|
|
6656
6306
|
p({ type: Object })
|
|
6657
|
-
],
|
|
6658
|
-
|
|
6307
|
+
], Z.prototype, "block", 2);
|
|
6308
|
+
Se([
|
|
6659
6309
|
p({ type: String })
|
|
6660
|
-
],
|
|
6661
|
-
|
|
6310
|
+
], Z.prototype, "rowId", 2);
|
|
6311
|
+
Se([
|
|
6662
6312
|
p({ type: String })
|
|
6663
|
-
],
|
|
6664
|
-
|
|
6313
|
+
], Z.prototype, "columnId", 2);
|
|
6314
|
+
Se([
|
|
6665
6315
|
p({ attribute: !1 })
|
|
6666
|
-
],
|
|
6667
|
-
|
|
6668
|
-
|
|
6669
|
-
],
|
|
6670
|
-
var
|
|
6671
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
6316
|
+
], Z.prototype, "swatches", 2);
|
|
6317
|
+
Z = Se([
|
|
6318
|
+
h("pigeon-navbar-panel")
|
|
6319
|
+
], Z);
|
|
6320
|
+
var vi = Object.defineProperty, fi = Object.getOwnPropertyDescriptor, Oe = (e, t, o, r) => {
|
|
6321
|
+
for (var i = r > 1 ? void 0 : r ? fi(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
6672
6322
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
6673
|
-
return r && i &&
|
|
6323
|
+
return r && i && vi(t, o, i), i;
|
|
6674
6324
|
};
|
|
6675
|
-
let
|
|
6325
|
+
let Q = class extends d {
|
|
6676
6326
|
constructor() {
|
|
6677
6327
|
super(...arguments), this.rowId = "", this.columnId = "", this.swatches = [];
|
|
6678
6328
|
}
|
|
@@ -6753,28 +6403,28 @@ let se = class extends g {
|
|
|
6753
6403
|
this._emit({ padding: e.detail.value });
|
|
6754
6404
|
}
|
|
6755
6405
|
};
|
|
6756
|
-
|
|
6757
|
-
|
|
6406
|
+
Q.styles = $;
|
|
6407
|
+
Oe([
|
|
6758
6408
|
p({ type: Object })
|
|
6759
|
-
],
|
|
6760
|
-
|
|
6409
|
+
], Q.prototype, "block", 2);
|
|
6410
|
+
Oe([
|
|
6761
6411
|
p({ type: String })
|
|
6762
|
-
],
|
|
6763
|
-
|
|
6412
|
+
], Q.prototype, "rowId", 2);
|
|
6413
|
+
Oe([
|
|
6764
6414
|
p({ type: String })
|
|
6765
|
-
],
|
|
6766
|
-
|
|
6415
|
+
], Q.prototype, "columnId", 2);
|
|
6416
|
+
Oe([
|
|
6767
6417
|
p({ attribute: !1 })
|
|
6768
|
-
],
|
|
6769
|
-
|
|
6770
|
-
|
|
6771
|
-
],
|
|
6772
|
-
var
|
|
6773
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
6418
|
+
], Q.prototype, "swatches", 2);
|
|
6419
|
+
Q = Oe([
|
|
6420
|
+
h("pigeon-divider-panel")
|
|
6421
|
+
], Q);
|
|
6422
|
+
var mi = Object.defineProperty, _i = Object.getOwnPropertyDescriptor, He = (e, t, o, r) => {
|
|
6423
|
+
for (var i = r > 1 ? void 0 : r ? _i(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
6774
6424
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
6775
|
-
return r && i &&
|
|
6425
|
+
return r && i && mi(t, o, i), i;
|
|
6776
6426
|
};
|
|
6777
|
-
let
|
|
6427
|
+
let ce = class extends d {
|
|
6778
6428
|
constructor() {
|
|
6779
6429
|
super(...arguments), this.rowId = "", this.columnId = "";
|
|
6780
6430
|
}
|
|
@@ -6811,25 +6461,25 @@ let _e = class extends g {
|
|
|
6811
6461
|
this._emit({ height: e.detail.value });
|
|
6812
6462
|
}
|
|
6813
6463
|
};
|
|
6814
|
-
|
|
6815
|
-
|
|
6464
|
+
ce.styles = $;
|
|
6465
|
+
He([
|
|
6816
6466
|
p({ type: Object })
|
|
6817
|
-
],
|
|
6818
|
-
|
|
6467
|
+
], ce.prototype, "block", 2);
|
|
6468
|
+
He([
|
|
6819
6469
|
p({ type: String })
|
|
6820
|
-
],
|
|
6821
|
-
|
|
6470
|
+
], ce.prototype, "rowId", 2);
|
|
6471
|
+
He([
|
|
6822
6472
|
p({ type: String })
|
|
6823
|
-
],
|
|
6824
|
-
|
|
6825
|
-
|
|
6826
|
-
],
|
|
6827
|
-
var
|
|
6828
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
6473
|
+
], ce.prototype, "columnId", 2);
|
|
6474
|
+
ce = He([
|
|
6475
|
+
h("pigeon-spacer-panel")
|
|
6476
|
+
], ce);
|
|
6477
|
+
var yi = Object.defineProperty, xi = Object.getOwnPropertyDescriptor, Ue = (e, t, o, r) => {
|
|
6478
|
+
for (var i = r > 1 ? void 0 : r ? xi(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
6829
6479
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
6830
|
-
return r && i &&
|
|
6480
|
+
return r && i && yi(t, o, i), i;
|
|
6831
6481
|
};
|
|
6832
|
-
const
|
|
6482
|
+
const wi = [
|
|
6833
6483
|
"facebook",
|
|
6834
6484
|
"twitter",
|
|
6835
6485
|
"instagram",
|
|
@@ -6838,7 +6488,7 @@ const xr = [
|
|
|
6838
6488
|
"tiktok",
|
|
6839
6489
|
"custom"
|
|
6840
6490
|
];
|
|
6841
|
-
let
|
|
6491
|
+
let de = class extends d {
|
|
6842
6492
|
constructor() {
|
|
6843
6493
|
super(...arguments), this.rowId = "", this.columnId = "";
|
|
6844
6494
|
}
|
|
@@ -6858,7 +6508,7 @@ let ye = class extends g {
|
|
|
6858
6508
|
<div class="field">
|
|
6859
6509
|
<label>${s("panel.social.network")}</label>
|
|
6860
6510
|
<select @change=${(r) => this._onIconTypeChange(o, r)}>
|
|
6861
|
-
${
|
|
6511
|
+
${wi.map((r) => l`
|
|
6862
6512
|
<option value=${r} ?selected=${t.type === r}>${r}</option>
|
|
6863
6513
|
`)}
|
|
6864
6514
|
</select>
|
|
@@ -6982,9 +6632,9 @@ let ye = class extends g {
|
|
|
6982
6632
|
this._emit({ padding: e.detail.value });
|
|
6983
6633
|
}
|
|
6984
6634
|
};
|
|
6985
|
-
|
|
6986
|
-
|
|
6987
|
-
|
|
6635
|
+
de.styles = [
|
|
6636
|
+
$,
|
|
6637
|
+
g`
|
|
6988
6638
|
h4 {
|
|
6989
6639
|
margin: 0 0 8px;
|
|
6990
6640
|
font-size: 12px;
|
|
@@ -7042,26 +6692,26 @@ ye.styles = [
|
|
|
7042
6692
|
}
|
|
7043
6693
|
`
|
|
7044
6694
|
];
|
|
7045
|
-
|
|
6695
|
+
Ue([
|
|
7046
6696
|
p({ type: Object })
|
|
7047
|
-
],
|
|
7048
|
-
|
|
6697
|
+
], de.prototype, "block", 2);
|
|
6698
|
+
Ue([
|
|
7049
6699
|
p({ type: String })
|
|
7050
|
-
],
|
|
7051
|
-
|
|
6700
|
+
], de.prototype, "rowId", 2);
|
|
6701
|
+
Ue([
|
|
7052
6702
|
p({ type: String })
|
|
7053
|
-
],
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
],
|
|
7057
|
-
var $
|
|
7058
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
6703
|
+
], de.prototype, "columnId", 2);
|
|
6704
|
+
de = Ue([
|
|
6705
|
+
h("pigeon-social-panel")
|
|
6706
|
+
], de);
|
|
6707
|
+
var $i = Object.defineProperty, ki = Object.getOwnPropertyDescriptor, F = (e, t, o, r) => {
|
|
6708
|
+
for (var i = r > 1 ? void 0 : r ? ki(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
7059
6709
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
7060
|
-
return r && i && $
|
|
6710
|
+
return r && i && $i(t, o, i), i;
|
|
7061
6711
|
};
|
|
7062
|
-
let
|
|
6712
|
+
let T = class extends d {
|
|
7063
6713
|
constructor() {
|
|
7064
|
-
super(...arguments), this.rowId = "", this.columnId = "", this.mergeTags = [], this.requestMergeTags = !1, this._pickerOpen = !1, this._pickerX = 0, this._pickerY = 0, this._textareaRef =
|
|
6714
|
+
super(...arguments), this.rowId = "", this.columnId = "", this.mergeTags = [], this.requestMergeTags = !1, this._pickerOpen = !1, this._pickerX = 0, this._pickerY = 0, this._textareaRef = ie(), this._triggerRef = ie();
|
|
7065
6715
|
}
|
|
7066
6716
|
render() {
|
|
7067
6717
|
if (!this.block) return l``;
|
|
@@ -7073,13 +6723,13 @@ let E = class extends g {
|
|
|
7073
6723
|
<div class="label-row">
|
|
7074
6724
|
<label>${s("panel.html.rawHtml")}</label>
|
|
7075
6725
|
${t || this.requestMergeTags ? l`
|
|
7076
|
-
<button class="tag-btn" ${
|
|
6726
|
+
<button class="tag-btn" ${re(this._triggerRef)} @click=${this._togglePicker} title=${s("panel.common.insertMergeTag")}>
|
|
7077
6727
|
${s("panel.common.tagBtn")}
|
|
7078
6728
|
</button>
|
|
7079
6729
|
` : ""}
|
|
7080
6730
|
</div>
|
|
7081
6731
|
<textarea
|
|
7082
|
-
${
|
|
6732
|
+
${re(this._textareaRef)}
|
|
7083
6733
|
.value=${e.content}
|
|
7084
6734
|
@change=${this._onContentChange}
|
|
7085
6735
|
></textarea>
|
|
@@ -7139,13 +6789,13 @@ let E = class extends g {
|
|
|
7139
6789
|
if (!t) return;
|
|
7140
6790
|
const o = t.selectionStart, r = t.selectionEnd, i = t.value, n = e.detail.tag.name, a = i.substring(0, o) + n + i.substring(r);
|
|
7141
6791
|
t.value = a;
|
|
7142
|
-
const
|
|
7143
|
-
t.setSelectionRange(
|
|
6792
|
+
const u = o + n.length;
|
|
6793
|
+
t.setSelectionRange(u, u), t.focus(), this._emit({ content: a }), this._pickerOpen = !1;
|
|
7144
6794
|
}
|
|
7145
6795
|
};
|
|
7146
|
-
|
|
7147
|
-
|
|
7148
|
-
|
|
6796
|
+
T.styles = [
|
|
6797
|
+
$,
|
|
6798
|
+
g`
|
|
7149
6799
|
/* HTML payload is raw markup — show in monospace and taller than the
|
|
7150
6800
|
default textarea so authors have room to work. */
|
|
7151
6801
|
textarea {
|
|
@@ -7188,39 +6838,39 @@ E.styles = [
|
|
|
7188
6838
|
}
|
|
7189
6839
|
`
|
|
7190
6840
|
];
|
|
7191
|
-
|
|
6841
|
+
F([
|
|
7192
6842
|
p({ type: Object })
|
|
7193
|
-
],
|
|
7194
|
-
|
|
6843
|
+
], T.prototype, "block", 2);
|
|
6844
|
+
F([
|
|
7195
6845
|
p({ type: String })
|
|
7196
|
-
],
|
|
7197
|
-
|
|
6846
|
+
], T.prototype, "rowId", 2);
|
|
6847
|
+
F([
|
|
7198
6848
|
p({ type: String })
|
|
7199
|
-
],
|
|
7200
|
-
|
|
6849
|
+
], T.prototype, "columnId", 2);
|
|
6850
|
+
F([
|
|
7201
6851
|
p({ type: Array })
|
|
7202
|
-
],
|
|
7203
|
-
|
|
6852
|
+
], T.prototype, "mergeTags", 2);
|
|
6853
|
+
F([
|
|
7204
6854
|
p({ attribute: !1 })
|
|
7205
|
-
],
|
|
7206
|
-
|
|
7207
|
-
|
|
7208
|
-
],
|
|
7209
|
-
|
|
7210
|
-
|
|
7211
|
-
],
|
|
7212
|
-
|
|
7213
|
-
|
|
7214
|
-
],
|
|
7215
|
-
|
|
7216
|
-
|
|
7217
|
-
],
|
|
7218
|
-
var
|
|
7219
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
6855
|
+
], T.prototype, "requestMergeTags", 2);
|
|
6856
|
+
F([
|
|
6857
|
+
c()
|
|
6858
|
+
], T.prototype, "_pickerOpen", 2);
|
|
6859
|
+
F([
|
|
6860
|
+
c()
|
|
6861
|
+
], T.prototype, "_pickerX", 2);
|
|
6862
|
+
F([
|
|
6863
|
+
c()
|
|
6864
|
+
], T.prototype, "_pickerY", 2);
|
|
6865
|
+
T = F([
|
|
6866
|
+
h("pigeon-html-panel")
|
|
6867
|
+
], T);
|
|
6868
|
+
var Ci = Object.defineProperty, Ii = Object.getOwnPropertyDescriptor, ve = (e, t, o, r) => {
|
|
6869
|
+
for (var i = r > 1 ? void 0 : r ? Ii(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
7220
6870
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
7221
|
-
return r && i &&
|
|
6871
|
+
return r && i && Ci(t, o, i), i;
|
|
7222
6872
|
};
|
|
7223
|
-
let
|
|
6873
|
+
let W = class extends d {
|
|
7224
6874
|
constructor() {
|
|
7225
6875
|
super(...arguments), this.rowId = "", this.columnId = "", this.label = "Block", this.schema = [];
|
|
7226
6876
|
}
|
|
@@ -7330,31 +6980,31 @@ let J = class extends g {
|
|
|
7330
6980
|
);
|
|
7331
6981
|
}
|
|
7332
6982
|
};
|
|
7333
|
-
|
|
7334
|
-
|
|
6983
|
+
W.styles = $;
|
|
6984
|
+
ve([
|
|
7335
6985
|
p({ type: Object })
|
|
7336
|
-
],
|
|
7337
|
-
|
|
6986
|
+
], W.prototype, "block", 2);
|
|
6987
|
+
ve([
|
|
7338
6988
|
p({ type: String })
|
|
7339
|
-
],
|
|
7340
|
-
|
|
6989
|
+
], W.prototype, "rowId", 2);
|
|
6990
|
+
ve([
|
|
7341
6991
|
p({ type: String })
|
|
7342
|
-
],
|
|
7343
|
-
|
|
6992
|
+
], W.prototype, "columnId", 2);
|
|
6993
|
+
ve([
|
|
7344
6994
|
p({ type: String })
|
|
7345
|
-
],
|
|
7346
|
-
|
|
6995
|
+
], W.prototype, "label", 2);
|
|
6996
|
+
ve([
|
|
7347
6997
|
p({ type: Array })
|
|
7348
|
-
],
|
|
7349
|
-
|
|
7350
|
-
|
|
7351
|
-
],
|
|
7352
|
-
var
|
|
7353
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
6998
|
+
], W.prototype, "schema", 2);
|
|
6999
|
+
W = ve([
|
|
7000
|
+
h("pigeon-custom-panel")
|
|
7001
|
+
], W);
|
|
7002
|
+
var Pi = Object.defineProperty, Ti = Object.getOwnPropertyDescriptor, B = (e, t, o, r) => {
|
|
7003
|
+
for (var i = r > 1 ? void 0 : r ? Ti(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
7354
7004
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
7355
|
-
return r && i &&
|
|
7005
|
+
return r && i && Pi(t, o, i), i;
|
|
7356
7006
|
};
|
|
7357
|
-
let
|
|
7007
|
+
let w = class extends d {
|
|
7358
7008
|
constructor() {
|
|
7359
7009
|
super(...arguments), this.selection = null, this.mergeTags = [], this.requestMergeTags = !1, this.brandKit = null, this.fontConfig = [], this.linkTypes = [];
|
|
7360
7010
|
}
|
|
@@ -7461,7 +7111,7 @@ let C = class extends g {
|
|
|
7461
7111
|
hero: "Hero",
|
|
7462
7112
|
navbar: "Navbar"
|
|
7463
7113
|
}, o = e.type;
|
|
7464
|
-
return t[o] ?? ((r =
|
|
7114
|
+
return t[o] ?? ((r = Je(o)) == null ? void 0 : r.label) ?? o;
|
|
7465
7115
|
}
|
|
7466
7116
|
_renderBlockPanel(e, t, o) {
|
|
7467
7117
|
switch (e.type) {
|
|
@@ -7497,7 +7147,7 @@ let C = class extends g {
|
|
|
7497
7147
|
case "html":
|
|
7498
7148
|
return l`<pigeon-html-panel .block=${e} .rowId=${t} .columnId=${o} .mergeTags=${this.mergeTags} .requestMergeTags=${this.requestMergeTags}></pigeon-html-panel>`;
|
|
7499
7149
|
default: {
|
|
7500
|
-
const r = e.type ?? "unknown", i =
|
|
7150
|
+
const r = e.type ?? "unknown", i = Je(r);
|
|
7501
7151
|
return i != null && i.propertySchema && i.propertySchema.length > 0 ? l`<pigeon-custom-panel
|
|
7502
7152
|
.block=${e}
|
|
7503
7153
|
.rowId=${t}
|
|
@@ -7526,7 +7176,7 @@ let C = class extends g {
|
|
|
7526
7176
|
return i.blocks.find((n) => n.id === o);
|
|
7527
7177
|
}
|
|
7528
7178
|
};
|
|
7529
|
-
|
|
7179
|
+
w.styles = g`
|
|
7530
7180
|
:host {
|
|
7531
7181
|
display: block;
|
|
7532
7182
|
width: var(--pigeon-properties-width, 300px);
|
|
@@ -7609,42 +7259,42 @@ C.styles = b`
|
|
|
7609
7259
|
line-height: 1.5;
|
|
7610
7260
|
}
|
|
7611
7261
|
`;
|
|
7612
|
-
|
|
7262
|
+
B([
|
|
7613
7263
|
p({ type: Object })
|
|
7614
|
-
],
|
|
7615
|
-
|
|
7264
|
+
], w.prototype, "doc", 2);
|
|
7265
|
+
B([
|
|
7616
7266
|
p({ type: Object })
|
|
7617
|
-
],
|
|
7618
|
-
|
|
7267
|
+
], w.prototype, "selection", 2);
|
|
7268
|
+
B([
|
|
7619
7269
|
p({ type: Array })
|
|
7620
|
-
],
|
|
7621
|
-
|
|
7270
|
+
], w.prototype, "mergeTags", 2);
|
|
7271
|
+
B([
|
|
7622
7272
|
p({ attribute: !1 })
|
|
7623
|
-
],
|
|
7624
|
-
|
|
7273
|
+
], w.prototype, "requestMergeTags", 2);
|
|
7274
|
+
B([
|
|
7625
7275
|
p({ attribute: !1 })
|
|
7626
|
-
],
|
|
7627
|
-
|
|
7276
|
+
], w.prototype, "assetManagerConfig", 2);
|
|
7277
|
+
B([
|
|
7628
7278
|
p({ attribute: !1 })
|
|
7629
|
-
],
|
|
7630
|
-
|
|
7279
|
+
], w.prototype, "assetStorage", 2);
|
|
7280
|
+
B([
|
|
7631
7281
|
p({ attribute: !1 })
|
|
7632
|
-
],
|
|
7633
|
-
|
|
7282
|
+
], w.prototype, "brandKit", 2);
|
|
7283
|
+
B([
|
|
7634
7284
|
p({ attribute: !1 })
|
|
7635
|
-
],
|
|
7636
|
-
|
|
7285
|
+
], w.prototype, "fontConfig", 2);
|
|
7286
|
+
B([
|
|
7637
7287
|
p({ attribute: !1 })
|
|
7638
|
-
],
|
|
7639
|
-
|
|
7640
|
-
|
|
7641
|
-
],
|
|
7642
|
-
var
|
|
7643
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
7288
|
+
], w.prototype, "linkTypes", 2);
|
|
7289
|
+
w = B([
|
|
7290
|
+
h("pigeon-properties")
|
|
7291
|
+
], w);
|
|
7292
|
+
var Si = Object.defineProperty, Oi = Object.getOwnPropertyDescriptor, S = (e, t, o, r) => {
|
|
7293
|
+
for (var i = r > 1 ? void 0 : r ? Oi(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
7644
7294
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
7645
|
-
return r && i &&
|
|
7295
|
+
return r && i && Si(t, o, i), i;
|
|
7646
7296
|
};
|
|
7647
|
-
let
|
|
7297
|
+
let x = class extends d {
|
|
7648
7298
|
constructor() {
|
|
7649
7299
|
super(...arguments), this.fonts = [], this.open = !1, this._viewMode = "preview", this._device = "desktop", this._htmlContent = "", this._mjmlContent = "", this._loading = !1, this._previouslyFocused = null, this._onKeyDown = (e) => {
|
|
7650
7300
|
this.open && (e.key === "Escape" ? (e.stopPropagation(), this._close()) : e.key === "Tab" && this._trapTab(e));
|
|
@@ -7762,7 +7412,7 @@ let k = class extends g {
|
|
|
7762
7412
|
this.open = !1;
|
|
7763
7413
|
}
|
|
7764
7414
|
};
|
|
7765
|
-
|
|
7415
|
+
x.styles = g`
|
|
7766
7416
|
:host {
|
|
7767
7417
|
display: none;
|
|
7768
7418
|
}
|
|
@@ -7939,52 +7589,52 @@ k.styles = b`
|
|
|
7939
7589
|
font-size: 14px;
|
|
7940
7590
|
}
|
|
7941
7591
|
`;
|
|
7942
|
-
|
|
7592
|
+
S([
|
|
7943
7593
|
p({ type: Object })
|
|
7944
|
-
],
|
|
7945
|
-
|
|
7594
|
+
], x.prototype, "renderer", 2);
|
|
7595
|
+
S([
|
|
7946
7596
|
p({ type: Object })
|
|
7947
|
-
],
|
|
7948
|
-
|
|
7597
|
+
], x.prototype, "doc", 2);
|
|
7598
|
+
S([
|
|
7949
7599
|
p({ attribute: !1 })
|
|
7950
|
-
],
|
|
7951
|
-
|
|
7600
|
+
], x.prototype, "documentToMjml", 2);
|
|
7601
|
+
S([
|
|
7952
7602
|
p({ attribute: !1 })
|
|
7953
|
-
],
|
|
7954
|
-
|
|
7603
|
+
], x.prototype, "fonts", 2);
|
|
7604
|
+
S([
|
|
7955
7605
|
p({ type: Boolean, reflect: !0 })
|
|
7956
|
-
],
|
|
7957
|
-
|
|
7958
|
-
|
|
7959
|
-
],
|
|
7960
|
-
|
|
7961
|
-
|
|
7962
|
-
],
|
|
7963
|
-
|
|
7964
|
-
|
|
7965
|
-
],
|
|
7966
|
-
|
|
7967
|
-
|
|
7968
|
-
],
|
|
7969
|
-
|
|
7970
|
-
|
|
7971
|
-
],
|
|
7972
|
-
|
|
7973
|
-
|
|
7974
|
-
],
|
|
7975
|
-
var
|
|
7976
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
7606
|
+
], x.prototype, "open", 2);
|
|
7607
|
+
S([
|
|
7608
|
+
c()
|
|
7609
|
+
], x.prototype, "_viewMode", 2);
|
|
7610
|
+
S([
|
|
7611
|
+
c()
|
|
7612
|
+
], x.prototype, "_device", 2);
|
|
7613
|
+
S([
|
|
7614
|
+
c()
|
|
7615
|
+
], x.prototype, "_htmlContent", 2);
|
|
7616
|
+
S([
|
|
7617
|
+
c()
|
|
7618
|
+
], x.prototype, "_mjmlContent", 2);
|
|
7619
|
+
S([
|
|
7620
|
+
c()
|
|
7621
|
+
], x.prototype, "_loading", 2);
|
|
7622
|
+
x = S([
|
|
7623
|
+
h("pigeon-preview")
|
|
7624
|
+
], x);
|
|
7625
|
+
var Ei = Object.defineProperty, Di = Object.getOwnPropertyDescriptor, m = (e, t, o, r) => {
|
|
7626
|
+
for (var i = r > 1 ? void 0 : r ? Di(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
7977
7627
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
7978
|
-
return r && i &&
|
|
7628
|
+
return r && i && Ei(t, o, i), i;
|
|
7979
7629
|
};
|
|
7980
|
-
let
|
|
7981
|
-
function
|
|
7982
|
-
return
|
|
7630
|
+
let Xe = null;
|
|
7631
|
+
function Bi() {
|
|
7632
|
+
return Xe || (Xe = import("./templates.js")), Xe;
|
|
7983
7633
|
}
|
|
7984
|
-
function
|
|
7634
|
+
function wt(e) {
|
|
7985
7635
|
return e.toLowerCase().normalize("NFKD").replace(/[̀-ͯ]/g, "").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || `template-${Date.now()}`;
|
|
7986
7636
|
}
|
|
7987
|
-
let
|
|
7637
|
+
let v = class extends d {
|
|
7988
7638
|
constructor() {
|
|
7989
7639
|
super(...arguments), this.theme = "light", this.themeOverrides = {}, this.config = {}, this._canUndo = !1, this._canRedo = !1, this._device = "desktop", this._fullscreen = !1, this._previewOpen = !1, this._templatePickerOpen = !1, this._templatePickerLoaded = !1, this._editingBlockId = null, this._clipboard = null, this._activeBrandKit = null, this._brandKitStorage = null, this._handleBrandKitEdit = async (e) => {
|
|
7990
7640
|
e.stopPropagation();
|
|
@@ -8006,7 +7656,7 @@ let _ = class extends g {
|
|
|
8006
7656
|
const t = e.detail.value, o = this._state.selection;
|
|
8007
7657
|
if ((o == null ? void 0 : o.type) === "block" && o.rowId && o.columnId && o.blockId) {
|
|
8008
7658
|
const r = this._findBlock(o.rowId, o.columnId, o.blockId);
|
|
8009
|
-
(r == null ? void 0 : r.type) === "button" &&
|
|
7659
|
+
(r == null ? void 0 : r.type) === "button" && Ke(o.rowId, o.columnId, o.blockId, { backgroundColor: t })(this._state, this._dispatch);
|
|
8010
7660
|
return;
|
|
8011
7661
|
}
|
|
8012
7662
|
this._applyBodyAttribute("backgroundColor", t);
|
|
@@ -8014,20 +7664,20 @@ let _ = class extends g {
|
|
|
8014
7664
|
e.stopPropagation(), this._applyBodyAttribute("fontFamily", e.detail.family);
|
|
8015
7665
|
}, this._handleBrandLogoInsert = (e) => {
|
|
8016
7666
|
e.stopPropagation();
|
|
8017
|
-
const { logo: t } = e.detail, o =
|
|
7667
|
+
const { logo: t } = e.detail, o = Ee("image");
|
|
8018
7668
|
o.values.src = t.src, o.values.alt = t.name, t.width && (o.values.width = t.width);
|
|
8019
7669
|
const r = this._state.selection;
|
|
8020
7670
|
if (r != null && r.rowId && (r != null && r.columnId)) {
|
|
8021
|
-
|
|
7671
|
+
oe(r.rowId, r.columnId, o)(this._state, this._dispatch);
|
|
8022
7672
|
return;
|
|
8023
7673
|
}
|
|
8024
7674
|
const i = this._state.doc.body.rows;
|
|
8025
7675
|
if (i.length > 0) {
|
|
8026
7676
|
const n = i[i.length - 1], a = n.columns[0];
|
|
8027
|
-
|
|
7677
|
+
oe(n.id, a.id, o, a.blocks.length)(this._state, this._dispatch);
|
|
8028
7678
|
} else {
|
|
8029
|
-
const n =
|
|
8030
|
-
|
|
7679
|
+
const n = fe([o]);
|
|
7680
|
+
G(me([n]), 0)(this._state, this._dispatch);
|
|
8031
7681
|
}
|
|
8032
7682
|
}, this._dispatch = (e) => {
|
|
8033
7683
|
this._state = this._state.apply(e), this._syncHistoryFlags(), this.requestUpdate(), this._fireChange(), this._fireSelect();
|
|
@@ -8037,7 +7687,7 @@ let _ = class extends g {
|
|
|
8037
7687
|
const o = window.prompt("Name this saved row");
|
|
8038
7688
|
if (!o || !o.trim()) return;
|
|
8039
7689
|
const r = (/* @__PURE__ */ new Date()).toISOString(), i = {
|
|
8040
|
-
id:
|
|
7690
|
+
id: wt(o),
|
|
8041
7691
|
name: o.trim(),
|
|
8042
7692
|
kind: "row",
|
|
8043
7693
|
node: structuredClone(t),
|
|
@@ -8050,11 +7700,11 @@ let _ = class extends g {
|
|
|
8050
7700
|
this._emitRowLibraryError(n, "save");
|
|
8051
7701
|
}
|
|
8052
7702
|
}, this._handleRowInsertSaved = (e) => {
|
|
8053
|
-
const t =
|
|
8054
|
-
|
|
7703
|
+
const t = dt(e.detail.node);
|
|
7704
|
+
G(t, e.detail.index)(this._state, this._dispatch);
|
|
8055
7705
|
}, this._handleLibraryInsert = (e) => {
|
|
8056
|
-
const t =
|
|
8057
|
-
|
|
7706
|
+
const t = dt(e.detail.node);
|
|
7707
|
+
G(t, this._state.doc.body.rows.length)(this._state, this._dispatch);
|
|
8058
7708
|
}, this._handleLibraryDelete = async (e) => {
|
|
8059
7709
|
try {
|
|
8060
7710
|
await this._resolveRowLibrary().delete(e.detail.id), await this._refreshSavedTab();
|
|
@@ -8074,16 +7724,16 @@ let _ = class extends g {
|
|
|
8074
7724
|
}
|
|
8075
7725
|
if (e.key === "Escape") {
|
|
8076
7726
|
const r = this._state.createTransaction();
|
|
8077
|
-
r.setSelection(
|
|
7727
|
+
r.setSelection(ht()), this._dispatch(r);
|
|
8078
7728
|
return;
|
|
8079
7729
|
}
|
|
8080
7730
|
if (o) {
|
|
8081
7731
|
if (e.key === "Delete" || e.key === "Backspace") {
|
|
8082
|
-
o.type === "block" && o.rowId && o.columnId && o.blockId ? (e.preventDefault(),
|
|
7732
|
+
o.type === "block" && o.rowId && o.columnId && o.blockId ? (e.preventDefault(), Ot(o.rowId, o.columnId, o.blockId)(this._state, this._dispatch)) : o.type === "row" && o.rowId && (e.preventDefault(), gt(o.rowId)(this._state, this._dispatch));
|
|
8083
7733
|
return;
|
|
8084
7734
|
}
|
|
8085
7735
|
if (t && e.key.toLowerCase() === "d") {
|
|
8086
|
-
o.type === "block" && o.rowId && o.columnId && o.blockId ? (e.preventDefault(),
|
|
7736
|
+
o.type === "block" && o.rowId && o.columnId && o.blockId ? (e.preventDefault(), Et(o.rowId, o.columnId, o.blockId)(this._state, this._dispatch)) : o.type === "row" && o.rowId && (e.preventDefault(), ut(o.rowId)(this._state, this._dispatch));
|
|
8087
7737
|
return;
|
|
8088
7738
|
}
|
|
8089
7739
|
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
@@ -8103,13 +7753,13 @@ let _ = class extends g {
|
|
|
8103
7753
|
if (o.type === "block" && o.rowId && o.columnId && o.blockId) {
|
|
8104
7754
|
e.preventDefault();
|
|
8105
7755
|
const r = structuredClone(this._clipboard);
|
|
8106
|
-
r.id =
|
|
7756
|
+
r.id = bt();
|
|
8107
7757
|
const i = this._findBlockIndex(o.rowId, o.columnId, o.blockId), n = i >= 0 ? i + 1 : void 0;
|
|
8108
|
-
|
|
7758
|
+
oe(o.rowId, o.columnId, r, n)(this._state, this._dispatch);
|
|
8109
7759
|
} else if (o.type === "column" && o.rowId && o.columnId) {
|
|
8110
7760
|
e.preventDefault();
|
|
8111
7761
|
const r = structuredClone(this._clipboard);
|
|
8112
|
-
r.id =
|
|
7762
|
+
r.id = bt(), oe(o.rowId, o.columnId, r)(this._state, this._dispatch);
|
|
8113
7763
|
}
|
|
8114
7764
|
return;
|
|
8115
7765
|
}
|
|
@@ -8120,13 +7770,13 @@ let _ = class extends g {
|
|
|
8120
7770
|
/* Lifecycle */
|
|
8121
7771
|
/* ------------------------------------------------------------------ */
|
|
8122
7772
|
connectedCallback() {
|
|
8123
|
-
super.connectedCallback(),
|
|
7773
|
+
super.connectedCallback(), ct(this.config.locale, this.config.messages), this._state || this._initState(), this._applyDir(), this._resolveBrandKit(), this._applyTheme(), document.addEventListener("keydown", this._handleKeyDown), this.addEventListener("brand-kit-edit", this._handleBrandKitEdit), this.addEventListener("brand-color-apply", this._handleBrandColorApply), this.addEventListener("brand-font-apply", this._handleBrandFontApply), this.addEventListener("brand-logo-insert", this._handleBrandLogoInsert);
|
|
8124
7774
|
}
|
|
8125
7775
|
disconnectedCallback() {
|
|
8126
7776
|
super.disconnectedCallback(), document.removeEventListener("keydown", this._handleKeyDown), this.removeEventListener("brand-kit-edit", this._handleBrandKitEdit), this.removeEventListener("brand-color-apply", this._handleBrandColorApply), this.removeEventListener("brand-font-apply", this._handleBrandFontApply), this.removeEventListener("brand-logo-insert", this._handleBrandLogoInsert);
|
|
8127
7777
|
}
|
|
8128
7778
|
updated(e) {
|
|
8129
|
-
e.has("document") && this._state && this.document && this.document !== this._state.doc && this.loadDocument(this.document), e.has("_fullscreen") && (this._fullscreen ? this.setAttribute("fullscreen", "") : this.removeAttribute("fullscreen")), (e.has("theme") || e.has("themeOverrides")) && this._applyTheme(), e.has("config") && (
|
|
7779
|
+
e.has("document") && this._state && this.document && this.document !== this._state.doc && this.loadDocument(this.document), e.has("_fullscreen") && (this._fullscreen ? this.setAttribute("fullscreen", "") : this.removeAttribute("fullscreen")), (e.has("theme") || e.has("themeOverrides")) && this._applyTheme(), e.has("config") && (ct(this.config.locale, this.config.messages), this._applyDir(), this._resolveBrandKit());
|
|
8130
7780
|
}
|
|
8131
7781
|
/**
|
|
8132
7782
|
* Set the host `dir` attribute based on `config.locale` and `config.dir`.
|
|
@@ -8135,7 +7785,7 @@ let _ = class extends g {
|
|
|
8135
7785
|
* bidirectional layout support.
|
|
8136
7786
|
*/
|
|
8137
7787
|
_applyDir() {
|
|
8138
|
-
this.setAttribute("dir",
|
|
7788
|
+
this.setAttribute("dir", Tt(this.config.locale, this.config.dir));
|
|
8139
7789
|
}
|
|
8140
7790
|
/**
|
|
8141
7791
|
* Sync the active `theme` to the host classes the token sheet keys off, and
|
|
@@ -8161,19 +7811,19 @@ let _ = class extends g {
|
|
|
8161
7811
|
}
|
|
8162
7812
|
/** Replaces the document entirely (resets history). */
|
|
8163
7813
|
loadDocument(e) {
|
|
8164
|
-
this._state =
|
|
7814
|
+
this._state = vt.create({
|
|
8165
7815
|
doc: e,
|
|
8166
|
-
plugins: [
|
|
7816
|
+
plugins: [ft()],
|
|
8167
7817
|
...this.config
|
|
8168
7818
|
}), this._syncHistoryFlags(), this.requestUpdate(), this._fireChange();
|
|
8169
7819
|
}
|
|
8170
7820
|
/** Undo the last change. */
|
|
8171
7821
|
undo() {
|
|
8172
|
-
return
|
|
7822
|
+
return Dt(this._state, this._dispatch);
|
|
8173
7823
|
}
|
|
8174
7824
|
/** Redo the last undone change. */
|
|
8175
7825
|
redo() {
|
|
8176
|
-
return
|
|
7826
|
+
return Bt(this._state, this._dispatch);
|
|
8177
7827
|
}
|
|
8178
7828
|
/** Export the document as JSON. */
|
|
8179
7829
|
exportJson() {
|
|
@@ -8309,13 +7959,13 @@ let _ = class extends g {
|
|
|
8309
7959
|
/* Templates */
|
|
8310
7960
|
/* ------------------------------------------------------------------ */
|
|
8311
7961
|
_resolveTemplateStorage() {
|
|
8312
|
-
return this.templateStorage ? this.templateStorage : (this._defaultTemplateStorage || (this._defaultTemplateStorage = new
|
|
7962
|
+
return this.templateStorage ? this.templateStorage : (this._defaultTemplateStorage || (this._defaultTemplateStorage = new jt()), this._defaultTemplateStorage);
|
|
8313
7963
|
}
|
|
8314
7964
|
_resolveRowLibrary() {
|
|
8315
|
-
return this.config.rowLibrary ? this.config.rowLibrary : (this._defaultRowLibrary || (this._defaultRowLibrary = new
|
|
7965
|
+
return this.config.rowLibrary ? this.config.rowLibrary : (this._defaultRowLibrary || (this._defaultRowLibrary = new Rt()), this._defaultRowLibrary);
|
|
8316
7966
|
}
|
|
8317
7967
|
_linkTypes() {
|
|
8318
|
-
return [...
|
|
7968
|
+
return [...Lt, ...this.config.linkTypes ?? []];
|
|
8319
7969
|
}
|
|
8320
7970
|
/**
|
|
8321
7971
|
* Resolve `config.brandKit` into a single active kit. A plain `BrandKit` is
|
|
@@ -8356,7 +8006,7 @@ let _ = class extends g {
|
|
|
8356
8006
|
}
|
|
8357
8007
|
/** Apply a single body attribute through an undoable transaction. */
|
|
8358
8008
|
_applyBodyAttribute(e, t) {
|
|
8359
|
-
const o = this._state.createTransaction(), i = this._state.doc.body.attributes[e], n =
|
|
8009
|
+
const o = this._state.createTransaction(), i = this._state.doc.body.attributes[e], n = Ne(
|
|
8360
8010
|
"updateBodyAttribute",
|
|
8361
8011
|
`body.attributes.${e}`,
|
|
8362
8012
|
(a) => {
|
|
@@ -8369,7 +8019,7 @@ let _ = class extends g {
|
|
|
8369
8019
|
o.addStep(n), this._dispatch(o);
|
|
8370
8020
|
}
|
|
8371
8021
|
async _handleTemplatesOpen() {
|
|
8372
|
-
this._templatePickerLoaded || (await
|
|
8022
|
+
this._templatePickerLoaded || (await Bi(), this._templatePickerLoaded = !0), this._templatePickerOpen = !0;
|
|
8373
8023
|
}
|
|
8374
8024
|
_handleTemplateLoad(e) {
|
|
8375
8025
|
var o;
|
|
@@ -8380,7 +8030,7 @@ let _ = class extends g {
|
|
|
8380
8030
|
async _handleTemplateSave(e) {
|
|
8381
8031
|
e.stopPropagation();
|
|
8382
8032
|
const { name: t, description: o, category: r } = e.detail, i = this._resolveTemplateStorage(), n = (/* @__PURE__ */ new Date()).toISOString(), a = {
|
|
8383
|
-
id:
|
|
8033
|
+
id: wt(t),
|
|
8384
8034
|
name: t,
|
|
8385
8035
|
description: o,
|
|
8386
8036
|
category: r,
|
|
@@ -8389,21 +8039,21 @@ let _ = class extends g {
|
|
|
8389
8039
|
updatedAt: n
|
|
8390
8040
|
};
|
|
8391
8041
|
await i.save(a);
|
|
8392
|
-
const
|
|
8042
|
+
const u = this.renderRoot.querySelector(
|
|
8393
8043
|
"pigeon-template-picker"
|
|
8394
8044
|
);
|
|
8395
|
-
|
|
8045
|
+
u && await u.refresh(), this._templatePickerOpen = !1;
|
|
8396
8046
|
}
|
|
8397
8047
|
/* ------------------------------------------------------------------ */
|
|
8398
8048
|
/* Internal: state init & dispatch */
|
|
8399
8049
|
/* ------------------------------------------------------------------ */
|
|
8400
8050
|
_initState() {
|
|
8401
|
-
const e = this.document ?? this.config.doc ??
|
|
8402
|
-
t.some((r) => r.name ===
|
|
8051
|
+
const e = this.document ?? this.config.doc ?? zt(), t = this.config.plugins ?? [];
|
|
8052
|
+
t.some((r) => r.name === mt) || t.unshift(ft()), this._state = vt.create({ doc: e, plugins: t }), this._syncHistoryFlags();
|
|
8403
8053
|
}
|
|
8404
8054
|
_syncHistoryFlags() {
|
|
8405
|
-
const e = this._state.getPluginState(
|
|
8406
|
-
this._canUndo = e ?
|
|
8055
|
+
const e = this._state.getPluginState(mt);
|
|
8056
|
+
this._canUndo = e ? Mt(e) : !1, this._canRedo = e ? At(e) : !1;
|
|
8407
8057
|
}
|
|
8408
8058
|
/* ------------------------------------------------------------------ */
|
|
8409
8059
|
/* Internal: event emitters */
|
|
@@ -8484,7 +8134,7 @@ let _ = class extends g {
|
|
|
8484
8134
|
for (const r of o.columns)
|
|
8485
8135
|
if (r.blocks.find((n) => n.id === t)) {
|
|
8486
8136
|
const n = this._state.createTransaction();
|
|
8487
|
-
n.setSelection(
|
|
8137
|
+
n.setSelection(We(o.id, r.id, t)), this._dispatch(n), this._editingBlockId = t;
|
|
8488
8138
|
return;
|
|
8489
8139
|
}
|
|
8490
8140
|
}
|
|
@@ -8495,7 +8145,7 @@ let _ = class extends g {
|
|
|
8495
8145
|
const r = o.blocks.find((n) => n.id === e.detail.blockId);
|
|
8496
8146
|
if (!r) continue;
|
|
8497
8147
|
const i = r.values.content;
|
|
8498
|
-
typeof i == "string" && i !== e.detail.content &&
|
|
8148
|
+
typeof i == "string" && i !== e.detail.content && Ke(t.id, o.id, r.id, { content: e.detail.content })(this._state, this._dispatch), this._editingBlockId = null;
|
|
8499
8149
|
return;
|
|
8500
8150
|
}
|
|
8501
8151
|
this._editingBlockId = null;
|
|
@@ -8508,36 +8158,36 @@ let _ = class extends g {
|
|
|
8508
8158
|
for (const r of o.columns)
|
|
8509
8159
|
if (r.blocks.find((n) => n.id === t)) {
|
|
8510
8160
|
const n = this._state.createTransaction();
|
|
8511
|
-
n.setSelection(
|
|
8161
|
+
n.setSelection(We(o.id, r.id, t)), this._dispatch(n);
|
|
8512
8162
|
return;
|
|
8513
8163
|
}
|
|
8514
8164
|
}
|
|
8515
8165
|
_handleRowSelect(e) {
|
|
8516
8166
|
this._editingBlockId = null;
|
|
8517
8167
|
const t = this._state.createTransaction();
|
|
8518
|
-
t.setSelection(
|
|
8168
|
+
t.setSelection(_t(e.detail.rowId)), this._dispatch(t);
|
|
8519
8169
|
}
|
|
8520
8170
|
_handleColumnSelect(e) {
|
|
8521
8171
|
this._editingBlockId = null;
|
|
8522
8172
|
const t = this._state.createTransaction();
|
|
8523
|
-
t.setSelection(
|
|
8173
|
+
t.setSelection(Ft(e.detail.rowId, e.detail.columnId)), this._dispatch(t);
|
|
8524
8174
|
}
|
|
8525
8175
|
_handleBodySelect() {
|
|
8526
8176
|
this._editingBlockId = null;
|
|
8527
8177
|
const e = this._state.createTransaction();
|
|
8528
|
-
e.setSelection(
|
|
8178
|
+
e.setSelection(ht()), this._dispatch(e);
|
|
8529
8179
|
}
|
|
8530
8180
|
/* ------------------------------------------------------------------ */
|
|
8531
8181
|
/* Row action handlers */
|
|
8532
8182
|
/* ------------------------------------------------------------------ */
|
|
8533
8183
|
_handleRowMove(e) {
|
|
8534
|
-
|
|
8184
|
+
Ht(e.detail.rowId, e.detail.toIndex)(this._state, this._dispatch);
|
|
8535
8185
|
}
|
|
8536
8186
|
_handleRowDuplicate(e) {
|
|
8537
|
-
|
|
8187
|
+
ut(e.detail.rowId)(this._state, this._dispatch);
|
|
8538
8188
|
}
|
|
8539
8189
|
_handleRowDelete(e) {
|
|
8540
|
-
|
|
8190
|
+
gt(e.detail.rowId)(this._state, this._dispatch);
|
|
8541
8191
|
}
|
|
8542
8192
|
async _refreshSavedTab() {
|
|
8543
8193
|
var o;
|
|
@@ -8584,12 +8234,12 @@ let _ = class extends g {
|
|
|
8584
8234
|
_moveBlockSelection(e) {
|
|
8585
8235
|
const t = this._state.selection;
|
|
8586
8236
|
if (!t || t.type !== "block" || !t.blockId) return;
|
|
8587
|
-
const o = this._flattenBlockLocations(), r = o.findIndex((
|
|
8237
|
+
const o = this._flattenBlockLocations(), r = o.findIndex((u) => u.blockId === t.blockId);
|
|
8588
8238
|
if (r === -1) return;
|
|
8589
8239
|
const i = r + e;
|
|
8590
8240
|
if (i < 0 || i >= o.length) return;
|
|
8591
8241
|
const n = o[i], a = this._state.createTransaction();
|
|
8592
|
-
a.setSelection(
|
|
8242
|
+
a.setSelection(We(n.rowId, n.columnId, n.blockId)), this._dispatch(a);
|
|
8593
8243
|
}
|
|
8594
8244
|
_moveRowSelection(e) {
|
|
8595
8245
|
const t = this._state.selection;
|
|
@@ -8599,7 +8249,7 @@ let _ = class extends g {
|
|
|
8599
8249
|
const i = r + e;
|
|
8600
8250
|
if (i < 0 || i >= o.length) return;
|
|
8601
8251
|
const n = this._state.createTransaction();
|
|
8602
|
-
n.setSelection(
|
|
8252
|
+
n.setSelection(_t(o[i].id)), this._dispatch(n);
|
|
8603
8253
|
}
|
|
8604
8254
|
_findBlock(e, t, o) {
|
|
8605
8255
|
const r = this._state.doc.body.rows.find((n) => n.id === e);
|
|
@@ -8618,15 +8268,15 @@ let _ = class extends g {
|
|
|
8618
8268
|
/* DnD handlers */
|
|
8619
8269
|
/* ------------------------------------------------------------------ */
|
|
8620
8270
|
_handleRowDrop(e) {
|
|
8621
|
-
const { index: t, columnCount: o } = e.detail, r = Array.from({ length: o }, () =>
|
|
8622
|
-
|
|
8271
|
+
const { index: t, columnCount: o } = e.detail, r = Array.from({ length: o }, () => fe()), i = me(r);
|
|
8272
|
+
G(i, t)(this._state, this._dispatch);
|
|
8623
8273
|
}
|
|
8624
8274
|
_handleBlockDrop(e) {
|
|
8625
8275
|
const { rowId: t, columnId: o, index: r, dragData: i } = e.detail;
|
|
8626
8276
|
if (i.type === "palette-block" && i.blockType) {
|
|
8627
|
-
const n =
|
|
8628
|
-
|
|
8629
|
-
} else i.type === "existing-block" && i.blockId && i.rowId && i.columnId &&
|
|
8277
|
+
const n = Ee(i.blockType);
|
|
8278
|
+
oe(t, o, n, r)(this._state, this._dispatch);
|
|
8279
|
+
} else i.type === "existing-block" && i.blockId && i.rowId && i.columnId && Ut(
|
|
8630
8280
|
i.rowId,
|
|
8631
8281
|
i.columnId,
|
|
8632
8282
|
i.blockId,
|
|
@@ -8636,8 +8286,8 @@ let _ = class extends g {
|
|
|
8636
8286
|
)(this._state, this._dispatch);
|
|
8637
8287
|
}
|
|
8638
8288
|
_handleBlockDropNewRow(e) {
|
|
8639
|
-
const { blockType: t, rowIndex: o } = e.detail, r =
|
|
8640
|
-
|
|
8289
|
+
const { blockType: t, rowIndex: o } = e.detail, r = Ee(t), i = fe([r]), n = me([i]);
|
|
8290
|
+
G(n, o)(this._state, this._dispatch);
|
|
8641
8291
|
}
|
|
8642
8292
|
/**
|
|
8643
8293
|
* Keyboard equivalent of dragging a palette item onto the canvas: append the
|
|
@@ -8647,21 +8297,21 @@ let _ = class extends g {
|
|
|
8647
8297
|
_handlePaletteActivate(e) {
|
|
8648
8298
|
const { type: t, blockType: o, columnCount: r } = e.detail, i = this._state.doc.body.rows;
|
|
8649
8299
|
if (t === "palette-row") {
|
|
8650
|
-
const a = Array.from({ length: r }, () =>
|
|
8651
|
-
|
|
8300
|
+
const a = Array.from({ length: r }, () => fe());
|
|
8301
|
+
G(me(a), i.length)(this._state, this._dispatch);
|
|
8652
8302
|
return;
|
|
8653
8303
|
}
|
|
8654
8304
|
if (!o) return;
|
|
8655
|
-
const n =
|
|
8305
|
+
const n = Ee(o);
|
|
8656
8306
|
if (i.length > 0) {
|
|
8657
|
-
const a = i[i.length - 1],
|
|
8658
|
-
|
|
8307
|
+
const a = i[i.length - 1], u = a.columns[0];
|
|
8308
|
+
oe(a.id, u.id, n, u.blocks.length)(
|
|
8659
8309
|
this._state,
|
|
8660
8310
|
this._dispatch
|
|
8661
8311
|
);
|
|
8662
8312
|
} else {
|
|
8663
|
-
const a =
|
|
8664
|
-
|
|
8313
|
+
const a = fe([n]);
|
|
8314
|
+
G(me([a]), 0)(this._state, this._dispatch);
|
|
8665
8315
|
}
|
|
8666
8316
|
}
|
|
8667
8317
|
/* ------------------------------------------------------------------ */
|
|
@@ -8669,64 +8319,64 @@ let _ = class extends g {
|
|
|
8669
8319
|
/* ------------------------------------------------------------------ */
|
|
8670
8320
|
_handlePropertyChange(e) {
|
|
8671
8321
|
const { rowId: t, columnId: o, blockId: r, values: i } = e.detail;
|
|
8672
|
-
|
|
8322
|
+
Ke(t, o, r, i)(this._state, this._dispatch);
|
|
8673
8323
|
}
|
|
8674
8324
|
_handleRowPropertyChange(e) {
|
|
8675
8325
|
const { rowId: t, attributes: o } = e.detail;
|
|
8676
|
-
|
|
8326
|
+
Kt(t, o)(this._state, this._dispatch);
|
|
8677
8327
|
}
|
|
8678
8328
|
_handleRowLayoutChange(e) {
|
|
8679
|
-
const { rowId: t, ratios: o, columnCount: r } = e.detail, i = this._state.doc.body.rows.find((
|
|
8329
|
+
const { rowId: t, ratios: o, columnCount: r } = e.detail, i = this._state.doc.body.rows.find((b) => b.id === t);
|
|
8680
8330
|
if (!i) return;
|
|
8681
8331
|
const n = i.columns.length, a = r;
|
|
8682
8332
|
if (a > n)
|
|
8683
|
-
for (let
|
|
8684
|
-
|
|
8333
|
+
for (let b = 0; b < a - n; b++)
|
|
8334
|
+
Nt(t)(this._state, this._dispatch);
|
|
8685
8335
|
else if (a < n)
|
|
8686
|
-
for (let
|
|
8687
|
-
const
|
|
8688
|
-
if (
|
|
8689
|
-
const
|
|
8690
|
-
|
|
8336
|
+
for (let b = 0; b < n - a; b++) {
|
|
8337
|
+
const y = this._state.doc.body.rows.find((X) => X.id === t);
|
|
8338
|
+
if (y && y.columns.length > 1) {
|
|
8339
|
+
const X = y.columns[y.columns.length - 1];
|
|
8340
|
+
Wt(t, X.id)(this._state, this._dispatch);
|
|
8691
8341
|
}
|
|
8692
8342
|
}
|
|
8693
|
-
const
|
|
8694
|
-
|
|
8343
|
+
const u = this._state.doc.body.rows.find((b) => b.id === t);
|
|
8344
|
+
u && u.columns.length === o.length && qt(t, o)(this._state, this._dispatch);
|
|
8695
8345
|
}
|
|
8696
8346
|
_handleBodyPropertyChange(e) {
|
|
8697
8347
|
const { attribute: t, metaField: o, value: r } = e.detail, i = this._state.createTransaction();
|
|
8698
8348
|
if (t) {
|
|
8699
|
-
const a = this._state.doc.body.attributes[t],
|
|
8349
|
+
const a = this._state.doc.body.attributes[t], u = Ne(
|
|
8700
8350
|
"updateBodyAttribute",
|
|
8701
8351
|
`body.attributes.${t}`,
|
|
8702
|
-
(
|
|
8703
|
-
|
|
8352
|
+
(b) => {
|
|
8353
|
+
b.body.attributes[t] = r;
|
|
8704
8354
|
},
|
|
8705
|
-
(
|
|
8706
|
-
|
|
8355
|
+
(b) => {
|
|
8356
|
+
b.body.attributes[t] = a;
|
|
8707
8357
|
}
|
|
8708
8358
|
);
|
|
8709
|
-
i.addStep(
|
|
8359
|
+
i.addStep(u);
|
|
8710
8360
|
}
|
|
8711
8361
|
if (o) {
|
|
8712
|
-
const a = this._state.doc.metadata[o],
|
|
8362
|
+
const a = this._state.doc.metadata[o], u = Ne(
|
|
8713
8363
|
"updateMetadata",
|
|
8714
8364
|
`metadata.${o}`,
|
|
8715
|
-
(
|
|
8716
|
-
|
|
8365
|
+
(b) => {
|
|
8366
|
+
b.metadata[o] = r;
|
|
8717
8367
|
},
|
|
8718
|
-
(
|
|
8719
|
-
|
|
8368
|
+
(b) => {
|
|
8369
|
+
b.metadata[o] = a;
|
|
8720
8370
|
}
|
|
8721
8371
|
);
|
|
8722
|
-
i.addStep(
|
|
8372
|
+
i.addStep(u);
|
|
8723
8373
|
}
|
|
8724
8374
|
this._dispatch(i);
|
|
8725
8375
|
}
|
|
8726
8376
|
};
|
|
8727
|
-
|
|
8728
|
-
|
|
8729
|
-
|
|
8377
|
+
v.styles = [
|
|
8378
|
+
Vt,
|
|
8379
|
+
g`
|
|
8730
8380
|
:host {
|
|
8731
8381
|
display: flex;
|
|
8732
8382
|
flex-direction: column;
|
|
@@ -8752,103 +8402,103 @@ _.styles = [
|
|
|
8752
8402
|
}
|
|
8753
8403
|
`
|
|
8754
8404
|
];
|
|
8755
|
-
|
|
8405
|
+
m([
|
|
8756
8406
|
p({ type: Object })
|
|
8757
|
-
],
|
|
8758
|
-
|
|
8407
|
+
], v.prototype, "document", 2);
|
|
8408
|
+
m([
|
|
8759
8409
|
p({ type: String, reflect: !0 })
|
|
8760
|
-
],
|
|
8761
|
-
|
|
8410
|
+
], v.prototype, "theme", 2);
|
|
8411
|
+
m([
|
|
8762
8412
|
p({ attribute: !1 })
|
|
8763
|
-
],
|
|
8764
|
-
|
|
8413
|
+
], v.prototype, "themeOverrides", 2);
|
|
8414
|
+
m([
|
|
8765
8415
|
p({ type: Object })
|
|
8766
|
-
],
|
|
8767
|
-
|
|
8416
|
+
], v.prototype, "config", 2);
|
|
8417
|
+
m([
|
|
8768
8418
|
p({ type: Object })
|
|
8769
|
-
],
|
|
8770
|
-
|
|
8419
|
+
], v.prototype, "renderer", 2);
|
|
8420
|
+
m([
|
|
8771
8421
|
p({ type: Object })
|
|
8772
|
-
],
|
|
8773
|
-
|
|
8422
|
+
], v.prototype, "documentToMjml", 2);
|
|
8423
|
+
m([
|
|
8774
8424
|
p({ attribute: !1 })
|
|
8775
|
-
],
|
|
8776
|
-
|
|
8425
|
+
], v.prototype, "templateStorage", 2);
|
|
8426
|
+
m([
|
|
8777
8427
|
p({ attribute: !1 })
|
|
8778
|
-
],
|
|
8779
|
-
|
|
8780
|
-
|
|
8781
|
-
],
|
|
8782
|
-
|
|
8783
|
-
|
|
8784
|
-
],
|
|
8785
|
-
|
|
8786
|
-
|
|
8787
|
-
],
|
|
8788
|
-
|
|
8789
|
-
|
|
8790
|
-
],
|
|
8791
|
-
|
|
8792
|
-
|
|
8793
|
-
],
|
|
8794
|
-
|
|
8795
|
-
|
|
8796
|
-
],
|
|
8797
|
-
|
|
8798
|
-
|
|
8799
|
-
],
|
|
8800
|
-
|
|
8801
|
-
|
|
8802
|
-
],
|
|
8803
|
-
|
|
8804
|
-
|
|
8805
|
-
],
|
|
8806
|
-
|
|
8807
|
-
|
|
8808
|
-
],
|
|
8809
|
-
|
|
8810
|
-
|
|
8811
|
-
],
|
|
8428
|
+
], v.prototype, "assetStorage", 2);
|
|
8429
|
+
m([
|
|
8430
|
+
c()
|
|
8431
|
+
], v.prototype, "_state", 2);
|
|
8432
|
+
m([
|
|
8433
|
+
c()
|
|
8434
|
+
], v.prototype, "_canUndo", 2);
|
|
8435
|
+
m([
|
|
8436
|
+
c()
|
|
8437
|
+
], v.prototype, "_canRedo", 2);
|
|
8438
|
+
m([
|
|
8439
|
+
c()
|
|
8440
|
+
], v.prototype, "_device", 2);
|
|
8441
|
+
m([
|
|
8442
|
+
c()
|
|
8443
|
+
], v.prototype, "_fullscreen", 2);
|
|
8444
|
+
m([
|
|
8445
|
+
c()
|
|
8446
|
+
], v.prototype, "_previewOpen", 2);
|
|
8447
|
+
m([
|
|
8448
|
+
c()
|
|
8449
|
+
], v.prototype, "_templatePickerOpen", 2);
|
|
8450
|
+
m([
|
|
8451
|
+
c()
|
|
8452
|
+
], v.prototype, "_templatePickerLoaded", 2);
|
|
8453
|
+
m([
|
|
8454
|
+
c()
|
|
8455
|
+
], v.prototype, "_editingBlockId", 2);
|
|
8456
|
+
m([
|
|
8457
|
+
c()
|
|
8458
|
+
], v.prototype, "_activeBrandKit", 2);
|
|
8459
|
+
v = m([
|
|
8460
|
+
h("pigeon-editor")
|
|
8461
|
+
], v);
|
|
8812
8462
|
export {
|
|
8813
|
-
|
|
8814
|
-
|
|
8815
|
-
|
|
8816
|
-
|
|
8817
|
-
|
|
8818
|
-
|
|
8819
|
-
|
|
8820
|
-
|
|
8821
|
-
|
|
8822
|
-
|
|
8823
|
-
|
|
8824
|
-
|
|
8825
|
-
|
|
8826
|
-
|
|
8827
|
-
|
|
8828
|
-
|
|
8829
|
-
|
|
8830
|
-
|
|
8831
|
-
|
|
8832
|
-
|
|
8833
|
-
|
|
8834
|
-
|
|
8835
|
-
|
|
8836
|
-
|
|
8837
|
-
|
|
8838
|
-
|
|
8839
|
-
|
|
8840
|
-
|
|
8841
|
-
|
|
8842
|
-
|
|
8843
|
-
|
|
8844
|
-
|
|
8845
|
-
|
|
8846
|
-
|
|
8847
|
-
|
|
8848
|
-
|
|
8849
|
-
|
|
8850
|
-
|
|
8851
|
-
|
|
8852
|
-
|
|
8853
|
-
|
|
8463
|
+
Pe as PigeonAlignmentPicker,
|
|
8464
|
+
f as PigeonAssetManager,
|
|
8465
|
+
P as PigeonBodyPanel,
|
|
8466
|
+
ae as PigeonButtonBlock,
|
|
8467
|
+
N as PigeonButtonPanel,
|
|
8468
|
+
C as PigeonCanvas,
|
|
8469
|
+
le as PigeonColorPicker,
|
|
8470
|
+
O as PigeonColumn,
|
|
8471
|
+
we as PigeonDividerBlock,
|
|
8472
|
+
je as PigeonDropIndicator,
|
|
8473
|
+
v as PigeonEditor,
|
|
8474
|
+
se as PigeonHeroBlock,
|
|
8475
|
+
D as PigeonHeroPanel,
|
|
8476
|
+
Ce as PigeonHtmlBlock,
|
|
8477
|
+
xe as PigeonImageBlock,
|
|
8478
|
+
R as PigeonImagePanel,
|
|
8479
|
+
ye as PigeonLayers,
|
|
8480
|
+
K as PigeonMergeTagPicker,
|
|
8481
|
+
Ie as PigeonNavBarBlock,
|
|
8482
|
+
Z as PigeonNavBarPanel,
|
|
8483
|
+
k as PigeonPalette,
|
|
8484
|
+
U as PigeonPaletteItem,
|
|
8485
|
+
x as PigeonPreview,
|
|
8486
|
+
w as PigeonProperties,
|
|
8487
|
+
E as PigeonRow,
|
|
8488
|
+
Re as PigeonRowPanel,
|
|
8489
|
+
j as PigeonSliderInput,
|
|
8490
|
+
ke as PigeonSocialBlock,
|
|
8491
|
+
$e as PigeonSpacerBlock,
|
|
8492
|
+
Te as PigeonSpacingInput,
|
|
8493
|
+
Ni as PigeonTemplatePicker,
|
|
8494
|
+
ne as PigeonTextBlock,
|
|
8495
|
+
I as PigeonTextPanel,
|
|
8496
|
+
H as PigeonToolbar,
|
|
8497
|
+
co as calculateBlockDropIndex,
|
|
8498
|
+
po as calculateRowDropIndex,
|
|
8499
|
+
Be as clearDragData,
|
|
8500
|
+
_e as getDragData,
|
|
8501
|
+
Hi as readDragTransfer,
|
|
8502
|
+
Gt as setDragData,
|
|
8503
|
+
Qe as writeDragTransfer
|
|
8854
8504
|
};
|