@themarioga/grid-editor 8.1.0 → 8.2.0
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/CHANGELOG.md +13 -0
- package/README.md +11 -0
- package/dist/grideditor.bundle.min.js +3 -3
- package/dist/grideditor.css +9 -0
- package/dist/grideditor.d.ts +14 -0
- package/dist/grideditor.esm.js +110 -8
- package/dist/grideditor.jquery.js +3 -1
- package/dist/grideditor.jquery.min.js +1 -1
- package/dist/grideditor.jquery.min.js.map +2 -2
- package/dist/grideditor.js +110 -8
- package/dist/grideditor.min.css +1 -1
- package/dist/grideditor.min.css.map +1 -1
- package/dist/grideditor.min.js +2 -2
- package/dist/grideditor.min.js.map +3 -3
- package/docs/events.md +7 -0
- package/package.json +1 -1
- package/src/js/grideditor.jquery.js +2 -0
- package/src/js/grideditor.js +108 -5
- package/src/less/grideditor.less +10 -0
- package/types/grideditor.d.ts +14 -0
package/dist/grideditor.d.ts
CHANGED
|
@@ -107,6 +107,8 @@ export interface GridEditorOptions {
|
|
|
107
107
|
text_tools?: HostTool[];
|
|
108
108
|
drag_handle?: 'tool' | 'drawer';
|
|
109
109
|
toolbar_drag?: 'auto' | boolean;
|
|
110
|
+
/** A click in a column or a section makes it where the toolbar's buttons add. Default false. */
|
|
111
|
+
active_target?: boolean;
|
|
110
112
|
/** The plugins to use, of any kind; null is every one loaded. */
|
|
111
113
|
plugins?: string[] | null;
|
|
112
114
|
/** The text editors offered, in order. */
|
|
@@ -218,6 +220,13 @@ export interface ViewChangePayload {
|
|
|
218
220
|
to: View;
|
|
219
221
|
}
|
|
220
222
|
|
|
223
|
+
/** The active target changed: the column or region the toolbar adds to, or null for the canvas. */
|
|
224
|
+
export interface TargetChangePayload {
|
|
225
|
+
canvas: HTMLElement;
|
|
226
|
+
target: HTMLElement | null;
|
|
227
|
+
from: HTMLElement | null;
|
|
228
|
+
}
|
|
229
|
+
|
|
221
230
|
/** The events, by name, with their payloads. Adding fires a specific name and the generic one. */
|
|
222
231
|
export interface GridEditorEventMap {
|
|
223
232
|
'grideditor:before-add': Payload;
|
|
@@ -255,6 +264,7 @@ export interface GridEditorEventMap {
|
|
|
255
264
|
'grideditor:after-copy': Payload;
|
|
256
265
|
'grideditor:popup-orphan': PopupOrphanPayload;
|
|
257
266
|
'grideditor:view-change': ViewChangePayload;
|
|
267
|
+
'grideditor:target-change': TargetChangePayload;
|
|
258
268
|
}
|
|
259
269
|
|
|
260
270
|
/** An event the editor dispatches on its canvas: a CustomEvent whose detail is the payload. */
|
|
@@ -343,6 +353,10 @@ export declare class GridEditor {
|
|
|
343
353
|
/** Take the editor off: the markup stays, everything else goes. */
|
|
344
354
|
destroy(): this;
|
|
345
355
|
changeView(view: View): this;
|
|
356
|
+
/** The column or region the toolbar adds to, or null. Null without active_target. */
|
|
357
|
+
getActiveTarget(): HTMLElement | null;
|
|
358
|
+
/** Make a column or region, or the first a selector matches, where the toolbar adds; null for none. */
|
|
359
|
+
setActiveTarget(target: HTMLElement | string | null): this;
|
|
346
360
|
getView(): View;
|
|
347
361
|
setLocale(code: string): this;
|
|
348
362
|
createRow(layout?: RowLayout, options?: Placement): HTMLElement | null;
|
package/dist/grideditor.esm.js
CHANGED
|
@@ -325,7 +325,9 @@ var METHODS = {
|
|
|
325
325
|
addAccordionItem: { value: true },
|
|
326
326
|
setLocale: {},
|
|
327
327
|
getUtility: { value: true },
|
|
328
|
-
setUtility: { value: true }
|
|
328
|
+
setUtility: { value: true },
|
|
329
|
+
getActiveTarget: { value: true },
|
|
330
|
+
setActiveTarget: {}
|
|
329
331
|
};
|
|
330
332
|
var PLACEMENTS = ["appendTo", "prependTo", "insertAfter", "insertBefore"];
|
|
331
333
|
var BREAKPOINTS = [
|
|
@@ -568,6 +570,8 @@ function build(instance, baseElem, optionsOrMethod) {
|
|
|
568
570
|
// 'tool' for the move tool, 'drawer' for the whole drawer
|
|
569
571
|
"toolbar_drag": "auto",
|
|
570
572
|
// Drag the toolbar's buttons onto the canvas. 'auto' follows drag_handle
|
|
573
|
+
"active_target": false,
|
|
574
|
+
// A click in a column makes it where the toolbar's buttons add
|
|
571
575
|
"element_tools": [],
|
|
572
576
|
// Host tools on element drawers, same shape as row_tools
|
|
573
577
|
"element_classes": [],
|
|
@@ -629,6 +633,7 @@ function build(instance, baseElem, optionsOrMethod) {
|
|
|
629
633
|
var sizePicker = null;
|
|
630
634
|
var sourceOpen = false;
|
|
631
635
|
var dropMarker = null;
|
|
636
|
+
var activeTarget = null;
|
|
632
637
|
var warnedHere = {};
|
|
633
638
|
var sortables = [];
|
|
634
639
|
var instanceId = ++editorCounter;
|
|
@@ -1033,6 +1038,34 @@ function build(instance, baseElem, optionsOrMethod) {
|
|
|
1033
1038
|
e.preventDefault();
|
|
1034
1039
|
}
|
|
1035
1040
|
}, signal);
|
|
1041
|
+
if (settings.active_target) {
|
|
1042
|
+
var pressed = null;
|
|
1043
|
+
canvas.addEventListener("pointerdown", function(e) {
|
|
1044
|
+
pressed = { x: e.clientX, y: e.clientY };
|
|
1045
|
+
}, signal);
|
|
1046
|
+
canvas.addEventListener("click", function(e) {
|
|
1047
|
+
var from = pressed;
|
|
1048
|
+
pressed = null;
|
|
1049
|
+
if (!hasClass(canvas, "ge-editing")) {
|
|
1050
|
+
return;
|
|
1051
|
+
}
|
|
1052
|
+
if (from && Math.abs(e.clientX - from.x) + Math.abs(e.clientY - from.y) > settings.drag.threshold) {
|
|
1053
|
+
return;
|
|
1054
|
+
}
|
|
1055
|
+
var region = closest(e.target, targetSelector());
|
|
1056
|
+
changeTarget(region && region !== canvas && canvas.contains(region) ? region : null);
|
|
1057
|
+
}, signal);
|
|
1058
|
+
document.addEventListener("keydown", function(e) {
|
|
1059
|
+
if (e.key !== "Escape" || !activeTarget || openSettingsState || dialogState) {
|
|
1060
|
+
return;
|
|
1061
|
+
}
|
|
1062
|
+
var focus = document.activeElement;
|
|
1063
|
+
if (focus && (is(focus, "input, textarea, select") || focus.isContentEditable)) {
|
|
1064
|
+
return;
|
|
1065
|
+
}
|
|
1066
|
+
changeTarget(null);
|
|
1067
|
+
}, signal);
|
|
1068
|
+
}
|
|
1036
1069
|
}
|
|
1037
1070
|
function textReady(block) {
|
|
1038
1071
|
if (!is(block, ".ge-content") || !canvas.contains(block)) {
|
|
@@ -1058,6 +1091,10 @@ function build(instance, baseElem, optionsOrMethod) {
|
|
|
1058
1091
|
"data-ge-layout": grouped ? JSON.stringify(layout) : layout.join(",")
|
|
1059
1092
|
});
|
|
1060
1093
|
btn.addEventListener("click", function() {
|
|
1094
|
+
if (activeTarget) {
|
|
1095
|
+
addToTarget(btn, "tool");
|
|
1096
|
+
return;
|
|
1097
|
+
}
|
|
1061
1098
|
var row = rowFromLayoutValue(layout);
|
|
1062
1099
|
var added = addNode("row", row, function() {
|
|
1063
1100
|
canvas.appendChild(row);
|
|
@@ -1086,6 +1123,10 @@ function build(instance, baseElem, optionsOrMethod) {
|
|
|
1086
1123
|
);
|
|
1087
1124
|
attr(button, { "data-ge-toolbar": "container", "data-ge-container-type": type });
|
|
1088
1125
|
button.addEventListener("click", function() {
|
|
1126
|
+
if (activeTarget) {
|
|
1127
|
+
addToTarget(button, "tool");
|
|
1128
|
+
return;
|
|
1129
|
+
}
|
|
1089
1130
|
var row = createRow();
|
|
1090
1131
|
var column = row.appendChild(createColumn(MAX_COL_SIZE));
|
|
1091
1132
|
var container = column.appendChild(definition.create({}));
|
|
@@ -1179,6 +1220,10 @@ function build(instance, baseElem, optionsOrMethod) {
|
|
|
1179
1220
|
"data-ge-item": index
|
|
1180
1221
|
});
|
|
1181
1222
|
button.addEventListener("click", function() {
|
|
1223
|
+
if (activeTarget) {
|
|
1224
|
+
addToTarget(button, item.source || "tool");
|
|
1225
|
+
return;
|
|
1226
|
+
}
|
|
1182
1227
|
var made = item.create();
|
|
1183
1228
|
var placed = item.inColumn ? inRowOfItsOwn(made) : made;
|
|
1184
1229
|
var added = addNode(item.kind, made, function() {
|
|
@@ -1284,7 +1329,7 @@ function build(instance, baseElem, optionsOrMethod) {
|
|
|
1284
1329
|
});
|
|
1285
1330
|
return { region, before };
|
|
1286
1331
|
}
|
|
1287
|
-
function insertFeatureFromToolbar(button, where) {
|
|
1332
|
+
function insertFeatureFromToolbar(button, where, source) {
|
|
1288
1333
|
var item = FEATURES[button.getAttribute("data-ge-feature")].toolbar[parseInt(button.getAttribute("data-ge-item"), 10)];
|
|
1289
1334
|
var made = item.create();
|
|
1290
1335
|
var placed = made;
|
|
@@ -1303,7 +1348,7 @@ function build(instance, baseElem, optionsOrMethod) {
|
|
|
1303
1348
|
} else {
|
|
1304
1349
|
where.region.appendChild(placed);
|
|
1305
1350
|
}
|
|
1306
|
-
}, { parent: where.region, source: item.source || "dragdrop" });
|
|
1351
|
+
}, { parent: where.region, source: item.source || source || "dragdrop" });
|
|
1307
1352
|
}
|
|
1308
1353
|
function inRowOfItsOwn(node) {
|
|
1309
1354
|
var row = createRow();
|
|
@@ -1330,9 +1375,9 @@ function build(instance, baseElem, optionsOrMethod) {
|
|
|
1330
1375
|
dropMarker.remove();
|
|
1331
1376
|
}
|
|
1332
1377
|
}
|
|
1333
|
-
function insertFromToolbar(button, where) {
|
|
1378
|
+
function insertFromToolbar(button, where, source) {
|
|
1334
1379
|
if (button.getAttribute("data-ge-toolbar") === "feature") {
|
|
1335
|
-
return insertFeatureFromToolbar(button, where);
|
|
1380
|
+
return insertFeatureFromToolbar(button, where, source);
|
|
1336
1381
|
}
|
|
1337
1382
|
var container = button.getAttribute("data-ge-toolbar") === "container";
|
|
1338
1383
|
var type = button.getAttribute("data-ge-container-type");
|
|
@@ -1347,7 +1392,7 @@ function build(instance, baseElem, optionsOrMethod) {
|
|
|
1347
1392
|
} else {
|
|
1348
1393
|
where.region.appendChild(placed);
|
|
1349
1394
|
}
|
|
1350
|
-
}, { parent: where.region, source: "dragdrop" });
|
|
1395
|
+
}, { parent: where.region, source: source || "dragdrop" });
|
|
1351
1396
|
}
|
|
1352
1397
|
function widthFamily() {
|
|
1353
1398
|
var values = [];
|
|
@@ -1587,6 +1632,7 @@ function build(instance, baseElem, optionsOrMethod) {
|
|
|
1587
1632
|
}
|
|
1588
1633
|
function openSource() {
|
|
1589
1634
|
deinit();
|
|
1635
|
+
changeTarget(null);
|
|
1590
1636
|
htmlTextArea.style.height = 0.8 * document.documentElement.clientHeight + "px";
|
|
1591
1637
|
htmlTextArea.value = canvas.innerHTML;
|
|
1592
1638
|
show(htmlTextArea);
|
|
@@ -1602,6 +1648,32 @@ function build(instance, baseElem, optionsOrMethod) {
|
|
|
1602
1648
|
init();
|
|
1603
1649
|
hide(htmlTextArea);
|
|
1604
1650
|
}
|
|
1651
|
+
function targetSelector() {
|
|
1652
|
+
return [".column"].concat(pluginHooks("regions")).join(", ");
|
|
1653
|
+
}
|
|
1654
|
+
function isTarget(node) {
|
|
1655
|
+
return !!node && node !== canvas && canvas.contains(node) && is(node, targetSelector());
|
|
1656
|
+
}
|
|
1657
|
+
function changeTarget(node) {
|
|
1658
|
+
if (node === activeTarget) {
|
|
1659
|
+
return;
|
|
1660
|
+
}
|
|
1661
|
+
var from = activeTarget;
|
|
1662
|
+
if (from) {
|
|
1663
|
+
removeClass(from, "ge-active-target");
|
|
1664
|
+
}
|
|
1665
|
+
activeTarget = node;
|
|
1666
|
+
if (node && hasClass(canvas, "ge-editing")) {
|
|
1667
|
+
addClass(node, "ge-active-target");
|
|
1668
|
+
}
|
|
1669
|
+
emit("target-change", { canvas, target: node, from });
|
|
1670
|
+
}
|
|
1671
|
+
function addToTarget(button, source) {
|
|
1672
|
+
var made = insertFromToolbar(button, { region: activeTarget, before: null }, source);
|
|
1673
|
+
if (made && made.scrollIntoView) {
|
|
1674
|
+
made.scrollIntoView({ behavior: "smooth" });
|
|
1675
|
+
}
|
|
1676
|
+
}
|
|
1605
1677
|
function init() {
|
|
1606
1678
|
if (openSettingsState && !attached(openSettingsState.node)) {
|
|
1607
1679
|
closeSettings();
|
|
@@ -1625,10 +1697,18 @@ function build(instance, baseElem, optionsOrMethod) {
|
|
|
1625
1697
|
makeResizable();
|
|
1626
1698
|
switchLayout(curView);
|
|
1627
1699
|
refreshPreviews(canvas);
|
|
1700
|
+
if (activeTarget && !canvas.contains(activeTarget)) {
|
|
1701
|
+
changeTarget(null);
|
|
1702
|
+
} else if (activeTarget) {
|
|
1703
|
+
addClass(activeTarget, "ge-active-target");
|
|
1704
|
+
}
|
|
1628
1705
|
}
|
|
1629
1706
|
function deinit() {
|
|
1630
1707
|
closeSettings();
|
|
1631
1708
|
removeClass(canvas, "ge-editing ge-drag-drawer ge-dropping");
|
|
1709
|
+
if (activeTarget) {
|
|
1710
|
+
removeClass(activeTarget, "ge-active-target");
|
|
1711
|
+
}
|
|
1632
1712
|
plugins("onBeforeDeinit");
|
|
1633
1713
|
closeSizePicker();
|
|
1634
1714
|
hideDropMarker();
|
|
@@ -1670,6 +1750,7 @@ function build(instance, baseElem, optionsOrMethod) {
|
|
|
1670
1750
|
closeSource();
|
|
1671
1751
|
}
|
|
1672
1752
|
deinit();
|
|
1753
|
+
activeTarget = null;
|
|
1673
1754
|
removeConfirmModal();
|
|
1674
1755
|
removeSettingsPanels();
|
|
1675
1756
|
removeDialog();
|
|
@@ -4046,6 +4127,23 @@ function build(instance, baseElem, optionsOrMethod) {
|
|
|
4046
4127
|
return featureMethods[name].apply(null, arguments);
|
|
4047
4128
|
};
|
|
4048
4129
|
}
|
|
4130
|
+
function apiSetActiveTarget(value) {
|
|
4131
|
+
if (!settings.active_target) {
|
|
4132
|
+
warnOnceHere("active_target", "setActiveTarget needs the active_target setting: without it, it does nothing");
|
|
4133
|
+
return;
|
|
4134
|
+
}
|
|
4135
|
+
if (value === null || value === void 0) {
|
|
4136
|
+
changeTarget(null);
|
|
4137
|
+
return;
|
|
4138
|
+
}
|
|
4139
|
+
var node = nodeFrom(value);
|
|
4140
|
+
if (!isTarget(node)) {
|
|
4141
|
+
var named = typeof value === "string" ? value : node ? "<" + node.tagName.toLowerCase() + ">" : String(value);
|
|
4142
|
+
warn("setActiveTarget: " + named + " is not a column or a region of the canvas");
|
|
4143
|
+
return;
|
|
4144
|
+
}
|
|
4145
|
+
changeTarget(node);
|
|
4146
|
+
}
|
|
4049
4147
|
var own = {
|
|
4050
4148
|
getHtml,
|
|
4051
4149
|
getPlainHtml,
|
|
@@ -4079,7 +4177,11 @@ function build(instance, baseElem, optionsOrMethod) {
|
|
|
4079
4177
|
},
|
|
4080
4178
|
setLocale,
|
|
4081
4179
|
getUtility,
|
|
4082
|
-
setUtility
|
|
4180
|
+
setUtility,
|
|
4181
|
+
getActiveTarget: function() {
|
|
4182
|
+
return settings.active_target ? activeTarget : null;
|
|
4183
|
+
},
|
|
4184
|
+
setActiveTarget: apiSetActiveTarget
|
|
4083
4185
|
};
|
|
4084
4186
|
Object.keys(own).forEach(function(name) {
|
|
4085
4187
|
var value = !!(METHODS[name] && METHODS[name].value);
|
|
@@ -4118,7 +4220,7 @@ GridEditor.t = translate;
|
|
|
4118
4220
|
GridEditor._plainHtml = plainHtml;
|
|
4119
4221
|
GridEditor.Sortable = null;
|
|
4120
4222
|
GridEditor.bootstrap = null;
|
|
4121
|
-
GridEditor.version = false ? "dev" : "8.
|
|
4223
|
+
GridEditor.version = false ? "dev" : "8.2.0";
|
|
4122
4224
|
GridEditor.locales = {
|
|
4123
4225
|
en: {
|
|
4124
4226
|
"tool.move": "Move",
|
|
@@ -45,7 +45,9 @@
|
|
|
45
45
|
addAccordionItem: { value: true },
|
|
46
46
|
setLocale: {},
|
|
47
47
|
getUtility: { value: true },
|
|
48
|
-
setUtility: { value: true }
|
|
48
|
+
setUtility: { value: true },
|
|
49
|
+
getActiveTarget: { value: true },
|
|
50
|
+
setActiveTarget: {}
|
|
49
51
|
};
|
|
50
52
|
var TOOL_SETTINGS = [
|
|
51
53
|
"row_tools",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var u=window.GridEditor;if(!u||typeof u.get!="function")throw new Error("grid-editor: load grideditor.js (or grideditor.bundle.min.js) before its plugins, its locales and grideditor.jquery.js");var i=window.jQuery,
|
|
1
|
+
(()=>{var u=window.GridEditor;if(!u||typeof u.get!="function")throw new Error("grid-editor: load grideditor.js (or grideditor.bundle.min.js) before its plugins, its locales and grideditor.jquery.js");var i=window.jQuery,T=function(a,o){return u.t({locale:"en"},a,o)},m={};function b(a,o){m[a]||(m[a]=!0,window.console&&window.console.warn&&window.console.warn("grid-editor: "+o))}!i||!i.fn?b("no-jquery",T("warning.adapter_no_jquery")):x();function x(){var a={getHtml:{value:!0},getPlainHtml:{value:!0},init:{},deinit:{},reset:{},destroy:{},changeView:{},getView:{value:!0},createRow:{value:!0},createColumn:{value:!0},createElement:{value:!0},createText:{value:!0},createSection:{value:!0},createContainer:{value:!0},addTab:{value:!0},addAccordionItem:{value:!0},setLocale:{},getUtility:{value:!0},setUtility:{value:!0},getActiveTarget:{value:!0},setActiveTarget:{}},o=["row_tools","col_tools","element_tools","container_tools","tab_tools","accordion_tools","text_tools"];function g(r){return!!r&&r.nodeType===1}function l(r){return r instanceof i?r[0]||null:r}function h(r){if(r instanceof i)return l(r);if(r&&typeof r=="object"&&!Array.isArray(r)&&!g(r)){var t={};return Object.keys(r).forEach(function(e){t[e]=l(r[e])}),t}return r}function w(r){return g(r)?i(r):r}var s=new WeakMap;function p(r){if(!r||typeof r!="object")return r;if(s.has(r))return s.get(r);var t=Object.assign({},r);return["node","parent","canvas"].forEach(function(e){e in r&&(t[e]=i(r[e]||[]))}),r.container&&(t.container=i(r.container)),Array.isArray(r.nodes)&&(t.node=i(r.nodes)),["from","to"].forEach(function(e){var n=r[e];n&&typeof n=="object"&&"parent"in n&&(t[e]=Object.assign({},n,{parent:i(n.parent||[])}))}),s.set(r,t),t}var v=i.event.dispatch;i.event.dispatch=function(r){return arguments.length===1&&r instanceof window.CustomEvent&&typeof r.type=="string"&&r.type.indexOf("grideditor:")===0?v.call(this,r,p(r.detail)):v.apply(this,arguments)};function y(r){return function(t){return r.call(this,i.event.fix(t))}}function _(r){if(!r||!r.on)return r;var t;return typeof r.on=="function"?t=y(r.on):(t={},Object.keys(r.on).forEach(function(e){t[e]=y(r.on[e])})),Object.assign({},r,{on:t})}function j(r){return function(t,e){var n=typeof r=="string"?window[r]:r;return n(i(t),e)}}function E(r){if(r=Object.assign({},r||{}),r.callbacks){var t={};Object.keys(r.callbacks).forEach(function(n){var c=r.callbacks[n];t[n]=typeof c=="function"?function(f){return c(p(f))}:c}),r.callbacks=t}if(r.custom_filter&&r.custom_filter.length){var e=typeof r.custom_filter=="string"||typeof r.custom_filter=="function"?[r.custom_filter]:Array.prototype.slice.call(r.custom_filter);r.custom_filter=e.map(j)}return o.forEach(function(n){Array.isArray(r[n])&&(r[n]=r[n].map(_))}),r.source_textarea=l(r.source_textarea),r}function A(r){var t={canvas:i(r.canvas)};return Object.keys(a).forEach(function(e){t[e]=function(){var n=r[e].apply(r,Array.prototype.map.call(arguments,h));return n===r?void 0:w(n)}}),Object.defineProperty(t,"settings",{enumerable:!0,get:function(){return r.settings}}),t}u._created.push(function(r){i.data(r.canvas,"grideditor",A(r));var t=r.destroy;r.destroy=function(){var e=t.apply(this,arguments);return i.removeData(r.canvas,"grideditor"),e}});function O(r,t,e){var n=a[t];if(!n)return b("method:"+t,'unknown method "'+t+'"'),r;if(e=e.map(h),n.value){var c=r.first();if(!c.length)return null;var f=u.get(c[0]);return f?w(f[t].apply(f,e)):t==="getHtml"?c.html():t==="getPlainHtml"?u._plainHtml(c.html()):null}return r.each(function(){var d=u.get(this);d&&d[t].apply(d,e)}),r}i.fn.gridEditor=function(r){if(typeof r=="string")return O(this,r,Array.prototype.slice.call(arguments,1));var t=E(r);return this.each(function(){u.create(this,t)}),this},i.fn.gridEditor.locales=u.locales,i.fn.gridEditor.t=u.t}})();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/js/register.js", "../src/js/grideditor.jquery.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * What a plugin's or a locale's classic script imports in place of the\n * editor: the GridEditor the page already loaded.\n *\n * The build points `import { GridEditor } from '../grideditor.js'` here for\n * the classic scripts, so each registers on the editor the page has rather\n * than bringing its own. Loaded before the editor there is nothing to\n * register on, and saying so is better than a TypeError three calls later.\n */\nvar GridEditor = window.GridEditor;\n\nif (!GridEditor || typeof GridEditor.get !== 'function') {\n throw new Error('grid-editor: load grideditor.js (or grideditor.bundle.min.js) before its plugins, ' +\n 'its locales and grideditor.jquery.js');\n}\n\nexport { GridEditor };\nexport default GridEditor;\n", "/**\n * The jQuery API of grid-editor 6, on top of the plain DOM editor.\n *\n * A page written for 6.x - one that calls $(el).gridEditor(...), listens\n * with $(el).on('grideditor:...') and reads jQuery objects out of the\n * payloads - loads jQuery 4 and this file after grideditor.js, and runs\n * unchanged:\n *\n * <script src=\"jquery.min.js\"></script>\n * <script src=\"dist/grideditor.min.js\"></script>\n * <script src=\"dist/grideditor.jquery.min.js\"></script>\n * <script src=\"dist/plugins/grideditor.tabs.min.js\"></script>\n *\n * What it keeps is the host's side of 6.x. Plugins are not: they register\n * on GridEditor, and the plugin contract hands out elements.\n *\n * Every value 6.x gave host code as a jQuery object is one again: the event\n * payloads and the callbacks' arguments, what the create* methods return,\n * the handle $(el).data('grideditor') gives, the canvas custom_filter gets,\n * and the event a host tool's handler gets. What the host hands in may be a\n * jQuery object wherever 6.x took one.\n */\nimport { GridEditor } from './grideditor.js';\n\nvar $ = window.jQuery;\n\nvar english = function(key, params) { return GridEditor.t({ locale: 'en' }, key, params); };\n\nvar warned = {};\n\nfunction warnOnce(key, message) {\n if (warned[key]) { return; }\n warned[key] = true;\n if (window.console && window.console.warn) { window.console.warn('grid-editor: ' + message); }\n}\n\nif (!$ || !$.fn) {\n warnOnce('no-jquery', english('warning.adapter_no_jquery'));\n} else {\n install();\n}\n\nfunction install() {\n\n /**\n * Every method 6.x dispatched, and which hand back something other than\n * the jQuery set: those run against the first element only, and do not\n * chain.\n */\n var METHODS = {\n getHtml: { value: true },\n getPlainHtml: { value: true },\n init: {},\n deinit: {},\n reset: {},\n destroy: {},\n changeView: {},\n getView: { value: true },\n createRow: { value: true },\n createColumn: { value: true },\n createElement: { value: true },\n createText: { value: true },\n createSection: { value: true },\n createContainer: { value: true },\n addTab: { value: true },\n addAccordionItem: { value: true },\n setLocale: {},\n getUtility: { value: true },\n setUtility: { value: true },\n };\n\n /** The *_tools settings, whose handlers 6.x bound with jQuery. */\n var TOOL_SETTINGS = ['row_tools', 'col_tools', 'element_tools', 'container_tools',\n 'tab_tools', 'accordion_tools', 'text_tools'];\n\n function isElement(value) {\n return !!value && value.nodeType === 1;\n }\n\n /** What the host handed in, as the editor takes it: a jQuery object is its first element. */\n function unwrap(value) {\n if (value instanceof $) { return value[0] || null; }\n return value;\n }\n\n /** An argument, and the options object an argument may be, unwrapped one level down. */\n function unwrapArgument(value) {\n if (value instanceof $) { return unwrap(value); }\n\n if (value && typeof value === 'object' && !Array.isArray(value) && !isElement(value)) {\n var copy = {};\n Object.keys(value).forEach(function(key) { copy[key] = unwrap(value[key]); });\n return copy;\n }\n\n return value;\n }\n\n /** What the editor handed back, as 6.x did: an element is a jQuery object. */\n function wrapResult(value) {\n return isElement(value) ? $(value) : value;\n }\n\n /**\n * A payload as 6.x built it: its nodes jQuery objects, and an empty set\n * where there is no node - a detached node's parent. The same payload\n * wraps to the same object, so every listener of one notification sees\n * one payload, as they did.\n */\n var wrappedPayloads = new WeakMap();\n\n function wrapPayload(payload) {\n if (!payload || typeof payload !== 'object') { return payload; }\n if (wrappedPayloads.has(payload)) { return wrappedPayloads.get(payload); }\n\n var copy = Object.assign({}, payload);\n\n ['node', 'parent', 'canvas'].forEach(function(key) {\n if (key in payload) { copy[key] = $(payload[key] || []); }\n });\n if (payload.container) { copy.container = $(payload.container); }\n // edit-html writes any number of nodes, which 6.x gave as one set\n if (Array.isArray(payload.nodes)) { copy.node = $(payload.nodes); }\n ['from', 'to'].forEach(function(key) {\n var position = payload[key];\n if (position && typeof position === 'object' && 'parent' in position) {\n copy[key] = Object.assign({}, position, { parent: $(position.parent || []) });\n }\n });\n\n wrappedPayloads.set(payload, copy);\n return copy;\n }\n\n /**\n * The events, as jQuery handlers had them: (event, payload).\n *\n * The editor dispatches DOM events, which jQuery hands its handlers with\n * no second argument. Its dispatcher is where every one of them passes,\n * delegated ones too, so that is where the payload goes back in: once,\n * for each handler, and preventDefault() on the jQuery event is\n * preventDefault() on the editor's.\n */\n var dispatch = $.event.dispatch;\n $.event.dispatch = function(nativeEvent) {\n if (arguments.length === 1 && nativeEvent instanceof window.CustomEvent &&\n typeof nativeEvent.type === 'string' && nativeEvent.type.indexOf('grideditor:') === 0) {\n return dispatch.call(this, nativeEvent, wrapPayload(nativeEvent.detail));\n }\n\n return dispatch.apply(this, arguments);\n };\n\n /** A handler of a host's tool, given a jQuery event as 6.x gave it. */\n function jqueryHandler(handler) {\n return function(event) {\n return handler.call(this, $.event.fix(event));\n };\n }\n\n function adaptTool(tool) {\n if (!tool || !tool.on) { return tool; }\n\n var on;\n if (typeof tool.on === 'function') {\n on = jqueryHandler(tool.on);\n } else {\n on = {};\n Object.keys(tool.on).forEach(function(name) { on[name] = jqueryHandler(tool.on[name]); });\n }\n\n return Object.assign({}, tool, { on: on });\n }\n\n /** A custom_filter, as a function of a jQuery canvas; a name is looked up when it runs. */\n function adaptFilter(filter) {\n return function(canvas, isInit) {\n var func = typeof filter === 'string' ? window[filter] : filter;\n return func($(canvas), isInit);\n };\n }\n\n /** The host's 6.x options, as the editor takes them. */\n function adaptOptions(options) {\n options = Object.assign({}, options || {});\n\n if (options.callbacks) {\n var callbacks = {};\n Object.keys(options.callbacks).forEach(function(name) {\n var callback = options.callbacks[name];\n callbacks[name] = typeof callback === 'function'\n ? function(payload) { return callback(wrapPayload(payload)); }\n : callback;\n });\n options.callbacks = callbacks;\n }\n\n if (options.custom_filter && options.custom_filter.length) {\n var filters = typeof options.custom_filter === 'string' || typeof options.custom_filter === 'function'\n ? [options.custom_filter]\n : Array.prototype.slice.call(options.custom_filter);\n options.custom_filter = filters.map(adaptFilter);\n }\n\n TOOL_SETTINGS.forEach(function(name) {\n if (Array.isArray(options[name])) { options[name] = options[name].map(adaptTool); }\n });\n\n options.source_textarea = unwrap(options.source_textarea);\n\n return options;\n }\n\n /**\n * The handle $(el).data('grideditor') gave in 6.x: the same methods, with\n * jQuery going in and coming out, and the canvas as a jQuery object.\n */\n function handleFor(instance) {\n var handle = { canvas: $(instance.canvas) };\n\n Object.keys(METHODS).forEach(function(name) {\n handle[name] = function() {\n var result = instance[name].apply(instance, Array.prototype.map.call(arguments, unwrapArgument));\n return result === instance ? undefined : wrapResult(result);\n };\n });\n\n Object.defineProperty(handle, 'settings', {\n enumerable: true,\n get: function() { return instance.settings; },\n });\n\n return handle;\n }\n\n /**\n * Every editor gets its 6.x handle, whoever made it: $(el).gridEditor()\n * or new GridEditor(el). It goes with the editor.\n */\n GridEditor._created.push(function(instance) {\n $.data(instance.canvas, 'grideditor', handleFor(instance));\n\n var destroy = instance.destroy;\n instance.destroy = function() {\n var result = destroy.apply(this, arguments);\n $.removeData(instance.canvas, 'grideditor');\n return result;\n };\n });\n\n function dispatchMethod(set, name, args) {\n var descriptor = METHODS[name];\n\n if (!descriptor) {\n warnOnce('method:' + name, 'unknown method \"' + name + '\"');\n return set;\n }\n\n args = args.map(unwrapArgument);\n\n if (descriptor.value) {\n var element = set.first();\n if (!element.length) { return null; }\n\n var instance = GridEditor.get(element[0]);\n if (!instance) {\n if (name === 'getHtml') { return element.html(); }\n if (name === 'getPlainHtml') { return GridEditor._plainHtml(element.html()); }\n return null;\n }\n\n return wrapResult(instance[name].apply(instance, args));\n }\n\n set.each(function() {\n var found = GridEditor.get(this);\n if (found) { found[name].apply(found, args); }\n });\n\n return set;\n }\n\n /**\n * $(el).gridEditor(options): an editor on each element that has none.\n * $(el).gridEditor('method', ...): a method, 6.x style.\n */\n $.fn.gridEditor = function(optionsOrMethod) {\n if (typeof optionsOrMethod == 'string') {\n return dispatchMethod(this, optionsOrMethod, Array.prototype.slice.call(arguments, 1));\n }\n\n var options = adaptOptions(optionsOrMethod);\n\n this.each(function() {\n GridEditor.create(this, options);\n });\n\n return this;\n };\n\n // Strings are the same thing in both: a 6.x locale file loads unchanged\n $.fn.gridEditor.locales = GridEditor.locales;\n $.fn.gridEditor.t = GridEditor.t;\n}\n"],
|
|
5
|
-
"mappings": "MASA,IAAIA,EAAa,OAAO,WAExB,GAAI,CAACA,GAAc,OAAOA,EAAW,KAAQ,WACzC,MAAM,IAAI,MAAM,wHAC0B,ECW9C,IAAIC,EAAI,OAAO,OAEXC,EAAU,SAASC,EAAKC,EAAQ,CAAE,OAAOC,EAAW,EAAE,CAAE,OAAQ,IAAK,EAAGF,EAAKC,CAAM,CAAG,EAEtFE,EAAS,CAAC,EAEd,SAASC,EAASJ,EAAKK,EAAS,CACxBF,EAAOH,CAAG,IACdG,EAAOH,CAAG,EAAI,GACV,OAAO,SAAW,OAAO,QAAQ,MAAQ,OAAO,QAAQ,KAAK,gBAAkBK,CAAO,EAC9F,CAEI,CAACP,GAAK,CAACA,EAAE,GACTM,EAAS,YAAaL,EAAQ,2BAA2B,CAAC,EAE1DO,EAAQ,EAGZ,SAASA,GAAU,CAOf,IAAIC,EAAU,CACV,QAAkB,CAAE,MAAO,EAAK,EAChC,aAAkB,CAAE,MAAO,EAAK,EAChC,KAAkB,CAAC,EACnB,OAAkB,CAAC,EACnB,MAAkB,CAAC,EACnB,QAAkB,CAAC,EACnB,WAAkB,CAAC,EACnB,QAAkB,CAAE,MAAO,EAAK,EAChC,UAAkB,CAAE,MAAO,EAAK,EAChC,aAAkB,CAAE,MAAO,EAAK,EAChC,cAAkB,CAAE,MAAO,EAAK,EAChC,WAAkB,CAAE,MAAO,EAAK,EAChC,cAAkB,CAAE,MAAO,EAAK,EAChC,gBAAkB,CAAE,MAAO,EAAK,EAChC,OAAkB,CAAE,MAAO,EAAK,EAChC,iBAAkB,CAAE,MAAO,EAAK,EAChC,UAAkB,CAAC,EACnB,WAAkB,CAAE,MAAO,EAAK,EAChC,WAAkB,CAAE,MAAO,EAAK,
|
|
4
|
+
"sourcesContent": ["/**\n * What a plugin's or a locale's classic script imports in place of the\n * editor: the GridEditor the page already loaded.\n *\n * The build points `import { GridEditor } from '../grideditor.js'` here for\n * the classic scripts, so each registers on the editor the page has rather\n * than bringing its own. Loaded before the editor there is nothing to\n * register on, and saying so is better than a TypeError three calls later.\n */\nvar GridEditor = window.GridEditor;\n\nif (!GridEditor || typeof GridEditor.get !== 'function') {\n throw new Error('grid-editor: load grideditor.js (or grideditor.bundle.min.js) before its plugins, ' +\n 'its locales and grideditor.jquery.js');\n}\n\nexport { GridEditor };\nexport default GridEditor;\n", "/**\n * The jQuery API of grid-editor 6, on top of the plain DOM editor.\n *\n * A page written for 6.x - one that calls $(el).gridEditor(...), listens\n * with $(el).on('grideditor:...') and reads jQuery objects out of the\n * payloads - loads jQuery 4 and this file after grideditor.js, and runs\n * unchanged:\n *\n * <script src=\"jquery.min.js\"></script>\n * <script src=\"dist/grideditor.min.js\"></script>\n * <script src=\"dist/grideditor.jquery.min.js\"></script>\n * <script src=\"dist/plugins/grideditor.tabs.min.js\"></script>\n *\n * What it keeps is the host's side of 6.x. Plugins are not: they register\n * on GridEditor, and the plugin contract hands out elements.\n *\n * Every value 6.x gave host code as a jQuery object is one again: the event\n * payloads and the callbacks' arguments, what the create* methods return,\n * the handle $(el).data('grideditor') gives, the canvas custom_filter gets,\n * and the event a host tool's handler gets. What the host hands in may be a\n * jQuery object wherever 6.x took one.\n */\nimport { GridEditor } from './grideditor.js';\n\nvar $ = window.jQuery;\n\nvar english = function(key, params) { return GridEditor.t({ locale: 'en' }, key, params); };\n\nvar warned = {};\n\nfunction warnOnce(key, message) {\n if (warned[key]) { return; }\n warned[key] = true;\n if (window.console && window.console.warn) { window.console.warn('grid-editor: ' + message); }\n}\n\nif (!$ || !$.fn) {\n warnOnce('no-jquery', english('warning.adapter_no_jquery'));\n} else {\n install();\n}\n\nfunction install() {\n\n /**\n * Every method 6.x dispatched, and which hand back something other than\n * the jQuery set: those run against the first element only, and do not\n * chain.\n */\n var METHODS = {\n getHtml: { value: true },\n getPlainHtml: { value: true },\n init: {},\n deinit: {},\n reset: {},\n destroy: {},\n changeView: {},\n getView: { value: true },\n createRow: { value: true },\n createColumn: { value: true },\n createElement: { value: true },\n createText: { value: true },\n createSection: { value: true },\n createContainer: { value: true },\n addTab: { value: true },\n addAccordionItem: { value: true },\n setLocale: {},\n getUtility: { value: true },\n setUtility: { value: true },\n getActiveTarget: { value: true },\n setActiveTarget: {},\n };\n\n /** The *_tools settings, whose handlers 6.x bound with jQuery. */\n var TOOL_SETTINGS = ['row_tools', 'col_tools', 'element_tools', 'container_tools',\n 'tab_tools', 'accordion_tools', 'text_tools'];\n\n function isElement(value) {\n return !!value && value.nodeType === 1;\n }\n\n /** What the host handed in, as the editor takes it: a jQuery object is its first element. */\n function unwrap(value) {\n if (value instanceof $) { return value[0] || null; }\n return value;\n }\n\n /** An argument, and the options object an argument may be, unwrapped one level down. */\n function unwrapArgument(value) {\n if (value instanceof $) { return unwrap(value); }\n\n if (value && typeof value === 'object' && !Array.isArray(value) && !isElement(value)) {\n var copy = {};\n Object.keys(value).forEach(function(key) { copy[key] = unwrap(value[key]); });\n return copy;\n }\n\n return value;\n }\n\n /** What the editor handed back, as 6.x did: an element is a jQuery object. */\n function wrapResult(value) {\n return isElement(value) ? $(value) : value;\n }\n\n /**\n * A payload as 6.x built it: its nodes jQuery objects, and an empty set\n * where there is no node - a detached node's parent. The same payload\n * wraps to the same object, so every listener of one notification sees\n * one payload, as they did.\n */\n var wrappedPayloads = new WeakMap();\n\n function wrapPayload(payload) {\n if (!payload || typeof payload !== 'object') { return payload; }\n if (wrappedPayloads.has(payload)) { return wrappedPayloads.get(payload); }\n\n var copy = Object.assign({}, payload);\n\n ['node', 'parent', 'canvas'].forEach(function(key) {\n if (key in payload) { copy[key] = $(payload[key] || []); }\n });\n if (payload.container) { copy.container = $(payload.container); }\n // edit-html writes any number of nodes, which 6.x gave as one set\n if (Array.isArray(payload.nodes)) { copy.node = $(payload.nodes); }\n ['from', 'to'].forEach(function(key) {\n var position = payload[key];\n if (position && typeof position === 'object' && 'parent' in position) {\n copy[key] = Object.assign({}, position, { parent: $(position.parent || []) });\n }\n });\n\n wrappedPayloads.set(payload, copy);\n return copy;\n }\n\n /**\n * The events, as jQuery handlers had them: (event, payload).\n *\n * The editor dispatches DOM events, which jQuery hands its handlers with\n * no second argument. Its dispatcher is where every one of them passes,\n * delegated ones too, so that is where the payload goes back in: once,\n * for each handler, and preventDefault() on the jQuery event is\n * preventDefault() on the editor's.\n */\n var dispatch = $.event.dispatch;\n $.event.dispatch = function(nativeEvent) {\n if (arguments.length === 1 && nativeEvent instanceof window.CustomEvent &&\n typeof nativeEvent.type === 'string' && nativeEvent.type.indexOf('grideditor:') === 0) {\n return dispatch.call(this, nativeEvent, wrapPayload(nativeEvent.detail));\n }\n\n return dispatch.apply(this, arguments);\n };\n\n /** A handler of a host's tool, given a jQuery event as 6.x gave it. */\n function jqueryHandler(handler) {\n return function(event) {\n return handler.call(this, $.event.fix(event));\n };\n }\n\n function adaptTool(tool) {\n if (!tool || !tool.on) { return tool; }\n\n var on;\n if (typeof tool.on === 'function') {\n on = jqueryHandler(tool.on);\n } else {\n on = {};\n Object.keys(tool.on).forEach(function(name) { on[name] = jqueryHandler(tool.on[name]); });\n }\n\n return Object.assign({}, tool, { on: on });\n }\n\n /** A custom_filter, as a function of a jQuery canvas; a name is looked up when it runs. */\n function adaptFilter(filter) {\n return function(canvas, isInit) {\n var func = typeof filter === 'string' ? window[filter] : filter;\n return func($(canvas), isInit);\n };\n }\n\n /** The host's 6.x options, as the editor takes them. */\n function adaptOptions(options) {\n options = Object.assign({}, options || {});\n\n if (options.callbacks) {\n var callbacks = {};\n Object.keys(options.callbacks).forEach(function(name) {\n var callback = options.callbacks[name];\n callbacks[name] = typeof callback === 'function'\n ? function(payload) { return callback(wrapPayload(payload)); }\n : callback;\n });\n options.callbacks = callbacks;\n }\n\n if (options.custom_filter && options.custom_filter.length) {\n var filters = typeof options.custom_filter === 'string' || typeof options.custom_filter === 'function'\n ? [options.custom_filter]\n : Array.prototype.slice.call(options.custom_filter);\n options.custom_filter = filters.map(adaptFilter);\n }\n\n TOOL_SETTINGS.forEach(function(name) {\n if (Array.isArray(options[name])) { options[name] = options[name].map(adaptTool); }\n });\n\n options.source_textarea = unwrap(options.source_textarea);\n\n return options;\n }\n\n /**\n * The handle $(el).data('grideditor') gave in 6.x: the same methods, with\n * jQuery going in and coming out, and the canvas as a jQuery object.\n */\n function handleFor(instance) {\n var handle = { canvas: $(instance.canvas) };\n\n Object.keys(METHODS).forEach(function(name) {\n handle[name] = function() {\n var result = instance[name].apply(instance, Array.prototype.map.call(arguments, unwrapArgument));\n return result === instance ? undefined : wrapResult(result);\n };\n });\n\n Object.defineProperty(handle, 'settings', {\n enumerable: true,\n get: function() { return instance.settings; },\n });\n\n return handle;\n }\n\n /**\n * Every editor gets its 6.x handle, whoever made it: $(el).gridEditor()\n * or new GridEditor(el). It goes with the editor.\n */\n GridEditor._created.push(function(instance) {\n $.data(instance.canvas, 'grideditor', handleFor(instance));\n\n var destroy = instance.destroy;\n instance.destroy = function() {\n var result = destroy.apply(this, arguments);\n $.removeData(instance.canvas, 'grideditor');\n return result;\n };\n });\n\n function dispatchMethod(set, name, args) {\n var descriptor = METHODS[name];\n\n if (!descriptor) {\n warnOnce('method:' + name, 'unknown method \"' + name + '\"');\n return set;\n }\n\n args = args.map(unwrapArgument);\n\n if (descriptor.value) {\n var element = set.first();\n if (!element.length) { return null; }\n\n var instance = GridEditor.get(element[0]);\n if (!instance) {\n if (name === 'getHtml') { return element.html(); }\n if (name === 'getPlainHtml') { return GridEditor._plainHtml(element.html()); }\n return null;\n }\n\n return wrapResult(instance[name].apply(instance, args));\n }\n\n set.each(function() {\n var found = GridEditor.get(this);\n if (found) { found[name].apply(found, args); }\n });\n\n return set;\n }\n\n /**\n * $(el).gridEditor(options): an editor on each element that has none.\n * $(el).gridEditor('method', ...): a method, 6.x style.\n */\n $.fn.gridEditor = function(optionsOrMethod) {\n if (typeof optionsOrMethod == 'string') {\n return dispatchMethod(this, optionsOrMethod, Array.prototype.slice.call(arguments, 1));\n }\n\n var options = adaptOptions(optionsOrMethod);\n\n this.each(function() {\n GridEditor.create(this, options);\n });\n\n return this;\n };\n\n // Strings are the same thing in both: a 6.x locale file loads unchanged\n $.fn.gridEditor.locales = GridEditor.locales;\n $.fn.gridEditor.t = GridEditor.t;\n}\n"],
|
|
5
|
+
"mappings": "MASA,IAAIA,EAAa,OAAO,WAExB,GAAI,CAACA,GAAc,OAAOA,EAAW,KAAQ,WACzC,MAAM,IAAI,MAAM,wHAC0B,ECW9C,IAAIC,EAAI,OAAO,OAEXC,EAAU,SAASC,EAAKC,EAAQ,CAAE,OAAOC,EAAW,EAAE,CAAE,OAAQ,IAAK,EAAGF,EAAKC,CAAM,CAAG,EAEtFE,EAAS,CAAC,EAEd,SAASC,EAASJ,EAAKK,EAAS,CACxBF,EAAOH,CAAG,IACdG,EAAOH,CAAG,EAAI,GACV,OAAO,SAAW,OAAO,QAAQ,MAAQ,OAAO,QAAQ,KAAK,gBAAkBK,CAAO,EAC9F,CAEI,CAACP,GAAK,CAACA,EAAE,GACTM,EAAS,YAAaL,EAAQ,2BAA2B,CAAC,EAE1DO,EAAQ,EAGZ,SAASA,GAAU,CAOf,IAAIC,EAAU,CACV,QAAkB,CAAE,MAAO,EAAK,EAChC,aAAkB,CAAE,MAAO,EAAK,EAChC,KAAkB,CAAC,EACnB,OAAkB,CAAC,EACnB,MAAkB,CAAC,EACnB,QAAkB,CAAC,EACnB,WAAkB,CAAC,EACnB,QAAkB,CAAE,MAAO,EAAK,EAChC,UAAkB,CAAE,MAAO,EAAK,EAChC,aAAkB,CAAE,MAAO,EAAK,EAChC,cAAkB,CAAE,MAAO,EAAK,EAChC,WAAkB,CAAE,MAAO,EAAK,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qB,EAAOH,CAAI,CAC9C,CAAC,EAEMD,CACX,CAMA9C,EAAE,GAAG,WAAa,SAASmD,EAAiB,CACxC,GAAI,OAAOA,GAAmB,SAC1B,OAAON,EAAe,KAAMM,EAAiB,MAAM,UAAU,MAAM,KAAK,UAAW,CAAC,CAAC,EAGzF,IAAIf,EAAUD,EAAagB,CAAe,EAE1C,YAAK,KAAK,UAAW,CACjB/C,EAAW,OAAO,KAAMgC,CAAO,CACnC,CAAC,EAEM,IACX,EAGApC,EAAE,GAAG,WAAW,QAAUI,EAAW,QACrCJ,EAAE,GAAG,WAAW,EAAII,EAAW,CACnC",
|
|
6
6
|
"names": ["GridEditor", "$", "english", "key", "params", "GridEditor", "warned", "warnOnce", "message", "install", "METHODS", "TOOL_SETTINGS", "isElement", "value", "unwrap", "unwrapArgument", "copy", "wrapResult", "wrappedPayloads", "wrapPayload", "payload", "position", "dispatch", "nativeEvent", "jqueryHandler", "handler", "event", "adaptTool", "tool", "on", "name", "adaptFilter", "filter", "canvas", "isInit", "func", "adaptOptions", "options", "callbacks", "callback", "filters", "handleFor", "instance", "handle", "result", "destroy", "dispatchMethod", "set", "args", "descriptor", "element", "found", "optionsOrMethod"]
|
|
7
7
|
}
|
package/dist/grideditor.js
CHANGED
|
@@ -326,7 +326,9 @@
|
|
|
326
326
|
addAccordionItem: { value: true },
|
|
327
327
|
setLocale: {},
|
|
328
328
|
getUtility: { value: true },
|
|
329
|
-
setUtility: { value: true }
|
|
329
|
+
setUtility: { value: true },
|
|
330
|
+
getActiveTarget: { value: true },
|
|
331
|
+
setActiveTarget: {}
|
|
330
332
|
};
|
|
331
333
|
var PLACEMENTS = ["appendTo", "prependTo", "insertAfter", "insertBefore"];
|
|
332
334
|
var BREAKPOINTS = [
|
|
@@ -569,6 +571,8 @@
|
|
|
569
571
|
// 'tool' for the move tool, 'drawer' for the whole drawer
|
|
570
572
|
"toolbar_drag": "auto",
|
|
571
573
|
// Drag the toolbar's buttons onto the canvas. 'auto' follows drag_handle
|
|
574
|
+
"active_target": false,
|
|
575
|
+
// A click in a column makes it where the toolbar's buttons add
|
|
572
576
|
"element_tools": [],
|
|
573
577
|
// Host tools on element drawers, same shape as row_tools
|
|
574
578
|
"element_classes": [],
|
|
@@ -630,6 +634,7 @@
|
|
|
630
634
|
var sizePicker = null;
|
|
631
635
|
var sourceOpen = false;
|
|
632
636
|
var dropMarker = null;
|
|
637
|
+
var activeTarget = null;
|
|
633
638
|
var warnedHere = {};
|
|
634
639
|
var sortables = [];
|
|
635
640
|
var instanceId = ++editorCounter;
|
|
@@ -1034,6 +1039,34 @@
|
|
|
1034
1039
|
e.preventDefault();
|
|
1035
1040
|
}
|
|
1036
1041
|
}, signal);
|
|
1042
|
+
if (settings.active_target) {
|
|
1043
|
+
var pressed = null;
|
|
1044
|
+
canvas.addEventListener("pointerdown", function(e) {
|
|
1045
|
+
pressed = { x: e.clientX, y: e.clientY };
|
|
1046
|
+
}, signal);
|
|
1047
|
+
canvas.addEventListener("click", function(e) {
|
|
1048
|
+
var from = pressed;
|
|
1049
|
+
pressed = null;
|
|
1050
|
+
if (!hasClass(canvas, "ge-editing")) {
|
|
1051
|
+
return;
|
|
1052
|
+
}
|
|
1053
|
+
if (from && Math.abs(e.clientX - from.x) + Math.abs(e.clientY - from.y) > settings.drag.threshold) {
|
|
1054
|
+
return;
|
|
1055
|
+
}
|
|
1056
|
+
var region = closest(e.target, targetSelector());
|
|
1057
|
+
changeTarget(region && region !== canvas && canvas.contains(region) ? region : null);
|
|
1058
|
+
}, signal);
|
|
1059
|
+
document.addEventListener("keydown", function(e) {
|
|
1060
|
+
if (e.key !== "Escape" || !activeTarget || openSettingsState || dialogState) {
|
|
1061
|
+
return;
|
|
1062
|
+
}
|
|
1063
|
+
var focus = document.activeElement;
|
|
1064
|
+
if (focus && (is(focus, "input, textarea, select") || focus.isContentEditable)) {
|
|
1065
|
+
return;
|
|
1066
|
+
}
|
|
1067
|
+
changeTarget(null);
|
|
1068
|
+
}, signal);
|
|
1069
|
+
}
|
|
1037
1070
|
}
|
|
1038
1071
|
function textReady(block) {
|
|
1039
1072
|
if (!is(block, ".ge-content") || !canvas.contains(block)) {
|
|
@@ -1059,6 +1092,10 @@
|
|
|
1059
1092
|
"data-ge-layout": grouped ? JSON.stringify(layout) : layout.join(",")
|
|
1060
1093
|
});
|
|
1061
1094
|
btn.addEventListener("click", function() {
|
|
1095
|
+
if (activeTarget) {
|
|
1096
|
+
addToTarget(btn, "tool");
|
|
1097
|
+
return;
|
|
1098
|
+
}
|
|
1062
1099
|
var row = rowFromLayoutValue(layout);
|
|
1063
1100
|
var added = addNode("row", row, function() {
|
|
1064
1101
|
canvas.appendChild(row);
|
|
@@ -1087,6 +1124,10 @@
|
|
|
1087
1124
|
);
|
|
1088
1125
|
attr(button, { "data-ge-toolbar": "container", "data-ge-container-type": type });
|
|
1089
1126
|
button.addEventListener("click", function() {
|
|
1127
|
+
if (activeTarget) {
|
|
1128
|
+
addToTarget(button, "tool");
|
|
1129
|
+
return;
|
|
1130
|
+
}
|
|
1090
1131
|
var row = createRow();
|
|
1091
1132
|
var column = row.appendChild(createColumn(MAX_COL_SIZE));
|
|
1092
1133
|
var container = column.appendChild(definition.create({}));
|
|
@@ -1180,6 +1221,10 @@
|
|
|
1180
1221
|
"data-ge-item": index
|
|
1181
1222
|
});
|
|
1182
1223
|
button.addEventListener("click", function() {
|
|
1224
|
+
if (activeTarget) {
|
|
1225
|
+
addToTarget(button, item.source || "tool");
|
|
1226
|
+
return;
|
|
1227
|
+
}
|
|
1183
1228
|
var made = item.create();
|
|
1184
1229
|
var placed = item.inColumn ? inRowOfItsOwn(made) : made;
|
|
1185
1230
|
var added = addNode(item.kind, made, function() {
|
|
@@ -1285,7 +1330,7 @@
|
|
|
1285
1330
|
});
|
|
1286
1331
|
return { region, before };
|
|
1287
1332
|
}
|
|
1288
|
-
function insertFeatureFromToolbar(button, where) {
|
|
1333
|
+
function insertFeatureFromToolbar(button, where, source) {
|
|
1289
1334
|
var item = FEATURES[button.getAttribute("data-ge-feature")].toolbar[parseInt(button.getAttribute("data-ge-item"), 10)];
|
|
1290
1335
|
var made = item.create();
|
|
1291
1336
|
var placed = made;
|
|
@@ -1304,7 +1349,7 @@
|
|
|
1304
1349
|
} else {
|
|
1305
1350
|
where.region.appendChild(placed);
|
|
1306
1351
|
}
|
|
1307
|
-
}, { parent: where.region, source: item.source || "dragdrop" });
|
|
1352
|
+
}, { parent: where.region, source: item.source || source || "dragdrop" });
|
|
1308
1353
|
}
|
|
1309
1354
|
function inRowOfItsOwn(node) {
|
|
1310
1355
|
var row = createRow();
|
|
@@ -1331,9 +1376,9 @@
|
|
|
1331
1376
|
dropMarker.remove();
|
|
1332
1377
|
}
|
|
1333
1378
|
}
|
|
1334
|
-
function insertFromToolbar(button, where) {
|
|
1379
|
+
function insertFromToolbar(button, where, source) {
|
|
1335
1380
|
if (button.getAttribute("data-ge-toolbar") === "feature") {
|
|
1336
|
-
return insertFeatureFromToolbar(button, where);
|
|
1381
|
+
return insertFeatureFromToolbar(button, where, source);
|
|
1337
1382
|
}
|
|
1338
1383
|
var container = button.getAttribute("data-ge-toolbar") === "container";
|
|
1339
1384
|
var type = button.getAttribute("data-ge-container-type");
|
|
@@ -1348,7 +1393,7 @@
|
|
|
1348
1393
|
} else {
|
|
1349
1394
|
where.region.appendChild(placed);
|
|
1350
1395
|
}
|
|
1351
|
-
}, { parent: where.region, source: "dragdrop" });
|
|
1396
|
+
}, { parent: where.region, source: source || "dragdrop" });
|
|
1352
1397
|
}
|
|
1353
1398
|
function widthFamily() {
|
|
1354
1399
|
var values = [];
|
|
@@ -1588,6 +1633,7 @@
|
|
|
1588
1633
|
}
|
|
1589
1634
|
function openSource() {
|
|
1590
1635
|
deinit();
|
|
1636
|
+
changeTarget(null);
|
|
1591
1637
|
htmlTextArea.style.height = 0.8 * document.documentElement.clientHeight + "px";
|
|
1592
1638
|
htmlTextArea.value = canvas.innerHTML;
|
|
1593
1639
|
show(htmlTextArea);
|
|
@@ -1603,6 +1649,32 @@
|
|
|
1603
1649
|
init();
|
|
1604
1650
|
hide(htmlTextArea);
|
|
1605
1651
|
}
|
|
1652
|
+
function targetSelector() {
|
|
1653
|
+
return [".column"].concat(pluginHooks("regions")).join(", ");
|
|
1654
|
+
}
|
|
1655
|
+
function isTarget(node) {
|
|
1656
|
+
return !!node && node !== canvas && canvas.contains(node) && is(node, targetSelector());
|
|
1657
|
+
}
|
|
1658
|
+
function changeTarget(node) {
|
|
1659
|
+
if (node === activeTarget) {
|
|
1660
|
+
return;
|
|
1661
|
+
}
|
|
1662
|
+
var from = activeTarget;
|
|
1663
|
+
if (from) {
|
|
1664
|
+
removeClass(from, "ge-active-target");
|
|
1665
|
+
}
|
|
1666
|
+
activeTarget = node;
|
|
1667
|
+
if (node && hasClass(canvas, "ge-editing")) {
|
|
1668
|
+
addClass(node, "ge-active-target");
|
|
1669
|
+
}
|
|
1670
|
+
emit("target-change", { canvas, target: node, from });
|
|
1671
|
+
}
|
|
1672
|
+
function addToTarget(button, source) {
|
|
1673
|
+
var made = insertFromToolbar(button, { region: activeTarget, before: null }, source);
|
|
1674
|
+
if (made && made.scrollIntoView) {
|
|
1675
|
+
made.scrollIntoView({ behavior: "smooth" });
|
|
1676
|
+
}
|
|
1677
|
+
}
|
|
1606
1678
|
function init() {
|
|
1607
1679
|
if (openSettingsState && !attached(openSettingsState.node)) {
|
|
1608
1680
|
closeSettings();
|
|
@@ -1626,10 +1698,18 @@
|
|
|
1626
1698
|
makeResizable();
|
|
1627
1699
|
switchLayout(curView);
|
|
1628
1700
|
refreshPreviews(canvas);
|
|
1701
|
+
if (activeTarget && !canvas.contains(activeTarget)) {
|
|
1702
|
+
changeTarget(null);
|
|
1703
|
+
} else if (activeTarget) {
|
|
1704
|
+
addClass(activeTarget, "ge-active-target");
|
|
1705
|
+
}
|
|
1629
1706
|
}
|
|
1630
1707
|
function deinit() {
|
|
1631
1708
|
closeSettings();
|
|
1632
1709
|
removeClass(canvas, "ge-editing ge-drag-drawer ge-dropping");
|
|
1710
|
+
if (activeTarget) {
|
|
1711
|
+
removeClass(activeTarget, "ge-active-target");
|
|
1712
|
+
}
|
|
1633
1713
|
plugins("onBeforeDeinit");
|
|
1634
1714
|
closeSizePicker();
|
|
1635
1715
|
hideDropMarker();
|
|
@@ -1671,6 +1751,7 @@
|
|
|
1671
1751
|
closeSource();
|
|
1672
1752
|
}
|
|
1673
1753
|
deinit();
|
|
1754
|
+
activeTarget = null;
|
|
1674
1755
|
removeConfirmModal();
|
|
1675
1756
|
removeSettingsPanels();
|
|
1676
1757
|
removeDialog();
|
|
@@ -4047,6 +4128,23 @@
|
|
|
4047
4128
|
return featureMethods[name].apply(null, arguments);
|
|
4048
4129
|
};
|
|
4049
4130
|
}
|
|
4131
|
+
function apiSetActiveTarget(value) {
|
|
4132
|
+
if (!settings.active_target) {
|
|
4133
|
+
warnOnceHere("active_target", "setActiveTarget needs the active_target setting: without it, it does nothing");
|
|
4134
|
+
return;
|
|
4135
|
+
}
|
|
4136
|
+
if (value === null || value === void 0) {
|
|
4137
|
+
changeTarget(null);
|
|
4138
|
+
return;
|
|
4139
|
+
}
|
|
4140
|
+
var node = nodeFrom(value);
|
|
4141
|
+
if (!isTarget(node)) {
|
|
4142
|
+
var named = typeof value === "string" ? value : node ? "<" + node.tagName.toLowerCase() + ">" : String(value);
|
|
4143
|
+
warn("setActiveTarget: " + named + " is not a column or a region of the canvas");
|
|
4144
|
+
return;
|
|
4145
|
+
}
|
|
4146
|
+
changeTarget(node);
|
|
4147
|
+
}
|
|
4050
4148
|
var own = {
|
|
4051
4149
|
getHtml,
|
|
4052
4150
|
getPlainHtml,
|
|
@@ -4080,7 +4178,11 @@
|
|
|
4080
4178
|
},
|
|
4081
4179
|
setLocale,
|
|
4082
4180
|
getUtility,
|
|
4083
|
-
setUtility
|
|
4181
|
+
setUtility,
|
|
4182
|
+
getActiveTarget: function() {
|
|
4183
|
+
return settings.active_target ? activeTarget : null;
|
|
4184
|
+
},
|
|
4185
|
+
setActiveTarget: apiSetActiveTarget
|
|
4084
4186
|
};
|
|
4085
4187
|
Object.keys(own).forEach(function(name) {
|
|
4086
4188
|
var value = !!(METHODS[name] && METHODS[name].value);
|
|
@@ -4119,7 +4221,7 @@
|
|
|
4119
4221
|
GridEditor._plainHtml = plainHtml;
|
|
4120
4222
|
GridEditor.Sortable = null;
|
|
4121
4223
|
GridEditor.bootstrap = null;
|
|
4122
|
-
GridEditor.version = false ? "dev" : "8.
|
|
4224
|
+
GridEditor.version = false ? "dev" : "8.2.0";
|
|
4123
4225
|
GridEditor.locales = {
|
|
4124
4226
|
en: {
|
|
4125
4227
|
"tool.move": "Move",
|