@memberjunction/ng-trees 5.44.0 → 5.45.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/dist/lib/tree/tree.component.d.ts +9 -2
- package/dist/lib/tree/tree.component.d.ts.map +1 -1
- package/dist/lib/tree/tree.component.js +25 -7
- package/dist/lib/tree/tree.component.js.map +1 -1
- package/dist/lib/tree-dropdown/tree-dropdown.component.d.ts +3 -1
- package/dist/lib/tree-dropdown/tree-dropdown.component.d.ts.map +1 -1
- package/dist/lib/tree-dropdown/tree-dropdown.component.js +9 -5
- package/dist/lib/tree-dropdown/tree-dropdown.component.js.map +1 -1
- package/package.json +7 -7
|
@@ -30,10 +30,17 @@ export declare class TreeComponent implements OnInit, OnDestroy {
|
|
|
30
30
|
private _selectedIDs;
|
|
31
31
|
set SelectedIDs(value: string[]);
|
|
32
32
|
get SelectedIDs(): string[];
|
|
33
|
-
/** Initially expanded node IDs (null =
|
|
33
|
+
/** Initially expanded node IDs (null = defer to DefaultExpansion) */
|
|
34
34
|
private _expandedIDs;
|
|
35
35
|
set ExpandedIDs(value: string[] | null);
|
|
36
36
|
get ExpandedIDs(): string[] | null;
|
|
37
|
+
/**
|
|
38
|
+
* Initial expansion applied when ExpandedIDs is null:
|
|
39
|
+
* 'first-level' (default) expands only the root branches, 'all' expands every
|
|
40
|
+
* branch (small pickers where the whole catalog should be visible), 'none'
|
|
41
|
+
* starts fully collapsed.
|
|
42
|
+
*/
|
|
43
|
+
DefaultExpansion: 'first-level' | 'all' | 'none';
|
|
37
44
|
/** Show expand/collapse all buttons */
|
|
38
45
|
private _showExpandCollapseAll;
|
|
39
46
|
set ShowExpandCollapseAll(value: boolean);
|
|
@@ -356,6 +363,6 @@ export declare class TreeComponent implements OnInit, OnDestroy {
|
|
|
356
363
|
*/
|
|
357
364
|
private escapeHtml;
|
|
358
365
|
static ɵfac: i0.ɵɵFactoryDeclaration<TreeComponent, never>;
|
|
359
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TreeComponent, "mj-tree", never, { "BranchConfig": { "alias": "BranchConfig"; "required": false; }; "LeafConfig": { "alias": "LeafConfig"; "required": false; }; "SelectionMode": { "alias": "SelectionMode"; "required": false; }; "SelectableTypes": { "alias": "SelectableTypes"; "required": false; }; "SelectedIDs": { "alias": "SelectedIDs"; "required": false; }; "ExpandedIDs": { "alias": "ExpandedIDs"; "required": false; }; "ShowExpandCollapseAll": { "alias": "ShowExpandCollapseAll"; "required": false; }; "EnableKeyboardNavigation": { "alias": "EnableKeyboardNavigation"; "required": false; }; "KeyboardConfig": { "alias": "KeyboardConfig"; "required": false; }; "StyleConfig": { "alias": "StyleConfig"; "required": false; }; "IndentSize": { "alias": "IndentSize"; "required": false; }; "ShowLoading": { "alias": "ShowLoading"; "required": false; }; "EmptyMessage": { "alias": "EmptyMessage"; "required": false; }; "EmptyIcon": { "alias": "EmptyIcon"; "required": false; }; "AutoLoad": { "alias": "AutoLoad"; "required": false; }; "ShowIcons": { "alias": "ShowIcons"; "required": false; }; "ShowDescriptions": { "alias": "ShowDescriptions"; "required": false; }; "ShowBadges": { "alias": "ShowBadges"; "required": false; }; "AnimateExpandCollapse": { "alias": "AnimateExpandCollapse"; "required": false; }; }, { "BeforeNodeSelect": "BeforeNodeSelect"; "AfterNodeSelect": "AfterNodeSelect"; "BeforeNodeDeselect": "BeforeNodeDeselect"; "AfterNodeDeselect": "AfterNodeDeselect"; "BeforeNodeExpand": "BeforeNodeExpand"; "AfterNodeExpand": "AfterNodeExpand"; "BeforeNodeCollapse": "BeforeNodeCollapse"; "AfterNodeCollapse": "AfterNodeCollapse"; "BeforeNodeClick": "BeforeNodeClick"; "AfterNodeClick": "AfterNodeClick"; "BeforeNodeDoubleClick": "BeforeNodeDoubleClick"; "AfterNodeDoubleClick": "AfterNodeDoubleClick"; "BeforeDataLoad": "BeforeDataLoad"; "AfterDataLoad": "AfterDataLoad"; "BeforeKeyboardNavigate": "BeforeKeyboardNavigate"; "AfterKeyboardNavigate": "AfterKeyboardNavigate"; "SelectionChange": "SelectionChange"; }, never, never, false, never>;
|
|
366
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TreeComponent, "mj-tree", never, { "BranchConfig": { "alias": "BranchConfig"; "required": false; }; "LeafConfig": { "alias": "LeafConfig"; "required": false; }; "SelectionMode": { "alias": "SelectionMode"; "required": false; }; "SelectableTypes": { "alias": "SelectableTypes"; "required": false; }; "SelectedIDs": { "alias": "SelectedIDs"; "required": false; }; "ExpandedIDs": { "alias": "ExpandedIDs"; "required": false; }; "DefaultExpansion": { "alias": "DefaultExpansion"; "required": false; }; "ShowExpandCollapseAll": { "alias": "ShowExpandCollapseAll"; "required": false; }; "EnableKeyboardNavigation": { "alias": "EnableKeyboardNavigation"; "required": false; }; "KeyboardConfig": { "alias": "KeyboardConfig"; "required": false; }; "StyleConfig": { "alias": "StyleConfig"; "required": false; }; "IndentSize": { "alias": "IndentSize"; "required": false; }; "ShowLoading": { "alias": "ShowLoading"; "required": false; }; "EmptyMessage": { "alias": "EmptyMessage"; "required": false; }; "EmptyIcon": { "alias": "EmptyIcon"; "required": false; }; "AutoLoad": { "alias": "AutoLoad"; "required": false; }; "ShowIcons": { "alias": "ShowIcons"; "required": false; }; "ShowDescriptions": { "alias": "ShowDescriptions"; "required": false; }; "ShowBadges": { "alias": "ShowBadges"; "required": false; }; "AnimateExpandCollapse": { "alias": "AnimateExpandCollapse"; "required": false; }; }, { "BeforeNodeSelect": "BeforeNodeSelect"; "AfterNodeSelect": "AfterNodeSelect"; "BeforeNodeDeselect": "BeforeNodeDeselect"; "AfterNodeDeselect": "AfterNodeDeselect"; "BeforeNodeExpand": "BeforeNodeExpand"; "AfterNodeExpand": "AfterNodeExpand"; "BeforeNodeCollapse": "BeforeNodeCollapse"; "AfterNodeCollapse": "AfterNodeCollapse"; "BeforeNodeClick": "BeforeNodeClick"; "AfterNodeClick": "AfterNodeClick"; "BeforeNodeDoubleClick": "BeforeNodeDoubleClick"; "AfterNodeDoubleClick": "AfterNodeDoubleClick"; "BeforeDataLoad": "BeforeDataLoad"; "AfterDataLoad": "AfterDataLoad"; "BeforeKeyboardNavigate": "BeforeKeyboardNavigate"; "AfterKeyboardNavigate": "AfterKeyboardNavigate"; "SelectionChange": "SelectionChange"; }, never, never, false, never>;
|
|
360
367
|
}
|
|
361
368
|
//# sourceMappingURL=tree.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree.component.d.ts","sourceRoot":"","sources":["../../../src/lib/tree/tree.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAIH,YAAY,EACZ,iBAAiB,EACjB,MAAM,EACN,SAAS,EACT,UAAU,EAEb,MAAM,eAAe,CAAC;AAGvB,OAAO,EACH,QAAQ,EACR,gBAAgB,EAChB,cAAc,EAEd,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAErB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACH,yBAAyB,EACzB,wBAAwB,EACxB,2BAA2B,EAC3B,0BAA0B,EAC1B,yBAAyB,EACzB,wBAAwB,EACxB,2BAA2B,EAC3B,0BAA0B,EAC1B,wBAAwB,EACxB,uBAAuB,EACvB,8BAA8B,EAC9B,6BAA6B,EAC7B,uBAAuB,EACvB,sBAAsB,EACtB,+BAA+B,EAC/B,8BAA8B,EACjC,MAAM,uBAAuB,CAAC;;AAE/B,qBAMa,aAAc,YAAW,MAAM,EAAE,SAAS;
|
|
1
|
+
{"version":3,"file":"tree.component.d.ts","sourceRoot":"","sources":["../../../src/lib/tree/tree.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAIH,YAAY,EACZ,iBAAiB,EACjB,MAAM,EACN,SAAS,EACT,UAAU,EAEb,MAAM,eAAe,CAAC;AAGvB,OAAO,EACH,QAAQ,EACR,gBAAgB,EAChB,cAAc,EAEd,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,EACf,kBAAkB,E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H,OAAO,CAAC,gBAAgB;IAKxB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAiE3B;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAQ3B;;OAEG;IACH,OAAO,CAAC,UAAU;IAwBlB;;OAEG;IACH,OAAO,CAAC,YAAY;IAoBpB;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAS1B;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAS5B;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAM9B,OAAO,CAAC,4BAA4B;IAWpC;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAa1B;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAQ9B;;OAEG;IACH,OAAO,CAAC,0BAA0B;IAqDlC;;OAEG;IACH,OAAO,CAAC,6BAA6B;IAsBrC;;OAEG;IACI,cAAc,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM;IAU7C;;OAEG;IACI,cAAc,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAmB9D;;OAEG;IACI,mBAAmB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IASrD;;OAEG;IACI,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,MAAM;IAIvD;;OAEG;IACI,mBAAmB,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM;IAyBlD;;OAEG;IACH,OAAO,CAAC,UAAU;yCA9uDT,aAAa;2CAAb,aAAa;CAmvDzB"}
|
|
@@ -273,7 +273,7 @@ export class TreeComponent {
|
|
|
273
273
|
get SelectedIDs() {
|
|
274
274
|
return this._selectedIDs;
|
|
275
275
|
}
|
|
276
|
-
/** Initially expanded node IDs (null =
|
|
276
|
+
/** Initially expanded node IDs (null = defer to DefaultExpansion) */
|
|
277
277
|
_expandedIDs = null;
|
|
278
278
|
set ExpandedIDs(value) {
|
|
279
279
|
this._expandedIDs = value;
|
|
@@ -281,6 +281,13 @@ export class TreeComponent {
|
|
|
281
281
|
get ExpandedIDs() {
|
|
282
282
|
return this._expandedIDs;
|
|
283
283
|
}
|
|
284
|
+
/**
|
|
285
|
+
* Initial expansion applied when ExpandedIDs is null:
|
|
286
|
+
* 'first-level' (default) expands only the root branches, 'all' expands every
|
|
287
|
+
* branch (small pickers where the whole catalog should be visible), 'none'
|
|
288
|
+
* starts fully collapsed.
|
|
289
|
+
*/
|
|
290
|
+
DefaultExpansion = 'first-level';
|
|
284
291
|
/** Show expand/collapse all buttons */
|
|
285
292
|
_showExpandCollapseAll = false;
|
|
286
293
|
set ShowExpandCollapseAll(value) {
|
|
@@ -1296,11 +1303,20 @@ export class TreeComponent {
|
|
|
1296
1303
|
*/
|
|
1297
1304
|
applyInitialExpansion() {
|
|
1298
1305
|
if (this._expandedIDs === null) {
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1306
|
+
switch (this.DefaultExpansion) {
|
|
1307
|
+
case 'all':
|
|
1308
|
+
this.expandAllRecursive(this.Nodes);
|
|
1309
|
+
break;
|
|
1310
|
+
case 'none':
|
|
1311
|
+
break;
|
|
1312
|
+
default:
|
|
1313
|
+
// Auto-expand first level
|
|
1314
|
+
for (const node of this.Nodes) {
|
|
1315
|
+
if (node.Type === 'branch') {
|
|
1316
|
+
node.Expanded = true;
|
|
1317
|
+
}
|
|
1318
|
+
}
|
|
1319
|
+
break;
|
|
1304
1320
|
}
|
|
1305
1321
|
}
|
|
1306
1322
|
else {
|
|
@@ -1619,7 +1635,7 @@ export class TreeComponent {
|
|
|
1619
1635
|
static ɵfac = function TreeComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TreeComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef)); };
|
|
1620
1636
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TreeComponent, selectors: [["mj-tree"]], hostBindings: function TreeComponent_HostBindings(rf, ctx) { if (rf & 1) {
|
|
1621
1637
|
i0.ɵɵlistener("keydown", function TreeComponent_keydown_HostBindingHandler($event) { return ctx.onKeyDown($event); });
|
|
1622
|
-
} }, inputs: { BranchConfig: "BranchConfig", LeafConfig: "LeafConfig", SelectionMode: "SelectionMode", SelectableTypes: "SelectableTypes", SelectedIDs: "SelectedIDs", ExpandedIDs: "ExpandedIDs", ShowExpandCollapseAll: "ShowExpandCollapseAll", EnableKeyboardNavigation: "EnableKeyboardNavigation", KeyboardConfig: "KeyboardConfig", StyleConfig: "StyleConfig", IndentSize: "IndentSize", ShowLoading: "ShowLoading", EmptyMessage: "EmptyMessage", EmptyIcon: "EmptyIcon", AutoLoad: "AutoLoad", ShowIcons: "ShowIcons", ShowDescriptions: "ShowDescriptions", ShowBadges: "ShowBadges", AnimateExpandCollapse: "AnimateExpandCollapse" }, outputs: { BeforeNodeSelect: "BeforeNodeSelect", AfterNodeSelect: "AfterNodeSelect", BeforeNodeDeselect: "BeforeNodeDeselect", AfterNodeDeselect: "AfterNodeDeselect", BeforeNodeExpand: "BeforeNodeExpand", AfterNodeExpand: "AfterNodeExpand", BeforeNodeCollapse: "BeforeNodeCollapse", AfterNodeCollapse: "AfterNodeCollapse", BeforeNodeClick: "BeforeNodeClick", AfterNodeClick: "AfterNodeClick", BeforeNodeDoubleClick: "BeforeNodeDoubleClick", AfterNodeDoubleClick: "AfterNodeDoubleClick", BeforeDataLoad: "BeforeDataLoad", AfterDataLoad: "AfterDataLoad", BeforeKeyboardNavigate: "BeforeKeyboardNavigate", AfterKeyboardNavigate: "AfterKeyboardNavigate", SelectionChange: "SelectionChange" }, standalone: false, decls: 8, vars: 6, consts: [["nodeTemplate", ""], ["tabindex", "0", 3, "ngClass"], [1, "tree-loading"], [1, "tree-error"], [1, "tree-toolbar"], ["Size", "compact", 1, "tree-empty", 3, "Icon", "Title"], [1, "tree-content"], [1, "tree-loading__spinner"], [1, "fa-solid", "fa-spinner", "fa-spin"], [1, "tree-loading__text"], [1, "fa-solid", "fa-exclamation-triangle", "tree-error__icon"], [1, "tree-error__message"], [1, "tree-error__retry", 3, "click"], [1, "fa-solid", "fa-refresh"], ["title", "Expand All", 1, "tree-toolbar__btn", 3, "click"], [1, "fa-solid", "fa-plus-square"], ["title", "Collapse All", 1, "tree-toolbar__btn", 3, "click"], [1, "fa-solid", "fa-minus-square"], [4, "ngTemplateOutlet", "ngTemplateOutletContext"], ["role", "treeitem", 3, "click", "dblclick", "ngClass"], [1, "tree-node-toggle"], [1, "tree-node-leaf-spacer"], [1, "tree-node-icon", 3, "color"], [1, "tree-node-content"], [1, "tree-node-label", 3, "innerHTML"], [1, "tree-node-description"], [1, "tree-node-badge"], [1, "tree-node-selected-indicator"], ["role", "group", 1, "tree-node-children", 3, "tree-node-children--animated"], [1, "tree-node-toggle", 3, "click"], [1, "fa-solid", "tree-node-toggle__icon", 3, "ngClass"], [1, "tree-node-toggle__spacer"], [1, "tree-node-icon"], [1, "fa-solid", "fa-check"], ["role", "group", 1, "tree-node-children"]], template: function TreeComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1638
|
+
} }, inputs: { BranchConfig: "BranchConfig", LeafConfig: "LeafConfig", SelectionMode: "SelectionMode", SelectableTypes: "SelectableTypes", SelectedIDs: "SelectedIDs", ExpandedIDs: "ExpandedIDs", DefaultExpansion: "DefaultExpansion", ShowExpandCollapseAll: "ShowExpandCollapseAll", EnableKeyboardNavigation: "EnableKeyboardNavigation", KeyboardConfig: "KeyboardConfig", StyleConfig: "StyleConfig", IndentSize: "IndentSize", ShowLoading: "ShowLoading", EmptyMessage: "EmptyMessage", EmptyIcon: "EmptyIcon", AutoLoad: "AutoLoad", ShowIcons: "ShowIcons", ShowDescriptions: "ShowDescriptions", ShowBadges: "ShowBadges", AnimateExpandCollapse: "AnimateExpandCollapse" }, outputs: { BeforeNodeSelect: "BeforeNodeSelect", AfterNodeSelect: "AfterNodeSelect", BeforeNodeDeselect: "BeforeNodeDeselect", AfterNodeDeselect: "AfterNodeDeselect", BeforeNodeExpand: "BeforeNodeExpand", AfterNodeExpand: "AfterNodeExpand", BeforeNodeCollapse: "BeforeNodeCollapse", AfterNodeCollapse: "AfterNodeCollapse", BeforeNodeClick: "BeforeNodeClick", AfterNodeClick: "AfterNodeClick", BeforeNodeDoubleClick: "BeforeNodeDoubleClick", AfterNodeDoubleClick: "AfterNodeDoubleClick", BeforeDataLoad: "BeforeDataLoad", AfterDataLoad: "AfterDataLoad", BeforeKeyboardNavigate: "BeforeKeyboardNavigate", AfterKeyboardNavigate: "AfterKeyboardNavigate", SelectionChange: "SelectionChange" }, standalone: false, decls: 8, vars: 6, consts: [["nodeTemplate", ""], ["tabindex", "0", 3, "ngClass"], [1, "tree-loading"], [1, "tree-error"], [1, "tree-toolbar"], ["Size", "compact", 1, "tree-empty", 3, "Icon", "Title"], [1, "tree-content"], [1, "tree-loading__spinner"], [1, "fa-solid", "fa-spinner", "fa-spin"], [1, "tree-loading__text"], [1, "fa-solid", "fa-exclamation-triangle", "tree-error__icon"], [1, "tree-error__message"], [1, "tree-error__retry", 3, "click"], [1, "fa-solid", "fa-refresh"], ["title", "Expand All", 1, "tree-toolbar__btn", 3, "click"], [1, "fa-solid", "fa-plus-square"], ["title", "Collapse All", 1, "tree-toolbar__btn", 3, "click"], [1, "fa-solid", "fa-minus-square"], [4, "ngTemplateOutlet", "ngTemplateOutletContext"], ["role", "treeitem", 3, "click", "dblclick", "ngClass"], [1, "tree-node-toggle"], [1, "tree-node-leaf-spacer"], [1, "tree-node-icon", 3, "color"], [1, "tree-node-content"], [1, "tree-node-label", 3, "innerHTML"], [1, "tree-node-description"], [1, "tree-node-badge"], [1, "tree-node-selected-indicator"], ["role", "group", 1, "tree-node-children", 3, "tree-node-children--animated"], [1, "tree-node-toggle", 3, "click"], [1, "fa-solid", "tree-node-toggle__icon", 3, "ngClass"], [1, "tree-node-toggle__spacer"], [1, "tree-node-icon"], [1, "fa-solid", "fa-check"], ["role", "group", 1, "tree-node-children"]], template: function TreeComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1623
1639
|
i0.ɵɵelementStart(0, "div", 1);
|
|
1624
1640
|
i0.ɵɵconditionalCreate(1, TreeComponent_Conditional_1_Template, 5, 0, "div", 2);
|
|
1625
1641
|
i0.ɵɵconditionalCreate(2, TreeComponent_Conditional_2_Template, 7, 1, "div", 3);
|
|
@@ -1657,6 +1673,8 @@ export class TreeComponent {
|
|
|
1657
1673
|
type: Input
|
|
1658
1674
|
}], ExpandedIDs: [{
|
|
1659
1675
|
type: Input
|
|
1676
|
+
}], DefaultExpansion: [{
|
|
1677
|
+
type: Input
|
|
1660
1678
|
}], ShowExpandCollapseAll: [{
|
|
1661
1679
|
type: Input
|
|
1662
1680
|
}], EnableKeyboardNavigation: [{
|