Skip to content

Commit

Permalink
Bump version to 0.8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
mar10 committed May 1, 2024
1 parent 40ff20a commit 80921af
Show file tree
Hide file tree
Showing 167 changed files with 1,444 additions and 1,286 deletions.
16 changes: 13 additions & 3 deletions dist/wunderbaum.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ declare module "deferred" {
}
declare module "wb_node" {
import { Wunderbaum } from "wunderbaum";
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";
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, TooltipOption, TristateType, WbNodeData } from "types";
/**
* A single tree node.
*
Expand Down Expand Up @@ -985,6 +985,8 @@ declare module "wb_node" {
setStatus(status: NodeStatusType, options?: SetStatusOptions): WunderbaumNode | null;
/** Rename this node. */
setTitle(title: string): void;
/** Set the node tooltip. */
setTooltip(tooltip: TooltipOption): void;
_sortChildren(cmp: SortCallback, deep: boolean): void;
/**
* Sort child list by title or custom criteria.
Expand Down Expand Up @@ -1394,6 +1396,8 @@ declare module "types" {
* or a boolean value that indicates if the default icon should be used or hidden.
*/
export type IconOption = boolean | string;
/** Show/hide tooltip or display a string. */
export type TooltipOption = boolean | string;
export interface SourceAjaxType {
url: string;
params?: any;
Expand Down Expand Up @@ -1448,6 +1452,7 @@ declare module "types" {
export type DynamicBoolOrStringOption = boolean | string | BoolOrStringOptionResolver;
export type DynamicCheckboxOption = CheckboxOption | BoolOrStringOptionResolver;
export type DynamicIconOption = IconOption | BoolOrStringOptionResolver;
export type DynamicTooltipOption = TooltipOption | BoolOrStringOptionResolver;
/** A plain object (dictionary) that represents a node instance. */
export interface WbNodeData {
checkbox?: CheckboxOption;
Expand Down Expand Up @@ -2507,7 +2512,7 @@ declare module "wunderbaum" {
*/
import * as util from "util";
import { ExtensionsDict, WunderbaumExtension } from "wb_extension_base";
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";
import { AddChildrenOptions, ApplyCommandOptions, ApplyCommandType, ChangeType, ColumnDefinitionList, DynamicBoolOption, DynamicCheckboxOption, DynamicIconOption, DynamicStringOption, DynamicTooltipOption, ExpandAllOptions, FilterModeType, FilterNodesOptions, MatcherCallback, NavModeEnum, NodeFilterCallback, NodeStatusType, NodeStringCallback, NodeToDictCallback, NodeTypeDefinitionMap, NodeVisitCallback, RenderFlag, ScrollToOptions, SetActiveOptions, SetColumnOptions, SetStatusOptions, SortCallback, SourceType, UpdateOptions, VisitRowsOptions, WbEventInfo, WbNodeData } from "types";
import { WunderbaumNode } from "wb_node";
import { WunderbaumOptions } from "wb_options";
import { DebouncedFunction } from "debounce";
Expand Down Expand Up @@ -2561,10 +2566,15 @@ declare module "wunderbaum" {
types: NodeTypeDefinitionMap;
/** List of column definitions. */
columns: ColumnDefinitionList;
/** Show/hide a checkbox or radiobutton. */
checkbox?: DynamicCheckboxOption;
/** Show/hide a node icon. */
icon?: DynamicIconOption;
/** Show/hide a tooltip for the node icon. */
iconTooltip?: DynamicStringOption;
tooltip?: DynamicStringOption;
/** Show/hide a tooltip. */
tooltip?: DynamicTooltipOption;
/** Define a node checkbox as readonly. */
unselectable?: DynamicBoolOption;
protected _columnsById: {
[key: string]: any;
Expand Down
41 changes: 25 additions & 16 deletions dist/wunderbaum.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ function throttle(func, wait = 0, options = {}) {
/*!
* Wunderbaum - util
* Copyright (c) 2021-2023, Martin Wendt. Released under the MIT license.
* v0.8.3, Sat, 27 Apr 2024 20:12:09 GMT (https://github.com/mar10/wunderbaum)
* v0.8.4, Wed, 01 May 2024 06:13:52 GMT (https://github.com/mar10/wunderbaum)
*/
/** @module util */
/** Readable names for `MouseEvent.button` */
Expand Down Expand Up @@ -1096,7 +1096,7 @@ var util = /*#__PURE__*/Object.freeze({
/*!
* Wunderbaum - types
* Copyright (c) 2021-2023, Martin Wendt. Released under the MIT license.
* v0.8.3, Sat, 27 Apr 2024 20:12:09 GMT (https://github.com/mar10/wunderbaum)
* v0.8.4, Wed, 01 May 2024 06:13:52 GMT (https://github.com/mar10/wunderbaum)
*/
/**
* Possible values for {@link WunderbaumNode.update()} and {@link Wunderbaum.update()}.
Expand Down Expand Up @@ -1160,7 +1160,7 @@ var NavModeEnum;
/*!
* Wunderbaum - wb_extension_base
* Copyright (c) 2021-2023, Martin Wendt. Released under the MIT license.
* v0.8.3, Sat, 27 Apr 2024 20:12:09 GMT (https://github.com/mar10/wunderbaum)
* v0.8.4, Wed, 01 May 2024 06:13:52 GMT (https://github.com/mar10/wunderbaum)
*/
class WunderbaumExtension {
constructor(tree, id, defaults) {
Expand Down Expand Up @@ -1219,7 +1219,7 @@ class WunderbaumExtension {
/*!
* Wunderbaum - ext-filter
* Copyright (c) 2021-2023, Martin Wendt. Released under the MIT license.
* v0.8.3, Sat, 27 Apr 2024 20:12:09 GMT (https://github.com/mar10/wunderbaum)
* v0.8.4, Wed, 01 May 2024 06:13:52 GMT (https://github.com/mar10/wunderbaum)
*/
const START_MARKER = "\uFFF7";
const END_MARKER = "\uFFF8";
Expand Down Expand Up @@ -1524,7 +1524,7 @@ function _markFuzzyMatchedChars(text, matches, escapeTitles = true) {
/*!
* Wunderbaum - ext-keynav
* Copyright (c) 2021-2023, Martin Wendt. Released under the MIT license.
* v0.8.3, Sat, 27 Apr 2024 20:12:09 GMT (https://github.com/mar10/wunderbaum)
* v0.8.4, Wed, 01 May 2024 06:13:52 GMT (https://github.com/mar10/wunderbaum)
*/
const QUICKSEARCH_DELAY = 500;
class KeynavExtension extends WunderbaumExtension {
Expand Down Expand Up @@ -1888,7 +1888,7 @@ class KeynavExtension extends WunderbaumExtension {
/*!
* Wunderbaum - ext-logger
* Copyright (c) 2021-2023, Martin Wendt. Released under the MIT license.
* v0.8.3, Sat, 27 Apr 2024 20:12:09 GMT (https://github.com/mar10/wunderbaum)
* v0.8.4, Wed, 01 May 2024 06:13:52 GMT (https://github.com/mar10/wunderbaum)
*/
class LoggerExtension extends WunderbaumExtension {
constructor(tree) {
Expand Down Expand Up @@ -1930,7 +1930,7 @@ class LoggerExtension extends WunderbaumExtension {
/*!
* Wunderbaum - common
* Copyright (c) 2021-2023, Martin Wendt. Released under the MIT license.
* v0.8.3, Sat, 27 Apr 2024 20:12:09 GMT (https://github.com/mar10/wunderbaum)
* v0.8.4, Wed, 01 May 2024 06:13:52 GMT (https://github.com/mar10/wunderbaum)
*/
const DEFAULT_DEBUGLEVEL = 3; // Replaced by rollup script
/**
Expand Down Expand Up @@ -2253,7 +2253,7 @@ function decompressSourceData(source) {
/*!
* Wunderbaum - ext-dnd
* Copyright (c) 2021-2023, Martin Wendt. Released under the MIT license.
* v0.8.3, Sat, 27 Apr 2024 20:12:09 GMT (https://github.com/mar10/wunderbaum)
* v0.8.4, Wed, 01 May 2024 06:13:52 GMT (https://github.com/mar10/wunderbaum)
*/
const nodeMimeType = "application/x-wunderbaum-node";
class DndExtension extends WunderbaumExtension {
Expand Down Expand Up @@ -2698,7 +2698,7 @@ class DndExtension extends WunderbaumExtension {
/*!
* Wunderbaum - drag_observer
* Copyright (c) 2021-2023, Martin Wendt. Released under the MIT license.
* v0.8.3, Sat, 27 Apr 2024 20:12:09 GMT (https://github.com/mar10/wunderbaum)
* v0.8.4, Wed, 01 May 2024 06:13:52 GMT (https://github.com/mar10/wunderbaum)
*/
/**
* Convert mouse- and touch events to 'dragstart', 'drag', and 'dragstop'.
Expand Down Expand Up @@ -2834,7 +2834,7 @@ class DragObserver {
/*!
* Wunderbaum - ext-grid
* Copyright (c) 2021-2023, Martin Wendt. Released under the MIT license.
* v0.8.3, Sat, 27 Apr 2024 20:12:09 GMT (https://github.com/mar10/wunderbaum)
* v0.8.4, Wed, 01 May 2024 06:13:52 GMT (https://github.com/mar10/wunderbaum)
*/
class GridExtension extends WunderbaumExtension {
constructor(tree) {
Expand Down Expand Up @@ -2871,7 +2871,7 @@ class GridExtension extends WunderbaumExtension {
/*!
* Wunderbaum - deferred
* Copyright (c) 2021-2023, Martin Wendt. Released under the MIT license.
* v0.8.3, Sat, 27 Apr 2024 20:12:09 GMT (https://github.com/mar10/wunderbaum)
* v0.8.4, Wed, 01 May 2024 06:13:52 GMT (https://github.com/mar10/wunderbaum)
*/
/**
* Implement a ES6 Promise, that exposes a resolve() and reject() method.
Expand Down Expand Up @@ -2924,7 +2924,7 @@ class Deferred {
/*!
* Wunderbaum - wunderbaum_node
* Copyright (c) 2021-2023, Martin Wendt. Released under the MIT license.
* v0.8.3, Sat, 27 Apr 2024 20:12:09 GMT (https://github.com/mar10/wunderbaum)
* v0.8.4, Wed, 01 May 2024 06:13:52 GMT (https://github.com/mar10/wunderbaum)
*/
/** WunderbaumNode properties that can be passed with source data.
* (Any other source properties will be stored as `node.data.PROP`.)
Expand Down Expand Up @@ -4433,6 +4433,10 @@ class WunderbaumNode {
else {
titleSpan.textContent = this.title; // TODO: this triggers scroll events
}
const tooltip = this.getOption("tooltip", false);
if (tooltip) {
titleSpan.title = tooltip === true ? this.title : tooltip;
}
// NOTE: At least on Safari, this render call triggers a scroll event
// probably when a focused input is replaced.
if (preventScroll) {
Expand Down Expand Up @@ -5187,6 +5191,11 @@ class WunderbaumNode {
this.update();
// this.triggerModify("rename"); // TODO
}
/** Set the node tooltip. */
setTooltip(tooltip) {
this.tooltip = tooltip;
this.update();
}
_sortChildren(cmp, deep) {
const cl = this.children;
if (!cl) {
Expand Down Expand Up @@ -5319,7 +5328,7 @@ WunderbaumNode.sequence = 0;
/*!
* Wunderbaum - ext-edit
* Copyright (c) 2021-2023, Martin Wendt. Released under the MIT license.
* v0.8.3, Sat, 27 Apr 2024 20:12:09 GMT (https://github.com/mar10/wunderbaum)
* v0.8.4, Wed, 01 May 2024 06:13:52 GMT (https://github.com/mar10/wunderbaum)
*/
// const START_MARKER = "\uFFF7";
class EditExtension extends WunderbaumExtension {
Expand Down Expand Up @@ -5650,8 +5659,8 @@ class EditExtension extends WunderbaumExtension {
* https://github.com/mar10/wunderbaum
*
* Released under the MIT license.
* @version v0.8.3
* @date Sat, 27 Apr 2024 20:12:09 GMT
* @version v0.8.4
* @date Wed, 01 May 2024 06:13:52 GMT
*/
// import "./wunderbaum.scss";
class WbSystemRoot extends WunderbaumNode {
Expand Down Expand Up @@ -7869,7 +7878,7 @@ class Wunderbaum {
}
Wunderbaum.sequence = 0;
/** Wunderbaum release version number "MAJOR.MINOR.PATCH". */
Wunderbaum.version = "v0.8.3"; // Set to semver by 'grunt release'
Wunderbaum.version = "v0.8.4"; // Set to semver by 'grunt release'
/** Expose some useful methods of the util.ts module as `Wunderbaum.util`. */
Wunderbaum.util = util;

Expand Down
Loading

0 comments on commit 80921af

Please sign in to comment.