wunderbaum 0.10.0 → 0.10.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/LICENSE +1 -1
- package/dist/wunderbaum.css +5 -5
- package/dist/wunderbaum.d.ts +10 -7
- package/dist/wunderbaum.esm.js +24 -20
- package/dist/wunderbaum.esm.min.js +17 -17
- package/dist/wunderbaum.esm.min.js.map +1 -1
- package/dist/wunderbaum.umd.js +24 -20
- package/dist/wunderbaum.umd.min.js +21 -21
- package/dist/wunderbaum.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/types.ts +4 -3
- package/src/util.ts +6 -4
- package/src/wb_ext_filter.ts +4 -0
- package/src/wunderbaum.scss +5 -5
- package/src/wunderbaum.ts +4 -0
package/LICENSE
CHANGED
package/dist/wunderbaum.css
CHANGED
|
@@ -94,8 +94,8 @@ div.wunderbaum div.wb-header {
|
|
|
94
94
|
position: sticky;
|
|
95
95
|
top: 0;
|
|
96
96
|
z-index: 2;
|
|
97
|
-
user-select: none;
|
|
98
97
|
-webkit-user-select: none; /* Safari */
|
|
98
|
+
user-select: none;
|
|
99
99
|
}
|
|
100
100
|
div.wunderbaum div.wb-header,
|
|
101
101
|
div.wunderbaum div.wb-list-container {
|
|
@@ -204,8 +204,8 @@ div.wunderbaum div.wb-header span.wb-col-resizer {
|
|
|
204
204
|
border: none;
|
|
205
205
|
border-right: 2px solid var(--wb-border-color);
|
|
206
206
|
height: 100%;
|
|
207
|
-
user-select: none;
|
|
208
207
|
-webkit-user-select: none;
|
|
208
|
+
user-select: none;
|
|
209
209
|
}
|
|
210
210
|
div.wunderbaum div.wb-header span.wb-col-resizer.wb-col-resizer-active {
|
|
211
211
|
cursor: col-resize;
|
|
@@ -224,8 +224,8 @@ div.wunderbaum span.wb-col:last-of-type {
|
|
|
224
224
|
border-right: none;
|
|
225
225
|
}
|
|
226
226
|
div.wunderbaum span.wb-node {
|
|
227
|
-
user-select: none;
|
|
228
227
|
-webkit-user-select: none;
|
|
228
|
+
user-select: none;
|
|
229
229
|
/* Fix Bootstrap Icon alignment */
|
|
230
230
|
}
|
|
231
231
|
div.wunderbaum span.wb-node i.wb-checkbox,
|
|
@@ -445,12 +445,12 @@ div.wunderbaum.wb-checkbox-auto-hide:focus .wb-row.wb-active i.wb-checkbox, div.
|
|
|
445
445
|
}
|
|
446
446
|
|
|
447
447
|
.wb-no-select {
|
|
448
|
-
user-select: none;
|
|
449
448
|
-webkit-user-select: none;
|
|
449
|
+
user-select: none;
|
|
450
450
|
}
|
|
451
451
|
.wb-no-select span.wb-title {
|
|
452
|
-
user-select: contain;
|
|
453
452
|
-webkit-user-select: contain;
|
|
453
|
+
user-select: contain;
|
|
454
454
|
}
|
|
455
455
|
|
|
456
456
|
/* RTL support */
|
package/dist/wunderbaum.d.ts
CHANGED
|
@@ -294,7 +294,7 @@ declare module "util" {
|
|
|
294
294
|
export function extend(...args: any[]): any;
|
|
295
295
|
/** Return true if `obj` is of type `array`. */
|
|
296
296
|
export function isArray(obj: any): boolean;
|
|
297
|
-
/** Return true if `obj` is of type `Object` and has no
|
|
297
|
+
/** Return true if `obj` is of type `Object` and has no properties. */
|
|
298
298
|
export function isEmptyObject(obj: any): boolean;
|
|
299
299
|
/** Return true if `obj` is of type `function`. */
|
|
300
300
|
export function isFunction(obj: any): boolean;
|
|
@@ -380,15 +380,17 @@ declare module "util" {
|
|
|
380
380
|
*
|
|
381
381
|
* Example:
|
|
382
382
|
* ```js
|
|
383
|
-
*
|
|
383
|
+
* let x = undefined;
|
|
384
|
+
* let y = "123px";
|
|
385
|
+
* const width = util.toPixel(x, y, 100); // returns 123
|
|
384
386
|
* ```
|
|
385
387
|
*/
|
|
386
388
|
export function toPixel(...defaults: (string | number | undefined | null)[]): number;
|
|
387
|
-
/**
|
|
389
|
+
/** Return the the boolean value of the first non-null element.
|
|
388
390
|
* Example:
|
|
389
391
|
* ```js
|
|
390
392
|
* const opts = { flag: true };
|
|
391
|
-
* const value = util.toBool(opts.
|
|
393
|
+
* const value = util.toBool(opts.foo, opts.flag, false); // returns true
|
|
392
394
|
* ```
|
|
393
395
|
*/
|
|
394
396
|
export function toBool(...boolDefaults: (boolean | undefined | null)[]): boolean;
|
|
@@ -1702,12 +1704,13 @@ declare module "types" {
|
|
|
1702
1704
|
* Default: unset.
|
|
1703
1705
|
*/
|
|
1704
1706
|
customWidthPx?: number;
|
|
1705
|
-
/** Allow user to sort the column.
|
|
1706
|
-
*
|
|
1707
|
+
/** Allow user to sort the column. Default: false. <br>
|
|
1708
|
+
* **Note:** Sorting is not implemented yet.
|
|
1707
1709
|
*/
|
|
1708
1710
|
sortable?: boolean;
|
|
1709
1711
|
/** Optional custom column sort orde when user clicked the sort icon.
|
|
1710
|
-
* Default: unset.
|
|
1712
|
+
* Default: unset. <br>
|
|
1713
|
+
* **Note:** Sorting is not implemented yet.
|
|
1711
1714
|
*/
|
|
1712
1715
|
sortOrder?: SortOrderType;
|
|
1713
1716
|
/** Optional class names that are added to all `span.wb-col` header AND data
|
package/dist/wunderbaum.esm.js
CHANGED
|
@@ -288,7 +288,7 @@ function throttle(func, wait = 0, options = {}) {
|
|
|
288
288
|
/*!
|
|
289
289
|
* Wunderbaum - util
|
|
290
290
|
* Copyright (c) 2021-2024, Martin Wendt. Released under the MIT license.
|
|
291
|
-
* v0.10.
|
|
291
|
+
* v0.10.1, Sat, 20 Jul 2024 13:53:46 GMT (https://github.com/mar10/wunderbaum)
|
|
292
292
|
*/
|
|
293
293
|
/** @module util */
|
|
294
294
|
/** Readable names for `MouseEvent.button` */
|
|
@@ -764,7 +764,7 @@ function extend(...args) {
|
|
|
764
764
|
function isArray(obj) {
|
|
765
765
|
return Array.isArray(obj);
|
|
766
766
|
}
|
|
767
|
-
/** Return true if `obj` is of type `Object` and has no
|
|
767
|
+
/** Return true if `obj` is of type `Object` and has no properties. */
|
|
768
768
|
function isEmptyObject(obj) {
|
|
769
769
|
return Object.keys(obj).length === 0 && obj.constructor === Object;
|
|
770
770
|
}
|
|
@@ -943,7 +943,9 @@ function toSet(val) {
|
|
|
943
943
|
*
|
|
944
944
|
* Example:
|
|
945
945
|
* ```js
|
|
946
|
-
*
|
|
946
|
+
* let x = undefined;
|
|
947
|
+
* let y = "123px";
|
|
948
|
+
* const width = util.toPixel(x, y, 100); // returns 123
|
|
947
949
|
* ```
|
|
948
950
|
*/
|
|
949
951
|
function toPixel(
|
|
@@ -963,11 +965,11 @@ function toPixel(
|
|
|
963
965
|
}
|
|
964
966
|
throw new Error(`Expected a string like '123px': ${defaults}`);
|
|
965
967
|
}
|
|
966
|
-
/**
|
|
968
|
+
/** Return the the boolean value of the first non-null element.
|
|
967
969
|
* Example:
|
|
968
970
|
* ```js
|
|
969
971
|
* const opts = { flag: true };
|
|
970
|
-
* const value = util.toBool(opts.
|
|
972
|
+
* const value = util.toBool(opts.foo, opts.flag, false); // returns true
|
|
971
973
|
* ```
|
|
972
974
|
*/
|
|
973
975
|
function toBool(
|
|
@@ -1134,7 +1136,7 @@ var util = /*#__PURE__*/Object.freeze({
|
|
|
1134
1136
|
/*!
|
|
1135
1137
|
* Wunderbaum - types
|
|
1136
1138
|
* Copyright (c) 2021-2024, Martin Wendt. Released under the MIT license.
|
|
1137
|
-
* v0.10.
|
|
1139
|
+
* v0.10.1, Sat, 20 Jul 2024 13:53:46 GMT (https://github.com/mar10/wunderbaum)
|
|
1138
1140
|
*/
|
|
1139
1141
|
/**
|
|
1140
1142
|
* Possible values for {@link WunderbaumNode.update()} and {@link Wunderbaum.update()}.
|
|
@@ -1198,7 +1200,7 @@ var NavModeEnum;
|
|
|
1198
1200
|
/*!
|
|
1199
1201
|
* Wunderbaum - wb_extension_base
|
|
1200
1202
|
* Copyright (c) 2021-2024, Martin Wendt. Released under the MIT license.
|
|
1201
|
-
* v0.10.
|
|
1203
|
+
* v0.10.1, Sat, 20 Jul 2024 13:53:46 GMT (https://github.com/mar10/wunderbaum)
|
|
1202
1204
|
*/
|
|
1203
1205
|
class WunderbaumExtension {
|
|
1204
1206
|
constructor(tree, id, defaults) {
|
|
@@ -1257,7 +1259,7 @@ class WunderbaumExtension {
|
|
|
1257
1259
|
/*!
|
|
1258
1260
|
* Wunderbaum - ext-filter
|
|
1259
1261
|
* Copyright (c) 2021-2024, Martin Wendt. Released under the MIT license.
|
|
1260
|
-
* v0.10.
|
|
1262
|
+
* v0.10.1, Sat, 20 Jul 2024 13:53:46 GMT (https://github.com/mar10/wunderbaum)
|
|
1261
1263
|
*/
|
|
1262
1264
|
const START_MARKER = "\uFFF7";
|
|
1263
1265
|
const END_MARKER = "\uFFF8";
|
|
@@ -1284,6 +1286,7 @@ class FilterExtension extends WunderbaumExtension {
|
|
|
1284
1286
|
const connectInput = this.getPluginOption("connectInput");
|
|
1285
1287
|
if (connectInput) {
|
|
1286
1288
|
this.queryInput = elemFromSelector(connectInput);
|
|
1289
|
+
assert(this.queryInput, `Invalid 'filter.connectInput' option: ${connectInput}.`);
|
|
1287
1290
|
onEvent(this.queryInput, "input", debounce((e) => {
|
|
1288
1291
|
// this.tree.log("query", e);
|
|
1289
1292
|
this.filterNodes(this.queryInput.value.trim(), {});
|
|
@@ -1581,7 +1584,7 @@ function _markFuzzyMatchedChars(text, matches, escapeTitles = true) {
|
|
|
1581
1584
|
/*!
|
|
1582
1585
|
* Wunderbaum - ext-keynav
|
|
1583
1586
|
* Copyright (c) 2021-2024, Martin Wendt. Released under the MIT license.
|
|
1584
|
-
* v0.10.
|
|
1587
|
+
* v0.10.1, Sat, 20 Jul 2024 13:53:46 GMT (https://github.com/mar10/wunderbaum)
|
|
1585
1588
|
*/
|
|
1586
1589
|
const QUICKSEARCH_DELAY = 500;
|
|
1587
1590
|
class KeynavExtension extends WunderbaumExtension {
|
|
@@ -1945,7 +1948,7 @@ class KeynavExtension extends WunderbaumExtension {
|
|
|
1945
1948
|
/*!
|
|
1946
1949
|
* Wunderbaum - ext-logger
|
|
1947
1950
|
* Copyright (c) 2021-2024, Martin Wendt. Released under the MIT license.
|
|
1948
|
-
* v0.10.
|
|
1951
|
+
* v0.10.1, Sat, 20 Jul 2024 13:53:46 GMT (https://github.com/mar10/wunderbaum)
|
|
1949
1952
|
*/
|
|
1950
1953
|
class LoggerExtension extends WunderbaumExtension {
|
|
1951
1954
|
constructor(tree) {
|
|
@@ -1987,7 +1990,7 @@ class LoggerExtension extends WunderbaumExtension {
|
|
|
1987
1990
|
/*!
|
|
1988
1991
|
* Wunderbaum - common
|
|
1989
1992
|
* Copyright (c) 2021-2024, Martin Wendt. Released under the MIT license.
|
|
1990
|
-
* v0.10.
|
|
1993
|
+
* v0.10.1, Sat, 20 Jul 2024 13:53:46 GMT (https://github.com/mar10/wunderbaum)
|
|
1991
1994
|
*/
|
|
1992
1995
|
const DEFAULT_DEBUGLEVEL = 3; // Replaced by rollup script
|
|
1993
1996
|
/**
|
|
@@ -2312,7 +2315,7 @@ function decompressSourceData(source) {
|
|
|
2312
2315
|
/*!
|
|
2313
2316
|
* Wunderbaum - ext-dnd
|
|
2314
2317
|
* Copyright (c) 2021-2024, Martin Wendt. Released under the MIT license.
|
|
2315
|
-
* v0.10.
|
|
2318
|
+
* v0.10.1, Sat, 20 Jul 2024 13:53:46 GMT (https://github.com/mar10/wunderbaum)
|
|
2316
2319
|
*/
|
|
2317
2320
|
const nodeMimeType = "application/x-wunderbaum-node";
|
|
2318
2321
|
class DndExtension extends WunderbaumExtension {
|
|
@@ -2757,7 +2760,7 @@ class DndExtension extends WunderbaumExtension {
|
|
|
2757
2760
|
/*!
|
|
2758
2761
|
* Wunderbaum - drag_observer
|
|
2759
2762
|
* Copyright (c) 2021-2024, Martin Wendt. Released under the MIT license.
|
|
2760
|
-
* v0.10.
|
|
2763
|
+
* v0.10.1, Sat, 20 Jul 2024 13:53:46 GMT (https://github.com/mar10/wunderbaum)
|
|
2761
2764
|
*/
|
|
2762
2765
|
/**
|
|
2763
2766
|
* Convert mouse- and touch events to 'dragstart', 'drag', and 'dragstop'.
|
|
@@ -2906,7 +2909,7 @@ class DragObserver {
|
|
|
2906
2909
|
/*!
|
|
2907
2910
|
* Wunderbaum - ext-grid
|
|
2908
2911
|
* Copyright (c) 2021-2024, Martin Wendt. Released under the MIT license.
|
|
2909
|
-
* v0.10.
|
|
2912
|
+
* v0.10.1, Sat, 20 Jul 2024 13:53:46 GMT (https://github.com/mar10/wunderbaum)
|
|
2910
2913
|
*/
|
|
2911
2914
|
class GridExtension extends WunderbaumExtension {
|
|
2912
2915
|
constructor(tree) {
|
|
@@ -2997,7 +3000,7 @@ class GridExtension extends WunderbaumExtension {
|
|
|
2997
3000
|
/*!
|
|
2998
3001
|
* Wunderbaum - deferred
|
|
2999
3002
|
* Copyright (c) 2021-2024, Martin Wendt. Released under the MIT license.
|
|
3000
|
-
* v0.10.
|
|
3003
|
+
* v0.10.1, Sat, 20 Jul 2024 13:53:46 GMT (https://github.com/mar10/wunderbaum)
|
|
3001
3004
|
*/
|
|
3002
3005
|
/**
|
|
3003
3006
|
* Implement a ES6 Promise, that exposes a resolve() and reject() method.
|
|
@@ -3050,7 +3053,7 @@ class Deferred {
|
|
|
3050
3053
|
/*!
|
|
3051
3054
|
* Wunderbaum - wunderbaum_node
|
|
3052
3055
|
* Copyright (c) 2021-2024, Martin Wendt. Released under the MIT license.
|
|
3053
|
-
* v0.10.
|
|
3056
|
+
* v0.10.1, Sat, 20 Jul 2024 13:53:46 GMT (https://github.com/mar10/wunderbaum)
|
|
3054
3057
|
*/
|
|
3055
3058
|
/** WunderbaumNode properties that can be passed with source data.
|
|
3056
3059
|
* (Any other source properties will be stored as `node.data.PROP`.)
|
|
@@ -5459,7 +5462,7 @@ WunderbaumNode.sequence = 0;
|
|
|
5459
5462
|
/*!
|
|
5460
5463
|
* Wunderbaum - ext-edit
|
|
5461
5464
|
* Copyright (c) 2021-2024, Martin Wendt. Released under the MIT license.
|
|
5462
|
-
* v0.10.
|
|
5465
|
+
* v0.10.1, Sat, 20 Jul 2024 13:53:46 GMT (https://github.com/mar10/wunderbaum)
|
|
5463
5466
|
*/
|
|
5464
5467
|
// const START_MARKER = "\uFFF7";
|
|
5465
5468
|
class EditExtension extends WunderbaumExtension {
|
|
@@ -5790,8 +5793,8 @@ class EditExtension extends WunderbaumExtension {
|
|
|
5790
5793
|
* https://github.com/mar10/wunderbaum
|
|
5791
5794
|
*
|
|
5792
5795
|
* Released under the MIT license.
|
|
5793
|
-
* @version v0.10.
|
|
5794
|
-
* @date
|
|
5796
|
+
* @version v0.10.1
|
|
5797
|
+
* @date Sat, 20 Jul 2024 13:53:46 GMT
|
|
5795
5798
|
*/
|
|
5796
5799
|
// import "./wunderbaum.scss";
|
|
5797
5800
|
class WbSystemRoot extends WunderbaumNode {
|
|
@@ -7671,6 +7674,7 @@ class Wunderbaum {
|
|
|
7671
7674
|
// console.profileEnd(`_updateViewportImmediately()`)
|
|
7672
7675
|
}
|
|
7673
7676
|
if (this.options.connectTopBreadcrumb) {
|
|
7677
|
+
assert(this.options.connectTopBreadcrumb.textContent != null, `Invalid 'connectTopBreadcrumb' option (input element expected).`);
|
|
7674
7678
|
let path = (_a = this.getTopmostVpNode(true)) === null || _a === void 0 ? void 0 : _a.getPath(false, "title", " > ");
|
|
7675
7679
|
path = path ? path + " >" : "";
|
|
7676
7680
|
this.options.connectTopBreadcrumb.textContent = path;
|
|
@@ -8040,7 +8044,7 @@ class Wunderbaum {
|
|
|
8040
8044
|
}
|
|
8041
8045
|
Wunderbaum.sequence = 0;
|
|
8042
8046
|
/** Wunderbaum release version number "MAJOR.MINOR.PATCH". */
|
|
8043
|
-
Wunderbaum.version = "v0.10.
|
|
8047
|
+
Wunderbaum.version = "v0.10.1"; // Set to semver by 'grunt release'
|
|
8044
8048
|
/** Expose some useful methods of the util.ts module as `Wunderbaum.util`. */
|
|
8045
8049
|
Wunderbaum.util = util;
|
|
8046
8050
|
|