@hypericon/mico 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/markdown-editor/MarkdownEditor.js +7 -17
- package/dist/cjs/components/menu/Menu.d.ts +2 -0
- package/dist/cjs/components/menu/menu-manager.d.ts +2 -0
- package/dist/cjs/components/menu/menu-manager.js +18 -1
- package/dist/cjs/components/select/SelectOptionsPanel.d.ts +1 -0
- package/dist/cjs/components/table/Table.d.ts +2 -2
- package/dist/cjs/components/table/Table.js +2 -2
- package/dist/cjs/components/toast/toast.js +9 -19
- package/dist/cjs/components/tooltip/tooltip-function.js +3 -2
- package/dist/cjs/components/tree/Tree.d.ts +30 -30
- package/dist/cjs/components/tree/Tree.js +3 -3
- package/dist/cjs/components/tree/tree-utils.js +2 -1
- package/dist/cjs/utils/date-time.js +3 -2
- package/dist/cjs/utils/dom.js +3 -2
- package/dist/cjs/utils/events.js +2 -1
- package/dist/esm/components/markdown-editor/MarkdownEditor.js +7 -17
- package/dist/esm/components/menu/Menu.d.ts +2 -0
- package/dist/esm/components/menu/menu-manager.d.ts +2 -0
- package/dist/esm/components/menu/menu-manager.js +18 -1
- package/dist/esm/components/select/SelectOptionsPanel.d.ts +1 -0
- package/dist/esm/components/table/Table.d.ts +2 -2
- package/dist/esm/components/table/Table.js +2 -2
- package/dist/esm/components/toast/toast.js +9 -19
- package/dist/esm/components/tooltip/tooltip-function.js +3 -2
- package/dist/esm/components/tree/Tree.d.ts +30 -30
- package/dist/esm/components/tree/Tree.js +3 -3
- package/dist/esm/components/tree/tree-utils.js +2 -1
- package/dist/esm/utils/date-time.js +3 -2
- package/dist/esm/utils/dom.js +3 -2
- package/dist/esm/utils/events.js +2 -1
- package/package.json +1 -1
|
@@ -15,23 +15,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) ||
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
35
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
26
|
exports.MarkdownEditor = void 0;
|
|
37
27
|
const mithril_1 = __importStar(require("mithril"));
|
|
@@ -2,6 +2,8 @@ import m from "mithril";
|
|
|
2
2
|
import { MenuOptions } from "./Menu";
|
|
3
3
|
export declare class MenuManager {
|
|
4
4
|
private containerEl;
|
|
5
|
+
private directParentEl;
|
|
6
|
+
private directParentWrapperEl;
|
|
5
7
|
private _menuVnode;
|
|
6
8
|
menuVnode$: import("rxjs").Observable<m.Vnode<any, any> | undefined>;
|
|
7
9
|
get menuVnode(): m.Vnode<any, any> | undefined;
|
|
@@ -25,6 +25,7 @@ class MenuManager {
|
|
|
25
25
|
constructor() {
|
|
26
26
|
this._menuVnode = new rxjs_1.BehaviorSubject(undefined);
|
|
27
27
|
this.menuVnode$ = this._menuVnode.asObservable();
|
|
28
|
+
// Set up the default container element for the menu
|
|
28
29
|
this.containerEl = document.createElement("div");
|
|
29
30
|
this.containerEl.classList.add("menu-container");
|
|
30
31
|
document.body.append(this.containerEl);
|
|
@@ -65,13 +66,29 @@ class MenuManager {
|
|
|
65
66
|
menuContents,
|
|
66
67
|
]);
|
|
67
68
|
this._menuVnode.next(menuVnode);
|
|
68
|
-
|
|
69
|
+
// m.render(this.containerEl, menuVnode);
|
|
70
|
+
if ((options === null || options === void 0 ? void 0 : options.asChild) && (ev === null || ev === void 0 ? void 0 : ev.target) && ev.target instanceof HTMLElement) {
|
|
71
|
+
this.directParentEl = ev.target;
|
|
72
|
+
// m.render(ev.target, menuVnode);
|
|
73
|
+
// this.containerEl = ev.target;
|
|
74
|
+
this.directParentWrapperEl = document.createElement("div");
|
|
75
|
+
this.directParentEl.append(this.directParentWrapperEl);
|
|
76
|
+
mithril_1.default.render(this.directParentWrapperEl, menuVnode);
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
mithril_1.default.render(this.containerEl, menuVnode);
|
|
80
|
+
}
|
|
81
|
+
// m.render(this.containerEl, menuVnode);
|
|
69
82
|
// console.log("Added menu");
|
|
70
83
|
});
|
|
71
84
|
}
|
|
72
85
|
hide() {
|
|
86
|
+
var _a;
|
|
73
87
|
this._menuVnode.next(undefined);
|
|
74
88
|
mithril_1.default.render(this.containerEl, []);
|
|
89
|
+
(_a = this.directParentWrapperEl) === null || _a === void 0 ? void 0 : _a.remove();
|
|
90
|
+
this.directParentWrapperEl = undefined;
|
|
91
|
+
this.directParentEl = undefined;
|
|
75
92
|
// console.log("Closed menu");
|
|
76
93
|
}
|
|
77
94
|
}
|
|
@@ -59,10 +59,10 @@ export declare function typedTable<T>(): {
|
|
|
59
59
|
col: TableColumnDefinitionFn<T>;
|
|
60
60
|
oninit?(this: m._NoLifecycle<m.Component<TableAttrs<T>, TableState<T>> & TableState<T>>, vnode: m.Vnode<TableAttrs<T>, m._NoLifecycle<m.Component<TableAttrs<T>, TableState<T>> & TableState<T>>>): any;
|
|
61
61
|
oncreate?(this: m._NoLifecycle<m.Component<TableAttrs<T>, TableState<T>> & TableState<T>>, vnode: m.VnodeDOM<TableAttrs<T>, m._NoLifecycle<m.Component<TableAttrs<T>, TableState<T>> & TableState<T>>>): any;
|
|
62
|
-
onbeforeremove?(this: m._NoLifecycle<m.Component<TableAttrs<T>, TableState<T>> & TableState<T>>, vnode: m.VnodeDOM<TableAttrs<T>, m._NoLifecycle<m.Component<TableAttrs<T>, TableState<T>> & TableState<T>>>): Promise<any
|
|
62
|
+
onbeforeremove?(this: m._NoLifecycle<m.Component<TableAttrs<T>, TableState<T>> & TableState<T>>, vnode: m.VnodeDOM<TableAttrs<T>, m._NoLifecycle<m.Component<TableAttrs<T>, TableState<T>> & TableState<T>>>): void | Promise<any>;
|
|
63
63
|
onremove?(this: m._NoLifecycle<m.Component<TableAttrs<T>, TableState<T>> & TableState<T>>, vnode: m.VnodeDOM<TableAttrs<T>, m._NoLifecycle<m.Component<TableAttrs<T>, TableState<T>> & TableState<T>>>): any;
|
|
64
64
|
onbeforeupdate?(this: m._NoLifecycle<m.Component<TableAttrs<T>, TableState<T>> & TableState<T>>, vnode: m.Vnode<TableAttrs<T>, m._NoLifecycle<m.Component<TableAttrs<T>, TableState<T>> & TableState<T>>>, old: m.VnodeDOM<TableAttrs<T>, m._NoLifecycle<m.Component<TableAttrs<T>, TableState<T>> & TableState<T>>>): boolean | void;
|
|
65
65
|
onupdate?(this: m._NoLifecycle<m.Component<TableAttrs<T>, TableState<T>> & TableState<T>>, vnode: m.VnodeDOM<TableAttrs<T>, m._NoLifecycle<m.Component<TableAttrs<T>, TableState<T>> & TableState<T>>>): any;
|
|
66
|
-
view(this: m._NoLifecycle<m.Component<TableAttrs<T>, TableState<T>> & TableState<T>>, vnode: m.Vnode<TableAttrs<T>, m._NoLifecycle<m.Component<TableAttrs<T>, TableState<T>> & TableState<T>>>): m.Children
|
|
66
|
+
view(this: m._NoLifecycle<m.Component<TableAttrs<T>, TableState<T>> & TableState<T>>, vnode: m.Vnode<TableAttrs<T>, m._NoLifecycle<m.Component<TableAttrs<T>, TableState<T>> & TableState<T>>>): void | m.Children;
|
|
67
67
|
};
|
|
68
68
|
export declare const Table: m.Component<TableAttrs<any>, TableState<any>>;
|
|
@@ -3,8 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Table = void 0;
|
|
7
|
-
exports.typedTable = typedTable;
|
|
6
|
+
exports.Table = exports.typedTable = void 0;
|
|
8
7
|
const mithril_1 = __importDefault(require("mithril"));
|
|
9
8
|
/**
|
|
10
9
|
* Build a typed Table component which includes type checking for column definitions
|
|
@@ -28,6 +27,7 @@ function typedTable() {
|
|
|
28
27
|
};
|
|
29
28
|
return Object.assign(Object.assign({}, typedTable), { col });
|
|
30
29
|
}
|
|
30
|
+
exports.typedTable = typedTable;
|
|
31
31
|
exports.Table = {
|
|
32
32
|
view({ attrs }) {
|
|
33
33
|
var _a, _b, _c, _d;
|
|
@@ -15,29 +15,18 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) ||
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
35
25
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
27
|
};
|
|
38
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.DefaultToastOptions = void 0;
|
|
40
|
-
exports.toast = toast;
|
|
29
|
+
exports.toast = exports.DefaultToastOptions = void 0;
|
|
41
30
|
const toastify_js_1 = __importStar(require("toastify-js"));
|
|
42
31
|
const mithril_1 = __importDefault(require("mithril"));
|
|
43
32
|
require("toastify-js/src/toastify.css");
|
|
@@ -69,3 +58,4 @@ function toast(message, options) {
|
|
|
69
58
|
hide: () => toastify.hideToast(),
|
|
70
59
|
};
|
|
71
60
|
}
|
|
61
|
+
exports.toast = toast;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.tooltip =
|
|
4
|
-
exports.tooltipSpread = tooltipSpread;
|
|
3
|
+
exports.tooltipSpread = exports.tooltip = void 0;
|
|
5
4
|
const tooltip_defaults_1 = require("./tooltip-defaults");
|
|
6
5
|
/**
|
|
7
6
|
* Display a tooltip using the given mouse event.
|
|
@@ -63,6 +62,7 @@ function tooltip(ev, tooltip, opts) {
|
|
|
63
62
|
};
|
|
64
63
|
target.addEventListener("mouseleave", clearFn);
|
|
65
64
|
}
|
|
65
|
+
exports.tooltip = tooltip;
|
|
66
66
|
/**
|
|
67
67
|
* Return an object that can be spread into an element's attrs to add a tooltip using the mouseenter event
|
|
68
68
|
*
|
|
@@ -85,6 +85,7 @@ function tooltipSpread(value, opts) {
|
|
|
85
85
|
onmouseenter: (ev) => tooltip(ev, value, opts),
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
|
+
exports.tooltipSpread = tooltipSpread;
|
|
88
89
|
/**
|
|
89
90
|
* TODO: consider adding arrows to top/bottom/left/right positioned tooltips
|
|
90
91
|
* e.g.: https://getbootstrap.com/docs/3.4/javascript/#tooltips
|
|
@@ -7,11 +7,11 @@ export declare const Tree: m.Component<{
|
|
|
7
7
|
/** The root list of nodes to display in the tree (circular references will crash) */
|
|
8
8
|
nodes: TreeNode<any>[];
|
|
9
9
|
/** Enable drag and drop reordering */
|
|
10
|
-
enableReordering?: boolean;
|
|
10
|
+
enableReordering?: boolean | undefined;
|
|
11
11
|
/** Enable expanding/collapsing of nodes with children */
|
|
12
|
-
enableToggling?: boolean;
|
|
12
|
+
enableToggling?: boolean | undefined;
|
|
13
13
|
/** Enable debug logging of certain events */
|
|
14
|
-
enableLogging?: boolean;
|
|
14
|
+
enableLogging?: boolean | undefined;
|
|
15
15
|
/** Function called when a node with children is toggled */
|
|
16
16
|
ontoggle?: ((toggle: {
|
|
17
17
|
node: TreeNode<any>;
|
|
@@ -30,23 +30,23 @@ export declare const Tree: m.Component<{
|
|
|
30
30
|
above: boolean;
|
|
31
31
|
}) => void) | undefined;
|
|
32
32
|
/** Optional message to display in defined but empty children lists */
|
|
33
|
-
emptyChildrenMessage?: string;
|
|
33
|
+
emptyChildrenMessage?: string | undefined;
|
|
34
34
|
/** Optionally override the default icon for a collapsed node */
|
|
35
|
-
collapsedIcon?: m.Vnode<any, any
|
|
35
|
+
collapsedIcon?: m.Vnode<any, any> | undefined;
|
|
36
36
|
/** Optionally override the default icon for an expanded node */
|
|
37
|
-
expandedIcon?: m.Vnode<any, any
|
|
37
|
+
expandedIcon?: m.Vnode<any, any> | undefined;
|
|
38
38
|
/** Optionally override the default toggle icon for a node that cannot toggle */
|
|
39
|
-
noToggleIcon?: m.Vnode<any, any
|
|
39
|
+
noToggleIcon?: m.Vnode<any, any> | undefined;
|
|
40
40
|
/** Optionally enable toggling of expansion nodes by clicking their labels */
|
|
41
|
-
toggleExpansionWithLabel?: boolean;
|
|
41
|
+
toggleExpansionWithLabel?: boolean | undefined;
|
|
42
42
|
/** Optionally override the default nesting width */
|
|
43
|
-
nestingWidth?: string;
|
|
43
|
+
nestingWidth?: string | undefined;
|
|
44
44
|
/** Optionally override the default toggle button width */
|
|
45
|
-
toggleButtonWidth?: string;
|
|
45
|
+
toggleButtonWidth?: string | undefined;
|
|
46
46
|
/** Optional CSS classes to apply to the root div */
|
|
47
|
-
class?: string;
|
|
47
|
+
class?: string | undefined;
|
|
48
48
|
/** Optional CSS styles to apply to the root div */
|
|
49
|
-
style?: string;
|
|
49
|
+
style?: string | undefined;
|
|
50
50
|
}, {
|
|
51
51
|
isReordering: boolean;
|
|
52
52
|
thisEl: Element;
|
|
@@ -62,46 +62,46 @@ export declare function createTree<TNodeData extends object = {}>(): m.Component
|
|
|
62
62
|
/** The root list of nodes to display in the tree (circular references will crash) */
|
|
63
63
|
nodes: TreeNode<TNodeData>[];
|
|
64
64
|
/** Enable drag and drop reordering */
|
|
65
|
-
enableReordering?: boolean;
|
|
65
|
+
enableReordering?: boolean | undefined;
|
|
66
66
|
/** Enable expanding/collapsing of nodes with children */
|
|
67
|
-
enableToggling?: boolean;
|
|
67
|
+
enableToggling?: boolean | undefined;
|
|
68
68
|
/** Enable debug logging of certain events */
|
|
69
|
-
enableLogging?: boolean;
|
|
69
|
+
enableLogging?: boolean | undefined;
|
|
70
70
|
/** Function called when a node with children is toggled */
|
|
71
|
-
ontoggle?: (toggle: {
|
|
71
|
+
ontoggle?: ((toggle: {
|
|
72
72
|
node: TreeNode<TNodeData>;
|
|
73
73
|
expanded: boolean;
|
|
74
74
|
recursive: boolean;
|
|
75
|
-
}) => void;
|
|
75
|
+
}) => void) | undefined;
|
|
76
76
|
/** Function called when a node label is clicked */
|
|
77
|
-
onclick?: (click: {
|
|
77
|
+
onclick?: ((click: {
|
|
78
78
|
ev: MouseEvent;
|
|
79
79
|
node: TreeNode<TNodeData>;
|
|
80
|
-
}) => void;
|
|
80
|
+
}) => void) | undefined;
|
|
81
81
|
/** Function called when a node has been dragged to a new position in the tree */
|
|
82
|
-
onreorder?: (reorder: {
|
|
82
|
+
onreorder?: ((reorder: {
|
|
83
83
|
moved: TNodeData;
|
|
84
84
|
target: TNodeData;
|
|
85
85
|
above: boolean;
|
|
86
|
-
}) => void;
|
|
86
|
+
}) => void) | undefined;
|
|
87
87
|
/** Optional message to display in defined but empty children lists */
|
|
88
|
-
emptyChildrenMessage?: string;
|
|
88
|
+
emptyChildrenMessage?: string | undefined;
|
|
89
89
|
/** Optionally override the default icon for a collapsed node */
|
|
90
|
-
collapsedIcon?: m.Vnode<any, any
|
|
90
|
+
collapsedIcon?: m.Vnode<any, any> | undefined;
|
|
91
91
|
/** Optionally override the default icon for an expanded node */
|
|
92
|
-
expandedIcon?: m.Vnode<any, any
|
|
92
|
+
expandedIcon?: m.Vnode<any, any> | undefined;
|
|
93
93
|
/** Optionally override the default toggle icon for a node that cannot toggle */
|
|
94
|
-
noToggleIcon?: m.Vnode<any, any
|
|
94
|
+
noToggleIcon?: m.Vnode<any, any> | undefined;
|
|
95
95
|
/** Optionally enable toggling of expansion nodes by clicking their labels */
|
|
96
|
-
toggleExpansionWithLabel?: boolean;
|
|
96
|
+
toggleExpansionWithLabel?: boolean | undefined;
|
|
97
97
|
/** Optionally override the default nesting width */
|
|
98
|
-
nestingWidth?: string;
|
|
98
|
+
nestingWidth?: string | undefined;
|
|
99
99
|
/** Optionally override the default toggle button width */
|
|
100
|
-
toggleButtonWidth?: string;
|
|
100
|
+
toggleButtonWidth?: string | undefined;
|
|
101
101
|
/** Optional CSS classes to apply to the root div */
|
|
102
|
-
class?: string;
|
|
102
|
+
class?: string | undefined;
|
|
103
103
|
/** Optional CSS styles to apply to the root div */
|
|
104
|
-
style?: string;
|
|
104
|
+
style?: string | undefined;
|
|
105
105
|
}, {
|
|
106
106
|
isReordering: boolean;
|
|
107
107
|
thisEl: Element;
|
|
@@ -3,8 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Tree = void 0;
|
|
7
|
-
exports.createTree = createTree;
|
|
6
|
+
exports.createTree = exports.Tree = void 0;
|
|
8
7
|
const utils_1 = require("@hypericon/utils");
|
|
9
8
|
const mithril_1 = __importDefault(require("mithril"));
|
|
10
9
|
const icon_1 = require("../icon");
|
|
@@ -168,7 +167,7 @@ function createTree() {
|
|
|
168
167
|
}, attrs.noToggleIcon || (0, mithril_1.default)(icon_1.Icon, { fas: "caret-right" })) : [],
|
|
169
168
|
(0, mithril_1.default)(".mico-tree-label", {
|
|
170
169
|
class: `${targettingDragClass}`,
|
|
171
|
-
style: "position: relative; flex: 1 1 0%; overflow-x: hidden;",
|
|
170
|
+
style: "position: relative; flex: 1 1 0%; overflow-x: hidden;",
|
|
172
171
|
draggable: enableReordering && (node.draggable !== false),
|
|
173
172
|
onclick: (ev) => {
|
|
174
173
|
var _a;
|
|
@@ -227,3 +226,4 @@ function createTree() {
|
|
|
227
226
|
};
|
|
228
227
|
return Tree;
|
|
229
228
|
}
|
|
229
|
+
exports.createTree = createTree;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.allTreeDescendants =
|
|
3
|
+
exports.allTreeDescendants = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Recursively find the list of all descendants of the given node.
|
|
6
6
|
*
|
|
@@ -19,3 +19,4 @@ function allTreeDescendants(node) {
|
|
|
19
19
|
}
|
|
20
20
|
return descendants;
|
|
21
21
|
}
|
|
22
|
+
exports.allTreeDescendants = allTreeDescendants;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.dateToHtml =
|
|
4
|
-
exports.dateToHtmlUTC = dateToHtmlUTC;
|
|
3
|
+
exports.dateToHtmlUTC = exports.dateToHtml = void 0;
|
|
5
4
|
function dateToHtml(d) {
|
|
6
5
|
if (d === undefined)
|
|
7
6
|
return undefined;
|
|
@@ -13,6 +12,7 @@ function dateToHtml(d) {
|
|
|
13
12
|
String(d.getDate()).padStart(2, "0"),
|
|
14
13
|
].join("-");
|
|
15
14
|
}
|
|
15
|
+
exports.dateToHtml = dateToHtml;
|
|
16
16
|
function dateToHtmlUTC(d) {
|
|
17
17
|
if (d === undefined)
|
|
18
18
|
return undefined;
|
|
@@ -24,3 +24,4 @@ function dateToHtmlUTC(d) {
|
|
|
24
24
|
String(d.getUTCDate()).padStart(2, "0"),
|
|
25
25
|
].join("-");
|
|
26
26
|
}
|
|
27
|
+
exports.dateToHtmlUTC = dateToHtmlUTC;
|
package/dist/cjs/utils/dom.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.coordsWithinElement =
|
|
4
|
-
exports.mouseWithinElement = mouseWithinElement;
|
|
3
|
+
exports.mouseWithinElement = exports.coordsWithinElement = void 0;
|
|
5
4
|
/**
|
|
6
5
|
*
|
|
7
6
|
* @param x
|
|
@@ -16,6 +15,7 @@ function coordsWithinElement(x, y, element, strict = false) {
|
|
|
16
15
|
? (rect.left < x && x < rect.right && rect.top < y && y < rect.bottom)
|
|
17
16
|
: (rect.left <= x && x <= rect.right && rect.top <= y && y <= rect.bottom);
|
|
18
17
|
}
|
|
18
|
+
exports.coordsWithinElement = coordsWithinElement;
|
|
19
19
|
/**
|
|
20
20
|
* Find whether a mouse event is within a given DOM element using clientX/Y and the bounding client rect
|
|
21
21
|
* @param ev
|
|
@@ -30,3 +30,4 @@ function mouseWithinElement(ev, element) {
|
|
|
30
30
|
(ev.clientX <= elementRect.right);
|
|
31
31
|
return isWithin;
|
|
32
32
|
}
|
|
33
|
+
exports.mouseWithinElement = mouseWithinElement;
|
package/dist/cjs/utils/events.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.dragEventFiles =
|
|
3
|
+
exports.dragEventFiles = void 0;
|
|
4
4
|
function dragEventFiles(ev) {
|
|
5
5
|
var _a, _b, _c;
|
|
6
6
|
const files = [];
|
|
@@ -26,3 +26,4 @@ function dragEventFiles(ev) {
|
|
|
26
26
|
}
|
|
27
27
|
return files;
|
|
28
28
|
}
|
|
29
|
+
exports.dragEventFiles = dragEventFiles;
|
|
@@ -15,23 +15,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) ||
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
35
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
26
|
exports.MarkdownEditor = void 0;
|
|
37
27
|
const mithril_1 = __importStar(require("mithril"));
|
|
@@ -2,6 +2,8 @@ import m from "mithril";
|
|
|
2
2
|
import { MenuOptions } from "./Menu";
|
|
3
3
|
export declare class MenuManager {
|
|
4
4
|
private containerEl;
|
|
5
|
+
private directParentEl;
|
|
6
|
+
private directParentWrapperEl;
|
|
5
7
|
private _menuVnode;
|
|
6
8
|
menuVnode$: import("rxjs").Observable<m.Vnode<any, any> | undefined>;
|
|
7
9
|
get menuVnode(): m.Vnode<any, any> | undefined;
|
|
@@ -25,6 +25,7 @@ class MenuManager {
|
|
|
25
25
|
constructor() {
|
|
26
26
|
this._menuVnode = new rxjs_1.BehaviorSubject(undefined);
|
|
27
27
|
this.menuVnode$ = this._menuVnode.asObservable();
|
|
28
|
+
// Set up the default container element for the menu
|
|
28
29
|
this.containerEl = document.createElement("div");
|
|
29
30
|
this.containerEl.classList.add("menu-container");
|
|
30
31
|
document.body.append(this.containerEl);
|
|
@@ -65,13 +66,29 @@ class MenuManager {
|
|
|
65
66
|
menuContents,
|
|
66
67
|
]);
|
|
67
68
|
this._menuVnode.next(menuVnode);
|
|
68
|
-
|
|
69
|
+
// m.render(this.containerEl, menuVnode);
|
|
70
|
+
if ((options === null || options === void 0 ? void 0 : options.asChild) && (ev === null || ev === void 0 ? void 0 : ev.target) && ev.target instanceof HTMLElement) {
|
|
71
|
+
this.directParentEl = ev.target;
|
|
72
|
+
// m.render(ev.target, menuVnode);
|
|
73
|
+
// this.containerEl = ev.target;
|
|
74
|
+
this.directParentWrapperEl = document.createElement("div");
|
|
75
|
+
this.directParentEl.append(this.directParentWrapperEl);
|
|
76
|
+
mithril_1.default.render(this.directParentWrapperEl, menuVnode);
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
mithril_1.default.render(this.containerEl, menuVnode);
|
|
80
|
+
}
|
|
81
|
+
// m.render(this.containerEl, menuVnode);
|
|
69
82
|
// console.log("Added menu");
|
|
70
83
|
});
|
|
71
84
|
}
|
|
72
85
|
hide() {
|
|
86
|
+
var _a;
|
|
73
87
|
this._menuVnode.next(undefined);
|
|
74
88
|
mithril_1.default.render(this.containerEl, []);
|
|
89
|
+
(_a = this.directParentWrapperEl) === null || _a === void 0 ? void 0 : _a.remove();
|
|
90
|
+
this.directParentWrapperEl = undefined;
|
|
91
|
+
this.directParentEl = undefined;
|
|
75
92
|
// console.log("Closed menu");
|
|
76
93
|
}
|
|
77
94
|
}
|
|
@@ -59,10 +59,10 @@ export declare function typedTable<T>(): {
|
|
|
59
59
|
col: TableColumnDefinitionFn<T>;
|
|
60
60
|
oninit?(this: m._NoLifecycle<m.Component<TableAttrs<T>, TableState<T>> & TableState<T>>, vnode: m.Vnode<TableAttrs<T>, m._NoLifecycle<m.Component<TableAttrs<T>, TableState<T>> & TableState<T>>>): any;
|
|
61
61
|
oncreate?(this: m._NoLifecycle<m.Component<TableAttrs<T>, TableState<T>> & TableState<T>>, vnode: m.VnodeDOM<TableAttrs<T>, m._NoLifecycle<m.Component<TableAttrs<T>, TableState<T>> & TableState<T>>>): any;
|
|
62
|
-
onbeforeremove?(this: m._NoLifecycle<m.Component<TableAttrs<T>, TableState<T>> & TableState<T>>, vnode: m.VnodeDOM<TableAttrs<T>, m._NoLifecycle<m.Component<TableAttrs<T>, TableState<T>> & TableState<T>>>): Promise<any
|
|
62
|
+
onbeforeremove?(this: m._NoLifecycle<m.Component<TableAttrs<T>, TableState<T>> & TableState<T>>, vnode: m.VnodeDOM<TableAttrs<T>, m._NoLifecycle<m.Component<TableAttrs<T>, TableState<T>> & TableState<T>>>): void | Promise<any>;
|
|
63
63
|
onremove?(this: m._NoLifecycle<m.Component<TableAttrs<T>, TableState<T>> & TableState<T>>, vnode: m.VnodeDOM<TableAttrs<T>, m._NoLifecycle<m.Component<TableAttrs<T>, TableState<T>> & TableState<T>>>): any;
|
|
64
64
|
onbeforeupdate?(this: m._NoLifecycle<m.Component<TableAttrs<T>, TableState<T>> & TableState<T>>, vnode: m.Vnode<TableAttrs<T>, m._NoLifecycle<m.Component<TableAttrs<T>, TableState<T>> & TableState<T>>>, old: m.VnodeDOM<TableAttrs<T>, m._NoLifecycle<m.Component<TableAttrs<T>, TableState<T>> & TableState<T>>>): boolean | void;
|
|
65
65
|
onupdate?(this: m._NoLifecycle<m.Component<TableAttrs<T>, TableState<T>> & TableState<T>>, vnode: m.VnodeDOM<TableAttrs<T>, m._NoLifecycle<m.Component<TableAttrs<T>, TableState<T>> & TableState<T>>>): any;
|
|
66
|
-
view(this: m._NoLifecycle<m.Component<TableAttrs<T>, TableState<T>> & TableState<T>>, vnode: m.Vnode<TableAttrs<T>, m._NoLifecycle<m.Component<TableAttrs<T>, TableState<T>> & TableState<T>>>): m.Children
|
|
66
|
+
view(this: m._NoLifecycle<m.Component<TableAttrs<T>, TableState<T>> & TableState<T>>, vnode: m.Vnode<TableAttrs<T>, m._NoLifecycle<m.Component<TableAttrs<T>, TableState<T>> & TableState<T>>>): void | m.Children;
|
|
67
67
|
};
|
|
68
68
|
export declare const Table: m.Component<TableAttrs<any>, TableState<any>>;
|
|
@@ -3,8 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Table = void 0;
|
|
7
|
-
exports.typedTable = typedTable;
|
|
6
|
+
exports.Table = exports.typedTable = void 0;
|
|
8
7
|
const mithril_1 = __importDefault(require("mithril"));
|
|
9
8
|
/**
|
|
10
9
|
* Build a typed Table component which includes type checking for column definitions
|
|
@@ -28,6 +27,7 @@ function typedTable() {
|
|
|
28
27
|
};
|
|
29
28
|
return Object.assign(Object.assign({}, typedTable), { col });
|
|
30
29
|
}
|
|
30
|
+
exports.typedTable = typedTable;
|
|
31
31
|
exports.Table = {
|
|
32
32
|
view({ attrs }) {
|
|
33
33
|
var _a, _b, _c, _d;
|
|
@@ -15,29 +15,18 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) ||
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
35
25
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
27
|
};
|
|
38
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.DefaultToastOptions = void 0;
|
|
40
|
-
exports.toast = toast;
|
|
29
|
+
exports.toast = exports.DefaultToastOptions = void 0;
|
|
41
30
|
const toastify_js_1 = __importStar(require("toastify-js"));
|
|
42
31
|
const mithril_1 = __importDefault(require("mithril"));
|
|
43
32
|
require("toastify-js/src/toastify.css");
|
|
@@ -69,3 +58,4 @@ function toast(message, options) {
|
|
|
69
58
|
hide: () => toastify.hideToast(),
|
|
70
59
|
};
|
|
71
60
|
}
|
|
61
|
+
exports.toast = toast;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.tooltip =
|
|
4
|
-
exports.tooltipSpread = tooltipSpread;
|
|
3
|
+
exports.tooltipSpread = exports.tooltip = void 0;
|
|
5
4
|
const tooltip_defaults_1 = require("./tooltip-defaults");
|
|
6
5
|
/**
|
|
7
6
|
* Display a tooltip using the given mouse event.
|
|
@@ -63,6 +62,7 @@ function tooltip(ev, tooltip, opts) {
|
|
|
63
62
|
};
|
|
64
63
|
target.addEventListener("mouseleave", clearFn);
|
|
65
64
|
}
|
|
65
|
+
exports.tooltip = tooltip;
|
|
66
66
|
/**
|
|
67
67
|
* Return an object that can be spread into an element's attrs to add a tooltip using the mouseenter event
|
|
68
68
|
*
|
|
@@ -85,6 +85,7 @@ function tooltipSpread(value, opts) {
|
|
|
85
85
|
onmouseenter: (ev) => tooltip(ev, value, opts),
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
|
+
exports.tooltipSpread = tooltipSpread;
|
|
88
89
|
/**
|
|
89
90
|
* TODO: consider adding arrows to top/bottom/left/right positioned tooltips
|
|
90
91
|
* e.g.: https://getbootstrap.com/docs/3.4/javascript/#tooltips
|
|
@@ -7,11 +7,11 @@ export declare const Tree: m.Component<{
|
|
|
7
7
|
/** The root list of nodes to display in the tree (circular references will crash) */
|
|
8
8
|
nodes: TreeNode<any>[];
|
|
9
9
|
/** Enable drag and drop reordering */
|
|
10
|
-
enableReordering?: boolean;
|
|
10
|
+
enableReordering?: boolean | undefined;
|
|
11
11
|
/** Enable expanding/collapsing of nodes with children */
|
|
12
|
-
enableToggling?: boolean;
|
|
12
|
+
enableToggling?: boolean | undefined;
|
|
13
13
|
/** Enable debug logging of certain events */
|
|
14
|
-
enableLogging?: boolean;
|
|
14
|
+
enableLogging?: boolean | undefined;
|
|
15
15
|
/** Function called when a node with children is toggled */
|
|
16
16
|
ontoggle?: ((toggle: {
|
|
17
17
|
node: TreeNode<any>;
|
|
@@ -30,23 +30,23 @@ export declare const Tree: m.Component<{
|
|
|
30
30
|
above: boolean;
|
|
31
31
|
}) => void) | undefined;
|
|
32
32
|
/** Optional message to display in defined but empty children lists */
|
|
33
|
-
emptyChildrenMessage?: string;
|
|
33
|
+
emptyChildrenMessage?: string | undefined;
|
|
34
34
|
/** Optionally override the default icon for a collapsed node */
|
|
35
|
-
collapsedIcon?: m.Vnode<any, any
|
|
35
|
+
collapsedIcon?: m.Vnode<any, any> | undefined;
|
|
36
36
|
/** Optionally override the default icon for an expanded node */
|
|
37
|
-
expandedIcon?: m.Vnode<any, any
|
|
37
|
+
expandedIcon?: m.Vnode<any, any> | undefined;
|
|
38
38
|
/** Optionally override the default toggle icon for a node that cannot toggle */
|
|
39
|
-
noToggleIcon?: m.Vnode<any, any
|
|
39
|
+
noToggleIcon?: m.Vnode<any, any> | undefined;
|
|
40
40
|
/** Optionally enable toggling of expansion nodes by clicking their labels */
|
|
41
|
-
toggleExpansionWithLabel?: boolean;
|
|
41
|
+
toggleExpansionWithLabel?: boolean | undefined;
|
|
42
42
|
/** Optionally override the default nesting width */
|
|
43
|
-
nestingWidth?: string;
|
|
43
|
+
nestingWidth?: string | undefined;
|
|
44
44
|
/** Optionally override the default toggle button width */
|
|
45
|
-
toggleButtonWidth?: string;
|
|
45
|
+
toggleButtonWidth?: string | undefined;
|
|
46
46
|
/** Optional CSS classes to apply to the root div */
|
|
47
|
-
class?: string;
|
|
47
|
+
class?: string | undefined;
|
|
48
48
|
/** Optional CSS styles to apply to the root div */
|
|
49
|
-
style?: string;
|
|
49
|
+
style?: string | undefined;
|
|
50
50
|
}, {
|
|
51
51
|
isReordering: boolean;
|
|
52
52
|
thisEl: Element;
|
|
@@ -62,46 +62,46 @@ export declare function createTree<TNodeData extends object = {}>(): m.Component
|
|
|
62
62
|
/** The root list of nodes to display in the tree (circular references will crash) */
|
|
63
63
|
nodes: TreeNode<TNodeData>[];
|
|
64
64
|
/** Enable drag and drop reordering */
|
|
65
|
-
enableReordering?: boolean;
|
|
65
|
+
enableReordering?: boolean | undefined;
|
|
66
66
|
/** Enable expanding/collapsing of nodes with children */
|
|
67
|
-
enableToggling?: boolean;
|
|
67
|
+
enableToggling?: boolean | undefined;
|
|
68
68
|
/** Enable debug logging of certain events */
|
|
69
|
-
enableLogging?: boolean;
|
|
69
|
+
enableLogging?: boolean | undefined;
|
|
70
70
|
/** Function called when a node with children is toggled */
|
|
71
|
-
ontoggle?: (toggle: {
|
|
71
|
+
ontoggle?: ((toggle: {
|
|
72
72
|
node: TreeNode<TNodeData>;
|
|
73
73
|
expanded: boolean;
|
|
74
74
|
recursive: boolean;
|
|
75
|
-
}) => void;
|
|
75
|
+
}) => void) | undefined;
|
|
76
76
|
/** Function called when a node label is clicked */
|
|
77
|
-
onclick?: (click: {
|
|
77
|
+
onclick?: ((click: {
|
|
78
78
|
ev: MouseEvent;
|
|
79
79
|
node: TreeNode<TNodeData>;
|
|
80
|
-
}) => void;
|
|
80
|
+
}) => void) | undefined;
|
|
81
81
|
/** Function called when a node has been dragged to a new position in the tree */
|
|
82
|
-
onreorder?: (reorder: {
|
|
82
|
+
onreorder?: ((reorder: {
|
|
83
83
|
moved: TNodeData;
|
|
84
84
|
target: TNodeData;
|
|
85
85
|
above: boolean;
|
|
86
|
-
}) => void;
|
|
86
|
+
}) => void) | undefined;
|
|
87
87
|
/** Optional message to display in defined but empty children lists */
|
|
88
|
-
emptyChildrenMessage?: string;
|
|
88
|
+
emptyChildrenMessage?: string | undefined;
|
|
89
89
|
/** Optionally override the default icon for a collapsed node */
|
|
90
|
-
collapsedIcon?: m.Vnode<any, any
|
|
90
|
+
collapsedIcon?: m.Vnode<any, any> | undefined;
|
|
91
91
|
/** Optionally override the default icon for an expanded node */
|
|
92
|
-
expandedIcon?: m.Vnode<any, any
|
|
92
|
+
expandedIcon?: m.Vnode<any, any> | undefined;
|
|
93
93
|
/** Optionally override the default toggle icon for a node that cannot toggle */
|
|
94
|
-
noToggleIcon?: m.Vnode<any, any
|
|
94
|
+
noToggleIcon?: m.Vnode<any, any> | undefined;
|
|
95
95
|
/** Optionally enable toggling of expansion nodes by clicking their labels */
|
|
96
|
-
toggleExpansionWithLabel?: boolean;
|
|
96
|
+
toggleExpansionWithLabel?: boolean | undefined;
|
|
97
97
|
/** Optionally override the default nesting width */
|
|
98
|
-
nestingWidth?: string;
|
|
98
|
+
nestingWidth?: string | undefined;
|
|
99
99
|
/** Optionally override the default toggle button width */
|
|
100
|
-
toggleButtonWidth?: string;
|
|
100
|
+
toggleButtonWidth?: string | undefined;
|
|
101
101
|
/** Optional CSS classes to apply to the root div */
|
|
102
|
-
class?: string;
|
|
102
|
+
class?: string | undefined;
|
|
103
103
|
/** Optional CSS styles to apply to the root div */
|
|
104
|
-
style?: string;
|
|
104
|
+
style?: string | undefined;
|
|
105
105
|
}, {
|
|
106
106
|
isReordering: boolean;
|
|
107
107
|
thisEl: Element;
|
|
@@ -3,8 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Tree = void 0;
|
|
7
|
-
exports.createTree = createTree;
|
|
6
|
+
exports.createTree = exports.Tree = void 0;
|
|
8
7
|
const utils_1 = require("@hypericon/utils");
|
|
9
8
|
const mithril_1 = __importDefault(require("mithril"));
|
|
10
9
|
const icon_1 = require("../icon");
|
|
@@ -168,7 +167,7 @@ function createTree() {
|
|
|
168
167
|
}, attrs.noToggleIcon || (0, mithril_1.default)(icon_1.Icon, { fas: "caret-right" })) : [],
|
|
169
168
|
(0, mithril_1.default)(".mico-tree-label", {
|
|
170
169
|
class: `${targettingDragClass}`,
|
|
171
|
-
style: "position: relative; flex: 1 1 0%; overflow-x: hidden;",
|
|
170
|
+
style: "position: relative; flex: 1 1 0%; overflow-x: hidden;",
|
|
172
171
|
draggable: enableReordering && (node.draggable !== false),
|
|
173
172
|
onclick: (ev) => {
|
|
174
173
|
var _a;
|
|
@@ -227,3 +226,4 @@ function createTree() {
|
|
|
227
226
|
};
|
|
228
227
|
return Tree;
|
|
229
228
|
}
|
|
229
|
+
exports.createTree = createTree;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.allTreeDescendants =
|
|
3
|
+
exports.allTreeDescendants = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Recursively find the list of all descendants of the given node.
|
|
6
6
|
*
|
|
@@ -19,3 +19,4 @@ function allTreeDescendants(node) {
|
|
|
19
19
|
}
|
|
20
20
|
return descendants;
|
|
21
21
|
}
|
|
22
|
+
exports.allTreeDescendants = allTreeDescendants;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.dateToHtml =
|
|
4
|
-
exports.dateToHtmlUTC = dateToHtmlUTC;
|
|
3
|
+
exports.dateToHtmlUTC = exports.dateToHtml = void 0;
|
|
5
4
|
function dateToHtml(d) {
|
|
6
5
|
if (d === undefined)
|
|
7
6
|
return undefined;
|
|
@@ -13,6 +12,7 @@ function dateToHtml(d) {
|
|
|
13
12
|
String(d.getDate()).padStart(2, "0"),
|
|
14
13
|
].join("-");
|
|
15
14
|
}
|
|
15
|
+
exports.dateToHtml = dateToHtml;
|
|
16
16
|
function dateToHtmlUTC(d) {
|
|
17
17
|
if (d === undefined)
|
|
18
18
|
return undefined;
|
|
@@ -24,3 +24,4 @@ function dateToHtmlUTC(d) {
|
|
|
24
24
|
String(d.getUTCDate()).padStart(2, "0"),
|
|
25
25
|
].join("-");
|
|
26
26
|
}
|
|
27
|
+
exports.dateToHtmlUTC = dateToHtmlUTC;
|
package/dist/esm/utils/dom.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.coordsWithinElement =
|
|
4
|
-
exports.mouseWithinElement = mouseWithinElement;
|
|
3
|
+
exports.mouseWithinElement = exports.coordsWithinElement = void 0;
|
|
5
4
|
/**
|
|
6
5
|
*
|
|
7
6
|
* @param x
|
|
@@ -16,6 +15,7 @@ function coordsWithinElement(x, y, element, strict = false) {
|
|
|
16
15
|
? (rect.left < x && x < rect.right && rect.top < y && y < rect.bottom)
|
|
17
16
|
: (rect.left <= x && x <= rect.right && rect.top <= y && y <= rect.bottom);
|
|
18
17
|
}
|
|
18
|
+
exports.coordsWithinElement = coordsWithinElement;
|
|
19
19
|
/**
|
|
20
20
|
* Find whether a mouse event is within a given DOM element using clientX/Y and the bounding client rect
|
|
21
21
|
* @param ev
|
|
@@ -30,3 +30,4 @@ function mouseWithinElement(ev, element) {
|
|
|
30
30
|
(ev.clientX <= elementRect.right);
|
|
31
31
|
return isWithin;
|
|
32
32
|
}
|
|
33
|
+
exports.mouseWithinElement = mouseWithinElement;
|
package/dist/esm/utils/events.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.dragEventFiles =
|
|
3
|
+
exports.dragEventFiles = void 0;
|
|
4
4
|
function dragEventFiles(ev) {
|
|
5
5
|
var _a, _b, _c;
|
|
6
6
|
const files = [];
|
|
@@ -26,3 +26,4 @@ function dragEventFiles(ev) {
|
|
|
26
26
|
}
|
|
27
27
|
return files;
|
|
28
28
|
}
|
|
29
|
+
exports.dragEventFiles = dragEventFiles;
|