Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ First release.
> This section will be removed after the beta phase. <br>
> Note that semantic versioning rules are not strictly followed during this phase.

- v0.15.0: Rename modules `common`, `deferred`, `drag_observer`, `types`, `util`
to `wb_common`, `wb_deferred`, `wb_drag_observer`, `wb_types`, `wb_util` to
avoid name conflicts with other libraries.
- v0.15.0: Update TS version to ES2020 to allow using `Promise.allSettled()` and other features.
- v0.15.0: Update module format to "bundler" to allow better tree-shaking and smaller bundles.
- v0.15.0: Assume that `globalThis` is available (requires Node.js >= v12).

- v0.14.1: Fix checkbox assignment bug in wb_node.ts where the value was not being assigned to this.checkbox.

- v0.14.0: Refactor sorting:
Expand Down Expand Up @@ -117,7 +124,6 @@ First release.
- v0.7.0: #69 prevent iOS browser from opening links on drop.
- v0.7.0: BREAKING CHANGE:
Changed syntax format for compressed formats:

- `_keyMap: {"t": "title", ...}` -> `_keyMap: {"title": "t", ...}`.
- `_typeList: [...]` -> `_valueMap: {"type": [...]}`.
This allows to compress values of other properties than `type`.
Expand Down
2 changes: 1 addition & 1 deletion docs/demo/demo-custom.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Demo code for Wunderbaum (https://github.com/mar10/wunderbaum).
*
* Copyright (c) 2021-2025, Martin Wendt (https://wwWendt.de).
* Copyright (c) 2021-2026, Martin Wendt (https://wwWendt.de).
*/

/* global mar10 */
Expand Down
2 changes: 1 addition & 1 deletion docs/demo/demo-editable.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Demo code for Wunderbaum (https://github.com/mar10/wunderbaum).
*
* Copyright (c) 2021-2025, Martin Wendt (https://wwWendt.de).
* Copyright (c) 2021-2026, Martin Wendt (https://wwWendt.de).
*/
/* global mar10 */
/* eslint-disable no-console */
Expand Down
2 changes: 1 addition & 1 deletion docs/demo/demo-fixedcol.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Demo code for Wunderbaum (https://github.com/mar10/wunderbaum).
*
* Copyright (c) 2021-2025, Martin Wendt (https://wwWendt.de).
* Copyright (c) 2021-2026, Martin Wendt (https://wwWendt.de).
*/
/* global mar10 */
/* eslint-disable no-console */
Expand Down
2 changes: 1 addition & 1 deletion docs/demo/demo-grid.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Demo code for Wunderbaum (https://github.com/mar10/wunderbaum).
*
* Copyright (c) 2021-2025, Martin Wendt (https://wwWendt.de).
* Copyright (c) 2021-2026, Martin Wendt (https://wwWendt.de).
*/
/* global mar10 addCssImport */
/* eslint-disable no-console */
Expand Down
2 changes: 1 addition & 1 deletion docs/demo/demo-large.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Demo code for Wunderbaum (https://github.com/mar10/wunderbaum).
*
* Copyright (c) 2021-2025, Martin Wendt (https://wwWendt.de).
* Copyright (c) 2021-2026, Martin Wendt (https://wwWendt.de).
*/
/* global mar10 */
/* eslint-disable no-console */
Expand Down
2 changes: 1 addition & 1 deletion docs/demo/demo-minimal.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Demo code for Wunderbaum (https://github.com/mar10/wunderbaum).
*
* Copyright (c) 2021-2025, Martin Wendt (https://wwWendt.de).
* Copyright (c) 2021-2026, Martin Wendt (https://wwWendt.de).
*/
/* global mar10 */

Expand Down
2 changes: 1 addition & 1 deletion docs/demo/demo-plain.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Demo code for Wunderbaum (https://github.com/mar10/wunderbaum).
*
* Copyright (c) 2021-2025, Martin Wendt (https://wwWendt.de).
* Copyright (c) 2021-2026, Martin Wendt (https://wwWendt.de).
*/
/* global mar10 */
/* eslint-disable no-console */
Expand Down
2 changes: 1 addition & 1 deletion docs/demo/demo-readonly.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Demo code for Wunderbaum (https://github.com/mar10/wunderbaum).
*
* Copyright (c) 2021-2025, Martin Wendt (https://wwWendt.de).
* Copyright (c) 2021-2026, Martin Wendt (https://wwWendt.de).
*/
/* global mar10 */
/* eslint-disable no-console */
Expand Down
2 changes: 1 addition & 1 deletion docs/demo/demo-select.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Demo code for Wunderbaum (https://github.com/mar10/wunderbaum).
*
* Copyright (c) 2021-2025, Martin Wendt (https://wwWendt.de).
* Copyright (c) 2021-2026, Martin Wendt (https://wwWendt.de).
*/
/* global mar10, addCssImport */
/* eslint-disable no-console */
Expand Down
2 changes: 1 addition & 1 deletion docs/demo/demo-welcome.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Demo code for Wunderbaum (https://github.com/mar10/wunderbaum).
*
* Copyright (c) 2021-2025, Martin Wendt (https://wwWendt.de).
* Copyright (c) 2021-2026, Martin Wendt (https://wwWendt.de).
*/
/* global mar10 */

Expand Down
2 changes: 1 addition & 1 deletion docs/unittest/test-core-fixture1.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* Wunderbaum - Unit Test
* Copyright (c) 2021-2025, Martin Wendt. Released under the MIT license.
* Copyright (c) 2021-2026, Martin Wendt. Released under the MIT license.
* @VERSION, @DATE (https://github.com/mar10/wunderbaum)
*/

Expand Down
2 changes: 1 addition & 1 deletion docs/unittest/test-core.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* Wunderbaum - Unit Test
* Copyright (c) 2021-2025, Martin Wendt. Released under the MIT license.
* Copyright (c) 2021-2026, Martin Wendt. Released under the MIT license.
* @VERSION, @DATE (https://github.com/mar10/wunderbaum)
*/
/* global mar10, QUnit */
Expand Down
6 changes: 3 additions & 3 deletions src/common.ts → src/wb_common.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* Wunderbaum - common
* Copyright (c) 2021-2025, Martin Wendt. Released under the MIT license.
* Copyright (c) 2021-2026, Martin Wendt. Released under the MIT license.
* @VERSION, @DATE (https://github.com/mar10/wunderbaum)
*/

Expand All @@ -11,8 +11,8 @@ import {
SourceObjectType,
IconMapType,
MatcherCallback,
} from "./types";
import * as util from "./util";
} from "./wb_types";
import * as util from "./wb_util";
import { WunderbaumNode } from "./wb_node";

export const DEFAULT_DEBUGLEVEL = 4; // Replaced by rollup script
Expand Down
25 changes: 4 additions & 21 deletions src/debounce.ts → src/wb_debounce.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* Wunderbaum - debounce.ts
* Copyright (c) 2021-2025, Martin Wendt. Released under the MIT license.
* Wunderbaum - wb_debounce.ts
* Copyright (c) 2021-2026, Martin Wendt. Released under the MIT license.
* @VERSION, @DATE (https://github.com/mar10/wunderbaum)
*/
/*
Expand Down Expand Up @@ -36,27 +36,10 @@ export interface DebouncedFunction<F extends Procedure> {
}

/* --- */
/** Detect free variable `global` from Node.js. */
const freeGlobal =
typeof global === "object" &&
global !== null &&
global.Object === Object &&
global;

/** Detect free variable `globalThis` */
const freeGlobalThis =
typeof globalThis === "object" &&
globalThis !== null &&
globalThis.Object == Object &&
globalThis;

/** Detect free variable `self`. */
const freeSelf =
typeof self === "object" && self !== null && self.Object === Object && self;

/** Used as a reference to the global object. */
const root =
freeGlobalThis || freeGlobal || freeSelf || Function("return this")();
(typeof globalThis !== "undefined" && globalThis) ||
Function("return this")();

/**
* Checks if `value` is the
Expand Down
4 changes: 2 additions & 2 deletions src/deferred.ts → src/wb_deferred.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* Wunderbaum - deferred
* Copyright (c) 2021-2025, Martin Wendt. Released under the MIT license.
* Wunderbaum - wb_deferred
* Copyright (c) 2021-2026, Martin Wendt. Released under the MIT license.
* @VERSION, @DATE (https://github.com/mar10/wunderbaum)
*/

Expand Down
4 changes: 2 additions & 2 deletions src/drag_observer.ts → src/wb_drag_observer.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* Wunderbaum - drag_observer
* Copyright (c) 2021-2025, Martin Wendt. Released under the MIT license.
* Wunderbaum - wb_drag_observer
* Copyright (c) 2021-2026, Martin Wendt. Released under the MIT license.
* @VERSION, @DATE (https://github.com/mar10/wunderbaum)
*/

Expand Down
10 changes: 5 additions & 5 deletions src/wb_ext_dnd.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*!
* Wunderbaum - ext-dnd
* Copyright (c) 2021-2025, Martin Wendt. Released under the MIT license.
* Copyright (c) 2021-2026, Martin Wendt. Released under the MIT license.
* @VERSION, @DATE (https://github.com/mar10/wunderbaum)
*/
import * as util from "./util";
import { EventCallbackType, onEvent } from "./util";
import * as util from "./wb_util";
import { EventCallbackType, onEvent } from "./wb_util";
import { Wunderbaum } from "./wunderbaum";
import { WunderbaumExtension } from "./wb_extension_base";
import { WunderbaumNode } from "./wb_node";
Expand All @@ -13,8 +13,8 @@ import {
DropEffectType,
DropRegionType,
DropRegionTypeSet,
} from "./types";
import { DebouncedFunction, throttle } from "./debounce";
} from "./wb_types";
import { DebouncedFunction, throttle } from "./wb_debounce";

const nodeMimeType = "application/x-wunderbaum-node";

Expand Down
8 changes: 4 additions & 4 deletions src/wb_ext_edit.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* Wunderbaum - ext-edit
* Copyright (c) 2021-2025, Martin Wendt. Released under the MIT license.
* Copyright (c) 2021-2026, Martin Wendt. Released under the MIT license.
* @VERSION, @DATE (https://github.com/mar10/wunderbaum)
*/

Expand All @@ -15,10 +15,10 @@ import {
isPlainObject,
onEvent,
ValidationError,
} from "./util";
import { debounce } from "./debounce";
} from "./wb_util";
import { debounce } from "./wb_debounce";
import { WunderbaumNode } from "./wb_node";
import { EditOptionsType, InsertNodeType, WbNodeData } from "./types";
import { EditOptionsType, InsertNodeType, WbNodeData } from "./wb_types";

// const START_MARKER = "\uFFF7";

Expand Down
8 changes: 4 additions & 4 deletions src/wb_ext_filter.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* Wunderbaum - ext-filter
* Copyright (c) 2021-2025, Martin Wendt. Released under the MIT license.
* Copyright (c) 2021-2026, Martin Wendt. Released under the MIT license.
* @VERSION, @DATE (https://github.com/mar10/wunderbaum)
*/

Expand All @@ -11,18 +11,18 @@ import {
escapeRegex,
extend,
onEvent,
} from "./util";
} from "./wb_util";
import {
FilterConnectType,
FilterNodesOptions,
FilterOptionsType,
NodeFilterCallback,
NodeStatusType,
} from "./types";
} from "./wb_types";
import { Wunderbaum } from "./wunderbaum";
import { WunderbaumNode } from "./wb_node";
import { WunderbaumExtension } from "./wb_extension_base";
import { debounce } from "./debounce";
import { debounce } from "./wb_debounce";

const START_MARKER = "\uFFF7";
const END_MARKER = "\uFFF8";
Expand Down
10 changes: 5 additions & 5 deletions src/wb_ext_grid.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/*!
* Wunderbaum - ext-grid
* Copyright (c) 2021-2025, Martin Wendt. Released under the MIT license.
* Copyright (c) 2021-2026, Martin Wendt. Released under the MIT license.
* @VERSION, @DATE (https://github.com/mar10/wunderbaum)
*/
import { Wunderbaum } from "./wunderbaum";
import { WunderbaumExtension } from "./wb_extension_base";
import { DragCallbackArgType, DragObserver } from "./drag_observer";
import { ChangeType, ColumnDefinition, GridOptionsType } from "./types";
import { DEFAULT_MIN_COL_WIDTH } from "./common";
import { toBool, toPixel } from "./util";
import { DragCallbackArgType, DragObserver } from "./wb_drag_observer";
import { ChangeType, ColumnDefinition, GridOptionsType } from "./wb_types";
import { DEFAULT_MIN_COL_WIDTH } from "./wb_common";
import { toBool, toPixel } from "./wb_util";

export class GridExtension extends WunderbaumExtension<GridOptionsType> {
protected observer: DragObserver;
Expand Down
6 changes: 3 additions & 3 deletions src/wb_ext_keynav.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!
* Wunderbaum - ext-keynav
* Copyright (c) 2021-2025, Martin Wendt. Released under the MIT license.
* Copyright (c) 2021-2026, Martin Wendt. Released under the MIT license.
* @VERSION, @DATE (https://github.com/mar10/wunderbaum)
*/

import { KeynavOptionsType, NavModeEnum } from "./types";
import { eventToString } from "./util";
import { KeynavOptionsType, NavModeEnum } from "./wb_types";
import { eventToString } from "./wb_util";
import { Wunderbaum } from "./wunderbaum";
import { WunderbaumNode } from "./wb_node";
import { WunderbaumExtension } from "./wb_extension_base";
Expand Down
6 changes: 3 additions & 3 deletions src/wb_ext_logger.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!
* Wunderbaum - ext-logger
* Copyright (c) 2021-2025, Martin Wendt. Released under the MIT license.
* Copyright (c) 2021-2026, Martin Wendt. Released under the MIT license.
* @VERSION, @DATE (https://github.com/mar10/wunderbaum)
*/

import { LoggerOptionsType } from "./types";
import { overrideMethod } from "./util";
import { LoggerOptionsType } from "./wb_types";
import { overrideMethod } from "./wb_util";
import { WunderbaumExtension } from "./wb_extension_base";
import { Wunderbaum } from "./wunderbaum";

Expand Down
4 changes: 2 additions & 2 deletions src/wb_extension_base.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*!
* Wunderbaum - wb_extension_base
* Copyright (c) 2021-2025, Martin Wendt. Released under the MIT license.
* Copyright (c) 2021-2026, Martin Wendt. Released under the MIT license.
* @VERSION, @DATE (https://github.com/mar10/wunderbaum)
*/

import * as util from "./util";
import * as util from "./wb_util";
import { DndExtension } from "./wb_ext_dnd";
import { EditExtension } from "./wb_ext_edit";
import { FilterExtension } from "./wb_ext_filter";
Expand Down
10 changes: 5 additions & 5 deletions src/wb_node.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*!
* Wunderbaum - wunderbaum_node
* Copyright (c) 2021-2025, Martin Wendt. Released under the MIT license.
* Copyright (c) 2021-2026, Martin Wendt. Released under the MIT license.
* @VERSION, @DATE (https://github.com/mar10/wunderbaum)
*/

import * as util from "./util";
import * as util from "./wb_util";

import { Wunderbaum } from "./wunderbaum";
import {
Expand Down Expand Up @@ -41,7 +41,7 @@ import {
TooltipOption,
TristateType,
WbNodeData,
} from "./types";
} from "./wb_types";

import {
decompressSourceData,
Expand All @@ -54,8 +54,8 @@ import {
TEST_FILE_PATH,
TEST_HTML,
TITLE_SPAN_PAD_Y,
} from "./common";
import { Deferred } from "./deferred";
} from "./wb_common";
import { Deferred } from "./wb_deferred";

/** WunderbaumNode properties that can be passed with source data.
* (Any other source properties will be stored as `node.data.PROP`.)
Expand Down
4 changes: 2 additions & 2 deletions src/wb_options.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* Wunderbaum - options
* Copyright (c) 2021-2025, Martin Wendt. Released under the MIT license.
* Copyright (c) 2021-2026, Martin Wendt. Released under the MIT license.
* @VERSION, @DATE (https://github.com/mar10/wunderbaum)
*/

Expand Down Expand Up @@ -39,7 +39,7 @@ import {
WbRenderEventType,
WbSelectEventType,
WbTreeEventType,
} from "./types";
} from "./wb_types";

/**
* Properties of {@link wunderbaum.Wunderbaum.options}.
Expand Down
Loading
Loading