wunderbaum 0.11.0 → 0.11.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/README.md +4 -5
- package/dist/wunderbaum.css +10 -10
- package/dist/wunderbaum.d.ts +16 -7
- package/dist/wunderbaum.esm.js +675 -611
- package/dist/wunderbaum.esm.min.js +24 -24
- package/dist/wunderbaum.esm.min.js.map +1 -1
- package/dist/wunderbaum.umd.js +675 -611
- package/dist/wunderbaum.umd.min.js +30 -30
- package/dist/wunderbaum.umd.min.js.map +1 -1
- package/package.json +7 -5
- package/src/common.ts +1 -1
- package/src/types.ts +4 -4
- package/src/util.ts +12 -0
- package/src/wb_ext_dnd.ts +9 -4
- package/src/wb_ext_edit.ts +4 -0
- package/src/wb_node.ts +48 -12
- package/src/wunderbaum.ts +32 -18
package/README.md
CHANGED
|
@@ -7,12 +7,11 @@
|
|
|
7
7
|
[](https://github.com/mar10/grunt-yabs)
|
|
8
8
|
[](https://stackoverflow.com/questions/tagged/wunderbaum)
|
|
9
9
|
|
|
10
|
-
<!-- [](https://travis-ci.com/github/mar10/wunderbaum) -->
|
|
11
|
-
|
|
12
10
|
> A modern tree/treegrid control for the web. <br>
|
|
13
|
-
>
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
> Designated successor of [Fancytree](https://github.com/mar10/fancytree).
|
|
12
|
+
>
|
|
13
|
+
> Status _beta_:<br>
|
|
14
|
+
> API, Markup, Stylesheet, etc. are still subject to change.
|
|
16
15
|
|
|
17
16
|
[](https://mar10.github.io/wunderbaum/demo/)
|
|
18
17
|
|
package/dist/wunderbaum.css
CHANGED
|
@@ -16,22 +16,22 @@
|
|
|
16
16
|
--wb-alternate-row-color: #f7f7f7;
|
|
17
17
|
--wb-alternate-row-color-hover: #f3f3f3;
|
|
18
18
|
--wb-focus-border-color: #275dc5;
|
|
19
|
-
--wb-drop-source-color:
|
|
20
|
-
--wb-drop-target-color:
|
|
21
|
-
--wb-dim-color:
|
|
22
|
-
--wb-error-background-color:
|
|
23
|
-
--wb-hover-color:
|
|
24
|
-
--wb-hover-border-color:
|
|
19
|
+
--wb-drop-source-color: rgb(211.3703703704, 209.6481481481, 205.6296296296);
|
|
20
|
+
--wb-drop-target-color: rgb(212.2834645669, 236.2992125984, 247.7165354331);
|
|
21
|
+
--wb-dim-color: rgb(139.5925925926, 135.037037037, 124.4074074074);
|
|
22
|
+
--wb-error-background-color: rgb(244.6292372881, 220.8707627119, 221.625);
|
|
23
|
+
--wb-hover-color: rgb(247.1401574803, 251.5590551181, 253.6598425197);
|
|
24
|
+
--wb-hover-border-color: rgb(247.1401574803, 251.5590551181, 253.6598425197);
|
|
25
25
|
--wb-grid-color: #dedede;
|
|
26
26
|
--wb-active-color: #e5f3fb;
|
|
27
|
-
--wb-active-cell-color:
|
|
27
|
+
--wb-active-cell-color: rgb(125.1417322835, 198.1496062992, 232.8582677165);
|
|
28
28
|
--wb-active-border-color: #70c0e7;
|
|
29
29
|
--wb-active-hover-color: #dceff8;
|
|
30
30
|
--wb-active-hover-border-color: #26a0da;
|
|
31
|
-
--wb-active-column-color:
|
|
32
|
-
--wb-active-header-column-color:
|
|
31
|
+
--wb-active-column-color: rgb(247.1401574803, 251.5590551181, 253.6598425197);
|
|
32
|
+
--wb-active-header-column-color: rgb(196.5, 196.5, 196.5);
|
|
33
33
|
--wb-active-color-grayscale: #f0f0f0;
|
|
34
|
-
--wb-active-border-color-grayscale:
|
|
34
|
+
--wb-active-border-color-grayscale: rgb(171.5, 171.5, 171.5);
|
|
35
35
|
--wb-active-hover-color-grayscale: #eaeaea;
|
|
36
36
|
--wb-active-cell-color-grayscale: #b3b3b3;
|
|
37
37
|
--wb-grid-color-grayscale: #dedede;
|
package/dist/wunderbaum.d.ts
CHANGED
|
@@ -293,7 +293,7 @@ declare module "util" {
|
|
|
293
293
|
*/
|
|
294
294
|
export function extend(...args: any[]): any;
|
|
295
295
|
/** Return true if `obj` is of type `array`. */
|
|
296
|
-
export function isArray(obj: any):
|
|
296
|
+
export function isArray(obj: any): obj is any[];
|
|
297
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`. */
|
|
@@ -396,6 +396,13 @@ declare module "util" {
|
|
|
396
396
|
* ```
|
|
397
397
|
*/
|
|
398
398
|
export function toBool(...boolDefaults: (boolean | undefined | null)[]): boolean;
|
|
399
|
+
/**
|
|
400
|
+
* Return `val` unless `val` is a number in which case we convert to boolean.
|
|
401
|
+
* This is useful when a boolean value is stored as a 0/1 (e.g. in JSON) and
|
|
402
|
+
* we still want to maintain string values. null and undefined are returned as
|
|
403
|
+
* is. E.g. `checkbox` may be boolean or 'radio'.
|
|
404
|
+
*/
|
|
405
|
+
export function intToBool(val: boolean | number | string | undefined): boolean | string | undefined;
|
|
399
406
|
/** Return a canonical string representation for an object's type (e.g. 'array', 'number', ...). */
|
|
400
407
|
export function type(obj: any): string;
|
|
401
408
|
/**
|
|
@@ -424,7 +431,7 @@ declare module "common" {
|
|
|
424
431
|
/**
|
|
425
432
|
* Fixed height of a row in pixel. Must match the SCSS variable `$row-outer-height`.
|
|
426
433
|
*/
|
|
427
|
-
export const
|
|
434
|
+
export const DEFAULT_ROW_HEIGHT = 22;
|
|
428
435
|
/**
|
|
429
436
|
* Fixed width of node icons in pixel. Must match the SCSS variable `$icon-outer-width`.
|
|
430
437
|
*/
|
|
@@ -588,7 +595,9 @@ declare module "wb_node" {
|
|
|
588
595
|
*/
|
|
589
596
|
type?: string;
|
|
590
597
|
/** Tooltip definition (`true`: use node's title). */
|
|
591
|
-
tooltip?:
|
|
598
|
+
tooltip?: TooltipOption;
|
|
599
|
+
/** Icon tooltip definition (`true`: use node's title). */
|
|
600
|
+
iconTooltip?: TooltipOption;
|
|
592
601
|
/** Additional classes added to `div.wb-row`.
|
|
593
602
|
* @see {@link hasClass}, {@link setClass}. */
|
|
594
603
|
classes: Set<string> | null;
|
|
@@ -1552,7 +1561,7 @@ declare module "types" {
|
|
|
1552
1561
|
colspan?: boolean;
|
|
1553
1562
|
expanded?: boolean;
|
|
1554
1563
|
icon?: IconOption;
|
|
1555
|
-
iconTooltip?:
|
|
1564
|
+
iconTooltip?: TooltipOption;
|
|
1556
1565
|
key?: string;
|
|
1557
1566
|
lazy?: boolean;
|
|
1558
1567
|
/** Make child nodes single-select radio buttons. */
|
|
@@ -1561,7 +1570,7 @@ declare module "types" {
|
|
|
1561
1570
|
selected?: boolean;
|
|
1562
1571
|
statusNodeType?: NodeStatusType;
|
|
1563
1572
|
title: string;
|
|
1564
|
-
tooltip?:
|
|
1573
|
+
tooltip?: TooltipOption;
|
|
1565
1574
|
type?: string;
|
|
1566
1575
|
unselectable?: boolean;
|
|
1567
1576
|
/** @internal */
|
|
@@ -1737,8 +1746,8 @@ declare module "types" {
|
|
|
1737
1746
|
colspan?: boolean;
|
|
1738
1747
|
/** Default icon for matching nodes. */
|
|
1739
1748
|
icon?: IconOption;
|
|
1740
|
-
/** Default icon for matching nodes. */
|
|
1741
|
-
iconTooltip?:
|
|
1749
|
+
/** Default icon tooltip for matching nodes. */
|
|
1750
|
+
iconTooltip?: TooltipOption;
|
|
1742
1751
|
[key: string]: unknown;
|
|
1743
1752
|
}
|
|
1744
1753
|
export type NodeTypeDefinitionMap = {
|