wunderbaum 0.0.8 → 0.0.9
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/dist/wunderbaum.css +2 -2
- package/dist/wunderbaum.d.ts +91 -7
- package/dist/wunderbaum.esm.js +203 -43
- package/dist/wunderbaum.esm.min.js +20 -20
- package/dist/wunderbaum.esm.min.js.map +1 -1
- package/dist/wunderbaum.umd.js +203 -43
- package/dist/wunderbaum.umd.min.js +26 -26
- package/dist/wunderbaum.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/drag_observer.ts +4 -3
- package/src/types.ts +1 -0
- package/src/wb_ext_dnd.ts +5 -0
- package/src/wb_ext_keynav.ts +24 -7
- package/src/wb_node.ts +119 -14
- package/src/wunderbaum.scss +23 -1
- package/src/wunderbaum.ts +61 -4
package/dist/wunderbaum.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Wunderbaum style sheet (generated from wunderbaum.scss)
|
|
3
3
|
* Copyright (c) 2021-2022, Martin Wendt. Released under the MIT license.
|
|
4
|
-
* v0.0.
|
|
5
|
-
*/div.wunderbaum{box-sizing:border-box;height:100%;min-height:4px;background-color:#fff;margin:0;padding:0;font-family:Helvetica,sans-serif;font-size:14px;color:#56534c;border:2px solid #56534c;border-radius:4px;background-clip:content-box;overflow-x:auto;overflow-y:scroll}div.wunderbaum:focus,div.wunderbaum:focus-within{border-color:#275dc5}div.wunderbaum.wb-disabled{opacity:0.7;pointer-events:none}div.wunderbaum div.wb-scroll-container{position:relative;min-height:4px}div.wunderbaum div.wb-header{position:sticky;top:0;z-index:2}div.wunderbaum div.wb-header,div.wunderbaum div.wb-scroll-container{overflow:unset}div.wunderbaum.wb-fixed-col div.wb-header span.wb-col:first-of-type{background-color:#dedede}div.wunderbaum.wb-fixed-col span.wb-col:first-of-type{position:sticky;left:0;z-index:1;background-color:#fff}div.wunderbaum div.wb-row{position:absolute;width:100%;height:22px;line-height:22px;border:1px solid transparent}div.wunderbaum:not(:focus-within) div.wb-node-list div.wb-row.wb-active,div.wunderbaum:not(:focus-within) div.wb-node-list div.wb-row.wb-selected,div.wunderbaum:not(:focus) div.wb-node-list div.wb-row.wb-active,div.wunderbaum:not(:focus) div.wb-node-list div.wb-row.wb-selected{background-color:#f0f0f0;border-color:#acacac}div.wunderbaum:not(:focus-within) div.wb-node-list div.wb-row.wb-active:hover,div.wunderbaum:not(:focus-within) div.wb-node-list div.wb-row.wb-selected:hover,div.wunderbaum:not(:focus) div.wb-node-list div.wb-row.wb-active:hover,div.wunderbaum:not(:focus) div.wb-node-list div.wb-row.wb-selected:hover{background-color:#eaeaea}div.wunderbaum.wb-alternate div.wb-node-list div.wb-row:nth-of-type(even):not(.wb-active):not(.wb-selected){background-color:#f7f7f7}div.wunderbaum.wb-alternate div.wb-node-list div.wb-row:nth-of-type(even):not(.wb-active):not(.wb-selected):hover{background-color:#f3f3f3}div.wunderbaum div.wb-node-list div.wb-row:hover{background-color:#f7fcfe}div.wunderbaum div.wb-node-list div.wb-row.wb-active,div.wunderbaum div.wb-node-list div.wb-row.wb-selected{background-color:#e5f3fb}div.wunderbaum div.wb-node-list div.wb-row.wb-active:hover,div.wunderbaum div.wb-node-list div.wb-row.wb-selected:hover{background-color:#dceff8}div.wunderbaum div.wb-node-list div.wb-row.wb-focus:not(.wb-active){border-style:dotted;border-color:#70c0e7}div.wunderbaum div.wb-node-list div.wb-row.wb-active{border-style:solid;border-color:#70c0e7}div.wunderbaum div.wb-node-list div.wb-row.wb-active:hover{border-color:#26a0da}div.wunderbaum div.wb-node-list div.wb-row.wb-loading{font-style:italic}div.wunderbaum div.wb-node-list div.wb-row.wb-busy,div.wunderbaum div.wb-node-list div.wb-row i.wb-busy,div.wunderbaum div.wb-node-list div.wb-row .wb-col.wb-busy{font-style:italic;background:repeating-linear-gradient(45deg, transparent, transparent 3.88px, #dedede 3.88px, #dedede 7.78px);animation:wb-busy-animation 2s linear infinite}div.wunderbaum div.wb-node-list div.wb-row.wb-error,div.wunderbaum div.wb-node-list div.wb-row.wb-status-error{color:#b5373b}div.wunderbaum div.wb-header{position:sticky;height:22px;border-bottom:1px solid #56534c;padding:0;background-color:#dedede}div.wunderbaum div.wb-header span.wb-col{font-weight:bold;overflow:visible}div.wunderbaum div.wb-header span.wb-col-title{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}div.wunderbaum div.wb-header span.wb-col-resizer{position:absolute;top:0;right:-1px;width:3px;border:none;border-right:2px solid #56534c;height:100%;cursor:col-resize}div.wunderbaum span.wb-col{position:absolute;display:inline-block;height:20px;line-height:20px;padding:0 2px;border-right:1px solid #dedede;white-space:nowrap}div.wunderbaum span.wb-col:last-of-type{border-right:none}div.wunderbaum span.wb-node{user-select:none}div.wunderbaum span.wb-node i.wb-checkbox,div.wunderbaum span.wb-node i.wb-expander,div.wunderbaum span.wb-node i.wb-icon,div.wunderbaum span.wb-node i.wb-indent{height:20px;width:20px;padding:2px 2px;display:inline-block}div.wunderbaum span.wb-node i.bi::before{vertical-align:baseline}div.wunderbaum span.wb-node img.wb-icon{width:16px;height:16px;padding:2px 2px}div.wunderbaum span.wb-node i.wb-indent::before{content:"\00a0"}div.wunderbaum span.wb-node i.wb-expander.wb-spin,div.wunderbaum span.wb-node i.wb-icon.wb-spin{height:unset;width:unset;padding:0 3px;animation:wb-spin-animation 2s linear infinite}div.wunderbaum span.wb-node span.wb-title{min-width:1em;vertical-align:top;overflow-x:hidden;display:inline-block;white-space:nowrap;text-overflow:ellipsis}div.wunderbaum.wb-grid div.wb-header div.wb-row span.wb-col:hover{background-color:#c5c5c5}div.wunderbaum.wb-grid.wb-cell-mode div.wb-header div.wb-row span.wb-col.wb-active{background-color:#dceff8}div.wunderbaum.wb-grid div.wb-node-list div.wb-row{border-bottom-color:#dedede}div.wunderbaum.wb-grid div.wb-node-list div.wb-row:hover:not(.wb-active):not(.wb-selected){background-color:#f7fcfe}div.wunderbaum.wb-grid div.wb-node-list div.wb-row.wb-active{border-bottom-color:#70c0e7}div.wunderbaum.wb-grid div.wb-node-list div.wb-row span.wb-col{border-right:1px solid #dedede}div.wunderbaum.wb-grid div.wb-node-list div.wb-row span.wb-col input.wb-input-edit,div.wunderbaum.wb-grid div.wb-node-list div.wb-row span.wb-col>input[type="color"],div.wunderbaum.wb-grid div.wb-node-list div.wb-row span.wb-col>input[type="date"],div.wunderbaum.wb-grid div.wb-node-list div.wb-row span.wb-col>input[type="datetime"],div.wunderbaum.wb-grid div.wb-node-list div.wb-row span.wb-col>input[type="datetime-local"],div.wunderbaum.wb-grid div.wb-node-list div.wb-row span.wb-col>input[type="email"],div.wunderbaum.wb-grid div.wb-node-list div.wb-row span.wb-col>input[type="month"],div.wunderbaum.wb-grid div.wb-node-list div.wb-row span.wb-col>input[type="number"],div.wunderbaum.wb-grid div.wb-node-list div.wb-row span.wb-col>input[type="password"],div.wunderbaum.wb-grid div.wb-node-list div.wb-row span.wb-col>input[type="search"],div.wunderbaum.wb-grid div.wb-node-list div.wb-row span.wb-col>input[type="tel"],div.wunderbaum.wb-grid div.wb-node-list div.wb-row span.wb-col>input[type="text"],div.wunderbaum.wb-grid div.wb-node-list div.wb-row span.wb-col>input[type="time"],div.wunderbaum.wb-grid div.wb-node-list div.wb-row span.wb-col>input[type="url"],div.wunderbaum.wb-grid div.wb-node-list div.wb-row span.wb-col>input[type="week"],div.wunderbaum.wb-grid div.wb-node-list div.wb-row span.wb-col>select{width:100%;max-height:20px;border:none}div.wunderbaum.wb-grid div.wb-node-list div.wb-row span.wb-col>input:focus,div.wunderbaum.wb-grid div.wb-node-list div.wb-row span.wb-col>select:focus{border:1px dashed #70c0e7}div.wunderbaum.wb-grid.wb-cell-mode div.wb-row:not(.wb-colspan) span.wb-col.wb-active{background-color:#f7fcfe}div.wunderbaum.wb-grid.wb-cell-mode div.wb-row:not(.wb-colspan).wb-active{background-color:#f7fcfe}div.wunderbaum.wb-grid.wb-cell-mode div.wb-row:not(.wb-colspan).wb-active span.wb-col.wb-active{background-color:#26a0da}div.wunderbaum.wb-grid.wb-alternate div.wb-node-list div.wb-row:nth-of-type(even):not(.wb-active):not(.wb-selected){background-color:#f7f7f7}div.wunderbaum.wb-grid.wb-alternate div.wb-node-list div.wb-row:nth-of-type(even):not(.wb-active):not(.wb-selected):hover{background-color:#f3f3f3}div.wunderbaum.wb-grid:not(:focus-within) div.wb-node-list div.wb-row,div.wunderbaum.wb-grid:not(:focus) div.wb-node-list div.wb-row{border-bottom-color:#dedede}div.wunderbaum.wb-ext-filter-dim div.wb-node-list div.wb-row,div.wunderbaum.wb-ext-filter-hide div.wb-node-list div.wb-row{color:#dedede}div.wunderbaum.wb-ext-filter-dim div.wb-node-list div.wb-row.wb-submatch,div.wunderbaum.wb-ext-filter-hide div.wb-node-list div.wb-row.wb-submatch{color:#868581}div.wunderbaum.wb-ext-filter-dim div.wb-node-list div.wb-row.wb-match,div.wunderbaum.wb-ext-filter-hide div.wb-node-list div.wb-row.wb-match{color:#56534c}div.wunderbaum div.wb-row.wb-drag-source{opacity:0.5}div.wunderbaum div.wb-row.wb-drag-source .wb-node{background-color:#d3d2ce}div.wunderbaum div.wb-row.wb-drop-target{overflow:visible}div.wunderbaum div.wb-row.wb-drop-target .wb-node{background-color:#d4ecf8;overflow:visible}div.wunderbaum div.wb-row.wb-drop-target .wb-node .wb-icon{position:relative;overflow:visible}div.wunderbaum div.wb-row.wb-drop-target .wb-node .wb-icon::after{position:absolute;z-index:1000;content:url(../docs/assets/drop_marker_16x32.png);left:0;top:3px}div.wunderbaum div.wb-row.wb-drop-target.wb-drop-before .wb-node .wb-icon::after{content:url(../docs/assets/drop_marker_insert_16x64.png);left:0;top:-8px}div.wunderbaum div.wb-row.wb-drop-target.wb-drop-after .wb-node .wb-icon::after{content:url(../docs/assets/drop_marker_insert_16x64.png);left:0;top:14px}div.wunderbaum.wb-rainbow i.wb-expander:nth-child(4n+1),div.wunderbaum.wb-rainbow i.wb-indent:nth-child(4n+1){background:#ffffe8}div.wunderbaum.wb-rainbow i.wb-expander:nth-child(4n+2),div.wunderbaum.wb-rainbow i.wb-indent:nth-child(4n+2){background:#f0fff0}div.wunderbaum.wb-rainbow i.wb-expander:nth-child(4n+3),div.wunderbaum.wb-rainbow i.wb-indent:nth-child(4n+3){background:#fff0ff}div.wunderbaum.wb-rainbow i.wb-expander:nth-child(4n+4),div.wunderbaum.wb-rainbow i.wb-indent:nth-child(4n+4){background:#eafdfd}div.wunderbaum.wb-fade-expander i.wb-expander{transition:color 1.5s;color:rgba(86,83,76,0)}div.wunderbaum.wb-fade-expander div.wb-row.wb-loading i.wb-expander,div.wunderbaum.wb-fade-expander:hover i.wb-expander,div.wunderbaum.wb-fade-expander:focus i.wb-expander,div.wunderbaum.wb-fade-expander:focus-within i.wb-expander,div.wunderbaum.wb-fade-expander [class*="wb-statusnode-"] i.wb-expander{transition:color 0.6s;color:#56534c}div.wunderbaum div.wb-row.wb-skeleton span.wb-title,div.wunderbaum div.wb-row.wb-skeleton i.wb-icon{animation:wb-skeleton-animation 1s linear infinite alternate;border-radius:0.25em;color:transparent;opacity:0.7}div.wunderbaum.wb-checkbox-auto-hide i.wb-checkbox{visibility:hidden}div.wunderbaum.wb-checkbox-auto-hide .wb-row:hover i.wb-checkbox,div.wunderbaum.wb-checkbox-auto-hide .wb-row.wb-selected i.wb-checkbox{visibility:unset}div.wunderbaum.wb-checkbox-auto-hide:focus .wb-row.wb-active i.wb-checkbox,div.wunderbaum.wb-checkbox-auto-hide:focus-within .wb-row.wb-active i.wb-checkbox{visibility:unset}.wb-helper-center{text-align:center}.wb-helper-disabled{color:#8c877c}.wb-helper-hidden{display:none}.wb-helper-invalid{color:#b5373b}.wb-helper-lazy-expander{color:#26a0da}.wb-helper-link{cursor:pointer}.wb-helper-start,.wb-helper-start>input{text-align:left}.wb-helper-end,.wb-helper-end>input{text-align:right}.wb-rtl .wb-helper-start,.wb-rtl .wb-helper-start>input{text-align:right}.wb-rtl .wb-helper-end,.wb-rtl .wb-helper-end>input{text-align:left}.wb-col input[type="checkbox"]:indeterminate{color:#8c877c;background-color:red}.wb-col input:invalid{color:#b5373b;background-color:#f5ddde}@keyframes wb-spin-animation{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes wb-skeleton-animation{0%{background-color:#a3b8c2}100%{background-color:#f0f3f5}}@keyframes wb-busy-animation{0%{background-position:0 0}100%{background-position:0 22px}}
|
|
4
|
+
* v0.0.9, Mon, 31 Oct 2022 17:06:10 GMT (https://github.com/mar10/wunderbaum)
|
|
5
|
+
*/div.wunderbaum{box-sizing:border-box;height:100%;min-height:4px;background-color:#fff;margin:0;padding:0;font-family:Helvetica,sans-serif;font-size:14px;color:#56534c;border:2px solid #56534c;border-radius:4px;background-clip:content-box;overflow-x:auto;overflow-y:scroll}div.wunderbaum:focus,div.wunderbaum:focus-within{border-color:#275dc5}div.wunderbaum.wb-disabled{opacity:0.7;pointer-events:none}div.wunderbaum div.wb-scroll-container{position:relative;min-height:4px}div.wunderbaum div.wb-header{position:sticky;top:0;z-index:2}div.wunderbaum div.wb-header,div.wunderbaum div.wb-scroll-container{overflow:unset}div.wunderbaum.wb-fixed-col div.wb-header span.wb-col:first-of-type{background-color:#dedede}div.wunderbaum.wb-fixed-col span.wb-col:first-of-type{position:sticky;left:0;z-index:1;background-color:#fff}div.wunderbaum div.wb-row{position:absolute;width:100%;height:22px;line-height:22px;border:1px solid transparent}div.wunderbaum:not(:focus-within) div.wb-node-list div.wb-row.wb-active,div.wunderbaum:not(:focus-within) div.wb-node-list div.wb-row.wb-selected,div.wunderbaum:not(:focus) div.wb-node-list div.wb-row.wb-active,div.wunderbaum:not(:focus) div.wb-node-list div.wb-row.wb-selected{background-color:#f0f0f0;border-color:#acacac}div.wunderbaum:not(:focus-within) div.wb-node-list div.wb-row.wb-active:hover,div.wunderbaum:not(:focus-within) div.wb-node-list div.wb-row.wb-selected:hover,div.wunderbaum:not(:focus) div.wb-node-list div.wb-row.wb-active:hover,div.wunderbaum:not(:focus) div.wb-node-list div.wb-row.wb-selected:hover{background-color:#eaeaea}div.wunderbaum.wb-alternate div.wb-node-list div.wb-row:nth-of-type(even):not(.wb-active):not(.wb-selected){background-color:#f7f7f7}div.wunderbaum.wb-alternate div.wb-node-list div.wb-row:nth-of-type(even):not(.wb-active):not(.wb-selected):hover{background-color:#f3f3f3}div.wunderbaum div.wb-node-list div.wb-row:hover{background-color:#f7fcfe}div.wunderbaum div.wb-node-list div.wb-row.wb-active,div.wunderbaum div.wb-node-list div.wb-row.wb-selected{background-color:#e5f3fb}div.wunderbaum div.wb-node-list div.wb-row.wb-active:hover,div.wunderbaum div.wb-node-list div.wb-row.wb-selected:hover{background-color:#dceff8}div.wunderbaum div.wb-node-list div.wb-row.wb-focus:not(.wb-active){border-style:dotted;border-color:#70c0e7}div.wunderbaum div.wb-node-list div.wb-row.wb-active{border-style:solid;border-color:#70c0e7}div.wunderbaum div.wb-node-list div.wb-row.wb-active:hover{border-color:#26a0da}div.wunderbaum div.wb-node-list div.wb-row.wb-loading{font-style:italic}div.wunderbaum div.wb-node-list div.wb-row.wb-busy,div.wunderbaum div.wb-node-list div.wb-row i.wb-busy,div.wunderbaum div.wb-node-list div.wb-row .wb-col.wb-busy{font-style:italic;background:repeating-linear-gradient(45deg, transparent, transparent 3.88px, #dedede 3.88px, #dedede 7.78px);animation:wb-busy-animation 2s linear infinite}div.wunderbaum div.wb-node-list div.wb-row.wb-error,div.wunderbaum div.wb-node-list div.wb-row.wb-status-error{color:#b5373b}div.wunderbaum div.wb-header{position:sticky;height:22px;border-bottom:1px solid #56534c;padding:0;background-color:#dedede}div.wunderbaum div.wb-header span.wb-col{font-weight:bold;overflow:visible}div.wunderbaum div.wb-header span.wb-col-title{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}div.wunderbaum div.wb-header span.wb-col-resizer{position:absolute;top:0;right:-1px;width:3px;border:none;border-right:2px solid #56534c;height:100%;cursor:col-resize}div.wunderbaum span.wb-col{position:absolute;display:inline-block;overflow:hidden;height:20px;line-height:20px;padding:0 2px;border-right:1px solid #dedede;white-space:nowrap}div.wunderbaum span.wb-col:last-of-type{border-right:none}div.wunderbaum span.wb-node{user-select:none}div.wunderbaum span.wb-node i.wb-checkbox,div.wunderbaum span.wb-node i.wb-expander,div.wunderbaum span.wb-node i.wb-icon,div.wunderbaum span.wb-node i.wb-indent{height:20px;width:20px;padding:2px 2px;display:inline-block}div.wunderbaum span.wb-node i.bi::before{vertical-align:baseline}div.wunderbaum span.wb-node img.wb-icon{width:16px;height:16px;padding:2px 2px}div.wunderbaum span.wb-node i.wb-indent::before{content:"\00a0"}div.wunderbaum span.wb-node i.wb-expander.wb-spin,div.wunderbaum span.wb-node i.wb-icon.wb-spin{height:unset;width:unset;padding:0 3px;animation:wb-spin-animation 2s linear infinite}div.wunderbaum span.wb-node span.wb-title{min-width:1em;vertical-align:top;overflow-x:hidden;display:inline-block;white-space:nowrap;text-overflow:ellipsis}div.wunderbaum.wb-grid div.wb-header div.wb-row span.wb-col:hover{background-color:#c5c5c5}div.wunderbaum.wb-grid.wb-cell-mode div.wb-header div.wb-row span.wb-col.wb-active{background-color:#dceff8}div.wunderbaum.wb-grid div.wb-node-list div.wb-row{border-bottom-color:#dedede}div.wunderbaum.wb-grid div.wb-node-list div.wb-row:hover:not(.wb-active):not(.wb-selected){background-color:#f7fcfe}div.wunderbaum.wb-grid div.wb-node-list div.wb-row.wb-active{border-bottom-color:#70c0e7}div.wunderbaum.wb-grid div.wb-node-list div.wb-row span.wb-col{border-right:1px solid #dedede}div.wunderbaum.wb-grid div.wb-node-list div.wb-row span.wb-col input.wb-input-edit,div.wunderbaum.wb-grid div.wb-node-list div.wb-row span.wb-col>input[type="color"],div.wunderbaum.wb-grid div.wb-node-list div.wb-row span.wb-col>input[type="date"],div.wunderbaum.wb-grid div.wb-node-list div.wb-row span.wb-col>input[type="datetime"],div.wunderbaum.wb-grid div.wb-node-list div.wb-row span.wb-col>input[type="datetime-local"],div.wunderbaum.wb-grid div.wb-node-list div.wb-row span.wb-col>input[type="email"],div.wunderbaum.wb-grid div.wb-node-list div.wb-row span.wb-col>input[type="month"],div.wunderbaum.wb-grid div.wb-node-list div.wb-row span.wb-col>input[type="number"],div.wunderbaum.wb-grid div.wb-node-list div.wb-row span.wb-col>input[type="password"],div.wunderbaum.wb-grid div.wb-node-list div.wb-row span.wb-col>input[type="search"],div.wunderbaum.wb-grid div.wb-node-list div.wb-row span.wb-col>input[type="tel"],div.wunderbaum.wb-grid div.wb-node-list div.wb-row span.wb-col>input[type="text"],div.wunderbaum.wb-grid div.wb-node-list div.wb-row span.wb-col>input[type="time"],div.wunderbaum.wb-grid div.wb-node-list div.wb-row span.wb-col>input[type="url"],div.wunderbaum.wb-grid div.wb-node-list div.wb-row span.wb-col>input[type="week"],div.wunderbaum.wb-grid div.wb-node-list div.wb-row span.wb-col>select{width:100%;max-height:20px;border:none}div.wunderbaum.wb-grid div.wb-node-list div.wb-row span.wb-col>input:focus,div.wunderbaum.wb-grid div.wb-node-list div.wb-row span.wb-col>select:focus{border:1px dashed #70c0e7}div.wunderbaum.wb-grid.wb-cell-mode div.wb-row:not(.wb-colspan) span.wb-col.wb-active{background-color:#f7fcfe}div.wunderbaum.wb-grid.wb-cell-mode div.wb-row:not(.wb-colspan).wb-active{background-color:#f7fcfe}div.wunderbaum.wb-grid.wb-cell-mode div.wb-row:not(.wb-colspan).wb-active span.wb-col.wb-active{background-color:#26a0da}div.wunderbaum.wb-grid.wb-alternate div.wb-node-list div.wb-row:nth-of-type(even):not(.wb-active):not(.wb-selected){background-color:#f7f7f7}div.wunderbaum.wb-grid.wb-alternate div.wb-node-list div.wb-row:nth-of-type(even):not(.wb-active):not(.wb-selected):hover{background-color:#f3f3f3}div.wunderbaum.wb-grid:not(:focus-within) div.wb-node-list div.wb-row,div.wunderbaum.wb-grid:not(:focus) div.wb-node-list div.wb-row{border-bottom-color:#dedede}div.wunderbaum.wb-ext-filter-dim div.wb-node-list div.wb-row,div.wunderbaum.wb-ext-filter-hide div.wb-node-list div.wb-row{color:#dedede}div.wunderbaum.wb-ext-filter-dim div.wb-node-list div.wb-row.wb-submatch,div.wunderbaum.wb-ext-filter-hide div.wb-node-list div.wb-row.wb-submatch{color:#868581}div.wunderbaum.wb-ext-filter-dim div.wb-node-list div.wb-row.wb-match,div.wunderbaum.wb-ext-filter-hide div.wb-node-list div.wb-row.wb-match{color:#56534c}div.wunderbaum div.wb-row.wb-drag-source{opacity:0.5}div.wunderbaum div.wb-row.wb-drag-source .wb-node{background-color:#d3d2ce}div.wunderbaum div.wb-row.wb-drop-target{overflow:visible}div.wunderbaum div.wb-row.wb-drop-target .wb-node{background-color:#d4ecf8;overflow:visible}div.wunderbaum div.wb-row.wb-drop-target .wb-node .wb-icon{position:relative;overflow:visible}div.wunderbaum div.wb-row.wb-drop-target .wb-node .wb-icon::after{position:absolute;z-index:1000;content:url(../docs/assets/drop_marker_16x32.png);left:0;top:3px}div.wunderbaum div.wb-row.wb-drop-target.wb-drop-before .wb-node .wb-icon::after{content:url(../docs/assets/drop_marker_insert_16x64.png);left:0;top:-8px}div.wunderbaum div.wb-row.wb-drop-target.wb-drop-after .wb-node .wb-icon::after{content:url(../docs/assets/drop_marker_insert_16x64.png);left:0;top:14px}div.wunderbaum.wb-rainbow i.wb-expander:nth-child(4n+1),div.wunderbaum.wb-rainbow i.wb-indent:nth-child(4n+1){background:#ffffe8}div.wunderbaum.wb-rainbow i.wb-expander:nth-child(4n+2),div.wunderbaum.wb-rainbow i.wb-indent:nth-child(4n+2){background:#f0fff0}div.wunderbaum.wb-rainbow i.wb-expander:nth-child(4n+3),div.wunderbaum.wb-rainbow i.wb-indent:nth-child(4n+3){background:#fff0ff}div.wunderbaum.wb-rainbow i.wb-expander:nth-child(4n+4),div.wunderbaum.wb-rainbow i.wb-indent:nth-child(4n+4){background:#eafdfd}div.wunderbaum.wb-fade-expander i.wb-expander{transition:color 1.5s;color:rgba(86,83,76,0)}div.wunderbaum.wb-fade-expander div.wb-row.wb-loading i.wb-expander,div.wunderbaum.wb-fade-expander:hover i.wb-expander,div.wunderbaum.wb-fade-expander:focus i.wb-expander,div.wunderbaum.wb-fade-expander:focus-within i.wb-expander,div.wunderbaum.wb-fade-expander [class*="wb-statusnode-"] i.wb-expander{transition:color 0.6s;color:#56534c}div.wunderbaum div.wb-row.wb-skeleton span.wb-title,div.wunderbaum div.wb-row.wb-skeleton i.wb-icon{animation:wb-skeleton-animation 1s linear infinite alternate;border-radius:0.25em;color:transparent;opacity:0.7}div.wunderbaum.wb-checkbox-auto-hide i.wb-checkbox{visibility:hidden}div.wunderbaum.wb-checkbox-auto-hide .wb-row:hover i.wb-checkbox,div.wunderbaum.wb-checkbox-auto-hide .wb-row.wb-selected i.wb-checkbox{visibility:unset}div.wunderbaum.wb-checkbox-auto-hide:focus .wb-row.wb-active i.wb-checkbox,div.wunderbaum.wb-checkbox-auto-hide:focus-within .wb-row.wb-active i.wb-checkbox{visibility:unset}.wb-helper-center{text-align:center}.wb-helper-disabled{color:#8c877c}.wb-helper-hidden{display:none}.wb-helper-invalid{color:#b5373b}.wb-helper-lazy-expander{color:#26a0da}.wb-helper-link{cursor:pointer}.wb-no-select{user-select:none;-webkit-user-select:none}.wb-no-select span.wb-title{user-select:contain;-webkit-user-select:contain}.wb-helper-start,.wb-helper-start>input{text-align:left}.wb-helper-end,.wb-helper-end>input{text-align:right}.wb-rtl .wb-helper-start,.wb-rtl .wb-helper-start>input{text-align:right}.wb-rtl .wb-helper-end,.wb-rtl .wb-helper-end>input{text-align:left}.wb-col input[type="checkbox"]:indeterminate{color:#8c877c;background-color:red}.wb-col input:invalid{color:#b5373b;background-color:#f5ddde}@keyframes wb-spin-animation{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes wb-skeleton-animation{0%{background-color:#a3b8c2}100%{background-color:#f0f3f5}}@keyframes wb-busy-animation{0%{background-position:0 0}100%{background-position:0 22px}}
|
package/dist/wunderbaum.d.ts
CHANGED
|
@@ -615,7 +615,7 @@ declare module "wb_node" {
|
|
|
615
615
|
*/
|
|
616
616
|
import "./wunderbaum.scss";
|
|
617
617
|
import { Wunderbaum } from "wunderbaum";
|
|
618
|
-
import { AddChildrenOptions, AddNodeType, ApplyCommandType, ChangeType, ExpandAllOptions, MakeVisibleOptions, MatcherCallback, NodeAnyCallback, NodeStatusType, NodeVisitCallback, NodeVisitResponse, ScrollIntoViewOptions, SetActiveOptions, SetExpandedOptions, SetSelectedOptions, SetStatusOptions } from "types";
|
|
618
|
+
import { AddChildrenOptions, AddNodeType, ApplyCommandType, ChangeType, ExpandAllOptions, MakeVisibleOptions, MatcherCallback, NodeAnyCallback, NodeStatusType, NodeStringCallback, NodeVisitCallback, NodeVisitResponse, ScrollIntoViewOptions, SetActiveOptions, SetExpandedOptions, SetSelectedOptions, SetStatusOptions } from "types";
|
|
619
619
|
import { WbNodeData } from "wb_options";
|
|
620
620
|
/**
|
|
621
621
|
* A single tree node.
|
|
@@ -680,6 +680,18 @@ declare module "wb_node" {
|
|
|
680
680
|
* @internal
|
|
681
681
|
*/
|
|
682
682
|
toString(): string;
|
|
683
|
+
/**
|
|
684
|
+
* Iterate all descendant nodes depth-first, pre-order using `for ... of ...` syntax.
|
|
685
|
+
* More concise, but slightly slower than {@link WunderbaumNode.visit}.
|
|
686
|
+
*
|
|
687
|
+
* Example:
|
|
688
|
+
* ```js
|
|
689
|
+
* for(const n of node) {
|
|
690
|
+
* ...
|
|
691
|
+
* }
|
|
692
|
+
* ```
|
|
693
|
+
*/
|
|
694
|
+
[Symbol.iterator](): IterableIterator<WunderbaumNode>;
|
|
683
695
|
/** Call event handler if defined in tree.options.
|
|
684
696
|
* Example:
|
|
685
697
|
* ```js
|
|
@@ -760,6 +772,28 @@ declare module "wb_node" {
|
|
|
760
772
|
* @see {@link Wunderbaum.findRelatedNode|tree.findRelatedNode()}
|
|
761
773
|
*/
|
|
762
774
|
findRelatedNode(where: string, includeHidden?: boolean): any;
|
|
775
|
+
/**
|
|
776
|
+
* Iterator version of {@link WunderbaumNode.format}.
|
|
777
|
+
*/
|
|
778
|
+
format_iter(name_cb?: NodeStringCallback, connectors?: string[]): IterableIterator<string>;
|
|
779
|
+
/**
|
|
780
|
+
* Return multiline string representation of a node/subnode hierarchy.
|
|
781
|
+
* Mostly useful for debugging.
|
|
782
|
+
*
|
|
783
|
+
* Example:
|
|
784
|
+
* ```js
|
|
785
|
+
* console.info(tree.getActiveNode().format((n)=>n.title));
|
|
786
|
+
* ```
|
|
787
|
+
* logs
|
|
788
|
+
* ```
|
|
789
|
+
* Books
|
|
790
|
+
* ├─ Art of War
|
|
791
|
+
* ╰─ Don Quixote
|
|
792
|
+
* ...
|
|
793
|
+
* ```
|
|
794
|
+
* @see {@link WunderbaumNode.format_iter}
|
|
795
|
+
*/
|
|
796
|
+
format(name_cb?: NodeStringCallback, connectors?: string[]): string;
|
|
763
797
|
/** Return the `<span class='wb-col'>` element with a given index or id.
|
|
764
798
|
* @returns {WunderbaumNode | null}
|
|
765
799
|
*/
|
|
@@ -897,7 +931,7 @@ declare module "wb_node" {
|
|
|
897
931
|
/** Remove all HTML markup from the DOM. */
|
|
898
932
|
removeMarkup(): void;
|
|
899
933
|
protected _getRenderInfo(): any;
|
|
900
|
-
protected _createIcon(parentElem: HTMLElement, replaceChild
|
|
934
|
+
protected _createIcon(parentElem: HTMLElement, replaceChild: HTMLElement | null, showLoading: boolean): HTMLElement | null;
|
|
901
935
|
/**
|
|
902
936
|
* Create a whole new `<div class="wb-row">` element.
|
|
903
937
|
* @see {@link WunderbaumNode.render}
|
|
@@ -919,11 +953,14 @@ declare module "wb_node" {
|
|
|
919
953
|
*
|
|
920
954
|
* `options.change` defaults to ChangeType.data, which updates the title,
|
|
921
955
|
* icon, and status. It also triggers the `render` event, that lets the user
|
|
922
|
-
* create or update the content of embeded cell elements
|
|
956
|
+
* create or update the content of embeded cell elements.
|
|
923
957
|
*
|
|
924
958
|
* If only the status or other class-only modifications have changed,
|
|
925
959
|
* `options.change` should be set to ChangeType.status instead for best
|
|
926
960
|
* efficiency.
|
|
961
|
+
*
|
|
962
|
+
* Calling `setModified` instead may be a better alternative.
|
|
963
|
+
* @see {@link WunderbaumNode.setModified}
|
|
927
964
|
*/
|
|
928
965
|
render(options?: any): void;
|
|
929
966
|
/**
|
|
@@ -1006,7 +1043,7 @@ declare module "wb_node" {
|
|
|
1006
1043
|
*/
|
|
1007
1044
|
triggerModify(operation: string, extra?: any): void;
|
|
1008
1045
|
/**
|
|
1009
|
-
* Call
|
|
1046
|
+
* Call `callback(node)` for all child nodes in hierarchical order (depth-first, pre-order).
|
|
1010
1047
|
*
|
|
1011
1048
|
* Stop iteration, if fn() returns false. Skip current branch, if fn()
|
|
1012
1049
|
* returns "skip".<br>
|
|
@@ -1015,6 +1052,7 @@ declare module "wb_node" {
|
|
|
1015
1052
|
* @param {function} callback the callback function.
|
|
1016
1053
|
* Return false to stop iteration, return "skip" to skip this node and
|
|
1017
1054
|
* its children only.
|
|
1055
|
+
* @see {@link WunderbaumNode.*[Symbol.iterator]}, {@link Wunderbaum.visit}.
|
|
1018
1056
|
*/
|
|
1019
1057
|
visit(callback: NodeVisitCallback, includeSelf?: boolean): NodeVisitResponse;
|
|
1020
1058
|
/** Call fn(node) for all parent nodes, bottom-up, including invisible system root.<br>
|
|
@@ -1054,6 +1092,7 @@ declare module "types" {
|
|
|
1054
1092
|
/** When set as option, called when the value is needed (e.g. `icon` type definition). */
|
|
1055
1093
|
export type BoolOrStringOptionResolver = (node: WunderbaumNode) => boolean | string;
|
|
1056
1094
|
export type NodeAnyCallback = (node: WunderbaumNode) => any;
|
|
1095
|
+
export type NodeStringCallback = (node: WunderbaumNode) => string;
|
|
1057
1096
|
export type NodeVisitResponse = "skip" | boolean | void;
|
|
1058
1097
|
export type NodeVisitCallback = (node: WunderbaumNode) => NodeVisitResponse;
|
|
1059
1098
|
export interface WbTreeEventType {
|
|
@@ -1660,6 +1699,11 @@ declare module "wb_ext_dnd" {
|
|
|
1660
1699
|
}
|
|
1661
1700
|
}
|
|
1662
1701
|
declare module "drag_observer" {
|
|
1702
|
+
/*!
|
|
1703
|
+
* Wunderbaum - drag_observer
|
|
1704
|
+
* Copyright (c) 2021-2022, Martin Wendt. Released under the MIT license.
|
|
1705
|
+
* @VERSION, @DATE (https://github.com/mar10/wunderbaum)
|
|
1706
|
+
*/
|
|
1663
1707
|
export type DragCallbackArgType = {
|
|
1664
1708
|
/** "dragstart", "drag", or "dragstop". */
|
|
1665
1709
|
type: string;
|
|
@@ -1783,7 +1827,7 @@ declare module "wunderbaum" {
|
|
|
1783
1827
|
import "./wunderbaum.scss";
|
|
1784
1828
|
import * as util from "util";
|
|
1785
1829
|
import { ExtensionsDict, WunderbaumExtension } from "wb_extension_base";
|
|
1786
|
-
import { ApplyCommandType, ChangeType, ColumnDefinitionList, ExpandAllOptions, FilterModeType, MatcherCallback, NavigationOptions, NodeStatusType, NodeTypeDefinitions, ScrollToOptions, SetActiveOptions, SetStatusOptions, TargetType as NodeRegion } from "types";
|
|
1830
|
+
import { ApplyCommandType, ChangeType, ColumnDefinitionList, ExpandAllOptions, FilterModeType, MatcherCallback, NavigationOptions, NodeStatusType, NodeStringCallback, NodeTypeDefinitions, ScrollToOptions, SetActiveOptions, SetStatusOptions, TargetType as NodeRegion } from "types";
|
|
1787
1831
|
import { WunderbaumNode } from "wb_node";
|
|
1788
1832
|
import { WunderbaumOptions } from "wb_options";
|
|
1789
1833
|
/**
|
|
@@ -1868,6 +1912,18 @@ declare module "wunderbaum" {
|
|
|
1868
1912
|
* Return a WunderbaumNode instance from element or event.
|
|
1869
1913
|
*/
|
|
1870
1914
|
static getNode(el: Element | Event): WunderbaumNode | null;
|
|
1915
|
+
/**
|
|
1916
|
+
* Iterate all descendant nodes depth-first, pre-order using `for ... of ...` syntax.
|
|
1917
|
+
* More concise, but slightly slower than {@link Wunderbaum.visit}.
|
|
1918
|
+
*
|
|
1919
|
+
* Example:
|
|
1920
|
+
* ```js
|
|
1921
|
+
* for(const node of tree) {
|
|
1922
|
+
* ...
|
|
1923
|
+
* }
|
|
1924
|
+
* ```
|
|
1925
|
+
*/
|
|
1926
|
+
[Symbol.iterator](): IterableIterator<WunderbaumNode>;
|
|
1871
1927
|
/** @internal */
|
|
1872
1928
|
protected _registerExtension(extension: WunderbaumExtension): void;
|
|
1873
1929
|
/** Called on tree (re)init after markup is created, before loading. */
|
|
@@ -2000,6 +2056,31 @@ declare module "wunderbaum" {
|
|
|
2000
2056
|
* @param includeHidden Not yet implemented
|
|
2001
2057
|
*/
|
|
2002
2058
|
findRelatedNode(node: WunderbaumNode, where: string, includeHidden?: boolean): any;
|
|
2059
|
+
/**
|
|
2060
|
+
* Iterator version of {@link Wunderbaum.format}.
|
|
2061
|
+
*/
|
|
2062
|
+
format_iter(name_cb?: NodeStringCallback, connectors?: string[]): IterableIterator<string>;
|
|
2063
|
+
/**
|
|
2064
|
+
* Return multiline string representation of the node hierarchy.
|
|
2065
|
+
* Mostly useful for debugging.
|
|
2066
|
+
*
|
|
2067
|
+
* Example:
|
|
2068
|
+
* ```js
|
|
2069
|
+
* console.info(tree.format((n)=>n.title));
|
|
2070
|
+
* ```
|
|
2071
|
+
* logs
|
|
2072
|
+
* ```
|
|
2073
|
+
* Playground
|
|
2074
|
+
* ├─ Books
|
|
2075
|
+
* | ├─ Art of War
|
|
2076
|
+
* | ╰─ Don Quixote
|
|
2077
|
+
* ├─ Music
|
|
2078
|
+
* ...
|
|
2079
|
+
* ```
|
|
2080
|
+
*
|
|
2081
|
+
* @see {@link Wunderbaum.format_iter} and {@link WunderbaumNode.format}.
|
|
2082
|
+
*/
|
|
2083
|
+
format(name_cb?: NodeStringCallback, connectors?: string[]): string;
|
|
2003
2084
|
/**
|
|
2004
2085
|
* Return the active cell (`span.wb-col`) of the currently active node or null.
|
|
2005
2086
|
*/
|
|
@@ -2083,7 +2164,9 @@ declare module "wunderbaum" {
|
|
|
2083
2164
|
setFocus(flag?: boolean): void;
|
|
2084
2165
|
/** Schedule an update request to reflect a tree change. */
|
|
2085
2166
|
setModified(change: ChangeType, options?: any): void;
|
|
2086
|
-
/** Schedule an update request to reflect a single node modification.
|
|
2167
|
+
/** Schedule an update request to reflect a single node modification.
|
|
2168
|
+
* @see {@link WunderbaumNode.setModified}
|
|
2169
|
+
*/
|
|
2087
2170
|
setModified(change: ChangeType, node: WunderbaumNode, options?: any): void;
|
|
2088
2171
|
/** Disable mouse and keyboard interaction (return prev. state). */
|
|
2089
2172
|
setEnabled(flag?: boolean): boolean;
|
|
@@ -2132,7 +2215,8 @@ declare module "wunderbaum" {
|
|
|
2132
2215
|
protected _updateViewportImmediately(): void;
|
|
2133
2216
|
protected _updateRows(options?: any): boolean;
|
|
2134
2217
|
/**
|
|
2135
|
-
* Call callback(node) for all nodes in hierarchical order (depth-first).
|
|
2218
|
+
* Call `callback(node)` for all nodes in hierarchical order (depth-first, pre-order).
|
|
2219
|
+
* @see {@link Wunderbaum.*[Symbol.iterator]}, {@link WunderbaumNode.visit}.
|
|
2136
2220
|
*
|
|
2137
2221
|
* @param {function} callback the callback function.
|
|
2138
2222
|
* Return false to stop iteration, return "skip" to skip this node and
|