first commit
This commit is contained in:
9
node_modules/mj-context-menu/README.md
generated
vendored
Normal file
9
node_modules/mj-context-menu/README.md
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
# context-menu
|
||||
|
||||
A reimplementation of MathJax context menu in TypeScript.
|
||||
|
||||
Documentation:
|
||||
* [JSDoc](https://zorkow.github.io/context-menu/doc/jsdoc)
|
||||
* [Typedoc](https://zorkow.github.io/context-menu/doc/typedoc)
|
||||
* [Simple Class Diagram](https://zorkow.github.io/context-menu/doc/class-diagram-simple.svg)
|
||||
* [Complete Class Diagram](https://zorkow.github.io/context-menu/doc/class-diagram-complete.svg)
|
||||
1
node_modules/mj-context-menu/dist/ContextMenu.js
generated
vendored
Normal file
1
node_modules/mj-context-menu/dist/ContextMenu.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
17
node_modules/mj-context-menu/js/abstract_entry.d.ts
generated
vendored
Normal file
17
node_modules/mj-context-menu/js/abstract_entry.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import { Entry } from './entry.js';
|
||||
import { MenuElement } from './menu_element.js';
|
||||
import { Menu } from './menu.js';
|
||||
export declare abstract class AbstractEntry extends MenuElement implements Entry {
|
||||
private _menu;
|
||||
private _type;
|
||||
protected className: import("./html_classes.js").HtmlClass;
|
||||
protected role: string;
|
||||
private hidden;
|
||||
constructor(_menu: Menu, _type: string);
|
||||
get menu(): Menu;
|
||||
set menu(menu: Menu);
|
||||
get type(): string;
|
||||
hide(): void;
|
||||
show(): void;
|
||||
isHidden(): boolean;
|
||||
}
|
||||
61
node_modules/mj-context-menu/js/abstract_entry.js
generated
vendored
Normal file
61
node_modules/mj-context-menu/js/abstract_entry.js
generated
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.AbstractEntry = void 0;
|
||||
var menu_element_js_1 = require("./menu_element.js");
|
||||
var html_classes_js_1 = require("./html_classes.js");
|
||||
var AbstractEntry = (function (_super) {
|
||||
__extends(AbstractEntry, _super);
|
||||
function AbstractEntry(_menu, _type) {
|
||||
var _this = _super.call(this) || this;
|
||||
_this._menu = _menu;
|
||||
_this._type = _type;
|
||||
_this.className = html_classes_js_1.HtmlClasses['MENUITEM'];
|
||||
_this.role = 'menuitem';
|
||||
_this.hidden = false;
|
||||
return _this;
|
||||
}
|
||||
Object.defineProperty(AbstractEntry.prototype, "menu", {
|
||||
get: function () {
|
||||
return this._menu;
|
||||
},
|
||||
set: function (menu) {
|
||||
this._menu = menu;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(AbstractEntry.prototype, "type", {
|
||||
get: function () {
|
||||
return this._type;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
AbstractEntry.prototype.hide = function () {
|
||||
this.hidden = true;
|
||||
this.menu.generateMenu();
|
||||
};
|
||||
AbstractEntry.prototype.show = function () {
|
||||
this.hidden = false;
|
||||
this.menu.generateMenu();
|
||||
};
|
||||
AbstractEntry.prototype.isHidden = function () {
|
||||
return this.hidden;
|
||||
};
|
||||
return AbstractEntry;
|
||||
}(menu_element_js_1.MenuElement));
|
||||
exports.AbstractEntry = AbstractEntry;
|
||||
//# sourceMappingURL=abstract_entry.js.map
|
||||
1
node_modules/mj-context-menu/js/abstract_entry.js.map
generated
vendored
Normal file
1
node_modules/mj-context-menu/js/abstract_entry.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"abstract_entry.js","sourceRoot":"","sources":["../ts/abstract_entry.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAyBA,qDAA8C;AAE9C,qDAA8C;AAI9C;IAA4C,iCAAW;IAwBrD,uBAAoB,KAAW,EAAU,KAAa;QAAtD,YACE,iBAAO,SACR;QAFmB,WAAK,GAAL,KAAK,CAAM;QAAU,WAAK,GAAL,KAAK,CAAQ;QAjB5C,eAAS,GAAG,6BAAW,CAAC,UAAU,CAAC,CAAC;QAMpC,UAAI,GAAG,UAAU,CAAC;QAEpB,YAAM,GAAY,KAAK,CAAC;;IAWhC,CAAC;IAKD,sBAAW,+BAAI;aAAf;YACE,OAAO,IAAI,CAAC,KAAa,CAAC;QAC5B,CAAC;aAKD,UAAgB,IAAU;YACxB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QACpB,CAAC;;;OAPA;IAYD,sBAAW,+BAAI;aAAf;YACE,OAAO,IAAI,CAAC,KAAK,CAAC;QACpB,CAAC;;;OAAA;IAKM,4BAAI,GAAX;QACE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;IAC3B,CAAC;IAKM,4BAAI,GAAX;QACE,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;IAC3B,CAAC;IAKM,gCAAQ,GAAf;QACE,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAEH,oBAAC;AAAD,CAAC,AAxED,CAA4C,6BAAW,GAwEtD;AAxEqB,sCAAa"}
|
||||
34
node_modules/mj-context-menu/js/abstract_item.d.ts
generated
vendored
Normal file
34
node_modules/mj-context-menu/js/abstract_item.d.ts
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
import { AbstractEntry } from './abstract_entry.js';
|
||||
import { Item } from './item.js';
|
||||
import { Menu } from './menu.js';
|
||||
export declare abstract class AbstractItem extends AbstractEntry implements Item {
|
||||
private _content;
|
||||
protected disabled: boolean;
|
||||
private _id;
|
||||
private callbacks;
|
||||
constructor(menu: Menu, type: string, _content: string, id?: string);
|
||||
get content(): string;
|
||||
set content(content: string);
|
||||
get id(): string;
|
||||
press(): void;
|
||||
protected executeAction(): void;
|
||||
registerCallback(func: Function): void;
|
||||
unregisterCallback(func: Function): void;
|
||||
mousedown(event: MouseEvent): void;
|
||||
mouseover(event: MouseEvent): void;
|
||||
mouseout(event: MouseEvent): void;
|
||||
generateHtml(): void;
|
||||
protected activate(): void;
|
||||
protected deactivate(): void;
|
||||
focus(): void;
|
||||
unfocus(): void;
|
||||
escape(_event: KeyboardEvent): void;
|
||||
up(event: KeyboardEvent): void;
|
||||
down(event: KeyboardEvent): void;
|
||||
left(event: KeyboardEvent): void;
|
||||
right(event: KeyboardEvent): void;
|
||||
space(_event: KeyboardEvent): void;
|
||||
disable(): void;
|
||||
enable(): void;
|
||||
private executeCallbacks_;
|
||||
}
|
||||
170
node_modules/mj-context-menu/js/abstract_item.js
generated
vendored
Normal file
170
node_modules/mj-context-menu/js/abstract_item.js
generated
vendored
Normal file
@@ -0,0 +1,170 @@
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __values = (this && this.__values) || function(o) {
|
||||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
||||
if (m) return m.call(o);
|
||||
if (o && typeof o.length === "number") return {
|
||||
next: function () {
|
||||
if (o && i >= o.length) o = void 0;
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.AbstractItem = void 0;
|
||||
var abstract_entry_js_1 = require("./abstract_entry.js");
|
||||
var menu_util_js_1 = require("./menu_util.js");
|
||||
var html_classes_js_1 = require("./html_classes.js");
|
||||
var AbstractItem = (function (_super) {
|
||||
__extends(AbstractItem, _super);
|
||||
function AbstractItem(menu, type, _content, id) {
|
||||
var _this = _super.call(this, menu, type) || this;
|
||||
_this._content = _content;
|
||||
_this.disabled = false;
|
||||
_this.callbacks = [];
|
||||
_this._id = id ? id : _content;
|
||||
return _this;
|
||||
}
|
||||
Object.defineProperty(AbstractItem.prototype, "content", {
|
||||
get: function () {
|
||||
return this._content;
|
||||
},
|
||||
set: function (content) {
|
||||
this._content = content;
|
||||
this.generateHtml();
|
||||
if (this.menu) {
|
||||
this.menu.generateHtml();
|
||||
}
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(AbstractItem.prototype, "id", {
|
||||
get: function () {
|
||||
return this._id;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
AbstractItem.prototype.press = function () {
|
||||
if (!this.disabled) {
|
||||
this.executeAction();
|
||||
this.executeCallbacks_();
|
||||
}
|
||||
};
|
||||
AbstractItem.prototype.executeAction = function () { };
|
||||
AbstractItem.prototype.registerCallback = function (func) {
|
||||
if (this.callbacks.indexOf(func) === -1) {
|
||||
this.callbacks.push(func);
|
||||
}
|
||||
};
|
||||
AbstractItem.prototype.unregisterCallback = function (func) {
|
||||
var index = this.callbacks.indexOf(func);
|
||||
if (index !== -1) {
|
||||
this.callbacks.splice(index, 1);
|
||||
}
|
||||
};
|
||||
AbstractItem.prototype.mousedown = function (event) {
|
||||
this.press();
|
||||
this.stop(event);
|
||||
};
|
||||
AbstractItem.prototype.mouseover = function (event) {
|
||||
this.focus();
|
||||
this.stop(event);
|
||||
};
|
||||
AbstractItem.prototype.mouseout = function (event) {
|
||||
this.deactivate();
|
||||
this.stop(event);
|
||||
};
|
||||
AbstractItem.prototype.generateHtml = function () {
|
||||
_super.prototype.generateHtml.call(this);
|
||||
var html = this.html;
|
||||
html.setAttribute('aria-disabled', 'false');
|
||||
html.textContent = this.content;
|
||||
};
|
||||
AbstractItem.prototype.activate = function () {
|
||||
if (!this.disabled) {
|
||||
this.html.classList.add(html_classes_js_1.HtmlClasses['MENUACTIVE']);
|
||||
}
|
||||
};
|
||||
AbstractItem.prototype.deactivate = function () {
|
||||
this.html.classList.remove(html_classes_js_1.HtmlClasses['MENUACTIVE']);
|
||||
};
|
||||
AbstractItem.prototype.focus = function () {
|
||||
this.menu.focused = this;
|
||||
_super.prototype.focus.call(this);
|
||||
this.activate();
|
||||
};
|
||||
AbstractItem.prototype.unfocus = function () {
|
||||
this.deactivate();
|
||||
_super.prototype.unfocus.call(this);
|
||||
};
|
||||
AbstractItem.prototype.escape = function (_event) {
|
||||
menu_util_js_1.MenuUtil.close(this);
|
||||
};
|
||||
AbstractItem.prototype.up = function (event) {
|
||||
this.menu.up(event);
|
||||
};
|
||||
AbstractItem.prototype.down = function (event) {
|
||||
this.menu.down(event);
|
||||
};
|
||||
AbstractItem.prototype.left = function (event) {
|
||||
this.menu.left(event);
|
||||
};
|
||||
AbstractItem.prototype.right = function (event) {
|
||||
this.menu.right(event);
|
||||
};
|
||||
AbstractItem.prototype.space = function (_event) {
|
||||
this.press();
|
||||
};
|
||||
AbstractItem.prototype.disable = function () {
|
||||
this.disabled = true;
|
||||
var html = this.html;
|
||||
html.classList.add(html_classes_js_1.HtmlClasses['MENUDISABLED']);
|
||||
html.setAttribute('aria-disabled', 'true');
|
||||
};
|
||||
AbstractItem.prototype.enable = function () {
|
||||
this.disabled = false;
|
||||
var html = this.html;
|
||||
html.classList.remove(html_classes_js_1.HtmlClasses['MENUDISABLED']);
|
||||
html.removeAttribute('aria-disabled');
|
||||
};
|
||||
AbstractItem.prototype.executeCallbacks_ = function () {
|
||||
var e_1, _a;
|
||||
try {
|
||||
for (var _b = __values(this.callbacks), _c = _b.next(); !_c.done; _c = _b.next()) {
|
||||
var func = _c.value;
|
||||
try {
|
||||
func(this);
|
||||
}
|
||||
catch (e) {
|
||||
menu_util_js_1.MenuUtil.error(e, 'Callback for menu entry ' + this.id +
|
||||
' failed.');
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
||||
}
|
||||
finally { if (e_1) throw e_1.error; }
|
||||
}
|
||||
};
|
||||
return AbstractItem;
|
||||
}(abstract_entry_js_1.AbstractEntry));
|
||||
exports.AbstractItem = AbstractItem;
|
||||
//# sourceMappingURL=abstract_item.js.map
|
||||
1
node_modules/mj-context-menu/js/abstract_item.js.map
generated
vendored
Normal file
1
node_modules/mj-context-menu/js/abstract_item.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"abstract_item.js","sourceRoot":"","sources":["../ts/abstract_item.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,yDAAkD;AAIlD,+CAAwC;AACxC,qDAA8C;AAI9C;IAA2C,gCAAa;IAoBtD,sBAAY,IAAU,EAAE,IAAY,EAChB,QAAgB,EAAE,EAAW;QADjD,YAEE,kBAAM,IAAI,EAAE,IAAI,CAAC,SAElB;QAHmB,cAAQ,GAAR,QAAQ,CAAQ;QAf1B,cAAQ,GAAY,KAAK,CAAC;QAG5B,eAAS,GAAe,EAAE,CAAC;QAcjC,KAAI,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC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"}
|
||||
27
node_modules/mj-context-menu/js/abstract_menu.d.ts
generated
vendored
Normal file
27
node_modules/mj-context-menu/js/abstract_menu.d.ts
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
import { AbstractPostable } from './abstract_postable.js';
|
||||
import { Menu } from './menu.js';
|
||||
import { Item } from './item.js';
|
||||
import { VariablePool } from './variable_pool.js';
|
||||
export declare abstract class AbstractMenu extends AbstractPostable implements Menu {
|
||||
protected className: import("./html_classes.js").HtmlClass;
|
||||
protected variablePool: VariablePool<string | boolean>;
|
||||
protected role: string;
|
||||
protected _items: Item[];
|
||||
private _baseMenu;
|
||||
private _focused;
|
||||
set baseMenu(menu: Menu);
|
||||
get baseMenu(): Menu;
|
||||
get items(): Item[];
|
||||
set items(items: Item[]);
|
||||
get pool(): VariablePool<string | boolean>;
|
||||
get focused(): Item;
|
||||
set focused(item: Item);
|
||||
up(_event: KeyboardEvent): void;
|
||||
down(_event: KeyboardEvent): void;
|
||||
generateHtml(): void;
|
||||
generateMenu(): void;
|
||||
post(x?: number, y?: number): void;
|
||||
unpostSubmenus(): void;
|
||||
unpost(): void;
|
||||
find(id: string): Item;
|
||||
}
|
||||
211
node_modules/mj-context-menu/js/abstract_menu.js
generated
vendored
Normal file
211
node_modules/mj-context-menu/js/abstract_menu.js
generated
vendored
Normal file
@@ -0,0 +1,211 @@
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __values = (this && this.__values) || function(o) {
|
||||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
||||
if (m) return m.call(o);
|
||||
if (o && typeof o.length === "number") return {
|
||||
next: function () {
|
||||
if (o && i >= o.length) o = void 0;
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.AbstractMenu = void 0;
|
||||
var abstract_postable_js_1 = require("./abstract_postable.js");
|
||||
var abstract_item_js_1 = require("./abstract_item.js");
|
||||
var html_classes_js_1 = require("./html_classes.js");
|
||||
var item_submenu_js_1 = require("./item_submenu.js");
|
||||
var AbstractMenu = (function (_super) {
|
||||
__extends(AbstractMenu, _super);
|
||||
function AbstractMenu() {
|
||||
var _this = _super !== null && _super.apply(this, arguments) || this;
|
||||
_this.className = html_classes_js_1.HtmlClasses['CONTEXTMENU'];
|
||||
_this.role = 'menu';
|
||||
_this._items = [];
|
||||
_this._baseMenu = null;
|
||||
return _this;
|
||||
}
|
||||
Object.defineProperty(AbstractMenu.prototype, "baseMenu", {
|
||||
get: function () {
|
||||
return this._baseMenu;
|
||||
},
|
||||
set: function (menu) {
|
||||
this._baseMenu = menu;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(AbstractMenu.prototype, "items", {
|
||||
get: function () {
|
||||
return this._items;
|
||||
},
|
||||
set: function (items) {
|
||||
this._items = items;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(AbstractMenu.prototype, "pool", {
|
||||
get: function () {
|
||||
return this.variablePool;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(AbstractMenu.prototype, "focused", {
|
||||
get: function () {
|
||||
return this._focused;
|
||||
},
|
||||
set: function (item) {
|
||||
if (this._focused === item) {
|
||||
return;
|
||||
}
|
||||
if (!this._focused) {
|
||||
this.unfocus();
|
||||
}
|
||||
var old = this._focused;
|
||||
this._focused = item;
|
||||
if (old) {
|
||||
old.unfocus();
|
||||
}
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
AbstractMenu.prototype.up = function (_event) {
|
||||
var items = this.items.filter(function (x) { return (x instanceof abstract_item_js_1.AbstractItem) && (!x.isHidden()); });
|
||||
if (items.length === 0) {
|
||||
return;
|
||||
}
|
||||
if (!this.focused) {
|
||||
items[items.length - 1].focus();
|
||||
return;
|
||||
}
|
||||
var index = items.indexOf(this.focused);
|
||||
if (index === -1) {
|
||||
return;
|
||||
}
|
||||
index = index ? --index : items.length - 1;
|
||||
items[index].focus();
|
||||
};
|
||||
AbstractMenu.prototype.down = function (_event) {
|
||||
var items = this.items.filter(function (x) { return (x instanceof abstract_item_js_1.AbstractItem) && (!x.isHidden()); });
|
||||
if (items.length === 0) {
|
||||
return;
|
||||
}
|
||||
if (!this.focused) {
|
||||
items[0].focus();
|
||||
return;
|
||||
}
|
||||
var index = items.indexOf(this.focused);
|
||||
if (index === -1) {
|
||||
return;
|
||||
}
|
||||
index++;
|
||||
index = (index === items.length) ? 0 : index;
|
||||
items[index].focus();
|
||||
};
|
||||
AbstractMenu.prototype.generateHtml = function () {
|
||||
_super.prototype.generateHtml.call(this);
|
||||
this.generateMenu();
|
||||
};
|
||||
AbstractMenu.prototype.generateMenu = function () {
|
||||
var e_1, _a;
|
||||
var html = this.html;
|
||||
html.classList.add(html_classes_js_1.HtmlClasses['MENU']);
|
||||
try {
|
||||
for (var _b = __values(this.items), _c = _b.next(); !_c.done; _c = _b.next()) {
|
||||
var item = _c.value;
|
||||
if (!item.isHidden()) {
|
||||
html.appendChild(item.html);
|
||||
continue;
|
||||
}
|
||||
var itemHtml = item.html;
|
||||
if (itemHtml.parentNode) {
|
||||
itemHtml.parentNode.removeChild(itemHtml);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
||||
}
|
||||
finally { if (e_1) throw e_1.error; }
|
||||
}
|
||||
};
|
||||
AbstractMenu.prototype.post = function (x, y) {
|
||||
this.variablePool.update();
|
||||
_super.prototype.post.call(this, x, y);
|
||||
};
|
||||
AbstractMenu.prototype.unpostSubmenus = function () {
|
||||
var e_2, _a;
|
||||
var submenus = this.items.filter(function (x) { return x instanceof item_submenu_js_1.Submenu; });
|
||||
try {
|
||||
for (var submenus_1 = __values(submenus), submenus_1_1 = submenus_1.next(); !submenus_1_1.done; submenus_1_1 = submenus_1.next()) {
|
||||
var submenu = submenus_1_1.value;
|
||||
submenu.submenu.unpost();
|
||||
if (submenu !== this.focused) {
|
||||
submenu.unfocus();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (submenus_1_1 && !submenus_1_1.done && (_a = submenus_1.return)) _a.call(submenus_1);
|
||||
}
|
||||
finally { if (e_2) throw e_2.error; }
|
||||
}
|
||||
};
|
||||
AbstractMenu.prototype.unpost = function () {
|
||||
_super.prototype.unpost.call(this);
|
||||
this.unpostSubmenus();
|
||||
this.focused = null;
|
||||
};
|
||||
AbstractMenu.prototype.find = function (id) {
|
||||
var e_3, _a;
|
||||
try {
|
||||
for (var _b = __values(this.items), _c = _b.next(); !_c.done; _c = _b.next()) {
|
||||
var item = _c.value;
|
||||
if (item.type === 'rule') {
|
||||
continue;
|
||||
}
|
||||
if (item.id === id) {
|
||||
return item;
|
||||
}
|
||||
if (item.type === 'submenu') {
|
||||
var result = item.submenu.find(id);
|
||||
if (result) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
||||
}
|
||||
finally { if (e_3) throw e_3.error; }
|
||||
}
|
||||
return null;
|
||||
};
|
||||
return AbstractMenu;
|
||||
}(abstract_postable_js_1.AbstractPostable));
|
||||
exports.AbstractMenu = AbstractMenu;
|
||||
//# sourceMappingURL=abstract_menu.js.map
|
||||
1
node_modules/mj-context-menu/js/abstract_menu.js.map
generated
vendored
Normal file
1
node_modules/mj-context-menu/js/abstract_menu.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"abstract_menu.js","sourceRoot":"","sources":["../ts/abstract_menu.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,+DAAwD;AACxD,uDAAgD;AAIhD,qDAA8C;AAC9C,qDAA0C;AAG1C;IAA2C,gCAAgB;IAA3D;QAAA,qEA8MC;QAzMW,eAAS,GAAG,6BAAW,CAAC,aAAa,CAAC,CAAC;QAWvC,UAAI,GAAG,MAAM,CAAC;QAKd,YAAM,GAAW,EAAE,CAAC;QACtB,eAAS,GAAS,IAAI,CAAC;;IAwLjC,CAAC;IAlLC,sBAAW,kCAAQ;aAOnB;YACE,OAAO,IAAI,CAAC,SAAS,CAAC;QACxB,CAAC;aATD,UAAoB,IAAU;YAC5B,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACxB,CAAC;;;OAAA;IAYD,sBAAW,+BAAK;aAAhB;YACE,OAAO,IAAI,CAAC,MAAM,CAAC;QACrB,CAAC;aAKD,UAAiB,KAAa;YAC5B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACtB,CAAC;;;OAPA;IAYD,sBAAW,8BAAI;aAAf;YACE,OAAO,IAAI,CAAC,YAAY,CAAC;QAC3B,CAAC;;;OAAA;IAKD,sBAAW,iCAAO;aAAlB;YACE,OAAO,IAAI,CAAC,QAAQ,CAAC;QACvB,CAAC;aAKD,UAAmB,IAAU;YAC3B,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,EAAE;gBAC1B,OAAO;aACR;YACD,IAAI,CAA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ules/mj-context-menu/js/abstract_navigatable.d.ts
generated
vendored
Normal file
20
node_modules/mj-context-menu/js/abstract_navigatable.d.ts
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
import { KeyNavigatable } from './key_navigatable.js';
|
||||
import { MouseNavigatable } from './mouse_navigatable.js';
|
||||
export declare abstract class AbstractNavigatable implements KeyNavigatable, MouseNavigatable {
|
||||
private bubble;
|
||||
bubbleKey(): void;
|
||||
keydown(event: KeyboardEvent): void;
|
||||
escape(_event: KeyboardEvent): void;
|
||||
space(_event: KeyboardEvent): void;
|
||||
left(_event: KeyboardEvent): void;
|
||||
right(_event: KeyboardEvent): void;
|
||||
up(_event: KeyboardEvent): void;
|
||||
down(_event: KeyboardEvent): void;
|
||||
protected stop(event: Event): void;
|
||||
mousedown(event: MouseEvent): void;
|
||||
mouseup(event: MouseEvent): void;
|
||||
mouseover(event: MouseEvent): void;
|
||||
mouseout(event: MouseEvent): void;
|
||||
click(event: MouseEvent): void;
|
||||
addEvents(element: HTMLElement): void;
|
||||
}
|
||||
82
node_modules/mj-context-menu/js/abstract_navigatable.js
generated
vendored
Normal file
82
node_modules/mj-context-menu/js/abstract_navigatable.js
generated
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.AbstractNavigatable = void 0;
|
||||
var key_navigatable_js_1 = require("./key_navigatable.js");
|
||||
var mouse_navigatable_js_1 = require("./mouse_navigatable.js");
|
||||
var AbstractNavigatable = (function () {
|
||||
function AbstractNavigatable() {
|
||||
this.bubble = false;
|
||||
}
|
||||
AbstractNavigatable.prototype.bubbleKey = function () {
|
||||
this.bubble = true;
|
||||
};
|
||||
AbstractNavigatable.prototype.keydown = function (event) {
|
||||
switch (event.keyCode) {
|
||||
case key_navigatable_js_1.KEY.ESCAPE:
|
||||
this.escape(event);
|
||||
break;
|
||||
case key_navigatable_js_1.KEY.RIGHT:
|
||||
this.right(event);
|
||||
break;
|
||||
case key_navigatable_js_1.KEY.LEFT:
|
||||
this.left(event);
|
||||
break;
|
||||
case key_navigatable_js_1.KEY.UP:
|
||||
this.up(event);
|
||||
break;
|
||||
case key_navigatable_js_1.KEY.DOWN:
|
||||
this.down(event);
|
||||
break;
|
||||
case key_navigatable_js_1.KEY.RETURN:
|
||||
case key_navigatable_js_1.KEY.SPACE:
|
||||
this.space(event);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
this.bubble ? this.bubble = false : this.stop(event);
|
||||
};
|
||||
AbstractNavigatable.prototype.escape = function (_event) { };
|
||||
AbstractNavigatable.prototype.space = function (_event) { };
|
||||
AbstractNavigatable.prototype.left = function (_event) { };
|
||||
AbstractNavigatable.prototype.right = function (_event) { };
|
||||
AbstractNavigatable.prototype.up = function (_event) { };
|
||||
AbstractNavigatable.prototype.down = function (_event) { };
|
||||
AbstractNavigatable.prototype.stop = function (event) {
|
||||
if (event) {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
event.cancelBubble = true;
|
||||
}
|
||||
};
|
||||
AbstractNavigatable.prototype.mousedown = function (event) {
|
||||
return this.stop(event);
|
||||
};
|
||||
AbstractNavigatable.prototype.mouseup = function (event) {
|
||||
return this.stop(event);
|
||||
};
|
||||
AbstractNavigatable.prototype.mouseover = function (event) {
|
||||
return this.stop(event);
|
||||
};
|
||||
AbstractNavigatable.prototype.mouseout = function (event) {
|
||||
return this.stop(event);
|
||||
};
|
||||
AbstractNavigatable.prototype.click = function (event) {
|
||||
return this.stop(event);
|
||||
};
|
||||
AbstractNavigatable.prototype.addEvents = function (element) {
|
||||
element.addEventListener(mouse_navigatable_js_1.MOUSE.DOWN, this.mousedown.bind(this));
|
||||
element.addEventListener(mouse_navigatable_js_1.MOUSE.UP, this.mouseup.bind(this));
|
||||
element.addEventListener(mouse_navigatable_js_1.MOUSE.OVER, this.mouseover.bind(this));
|
||||
element.addEventListener(mouse_navigatable_js_1.MOUSE.OUT, this.mouseout.bind(this));
|
||||
element.addEventListener(mouse_navigatable_js_1.MOUSE.CLICK, this.click.bind(this));
|
||||
element.addEventListener('keydown', this.keydown.bind(this));
|
||||
element.addEventListener('dragstart', this.stop.bind(this));
|
||||
element.addEventListener(mouse_navigatable_js_1.MOUSE.SELECTSTART, this.stop.bind(this));
|
||||
element.addEventListener('contextmenu', this.stop.bind(this));
|
||||
element.addEventListener(mouse_navigatable_js_1.MOUSE.DBLCLICK, this.stop.bind(this));
|
||||
};
|
||||
return AbstractNavigatable;
|
||||
}());
|
||||
exports.AbstractNavigatable = AbstractNavigatable;
|
||||
//# sourceMappingURL=abstract_navigatable.js.map
|
||||
1
node_modules/mj-context-menu/js/abstract_navigatable.js.map
generated
vendored
Normal file
1
node_modules/mj-context-menu/js/abstract_navigatable.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"abstract_navigatable.js","sourceRoot":"","sources":["../ts/abstract_navigatable.ts"],"names":[],"mappings":";;;AAwBA,2DAAyD;AACzD,+DAA+D;AAG/D;IAAA;QAGU,WAAM,GAAG,KAAK,CAAC;IAoIzB,CAAC;IA/HQ,uCAAS,GAAhB;QACE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;IACrB,CAAC;IAKM,qCAAO,GAAd,UAAe,KAAoB;QACjC,QAAQ,KAAK,CAAC,OAAO,EAAE;YACvB,KAAK,wBAAG,CAAC,MAAM;gBACb,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;gBACnB,MAAM;YACR,KAAK,wBAAG,CAAC,KAAK;gBACZ,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;gBAClB,MAAM;YACR,KAAK,wBAAG,CAAC,IAAI;gBACX,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACjB,MAAM;YACR,KAAK,wBAAG,CAAC,EAAE;gBACT,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;gBACf,MAAM;YACR,KAAK,wBAAG,CAAC,IAAI;gBACX,IA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CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACjE,CAAC;IACH,0BAAC;AAAD,CAAC,AAvID,IAuIC;AAvIqB,kDAAmB"}
|
||||
9
node_modules/mj-context-menu/js/abstract_postable.d.ts
generated
vendored
Normal file
9
node_modules/mj-context-menu/js/abstract_postable.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import { MenuElement } from './menu_element.js';
|
||||
import { Postable } from './postable.js';
|
||||
export declare abstract class AbstractPostable extends MenuElement implements Postable {
|
||||
private posted;
|
||||
isPosted(): boolean;
|
||||
post(x?: number, y?: number): void;
|
||||
unpost(): void;
|
||||
protected abstract display(): void;
|
||||
}
|
||||
51
node_modules/mj-context-menu/js/abstract_postable.js
generated
vendored
Normal file
51
node_modules/mj-context-menu/js/abstract_postable.js
generated
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.AbstractPostable = void 0;
|
||||
var menu_element_js_1 = require("./menu_element.js");
|
||||
var AbstractPostable = (function (_super) {
|
||||
__extends(AbstractPostable, _super);
|
||||
function AbstractPostable() {
|
||||
var _this = _super !== null && _super.apply(this, arguments) || this;
|
||||
_this.posted = false;
|
||||
return _this;
|
||||
}
|
||||
AbstractPostable.prototype.isPosted = function () {
|
||||
return this.posted;
|
||||
};
|
||||
AbstractPostable.prototype.post = function (x, y) {
|
||||
if (this.posted) {
|
||||
return;
|
||||
}
|
||||
if (typeof (x) !== 'undefined' && typeof (y) !== 'undefined') {
|
||||
this.html.setAttribute('style', 'left: ' + x + 'px; top: ' + y + 'px;');
|
||||
}
|
||||
this.display();
|
||||
this.posted = true;
|
||||
};
|
||||
AbstractPostable.prototype.unpost = function () {
|
||||
if (!this.posted) {
|
||||
return;
|
||||
}
|
||||
var html = this.html;
|
||||
if (html.parentNode) {
|
||||
html.parentNode.removeChild(html);
|
||||
}
|
||||
this.posted = false;
|
||||
};
|
||||
return AbstractPostable;
|
||||
}(menu_element_js_1.MenuElement));
|
||||
exports.AbstractPostable = AbstractPostable;
|
||||
//# sourceMappingURL=abstract_postable.js.map
|
||||
1
node_modules/mj-context-menu/js/abstract_postable.js.map
generated
vendored
Normal file
1
node_modules/mj-context-menu/js/abstract_postable.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"abstract_postable.js","sourceRoot":"","sources":["../ts/abstract_postable.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAwBA,qDAA8C;AAK9C;IAA+C,oCAAW;IAA1D;QAAA,qEA8CC;QA3CS,YAAM,GAAG,KAAK,CAAC;;IA2CzB,CAAC;IAtCQ,mCAAQ,GAAf;QACE,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAKM,+BAAI,GAAX,UAAY,CAAU,EAAE,CAAU;QAChC,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,OAAO;SACR;QACD,IAAI,OAAM,CAAC,CAAC,CAAC,KAAK,WAAW,IAAI,OAAM,CAAC,CAAC,CAAC,KAAK,WAAW,EAAE;YAC1D,IAAI,CAAC,IAAI,CAAC,YAAY,CACpB,OAAO,EAAE,QAAQ,GAAG,CAAC,GAAG,WAAW,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC;SACpD;QACD,IAAI,CAAC,OAAO,EAAE,CAAC;QACf,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;IACrB,CAAC;IAKM,iCAAM,GAAb;QACE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAChB,OAAO;SACR;QACD,IAAI,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACrB,IAAI,IAAI,CAAC,UAAU,EAAE;YACnB,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;SACnC;QACD,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,CAAC;IAOH,uBAAC;AAAD,CAAC,AA9CD,CAA+C,6BAAW,GA8CzD;AA9CqB,4CAAgB"}
|
||||
14
node_modules/mj-context-menu/js/abstract_variable_item.d.ts
generated
vendored
Normal file
14
node_modules/mj-context-menu/js/abstract_variable_item.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import { AbstractItem } from './abstract_item.js';
|
||||
import { VariableItem } from './variable_item.js';
|
||||
import { Variable } from './variable.js';
|
||||
export declare abstract class AbstractVariableItem<T> extends AbstractItem implements VariableItem {
|
||||
protected span: HTMLElement;
|
||||
protected variable: Variable<T>;
|
||||
protected abstract generateSpan(): void;
|
||||
generateHtml(): void;
|
||||
register(): void;
|
||||
unregister(): void;
|
||||
update(): void;
|
||||
protected abstract updateAria(): void;
|
||||
protected abstract updateSpan(): void;
|
||||
}
|
||||
47
node_modules/mj-context-menu/js/abstract_variable_item.js
generated
vendored
Normal file
47
node_modules/mj-context-menu/js/abstract_variable_item.js
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.AbstractVariableItem = void 0;
|
||||
var abstract_item_js_1 = require("./abstract_item.js");
|
||||
var AbstractVariableItem = (function (_super) {
|
||||
__extends(AbstractVariableItem, _super);
|
||||
function AbstractVariableItem() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
AbstractVariableItem.prototype.generateHtml = function () {
|
||||
_super.prototype.generateHtml.call(this);
|
||||
var html = this.html;
|
||||
if (!this.span) {
|
||||
this.generateSpan();
|
||||
}
|
||||
html.appendChild(this.span);
|
||||
this.update();
|
||||
};
|
||||
AbstractVariableItem.prototype.register = function () {
|
||||
this.variable.register(this);
|
||||
};
|
||||
AbstractVariableItem.prototype.unregister = function () {
|
||||
this.variable.unregister(this);
|
||||
};
|
||||
AbstractVariableItem.prototype.update = function () {
|
||||
this.updateAria();
|
||||
if (this.span) {
|
||||
this.updateSpan();
|
||||
}
|
||||
};
|
||||
return AbstractVariableItem;
|
||||
}(abstract_item_js_1.AbstractItem));
|
||||
exports.AbstractVariableItem = AbstractVariableItem;
|
||||
//# sourceMappingURL=abstract_variable_item.js.map
|
||||
1
node_modules/mj-context-menu/js/abstract_variable_item.js.map
generated
vendored
Normal file
1
node_modules/mj-context-menu/js/abstract_variable_item.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"abstract_variable_item.js","sourceRoot":"","sources":["../ts/abstract_variable_item.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAyBA,uDAAgD;AAKhD;IAAsD,wCAAY;IAAlE;;IAmEA,CAAC;IA5CQ,2CAAY,GAAnB;QACE,iBAAM,YAAY,WAAE,CAAC;QACrB,IAAI,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACrB,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;YACd,IAAI,CAAC,YAAY,EAAE,CAAC;SACrB;QACD,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5B,IAAI,CAAC,MAAM,EAAE,CAAC;IAChB,CAAC;IAKM,uCAAQ,GAAf;QACE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IAKM,yCAAU,GAAjB;QACE,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IAKM,qCAAM,GAAb;QACE,IAAI,CAAC,UAAU,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,IAAI,CAAC,UAAU,EAAE,CAAC;SACnB;IACH,CAAC;IAYH,2BAAC;AAAD,CAAC,AAnED,CAAsD,+BAAY,GAmEjE;AAnEqB,oDAAoB"}
|
||||
14
node_modules/mj-context-menu/js/close_button.d.ts
generated
vendored
Normal file
14
node_modules/mj-context-menu/js/close_button.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import { AbstractPostable } from './abstract_postable.js';
|
||||
import { Postable } from './postable.js';
|
||||
export declare class CloseButton extends AbstractPostable {
|
||||
private element;
|
||||
protected className: import("./html_classes.js").HtmlClass;
|
||||
protected role: string;
|
||||
constructor(element: Postable);
|
||||
generateHtml(): void;
|
||||
protected display(): void;
|
||||
unpost(): void;
|
||||
keydown(event: KeyboardEvent): void;
|
||||
space(event: KeyboardEvent): void;
|
||||
mousedown(event: MouseEvent): void;
|
||||
}
|
||||
58
node_modules/mj-context-menu/js/close_button.js
generated
vendored
Normal file
58
node_modules/mj-context-menu/js/close_button.js
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CloseButton = void 0;
|
||||
var abstract_postable_js_1 = require("./abstract_postable.js");
|
||||
var html_classes_js_1 = require("./html_classes.js");
|
||||
var CloseButton = (function (_super) {
|
||||
__extends(CloseButton, _super);
|
||||
function CloseButton(element) {
|
||||
var _this = _super.call(this) || this;
|
||||
_this.element = element;
|
||||
_this.className = html_classes_js_1.HtmlClasses['MENUCLOSE'];
|
||||
_this.role = 'button';
|
||||
return _this;
|
||||
}
|
||||
CloseButton.prototype.generateHtml = function () {
|
||||
var html = document.createElement('span');
|
||||
html.classList.add(this.className);
|
||||
html.setAttribute('role', this.role);
|
||||
html.setAttribute('tabindex', '0');
|
||||
var content = document.createElement('span');
|
||||
content.textContent = '\u00D7';
|
||||
html.appendChild(content);
|
||||
this.html = html;
|
||||
};
|
||||
CloseButton.prototype.display = function () { };
|
||||
CloseButton.prototype.unpost = function () {
|
||||
_super.prototype.unpost.call(this);
|
||||
this.element.unpost();
|
||||
};
|
||||
CloseButton.prototype.keydown = function (event) {
|
||||
this.bubbleKey();
|
||||
_super.prototype.keydown.call(this, event);
|
||||
};
|
||||
CloseButton.prototype.space = function (event) {
|
||||
this.unpost();
|
||||
this.stop(event);
|
||||
};
|
||||
CloseButton.prototype.mousedown = function (event) {
|
||||
this.unpost();
|
||||
this.stop(event);
|
||||
};
|
||||
return CloseButton;
|
||||
}(abstract_postable_js_1.AbstractPostable));
|
||||
exports.CloseButton = CloseButton;
|
||||
//# sourceMappingURL=close_button.js.map
|
||||
1
node_modules/mj-context-menu/js/close_button.js.map
generated
vendored
Normal file
1
node_modules/mj-context-menu/js/close_button.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version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UAAiB,KAAiB;QAChC,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACnB,CAAC;IAEH,kBAAC;AAAD,CAAC,AAzED,CAAiC,uCAAgB,GAyEhD;AAzEY,kCAAW"}
|
||||
38
node_modules/mj-context-menu/js/context_menu.d.ts
generated
vendored
Normal file
38
node_modules/mj-context-menu/js/context_menu.d.ts
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
import { AbstractMenu } from './abstract_menu.js';
|
||||
import { MenuStore } from './menu_store.js';
|
||||
import { Postable } from './postable.js';
|
||||
import { ParserFactory } from './parser_factory.js';
|
||||
export declare class ContextMenu extends AbstractMenu {
|
||||
factory: ParserFactory;
|
||||
id: string;
|
||||
private moving;
|
||||
private _frame;
|
||||
private _store;
|
||||
private anchor;
|
||||
private widgets;
|
||||
static fromJson(factory: ParserFactory, { pool: pool, items: items, id: id }: {
|
||||
pool: Array<Object>;
|
||||
items: Array<Object>;
|
||||
id: string;
|
||||
}): ContextMenu;
|
||||
constructor(factory: ParserFactory);
|
||||
generateHtml(): void;
|
||||
protected display(): void;
|
||||
escape(_event: KeyboardEvent): void;
|
||||
unpost(): void;
|
||||
left(_event: KeyboardEvent): void;
|
||||
right(_event: KeyboardEvent): void;
|
||||
get frame(): HTMLElement;
|
||||
get store(): MenuStore;
|
||||
post(): void;
|
||||
post(x: number, y: number): void;
|
||||
post(event: Event): void;
|
||||
post(element: HTMLElement): void;
|
||||
registerWidget(widget: Postable): void;
|
||||
unregisterWidget(widget: Postable): void;
|
||||
unpostWidgets(): void;
|
||||
toJson(): {
|
||||
type: string;
|
||||
};
|
||||
private move_;
|
||||
}
|
||||
176
node_modules/mj-context-menu/js/context_menu.js
generated
vendored
Normal file
176
node_modules/mj-context-menu/js/context_menu.js
generated
vendored
Normal file
@@ -0,0 +1,176 @@
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ContextMenu = void 0;
|
||||
var abstract_menu_js_1 = require("./abstract_menu.js");
|
||||
var html_classes_js_1 = require("./html_classes.js");
|
||||
var menu_store_js_1 = require("./menu_store.js");
|
||||
var variable_pool_js_1 = require("./variable_pool.js");
|
||||
var ContextMenu = (function (_super) {
|
||||
__extends(ContextMenu, _super);
|
||||
function ContextMenu(factory) {
|
||||
var _this = _super.call(this) || this;
|
||||
_this.factory = factory;
|
||||
_this.id = '';
|
||||
_this.moving = false;
|
||||
_this._store = new menu_store_js_1.MenuStore(_this);
|
||||
_this.widgets = [];
|
||||
_this.variablePool = new variable_pool_js_1.VariablePool();
|
||||
return _this;
|
||||
}
|
||||
ContextMenu.fromJson = function (factory, _a) {
|
||||
var pool = _a.pool, items = _a.items, _b = _a.id, id = _b === void 0 ? '' : _b;
|
||||
var ctxtMenu = new this(factory);
|
||||
ctxtMenu.id = id;
|
||||
var varParser = factory.get('variable');
|
||||
pool.forEach(function (x) { return varParser(factory, x, ctxtMenu.pool); });
|
||||
var itemList = factory.get('items')(factory, items, ctxtMenu);
|
||||
ctxtMenu.items = itemList;
|
||||
return ctxtMenu;
|
||||
};
|
||||
ContextMenu.prototype.generateHtml = function () {
|
||||
if (this.isPosted()) {
|
||||
this.unpost();
|
||||
}
|
||||
_super.prototype.generateHtml.call(this);
|
||||
this._frame = document.createElement('div');
|
||||
this._frame.classList.add(html_classes_js_1.HtmlClasses['MENUFRAME']);
|
||||
var styleString = 'left: 0px; top: 0px; z-index: 200; width: 100%; ' +
|
||||
'height: 100%; border: 0px; padding: 0px; margin: 0px;';
|
||||
this._frame.setAttribute('style', 'position: absolute; ' + styleString);
|
||||
var innerDiv = document.createElement('div');
|
||||
innerDiv.setAttribute('style', 'position: fixed; ' + styleString);
|
||||
this._frame.appendChild(innerDiv);
|
||||
innerDiv.addEventListener('mousedown', function (event) {
|
||||
this.unpost();
|
||||
this.unpostWidgets();
|
||||
this.stop(event);
|
||||
}.bind(this));
|
||||
};
|
||||
ContextMenu.prototype.display = function () {
|
||||
document.body.appendChild(this.frame);
|
||||
this.frame.appendChild(this.html);
|
||||
this.focus();
|
||||
};
|
||||
ContextMenu.prototype.escape = function (_event) {
|
||||
this.unpost();
|
||||
this.unpostWidgets();
|
||||
};
|
||||
ContextMenu.prototype.unpost = function () {
|
||||
_super.prototype.unpost.call(this);
|
||||
if (this.widgets.length > 0) {
|
||||
return;
|
||||
}
|
||||
this.frame.parentNode.removeChild(this.frame);
|
||||
var store = this.store;
|
||||
if (!this.moving) {
|
||||
store.insertTaborder();
|
||||
}
|
||||
store.active.focus();
|
||||
};
|
||||
ContextMenu.prototype.left = function (_event) {
|
||||
this.move_(this.store.previous());
|
||||
};
|
||||
ContextMenu.prototype.right = function (_event) {
|
||||
this.move_(this.store.next());
|
||||
};
|
||||
Object.defineProperty(ContextMenu.prototype, "frame", {
|
||||
get: function () {
|
||||
return this._frame;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(ContextMenu.prototype, "store", {
|
||||
get: function () {
|
||||
return this._store;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
ContextMenu.prototype.post = function (numberOrEvent, isY) {
|
||||
if (typeof (isY) !== 'undefined') {
|
||||
if (!this.moving) {
|
||||
this.store.removeTaborder();
|
||||
}
|
||||
_super.prototype.post.call(this, numberOrEvent, isY);
|
||||
return;
|
||||
}
|
||||
var event = numberOrEvent;
|
||||
var node;
|
||||
if (event instanceof Event) {
|
||||
node = event.target;
|
||||
this.stop(event);
|
||||
}
|
||||
else {
|
||||
node = event;
|
||||
}
|
||||
var x;
|
||||
var y;
|
||||
if (event instanceof MouseEvent) {
|
||||
x = event.pageX, y = event.pageY;
|
||||
if (!x && !y && event.clientX) {
|
||||
x = event.clientX + document.body.scrollLeft +
|
||||
document.documentElement.scrollLeft;
|
||||
y = event.clientY + document.body.scrollTop +
|
||||
document.documentElement.scrollTop;
|
||||
}
|
||||
}
|
||||
if (!x && !y && node) {
|
||||
var offsetX = window.pageXOffset || document.documentElement.scrollLeft;
|
||||
var offsetY = window.pageYOffset || document.documentElement.scrollTop;
|
||||
var rect = node.getBoundingClientRect();
|
||||
x = (rect.right + rect.left) / 2 + offsetX;
|
||||
y = (rect.bottom + rect.top) / 2 + offsetY;
|
||||
}
|
||||
this.store.active = node;
|
||||
this.anchor = this.store.active;
|
||||
var menu = this.html;
|
||||
var margin = 5;
|
||||
if (x + menu.offsetWidth > document.body.offsetWidth - margin) {
|
||||
x = document.body.offsetWidth - menu.offsetWidth - margin;
|
||||
}
|
||||
this.post(x, y);
|
||||
};
|
||||
ContextMenu.prototype.registerWidget = function (widget) {
|
||||
this.widgets.push(widget);
|
||||
};
|
||||
ContextMenu.prototype.unregisterWidget = function (widget) {
|
||||
var index = this.widgets.indexOf(widget);
|
||||
if (index > -1) {
|
||||
this.widgets.splice(index, 1);
|
||||
}
|
||||
if (this.widgets.length === 0) {
|
||||
this.unpost();
|
||||
}
|
||||
};
|
||||
ContextMenu.prototype.unpostWidgets = function () {
|
||||
this.widgets.forEach(function (x) { return x.unpost(); });
|
||||
};
|
||||
ContextMenu.prototype.toJson = function () {
|
||||
return { type: '' };
|
||||
};
|
||||
ContextMenu.prototype.move_ = function (next) {
|
||||
if (this.anchor && next !== this.anchor) {
|
||||
this.moving = true;
|
||||
this.unpost();
|
||||
this.post(next);
|
||||
this.moving = false;
|
||||
}
|
||||
};
|
||||
return ContextMenu;
|
||||
}(abstract_menu_js_1.AbstractMenu));
|
||||
exports.ContextMenu = ContextMenu;
|
||||
//# sourceMappingURL=context_menu.js.map
|
||||
1
node_modules/mj-context-menu/js/context_menu.js.map
generated
vendored
Normal file
1
node_modules/mj-context-menu/js/context_menu.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
4
node_modules/mj-context-menu/js/css_util.d.ts
generated
vendored
Normal file
4
node_modules/mj-context-menu/js/css_util.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export declare namespace CssStyles {
|
||||
function addMenuStyles(opt_document: HTMLDocument): void;
|
||||
function addInfoStyles(opt_document: HTMLDocument): void;
|
||||
}
|
||||
231
node_modules/mj-context-menu/js/css_util.js
generated
vendored
Normal file
231
node_modules/mj-context-menu/js/css_util.js
generated
vendored
Normal file
@@ -0,0 +1,231 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CssStyles = void 0;
|
||||
var html_classes_js_1 = require("./html_classes.js");
|
||||
var CssStyles;
|
||||
(function (CssStyles) {
|
||||
function makeClass_(name) {
|
||||
return '.' + (html_classes_js_1.HtmlClasses[name] || name);
|
||||
}
|
||||
var INFO_STYLES = {};
|
||||
INFO_STYLES[makeClass_('INFOCLOSE')] = '{' +
|
||||
' top:.2em; right:.2em;' +
|
||||
'}',
|
||||
INFO_STYLES[makeClass_('INFOCONTENT')] = '{' +
|
||||
' overflow:auto; text-align:left; font-size:80%;' +
|
||||
' padding:.4em .6em; border:1px inset; margin:1em 0px;' +
|
||||
' max-height:20em; max-width:30em; background-color:#EEEEEE;' +
|
||||
' white-space:normal;' +
|
||||
'}',
|
||||
INFO_STYLES[makeClass_('INFO') + makeClass_('MOUSEPOST')] = '{' +
|
||||
'outline:none;' +
|
||||
'}',
|
||||
INFO_STYLES[makeClass_('INFO')] = '{' +
|
||||
' position:fixed; left:50%; width:auto; text-align:center;' +
|
||||
' border:3px outset; padding:1em 2em; background-color:#DDDDDD;' +
|
||||
' color:black;' +
|
||||
' cursor:default; font-family:message-box; font-size:120%;' +
|
||||
' font-style:normal; text-indent:0; text-transform:none;' +
|
||||
' line-height:normal; letter-spacing:normal; word-spacing:normal;' +
|
||||
' word-wrap:normal; white-space:nowrap; float:none; z-index:201;' +
|
||||
' border-radius: 15px; /* Opera 10.5 and IE9 */' +
|
||||
' -webkit-border-radius:15px; /* Safari and Chrome */' +
|
||||
' -moz-border-radius:15px; /* Firefox */' +
|
||||
' -khtml-border-radius:15px; /* Konqueror */' +
|
||||
' box-shadow:0px 10px 20px #808080; /* Opera 10.5 and IE9 */' +
|
||||
' -webkit-box-shadow:0px 10px 20px #808080; /* Safari 3 & Chrome */' +
|
||||
' -moz-box-shadow:0px 10px 20px #808080; /* Forefox 3.5 */' +
|
||||
' -khtml-box-shadow:0px 10px 20px #808080; /* Konqueror */' +
|
||||
' filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=2,' +
|
||||
' OffY=2, Color="gray", Positive="true"); /* IE */' +
|
||||
'}';
|
||||
var MENU_STYLES = {};
|
||||
MENU_STYLES[makeClass_('MENU')] = '{' +
|
||||
' position:absolute;' +
|
||||
' background-color:white;' +
|
||||
' color:black;' +
|
||||
' width:auto; padding:5px 0px;' +
|
||||
' border:1px solid #CCCCCC; margin:0; cursor:default;' +
|
||||
' font: menu; text-align:left; text-indent:0; text-transform:none;' +
|
||||
' line-height:normal; letter-spacing:normal; word-spacing:normal;' +
|
||||
' word-wrap:normal; white-space:nowrap; float:none; z-index:201;' +
|
||||
' border-radius: 5px; /* Opera 10.5 and IE9 */' +
|
||||
' -webkit-border-radius: 5px; /* Safari and Chrome */' +
|
||||
' -moz-border-radius: 5px; /* Firefox */' +
|
||||
' -khtml-border-radius: 5px; /* Konqueror */' +
|
||||
' box-shadow:0px 10px 20px #808080; /* Opera 10.5 and IE9 */' +
|
||||
' -webkit-box-shadow:0px 10px 20px #808080; /* Safari 3 & Chrome */' +
|
||||
' -moz-box-shadow:0px 10px 20px #808080; /* Forefox 3.5 */' +
|
||||
' -khtml-box-shadow:0px 10px 20px #808080; /* Konqueror */' +
|
||||
'}',
|
||||
MENU_STYLES[makeClass_('MENUITEM')] = '{' +
|
||||
' padding: 1px 2em;' +
|
||||
' background:transparent;' +
|
||||
'}',
|
||||
MENU_STYLES[makeClass_('MENUARROW')] = '{' +
|
||||
' position:absolute; right:.5em; padding-top:.25em; color:#666666;' +
|
||||
' font-family: null; font-size: .75em' +
|
||||
'}',
|
||||
MENU_STYLES[makeClass_('MENUACTIVE') + ' ' + makeClass_('MENUARROW')] =
|
||||
'{color:white}',
|
||||
MENU_STYLES[makeClass_('MENUARROW') + makeClass_('RTL')] =
|
||||
'{left:.5em; right:auto}',
|
||||
MENU_STYLES[makeClass_('MENUCHECK')] = '{' +
|
||||
' position:absolute; left:.7em;' +
|
||||
' font-family: null' +
|
||||
'}',
|
||||
MENU_STYLES[makeClass_('MENUCHECK') + makeClass_('RTL')] =
|
||||
'{ right:.7em; left:auto }',
|
||||
MENU_STYLES[makeClass_('MENURADIOCHECK')] = '{' +
|
||||
' position:absolute; left: .7em;' +
|
||||
'}',
|
||||
MENU_STYLES[makeClass_('MENURADIOCHECK') + makeClass_('RTL')] = '{' +
|
||||
' right: .7em; left:auto' +
|
||||
'}',
|
||||
MENU_STYLES[makeClass_('MENUINPUTBOX')] = '{' +
|
||||
' padding-left: 1em; right:.5em; color:#666666;' +
|
||||
' font-family: null;' +
|
||||
'}',
|
||||
MENU_STYLES[makeClass_('MENUINPUTBOX') + makeClass_('RTL')] = '{' +
|
||||
' left: .1em;' +
|
||||
'}',
|
||||
MENU_STYLES[makeClass_('MENUCOMBOBOX')] = '{' +
|
||||
' left:.1em; padding-bottom:.5em;' +
|
||||
'}',
|
||||
MENU_STYLES[makeClass_('MENUSLIDER')] = '{' +
|
||||
' left: .1em;' +
|
||||
'}',
|
||||
MENU_STYLES[makeClass_('SLIDERVALUE')] = '{' +
|
||||
' position:absolute; right:.1em; padding-top:.25em; color:#333333;' +
|
||||
' font-size: .75em' +
|
||||
'}',
|
||||
MENU_STYLES[makeClass_('SLIDERBAR')] = '{' +
|
||||
' outline: none; background: #d3d3d3' +
|
||||
'}',
|
||||
MENU_STYLES[makeClass_('MENULABEL')] = '{' +
|
||||
' padding: 1px 2em 3px 1.33em;' +
|
||||
' font-style:italic' +
|
||||
'}',
|
||||
MENU_STYLES[makeClass_('MENURULE')] = '{' +
|
||||
' border-top: 1px solid #DDDDDD;' +
|
||||
' margin: 4px 3px;' +
|
||||
'}',
|
||||
MENU_STYLES[makeClass_('MENUDISABLED')] = '{' +
|
||||
' color:GrayText' +
|
||||
'}',
|
||||
MENU_STYLES[makeClass_('MENUACTIVE')] = '{' +
|
||||
' background-color: #606872;' +
|
||||
' color: white;' +
|
||||
'}',
|
||||
MENU_STYLES[makeClass_('MENUDISABLED') + ':focus'] = '{' +
|
||||
' background-color: #E8E8E8' +
|
||||
'}',
|
||||
MENU_STYLES[makeClass_('MENULABEL') + ':focus'] = '{' +
|
||||
' background-color: #E8E8E8' +
|
||||
'}',
|
||||
MENU_STYLES[makeClass_('CONTEXTMENU') + ':focus'] = '{' +
|
||||
' outline:none' +
|
||||
'}',
|
||||
MENU_STYLES[makeClass_('CONTEXTMENU') + ' ' +
|
||||
makeClass_('MENUITEM') + ':focus'] = '{' +
|
||||
' outline:none' +
|
||||
'}',
|
||||
MENU_STYLES[makeClass_('SELECTIONMENU')] = '{' +
|
||||
' position:relative; float:left;' +
|
||||
' border-bottom: none;' +
|
||||
' -webkit-box-shadow:none;' +
|
||||
' -webkit-border-radius:0px; ' +
|
||||
'}',
|
||||
MENU_STYLES[makeClass_('SELECTIONITEM')] = '{' +
|
||||
' padding-right: 1em;' +
|
||||
'}',
|
||||
MENU_STYLES[makeClass_('SELECTION')] = '{' +
|
||||
' right: 40%; width:50%; ' +
|
||||
'}',
|
||||
MENU_STYLES[makeClass_('SELECTIONBOX')] = '{' +
|
||||
' padding: 0em; max-height:20em; max-width: none;' +
|
||||
' background-color:#FFFFFF;' +
|
||||
'}',
|
||||
MENU_STYLES[makeClass_('SELECTIONDIVIDER')] = '{' +
|
||||
' clear: both; border-top: 2px solid #000000;' +
|
||||
'}',
|
||||
MENU_STYLES[makeClass_('MENU') + ' ' + makeClass_('MENUCLOSE')] = '{' +
|
||||
' top:-10px; left:-10px' +
|
||||
'}';
|
||||
var CLOSE_ICON_STYLES = {};
|
||||
CLOSE_ICON_STYLES[makeClass_('MENUCLOSE')] = '{' +
|
||||
' position:absolute;' +
|
||||
' cursor:pointer;' +
|
||||
' display:inline-block;' +
|
||||
' border:2px solid #AAA;' +
|
||||
' border-radius:18px;' +
|
||||
' -webkit-border-radius: 18px; /* Safari and Chrome */' +
|
||||
' -moz-border-radius: 18px; /* Firefox */' +
|
||||
' -khtml-border-radius: 18px; /* Konqueror */' +
|
||||
' font-family: "Courier New", Courier;' +
|
||||
' font-size:24px;' +
|
||||
' color:#F0F0F0' +
|
||||
'}',
|
||||
CLOSE_ICON_STYLES[makeClass_('MENUCLOSE') + ' span'] = '{' +
|
||||
' display:block; background-color:#AAA; border:1.5px solid;' +
|
||||
' border-radius:18px;' +
|
||||
' -webkit-border-radius: 18px; /* Safari and Chrome */' +
|
||||
' -moz-border-radius: 18px; /* Firefox */' +
|
||||
' -khtml-border-radius: 18px; /* Konqueror */' +
|
||||
' line-height:0;' +
|
||||
' padding:8px 0 6px /* may need to be browser-specific */' +
|
||||
'}',
|
||||
CLOSE_ICON_STYLES[makeClass_('MENUCLOSE') + ':hover'] = '{' +
|
||||
' color:white!important;' +
|
||||
' border:2px solid #CCC!important' +
|
||||
'}',
|
||||
CLOSE_ICON_STYLES[makeClass_('MENUCLOSE') + ':hover span'] = '{' +
|
||||
' background-color:#CCC!important' +
|
||||
'}',
|
||||
CLOSE_ICON_STYLES[makeClass_('MENUCLOSE') + ':hover:focus'] = '{' +
|
||||
' outline:none' +
|
||||
'}';
|
||||
var INFO_ADDED = false;
|
||||
var MENU_ADDED = false;
|
||||
var CLOSE_ICON_ADDED = false;
|
||||
function addMenuStyles(opt_document) {
|
||||
if (MENU_ADDED) {
|
||||
return;
|
||||
}
|
||||
addStyles_(MENU_STYLES, opt_document);
|
||||
MENU_ADDED = true;
|
||||
addCloseIconStyles_(opt_document);
|
||||
}
|
||||
CssStyles.addMenuStyles = addMenuStyles;
|
||||
function addInfoStyles(opt_document) {
|
||||
if (INFO_ADDED) {
|
||||
return;
|
||||
}
|
||||
addStyles_(INFO_STYLES, opt_document);
|
||||
INFO_ADDED = true;
|
||||
addCloseIconStyles_(opt_document);
|
||||
}
|
||||
CssStyles.addInfoStyles = addInfoStyles;
|
||||
function addCloseIconStyles_(opt_document) {
|
||||
if (CLOSE_ICON_ADDED) {
|
||||
return;
|
||||
}
|
||||
addStyles_(CLOSE_ICON_STYLES, opt_document);
|
||||
CLOSE_ICON_ADDED = true;
|
||||
}
|
||||
function addStyles_(styles, opt_document) {
|
||||
var doc = opt_document || document;
|
||||
var element = doc.createElement('style');
|
||||
element.type = 'text/css';
|
||||
var inner = '';
|
||||
for (var style in styles) {
|
||||
inner += style;
|
||||
inner += ' ';
|
||||
inner += styles[style];
|
||||
inner += '\n';
|
||||
}
|
||||
element.innerHTML = inner;
|
||||
doc.head.appendChild(element);
|
||||
}
|
||||
})(CssStyles = exports.CssStyles || (exports.CssStyles = {}));
|
||||
//# sourceMappingURL=css_util.js.map
|
||||
1
node_modules/mj-context-menu/js/css_util.js.map
generated
vendored
Normal file
1
node_modules/mj-context-menu/js/css_util.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
4
node_modules/mj-context-menu/js/element.d.ts
generated
vendored
Normal file
4
node_modules/mj-context-menu/js/element.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export interface Element {
|
||||
html: HTMLElement;
|
||||
generateHtml(): void;
|
||||
}
|
||||
3
node_modules/mj-context-menu/js/element.js
generated
vendored
Normal file
3
node_modules/mj-context-menu/js/element.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=element.js.map
|
||||
1
node_modules/mj-context-menu/js/element.js.map
generated
vendored
Normal file
1
node_modules/mj-context-menu/js/element.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"element.js","sourceRoot":"","sources":["../ts/element.ts"],"names":[],"mappings":""}
|
||||
8
node_modules/mj-context-menu/js/entry.d.ts
generated
vendored
Normal file
8
node_modules/mj-context-menu/js/entry.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import { Menu } from './menu.js';
|
||||
export interface Entry {
|
||||
menu: Menu;
|
||||
type: string;
|
||||
hide(): void;
|
||||
show(): void;
|
||||
isHidden(): boolean;
|
||||
}
|
||||
3
node_modules/mj-context-menu/js/entry.js
generated
vendored
Normal file
3
node_modules/mj-context-menu/js/entry.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=entry.js.map
|
||||
1
node_modules/mj-context-menu/js/entry.js.map
generated
vendored
Normal file
1
node_modules/mj-context-menu/js/entry.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"entry.js","sourceRoot":"","sources":["../ts/entry.ts"],"names":[],"mappings":""}
|
||||
8
node_modules/mj-context-menu/js/html_classes.d.ts
generated
vendored
Normal file
8
node_modules/mj-context-menu/js/html_classes.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
export declare const HtmlClasses: {
|
||||
[id: string]: HtmlClass;
|
||||
};
|
||||
export declare type HtmlClass = 'CtxtMenu_ContextMenu' | 'CtxtMenu_Menu' | 'CtxtMenu_MenuArrow' | 'CtxtMenu_MenuActive' | 'CtxtMenu_MenuCheck' | 'CtxtMenu_MenuClose' | 'CtxtMenu_MenuDisabled' | 'CtxtMenu_MenuItem' | 'CtxtMenu_MenuLabel' | 'CtxtMenu_MenuRadioCheck' | 'CtxtMenu_MenuRule' | 'CtxtMenu_MousePost' | 'CtxtMenu_RTL' | 'CtxtMenu_Attached' | 'CtxtMenu_Info' | 'CtxtMenu_InfoClose' | 'CtxtMenu_InfoContent' | 'CtxtMenu_InfoSignature' | 'CtxtMenu_InfoTitle' | 'CtxtMenu_MenuFrame' | 'CtxtMenu_MenuInputBox' | 'CtxtMenu_MenuSlider' | 'CtxtMenu_Selection' | 'CtxtMenu_SelectionBox' | 'CtxtMenu_SelectionItem' | 'CtxtMenu_SelectionDivider' | 'CtxtMenu_SelectionMenu';
|
||||
export declare const HtmlAttrs: {
|
||||
[id: string]: HtmlAttr;
|
||||
};
|
||||
export declare type HtmlAttr = 'CtxtMenu_Counter' | 'CtxtMenu_keydownFunc' | 'CtxtMenu_contextmenuFunc' | 'CtxtMenu_touchstartFunc' | 'CtxtMenu_Oldtabindex';
|
||||
53
node_modules/mj-context-menu/js/html_classes.js
generated
vendored
Normal file
53
node_modules/mj-context-menu/js/html_classes.js
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.HtmlAttrs = exports.HtmlClasses = void 0;
|
||||
var PREFIX = 'CtxtMenu';
|
||||
function prefix_(name) {
|
||||
return PREFIX + '_' + name;
|
||||
}
|
||||
function prefixClass_(name) {
|
||||
return prefix_(name);
|
||||
}
|
||||
function prefixAttr_(name) {
|
||||
return prefix_(name);
|
||||
}
|
||||
exports.HtmlClasses = {
|
||||
ATTACHED: prefixClass_('Attached'),
|
||||
CONTEXTMENU: prefixClass_('ContextMenu'),
|
||||
MENU: prefixClass_('Menu'),
|
||||
MENUARROW: prefixClass_('MenuArrow'),
|
||||
MENUACTIVE: prefixClass_('MenuActive'),
|
||||
MENUCHECK: prefixClass_('MenuCheck'),
|
||||
MENUCLOSE: prefixClass_('MenuClose'),
|
||||
MENUCOMBOBOX: prefixClass_('MenuComboBox'),
|
||||
MENUDISABLED: prefixClass_('MenuDisabled'),
|
||||
MENUFRAME: prefixClass_('MenuFrame'),
|
||||
MENUITEM: prefixClass_('MenuItem'),
|
||||
MENULABEL: prefixClass_('MenuLabel'),
|
||||
MENURADIOCHECK: prefixClass_('MenuRadioCheck'),
|
||||
MENUINPUTBOX: prefixClass_('MenuInputBox'),
|
||||
MENURULE: prefixClass_('MenuRule'),
|
||||
MENUSLIDER: prefixClass_('MenuSlider'),
|
||||
MOUSEPOST: prefixClass_('MousePost'),
|
||||
RTL: prefixClass_('RTL'),
|
||||
INFO: prefixClass_('Info'),
|
||||
INFOCLOSE: prefixClass_('InfoClose'),
|
||||
INFOCONTENT: prefixClass_('InfoContent'),
|
||||
INFOSIGNATURE: prefixClass_('InfoSignature'),
|
||||
INFOTITLE: prefixClass_('InfoTitle'),
|
||||
SLIDERVALUE: prefixClass_('SliderValue'),
|
||||
SLIDERBAR: prefixClass_('SliderBar'),
|
||||
SELECTION: prefixClass_('Selection'),
|
||||
SELECTIONBOX: prefixClass_('SelectionBox'),
|
||||
SELECTIONMENU: prefixClass_('SelectionMenu'),
|
||||
SELECTIONDIVIDER: prefixClass_('SelectionDivider'),
|
||||
SELECTIONITEM: prefixClass_('SelectionItem')
|
||||
};
|
||||
exports.HtmlAttrs = {
|
||||
COUNTER: prefixAttr_('Counter'),
|
||||
KEYDOWNFUNC: prefixAttr_('keydownFunc'),
|
||||
CONTEXTMENUFUNC: prefixAttr_('contextmenuFunc'),
|
||||
OLDTAB: prefixAttr_('Oldtabindex'),
|
||||
TOUCHFUNC: prefixAttr_('TouchFunc'),
|
||||
};
|
||||
//# sourceMappingURL=html_classes.js.map
|
||||
1
node_modules/mj-context-menu/js/html_classes.js.map
generated
vendored
Normal file
1
node_modules/mj-context-menu/js/html_classes.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"html_classes.js","sourceRoot":"","sources":["../ts/html_classes.ts"],"names":[],"mappings":";;;AA0BA,IAAM,MA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CAAC,eAAe,CAAC;IAC5C,SAAS,EAAE,YAAY,CAAC,WAAW,CAAC;IACpC,WAAW,EAAE,YAAY,CAAC,aAAa,CAAC;IACxC,SAAS,EAAE,YAAY,CAAC,WAAW,CAAC;IACpC,SAAS,EAAE,YAAY,CAAC,WAAW,CAAC;IACpC,YAAY,EAAE,YAAY,CAAC,cAAc,CAAC;IAC1C,aAAa,EAAE,YAAY,CAAC,eAAe,CAAC;IAC5C,gBAAgB,EAAE,YAAY,CAAC,kBAAkB,CAAC;IAClD,aAAa,EAAE,YAAY,CAAC,eAAe,CAAC;CAC7C,CAAC;AAmBW,QAAA,SAAS,GAA6B;IACjD,OAAO,EAAE,WAAW,CAAC,SAAS,CAAC;IAC/B,WAAW,EAAE,WAAW,CAAC,aAAa,CAAC;IACvC,eAAe,EAAE,WAAW,CAAC,iBAAiB,CAAC;IAC/C,MAAM,EAAE,WAAW,CAAC,aAAa,CAAC;IAClC,SAAS,EAAE,WAAW,CAAC,WAAW,CAAC;CACpC,CAAC"}
|
||||
17
node_modules/mj-context-menu/js/index.d.ts
generated
vendored
Normal file
17
node_modules/mj-context-menu/js/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import { ContextMenu as obj0 } from './context_menu';
|
||||
import { CssStyles as obj1 } from './css_util';
|
||||
import { Info as obj2 } from './info';
|
||||
import { Popup as obj3 } from './popup';
|
||||
import { Parser as obj4 } from './parse';
|
||||
import { SelectionBox as obj5 } from './selection_box';
|
||||
import { Variable as obj6 } from './variable';
|
||||
import { ParserFactory as obj7 } from './parser_factory';
|
||||
export declare let ContextMenu: typeof obj0;
|
||||
export declare let CssStyles: typeof obj1;
|
||||
export declare let Info: typeof obj2;
|
||||
export declare let Popup: typeof obj3;
|
||||
export declare let Parser: typeof obj4;
|
||||
export declare let version: string;
|
||||
export declare let SelectionBox: typeof obj5;
|
||||
export declare let Variable: typeof obj6;
|
||||
export declare let ParserFactory: typeof obj7;
|
||||
21
node_modules/mj-context-menu/js/index.js
generated
vendored
Normal file
21
node_modules/mj-context-menu/js/index.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ParserFactory = exports.Variable = exports.SelectionBox = exports.version = exports.Parser = exports.Popup = exports.Info = exports.CssStyles = exports.ContextMenu = void 0;
|
||||
var context_menu_1 = require("./context_menu");
|
||||
var css_util_1 = require("./css_util");
|
||||
var info_1 = require("./info");
|
||||
var popup_1 = require("./popup");
|
||||
var parse_1 = require("./parse");
|
||||
var selection_box_1 = require("./selection_box");
|
||||
var variable_1 = require("./variable");
|
||||
var parser_factory_1 = require("./parser_factory");
|
||||
exports.ContextMenu = context_menu_1.ContextMenu;
|
||||
exports.CssStyles = css_util_1.CssStyles;
|
||||
exports.Info = info_1.Info;
|
||||
exports.Popup = popup_1.Popup;
|
||||
exports.Parser = parse_1.Parser;
|
||||
exports.version = '0.4.2';
|
||||
exports.SelectionBox = selection_box_1.SelectionBox;
|
||||
exports.Variable = variable_1.Variable;
|
||||
exports.ParserFactory = parser_factory_1.ParserFactory;
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/mj-context-menu/js/index.js.map
generated
vendored
Normal file
1
node_modules/mj-context-menu/js/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../ts/index.ts"],"names":[],"mappings":";;;AAAA,+CAAmD;AACnD,uCAA6C;AAC7C,+BAAoC;AACpC,iCAAsC;AACtC,iCAAuC;AACvC,iDAAqD;AACrD,uCAA4C;AAC5C,mDAAuD;AAE5C,QAAA,WAAW,GAAG,0BAAI,CAAC;AACnB,QAAA,SAAS,GAAG,oBAAI,CAAC;AACjB,QAAA,IAAI,GAAG,WAAI,CAAC;AACZ,QAAA,KAAK,GAAG,aAAI,CAAC;AACb,QAAA,MAAM,GAAG,cAAI,CAAC;AACd,QAAA,OAAO,GAAG,OAAO,CAAC;AAClB,QAAA,YAAY,GAAG,4BAAI,CAAC;AACpB,QAAA,QAAQ,GAAG,mBAAI,CAAC;AAChB,QAAA,aAAa,GAAG,8BAAI,CAAC"}
|
||||
28
node_modules/mj-context-menu/js/info.d.ts
generated
vendored
Normal file
28
node_modules/mj-context-menu/js/info.d.ts
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
import { ContextMenu } from './context_menu.js';
|
||||
import { AbstractPostable } from './abstract_postable.js';
|
||||
export declare class Info extends AbstractPostable {
|
||||
private title;
|
||||
private signature;
|
||||
protected className: import("./html_classes.js").HtmlClass;
|
||||
protected role: string;
|
||||
protected contentDiv: HTMLElement;
|
||||
menu: ContextMenu;
|
||||
private close;
|
||||
private content;
|
||||
constructor(title: string, content: Function, signature: string);
|
||||
attachMenu(menu: ContextMenu): void;
|
||||
generateHtml(): void;
|
||||
post(): void;
|
||||
protected display(): void;
|
||||
click(_event: MouseEvent): void;
|
||||
keydown(event: KeyboardEvent): void;
|
||||
escape(_event: KeyboardEvent): void;
|
||||
unpost(): void;
|
||||
private generateClose;
|
||||
private generateTitle;
|
||||
protected generateContent(): HTMLElement;
|
||||
private generateSignature;
|
||||
toJson(): {
|
||||
type: string;
|
||||
};
|
||||
}
|
||||
112
node_modules/mj-context-menu/js/info.js
generated
vendored
Normal file
112
node_modules/mj-context-menu/js/info.js
generated
vendored
Normal file
@@ -0,0 +1,112 @@
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Info = void 0;
|
||||
var close_button_js_1 = require("./close_button.js");
|
||||
var html_classes_js_1 = require("./html_classes.js");
|
||||
var abstract_postable_js_1 = require("./abstract_postable.js");
|
||||
var Info = (function (_super) {
|
||||
__extends(Info, _super);
|
||||
function Info(title, content, signature) {
|
||||
var _this = _super.call(this) || this;
|
||||
_this.title = title;
|
||||
_this.signature = signature;
|
||||
_this.className = html_classes_js_1.HtmlClasses['INFO'];
|
||||
_this.role = 'dialog';
|
||||
_this.contentDiv = _this.generateContent();
|
||||
_this.close = _this.generateClose();
|
||||
_this.content = content || function () { return ''; };
|
||||
return _this;
|
||||
}
|
||||
Info.prototype.attachMenu = function (menu) {
|
||||
this.menu = menu;
|
||||
};
|
||||
Info.prototype.generateHtml = function () {
|
||||
_super.prototype.generateHtml.call(this);
|
||||
var html = this.html;
|
||||
html.appendChild(this.generateTitle());
|
||||
html.appendChild(this.contentDiv);
|
||||
html.appendChild(this.generateSignature());
|
||||
html.appendChild(this.close.html);
|
||||
html.setAttribute('tabindex', '0');
|
||||
};
|
||||
Info.prototype.post = function () {
|
||||
_super.prototype.post.call(this);
|
||||
var doc = document.documentElement;
|
||||
var html = this.html;
|
||||
var H = window.innerHeight || doc.clientHeight || doc.scrollHeight || 0;
|
||||
var x = Math.floor((-html.offsetWidth) / 2);
|
||||
var y = Math.floor((H - html.offsetHeight) / 3);
|
||||
html.setAttribute('style', 'margin-left: ' + x + 'px; top: ' + y + 'px;');
|
||||
if (window.event instanceof MouseEvent) {
|
||||
html.classList.add(html_classes_js_1.HtmlClasses['MOUSEPOST']);
|
||||
}
|
||||
html.focus();
|
||||
};
|
||||
Info.prototype.display = function () {
|
||||
this.menu.registerWidget(this);
|
||||
this.contentDiv.innerHTML = this.content();
|
||||
var html = this.menu.html;
|
||||
if (html.parentNode) {
|
||||
html.parentNode.removeChild(html);
|
||||
}
|
||||
this.menu.frame.appendChild(this.html);
|
||||
};
|
||||
Info.prototype.click = function (_event) { };
|
||||
Info.prototype.keydown = function (event) {
|
||||
this.bubbleKey();
|
||||
_super.prototype.keydown.call(this, event);
|
||||
};
|
||||
Info.prototype.escape = function (_event) {
|
||||
this.unpost();
|
||||
};
|
||||
Info.prototype.unpost = function () {
|
||||
_super.prototype.unpost.call(this);
|
||||
this.html.classList.remove(html_classes_js_1.HtmlClasses['MOUSEPOST']);
|
||||
this.menu.unregisterWidget(this);
|
||||
};
|
||||
Info.prototype.generateClose = function () {
|
||||
var close = new close_button_js_1.CloseButton(this);
|
||||
var html = close.html;
|
||||
html.classList.add(html_classes_js_1.HtmlClasses['INFOCLOSE']);
|
||||
html.setAttribute('aria-label', 'Close Dialog Box');
|
||||
return close;
|
||||
};
|
||||
Info.prototype.generateTitle = function () {
|
||||
var span = document.createElement('span');
|
||||
span.innerHTML = this.title;
|
||||
span.classList.add(html_classes_js_1.HtmlClasses['INFOTITLE']);
|
||||
return span;
|
||||
};
|
||||
Info.prototype.generateContent = function () {
|
||||
var div = document.createElement('div');
|
||||
div.classList.add(html_classes_js_1.HtmlClasses['INFOCONTENT']);
|
||||
div.setAttribute('tabindex', '0');
|
||||
return div;
|
||||
};
|
||||
Info.prototype.generateSignature = function () {
|
||||
var span = document.createElement('span');
|
||||
span.innerHTML = this.signature;
|
||||
span.classList.add(html_classes_js_1.HtmlClasses['INFOSIGNATURE']);
|
||||
return span;
|
||||
};
|
||||
Info.prototype.toJson = function () {
|
||||
return { type: ''
|
||||
};
|
||||
};
|
||||
return Info;
|
||||
}(abstract_postable_js_1.AbstractPostable));
|
||||
exports.Info = Info;
|
||||
//# sourceMappingURL=info.js.map
|
||||
1
node_modules/mj-context-menu/js/info.js.map
generated
vendored
Normal file
1
node_modules/mj-context-menu/js/info.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"info.js","sourceRoot":"","sources":["../ts/info.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAwBA,qDAA8C;AAE9C,qDAA8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IAAI,CAAC;IACd,CAAC;IAKM,qBAAM,GAAb;QACE,OAAO,EAAC,IAAI,EAAE,EAAE;SACR,CAAC;IACX,CAAC;IAEH,WAAC;AAAD,CAAC,AA3KD,CAA0B,uCAAgB,GA2KzC;AA3KY,oBAAI"}
|
||||
11
node_modules/mj-context-menu/js/item.d.ts
generated
vendored
Normal file
11
node_modules/mj-context-menu/js/item.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import { Element } from './element.js';
|
||||
import { Entry } from './entry.js';
|
||||
export interface Item extends Entry, Element {
|
||||
content: string;
|
||||
id: string;
|
||||
press(): void;
|
||||
focus(): void;
|
||||
unfocus(): void;
|
||||
disable(): void;
|
||||
enable(): void;
|
||||
}
|
||||
3
node_modules/mj-context-menu/js/item.js
generated
vendored
Normal file
3
node_modules/mj-context-menu/js/item.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=item.js.map
|
||||
1
node_modules/mj-context-menu/js/item.js.map
generated
vendored
Normal file
1
node_modules/mj-context-menu/js/item.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"item.js","sourceRoot":"","sources":["../ts/item.ts"],"names":[],"mappings":""}
|
||||
19
node_modules/mj-context-menu/js/item_checkbox.d.ts
generated
vendored
Normal file
19
node_modules/mj-context-menu/js/item_checkbox.d.ts
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
import { AbstractVariableItem } from './abstract_variable_item.js';
|
||||
import { Menu } from './menu.js';
|
||||
import { ParserFactory } from './parser_factory.js';
|
||||
export declare class Checkbox extends AbstractVariableItem<boolean> {
|
||||
protected role: string;
|
||||
static fromJson(_factory: ParserFactory, { content: content, variable: variable, id: id }: {
|
||||
content: string;
|
||||
variable: string;
|
||||
id: string;
|
||||
}, menu: Menu): Checkbox;
|
||||
constructor(menu: Menu, content: string, variable: string, id?: string);
|
||||
executeAction(): void;
|
||||
generateSpan(): void;
|
||||
protected updateAria(): void;
|
||||
updateSpan(): void;
|
||||
toJson(): {
|
||||
type: string;
|
||||
};
|
||||
}
|
||||
55
node_modules/mj-context-menu/js/item_checkbox.js
generated
vendored
Normal file
55
node_modules/mj-context-menu/js/item_checkbox.js
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Checkbox = void 0;
|
||||
var abstract_variable_item_js_1 = require("./abstract_variable_item.js");
|
||||
var menu_util_js_1 = require("./menu_util.js");
|
||||
var html_classes_js_1 = require("./html_classes.js");
|
||||
var Checkbox = (function (_super) {
|
||||
__extends(Checkbox, _super);
|
||||
function Checkbox(menu, content, variable, id) {
|
||||
var _this = _super.call(this, menu, 'checkbox', content, id) || this;
|
||||
_this.role = 'menuitemcheckbox';
|
||||
_this.variable = menu.pool.lookup(variable);
|
||||
_this.register();
|
||||
return _this;
|
||||
}
|
||||
Checkbox.fromJson = function (_factory, _a, menu) {
|
||||
var content = _a.content, variable = _a.variable, id = _a.id;
|
||||
return new this(menu, content, variable, id);
|
||||
};
|
||||
Checkbox.prototype.executeAction = function () {
|
||||
this.variable.setValue(!this.variable.getValue());
|
||||
menu_util_js_1.MenuUtil.close(this);
|
||||
};
|
||||
Checkbox.prototype.generateSpan = function () {
|
||||
this.span = document.createElement('span');
|
||||
this.span.textContent = '\u2713';
|
||||
this.span.classList.add(html_classes_js_1.HtmlClasses['MENUCHECK']);
|
||||
};
|
||||
Checkbox.prototype.updateAria = function () {
|
||||
this.html.setAttribute('aria-checked', this.variable.getValue() ? 'true' : 'false');
|
||||
};
|
||||
Checkbox.prototype.updateSpan = function () {
|
||||
this.span.style.display = this.variable.getValue() ? '' : 'none';
|
||||
};
|
||||
Checkbox.prototype.toJson = function () {
|
||||
return { type: ''
|
||||
};
|
||||
};
|
||||
return Checkbox;
|
||||
}(abstract_variable_item_js_1.AbstractVariableItem));
|
||||
exports.Checkbox = Checkbox;
|
||||
//# sourceMappingURL=item_checkbox.js.map
|
||||
1
node_modules/mj-context-menu/js/item_checkbox.js.map
generated
vendored
Normal file
1
node_modules/mj-context-menu/js/item_checkbox.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"item_checkbox.js","sourceRoot":"","sources":["../ts/item_checkbox.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAwBA,yEAAiE;AAEjE,+CAAwC;AAExC,qDAA8C;AAI9C;IAA8B,4BAA6B;IA6BzD,kBAAY,IAAU,EAAE,OAAe,EAAE,QAAgB,EAAE,EAAW;QAAtE,YACE,kBAAM,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,CAAC,SAGrC;QA5BS,UAAI,GAAG,kBAAkB,CAAC;QA0BlC,KAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAsB,CAAC;QAChE,KAAI,CAAC,QAAQ,EAAE,CAAC;;IAClB,CAAC;IApBa,iBAAQ,GAAtB,UACE,QAAuB,EACvB,EAC+C,EAAE,IAAU;YADjD,OAAO,aAAA,EAAY,QAAQ,cAAA,EAAM,EAAE,QAAA;QAE7C,OAAO,IAAI,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;IAE/C,CAAC;IAmBM,gCAAa,GAApB;QACE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;QAClD,uBAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACvB,CAAC;IAKM,+BAAY,GAAnB;QACE,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QAC3C,IAAI,CAAC,IAAI,CAAC,WAAW,GAAG,QAAQ,CAAC;QACjC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,6BAAW,CAAC,WAAW,CAAC,CAAC,CAAC;IACpD,CAAC;IAMS,6BAAU,GAApB;QACE,IAAI,CAAC,IAAI,CAAC,YAAY,CACpB,cAAc,EACd,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAC5C,CAAC;IACJ,CAAC;IAKM,6BAAU,GAAjB;QACE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC;IACnE,CAAC;IAKM,yBAAM,GAAb;QACE,OAAO,EAAC,IAAI,EAAE,EAAE;SACR,CAAC;IACX,CAAC;IAEH,eAAC;AAAD,CAAC,AA9ED,CAA8B,gDAAoB,GA8EjD;AA9EY,4BAAQ"}
|
||||
27
node_modules/mj-context-menu/js/item_combo.d.ts
generated
vendored
Normal file
27
node_modules/mj-context-menu/js/item_combo.d.ts
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
import { AbstractVariableItem } from './abstract_variable_item.js';
|
||||
import { Menu } from './menu.js';
|
||||
import { ParserFactory } from './parser_factory.js';
|
||||
export declare class Combo extends AbstractVariableItem<string> {
|
||||
protected role: string;
|
||||
private input;
|
||||
private inputEvent;
|
||||
static fromJson(_factory: ParserFactory, { content: content, variable: variable, id: id }: {
|
||||
content: string;
|
||||
variable: string;
|
||||
id: string;
|
||||
}, menu: Menu): Combo;
|
||||
constructor(menu: Menu, content: string, variable: string, id?: string);
|
||||
executeAction(): void;
|
||||
space(event: KeyboardEvent): void;
|
||||
focus(): void;
|
||||
unfocus(): void;
|
||||
generateHtml(): void;
|
||||
generateSpan(): void;
|
||||
inputKey(_event: KeyboardEvent): void;
|
||||
keydown(event: KeyboardEvent): void;
|
||||
protected updateAria(): void;
|
||||
protected updateSpan(): void;
|
||||
toJson(): {
|
||||
type: string;
|
||||
};
|
||||
}
|
||||
98
node_modules/mj-context-menu/js/item_combo.js
generated
vendored
Normal file
98
node_modules/mj-context-menu/js/item_combo.js
generated
vendored
Normal file
@@ -0,0 +1,98 @@
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Combo = void 0;
|
||||
var abstract_variable_item_js_1 = require("./abstract_variable_item.js");
|
||||
var menu_util_js_1 = require("./menu_util.js");
|
||||
var html_classes_js_1 = require("./html_classes.js");
|
||||
var key_navigatable_js_1 = require("./key_navigatable.js");
|
||||
var Combo = (function (_super) {
|
||||
__extends(Combo, _super);
|
||||
function Combo(menu, content, variable, id) {
|
||||
var _this = _super.call(this, menu, 'combobox', content, id) || this;
|
||||
_this.role = 'combobox';
|
||||
_this.inputEvent = false;
|
||||
_this.variable = menu.pool.lookup(variable);
|
||||
_this.register();
|
||||
return _this;
|
||||
}
|
||||
Combo.fromJson = function (_factory, _a, menu) {
|
||||
var content = _a.content, variable = _a.variable, id = _a.id;
|
||||
return new this(menu, content, variable, id);
|
||||
};
|
||||
Combo.prototype.executeAction = function () {
|
||||
this.variable.setValue(this.input.value, menu_util_js_1.MenuUtil.getActiveElement(this));
|
||||
};
|
||||
Combo.prototype.space = function (event) {
|
||||
_super.prototype.space.call(this, event);
|
||||
menu_util_js_1.MenuUtil.close(this);
|
||||
};
|
||||
Combo.prototype.focus = function () {
|
||||
_super.prototype.focus.call(this);
|
||||
this.input.focus();
|
||||
};
|
||||
Combo.prototype.unfocus = function () {
|
||||
_super.prototype.unfocus.call(this);
|
||||
this.updateSpan();
|
||||
};
|
||||
Combo.prototype.generateHtml = function () {
|
||||
_super.prototype.generateHtml.call(this);
|
||||
var html = this.html;
|
||||
html.classList.add(html_classes_js_1.HtmlClasses['MENUCOMBOBOX']);
|
||||
};
|
||||
Combo.prototype.generateSpan = function () {
|
||||
this.span = document.createElement('span');
|
||||
this.span.classList.add(html_classes_js_1.HtmlClasses['MENUINPUTBOX']);
|
||||
this.input = document.createElement('input');
|
||||
this.input.addEventListener('keydown', this.inputKey.bind(this));
|
||||
this.input.setAttribute('size', '10em');
|
||||
this.input.setAttribute('type', 'text');
|
||||
this.input.setAttribute('tabindex', '-1');
|
||||
this.span.appendChild(this.input);
|
||||
};
|
||||
Combo.prototype.inputKey = function (_event) {
|
||||
this.bubbleKey();
|
||||
this.inputEvent = true;
|
||||
};
|
||||
Combo.prototype.keydown = function (event) {
|
||||
if (this.inputEvent &&
|
||||
event.keyCode !== key_navigatable_js_1.KEY.ESCAPE &&
|
||||
event.keyCode !== key_navigatable_js_1.KEY.RETURN) {
|
||||
this.inputEvent = false;
|
||||
event.stopPropagation();
|
||||
return;
|
||||
}
|
||||
_super.prototype.keydown.call(this, event);
|
||||
event.stopPropagation();
|
||||
};
|
||||
Combo.prototype.updateAria = function () { };
|
||||
Combo.prototype.updateSpan = function () {
|
||||
var initValue;
|
||||
try {
|
||||
initValue = this.variable.getValue(menu_util_js_1.MenuUtil.getActiveElement(this));
|
||||
}
|
||||
catch (e) {
|
||||
initValue = '';
|
||||
}
|
||||
this.input.value = initValue;
|
||||
};
|
||||
Combo.prototype.toJson = function () {
|
||||
return { type: ''
|
||||
};
|
||||
};
|
||||
return Combo;
|
||||
}(abstract_variable_item_js_1.AbstractVariableItem));
|
||||
exports.Combo = Combo;
|
||||
//# sourceMappingURL=item_combo.js.map
|
||||
1
node_modules/mj-context-menu/js/item_combo.js.map
generated
vendored
Normal file
1
node_modules/mj-context-menu/js/item_combo.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"item_combo.js","sourceRoot":"","sources":["../ts/item_combo.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAyBA,yEAAiE;AAEjE,+CAAwC;AAExC,qDAA8C;AAC9C,2DAAyC;AAIzC;IAA2B,yBAA4B;IAgCrD,eAAY,IAAU,EAAE,OAAe,EAAE,QAAgB,EAAE,EAAW;QAAtE,YACE,kBAAM,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,CAAC,SAGrC;QA/BS,UAAI,GAAG,UAAU,CAAC;QAIpB,gBAAU,GAAY,KAAK,CAAC;QAyBlC,KAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAqB,CAAC;QAC/D,KAAI,CAAC,QAAQ,EAAE,CAAC;;IAClB,CAAC;IAnBa,cAAQ,GAAtB,UACE,QAAuB,EACvB,EAC+C,EAAE,IAAU;YADjD,OAAO,aAAA,EAAY,QAAQ,cAAA,EAAM,EAAE,QAAA;QAE7C,OAAO,IAAI,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;IAC/C,CAAC;IAmBM,6BAAa,GAApB;QACE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CACpB,IAAI,CAAC,KAAK,C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,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IAOM,wBAAQ,GAAf,UAAgB,MAAqB;QACnC,IAAI,CAAC,SAAS,EAAE,CAAC;QACjB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;IACzB,CAAC;IAOM,uBAAO,GAAd,UAAe,KAAoB;QACjC,IAAI,IAAI,CAAC,UAAU;YACf,KAAK,CAAC,OAAO,KAAK,wBAAG,CAAC,MAAM;YAC5B,KAAK,CAAC,OAAO,KAAK,wBAAG,CAAC,MAAM,EAAE;YAChC,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;YACxB,KAAK,CAAC,eAAe,EAAE,CAAC;YACxB,OAAO;SACR;QACD,iBAAM,OAAO,YAAC,KAAK,CAAC,CAAC;QACrB,KAAK,CAAC,eAAe,EAAE,CAAC;IAC1B,CAAC;IAKS,0BAAU,GAApB,cAAyB,CAAC;IAKhB,0BAAU,GAApB;QACE,IAAI,SAAS,CAAC;QACd,IAAI;YACF,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,uBAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC;SACrE;QAAC,OAAO,CAAC,EAAE;YACV,SAAS,GAAG,EAAE,CAAC;SAChB;QACD,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,SAAS,CAAC;IAC/B,CAAC;IAKM,sBAAM,GAAb;QACE,OAAO,EAAC,IAAI,EAAE,EAAE;SACR,CAAC;IACX,CAAC;IAEH,YAAC;AAAD,CAAC,AAlJD,CAA2B,gDAAoB,GAkJ9C;AAlJY,sBAAK"}
|
||||
16
node_modules/mj-context-menu/js/item_command.d.ts
generated
vendored
Normal file
16
node_modules/mj-context-menu/js/item_command.d.ts
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import { AbstractItem } from './abstract_item.js';
|
||||
import { Menu } from './menu.js';
|
||||
import { ParserFactory } from './parser_factory.js';
|
||||
export declare class Command extends AbstractItem {
|
||||
private command;
|
||||
static fromJson(_factory: ParserFactory, { content: content, action: action, id: id }: {
|
||||
content: string;
|
||||
action: Function;
|
||||
id: string;
|
||||
}, menu: Menu): Command;
|
||||
constructor(menu: Menu, content: string, command: Function, id?: string);
|
||||
executeAction(): void;
|
||||
toJson(): {
|
||||
type: string;
|
||||
};
|
||||
}
|
||||
46
node_modules/mj-context-menu/js/item_command.js
generated
vendored
Normal file
46
node_modules/mj-context-menu/js/item_command.js
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Command = void 0;
|
||||
var abstract_item_js_1 = require("./abstract_item.js");
|
||||
var menu_util_js_1 = require("./menu_util.js");
|
||||
var Command = (function (_super) {
|
||||
__extends(Command, _super);
|
||||
function Command(menu, content, command, id) {
|
||||
var _this = _super.call(this, menu, 'command', content, id) || this;
|
||||
_this.command = command;
|
||||
return _this;
|
||||
}
|
||||
Command.fromJson = function (_factory, _a, menu) {
|
||||
var content = _a.content, action = _a.action, id = _a.id;
|
||||
return new this(menu, content, action, id);
|
||||
};
|
||||
Command.prototype.executeAction = function () {
|
||||
try {
|
||||
this.command(menu_util_js_1.MenuUtil.getActiveElement(this));
|
||||
}
|
||||
catch (e) {
|
||||
menu_util_js_1.MenuUtil.error(e, 'Illegal command callback.');
|
||||
}
|
||||
menu_util_js_1.MenuUtil.close(this);
|
||||
};
|
||||
Command.prototype.toJson = function () {
|
||||
return { type: ''
|
||||
};
|
||||
};
|
||||
return Command;
|
||||
}(abstract_item_js_1.AbstractItem));
|
||||
exports.Command = Command;
|
||||
//# sourceMappingURL=item_command.js.map
|
||||
1
node_modules/mj-context-menu/js/item_command.js.map
generated
vendored
Normal file
1
node_modules/mj-context-menu/js/item_command.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"item_command.js","sourceRoot":"","sources":["../ts/item_command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAwBA,uDAAgD;AAChD,+CAAwC;AAKxC;IAA6B,2BAAY;IAwBvC,iBAAY,IAAU,EAAE,OAAe,EAAU,OAAiB,EACtD,EAAW;QADvB,YAEE,kBAAM,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,CAAC,SACpC;QAHgD,aAAO,GAAP,OAAO,CAAU;;IAGlE,CAAC;IAnBa,gBAAQ,GAAtB,UACE,QAAuB,EACvB,EAC+C,EAAE,IAAU;YADjD,OAAO,aAAA,EAAU,MAAM,YAAA,EAAM,EAAE,QAAA;QAEzC,OAAO,IAAI,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;IAC7C,CAAC;IAmBM,+BAAa,GAApB;QACE,IAAI;YACF,IAAI,CAAC,OAAO,CAAC,uBAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC;SAC/C;QAAC,OAAO,CAAC,EAAE;YACV,uBAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,2BAA2B,CAAC,CAAC;SAChD;QACD,uBAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACvB,CAAC;IAKM,wBAAM,GAAb;QACE,OAAO,EAAC,IAAI,EAAE,EAAE;SACR,CAAC;IACX,CAAC;IAEH,cAAC;AAAD,CAAC,AAjDD,CAA6B,+BAAY,GAiDxC;AAjDY,0BAAO"}
|
||||
14
node_modules/mj-context-menu/js/item_label.d.ts
generated
vendored
Normal file
14
node_modules/mj-context-menu/js/item_label.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import { AbstractItem } from './abstract_item.js';
|
||||
import { Menu } from './menu.js';
|
||||
import { ParserFactory } from './parser_factory.js';
|
||||
export declare class Label extends AbstractItem {
|
||||
static fromJson(_factory: ParserFactory, { content: content, id: id }: {
|
||||
content: string;
|
||||
id: string;
|
||||
}, menu: Menu): Label;
|
||||
constructor(menu: Menu, content: string, id?: string);
|
||||
generateHtml(): void;
|
||||
toJson(): {
|
||||
type: string;
|
||||
};
|
||||
}
|
||||
40
node_modules/mj-context-menu/js/item_label.js
generated
vendored
Normal file
40
node_modules/mj-context-menu/js/item_label.js
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Label = void 0;
|
||||
var abstract_item_js_1 = require("./abstract_item.js");
|
||||
var html_classes_js_1 = require("./html_classes.js");
|
||||
var Label = (function (_super) {
|
||||
__extends(Label, _super);
|
||||
function Label(menu, content, id) {
|
||||
return _super.call(this, menu, 'label', content, id) || this;
|
||||
}
|
||||
Label.fromJson = function (_factory, _a, menu) {
|
||||
var content = _a.content, id = _a.id;
|
||||
return new this(menu, content, id);
|
||||
};
|
||||
Label.prototype.generateHtml = function () {
|
||||
_super.prototype.generateHtml.call(this);
|
||||
var html = this.html;
|
||||
html.classList.add(html_classes_js_1.HtmlClasses['MENULABEL']);
|
||||
};
|
||||
Label.prototype.toJson = function () {
|
||||
return { type: ''
|
||||
};
|
||||
};
|
||||
return Label;
|
||||
}(abstract_item_js_1.AbstractItem));
|
||||
exports.Label = Label;
|
||||
//# sourceMappingURL=item_label.js.map
|
||||
1
node_modules/mj-context-menu/js/item_label.js.map
generated
vendored
Normal file
1
node_modules/mj-context-menu/js/item_label.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"item_label.js","sourceRoot":"","sources":["../ts/item_label.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAwBA,uDAAgD;AAEhD,qDAA8C;AAI9C;IAA2B,yBAAY;IAsBrC,eAAY,IAAU,EAAE,OAAe,EAAE,EAAW;eAClD,kBAAM,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,CAAC;IACnC,CAAC;IAhBa,cAAQ,GAAtB,UACE,QAAuB,EACvB,EAAyD,EACzD,IAAU;YADA,OAAO,aAAA,EAAM,EAAE,QAAA;QAEzB,OAAO,IAAI,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC;IACrC,CAAC;IAgBM,4BAAY,GAAnB;QACE,iBAAM,YAAY,WAAE,CAAC;QACrB,IAAI,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACrB,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,6BAAW,CAAC,WAAW,CAAC,CAAC,CAAC;IAC/C,CAAC;IAKM,sBAAM,GAAb;QACE,OAAO,EAAC,IAAI,EAAE,EAAE;SACR,CAAC;IACX,CAAC;IAEH,YAAC;AAAD,CAAC,AA3CD,CAA2B,+BAAY,GA2CtC;AA3CY,sBAAK"}
|
||||
19
node_modules/mj-context-menu/js/item_radio.d.ts
generated
vendored
Normal file
19
node_modules/mj-context-menu/js/item_radio.d.ts
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
import { AbstractVariableItem } from './abstract_variable_item.js';
|
||||
import { Menu } from './menu.js';
|
||||
import { ParserFactory } from './parser_factory.js';
|
||||
export declare class Radio extends AbstractVariableItem<string> {
|
||||
protected role: string;
|
||||
static fromJson(_factory: ParserFactory, { content: content, variable: variable, id: id }: {
|
||||
content: string;
|
||||
variable: string;
|
||||
id: string;
|
||||
}, menu: Menu): Radio;
|
||||
constructor(menu: Menu, content: string, variable: string, id?: string);
|
||||
executeAction(): void;
|
||||
generateSpan(): void;
|
||||
protected updateAria(): void;
|
||||
protected updateSpan(): void;
|
||||
toJson(): {
|
||||
type: string;
|
||||
};
|
||||
}
|
||||
56
node_modules/mj-context-menu/js/item_radio.js
generated
vendored
Normal file
56
node_modules/mj-context-menu/js/item_radio.js
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Radio = void 0;
|
||||
var abstract_variable_item_js_1 = require("./abstract_variable_item.js");
|
||||
var menu_util_js_1 = require("./menu_util.js");
|
||||
var html_classes_js_1 = require("./html_classes.js");
|
||||
var Radio = (function (_super) {
|
||||
__extends(Radio, _super);
|
||||
function Radio(menu, content, variable, id) {
|
||||
var _this = _super.call(this, menu, 'radio', content, id) || this;
|
||||
_this.role = 'menuitemradio';
|
||||
_this.variable = menu.pool.lookup(variable);
|
||||
_this.register();
|
||||
return _this;
|
||||
}
|
||||
Radio.fromJson = function (_factory, _a, menu) {
|
||||
var content = _a.content, variable = _a.variable, id = _a.id;
|
||||
return new this(menu, content, variable, id);
|
||||
};
|
||||
Radio.prototype.executeAction = function () {
|
||||
this.variable.setValue(this.id);
|
||||
menu_util_js_1.MenuUtil.close(this);
|
||||
};
|
||||
Radio.prototype.generateSpan = function () {
|
||||
this.span = document.createElement('span');
|
||||
this.span.textContent = '\u2713';
|
||||
this.span.classList.add(html_classes_js_1.HtmlClasses['MENURADIOCHECK']);
|
||||
};
|
||||
Radio.prototype.updateAria = function () {
|
||||
this.html.setAttribute('aria-checked', this.variable.getValue() === this.id ? 'true' : 'false');
|
||||
};
|
||||
Radio.prototype.updateSpan = function () {
|
||||
this.span.style.display =
|
||||
this.variable.getValue() === this.id ? '' : 'none';
|
||||
};
|
||||
Radio.prototype.toJson = function () {
|
||||
return { type: ''
|
||||
};
|
||||
};
|
||||
return Radio;
|
||||
}(abstract_variable_item_js_1.AbstractVariableItem));
|
||||
exports.Radio = Radio;
|
||||
//# sourceMappingURL=item_radio.js.map
|
||||
1
node_modules/mj-context-menu/js/item_radio.js.map
generated
vendored
Normal file
1
node_modules/mj-context-menu/js/item_radio.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"item_radio.js","sourceRoot":"","sources":["../ts/item_radio.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAyBA,yEAAiE;AAGjE,+CAAwC;AACxC,qDAA8C;AAI9C;IAA2B,yBAA4B;IA4BrD,eAAY,IAAU,EAAE,OAAe,EAAE,QAAgB,EAAE,EAAW;QAAtE,YACE,kBAAM,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,CAAC,SAGlC;QA3BS,UAAI,GAAG,eAAe,CAAC;QAyB/B,KAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAqB,CAAC;QAC/D,KAAI,CAAC,QAAQ,EAAE,CAAC;;IAClB,CAAC;IA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
node_modules/mj-context-menu/js/item_rule.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import { AbstractEntry } from './abstract_entry.js';
|
||||
import { Menu } from './menu.js';
|
||||
import { ParserFactory } from './parser_factory.js';
|
||||
export declare class Rule extends AbstractEntry {
|
||||
protected className: import("./html_classes.js").HtmlClass;
|
||||
protected role: string;
|
||||
static fromJson(_factory: ParserFactory, {}: {}, menu: Menu): Rule;
|
||||
constructor(menu: Menu);
|
||||
generateHtml(): void;
|
||||
addEvents(_element: HTMLElement): void;
|
||||
toJson(): {
|
||||
type: string;
|
||||
};
|
||||
}
|
||||
43
node_modules/mj-context-menu/js/item_rule.js
generated
vendored
Normal file
43
node_modules/mj-context-menu/js/item_rule.js
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Rule = void 0;
|
||||
var abstract_entry_js_1 = require("./abstract_entry.js");
|
||||
var html_classes_js_1 = require("./html_classes.js");
|
||||
var Rule = (function (_super) {
|
||||
__extends(Rule, _super);
|
||||
function Rule(menu) {
|
||||
var _this = _super.call(this, menu, 'rule') || this;
|
||||
_this.className = html_classes_js_1.HtmlClasses['MENUITEM'];
|
||||
_this.role = 'separator';
|
||||
return _this;
|
||||
}
|
||||
Rule.fromJson = function (_factory, _a, menu) {
|
||||
return new this(menu);
|
||||
};
|
||||
Rule.prototype.generateHtml = function () {
|
||||
_super.prototype.generateHtml.call(this);
|
||||
var html = this.html;
|
||||
html.classList.add(html_classes_js_1.HtmlClasses['MENURULE']);
|
||||
html.setAttribute('aria-orientation', 'vertical');
|
||||
};
|
||||
Rule.prototype.addEvents = function (_element) { };
|
||||
Rule.prototype.toJson = function () {
|
||||
return { type: 'rule' };
|
||||
};
|
||||
return Rule;
|
||||
}(abstract_entry_js_1.AbstractEntry));
|
||||
exports.Rule = Rule;
|
||||
//# sourceMappingURL=item_rule.js.map
|
||||
1
node_modules/mj-context-menu/js/item_rule.js.map
generated
vendored
Normal file
1
node_modules/mj-context-menu/js/item_rule.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"item_rule.js","sourceRoot":"","sources":["../ts/item_rule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAwBA,yDAAkD;AAElD,qDAA8C;AAI9C;IAA0B,wBAAa;IA2BrC,cAAY,IAAU;QAAtB,YACE,kBAAM,IAAI,EAAE,MAAM,CAAC,SACpB;QAxBS,eAAS,GAAG,6BAAW,CAAC,UAAU,CAAC,CAAC;QAKpC,UAAI,GAAG,WAAW,CAAC;;IAmB7B,CAAC;IAXa,aAAQ,GAAtB,UAAuB,QAAuB,EAAE,EAAM,EAAE,IAAU;QAChE,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;IAcM,2BAAY,GAAnB;QACE,iBAAM,YAAY,WAAE,CAAC;QACrB,IAAI,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACrB,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,6BAAW,CAAC,UAAU,CAAC,CAAC,CAAC;QAC5C,IAAI,CAAC,YAAY,CAAC,kBAAkB,EAAE,UAAU,CAAC,CAAC;IACpD,CAAC;IAKM,wBAAS,GAAhB,UAAiB,QAAqB,IAAI,CAAC;IAKpC,qBAAM,GAAb;QACE,OAAO,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;IACxB,CAAC;IAEH,WAAC;AAAD,CAAC,AArDD,CAA0B,iCAAa,GAqDtC;AArDY,oBAAI"}
|
||||
33
node_modules/mj-context-menu/js/item_slider.d.ts
generated
vendored
Normal file
33
node_modules/mj-context-menu/js/item_slider.d.ts
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
import { AbstractVariableItem } from './abstract_variable_item.js';
|
||||
import { Menu } from './menu.js';
|
||||
import { ParserFactory } from './parser_factory.js';
|
||||
export declare class Slider extends AbstractVariableItem<string> {
|
||||
protected role: string;
|
||||
private labelSpan;
|
||||
private valueSpan;
|
||||
private labelId;
|
||||
private valueId;
|
||||
private input;
|
||||
private inputEvent;
|
||||
static fromJson(_factory: ParserFactory, { content: content, variable: variable, id: id }: {
|
||||
content: string;
|
||||
variable: string;
|
||||
id: string;
|
||||
}, menu: Menu): Slider;
|
||||
constructor(menu: Menu, content: string, variable: string, id?: string);
|
||||
executeAction(): void;
|
||||
space(event: KeyboardEvent): void;
|
||||
focus(): void;
|
||||
unfocus(): void;
|
||||
generateHtml(): void;
|
||||
generateSpan(): void;
|
||||
inputKey(_event: KeyboardEvent): void;
|
||||
mousedown(event: MouseEvent): void;
|
||||
mouseup(_event: MouseEvent): void;
|
||||
keydown(event: KeyboardEvent): void;
|
||||
protected updateAria(): void;
|
||||
protected updateSpan(): void;
|
||||
toJson(): {
|
||||
type: string;
|
||||
};
|
||||
}
|
||||
130
node_modules/mj-context-menu/js/item_slider.js
generated
vendored
Normal file
130
node_modules/mj-context-menu/js/item_slider.js
generated
vendored
Normal file
@@ -0,0 +1,130 @@
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Slider = void 0;
|
||||
var abstract_variable_item_js_1 = require("./abstract_variable_item.js");
|
||||
var menu_util_js_1 = require("./menu_util.js");
|
||||
var html_classes_js_1 = require("./html_classes.js");
|
||||
var key_navigatable_js_1 = require("./key_navigatable.js");
|
||||
var Slider = (function (_super) {
|
||||
__extends(Slider, _super);
|
||||
function Slider(menu, content, variable, id) {
|
||||
var _this = _super.call(this, menu, 'slider', content, id) || this;
|
||||
_this.role = 'slider';
|
||||
_this.labelId = 'ctx_slideLabel' + menu_util_js_1.MenuUtil.counter();
|
||||
_this.valueId = 'ctx_slideValue' + menu_util_js_1.MenuUtil.counter();
|
||||
_this.inputEvent = false;
|
||||
_this.variable = menu.pool.lookup(variable);
|
||||
_this.register();
|
||||
return _this;
|
||||
}
|
||||
Slider.fromJson = function (_factory, _a, menu) {
|
||||
var content = _a.content, variable = _a.variable, id = _a.id;
|
||||
return new this(menu, content, variable, id);
|
||||
};
|
||||
Slider.prototype.executeAction = function () {
|
||||
this.variable.setValue(this.input.value, menu_util_js_1.MenuUtil.getActiveElement(this));
|
||||
this.update();
|
||||
};
|
||||
Slider.prototype.space = function (event) {
|
||||
_super.prototype.space.call(this, event);
|
||||
menu_util_js_1.MenuUtil.close(this);
|
||||
};
|
||||
Slider.prototype.focus = function () {
|
||||
_super.prototype.focus.call(this);
|
||||
this.input.focus();
|
||||
};
|
||||
Slider.prototype.unfocus = function () {
|
||||
_super.prototype.unfocus.call(this);
|
||||
this.updateSpan();
|
||||
};
|
||||
Slider.prototype.generateHtml = function () {
|
||||
_super.prototype.generateHtml.call(this);
|
||||
var html = this.html;
|
||||
html.classList.add(html_classes_js_1.HtmlClasses['MENUSLIDER']);
|
||||
this.valueSpan = document.createElement('span');
|
||||
this.valueSpan.setAttribute('id', this.valueId);
|
||||
this.valueSpan.classList.add(html_classes_js_1.HtmlClasses['SLIDERVALUE']);
|
||||
this.html.appendChild(this.valueSpan);
|
||||
};
|
||||
Slider.prototype.generateSpan = function () {
|
||||
this.span = document.createElement('span');
|
||||
this.labelSpan = document.createElement('span');
|
||||
this.labelSpan.setAttribute('id', this.labelId);
|
||||
this.labelSpan.appendChild(this.html.childNodes[0]);
|
||||
this.html.appendChild(this.labelSpan);
|
||||
this.input = document.createElement('input');
|
||||
this.input.setAttribute('type', 'range');
|
||||
this.input.setAttribute('min', '0');
|
||||
this.input.setAttribute('max', '100');
|
||||
this.input.setAttribute('aria-valuemin', '0');
|
||||
this.input.setAttribute('aria-valuemax', '100');
|
||||
this.input.setAttribute('aria-labelledby', this.labelId);
|
||||
this.input.addEventListener('keydown', this.inputKey.bind(this));
|
||||
this.input.addEventListener('input', this.executeAction.bind(this));
|
||||
this.input.classList.add(html_classes_js_1.HtmlClasses['SLIDERBAR']);
|
||||
this.span.appendChild(this.input);
|
||||
};
|
||||
Slider.prototype.inputKey = function (_event) {
|
||||
this.inputEvent = true;
|
||||
};
|
||||
Slider.prototype.mousedown = function (event) {
|
||||
event.stopPropagation();
|
||||
};
|
||||
Slider.prototype.mouseup = function (_event) {
|
||||
event.stopPropagation();
|
||||
};
|
||||
Slider.prototype.keydown = function (event) {
|
||||
var code = event.keyCode;
|
||||
if (code === key_navigatable_js_1.KEY.UP || code === key_navigatable_js_1.KEY.DOWN) {
|
||||
event.preventDefault();
|
||||
_super.prototype.keydown.call(this, event);
|
||||
return;
|
||||
}
|
||||
if (this.inputEvent &&
|
||||
code !== key_navigatable_js_1.KEY.ESCAPE && code !== key_navigatable_js_1.KEY.RETURN) {
|
||||
this.inputEvent = false;
|
||||
event.stopPropagation();
|
||||
return;
|
||||
}
|
||||
_super.prototype.keydown.call(this, event);
|
||||
event.stopPropagation();
|
||||
};
|
||||
Slider.prototype.updateAria = function () {
|
||||
var value = this.variable.getValue();
|
||||
if (value && this.input) {
|
||||
this.input.setAttribute('aria-valuenow', value);
|
||||
this.input.setAttribute('aria-valuetext', value + '%');
|
||||
}
|
||||
};
|
||||
Slider.prototype.updateSpan = function () {
|
||||
var initValue;
|
||||
try {
|
||||
initValue = this.variable.getValue(menu_util_js_1.MenuUtil.getActiveElement(this));
|
||||
this.valueSpan.innerHTML = initValue + '%';
|
||||
}
|
||||
catch (e) {
|
||||
initValue = '';
|
||||
}
|
||||
this.input.value = initValue;
|
||||
};
|
||||
Slider.prototype.toJson = function () {
|
||||
return { type: ''
|
||||
};
|
||||
};
|
||||
return Slider;
|
||||
}(abstract_variable_item_js_1.AbstractVariableItem));
|
||||
exports.Slider = Slider;
|
||||
//# sourceMappingURL=item_slider.js.map
|
||||
1
node_modules/mj-context-menu/js/item_slider.js.map
generated
vendored
Normal file
1
node_modules/mj-context-menu/js/item_slider.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"item_slider.js","sourceRoot":"","sources":["../ts/item_slider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAyBA,yEAAiE;AAEjE,+CAAwC;AAExC,qDAA8C;AAC9C,2DAAyC;AAIzC;IAA4B,0BAA4B;IAoCtD,gBAAY,IAAU,EAAE,OAAe,EAAE,QAAgB,EAAE,EAAW;QAAtE,YACE,kBAAM,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,CAAC,SAGnC;QAnCS,UAAI,GAAG,QAAQ,CAAC;QAGlB,aAAO,GAAG,gBAAgB,GAAG,uBAAQ,CAAC,OAAO,EAAE,CAAC;QAChD,aAAO,GAAG,gBAAgB,GAAG,uBAAQ,CAAC,OAAO,EAAE,CAAC;QAIhD,gBAAU,GAAY,KAAK,CAAC;QAyBlC,KAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAqB,CAAC;QAC/D,KAAI,CAAC,QAAQ,EAAE,CAAC;;IAClB,CAAC;IAnB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BAAgB,EAAE,KAAK,GAAG,GAAG,CAAC,CAAC;SACxD;IACH,CAAC;IAKS,2BAAU,GAApB;QACE,IAAI,SAAS,CAAC;QACd,IAAI;YACF,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,uBAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC;YACpE,IAAI,CAAC,SAAS,CAAC,SAAS,GAAG,SAAS,GAAG,GAAG,CAAC;SAC5C;QAAC,OAAO,CAAC,EAAE;YACV,SAAS,GAAG,EAAE,CAAC;SAChB;QACD,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,SAAS,CAAC;IAC/B,CAAC;IAKM,uBAAM,GAAb;QACE,OAAO,EAAC,IAAI,EAAE,EAAE;SACR,CAAC;IACX,CAAC;IAEH,aAAC;AAAD,CAAC,AA/LD,CAA4B,gDAAoB,GA+L/C;AA/LY,wBAAM"}
|
||||
26
node_modules/mj-context-menu/js/item_submenu.d.ts
generated
vendored
Normal file
26
node_modules/mj-context-menu/js/item_submenu.d.ts
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
import { AbstractItem } from './abstract_item.js';
|
||||
import { Menu } from './menu.js';
|
||||
import { ParserFactory } from './parser_factory.js';
|
||||
export declare class Submenu extends AbstractItem {
|
||||
private span;
|
||||
private _submenu;
|
||||
static fromJson(factory: ParserFactory, { content: content, menu: submenu, id: id }: {
|
||||
content: string;
|
||||
menu: any;
|
||||
id: string;
|
||||
}, menu: Menu): Submenu;
|
||||
constructor(menu: Menu, content: string, id?: string);
|
||||
set submenu(menu: Menu);
|
||||
get submenu(): Menu;
|
||||
mouseover(event: MouseEvent): void;
|
||||
mouseout(event: MouseEvent): void;
|
||||
unfocus(): void;
|
||||
focus(): void;
|
||||
executeAction(): void;
|
||||
generateHtml(): void;
|
||||
left(event: KeyboardEvent): void;
|
||||
right(event: KeyboardEvent): void;
|
||||
toJson(): {
|
||||
type: string;
|
||||
};
|
||||
}
|
||||
104
node_modules/mj-context-menu/js/item_submenu.js
generated
vendored
Normal file
104
node_modules/mj-context-menu/js/item_submenu.js
generated
vendored
Normal file
@@ -0,0 +1,104 @@
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Submenu = void 0;
|
||||
var abstract_item_js_1 = require("./abstract_item.js");
|
||||
var html_classes_js_1 = require("./html_classes.js");
|
||||
var Submenu = (function (_super) {
|
||||
__extends(Submenu, _super);
|
||||
function Submenu(menu, content, id) {
|
||||
var _this = _super.call(this, menu, 'submenu', content, id) || this;
|
||||
_this._submenu = null;
|
||||
return _this;
|
||||
}
|
||||
Submenu.fromJson = function (factory, _a, menu) {
|
||||
var content = _a.content, submenu = _a.menu, id = _a.id;
|
||||
var item = new this(menu, content, id);
|
||||
var sm = factory.get('subMenu')(factory, submenu, item);
|
||||
item.submenu = sm;
|
||||
return item;
|
||||
};
|
||||
Object.defineProperty(Submenu.prototype, "submenu", {
|
||||
get: function () {
|
||||
return this._submenu;
|
||||
},
|
||||
set: function (menu) {
|
||||
this._submenu = menu;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
Submenu.prototype.mouseover = function (event) {
|
||||
this.focus();
|
||||
this.stop(event);
|
||||
};
|
||||
Submenu.prototype.mouseout = function (event) {
|
||||
this.stop(event);
|
||||
};
|
||||
Submenu.prototype.unfocus = function () {
|
||||
if (!this.submenu.isPosted()) {
|
||||
_super.prototype.unfocus.call(this);
|
||||
return;
|
||||
}
|
||||
if (this.menu.focused !== this) {
|
||||
_super.prototype.unfocus.call(this);
|
||||
this.menu.unpostSubmenus();
|
||||
return;
|
||||
}
|
||||
this.html.setAttribute('tabindex', '-1');
|
||||
this.html.blur();
|
||||
};
|
||||
Submenu.prototype.focus = function () {
|
||||
_super.prototype.focus.call(this);
|
||||
if (!this.submenu.isPosted() && !this.disabled) {
|
||||
this.submenu.post();
|
||||
}
|
||||
};
|
||||
Submenu.prototype.executeAction = function () {
|
||||
this.submenu.isPosted() ? this.submenu.unpost() : this.submenu.post();
|
||||
};
|
||||
Submenu.prototype.generateHtml = function () {
|
||||
_super.prototype.generateHtml.call(this);
|
||||
var html = this.html;
|
||||
this.span = document.createElement('span');
|
||||
this.span.textContent = '\u25BA';
|
||||
this.span.classList.add(html_classes_js_1.HtmlClasses['MENUARROW']);
|
||||
html.appendChild(this.span);
|
||||
html.setAttribute('aria-haspopup', 'true');
|
||||
};
|
||||
Submenu.prototype.left = function (event) {
|
||||
if (this.submenu.isPosted()) {
|
||||
this.submenu.unpost();
|
||||
}
|
||||
else {
|
||||
_super.prototype.left.call(this, event);
|
||||
}
|
||||
};
|
||||
Submenu.prototype.right = function (event) {
|
||||
if (!this.submenu.isPosted()) {
|
||||
this.submenu.post();
|
||||
}
|
||||
else {
|
||||
this.submenu.down(event);
|
||||
}
|
||||
};
|
||||
Submenu.prototype.toJson = function () {
|
||||
return { type: ''
|
||||
};
|
||||
};
|
||||
return Submenu;
|
||||
}(abstract_item_js_1.AbstractItem));
|
||||
exports.Submenu = Submenu;
|
||||
//# sourceMappingURL=item_submenu.js.map
|
||||
1
node_modules/mj-context-menu/js/item_submenu.js.map
generated
vendored
Normal file
1
node_modules/mj-context-menu/js/item_submenu.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"item_submenu.js","sourceRoot":"","sources":["../ts/item_submenu.ts"],"names":[],"mappings":";;;;;;;;;;;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;IACH,CAAC;IAKM,uBAAK,GAAZ,UAAa,KAAoB;QAC/B,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE;YAC5B,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;SACrB;aAAM;YACL,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SAC1B;IACH,CAAC;IAKM,wBAAM,GAAb;QACE,OAAO,EAAC,IAAI,EAAE,EAAE;SACR,CAAC;IACX,CAAC;IAEH,cAAC;AAAD,CAAC,AAvJD,CAA6B,+BAAY,GAuJxC;AAvJY,0BAAO"}
|
||||
18
node_modules/mj-context-menu/js/key_navigatable.d.ts
generated
vendored
Normal file
18
node_modules/mj-context-menu/js/key_navigatable.d.ts
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
export declare enum KEY {
|
||||
RETURN = 13,
|
||||
ESCAPE = 27,
|
||||
SPACE = 32,
|
||||
LEFT = 37,
|
||||
UP = 38,
|
||||
RIGHT = 39,
|
||||
DOWN = 40
|
||||
}
|
||||
export interface KeyNavigatable {
|
||||
keydown(event: KeyboardEvent): void;
|
||||
escape(event: KeyboardEvent): void;
|
||||
space(event: KeyboardEvent): void;
|
||||
left(event: KeyboardEvent): void;
|
||||
right(event: KeyboardEvent): void;
|
||||
up(event: KeyboardEvent): void;
|
||||
down(event: KeyboardEvent): void;
|
||||
}
|
||||
14
node_modules/mj-context-menu/js/key_navigatable.js
generated
vendored
Normal file
14
node_modules/mj-context-menu/js/key_navigatable.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.KEY = void 0;
|
||||
var KEY;
|
||||
(function (KEY) {
|
||||
KEY[KEY["RETURN"] = 13] = "RETURN";
|
||||
KEY[KEY["ESCAPE"] = 27] = "ESCAPE";
|
||||
KEY[KEY["SPACE"] = 32] = "SPACE";
|
||||
KEY[KEY["LEFT"] = 37] = "LEFT";
|
||||
KEY[KEY["UP"] = 38] = "UP";
|
||||
KEY[KEY["RIGHT"] = 39] = "RIGHT";
|
||||
KEY[KEY["DOWN"] = 40] = "DOWN";
|
||||
})(KEY = exports.KEY || (exports.KEY = {}));
|
||||
//# sourceMappingURL=key_navigatable.js.map
|
||||
1
node_modules/mj-context-menu/js/key_navigatable.js.map
generated
vendored
Normal file
1
node_modules/mj-context-menu/js/key_navigatable.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"key_navigatable.js","sourceRoot":"","sources":["../ts/key_navigatable.ts"],"names":[],"mappings":";;;AA6BA,IAAY,GAQX;AARD,WAAY,GAAG;IACb,kCAAW,CAAA;IACX,kCAAW,CAAA;IACX,gCAAU,CAAA;IACV,8BAAS,CAAA;IACT,0BAAO,CAAA;IACP,gCAAU,CAAA;IACV,8BAAS,CAAA;AACX,CAAC,EARW,GAAG,GAAH,WAAG,KAAH,WAAG,QAQd"}
|
||||
14
node_modules/mj-context-menu/js/menu.d.ts
generated
vendored
Normal file
14
node_modules/mj-context-menu/js/menu.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import { Item } from './item.js';
|
||||
import { Postable } from './postable.js';
|
||||
import { VariablePool } from './variable_pool.js';
|
||||
import { KeyNavigatable } from './key_navigatable.js';
|
||||
import { MouseNavigatable } from './mouse_navigatable.js';
|
||||
export interface Menu extends Postable, KeyNavigatable, MouseNavigatable {
|
||||
baseMenu: Menu;
|
||||
items: Item[];
|
||||
pool: VariablePool<string | boolean>;
|
||||
focused: Item;
|
||||
unpostSubmenus(): void;
|
||||
find(id: string): Item;
|
||||
generateMenu(): void;
|
||||
}
|
||||
3
node_modules/mj-context-menu/js/menu.js
generated
vendored
Normal file
3
node_modules/mj-context-menu/js/menu.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=menu.js.map
|
||||
1
node_modules/mj-context-menu/js/menu.js.map
generated
vendored
Normal file
1
node_modules/mj-context-menu/js/menu.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"menu.js","sourceRoot":"","sources":["../ts/menu.ts"],"names":[],"mappings":""}
|
||||
16
node_modules/mj-context-menu/js/menu_element.d.ts
generated
vendored
Normal file
16
node_modules/mj-context-menu/js/menu_element.d.ts
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import { AbstractNavigatable } from './abstract_navigatable.js';
|
||||
import { HtmlClass } from './html_classes.js';
|
||||
import { Element } from './element.js';
|
||||
export declare abstract class MenuElement extends AbstractNavigatable implements Element {
|
||||
protected role: string;
|
||||
protected className: HtmlClass;
|
||||
private _html;
|
||||
addAttributes(attributes: {
|
||||
[attr: string]: string;
|
||||
}): void;
|
||||
get html(): HTMLElement;
|
||||
set html(html: HTMLElement);
|
||||
generateHtml(): void;
|
||||
focus(): void;
|
||||
unfocus(): void;
|
||||
}
|
||||
68
node_modules/mj-context-menu/js/menu_element.js
generated
vendored
Normal file
68
node_modules/mj-context-menu/js/menu_element.js
generated
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.MenuElement = void 0;
|
||||
var abstract_navigatable_js_1 = require("./abstract_navigatable.js");
|
||||
var MenuElement = (function (_super) {
|
||||
__extends(MenuElement, _super);
|
||||
function MenuElement() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
MenuElement.prototype.addAttributes = function (attributes) {
|
||||
for (var attr in attributes) {
|
||||
this.html.setAttribute(attr, attributes[attr]);
|
||||
}
|
||||
};
|
||||
Object.defineProperty(MenuElement.prototype, "html", {
|
||||
get: function () {
|
||||
if (!this._html) {
|
||||
this.generateHtml();
|
||||
}
|
||||
return this._html;
|
||||
},
|
||||
set: function (html) {
|
||||
this._html = html;
|
||||
this.addEvents(html);
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
MenuElement.prototype.generateHtml = function () {
|
||||
var html = document.createElement('div');
|
||||
html.classList.add(this.className);
|
||||
html.setAttribute('role', this.role);
|
||||
this.html = html;
|
||||
};
|
||||
MenuElement.prototype.focus = function () {
|
||||
var html = this.html;
|
||||
html.setAttribute('tabindex', '0');
|
||||
html.focus();
|
||||
};
|
||||
MenuElement.prototype.unfocus = function () {
|
||||
var html = this.html;
|
||||
if (html.hasAttribute('tabindex')) {
|
||||
html.setAttribute('tabindex', '-1');
|
||||
}
|
||||
try {
|
||||
html.blur();
|
||||
}
|
||||
catch (e) {
|
||||
}
|
||||
html.blur();
|
||||
};
|
||||
return MenuElement;
|
||||
}(abstract_navigatable_js_1.AbstractNavigatable));
|
||||
exports.MenuElement = MenuElement;
|
||||
//# sourceMappingURL=menu_element.js.map
|
||||
1
node_modules/mj-context-menu/js/menu_element.js.map
generated
vendored
Normal file
1
node_modules/mj-context-menu/js/menu_element.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"menu_element.js","sourceRoot":"","sources":["../ts/menu_element.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAwBA,qEAA8D;AAM9D;IAA0C,+BAAmB;IAA7D;;IA+EA,CAAC;IA5DQ,mCAAa,GAApB,UAAqB,UAAoC;QACvD,KAAK,IAAI,IAAI,IAAI,UAAU,EAAE;YAC3B,IAAI,CA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||
37
node_modules/mj-context-menu/js/menu_store.d.ts
generated
vendored
Normal file
37
node_modules/mj-context-menu/js/menu_store.d.ts
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
import { ContextMenu } from './context_menu.js';
|
||||
export declare class MenuStore {
|
||||
private menu;
|
||||
protected store: HTMLElement[];
|
||||
private _active;
|
||||
private counter;
|
||||
private attachedClass;
|
||||
private taborder;
|
||||
private attrMap;
|
||||
constructor(menu: ContextMenu);
|
||||
set active(element: HTMLElement);
|
||||
get active(): HTMLElement;
|
||||
next(): HTMLElement;
|
||||
previous(): HTMLElement;
|
||||
clear(): void;
|
||||
insert(element: HTMLElement): void;
|
||||
insert(elements: HTMLElement[]): void;
|
||||
insert(elements: NodeListOf<HTMLElement>): void;
|
||||
remove(element: HTMLElement): void;
|
||||
remove(element: HTMLElement[]): void;
|
||||
remove(element: NodeListOf<HTMLElement>): void;
|
||||
inTaborder(flag: boolean): void;
|
||||
insertTaborder(): void;
|
||||
removeTaborder(): void;
|
||||
private insertElement;
|
||||
private removeElement;
|
||||
private sort;
|
||||
private insertTaborder_;
|
||||
private removeTaborder_;
|
||||
private addTabindex;
|
||||
private removeTabindex;
|
||||
private addEvents;
|
||||
private addEvent;
|
||||
private removeEvents;
|
||||
private removeEvent;
|
||||
private keydown;
|
||||
}
|
||||
211
node_modules/mj-context-menu/js/menu_store.js
generated
vendored
Normal file
211
node_modules/mj-context-menu/js/menu_store.js
generated
vendored
Normal file
@@ -0,0 +1,211 @@
|
||||
"use strict";
|
||||
var __values = (this && this.__values) || function(o) {
|
||||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
||||
if (m) return m.call(o);
|
||||
if (o && typeof o.length === "number") return {
|
||||
next: function () {
|
||||
if (o && i >= o.length) o = void 0;
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.MenuStore = void 0;
|
||||
var menu_util_js_1 = require("./menu_util.js");
|
||||
var html_classes_js_1 = require("./html_classes.js");
|
||||
var key_navigatable_js_1 = require("./key_navigatable.js");
|
||||
var MenuStore = (function () {
|
||||
function MenuStore(menu) {
|
||||
this.menu = menu;
|
||||
this.store = [];
|
||||
this._active = null;
|
||||
this.counter = 0;
|
||||
this.attachedClass = html_classes_js_1.HtmlClasses['ATTACHED'] + '_' +
|
||||
menu_util_js_1.MenuUtil.counter();
|
||||
this.taborder = true;
|
||||
this.attrMap = {};
|
||||
}
|
||||
Object.defineProperty(MenuStore.prototype, "active", {
|
||||
get: function () {
|
||||
return this._active;
|
||||
},
|
||||
set: function (element) {
|
||||
do {
|
||||
if (this.store.indexOf(element) !== -1) {
|
||||
this._active = element;
|
||||
break;
|
||||
}
|
||||
element = element.parentNode;
|
||||
} while (element);
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
MenuStore.prototype.next = function () {
|
||||
var length = this.store.length;
|
||||
if (length === 0) {
|
||||
this.active = null;
|
||||
return null;
|
||||
}
|
||||
var index = this.store.indexOf(this.active);
|
||||
index = index === -1 ? 0 : (index < length - 1 ? index + 1 : 0);
|
||||
this.active = this.store[index];
|
||||
return this.active;
|
||||
};
|
||||
MenuStore.prototype.previous = function () {
|
||||
var length = this.store.length;
|
||||
if (length === 0) {
|
||||
this.active = null;
|
||||
return null;
|
||||
}
|
||||
var last = length - 1;
|
||||
var index = this.store.indexOf(this.active);
|
||||
index = index === -1 ? last : (index === 0 ? last : index - 1);
|
||||
this.active = this.store[index];
|
||||
return this.active;
|
||||
};
|
||||
MenuStore.prototype.clear = function () {
|
||||
this.remove(this.store);
|
||||
};
|
||||
MenuStore.prototype.insert = function (elementOrList) {
|
||||
var e_1, _a;
|
||||
var elements = elementOrList instanceof HTMLElement ?
|
||||
[elementOrList] : elementOrList;
|
||||
try {
|
||||
for (var elements_1 = __values(elements), elements_1_1 = elements_1.next(); !elements_1_1.done; elements_1_1 = elements_1.next()) {
|
||||
var element = elements_1_1.value;
|
||||
this.insertElement(element);
|
||||
}
|
||||
}
|
||||
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (elements_1_1 && !elements_1_1.done && (_a = elements_1.return)) _a.call(elements_1);
|
||||
}
|
||||
finally { if (e_1) throw e_1.error; }
|
||||
}
|
||||
this.sort();
|
||||
};
|
||||
MenuStore.prototype.remove = function (elementOrList) {
|
||||
var e_2, _a;
|
||||
var elements = elementOrList instanceof HTMLElement ?
|
||||
[elementOrList] : elementOrList;
|
||||
try {
|
||||
for (var elements_2 = __values(elements), elements_2_1 = elements_2.next(); !elements_2_1.done; elements_2_1 = elements_2.next()) {
|
||||
var element = elements_2_1.value;
|
||||
this.removeElement(element);
|
||||
}
|
||||
}
|
||||
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (elements_2_1 && !elements_2_1.done && (_a = elements_2.return)) _a.call(elements_2);
|
||||
}
|
||||
finally { if (e_2) throw e_2.error; }
|
||||
}
|
||||
this.sort();
|
||||
};
|
||||
MenuStore.prototype.inTaborder = function (flag) {
|
||||
if (this.taborder && !flag) {
|
||||
this.removeTaborder();
|
||||
}
|
||||
if (!this.taborder && flag) {
|
||||
this.insertTaborder();
|
||||
}
|
||||
this.taborder = flag;
|
||||
};
|
||||
MenuStore.prototype.insertTaborder = function () {
|
||||
if (this.taborder) {
|
||||
this.insertTaborder_();
|
||||
}
|
||||
};
|
||||
MenuStore.prototype.removeTaborder = function () {
|
||||
if (this.taborder) {
|
||||
this.removeTaborder_();
|
||||
}
|
||||
};
|
||||
MenuStore.prototype.insertElement = function (element) {
|
||||
if (element.classList.contains(this.attachedClass)) {
|
||||
return;
|
||||
}
|
||||
element.classList.add(this.attachedClass);
|
||||
if (this.taborder) {
|
||||
this.addTabindex(element);
|
||||
}
|
||||
this.addEvents(element);
|
||||
};
|
||||
MenuStore.prototype.removeElement = function (element) {
|
||||
if (!element.classList.contains(this.attachedClass)) {
|
||||
return;
|
||||
}
|
||||
element.classList.remove(this.attachedClass);
|
||||
if (this.taborder) {
|
||||
this.removeTabindex(element);
|
||||
}
|
||||
this.removeEvents(element);
|
||||
};
|
||||
MenuStore.prototype.sort = function () {
|
||||
var nodes = document.getElementsByClassName(this.attachedClass);
|
||||
this.store = [].slice.call(nodes);
|
||||
};
|
||||
MenuStore.prototype.insertTaborder_ = function () {
|
||||
this.store.forEach(function (x) { return x.setAttribute('tabindex', '0'); });
|
||||
};
|
||||
MenuStore.prototype.removeTaborder_ = function () {
|
||||
this.store.forEach(function (x) { return x.setAttribute('tabindex', '-1'); });
|
||||
};
|
||||
MenuStore.prototype.addTabindex = function (element) {
|
||||
if (element.hasAttribute('tabindex')) {
|
||||
element.setAttribute(html_classes_js_1.HtmlAttrs['OLDTAB'], element.getAttribute('tabindex'));
|
||||
}
|
||||
element.setAttribute('tabindex', '0');
|
||||
};
|
||||
MenuStore.prototype.removeTabindex = function (element) {
|
||||
if (element.hasAttribute(html_classes_js_1.HtmlAttrs['OLDTAB'])) {
|
||||
element.setAttribute('tabindex', element.getAttribute(html_classes_js_1.HtmlAttrs['OLDTAB']));
|
||||
element.removeAttribute(html_classes_js_1.HtmlAttrs['OLDTAB']);
|
||||
}
|
||||
else {
|
||||
element.removeAttribute('tabindex');
|
||||
}
|
||||
};
|
||||
MenuStore.prototype.addEvents = function (element) {
|
||||
if (element.hasAttribute(html_classes_js_1.HtmlAttrs['COUNTER'])) {
|
||||
return;
|
||||
}
|
||||
this.addEvent(element, 'contextmenu', this.menu.post.bind(this.menu));
|
||||
this.addEvent(element, 'keydown', this.keydown.bind(this));
|
||||
element.setAttribute(html_classes_js_1.HtmlAttrs['COUNTER'], this.counter.toString());
|
||||
this.counter++;
|
||||
};
|
||||
MenuStore.prototype.addEvent = function (element, name, func) {
|
||||
var attrName = html_classes_js_1.HtmlAttrs[name.toUpperCase() + 'FUNC'];
|
||||
this.attrMap[attrName + this.counter] = func;
|
||||
element.addEventListener(name, func);
|
||||
};
|
||||
MenuStore.prototype.removeEvents = function (element) {
|
||||
if (!element.hasAttribute(html_classes_js_1.HtmlAttrs['COUNTER'])) {
|
||||
return;
|
||||
}
|
||||
var counter = element.getAttribute(html_classes_js_1.HtmlAttrs['COUNTER']);
|
||||
this.removeEvent(element, 'contextmenu', counter);
|
||||
this.removeEvent(element, 'keydown', counter);
|
||||
element.removeAttribute(html_classes_js_1.HtmlAttrs['COUNTER']);
|
||||
};
|
||||
MenuStore.prototype.removeEvent = function (element, name, counter) {
|
||||
var attrName = html_classes_js_1.HtmlAttrs[name.toUpperCase() + 'FUNC'];
|
||||
var menuFunc = this.attrMap[attrName + counter];
|
||||
element.removeEventListener(name, menuFunc);
|
||||
};
|
||||
MenuStore.prototype.keydown = function (event) {
|
||||
if (event.keyCode === key_navigatable_js_1.KEY.SPACE) {
|
||||
this.menu.post(event);
|
||||
event.preventDefault();
|
||||
event.stopImmediatePropagation();
|
||||
}
|
||||
};
|
||||
return MenuStore;
|
||||
}());
|
||||
exports.MenuStore = MenuStore;
|
||||
//# sourceMappingURL=menu_store.js.map
|
||||
1
node_modules/mj-context-menu/js/menu_store.js.map
generated
vendored
Normal file
1
node_modules/mj-context-menu/js/menu_store.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
7
node_modules/mj-context-menu/js/menu_util.d.ts
generated
vendored
Normal file
7
node_modules/mj-context-menu/js/menu_util.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import { Item } from './item.js';
|
||||
export declare namespace MenuUtil {
|
||||
function close(item: Item): void;
|
||||
function getActiveElement(item: Item): HTMLElement;
|
||||
function error(_error: Error, msg: string): void;
|
||||
function counter(): number;
|
||||
}
|
||||
32
node_modules/mj-context-menu/js/menu_util.js
generated
vendored
Normal file
32
node_modules/mj-context-menu/js/menu_util.js
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.MenuUtil = void 0;
|
||||
var MenuUtil;
|
||||
(function (MenuUtil) {
|
||||
function close(item) {
|
||||
var menu = item.menu;
|
||||
if (menu.baseMenu) {
|
||||
menu.baseMenu.unpost();
|
||||
}
|
||||
else {
|
||||
menu.unpost();
|
||||
}
|
||||
}
|
||||
MenuUtil.close = close;
|
||||
function getActiveElement(item) {
|
||||
var menu = item.menu;
|
||||
var baseMenu = (menu.baseMenu ? menu.baseMenu : menu);
|
||||
return baseMenu.store.active;
|
||||
}
|
||||
MenuUtil.getActiveElement = getActiveElement;
|
||||
function error(_error, msg) {
|
||||
console.error('ContextMenu Error: ' + msg);
|
||||
}
|
||||
MenuUtil.error = error;
|
||||
function counter() {
|
||||
return count++;
|
||||
}
|
||||
MenuUtil.counter = counter;
|
||||
var count = 0;
|
||||
})(MenuUtil = exports.MenuUtil || (exports.MenuUtil = {}));
|
||||
//# sourceMappingURL=menu_util.js.map
|
||||
1
node_modules/mj-context-menu/js/menu_util.js.map
generated
vendored
Normal file
1
node_modules/mj-context-menu/js/menu_util.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"menu_util.js","sourceRoot":"","sources":["../ts/menu_util.ts"],"names":[],"mappings":";;;AAgCA,IAAiB,QAAQ,CA4CxB;AA5CD,WAAiB,QAAQ;IAMvB,SAAgB,KAAK,CAAC,IAAU;QAC9B,IAAI,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QAErB,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;SACxB;aAAM;YACL,IAAI,CAAC,MAAM,EAAE,CAAC;SACf;IACH,CAAC;IARe,cAAK,QAQpB,CAAA;IAOD,SAAgB,gBAAgB,CAAC,IAAU;QACzC,IAAI,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACrB,IAAI,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAgB,CAAC;QACrE,OAAO,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC;IAC/B,CAAC;IAJe,yBAAgB,mBAI/B,CAAA;IAOD,SAAgB,KAAK,CAAC,MAAa,EAAE,GAAW;QAC9C,OAAO,CAAC,KAAK,CAAC,qBAAqB,GAAG,GAAG,CAAC,CAAC;IAC7C,CAAC;IAFe,cAAK,QAEpB,CAAA;IAKD,SAAgB,OAAO;QACrB,OAAO,KAAK,EAAE,CAAC;IACjB,CAAC;IAFe,gBAAO,UAEtB,CAAA;IACD,IAAI,KAAK,GAAG,CAAC,CAAC;AAEhB,CAAC,EA5CgB,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QA4CxB"}
|
||||
18
node_modules/mj-context-menu/js/mouse_navigatable.d.ts
generated
vendored
Normal file
18
node_modules/mj-context-menu/js/mouse_navigatable.d.ts
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
export declare const MOUSE: {
|
||||
CLICK: string;
|
||||
DBLCLICK: string;
|
||||
DOWN: string;
|
||||
UP: string;
|
||||
OVER: string;
|
||||
OUT: string;
|
||||
MOVE: string;
|
||||
SELECTEND: string;
|
||||
SELECTSTART: string;
|
||||
};
|
||||
export interface MouseNavigatable {
|
||||
mousedown(event: MouseEvent): void;
|
||||
mouseup(event: MouseEvent): void;
|
||||
mouseover(event: MouseEvent): void;
|
||||
mouseout(event: MouseEvent): void;
|
||||
click(event: MouseEvent): void;
|
||||
}
|
||||
15
node_modules/mj-context-menu/js/mouse_navigatable.js
generated
vendored
Normal file
15
node_modules/mj-context-menu/js/mouse_navigatable.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.MOUSE = void 0;
|
||||
exports.MOUSE = {
|
||||
CLICK: 'click',
|
||||
DBLCLICK: 'dblclick',
|
||||
DOWN: 'mousedown',
|
||||
UP: 'mouseup',
|
||||
OVER: 'mouseover',
|
||||
OUT: 'mouseout',
|
||||
MOVE: 'mousemove',
|
||||
SELECTEND: 'selectend',
|
||||
SELECTSTART: 'selectstart'
|
||||
};
|
||||
//# sourceMappingURL=mouse_navigatable.js.map
|
||||
1
node_modules/mj-context-menu/js/mouse_navigatable.js.map
generated
vendored
Normal file
1
node_modules/mj-context-menu/js/mouse_navigatable.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"mouse_navigatable.js","sourceRoot":"","sources":["../ts/mouse_navigatable.ts"],"names":[],"mappings":";;;AA8Ba,QAAA,KAAK,GAAG;IACnB,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,WAAW;IACjB,EAAE,EAAE,SAAS;IACb,IAAI,EAAE,WAAW;IACjB,GAAG,EAAE,UAAU;IACf,IAAI,EAAE,WAAW;IACjB,SAAS,EAAE,WAAW;IACtB,WAAW,EAAE,aAAa;CAC3B,CAAC"}
|
||||
14
node_modules/mj-context-menu/js/parse.d.ts
generated
vendored
Normal file
14
node_modules/mj-context-menu/js/parse.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import { Menu } from './menu.js';
|
||||
import { Item } from './item.js';
|
||||
import { ParserFactory, ParseMethod } from './parser_factory.js';
|
||||
export declare class Parser {
|
||||
private _initList;
|
||||
private readonly _factory;
|
||||
constructor(init?: [string, ParseMethod][]);
|
||||
get factory(): ParserFactory;
|
||||
items(_factory: ParserFactory, its: any[], ctxt: Menu): Item[];
|
||||
parse({ type: kind, ...json }: {
|
||||
type: string;
|
||||
[k: string]: any;
|
||||
}, ...rest: any[]): any;
|
||||
}
|
||||
133
node_modules/mj-context-menu/js/parse.js
generated
vendored
Normal file
133
node_modules/mj-context-menu/js/parse.js
generated
vendored
Normal file
@@ -0,0 +1,133 @@
|
||||
"use strict";
|
||||
var __rest = (this && this.__rest) || function (s, e) {
|
||||
var t = {};
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
||||
t[p] = s[p];
|
||||
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
||||
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
||||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
||||
t[p[i]] = s[p[i]];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
var __read = (this && this.__read) || function (o, n) {
|
||||
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
||||
if (!m) return o;
|
||||
var i = m.call(o), r, ar = [], e;
|
||||
try {
|
||||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
||||
}
|
||||
catch (error) { e = { error: error }; }
|
||||
finally {
|
||||
try {
|
||||
if (r && !r.done && (m = i["return"])) m.call(i);
|
||||
}
|
||||
finally { if (e) throw e.error; }
|
||||
}
|
||||
return ar;
|
||||
};
|
||||
var __values = (this && this.__values) || function(o) {
|
||||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
||||
if (m) return m.call(o);
|
||||
if (o && typeof o.length === "number") return {
|
||||
next: function () {
|
||||
if (o && i >= o.length) o = void 0;
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
};
|
||||
var __spread = (this && this.__spread) || function () {
|
||||
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
|
||||
return ar;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Parser = void 0;
|
||||
var item_command_js_1 = require("./item_command.js");
|
||||
var context_menu_js_1 = require("./context_menu.js");
|
||||
var variable_js_1 = require("./variable.js");
|
||||
var item_checkbox_js_1 = require("./item_checkbox.js");
|
||||
var item_combo_js_1 = require("./item_combo.js");
|
||||
var item_label_js_1 = require("./item_label.js");
|
||||
var item_radio_js_1 = require("./item_radio.js");
|
||||
var item_submenu_js_1 = require("./item_submenu.js");
|
||||
var item_rule_js_1 = require("./item_rule.js");
|
||||
var item_slider_js_1 = require("./item_slider.js");
|
||||
var sub_menu_js_1 = require("./sub_menu.js");
|
||||
var selection_box_js_1 = require("./selection_box.js");
|
||||
var parser_factory_js_1 = require("./parser_factory.js");
|
||||
var Parser = (function () {
|
||||
function Parser(init) {
|
||||
var _this = this;
|
||||
if (init === void 0) { init = []; }
|
||||
this._initList = [
|
||||
['command', item_command_js_1.Command.fromJson.bind(item_command_js_1.Command)],
|
||||
['checkbox', item_checkbox_js_1.Checkbox.fromJson.bind(item_checkbox_js_1.Checkbox)],
|
||||
['combo', item_combo_js_1.Combo.fromJson.bind(item_combo_js_1.Combo)],
|
||||
['slider', item_slider_js_1.Slider.fromJson.bind(item_slider_js_1.Slider)],
|
||||
['label', item_label_js_1.Label.fromJson.bind(item_label_js_1.Label)],
|
||||
['radio', item_radio_js_1.Radio.fromJson.bind(item_radio_js_1.Radio)],
|
||||
['rule', item_rule_js_1.Rule.fromJson.bind(item_rule_js_1.Rule)],
|
||||
['submenu', item_submenu_js_1.Submenu.fromJson.bind(item_submenu_js_1.Submenu)],
|
||||
['contextMenu', context_menu_js_1.ContextMenu.fromJson.bind(context_menu_js_1.ContextMenu)],
|
||||
['subMenu', sub_menu_js_1.SubMenu.fromJson.bind(sub_menu_js_1.SubMenu)],
|
||||
['variable', variable_js_1.Variable.fromJson.bind(variable_js_1.Variable)],
|
||||
['items', this.items.bind(this)],
|
||||
['selectionMenu', selection_box_js_1.SelectionMenu.fromJson.bind(selection_box_js_1.SelectionMenu)],
|
||||
['selectionBox', selection_box_js_1.SelectionBox.fromJson.bind(selection_box_js_1.SelectionBox)]
|
||||
];
|
||||
this._factory = new parser_factory_js_1.ParserFactory(this._initList);
|
||||
init.forEach(function (_a) {
|
||||
var _b = __read(_a, 2), x = _b[0], y = _b[1];
|
||||
return _this.factory.add(x, y);
|
||||
});
|
||||
}
|
||||
Object.defineProperty(Parser.prototype, "factory", {
|
||||
get: function () {
|
||||
return this._factory;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
Parser.prototype.items = function (_factory, its, ctxt) {
|
||||
var e_1, _a;
|
||||
var hidden = [];
|
||||
try {
|
||||
for (var its_1 = __values(its), its_1_1 = its_1.next(); !its_1_1.done; its_1_1 = its_1.next()) {
|
||||
var item = its_1_1.value;
|
||||
var entry = this.parse(item, ctxt);
|
||||
if (!entry) {
|
||||
continue;
|
||||
}
|
||||
ctxt.items.push(entry);
|
||||
if (item.disabled) {
|
||||
entry.disable();
|
||||
}
|
||||
if (item.hidden) {
|
||||
hidden.push(entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (its_1_1 && !its_1_1.done && (_a = its_1.return)) _a.call(its_1);
|
||||
}
|
||||
finally { if (e_1) throw e_1.error; }
|
||||
}
|
||||
hidden.forEach(function (x) { return x.hide(); });
|
||||
return ctxt.items;
|
||||
};
|
||||
Parser.prototype.parse = function (_a) {
|
||||
var rest = [];
|
||||
for (var _i = 1; _i < arguments.length; _i++) {
|
||||
rest[_i - 1] = arguments[_i];
|
||||
}
|
||||
var kind = _a.type, json = __rest(_a, ["type"]);
|
||||
var func = this.factory.get(kind);
|
||||
return func ? func.apply(void 0, __spread([this.factory, json], rest)) : null;
|
||||
};
|
||||
return Parser;
|
||||
}());
|
||||
exports.Parser = Parser;
|
||||
//# sourceMappingURL=parse.js.map
|
||||
1
node_modules/mj-context-menu/js/parse.js.map
generated
vendored
Normal file
1
node_modules/mj-context-menu/js/parse.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"parse.js","sourceRoot":"","sources":["../ts/parse.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAR,CAAQ,CAAC,CAAC;QAC9B,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAQM,sBAAK,GAAZ,UAAa,EACgC;QAAE,cAAc;aAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;YAAd,6BAAc;;QAD/C,IAAM,IAAI,UAAA,EAAK,IAAI,cAApB,QAAqB,CAAD;QAE/B,IAAI,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAClC,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,yBAAC,IAAI,CAAC,OAAO,EAAE,IAAI,GAAK,IAAI,GAAE,CAAC,CAAC,IAAI,CAAC;IACzD,CAAC;IAEH,aAAC;AAAD,CAAC,AA/ED,IA+EC;AA/EY,wBAAM"}
|
||||
7
node_modules/mj-context-menu/js/parser_factory.d.ts
generated
vendored
Normal file
7
node_modules/mj-context-menu/js/parser_factory.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
export declare type ParseMethod = (factory: ParserFactory, json: any, ...aux: any[]) => any;
|
||||
export declare class ParserFactory {
|
||||
private _parser;
|
||||
constructor(init: [string, ParseMethod][]);
|
||||
get(name: string): ParseMethod;
|
||||
add(name: string, method: ParseMethod): void;
|
||||
}
|
||||
17
node_modules/mj-context-menu/js/parser_factory.js
generated
vendored
Normal file
17
node_modules/mj-context-menu/js/parser_factory.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ParserFactory = void 0;
|
||||
var ParserFactory = (function () {
|
||||
function ParserFactory(init) {
|
||||
this._parser = new Map(init);
|
||||
}
|
||||
ParserFactory.prototype.get = function (name) {
|
||||
return this._parser.get(name);
|
||||
};
|
||||
ParserFactory.prototype.add = function (name, method) {
|
||||
this._parser.set(name, method);
|
||||
};
|
||||
return ParserFactory;
|
||||
}());
|
||||
exports.ParserFactory = ParserFactory;
|
||||
//# sourceMappingURL=parser_factory.js.map
|
||||
1
node_modules/mj-context-menu/js/parser_factory.js.map
generated
vendored
Normal file
1
node_modules/mj-context-menu/js/parser_factory.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"parser_factory.js","sourceRoot":"","sources":["../ts/parser_factory.ts"],"names":[],"mappings":";;;AA4BA;IAQE,uBAAY,IAA6B;QACvC,IAAI,CAAC,OAAO,GAAG,IAAI,GAAG,CAAsB,IAAI,CAAC,CAAC;IACpD,CAAC;IAOM,2BAAG,GAAV,UAAW,IAAY;QACrB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IAOM,2BAAG,GAAV,UAAW,IAAY,EAAE,MAAmB;QAC1C,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACjC,CAAC;IAEH,oBAAC;AAAD,CAAC,AA9BD,IA8BC;AA9BY,sCAAa"}
|
||||
24
node_modules/mj-context-menu/js/popup.d.ts
generated
vendored
Normal file
24
node_modules/mj-context-menu/js/popup.d.ts
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
import { ContextMenu } from './context_menu.js';
|
||||
import { AbstractPostable } from './abstract_postable.js';
|
||||
export declare class Popup extends AbstractPostable {
|
||||
private title;
|
||||
private static popupSettings;
|
||||
private menu;
|
||||
private content;
|
||||
private window;
|
||||
private localSettings;
|
||||
private windowList;
|
||||
private mobileFlag;
|
||||
private active;
|
||||
static fromJson(): void;
|
||||
constructor(title: string, content: Function);
|
||||
attachMenu(menu: ContextMenu): void;
|
||||
post(): void;
|
||||
protected display(): void;
|
||||
unpost(): void;
|
||||
private generateContent;
|
||||
private resize;
|
||||
toJson(): {
|
||||
type: string;
|
||||
};
|
||||
}
|
||||
118
node_modules/mj-context-menu/js/popup.js
generated
vendored
Normal file
118
node_modules/mj-context-menu/js/popup.js
generated
vendored
Normal file
@@ -0,0 +1,118 @@
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Popup = void 0;
|
||||
var abstract_postable_js_1 = require("./abstract_postable.js");
|
||||
var Popup = (function (_super) {
|
||||
__extends(Popup, _super);
|
||||
function Popup(title, content) {
|
||||
var _this = _super.call(this) || this;
|
||||
_this.title = title;
|
||||
_this.window = null;
|
||||
_this.localSettings = {
|
||||
left: Math.round((screen.width - 400) / 2),
|
||||
top: Math.round((screen.height - 300) / 3)
|
||||
};
|
||||
_this.windowList = [];
|
||||
_this.mobileFlag = false;
|
||||
_this.active = null;
|
||||
_this.content = content || function () { return ''; };
|
||||
return _this;
|
||||
}
|
||||
Popup.fromJson = function () {
|
||||
};
|
||||
Popup.prototype.attachMenu = function (menu) {
|
||||
this.menu = menu;
|
||||
};
|
||||
Popup.prototype.post = function () {
|
||||
this.display();
|
||||
};
|
||||
Popup.prototype.display = function () {
|
||||
this.active = this.menu.store.active;
|
||||
var settings = [];
|
||||
for (var setting in Popup.popupSettings) {
|
||||
settings.push(setting + '=' + Popup.popupSettings[setting]);
|
||||
}
|
||||
for (var setting in this.localSettings) {
|
||||
settings.push(setting + '=' + this.localSettings[setting]);
|
||||
}
|
||||
this.window = window.open('', '_blank', settings.join(','));
|
||||
this.windowList.push(this.window);
|
||||
var doc = this.window.document;
|
||||
if (this.mobileFlag) {
|
||||
doc.open();
|
||||
doc.write('<html><head><meta name="viewport" ' +
|
||||
'content="width=device-width, initial-scale=1.0" /><title>' +
|
||||
this.title +
|
||||
'</title></head><body style="font-size:85%">');
|
||||
doc.write('<pre>' + this.generateContent() + '</pre>');
|
||||
doc.write('<hr><input type="button" value="' +
|
||||
'Close' + '" onclick="window.close()" />');
|
||||
doc.write('</body></html>');
|
||||
doc.close();
|
||||
}
|
||||
else {
|
||||
doc.open();
|
||||
doc.write('<html><head><title>' + this.title +
|
||||
'</title></head><body style="font-size:85%">');
|
||||
doc.write('<table><tr><td><pre>' + this.generateContent() +
|
||||
'</pre></td></tr></table>');
|
||||
doc.write('</body></html>');
|
||||
doc.close();
|
||||
setTimeout(this.resize.bind(this), 50);
|
||||
}
|
||||
};
|
||||
Popup.prototype.unpost = function () {
|
||||
this.windowList.forEach(function (x) { return x.close(); });
|
||||
this.window = null;
|
||||
};
|
||||
Popup.prototype.generateContent = function () {
|
||||
return this.content(this.active);
|
||||
};
|
||||
Popup.prototype.resize = function () {
|
||||
var table = this.window.document.body.firstChild;
|
||||
var H = (this.window.outerHeight - this.window.innerHeight) || 30;
|
||||
var W = (this.window.outerWidth - this.window.innerWidth) || 30;
|
||||
W = Math.max(140, Math.min(Math.floor(.5 * this.window.screen.width), table.offsetWidth + W + 25));
|
||||
H = Math.max(40, Math.min(Math.floor(.5 * this.window.screen.height), table.offsetHeight + H + 25));
|
||||
this.window.resizeTo(W, H);
|
||||
var bb = this.active.getBoundingClientRect();
|
||||
if (bb) {
|
||||
var x = Math.max(0, Math.min(bb.right - Math.floor(W / 2), this.window.screen.width - W - 20));
|
||||
var y = Math.max(0, Math.min(bb.bottom - Math.floor(H / 2), this.window.screen.height - H - 20));
|
||||
this.window.moveTo(x, y);
|
||||
}
|
||||
this.active = null;
|
||||
};
|
||||
Popup.prototype.toJson = function () {
|
||||
return { type: ''
|
||||
};
|
||||
};
|
||||
Popup.popupSettings = {
|
||||
status: 'no',
|
||||
toolbar: 'no',
|
||||
locationbar: 'no',
|
||||
menubar: 'no',
|
||||
directories: 'no',
|
||||
personalbar: 'no',
|
||||
resizable: 'yes',
|
||||
scrollbars: 'yes',
|
||||
width: 400,
|
||||
height: 300,
|
||||
};
|
||||
return Popup;
|
||||
}(abstract_postable_js_1.AbstractPostable));
|
||||
exports.Popup = Popup;
|
||||
//# sourceMappingURL=popup.js.map
|
||||
1
node_modules/mj-context-menu/js/popup.js.map
generated
vendored
Normal file
1
node_modules/mj-context-menu/js/popup.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"popup.js","sourceRoot":"","sources":["../ts/popup.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AA0BA,+DAAwD;AAGxD;IAA2B,yBAAgB;IAkDzC,eAAoB,KAAa,EAAE,OAAiB;QAApD,YACE,iBAAO,SAER;QAHmB,WAAK,GAAL,KAAK,CAAQ;QA7BzB,YAAM,GAAW,IAAI,CAAC;QAEtB,mBAAa,GAAsC;YACzD,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;YAC1C,GAAG,EAAG,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;SAC5C,CAAC;QAMM,gBAAU,GAAa,EAAE,CAAC;QAE1B,gBAAU,GAAG,KAAK,CAAC;QACnB,YAAM,GAAgB,IAAI,CAAC;QAiBjC,KAAI,CAAC,OAAO,GAAG,OAAO,IAAI,cAAa,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;;IACtD,CAAC;IAZa,cAAQ,GAAtB;IACA,CAAC;IAiBM,0BAAU,GAAjB,UAAkB,IAAiB;QACjC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAKM,oBAAI,GAAX;QACE,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;IAKS,uBAAO,GAAjB;QACE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,CAA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KAAK,EAAE,GAAG;QACV,MAAM,EAAE,GAAG;KACZ,CAAC;IAgJJ,YAAC;CAAA,AA7JD,CAA2B,uCAAgB,GA6J1C;AA7JY,sBAAK"}
|
||||
6
node_modules/mj-context-menu/js/postable.d.ts
generated
vendored
Normal file
6
node_modules/mj-context-menu/js/postable.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
export interface Postable {
|
||||
isPosted(): boolean;
|
||||
post(): void;
|
||||
post(x?: number, y?: number): void;
|
||||
unpost(): void;
|
||||
}
|
||||
3
node_modules/mj-context-menu/js/postable.js
generated
vendored
Normal file
3
node_modules/mj-context-menu/js/postable.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=postable.js.map
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user