@orangelogic/design-system 2.19.0-pr77202.21 → 2.19.0-pr77233.3
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.
|
@@ -142036,7 +142036,7 @@ var zVt = Object.defineProperty, FVt = Object.getOwnPropertyDescriptor, Ur = (n,
|
|
|
142036
142036
|
};
|
|
142037
142037
|
let Ar = class extends Fn {
|
|
142038
142038
|
constructor() {
|
|
142039
|
-
super(), this.localize = new nr(this), this.configsController = new ca(this.localize), this.initialData = "", this.device = "desktop", this.devices = HQ, this.autoInit = !1, this.pageId = "", this.allowDuplicateBlocks = !1, this.mode = qd.Template, this.contentBuilder = null, this.ready = !1, this.editingComponent = null, this.isGalleryConfigOpen = !1, this.hoveredComponent = void 0, this.hoveredComponentPlacement = "top", this.defaultRowGap = 0, this.containerDropdowns = [], this.containerDropdownStateMap = {}, this.distance = void 0, this.toolbar = [], this.toolbarActive = !1, this.childSelected = void 0, this.mousePosition = { x: 0, y: 0 }, this._teamSpaceRoles = [], this.canvasDocument = null, this._dsm = null, this.hasBoundUpdate = !1, this.newlyAddedComponentTimeout = null, this.initializeCustomFrame = eLt(), this.containerDropdownObservers = [], this.nextMapHoveredBadgeState = null, this.deselectAll = this.deselectAll.bind(this), this.handleCanvasClick = this.handleCanvasClick.bind(this), this.handleCanvasKeydown = this.handleCanvasKeydown.bind(this), this.handleDataSourceChange = this.handleDataSourceChange.bind(this), this.handleCanvasMouseMove = this.handleCanvasMouseMove.bind(this), this.handleTemplateManagerUpdated = this.handleTemplateManagerUpdated.bind(this), this.handleCanvasScroll = this.handleCanvasScroll.bind(this);
|
|
142039
|
+
super(), this.localize = new nr(this), this.configsController = new ca(this.localize), this.initialData = "", this.device = "desktop", this.devices = HQ, this.autoInit = !1, this.pageId = "", this.allowDuplicateBlocks = !1, this.mode = qd.Template, this.contentBuilder = null, this.ready = !1, this.editingComponent = null, this.isGalleryConfigOpen = !1, this.hoveredComponent = void 0, this.hoveredComponentPlacement = "top", this.defaultRowGap = 0, this.containerDropdowns = [], this.containerDropdownStateMap = {}, this.distance = void 0, this.toolbar = [], this.toolbarActive = !1, this.childSelected = void 0, this.mousePosition = { x: 0, y: 0 }, this._teamSpaceRoles = [], this.canvasDocument = null, this._dsm = null, this.hasBoundUpdate = !1, this.newlyAddedComponentTimeout = null, this.initializeCustomFrame = eLt(), this.containerDropdownObservers = [], this.nextMapHoveredBadgeState = null, this.deselectAll = this.deselectAll.bind(this), this.handleCanvasClick = this.handleCanvasClick.bind(this), this.handleRootToolbarRightClick = this.handleRootToolbarRightClick.bind(this), this.handleCanvasKeydown = this.handleCanvasKeydown.bind(this), this.handleDataSourceChange = this.handleDataSourceChange.bind(this), this.handleCanvasMouseMove = this.handleCanvasMouseMove.bind(this), this.handleTemplateManagerUpdated = this.handleTemplateManagerUpdated.bind(this), this.handleCanvasScroll = this.handleCanvasScroll.bind(this);
|
|
142040
142040
|
}
|
|
142041
142041
|
get teamSpaceRoles() {
|
|
142042
142042
|
return this._teamSpaceRoles;
|
|
@@ -142340,6 +142340,10 @@ let Ar = class extends Fn {
|
|
|
142340
142340
|
const n = this.contentBuilder?.getSelected(), e = this.childSelected;
|
|
142341
142341
|
n && !e && this.contentBuilder?.trigger("component:selected", n), this.toggleToolbarAndBadge();
|
|
142342
142342
|
}
|
|
142343
|
+
handleRootToolbarRightClick(n) {
|
|
142344
|
+
const e = n.target;
|
|
142345
|
+
n.button === 2 && e instanceof Element && e.closest(".gjs-toolbar") && (n.preventDefault(), n.stopImmediatePropagation());
|
|
142346
|
+
}
|
|
142343
142347
|
handleCanvasClick(n) {
|
|
142344
142348
|
n.target.closest("[data-cms5-page-viewer__page-content]") || this.deselectAll();
|
|
142345
142349
|
}
|
|
@@ -142504,27 +142508,31 @@ let Ar = class extends Fn {
|
|
|
142504
142508
|
return;
|
|
142505
142509
|
this.contentBuilder.Canvas.getFrameEl().setAttribute("title", "content-builder-frame"), this.updateFrameSize(), this._teamSpaceRoles = await this.fetchTeamSpaceRoles();
|
|
142506
142510
|
}), this.contentBuilder?.on("load", async (t) => {
|
|
142507
|
-
|
|
142508
|
-
|
|
142509
|
-
|
|
142511
|
+
this.contentBuilder?.getEl()?.addEventListener(
|
|
142512
|
+
"mousedown",
|
|
142513
|
+
this.handleRootToolbarRightClick,
|
|
142514
|
+
!0
|
|
142515
|
+
), t.UndoManager.stop();
|
|
142516
|
+
const i = this.canvasDocument?.getElementById("Form1");
|
|
142517
|
+
i && i.addEventListener("scroll", this.handleCanvasScroll);
|
|
142510
142518
|
try {
|
|
142511
142519
|
t.getWrapper()?.set({
|
|
142512
142520
|
highlightable: !1,
|
|
142513
142521
|
hoverable: !1,
|
|
142514
142522
|
selectable: !1
|
|
142515
142523
|
});
|
|
142516
|
-
const
|
|
142524
|
+
const o = t.getWrapper(), a = t.Canvas.getBody().querySelector(
|
|
142517
142525
|
"[data-cms5-page-viewer]"
|
|
142518
142526
|
);
|
|
142519
|
-
if (!
|
|
142527
|
+
if (!o)
|
|
142520
142528
|
return;
|
|
142521
|
-
let
|
|
142522
|
-
if (
|
|
142523
|
-
const
|
|
142524
|
-
|
|
142529
|
+
let s = "12px";
|
|
142530
|
+
if (a) {
|
|
142531
|
+
const c = getComputedStyle(a).getPropertyValue("--row-gap").trim();
|
|
142532
|
+
c && (s = c);
|
|
142525
142533
|
}
|
|
142526
|
-
const
|
|
142527
|
-
this.defaultRowGap = Number.isFinite(
|
|
142534
|
+
const l = Number.parseFloat(s || "12px");
|
|
142535
|
+
this.defaultRowGap = Number.isFinite(l) ? l : 12, o.findType(ot.Column).length === 0 ? t.addComponents({
|
|
142528
142536
|
copyable: !1,
|
|
142529
142537
|
editable: !1,
|
|
142530
142538
|
highlightable: !1,
|
|
@@ -142534,12 +142542,12 @@ let Ar = class extends Fn {
|
|
|
142534
142542
|
style: {
|
|
142535
142543
|
"--flex-content": "none",
|
|
142536
142544
|
"--padding": "4px",
|
|
142537
|
-
"--row-gap":
|
|
142545
|
+
"--row-gap": s
|
|
142538
142546
|
},
|
|
142539
142547
|
toolbar: [],
|
|
142540
142548
|
type: ot.Column
|
|
142541
|
-
}) :
|
|
142542
|
-
|
|
142549
|
+
}) : o.findType(ot.Column)?.forEach((c, d) => {
|
|
142550
|
+
d === 0 && c.set({
|
|
142543
142551
|
copyable: !1,
|
|
142544
142552
|
editable: !1,
|
|
142545
142553
|
highlightable: !1,
|
|
@@ -142549,14 +142557,14 @@ let Ar = class extends Fn {
|
|
|
142549
142557
|
style: {
|
|
142550
142558
|
"--flex-content": "none",
|
|
142551
142559
|
"--padding": "4px",
|
|
142552
|
-
"--row-gap":
|
|
142560
|
+
"--row-gap": s
|
|
142553
142561
|
}
|
|
142554
|
-
}),
|
|
142562
|
+
}), c.set({
|
|
142555
142563
|
draggable: '[data-gjs-type="BlockColumns"]',
|
|
142556
142564
|
droppable: '[data-gjs-type="BlockButton"], [data-gjs-type="BlockColumns"], [data-gjs-type="BlockDivider"], [data-gjs-type="BlockHeader"], [data-gjs-type="BlockImage"], [data-gjs-type="BlockText"], [data-gjs-type="BlockVideo"], [data-gjs-type="BlockFontKit"], [data-gjs-type="BlockCarousel"], [data-gjs-type="BlockGallery"], [data-gjs-type="BlockTabs"], [data-gjs-type="BlockAccordion"], [data-gjs-type="BlockSearchBox"], [data-gjs-type="BlockColorSwatches"]'
|
|
142557
142565
|
});
|
|
142558
|
-
}), this.dsm?.getAll().forEach((
|
|
142559
|
-
|
|
142566
|
+
}), this.dsm?.getAll().forEach((c) => {
|
|
142567
|
+
c.records.on("add", this.handleDataSourceChange);
|
|
142560
142568
|
}), this.updateDataSourceEntries(), this.resetDirtyCount();
|
|
142561
142569
|
} finally {
|
|
142562
142570
|
t.UndoManager.start();
|
|
@@ -142731,12 +142739,17 @@ let Ar = class extends Fn {
|
|
|
142731
142739
|
"cx-template-manager-updated",
|
|
142732
142740
|
this.handleTemplateManagerUpdated
|
|
142733
142741
|
);
|
|
142734
|
-
const
|
|
142735
|
-
|
|
142742
|
+
const e = this.canvasDocument?.getElementById("Form1");
|
|
142743
|
+
e && e.removeEventListener("scroll", this.handleCanvasScroll);
|
|
142736
142744
|
}
|
|
142737
|
-
|
|
142738
|
-
|
|
142739
|
-
|
|
142745
|
+
const n = this.contentBuilder?.getEl();
|
|
142746
|
+
n && n.removeEventListener(
|
|
142747
|
+
"mousedown",
|
|
142748
|
+
this.handleRootToolbarRightClick,
|
|
142749
|
+
!0
|
|
142750
|
+
), this.contentBuilder?.destroy(), this.hasBoundUpdate = !1, this.newlyAddedComponentTimeout && clearTimeout(this.newlyAddedComponentTimeout);
|
|
142751
|
+
for (const e of this.containerDropdownObservers)
|
|
142752
|
+
e.disconnect?.();
|
|
142740
142753
|
this.containerDropdownObservers = [];
|
|
142741
142754
|
}
|
|
142742
142755
|
handleBuilderPropsChange() {
|
package/library/package.json
CHANGED
|
@@ -210,6 +210,7 @@ export default class CxContentBuilder extends CortexElement {
|
|
|
210
210
|
private handleCanvasMouseMove;
|
|
211
211
|
private handleCanvasScroll;
|
|
212
212
|
private handleHorizontalScroll;
|
|
213
|
+
private handleRootToolbarRightClick;
|
|
213
214
|
private handleCanvasClick;
|
|
214
215
|
private handleCanvasKeydown;
|
|
215
216
|
private handleTemplateManagerUpdated;
|