wunderbaum 0.8.2 → 0.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -511,7 +511,7 @@ declare module "deferred" {
511
511
  }
512
512
  declare module "wb_node" {
513
513
  import { Wunderbaum } from "wunderbaum";
514
- import { AddChildrenOptions, InsertNodeType, ApplyCommandOptions, ApplyCommandType, ChangeType, ExpandAllOptions, MakeVisibleOptions, MatcherCallback, NavigateOptions, NodeAnyCallback, NodeStatusType, NodeStringCallback, NodeVisitCallback, NodeVisitResponse, RenderOptions, ScrollIntoViewOptions, SetActiveOptions, SetExpandedOptions, SetSelectedOptions, SetStatusOptions, SortCallback, NodeToDictCallback, WbNodeData, TristateType, CheckboxOption, IconOption, SourceType } from "types";
514
+ import { AddChildrenOptions, ApplyCommandOptions, ApplyCommandType, ChangeType, CheckboxOption, ExpandAllOptions, IconOption, InsertNodeType, MakeVisibleOptions, MatcherCallback, NavigateOptions, NodeAnyCallback, NodeStatusType, NodeStringCallback, NodeToDictCallback, NodeVisitCallback, NodeVisitResponse, RenderOptions, ScrollIntoViewOptions, SetActiveOptions, SetExpandedOptions, SetSelectedOptions, SetStatusOptions, SortCallback, SourceType, TristateType, WbNodeData } from "types";
515
515
  /**
516
516
  * A single tree node.
517
517
  *
@@ -1045,7 +1045,7 @@ declare module "wb_options" {
1045
1045
  * Copyright (c) 2021-2023, Martin Wendt. Released under the MIT license.
1046
1046
  * @VERSION, @DATE (https://github.com/mar10/wunderbaum)
1047
1047
  */
1048
- import { WbCancelableEventResultType, ColumnDefinitionList, DndOptionsType, DynamicBoolOption, DynamicBoolOrStringOption, DynamicCheckboxOption, DynamicIconOption, EditOptionsType, FilterOptionsType, NavModeEnum, NodeTypeDefinitionMap, SelectModeType, WbActivateEventType, WbChangeEventType, WbClickEventType, WbDeactivateEventType, WbErrorEventType, WbExpandEventType, WbIconBadgeCallback, WbInitEventType, WbKeydownEventType, WbNodeData, WbNodeEventType, WbReceiveEventType, WbRenderEventType, WbSelectEventType, WbTreeEventType, WbIconBadgeEventResultType } from "types";
1048
+ import { ColumnDefinitionList, DndOptionsType, DynamicBoolOption, DynamicBoolOrStringOption, DynamicCheckboxOption, DynamicIconOption, EditOptionsType, FilterOptionsType, NavModeEnum, NodeTypeDefinitionMap, SelectModeType, WbActivateEventType, WbCancelableEventResultType, WbChangeEventType, WbClickEventType, WbDeactivateEventType, WbErrorEventType, WbExpandEventType, WbIconBadgeCallback, WbIconBadgeEventResultType, WbInitEventType, WbKeydownEventType, WbNodeData, WbNodeEventType, WbReceiveEventType, WbRenderEventType, WbSelectEventType, WbTreeEventType } from "types";
1049
1049
  /**
1050
1050
  * Available options for {@link wunderbaum.Wunderbaum}.
1051
1051
  *
@@ -2507,7 +2507,7 @@ declare module "wunderbaum" {
2507
2507
  */
2508
2508
  import * as util from "util";
2509
2509
  import { ExtensionsDict, WunderbaumExtension } from "wb_extension_base";
2510
- import { ApplyCommandType, ChangeType, ColumnDefinitionList, ExpandAllOptions, FilterModeType, MatcherCallback, NavModeEnum, NodeStatusType, NodeStringCallback, NodeTypeDefinitionMap, ScrollToOptions, SetActiveOptions, UpdateOptions, SetStatusOptions, WbEventInfo, ApplyCommandOptions, AddChildrenOptions, VisitRowsOptions, NodeFilterCallback, FilterNodesOptions, RenderFlag, NodeVisitCallback, SortCallback, NodeToDictCallback, WbNodeData, DynamicCheckboxOption, SourceType, DynamicIconOption, DynamicStringOption, DynamicBoolOption, SetColumnOptions } from "types";
2510
+ import { AddChildrenOptions, ApplyCommandOptions, ApplyCommandType, ChangeType, ColumnDefinitionList, DynamicBoolOption, DynamicCheckboxOption, DynamicIconOption, DynamicStringOption, ExpandAllOptions, FilterModeType, FilterNodesOptions, MatcherCallback, NavModeEnum, NodeFilterCallback, NodeStatusType, NodeStringCallback, NodeToDictCallback, NodeTypeDefinitionMap, NodeVisitCallback, RenderFlag, ScrollToOptions, SetActiveOptions, SetColumnOptions, SetStatusOptions, SortCallback, SourceType, UpdateOptions, VisitRowsOptions, WbEventInfo, WbNodeData } from "types";
2511
2511
  import { WunderbaumNode } from "wb_node";
2512
2512
  import { WunderbaumOptions } from "wb_options";
2513
2513
  import { DebouncedFunction } from "debounce";
@@ -298,7 +298,7 @@ function throttle(func, wait = 0, options = {}) {
298
298
  /*!
299
299
  * Wunderbaum - util
300
300
  * Copyright (c) 2021-2023, Martin Wendt. Released under the MIT license.
301
- * v0.8.2, Sat, 17 Feb 2024 07:32:06 GMT (https://github.com/mar10/wunderbaum)
301
+ * v0.8.3, Sat, 27 Apr 2024 20:12:09 GMT (https://github.com/mar10/wunderbaum)
302
302
  */
303
303
  /** @module util */
304
304
  /** Readable names for `MouseEvent.button` */
@@ -1096,7 +1096,7 @@ var util = /*#__PURE__*/Object.freeze({
1096
1096
  /*!
1097
1097
  * Wunderbaum - types
1098
1098
  * Copyright (c) 2021-2023, Martin Wendt. Released under the MIT license.
1099
- * v0.8.2, Sat, 17 Feb 2024 07:32:06 GMT (https://github.com/mar10/wunderbaum)
1099
+ * v0.8.3, Sat, 27 Apr 2024 20:12:09 GMT (https://github.com/mar10/wunderbaum)
1100
1100
  */
1101
1101
  /**
1102
1102
  * Possible values for {@link WunderbaumNode.update()} and {@link Wunderbaum.update()}.
@@ -1160,7 +1160,7 @@ var NavModeEnum;
1160
1160
  /*!
1161
1161
  * Wunderbaum - wb_extension_base
1162
1162
  * Copyright (c) 2021-2023, Martin Wendt. Released under the MIT license.
1163
- * v0.8.2, Sat, 17 Feb 2024 07:32:06 GMT (https://github.com/mar10/wunderbaum)
1163
+ * v0.8.3, Sat, 27 Apr 2024 20:12:09 GMT (https://github.com/mar10/wunderbaum)
1164
1164
  */
1165
1165
  class WunderbaumExtension {
1166
1166
  constructor(tree, id, defaults) {
@@ -1219,7 +1219,7 @@ class WunderbaumExtension {
1219
1219
  /*!
1220
1220
  * Wunderbaum - ext-filter
1221
1221
  * Copyright (c) 2021-2023, Martin Wendt. Released under the MIT license.
1222
- * v0.8.2, Sat, 17 Feb 2024 07:32:06 GMT (https://github.com/mar10/wunderbaum)
1222
+ * v0.8.3, Sat, 27 Apr 2024 20:12:09 GMT (https://github.com/mar10/wunderbaum)
1223
1223
  */
1224
1224
  const START_MARKER = "\uFFF7";
1225
1225
  const END_MARKER = "\uFFF8";
@@ -1524,7 +1524,7 @@ function _markFuzzyMatchedChars(text, matches, escapeTitles = true) {
1524
1524
  /*!
1525
1525
  * Wunderbaum - ext-keynav
1526
1526
  * Copyright (c) 2021-2023, Martin Wendt. Released under the MIT license.
1527
- * v0.8.2, Sat, 17 Feb 2024 07:32:06 GMT (https://github.com/mar10/wunderbaum)
1527
+ * v0.8.3, Sat, 27 Apr 2024 20:12:09 GMT (https://github.com/mar10/wunderbaum)
1528
1528
  */
1529
1529
  const QUICKSEARCH_DELAY = 500;
1530
1530
  class KeynavExtension extends WunderbaumExtension {
@@ -1888,7 +1888,7 @@ class KeynavExtension extends WunderbaumExtension {
1888
1888
  /*!
1889
1889
  * Wunderbaum - ext-logger
1890
1890
  * Copyright (c) 2021-2023, Martin Wendt. Released under the MIT license.
1891
- * v0.8.2, Sat, 17 Feb 2024 07:32:06 GMT (https://github.com/mar10/wunderbaum)
1891
+ * v0.8.3, Sat, 27 Apr 2024 20:12:09 GMT (https://github.com/mar10/wunderbaum)
1892
1892
  */
1893
1893
  class LoggerExtension extends WunderbaumExtension {
1894
1894
  constructor(tree) {
@@ -1930,7 +1930,7 @@ class LoggerExtension extends WunderbaumExtension {
1930
1930
  /*!
1931
1931
  * Wunderbaum - common
1932
1932
  * Copyright (c) 2021-2023, Martin Wendt. Released under the MIT license.
1933
- * v0.8.2, Sat, 17 Feb 2024 07:32:06 GMT (https://github.com/mar10/wunderbaum)
1933
+ * v0.8.3, Sat, 27 Apr 2024 20:12:09 GMT (https://github.com/mar10/wunderbaum)
1934
1934
  */
1935
1935
  const DEFAULT_DEBUGLEVEL = 3; // Replaced by rollup script
1936
1936
  /**
@@ -2253,7 +2253,7 @@ function decompressSourceData(source) {
2253
2253
  /*!
2254
2254
  * Wunderbaum - ext-dnd
2255
2255
  * Copyright (c) 2021-2023, Martin Wendt. Released under the MIT license.
2256
- * v0.8.2, Sat, 17 Feb 2024 07:32:06 GMT (https://github.com/mar10/wunderbaum)
2256
+ * v0.8.3, Sat, 27 Apr 2024 20:12:09 GMT (https://github.com/mar10/wunderbaum)
2257
2257
  */
2258
2258
  const nodeMimeType = "application/x-wunderbaum-node";
2259
2259
  class DndExtension extends WunderbaumExtension {
@@ -2698,7 +2698,7 @@ class DndExtension extends WunderbaumExtension {
2698
2698
  /*!
2699
2699
  * Wunderbaum - drag_observer
2700
2700
  * Copyright (c) 2021-2023, Martin Wendt. Released under the MIT license.
2701
- * v0.8.2, Sat, 17 Feb 2024 07:32:06 GMT (https://github.com/mar10/wunderbaum)
2701
+ * v0.8.3, Sat, 27 Apr 2024 20:12:09 GMT (https://github.com/mar10/wunderbaum)
2702
2702
  */
2703
2703
  /**
2704
2704
  * Convert mouse- and touch events to 'dragstart', 'drag', and 'dragstop'.
@@ -2834,7 +2834,7 @@ class DragObserver {
2834
2834
  /*!
2835
2835
  * Wunderbaum - ext-grid
2836
2836
  * Copyright (c) 2021-2023, Martin Wendt. Released under the MIT license.
2837
- * v0.8.2, Sat, 17 Feb 2024 07:32:06 GMT (https://github.com/mar10/wunderbaum)
2837
+ * v0.8.3, Sat, 27 Apr 2024 20:12:09 GMT (https://github.com/mar10/wunderbaum)
2838
2838
  */
2839
2839
  class GridExtension extends WunderbaumExtension {
2840
2840
  constructor(tree) {
@@ -2871,7 +2871,7 @@ class GridExtension extends WunderbaumExtension {
2871
2871
  /*!
2872
2872
  * Wunderbaum - deferred
2873
2873
  * Copyright (c) 2021-2023, Martin Wendt. Released under the MIT license.
2874
- * v0.8.2, Sat, 17 Feb 2024 07:32:06 GMT (https://github.com/mar10/wunderbaum)
2874
+ * v0.8.3, Sat, 27 Apr 2024 20:12:09 GMT (https://github.com/mar10/wunderbaum)
2875
2875
  */
2876
2876
  /**
2877
2877
  * Implement a ES6 Promise, that exposes a resolve() and reject() method.
@@ -2924,7 +2924,7 @@ class Deferred {
2924
2924
  /*!
2925
2925
  * Wunderbaum - wunderbaum_node
2926
2926
  * Copyright (c) 2021-2023, Martin Wendt. Released under the MIT license.
2927
- * v0.8.2, Sat, 17 Feb 2024 07:32:06 GMT (https://github.com/mar10/wunderbaum)
2927
+ * v0.8.3, Sat, 27 Apr 2024 20:12:09 GMT (https://github.com/mar10/wunderbaum)
2928
2928
  */
2929
2929
  /** WunderbaumNode properties that can be passed with source data.
2930
2930
  * (Any other source properties will be stored as `node.data.PROP`.)
@@ -3073,7 +3073,8 @@ class WunderbaumNode {
3073
3073
  * ```
3074
3074
  */
3075
3075
  _callEvent(type, extra) {
3076
- return this.tree._callEvent(type, extend({
3076
+ var _a;
3077
+ return (_a = this.tree) === null || _a === void 0 ? void 0 : _a._callEvent(type, extend({
3077
3078
  node: this,
3078
3079
  typeInfo: this.type ? this.tree.types[this.type] : {},
3079
3080
  }, extra));
@@ -5318,7 +5319,7 @@ WunderbaumNode.sequence = 0;
5318
5319
  /*!
5319
5320
  * Wunderbaum - ext-edit
5320
5321
  * Copyright (c) 2021-2023, Martin Wendt. Released under the MIT license.
5321
- * v0.8.2, Sat, 17 Feb 2024 07:32:06 GMT (https://github.com/mar10/wunderbaum)
5322
+ * v0.8.3, Sat, 27 Apr 2024 20:12:09 GMT (https://github.com/mar10/wunderbaum)
5322
5323
  */
5323
5324
  // const START_MARKER = "\uFFF7";
5324
5325
  class EditExtension extends WunderbaumExtension {
@@ -5538,6 +5539,7 @@ class EditExtension extends WunderbaumExtension {
5538
5539
  * @param opts.canKeepOpen
5539
5540
  */
5540
5541
  _stopEditTitle(apply, options) {
5542
+ var _a;
5541
5543
  options !== null && options !== void 0 ? options : (options = {});
5542
5544
  const focusElem = document.activeElement;
5543
5545
  let newValue = focusElem ? getValueFromElem(focusElem) : null;
@@ -5565,6 +5567,7 @@ class EditExtension extends WunderbaumExtension {
5565
5567
  inputElem: focusElem,
5566
5568
  inputValid: focusElem.checkValidity(),
5567
5569
  }).then((value) => {
5570
+ var _a;
5568
5571
  const errMsg = focusElem.validationMessage;
5569
5572
  if (validity && errMsg && value !== false) {
5570
5573
  // Handler called 'inputElem.setCustomValidity()' to signal error
@@ -5579,7 +5582,7 @@ class EditExtension extends WunderbaumExtension {
5579
5582
  node === null || node === void 0 ? void 0 : node.setTitle(newValue);
5580
5583
  // NOTE: At least on Safari, this render call triggers a scroll event
5581
5584
  // probably because the focused input is replaced.
5582
- this.curEditNode._render({ preventScroll: true });
5585
+ (_a = this.curEditNode) === null || _a === void 0 ? void 0 : _a._render({ preventScroll: true });
5583
5586
  this.curEditNode = null;
5584
5587
  this.relatedNode = null;
5585
5588
  this.tree.setFocus(); // restore focus that was in the input element
@@ -5594,7 +5597,7 @@ class EditExtension extends WunderbaumExtension {
5594
5597
  // Discard the embedded `<input>`
5595
5598
  // NOTE: At least on Safari, this render call triggers a scroll event
5596
5599
  // probably because the focused input is replaced.
5597
- this.curEditNode._render({ preventScroll: true });
5600
+ (_a = this.curEditNode) === null || _a === void 0 ? void 0 : _a._render({ preventScroll: true });
5598
5601
  this.curEditNode = null;
5599
5602
  this.relatedNode = null;
5600
5603
  // We discarded the <input>, so we have to acquire keyboard focus again
@@ -5647,8 +5650,8 @@ class EditExtension extends WunderbaumExtension {
5647
5650
  * https://github.com/mar10/wunderbaum
5648
5651
  *
5649
5652
  * Released under the MIT license.
5650
- * @version v0.8.2
5651
- * @date Sat, 17 Feb 2024 07:32:06 GMT
5653
+ * @version v0.8.3
5654
+ * @date Sat, 27 Apr 2024 20:12:09 GMT
5652
5655
  */
5653
5656
  // import "./wunderbaum.scss";
5654
5657
  class WbSystemRoot extends WunderbaumNode {
@@ -7866,7 +7869,7 @@ class Wunderbaum {
7866
7869
  }
7867
7870
  Wunderbaum.sequence = 0;
7868
7871
  /** Wunderbaum release version number "MAJOR.MINOR.PATCH". */
7869
- Wunderbaum.version = "v0.8.2"; // Set to semver by 'grunt release'
7872
+ Wunderbaum.version = "v0.8.3"; // Set to semver by 'grunt release'
7870
7873
  /** Expose some useful methods of the util.ts module as `Wunderbaum.util`. */
7871
7874
  Wunderbaum.util = util;
7872
7875