primeng 18.0.0-rc.2 → 18.0.0
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/LICENSE.md +1 -1
- package/autocomplete/autocomplete.d.ts +11 -11
- package/config/primeng.d.ts +12 -6
- package/config/provideprimeng.d.ts +1 -12
- package/config/themeprovider.d.ts +10 -4
- package/confirmdialog/confirmdialog.d.ts +1 -0
- package/esm2022/autocomplete/autocomplete.mjs +131 -133
- package/esm2022/autocomplete/style/autocompletestyle.mjs +5 -4
- package/esm2022/calendar/calendar.mjs +2 -2
- package/esm2022/colorpicker/colorpicker.mjs +2 -2
- package/esm2022/config/primeng.mjs +14 -18
- package/esm2022/config/provideprimeng.mjs +11 -3
- package/esm2022/config/themeprovider.mjs +10 -16
- package/esm2022/confirmdialog/confirmdialog.mjs +10 -5
- package/esm2022/contextmenu/contextmenu.mjs +2 -2
- package/esm2022/datepicker/datepicker.mjs +5 -5
- package/esm2022/dialog/dialog.mjs +16 -16
- package/esm2022/drawer/drawer.mjs +4 -4
- package/esm2022/dropdown/dropdown.mjs +1 -1
- package/esm2022/dynamicdialog/dialogservice.mjs +2 -2
- package/esm2022/image/image.mjs +2 -2
- package/esm2022/inputmask/inputmask.mjs +4 -4
- package/esm2022/inputnumber/inputnumber.mjs +4 -4
- package/esm2022/inputotp/inputotp.mjs +4 -4
- package/esm2022/inputtext/inputtext.mjs +11 -10
- package/esm2022/menu/menu.mjs +2 -2
- package/esm2022/multiselect/style/multiselectstyle.mjs +1 -4
- package/esm2022/overlay/style/overlaystyle.mjs +2 -2
- package/esm2022/overlaypanel/overlaypanel.mjs +2 -2
- package/esm2022/password/password.mjs +28 -5
- package/esm2022/picklist/picklist.mjs +132 -108
- package/esm2022/popover/popover.mjs +2 -2
- package/esm2022/ripple/ripple.mjs +5 -2
- package/esm2022/select/select.mjs +5 -4
- package/esm2022/select/style/selectstyle.mjs +2 -5
- package/esm2022/sidebar/sidebar.mjs +2 -2
- package/esm2022/splitter/splitter.mjs +25 -15
- package/esm2022/splitter/style/splitterstyle.mjs +5 -4
- package/esm2022/table/table.mjs +6331 -6484
- package/esm2022/textarea/textarea.mjs +9 -9
- package/esm2022/tieredmenu/tieredmenu.mjs +2 -2
- package/esm2022/tooltip/tooltip.mjs +2 -2
- package/esm2022/tree/style/treestyle.mjs +13 -3
- package/esm2022/tree/tree.mjs +95 -54
- package/esm2022/treeselect/style/treeselectstyle.mjs +1 -4
- package/esm2022/treeselect/treeselect.mjs +2 -2
- package/fesm2022/primeng-autocomplete.mjs +134 -135
- package/fesm2022/primeng-autocomplete.mjs.map +1 -1
- package/fesm2022/primeng-calendar.mjs +1 -1
- package/fesm2022/primeng-calendar.mjs.map +1 -1
- package/fesm2022/primeng-colorpicker.mjs +1 -1
- package/fesm2022/primeng-colorpicker.mjs.map +1 -1
- package/fesm2022/primeng-config.mjs +38 -39
- package/fesm2022/primeng-config.mjs.map +1 -1
- package/fesm2022/primeng-confirmdialog.mjs +9 -4
- package/fesm2022/primeng-confirmdialog.mjs.map +1 -1
- package/fesm2022/primeng-contextmenu.mjs +1 -1
- package/fesm2022/primeng-contextmenu.mjs.map +1 -1
- package/fesm2022/primeng-datepicker.mjs +4 -4
- package/fesm2022/primeng-datepicker.mjs.map +1 -1
- package/fesm2022/primeng-dialog.mjs +15 -15
- package/fesm2022/primeng-dialog.mjs.map +1 -1
- package/fesm2022/primeng-drawer.mjs +3 -3
- package/fesm2022/primeng-drawer.mjs.map +1 -1
- package/fesm2022/primeng-dropdown.mjs.map +1 -1
- package/fesm2022/primeng-dynamicdialog.mjs +1 -1
- package/fesm2022/primeng-dynamicdialog.mjs.map +1 -1
- package/fesm2022/primeng-image.mjs +1 -1
- package/fesm2022/primeng-image.mjs.map +1 -1
- package/fesm2022/primeng-inputmask.mjs +3 -3
- package/fesm2022/primeng-inputmask.mjs.map +1 -1
- package/fesm2022/primeng-inputnumber.mjs +3 -3
- package/fesm2022/primeng-inputnumber.mjs.map +1 -1
- package/fesm2022/primeng-inputotp.mjs +3 -3
- package/fesm2022/primeng-inputotp.mjs.map +1 -1
- package/fesm2022/primeng-inputtext.mjs +10 -9
- package/fesm2022/primeng-inputtext.mjs.map +1 -1
- package/fesm2022/primeng-menu.mjs +1 -1
- package/fesm2022/primeng-menu.mjs.map +1 -1
- package/fesm2022/primeng-multiselect.mjs +0 -3
- package/fesm2022/primeng-multiselect.mjs.map +1 -1
- package/fesm2022/primeng-overlay.mjs +1 -1
- package/fesm2022/primeng-overlay.mjs.map +1 -1
- package/fesm2022/primeng-overlaypanel.mjs +1 -1
- package/fesm2022/primeng-overlaypanel.mjs.map +1 -1
- package/fesm2022/primeng-password.mjs +27 -4
- package/fesm2022/primeng-password.mjs.map +1 -1
- package/fesm2022/primeng-picklist.mjs +131 -107
- package/fesm2022/primeng-picklist.mjs.map +1 -1
- package/fesm2022/primeng-popover.mjs +1 -1
- package/fesm2022/primeng-popover.mjs.map +1 -1
- package/fesm2022/primeng-ripple.mjs +4 -1
- package/fesm2022/primeng-ripple.mjs.map +1 -1
- package/fesm2022/primeng-select.mjs +5 -7
- package/fesm2022/primeng-select.mjs.map +1 -1
- package/fesm2022/primeng-sidebar.mjs +1 -1
- package/fesm2022/primeng-sidebar.mjs.map +1 -1
- package/fesm2022/primeng-splitter.mjs +28 -17
- package/fesm2022/primeng-splitter.mjs.map +1 -1
- package/fesm2022/primeng-table.mjs +6333 -6486
- package/fesm2022/primeng-table.mjs.map +1 -1
- package/fesm2022/primeng-textarea.mjs +8 -8
- package/fesm2022/primeng-textarea.mjs.map +1 -1
- package/fesm2022/primeng-tieredmenu.mjs +1 -1
- package/fesm2022/primeng-tieredmenu.mjs.map +1 -1
- package/fesm2022/primeng-tooltip.mjs +1 -1
- package/fesm2022/primeng-tooltip.mjs.map +1 -1
- package/fesm2022/primeng-tree.mjs +106 -55
- package/fesm2022/primeng-tree.mjs.map +1 -1
- package/fesm2022/primeng-treeselect.mjs +1 -4
- package/fesm2022/primeng-treeselect.mjs.map +1 -1
- package/inputtext/inputtext.d.ts +2 -2
- package/package.json +256 -256
- package/password/password.d.ts +5 -1
- package/splitter/splitter.d.ts +2 -3
- package/splitter/style/splitterstyle.d.ts +0 -13
- package/table/table.d.ts +928 -1030
- package/textarea/textarea.d.ts +2 -2
- package/tree/style/treestyle.d.ts +1 -1
- package/tree/tree.d.ts +4 -2
@@ -1,12 +1,12 @@
|
|
1
1
|
import * as i1 from '@angular/common';
|
2
2
|
import { CommonModule } from '@angular/common';
|
3
3
|
import * as i0 from '@angular/core';
|
4
|
-
import { Injectable, inject, forwardRef, booleanAttribute, numberAttribute, Component, ViewEncapsulation, Input, EventEmitter, ChangeDetectionStrategy, Optional, ContentChild, Output, ViewChild, NgModule } from '@angular/core';
|
4
|
+
import { Injectable, inject, forwardRef, booleanAttribute, numberAttribute, Component, ViewEncapsulation, Input, EventEmitter, ChangeDetectionStrategy, Optional, ContentChild, Output, ViewChild, ContentChildren, NgModule } from '@angular/core';
|
5
5
|
import * as i2 from '@angular/forms';
|
6
6
|
import { FormsModule } from '@angular/forms';
|
7
7
|
import { find, hasClass, findSingle, focus, removeAccents, resolveFieldData } from '@primeuix/utils';
|
8
8
|
import * as i3 from 'primeng/api';
|
9
|
-
import { SharedModule, TranslationKeys } from 'primeng/api';
|
9
|
+
import { SharedModule, TranslationKeys, PrimeTemplate } from 'primeng/api';
|
10
10
|
import { BaseComponent } from 'primeng/basecomponent';
|
11
11
|
import { Checkbox } from 'primeng/checkbox';
|
12
12
|
import { IconField } from 'primeng/iconfield';
|
@@ -177,6 +177,16 @@ const theme = ({ dt }) => `
|
|
177
177
|
|
178
178
|
.p-tree .p-tree-node-droppoint-active {
|
179
179
|
border: 0 none;
|
180
|
+
background-color: ${dt('primary.color')};
|
181
|
+
}
|
182
|
+
|
183
|
+
.p-tree-node-content.p-tree-node-dragover {
|
184
|
+
background: ${dt('tree.node.hover.background')};
|
185
|
+
color: ${dt('tree.node.hover.color')};
|
186
|
+
}
|
187
|
+
|
188
|
+
.p-tree-node-content.p-tree-node-dragover .p-tree-node-icon {
|
189
|
+
color: ${dt('tree.node.icon.hover.color')};
|
180
190
|
}
|
181
191
|
|
182
192
|
.p-tree-horizontal {
|
@@ -236,7 +246,7 @@ const classes = {
|
|
236
246
|
'p-tree-selectable': instance.selectionMode != null,
|
237
247
|
'p-tree-loading': instance.loading,
|
238
248
|
'p-tree-flex-scrollable': instance.scrollHeight === 'flex',
|
239
|
-
'p-tree-node-
|
249
|
+
'p-tree-node-dragover': instance.dragHover
|
240
250
|
}),
|
241
251
|
mask: 'p-tree-mask p-overlay-mask',
|
242
252
|
loadingIcon: 'p-tree-loading-icon',
|
@@ -248,7 +258,7 @@ const classes = {
|
|
248
258
|
'p-tree-node-content': true,
|
249
259
|
[instance.styleClass]: !!instance.styleClass,
|
250
260
|
'p-tree-node-selectable': instance.selectable,
|
251
|
-
'p-tree-node-dragover': instance.
|
261
|
+
'p-tree-node-dragover': instance.draghoverNode,
|
252
262
|
'p-tree-node-selected': instance.selectionMode === 'checkbox' && instance.tree.highlightOnSelect ? instance.checked : instance.selected
|
253
263
|
}),
|
254
264
|
nodeToggleButton: 'p-tree-node-toggle-button',
|
@@ -338,13 +348,12 @@ var TreeClasses;
|
|
338
348
|
})(TreeClasses || (TreeClasses = {}));
|
339
349
|
|
340
350
|
const _c0 = a0 => ({ height: a0 });
|
341
|
-
const _c1 = a0 => ({ "p-
|
351
|
+
const _c1 = a0 => ({ "p-tree-node-droppoint-active": a0 });
|
342
352
|
const _c2 = a0 => ({ $implicit: a0 });
|
343
353
|
const _c3 = (a0, a1) => ({ $implicit: a0, partialSelected: a1, class: "p-tree-node-checkbox" });
|
344
|
-
const _c4 = a0 => ({ "p-tree-node-droppoint-active": a0 });
|
345
354
|
function UITreeNode_Conditional_0_li_0_Template(rf, ctx) { if (rf & 1) {
|
346
355
|
const _r2 = i0.ɵɵgetCurrentView();
|
347
|
-
i0.ɵɵelementStart(0, "li",
|
356
|
+
i0.ɵɵelementStart(0, "li", 11);
|
348
357
|
i0.ɵɵlistener("drop", function UITreeNode_Conditional_0_li_0_Template_li_drop_0_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onDropPoint($event, -1)); })("dragover", function UITreeNode_Conditional_0_li_0_Template_li_dragover_0_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onDropPointDragOver($event)); })("dragenter", function UITreeNode_Conditional_0_li_0_Template_li_dragenter_0_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onDropPointDragEnter($event, -1)); })("dragleave", function UITreeNode_Conditional_0_li_0_Template_li_dragleave_0_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onDropPointDragLeave($event)); });
|
349
358
|
i0.ɵɵelementEnd();
|
350
359
|
} if (rf & 2) {
|
@@ -353,18 +362,18 @@ function UITreeNode_Conditional_0_li_0_Template(rf, ctx) { if (rf & 1) {
|
|
353
362
|
i0.ɵɵattribute("aria-hidden", true);
|
354
363
|
} }
|
355
364
|
function UITreeNode_Conditional_0_ng_container_4_ng_container_1_ChevronRightIcon_1_Template(rf, ctx) { if (rf & 1) {
|
356
|
-
i0.ɵɵelement(0, "ChevronRightIcon",
|
365
|
+
i0.ɵɵelement(0, "ChevronRightIcon", 13);
|
357
366
|
} if (rf & 2) {
|
358
367
|
i0.ɵɵproperty("styleClass", "p-tree-node-toggle-icon");
|
359
368
|
} }
|
360
369
|
function UITreeNode_Conditional_0_ng_container_4_ng_container_1_ChevronDownIcon_2_Template(rf, ctx) { if (rf & 1) {
|
361
|
-
i0.ɵɵelement(0, "ChevronDownIcon",
|
370
|
+
i0.ɵɵelement(0, "ChevronDownIcon", 13);
|
362
371
|
} if (rf & 2) {
|
363
372
|
i0.ɵɵproperty("styleClass", "p-tree-node-toggle-icon");
|
364
373
|
} }
|
365
374
|
function UITreeNode_Conditional_0_ng_container_4_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
366
375
|
i0.ɵɵelementContainerStart(0);
|
367
|
-
i0.ɵɵtemplate(1, UITreeNode_Conditional_0_ng_container_4_ng_container_1_ChevronRightIcon_1_Template, 1, 1, "ChevronRightIcon",
|
376
|
+
i0.ɵɵtemplate(1, UITreeNode_Conditional_0_ng_container_4_ng_container_1_ChevronRightIcon_1_Template, 1, 1, "ChevronRightIcon", 12)(2, UITreeNode_Conditional_0_ng_container_4_ng_container_1_ChevronDownIcon_2_Template, 1, 1, "ChevronDownIcon", 12);
|
368
377
|
i0.ɵɵelementContainerEnd();
|
369
378
|
} if (rf & 2) {
|
370
379
|
const ctx_r2 = i0.ɵɵnextContext(3);
|
@@ -375,7 +384,7 @@ function UITreeNode_Conditional_0_ng_container_4_ng_container_1_Template(rf, ctx
|
|
375
384
|
} }
|
376
385
|
function UITreeNode_Conditional_0_ng_container_4_ng_container_2_Template(rf, ctx) { if (rf & 1) {
|
377
386
|
i0.ɵɵelementContainerStart(0);
|
378
|
-
i0.ɵɵelement(1, "SpinnerIcon",
|
387
|
+
i0.ɵɵelement(1, "SpinnerIcon", 13);
|
379
388
|
i0.ɵɵelementContainerEnd();
|
380
389
|
} if (rf & 2) {
|
381
390
|
i0.ɵɵadvance();
|
@@ -397,8 +406,8 @@ function UITreeNode_Conditional_0_span_5_1_Template(rf, ctx) { if (rf & 1) {
|
|
397
406
|
i0.ɵɵtemplate(0, UITreeNode_Conditional_0_span_5_1_ng_template_0_Template, 0, 0, "ng-template");
|
398
407
|
} }
|
399
408
|
function UITreeNode_Conditional_0_span_5_Template(rf, ctx) { if (rf & 1) {
|
400
|
-
i0.ɵɵelementStart(0, "span",
|
401
|
-
i0.ɵɵtemplate(1, UITreeNode_Conditional_0_span_5_1_Template, 1, 0, null,
|
409
|
+
i0.ɵɵelementStart(0, "span", 14);
|
410
|
+
i0.ɵɵtemplate(1, UITreeNode_Conditional_0_span_5_1_Template, 1, 0, null, 15);
|
402
411
|
i0.ɵɵelementEnd();
|
403
412
|
} if (rf & 2) {
|
404
413
|
const ctx_r2 = i0.ɵɵnextContext(2);
|
@@ -410,7 +419,7 @@ function UITreeNode_Conditional_0_p_checkbox_6_ng_container_1_ng_template_1_0_Te
|
|
410
419
|
i0.ɵɵtemplate(0, UITreeNode_Conditional_0_p_checkbox_6_ng_container_1_ng_template_1_0_ng_template_0_Template, 0, 0, "ng-template");
|
411
420
|
} }
|
412
421
|
function UITreeNode_Conditional_0_p_checkbox_6_ng_container_1_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
413
|
-
i0.ɵɵtemplate(0, UITreeNode_Conditional_0_p_checkbox_6_ng_container_1_ng_template_1_0_Template, 1, 0, null,
|
422
|
+
i0.ɵɵtemplate(0, UITreeNode_Conditional_0_p_checkbox_6_ng_container_1_ng_template_1_0_Template, 1, 0, null, 15);
|
414
423
|
} if (rf & 2) {
|
415
424
|
const ctx_r2 = i0.ɵɵnextContext(4);
|
416
425
|
i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.tree.checkboxiconTemplate)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c3, ctx_r2.isSelected(), ctx_r2.node.partialSelected));
|
@@ -421,7 +430,7 @@ function UITreeNode_Conditional_0_p_checkbox_6_ng_container_1_Template(rf, ctx)
|
|
421
430
|
i0.ɵɵelementContainerEnd();
|
422
431
|
} }
|
423
432
|
function UITreeNode_Conditional_0_p_checkbox_6_Template(rf, ctx) { if (rf & 1) {
|
424
|
-
i0.ɵɵelementStart(0, "p-checkbox",
|
433
|
+
i0.ɵɵelementStart(0, "p-checkbox", 16);
|
425
434
|
i0.ɵɵtemplate(1, UITreeNode_Conditional_0_p_checkbox_6_ng_container_1_Template, 3, 0, "ng-container", 5);
|
426
435
|
i0.ɵɵelementEnd();
|
427
436
|
} if (rf & 2) {
|
@@ -451,15 +460,15 @@ function UITreeNode_Conditional_0_span_10_ng_container_1_Template(rf, ctx) { if
|
|
451
460
|
} }
|
452
461
|
function UITreeNode_Conditional_0_span_10_Template(rf, ctx) { if (rf & 1) {
|
453
462
|
i0.ɵɵelementStart(0, "span");
|
454
|
-
i0.ɵɵtemplate(1, UITreeNode_Conditional_0_span_10_ng_container_1_Template, 1, 0, "ng-container",
|
463
|
+
i0.ɵɵtemplate(1, UITreeNode_Conditional_0_span_10_ng_container_1_Template, 1, 0, "ng-container", 15);
|
455
464
|
i0.ɵɵelementEnd();
|
456
465
|
} if (rf & 2) {
|
457
466
|
const ctx_r2 = i0.ɵɵnextContext(2);
|
458
467
|
i0.ɵɵadvance();
|
459
|
-
i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.tree.
|
468
|
+
i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.tree.getTemplateForNode(ctx_r2.node))("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c2, ctx_r2.node));
|
460
469
|
} }
|
461
470
|
function UITreeNode_Conditional_0_ul_11_p_treeNode_1_Template(rf, ctx) { if (rf & 1) {
|
462
|
-
i0.ɵɵelement(0, "p-treeNode",
|
471
|
+
i0.ɵɵelement(0, "p-treeNode", 19);
|
463
472
|
} if (rf & 2) {
|
464
473
|
const childNode_r4 = ctx.$implicit;
|
465
474
|
const firstChild_r5 = ctx.first;
|
@@ -469,23 +478,23 @@ function UITreeNode_Conditional_0_ul_11_p_treeNode_1_Template(rf, ctx) { if (rf
|
|
469
478
|
i0.ɵɵproperty("node", childNode_r4)("parentNode", ctx_r2.node)("firstChild", firstChild_r5)("lastChild", lastChild_r6)("index", index_r7)("itemSize", ctx_r2.itemSize)("level", ctx_r2.level + 1)("loadingMode", ctx_r2.loadingMode);
|
470
479
|
} }
|
471
480
|
function UITreeNode_Conditional_0_ul_11_Template(rf, ctx) { if (rf & 1) {
|
472
|
-
i0.ɵɵelementStart(0, "ul",
|
473
|
-
i0.ɵɵtemplate(1, UITreeNode_Conditional_0_ul_11_p_treeNode_1_Template, 1, 8, "p-treeNode",
|
481
|
+
i0.ɵɵelementStart(0, "ul", 17);
|
482
|
+
i0.ɵɵtemplate(1, UITreeNode_Conditional_0_ul_11_p_treeNode_1_Template, 1, 8, "p-treeNode", 18);
|
474
483
|
i0.ɵɵelementEnd();
|
475
484
|
} if (rf & 2) {
|
476
485
|
const ctx_r2 = i0.ɵɵnextContext(2);
|
477
486
|
i0.ɵɵstyleProp("display", ctx_r2.node.expanded ? "block" : "none");
|
478
487
|
i0.ɵɵadvance();
|
479
|
-
i0.ɵɵproperty("ngForOf", ctx_r2.node.children)("ngForTrackBy", ctx_r2.tree.trackBy);
|
488
|
+
i0.ɵɵproperty("ngForOf", ctx_r2.node.children)("ngForTrackBy", ctx_r2.tree.trackBy.bind(ctx_r2));
|
480
489
|
} }
|
481
490
|
function UITreeNode_Conditional_0_li_12_Template(rf, ctx) { if (rf & 1) {
|
482
491
|
const _r8 = i0.ɵɵgetCurrentView();
|
483
|
-
i0.ɵɵelementStart(0, "li",
|
492
|
+
i0.ɵɵelementStart(0, "li", 11);
|
484
493
|
i0.ɵɵlistener("drop", function UITreeNode_Conditional_0_li_12_Template_li_drop_0_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onDropPoint($event, 1)); })("dragover", function UITreeNode_Conditional_0_li_12_Template_li_dragover_0_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onDropPointDragOver($event)); })("dragenter", function UITreeNode_Conditional_0_li_12_Template_li_dragenter_0_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onDropPointDragEnter($event, 1)); })("dragleave", function UITreeNode_Conditional_0_li_12_Template_li_dragleave_0_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onDropPointDragLeave($event)); });
|
485
494
|
i0.ɵɵelementEnd();
|
486
495
|
} if (rf & 2) {
|
487
496
|
const ctx_r2 = i0.ɵɵnextContext(2);
|
488
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(2,
|
497
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(2, _c1, ctx_r2.draghoverNext));
|
489
498
|
i0.ɵɵattribute("aria-hidden", true);
|
490
499
|
} }
|
491
500
|
function UITreeNode_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
@@ -505,7 +514,7 @@ function UITreeNode_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
505
514
|
i0.ɵɵelementEnd()();
|
506
515
|
i0.ɵɵtemplate(11, UITreeNode_Conditional_0_ul_11_Template, 2, 4, "ul", 10);
|
507
516
|
i0.ɵɵelementEnd();
|
508
|
-
i0.ɵɵtemplate(12, UITreeNode_Conditional_0_li_12_Template, 1, 4, "li",
|
517
|
+
i0.ɵɵtemplate(12, UITreeNode_Conditional_0_li_12_Template, 1, 4, "li", 1);
|
509
518
|
} if (rf & 2) {
|
510
519
|
const ctx_r2 = i0.ɵɵnextContext();
|
511
520
|
i0.ɵɵproperty("ngIf", ctx_r2.tree.droppableNodes);
|
@@ -527,27 +536,27 @@ function UITreeNode_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
527
536
|
i0.ɵɵadvance();
|
528
537
|
i0.ɵɵproperty("ngIf", ctx_r2.node.icon || ctx_r2.node.expandedIcon || ctx_r2.node.collapsedIcon);
|
529
538
|
i0.ɵɵadvance(2);
|
530
|
-
i0.ɵɵproperty("ngIf", !ctx_r2.tree.
|
539
|
+
i0.ɵɵproperty("ngIf", !ctx_r2.tree.getTemplateForNode(ctx_r2.node));
|
531
540
|
i0.ɵɵadvance();
|
532
|
-
i0.ɵɵproperty("ngIf", ctx_r2.tree.
|
541
|
+
i0.ɵɵproperty("ngIf", ctx_r2.tree.getTemplateForNode(ctx_r2.node));
|
533
542
|
i0.ɵɵadvance();
|
534
543
|
i0.ɵɵproperty("ngIf", !ctx_r2.tree.virtualScroll && ctx_r2.node.children && ctx_r2.node.expanded);
|
535
544
|
i0.ɵɵadvance();
|
536
545
|
i0.ɵɵproperty("ngIf", ctx_r2.tree.droppableNodes && ctx_r2.lastChild);
|
537
546
|
} }
|
538
|
-
const
|
539
|
-
const
|
540
|
-
const
|
541
|
-
const
|
542
|
-
const
|
543
|
-
const
|
544
|
-
const
|
545
|
-
const
|
546
|
-
const
|
547
|
-
const
|
548
|
-
const
|
549
|
-
const
|
550
|
-
const
|
547
|
+
const _c4 = ["filter"];
|
548
|
+
const _c5 = ["node"];
|
549
|
+
const _c6 = ["header"];
|
550
|
+
const _c7 = ["footer"];
|
551
|
+
const _c8 = ["loader"];
|
552
|
+
const _c9 = ["empty"];
|
553
|
+
const _c10 = ["togglericon"];
|
554
|
+
const _c11 = ["checkboxicon"];
|
555
|
+
const _c12 = ["loadingicon"];
|
556
|
+
const _c13 = ["filtericon"];
|
557
|
+
const _c14 = ["scroller"];
|
558
|
+
const _c15 = ["wrapper"];
|
559
|
+
const _c16 = a0 => ({ options: a0 });
|
551
560
|
function Tree_div_1_i_1_Template(rf, ctx) { if (rf & 1) {
|
552
561
|
i0.ɵɵelement(0, "i");
|
553
562
|
} if (rf & 2) {
|
@@ -685,7 +694,7 @@ function Tree_ng_container_5_p_scroller_1_ng_container_4_ng_template_1_Template(
|
|
685
694
|
} if (rf & 2) {
|
686
695
|
const scrollerOptions_r11 = ctx.options;
|
687
696
|
const ctx_r0 = i0.ɵɵnextContext(4);
|
688
|
-
i0.ɵɵproperty("ngTemplateOutlet", ctx_r0.loaderTemplate)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2,
|
697
|
+
i0.ɵɵproperty("ngTemplateOutlet", ctx_r0.loaderTemplate)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c16, scrollerOptions_r11));
|
689
698
|
} }
|
690
699
|
function Tree_ng_container_5_p_scroller_1_ng_container_4_Template(rf, ctx) { if (rf & 1) {
|
691
700
|
i0.ɵɵelementContainerStart(0);
|
@@ -723,7 +732,7 @@ function Tree_ng_container_5_ng_container_2_ul_3_Template(rf, ctx) { if (rf & 1)
|
|
723
732
|
const ctx_r0 = i0.ɵɵnextContext(3);
|
724
733
|
i0.ɵɵattribute("aria-label", ctx_r0.ariaLabel)("aria-labelledby", ctx_r0.ariaLabelledBy);
|
725
734
|
i0.ɵɵadvance();
|
726
|
-
i0.ɵɵproperty("ngForOf", ctx_r0.getRootNode())("ngForTrackBy", ctx_r0.trackBy);
|
735
|
+
i0.ɵɵproperty("ngForOf", ctx_r0.getRootNode())("ngForTrackBy", ctx_r0.trackBy.bind(ctx_r0));
|
727
736
|
} }
|
728
737
|
function Tree_ng_container_5_ng_container_2_Template(rf, ctx) { if (rf & 1) {
|
729
738
|
i0.ɵɵelementContainerStart(0);
|
@@ -776,7 +785,7 @@ function Tree_ng_container_7_Template(rf, ctx) { if (rf & 1) {
|
|
776
785
|
i0.ɵɵelementContainer(0);
|
777
786
|
} }
|
778
787
|
class UITreeNode extends BaseComponent {
|
779
|
-
static ICON_CLASS = 'p-
|
788
|
+
static ICON_CLASS = 'p-tree-node-icon ';
|
780
789
|
rowNode;
|
781
790
|
node;
|
782
791
|
parentNode;
|
@@ -1142,7 +1151,7 @@ class UITreeNode extends BaseComponent {
|
|
1142
1151
|
event.preventDefault();
|
1143
1152
|
}
|
1144
1153
|
setAllNodesTabIndexes() {
|
1145
|
-
const nodes = find(this.tree.el.nativeElement, '.p-
|
1154
|
+
const nodes = find(this.tree.el.nativeElement, '.p-tree-node');
|
1146
1155
|
const hasSelectedNode = [...nodes].some((node) => node.getAttribute('aria-selected') === 'true' || node.getAttribute('aria-checked') === 'true');
|
1147
1156
|
[...nodes].forEach((node) => {
|
1148
1157
|
node.tabIndex = -1;
|
@@ -1178,7 +1187,7 @@ class UITreeNode extends BaseComponent {
|
|
1178
1187
|
}
|
1179
1188
|
}
|
1180
1189
|
findLastVisibleDescendant(nodeElement) {
|
1181
|
-
const listElement = Array.from(nodeElement.children).find((el) => hasClass(el, 'p-
|
1190
|
+
const listElement = Array.from(nodeElement.children).find((el) => hasClass(el, 'p-tree-node'));
|
1182
1191
|
const childrenListElement = listElement?.children[1];
|
1183
1192
|
if (childrenListElement && childrenListElement.children.length > 0) {
|
1184
1193
|
const lastChildElement = childrenListElement.children[childrenListElement.children.length - 1];
|
@@ -1210,7 +1219,7 @@ class UITreeNode extends BaseComponent {
|
|
1210
1219
|
}, 1);
|
1211
1220
|
}
|
1212
1221
|
static ɵfac = /*@__PURE__*/ (() => { let ɵUITreeNode_BaseFactory; return function UITreeNode_Factory(__ngFactoryType__) { return (ɵUITreeNode_BaseFactory || (ɵUITreeNode_BaseFactory = i0.ɵɵgetInheritedFactory(UITreeNode)))(__ngFactoryType__ || UITreeNode); }; })();
|
1213
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UITreeNode, selectors: [["p-treeNode"]], inputs: { rowNode: "rowNode", node: "node", parentNode: "parentNode", root: [2, "root", "root", booleanAttribute], index: [2, "index", "index", numberAttribute], firstChild: [2, "firstChild", "firstChild", booleanAttribute], lastChild: [2, "lastChild", "lastChild", booleanAttribute], level: [2, "level", "level", numberAttribute], indentation: [2, "indentation", "indentation", numberAttribute], itemSize: [2, "itemSize", "itemSize", numberAttribute], loadingMode: "loadingMode" }, standalone: true, features: [i0.ɵɵInputTransformsFeature, i0.ɵɵInheritDefinitionFeature, i0.ɵɵStandaloneFeature], decls: 1, vars: 1, consts: [["icon", ""], ["class", "p-
|
1222
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UITreeNode, selectors: [["p-treeNode"]], inputs: { rowNode: "rowNode", node: "node", parentNode: "parentNode", root: [2, "root", "root", booleanAttribute], index: [2, "index", "index", numberAttribute], firstChild: [2, "firstChild", "firstChild", booleanAttribute], lastChild: [2, "lastChild", "lastChild", booleanAttribute], level: [2, "level", "level", numberAttribute], indentation: [2, "indentation", "indentation", numberAttribute], itemSize: [2, "itemSize", "itemSize", numberAttribute], loadingMode: "loadingMode" }, standalone: true, features: [i0.ɵɵInputTransformsFeature, i0.ɵɵInheritDefinitionFeature, i0.ɵɵStandaloneFeature], decls: 1, vars: 1, consts: [["icon", ""], ["class", "p-tree-node-droppoint", 3, "ngClass", "drop", "dragover", "dragenter", "dragleave", 4, "ngIf"], ["role", "treeitem", 3, "keydown", "ngClass", "ngStyle"], [3, "click", "contextmenu", "touchend", "drop", "dragover", "dragenter", "dragleave", "dragstart", "dragend", "ngClass", "draggable"], ["type", "button", "pRipple", "", "tabindex", "-1", 1, "p-tree-node-toggle-button", 3, "click"], [4, "ngIf"], ["class", "p-tree-node-toggle-icon", 4, "ngIf"], ["styleClass", "p-tree-node-checkbox", 3, "ngModel", "binary", "indeterminate", "disabled", "variant", "tabindex", 4, "ngIf"], [3, "class", 4, "ngIf"], [1, "p-tree-node-label"], ["class", "p-tree-node-children", "style", "display: none;", "role", "group", 3, "display", 4, "ngIf"], [1, "p-tree-node-droppoint", 3, "drop", "dragover", "dragenter", "dragleave", "ngClass"], [3, "styleClass", 4, "ngIf"], [3, "styleClass"], [1, "p-tree-node-toggle-icon"], [4, "ngTemplateOutlet", "ngTemplateOutletContext"], ["styleClass", "p-tree-node-checkbox", 3, "ngModel", "binary", "indeterminate", "disabled", "variant", "tabindex"], ["role", "group", 1, "p-tree-node-children", 2, "display", "none"], [3, "node", "parentNode", "firstChild", "lastChild", "index", "itemSize", "level", "loadingMode", 4, "ngFor", "ngForOf", "ngForTrackBy"], [3, "node", "parentNode", "firstChild", "lastChild", "index", "itemSize", "level", "loadingMode"]], template: function UITreeNode_Template(rf, ctx) { if (rf & 1) {
|
1214
1223
|
i0.ɵɵtemplate(0, UITreeNode_Conditional_0_Template, 13, 29);
|
1215
1224
|
} if (rf & 2) {
|
1216
1225
|
i0.ɵɵconditional(ctx.node ? 0 : -1);
|
@@ -1226,9 +1235,9 @@ class UITreeNode extends BaseComponent {
|
|
1226
1235
|
@if (node) {
|
1227
1236
|
<li
|
1228
1237
|
*ngIf="tree.droppableNodes"
|
1229
|
-
class="p-
|
1238
|
+
class="p-tree-node-droppoint"
|
1230
1239
|
[attr.aria-hidden]="true"
|
1231
|
-
[ngClass]="{ 'p-
|
1240
|
+
[ngClass]="{ 'p-tree-node-droppoint-active': draghoverPrev }"
|
1232
1241
|
(drop)="onDropPoint($event, -1)"
|
1233
1242
|
(dragover)="onDropPointDragOver($event)"
|
1234
1243
|
(dragenter)="onDropPointDragEnter($event, -1)"
|
@@ -1308,15 +1317,15 @@ class UITreeNode extends BaseComponent {
|
|
1308
1317
|
|
1309
1318
|
<span [class]="getIcon()" *ngIf="node.icon || node.expandedIcon || node.collapsedIcon"></span>
|
1310
1319
|
<span class="p-tree-node-label">
|
1311
|
-
<span *ngIf="!tree.
|
1312
|
-
<span *ngIf="tree.
|
1313
|
-
<ng-container *ngTemplateOutlet="tree.
|
1320
|
+
<span *ngIf="!tree.getTemplateForNode(node)">{{ node.label }}</span>
|
1321
|
+
<span *ngIf="tree.getTemplateForNode(node)">
|
1322
|
+
<ng-container *ngTemplateOutlet="tree.getTemplateForNode(node); context: { $implicit: node }"></ng-container>
|
1314
1323
|
</span>
|
1315
1324
|
</span>
|
1316
1325
|
</div>
|
1317
1326
|
<ul class="p-tree-node-children" style="display: none;" *ngIf="!tree.virtualScroll && node.children && node.expanded" [style.display]="node.expanded ? 'block' : 'none'" role="group">
|
1318
1327
|
<p-treeNode
|
1319
|
-
*ngFor="let childNode of node.children; let firstChild = first; let lastChild = last; let index = index; trackBy: tree.trackBy"
|
1328
|
+
*ngFor="let childNode of node.children; let firstChild = first; let lastChild = last; let index = index; trackBy: tree.trackBy.bind(this)"
|
1320
1329
|
[node]="childNode"
|
1321
1330
|
[parentNode]="node"
|
1322
1331
|
[firstChild]="firstChild"
|
@@ -1693,6 +1702,43 @@ class Tree extends BaseComponent {
|
|
1693
1702
|
filterViewChild;
|
1694
1703
|
scroller;
|
1695
1704
|
wrapperViewChild;
|
1705
|
+
_templates;
|
1706
|
+
ngAfterContentInit() {
|
1707
|
+
if (this._templates.length) {
|
1708
|
+
this._templateMap = {};
|
1709
|
+
}
|
1710
|
+
this._templates.forEach((item) => {
|
1711
|
+
switch (item.getType()) {
|
1712
|
+
case 'header':
|
1713
|
+
this.headerTemplate = item.template;
|
1714
|
+
break;
|
1715
|
+
case 'empty':
|
1716
|
+
this.emptymessageTemplate = item.template;
|
1717
|
+
break;
|
1718
|
+
case 'footer':
|
1719
|
+
this.footerTemplate = item.template;
|
1720
|
+
break;
|
1721
|
+
case 'loader':
|
1722
|
+
this.loaderTemplate = item.template;
|
1723
|
+
break;
|
1724
|
+
case 'togglericon':
|
1725
|
+
this.togglericonTemplate = item.template;
|
1726
|
+
break;
|
1727
|
+
case 'checkboxicon':
|
1728
|
+
this.checkboxiconTemplate = item.template;
|
1729
|
+
break;
|
1730
|
+
case 'loadingicon':
|
1731
|
+
this.loadingiconTemplate = item.template;
|
1732
|
+
break;
|
1733
|
+
case 'filtericon':
|
1734
|
+
this.filtericonTemplate = item.template;
|
1735
|
+
break;
|
1736
|
+
default:
|
1737
|
+
this._templateMap[item.name] = item.template;
|
1738
|
+
break;
|
1739
|
+
}
|
1740
|
+
});
|
1741
|
+
}
|
1696
1742
|
serializedValue;
|
1697
1743
|
nodeTouched;
|
1698
1744
|
dragNodeTree;
|
@@ -2243,6 +2289,7 @@ class Tree extends BaseComponent {
|
|
2243
2289
|
}
|
2244
2290
|
static ɵfac = function Tree_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || Tree)(i0.ɵɵdirectiveInject(i3.TreeDragDropService, 8)); };
|
2245
2291
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Tree, selectors: [["p-tree"]], contentQueries: function Tree_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
|
2292
|
+
i0.ɵɵcontentQuery(dirIndex, _c4, 5);
|
2246
2293
|
i0.ɵɵcontentQuery(dirIndex, _c5, 5);
|
2247
2294
|
i0.ɵɵcontentQuery(dirIndex, _c6, 5);
|
2248
2295
|
i0.ɵɵcontentQuery(dirIndex, _c7, 5);
|
@@ -2252,7 +2299,7 @@ class Tree extends BaseComponent {
|
|
2252
2299
|
i0.ɵɵcontentQuery(dirIndex, _c11, 5);
|
2253
2300
|
i0.ɵɵcontentQuery(dirIndex, _c12, 5);
|
2254
2301
|
i0.ɵɵcontentQuery(dirIndex, _c13, 5);
|
2255
|
-
i0.ɵɵcontentQuery(dirIndex,
|
2302
|
+
i0.ɵɵcontentQuery(dirIndex, PrimeTemplate, 4);
|
2256
2303
|
} if (rf & 2) {
|
2257
2304
|
let _t;
|
2258
2305
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.filterTemplate = _t.first);
|
@@ -2265,10 +2312,11 @@ class Tree extends BaseComponent {
|
|
2265
2312
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.checkboxiconTemplate = _t.first);
|
2266
2313
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.loadingiconTemplate = _t.first);
|
2267
2314
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.filtericonTemplate = _t.first);
|
2315
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._templates = _t);
|
2268
2316
|
} }, viewQuery: function Tree_Query(rf, ctx) { if (rf & 1) {
|
2269
|
-
i0.ɵɵviewQuery(
|
2317
|
+
i0.ɵɵviewQuery(_c4, 5);
|
2318
|
+
i0.ɵɵviewQuery(_c14, 5);
|
2270
2319
|
i0.ɵɵviewQuery(_c15, 5);
|
2271
|
-
i0.ɵɵviewQuery(_c16, 5);
|
2272
2320
|
} if (rf & 2) {
|
2273
2321
|
let _t;
|
2274
2322
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.filterViewChild = _t.first);
|
@@ -2373,7 +2421,7 @@ class Tree extends BaseComponent {
|
|
2373
2421
|
<div #wrapper class="p-tree-root" [style.max-height]="scrollHeight">
|
2374
2422
|
<ul class="p-tree-root-children" *ngIf="getRootNode()" role="tree" [attr.aria-label]="ariaLabel" [attr.aria-labelledby]="ariaLabelledBy">
|
2375
2423
|
<p-treeNode
|
2376
|
-
*ngFor="let node of getRootNode(); let firstChild = first; let lastChild = last; let index = index; trackBy: trackBy"
|
2424
|
+
*ngFor="let node of getRootNode(); let firstChild = first; let lastChild = last; let index = index; trackBy: trackBy.bind(this)"
|
2377
2425
|
[node]="node"
|
2378
2426
|
[firstChild]="firstChild"
|
2379
2427
|
[lastChild]="lastChild"
|
@@ -2551,6 +2599,9 @@ class Tree extends BaseComponent {
|
|
2551
2599
|
}], wrapperViewChild: [{
|
2552
2600
|
type: ViewChild,
|
2553
2601
|
args: ['wrapper']
|
2602
|
+
}], _templates: [{
|
2603
|
+
type: ContentChildren,
|
2604
|
+
args: [PrimeTemplate]
|
2554
2605
|
}] }); })();
|
2555
2606
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Tree, { className: "Tree" }); })();
|
2556
2607
|
class TreeModule {
|