@ng-nest/ui 20.0.7 → 20.1.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/auto-complete/index.d.ts +33 -8
- package/base-form/index.d.ts +3 -3
- package/calendar/index.d.ts +1 -2
- package/cascade/index.d.ts +33 -8
- package/checkbox/index.d.ts +3 -3
- package/color-picker/index.d.ts +34 -8
- package/core/index.d.ts +40 -8
- package/date-picker/index.d.ts +57 -12
- package/dropdown/index.d.ts +4 -4
- package/fesm2022/ng-nest-ui-affix.mjs +12 -12
- package/fesm2022/ng-nest-ui-affix.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-alert.mjs +35 -35
- package/fesm2022/ng-nest-ui-alert.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-anchor.mjs +31 -31
- package/fesm2022/ng-nest-ui-anchor.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-api.mjs +7 -7
- package/fesm2022/ng-nest-ui-api.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-auto-complete.mjs +82 -72
- package/fesm2022/ng-nest-ui-auto-complete.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-avatar.mjs +31 -31
- package/fesm2022/ng-nest-ui-avatar.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-back-top.mjs +18 -18
- package/fesm2022/ng-nest-ui-back-top.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-badge.mjs +23 -23
- package/fesm2022/ng-nest-ui-badge.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-base-form.mjs +45 -45
- package/fesm2022/ng-nest-ui-base-form.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-button.mjs +42 -42
- package/fesm2022/ng-nest-ui-button.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-calendar.mjs +20 -20
- package/fesm2022/ng-nest-ui-calendar.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-card.mjs +15 -15
- package/fesm2022/ng-nest-ui-card.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-carousel.mjs +46 -46
- package/fesm2022/ng-nest-ui-carousel.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-cascade.mjs +86 -76
- package/fesm2022/ng-nest-ui-cascade.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-checkbox.mjs +39 -39
- package/fesm2022/ng-nest-ui-checkbox.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-collapse.mjs +31 -31
- package/fesm2022/ng-nest-ui-collapse.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-color-picker.mjs +91 -72
- package/fesm2022/ng-nest-ui-color-picker.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-color.mjs +16 -16
- package/fesm2022/ng-nest-ui-color.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-comment.mjs +21 -21
- package/fesm2022/ng-nest-ui-comment.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-container.mjs +37 -37
- package/fesm2022/ng-nest-ui-container.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-core.mjs +38 -22
- package/fesm2022/ng-nest-ui-core.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-crumb.mjs +13 -13
- package/fesm2022/ng-nest-ui-crumb.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-date-picker.mjs +273 -253
- package/fesm2022/ng-nest-ui-date-picker.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-description.mjs +31 -31
- package/fesm2022/ng-nest-ui-description.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-dialog.mjs +81 -81
- package/fesm2022/ng-nest-ui-dialog.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-doc.mjs +7 -7
- package/fesm2022/ng-nest-ui-doc.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-drag.mjs +10 -10
- package/fesm2022/ng-nest-ui-drag.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-drawer.mjs +42 -42
- package/fesm2022/ng-nest-ui-drawer.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-dropdown.mjs +49 -49
- package/fesm2022/ng-nest-ui-dropdown.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-empty.mjs +12 -12
- package/fesm2022/ng-nest-ui-empty.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-examples.mjs +7 -7
- package/fesm2022/ng-nest-ui-examples.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-find.mjs +79 -77
- package/fesm2022/ng-nest-ui-find.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-form.mjs +33 -33
- package/fesm2022/ng-nest-ui-form.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-highlight.mjs +20 -20
- package/fesm2022/ng-nest-ui-highlight.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-i18n.mjs +15 -15
- package/fesm2022/ng-nest-ui-i18n.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-icon.mjs +21 -21
- package/fesm2022/ng-nest-ui-icon.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-image.mjs +39 -39
- package/fesm2022/ng-nest-ui-image.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-inner.mjs +11 -11
- package/fesm2022/ng-nest-ui-inner.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-input-number.mjs +42 -42
- package/fesm2022/ng-nest-ui-input-number.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-input.mjs +102 -81
- package/fesm2022/ng-nest-ui-input.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-keyword.mjs +15 -15
- package/fesm2022/ng-nest-ui-keyword.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-layout.mjs +31 -31
- package/fesm2022/ng-nest-ui-layout.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-link.mjs +18 -18
- package/fesm2022/ng-nest-ui-link.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-list.mjs +80 -80
- package/fesm2022/ng-nest-ui-list.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-loading.mjs +22 -22
- package/fesm2022/ng-nest-ui-loading.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-menu.mjs +45 -45
- package/fesm2022/ng-nest-ui-menu.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-message-box.mjs +10 -10
- package/fesm2022/ng-nest-ui-message-box.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-message.mjs +10 -10
- package/fesm2022/ng-nest-ui-message.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-notification.mjs +10 -10
- package/fesm2022/ng-nest-ui-notification.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-outlet.mjs +9 -9
- package/fesm2022/ng-nest-ui-outlet.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-page-header.mjs +15 -15
- package/fesm2022/ng-nest-ui-page-header.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-pagination.mjs +53 -53
- package/fesm2022/ng-nest-ui-pagination.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-pattern.mjs +7 -7
- package/fesm2022/ng-nest-ui-pattern.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-popconfirm.mjs +27 -27
- package/fesm2022/ng-nest-ui-popconfirm.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-popover.mjs +38 -38
- package/fesm2022/ng-nest-ui-popover.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-portal.mjs +7 -7
- package/fesm2022/ng-nest-ui-portal.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-progress.mjs +38 -38
- package/fesm2022/ng-nest-ui-progress.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-radio.mjs +36 -36
- package/fesm2022/ng-nest-ui-radio.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-rate.mjs +30 -30
- package/fesm2022/ng-nest-ui-rate.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-resizable.mjs +16 -16
- package/fesm2022/ng-nest-ui-resizable.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-result.mjs +16 -16
- package/fesm2022/ng-nest-ui-result.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-ripple.mjs +13 -13
- package/fesm2022/ng-nest-ui-ripple.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-scrollable.mjs +102 -19
- package/fesm2022/ng-nest-ui-scrollable.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-select.mjs +121 -111
- package/fesm2022/ng-nest-ui-select.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-skeleton.mjs +15 -15
- package/fesm2022/ng-nest-ui-skeleton.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-slider-select.mjs +54 -54
- package/fesm2022/ng-nest-ui-slider-select.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-slider.mjs +39 -39
- package/fesm2022/ng-nest-ui-slider.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-statistic.mjs +30 -30
- package/fesm2022/ng-nest-ui-statistic.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-steps.mjs +19 -19
- package/fesm2022/ng-nest-ui-steps.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-switch.mjs +26 -26
- package/fesm2022/ng-nest-ui-switch.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-table-view.mjs +490 -242
- package/fesm2022/ng-nest-ui-table-view.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-table.mjs +221 -221
- package/fesm2022/ng-nest-ui-table.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tabs.mjs +58 -58
- package/fesm2022/ng-nest-ui-tabs.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tag.mjs +22 -22
- package/fesm2022/ng-nest-ui-tag.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-text-retract.mjs +15 -15
- package/fesm2022/ng-nest-ui-text-retract.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-textarea.mjs +41 -41
- package/fesm2022/ng-nest-ui-textarea.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-theme.mjs +23 -23
- package/fesm2022/ng-nest-ui-theme.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-time-ago.mjs +7 -7
- package/fesm2022/ng-nest-ui-time-ago.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-time-picker.mjs +104 -94
- package/fesm2022/ng-nest-ui-time-picker.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-time-range.mjs +7 -7
- package/fesm2022/ng-nest-ui-time-range.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-timeline.mjs +15 -15
- package/fesm2022/ng-nest-ui-timeline.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tooltip.mjs +38 -38
- package/fesm2022/ng-nest-ui-tooltip.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-transfer.mjs +40 -40
- package/fesm2022/ng-nest-ui-transfer.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tree-file.mjs +28 -28
- package/fesm2022/ng-nest-ui-tree-file.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tree-select.mjs +126 -116
- package/fesm2022/ng-nest-ui-tree-select.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tree.mjs +107 -107
- package/fesm2022/ng-nest-ui-tree.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-typography.mjs +13 -13
- package/fesm2022/ng-nest-ui-typography.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-upload.mjs +37 -37
- package/fesm2022/ng-nest-ui-upload.mjs.map +1 -1
- package/find/index.d.ts +5 -5
- package/form/index.d.ts +1 -1
- package/input/index.d.ts +32 -5
- package/input-number/index.d.ts +5 -5
- package/list/index.d.ts +2 -2
- package/message-box/index.d.ts +4 -5
- package/package.json +20 -20
- package/radio/index.d.ts +3 -3
- package/rate/index.d.ts +5 -5
- package/scrollable/index.d.ts +15 -7
- package/select/index.d.ts +38 -8
- package/slider-select/index.d.ts +3 -3
- package/steps/index.d.ts +1 -2
- package/switch/index.d.ts +3 -3
- package/table-view/index.d.ts +121 -79
- package/textarea/index.d.ts +3 -3
- package/theme/index.d.ts +1 -1
- package/time-picker/index.d.ts +33 -8
- package/transfer/index.d.ts +1 -1
- package/tree-select/index.d.ts +33 -8
- package/upload/index.d.ts +2 -2
|
@@ -40,72 +40,72 @@ class XTreeProperty extends XPropertyFunction(X_TREE_CONFIG_NAME) {
|
|
|
40
40
|
* @zh_CN 节点数据
|
|
41
41
|
* @en_US Node data
|
|
42
42
|
*/
|
|
43
|
-
this.data = input([]);
|
|
43
|
+
this.data = input([], ...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
44
44
|
/**
|
|
45
45
|
* @zh_CN 显示多选框
|
|
46
46
|
* @en_US Show checkbox
|
|
47
47
|
*/
|
|
48
|
-
this.checkbox = input(false, { transform: XToBoolean });
|
|
48
|
+
this.checkbox = input(false, ...(ngDevMode ? [{ debugName: "checkbox", transform: XToBoolean }] : [{ transform: XToBoolean }]));
|
|
49
49
|
/**
|
|
50
50
|
* @zh_CN 开启懒加载节点,data 必须设置成函数类型
|
|
51
51
|
* @en_US Open lazy loading node, data must be set to function type
|
|
52
52
|
*/
|
|
53
|
-
this.lazy = input(false, { transform: XToBoolean });
|
|
53
|
+
this.lazy = input(false, ...(ngDevMode ? [{ debugName: "lazy", transform: XToBoolean }] : [{ transform: XToBoolean }]));
|
|
54
54
|
/**
|
|
55
55
|
* @zh_CN 当前激活的节点 Id, 当 multiple 为 true 时,值为数组(默认是 Id 数组,objectArray 为 true,对象数组)
|
|
56
56
|
* @en_US Currently active node Id. When Multiple is true, the value is the Id array
|
|
57
57
|
*/
|
|
58
|
-
this.activatedId = model(null);
|
|
58
|
+
this.activatedId = model(null, ...(ngDevMode ? [{ debugName: "activatedId" }] : []));
|
|
59
59
|
/**
|
|
60
60
|
* @zh_CN 展开的节点
|
|
61
61
|
* @en_US Expanded node
|
|
62
62
|
*/
|
|
63
|
-
this.expanded = model([]);
|
|
63
|
+
this.expanded = model([], ...(ngDevMode ? [{ debugName: "expanded" }] : []));
|
|
64
64
|
/**
|
|
65
65
|
* @zh_CN checkbox 选中的节点
|
|
66
66
|
* @en_US Checkbox selected node
|
|
67
67
|
*/
|
|
68
|
-
this.checked = model([]);
|
|
68
|
+
this.checked = model([], ...(ngDevMode ? [{ debugName: "checked" }] : []));
|
|
69
69
|
/**
|
|
70
70
|
* @zh_CN 展开所有节点
|
|
71
71
|
* @en_US Expand all nodes
|
|
72
72
|
*/
|
|
73
|
-
this.expandedAll = input(false, { transform: XToBoolean });
|
|
73
|
+
this.expandedAll = input(false, ...(ngDevMode ? [{ debugName: "expandedAll", transform: XToBoolean }] : [{ transform: XToBoolean }]));
|
|
74
74
|
/**
|
|
75
75
|
* @zh_CN 默认展开的层级
|
|
76
76
|
* @en_US Default expanded level
|
|
77
77
|
*/
|
|
78
|
-
this.expandedLevel = input(-1, { transform: XToNumber });
|
|
78
|
+
this.expandedLevel = input(-1, ...(ngDevMode ? [{ debugName: "expandedLevel", transform: XToNumber }] : [{ transform: XToNumber }]));
|
|
79
79
|
/**
|
|
80
80
|
* @zh_CN 点击节点就触发展开/收起的操作,请确保节点上没有其它操作(checkbox、自定义的操作按钮)
|
|
81
81
|
* @en_US Click the node to trigger the expand/collapse operation, please make sure that there are no other operations on the node (checkbox, custom operation button)
|
|
82
82
|
*/
|
|
83
|
-
this.nodeOpen = input(false, { transform: XToBoolean });
|
|
83
|
+
this.nodeOpen = input(false, ...(ngDevMode ? [{ debugName: "nodeOpen", transform: XToBoolean }] : [{ transform: XToBoolean }]));
|
|
84
84
|
/**
|
|
85
85
|
* @zh_CN 单位间距,这个与层级的乘积算出节点的左边距
|
|
86
86
|
* @en_US Unit spacing, the product of this and the level calculates the left margin of the node
|
|
87
87
|
*/
|
|
88
|
-
this.spacing = input(this.config?.spacing ?? '1.5rem', { transform: XToCssPixelValue });
|
|
88
|
+
this.spacing = input(this.config?.spacing ?? '1.5rem', ...(ngDevMode ? [{ debugName: "spacing", transform: XToCssPixelValue }] : [{ transform: XToCssPixelValue }]));
|
|
89
89
|
/**
|
|
90
90
|
* @zh_CN 标签自定义模板
|
|
91
91
|
* @en_US Label custom template
|
|
92
92
|
*/
|
|
93
|
-
this.labelTpl = input();
|
|
93
|
+
this.labelTpl = input(...(ngDevMode ? [undefined, { debugName: "labelTpl" }] : []));
|
|
94
94
|
/**
|
|
95
95
|
* @zh_CN 节点的高度, 默认是自适应高度
|
|
96
96
|
* @en_US The height of the node
|
|
97
97
|
*/
|
|
98
|
-
this.nodeHeight = input(this.config?.nodeHeight ?? '', { transform: XToCssPixelValue });
|
|
98
|
+
this.nodeHeight = input(this.config?.nodeHeight ?? '', ...(ngDevMode ? [{ debugName: "nodeHeight", transform: XToCssPixelValue }] : [{ transform: XToCssPixelValue }]));
|
|
99
99
|
/**
|
|
100
100
|
* @zh_CN 是否允许多次点击一个节点触发多次事件
|
|
101
101
|
* @en_US Whether to allow multiple clicks on a node to trigger multiple events
|
|
102
102
|
*/
|
|
103
|
-
this.allowManyActivated = input(false, { transform: XToBoolean });
|
|
103
|
+
this.allowManyActivated = input(false, ...(ngDevMode ? [{ debugName: "allowManyActivated", transform: XToBoolean }] : [{ transform: XToBoolean }]));
|
|
104
104
|
/**
|
|
105
105
|
* @zh_CN 拖动节点
|
|
106
106
|
* @en_US Drag node
|
|
107
107
|
*/
|
|
108
|
-
this.drag = input(false, { transform: XToBoolean });
|
|
108
|
+
this.drag = input(false, ...(ngDevMode ? [{ debugName: "drag", transform: XToBoolean }] : [{ transform: XToBoolean }]));
|
|
109
109
|
/**
|
|
110
110
|
* @zh_CN 当前点击选中的节点变化的事件
|
|
111
111
|
* @en_US The event of the currently clicked node change
|
|
@@ -120,109 +120,109 @@ class XTreeProperty extends XPropertyFunction(X_TREE_CONFIG_NAME) {
|
|
|
120
120
|
* @zh_CN 如果 data 是函数类型,可以通过此参数控制请求,用于弹框中的表格,弹出后再请求
|
|
121
121
|
* @en_US If data is a function type, you can use this parameter to control the request, which is often used in the form in the pop-up box, and then request it after it pops up
|
|
122
122
|
*/
|
|
123
|
-
this.manual = model(true);
|
|
123
|
+
this.manual = model(true, ...(ngDevMode ? [{ debugName: "manual" }] : []));
|
|
124
124
|
/**
|
|
125
125
|
* @zh_CN checkbox 状态改变触发层级检查
|
|
126
126
|
* @en_US Checkbox status changes trigger level checks
|
|
127
127
|
*/
|
|
128
|
-
this.levelCheck = input(true, { transform: XToBoolean });
|
|
128
|
+
this.levelCheck = input(true, ...(ngDevMode ? [{ debugName: "levelCheck", transform: XToBoolean }] : [{ transform: XToBoolean }]));
|
|
129
129
|
/**
|
|
130
130
|
* @zh_CN 节点内容不换行显示省略号
|
|
131
131
|
* @en_US Show ellipsis without wrapping
|
|
132
132
|
*/
|
|
133
|
-
this.nodeNowrap = input(true, { transform: XToBoolean });
|
|
133
|
+
this.nodeNowrap = input(true, ...(ngDevMode ? [{ debugName: "nodeNowrap", transform: XToBoolean }] : [{ transform: XToBoolean }]));
|
|
134
134
|
/**
|
|
135
135
|
* @zh_CN 节点垂直对齐方式
|
|
136
136
|
* @en_US Show ellipsis without wrapping
|
|
137
137
|
*/
|
|
138
|
-
this.nodeAlignItems = input(this.config?.nodeAlignItems ?? 'center');
|
|
138
|
+
this.nodeAlignItems = input(this.config?.nodeAlignItems ?? 'center', ...(ngDevMode ? [{ debugName: "nodeAlignItems" }] : []));
|
|
139
139
|
/**
|
|
140
140
|
* @zh_CN 树节点操作按钮
|
|
141
141
|
* @en_US Tree node operation buttons
|
|
142
142
|
*/
|
|
143
|
-
this.actions = input([]);
|
|
143
|
+
this.actions = input([], ...(ngDevMode ? [{ debugName: "actions" }] : []));
|
|
144
144
|
/**
|
|
145
145
|
* @zh_CN 滚动区域元素
|
|
146
146
|
* @en_US Rolling area element
|
|
147
147
|
*/
|
|
148
|
-
this.scrollElement = input();
|
|
148
|
+
this.scrollElement = input(...(ngDevMode ? [undefined, { debugName: "scrollElement" }] : []));
|
|
149
149
|
/**
|
|
150
150
|
* @zh_CN 开启虚拟滚动
|
|
151
151
|
* @en_US Turn on virtual scrolling
|
|
152
152
|
*/
|
|
153
|
-
this.virtualScroll = input(this.config?.virtualScroll ?? false, { transform: XToBoolean });
|
|
153
|
+
this.virtualScroll = input(this.config?.virtualScroll ?? false, ...(ngDevMode ? [{ debugName: "virtualScroll", transform: XToBoolean }] : [{ transform: XToBoolean }]));
|
|
154
154
|
/**
|
|
155
155
|
* @zh_CN 滚动区域高度,开启虚拟滚动的时候生效
|
|
156
156
|
* @en_US Rolling area height
|
|
157
157
|
*/
|
|
158
|
-
this.virtualScrollHeight = input(this.config?.virtualScrollHeight ?? '400px', {
|
|
159
|
-
|
|
160
|
-
|
|
158
|
+
this.virtualScrollHeight = input(this.config?.virtualScrollHeight ?? '400px', ...(ngDevMode ? [{ debugName: "virtualScrollHeight", transform: XToCssPixelValue }] : [{
|
|
159
|
+
transform: XToCssPixelValue
|
|
160
|
+
}]));
|
|
161
161
|
/**
|
|
162
162
|
* @zh_CN 虚拟滚动高度自适应指定元素
|
|
163
163
|
* @en_US virtual rolling height follows the specified object
|
|
164
164
|
*/
|
|
165
|
-
this.heightAdaption = input();
|
|
165
|
+
this.heightAdaption = input(...(ngDevMode ? [undefined, { debugName: "heightAdaption" }] : []));
|
|
166
166
|
/**
|
|
167
167
|
* @zh_CN itemSize,对应 cdk scroll 中的参数,开启虚拟滚动才生效
|
|
168
168
|
* @en_US itemSize,corresponding to the parameters in cdk scroll
|
|
169
169
|
*/
|
|
170
|
-
this.itemSize = input(this.config?.itemSize ?? 34, { transform: XToNumber });
|
|
170
|
+
this.itemSize = input(this.config?.itemSize ?? 34, ...(ngDevMode ? [{ debugName: "itemSize", transform: XToNumber }] : [{ transform: XToNumber }]));
|
|
171
171
|
/**
|
|
172
172
|
* @zh_CN 超出可视窗口缓冲区的最小值,对应 cdk scroll 中的参数,开启虚拟滚动才生效
|
|
173
173
|
* @en_US Exceed the minimum value of the visible window buffer, corresponding to the parameters in cdk scroll
|
|
174
174
|
*/
|
|
175
|
-
this.minBufferPx = input(100, { transform: XToNumber });
|
|
175
|
+
this.minBufferPx = input(100, ...(ngDevMode ? [{ debugName: "minBufferPx", transform: XToNumber }] : [{ transform: XToNumber }]));
|
|
176
176
|
/**
|
|
177
177
|
* @zh_CN 渲染新数据缓冲区的像素,对应 cdk scroll 中的参数,开启虚拟滚动才生效
|
|
178
178
|
* @en_US Render the pixels of the new data buffer, corresponding to the parameters in cdk scroll
|
|
179
179
|
*/
|
|
180
|
-
this.maxBufferPx = input(200, { transform: XToNumber });
|
|
180
|
+
this.maxBufferPx = input(200, ...(ngDevMode ? [{ debugName: "maxBufferPx", transform: XToNumber }] : [{ transform: XToNumber }]));
|
|
181
181
|
/**
|
|
182
182
|
* @zh_CN 多选功能,当前激活的节点可以是多个
|
|
183
183
|
* @en_US Multiple choice
|
|
184
184
|
*/
|
|
185
|
-
this.multiple = input(false, { transform: XToBoolean });
|
|
185
|
+
this.multiple = input(false, ...(ngDevMode ? [{ debugName: "multiple", transform: XToBoolean }] : [{ transform: XToBoolean }]));
|
|
186
186
|
/**
|
|
187
187
|
* @zh_CN 当开启多选的时候,activatedId 的值为对象数组
|
|
188
188
|
* @en_US When multiple selection is enabled, the value of activatedId is an array of objects
|
|
189
189
|
*/
|
|
190
|
-
this.objectArray = input(false, { transform: XToBoolean });
|
|
190
|
+
this.objectArray = input(false, ...(ngDevMode ? [{ debugName: "objectArray", transform: XToBoolean }] : [{ transform: XToBoolean }]));
|
|
191
191
|
/**
|
|
192
192
|
* @zh_CN 当开启多选的时候,点击父节点,包含子节点
|
|
193
193
|
* @en_US When selecting multiple options, click on the parent node to include the child nodes
|
|
194
194
|
*/
|
|
195
|
-
this.includeChildren = input(this.config?.includeChildren ?? false, { transform: XToBoolean });
|
|
195
|
+
this.includeChildren = input(this.config?.includeChildren ?? false, ...(ngDevMode ? [{ debugName: "includeChildren", transform: XToBoolean }] : [{ transform: XToBoolean }]));
|
|
196
196
|
/**
|
|
197
197
|
* @zh_CN 关键字高亮,针对下拉树搜索
|
|
198
198
|
* @en_US Keyword highlighting
|
|
199
199
|
*/
|
|
200
|
-
this.keywordText = input();
|
|
200
|
+
this.keywordText = input(...(ngDevMode ? [undefined, { debugName: "keywordText" }] : []));
|
|
201
201
|
/**
|
|
202
202
|
* @zh_CN 匹配关键字区分大小写,针对下拉树搜索
|
|
203
203
|
* @en_US Case-sensitive
|
|
204
204
|
*/
|
|
205
|
-
this.caseSensitive = input(this.config?.caseSensitive ?? true, { transform: XToBoolean });
|
|
205
|
+
this.caseSensitive = input(this.config?.caseSensitive ?? true, ...(ngDevMode ? [{ debugName: "caseSensitive", transform: XToBoolean }] : [{ transform: XToBoolean }]));
|
|
206
206
|
/**
|
|
207
207
|
* @zh_CN 只能选择叶子节点
|
|
208
208
|
* @en_US Only leaf nodes can be selected
|
|
209
209
|
*/
|
|
210
|
-
this.onlyLeaf = input(this.config?.onlyLeaf ?? false, { transform: XToBoolean });
|
|
210
|
+
this.onlyLeaf = input(this.config?.onlyLeaf ?? false, ...(ngDevMode ? [{ debugName: "onlyLeaf", transform: XToBoolean }] : [{ transform: XToBoolean }]));
|
|
211
211
|
/**
|
|
212
212
|
* @zh_CN 展开收起的图标自定义模版
|
|
213
213
|
* @en_US Expand the folded icon custom template
|
|
214
214
|
*/
|
|
215
|
-
this.expandedIcon = input();
|
|
215
|
+
this.expandedIcon = input(...(ngDevMode ? [undefined, { debugName: "expandedIcon" }] : []));
|
|
216
216
|
/**
|
|
217
217
|
* @zh_CN 显示连接线
|
|
218
218
|
* @en_US Show line
|
|
219
219
|
*/
|
|
220
|
-
this.showLine = input(this.config?.showLine ?? false, { transform: XToBoolean });
|
|
220
|
+
this.showLine = input(this.config?.showLine ?? false, ...(ngDevMode ? [{ debugName: "showLine", transform: XToBoolean }] : [{ transform: XToBoolean }]));
|
|
221
221
|
/**
|
|
222
222
|
* @zh_CN 排序属性
|
|
223
223
|
* @en_US Order property
|
|
224
224
|
*/
|
|
225
|
-
this.order = input(this.config?.order ?? X_TREE_ORDER_DEFAULT);
|
|
225
|
+
this.order = input(this.config?.order ?? X_TREE_ORDER_DEFAULT, ...(ngDevMode ? [{ debugName: "order" }] : []));
|
|
226
226
|
/**
|
|
227
227
|
* @zh_CN 节点点击事件
|
|
228
228
|
* @en_US Node click event
|
|
@@ -244,10 +244,10 @@ class XTreeProperty extends XPropertyFunction(X_TREE_CONFIG_NAME) {
|
|
|
244
244
|
*/
|
|
245
245
|
this.nodeDragMoved = output();
|
|
246
246
|
}
|
|
247
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
248
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.
|
|
247
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTreeProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
248
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.2.4", type: XTreeProperty, isStandalone: true, selector: "x-tree-property", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, checkbox: { classPropertyName: "checkbox", publicName: "checkbox", isSignal: true, isRequired: false, transformFunction: null }, lazy: { classPropertyName: "lazy", publicName: "lazy", isSignal: true, isRequired: false, transformFunction: null }, activatedId: { classPropertyName: "activatedId", publicName: "activatedId", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, expandedAll: { classPropertyName: "expandedAll", publicName: "expandedAll", isSignal: true, isRequired: false, transformFunction: null }, expandedLevel: { classPropertyName: "expandedLevel", publicName: "expandedLevel", isSignal: true, isRequired: false, transformFunction: null }, nodeOpen: { classPropertyName: "nodeOpen", publicName: "nodeOpen", isSignal: true, isRequired: false, transformFunction: null }, spacing: { classPropertyName: "spacing", publicName: "spacing", isSignal: true, isRequired: false, transformFunction: null }, labelTpl: { classPropertyName: "labelTpl", publicName: "labelTpl", isSignal: true, isRequired: false, transformFunction: null }, nodeHeight: { classPropertyName: "nodeHeight", publicName: "nodeHeight", isSignal: true, isRequired: false, transformFunction: null }, allowManyActivated: { classPropertyName: "allowManyActivated", publicName: "allowManyActivated", isSignal: true, isRequired: false, transformFunction: null }, drag: { classPropertyName: "drag", publicName: "drag", isSignal: true, isRequired: false, transformFunction: null }, manual: { classPropertyName: "manual", publicName: "manual", isSignal: true, isRequired: false, transformFunction: null }, levelCheck: { classPropertyName: "levelCheck", publicName: "levelCheck", isSignal: true, isRequired: false, transformFunction: null }, nodeNowrap: { classPropertyName: "nodeNowrap", publicName: "nodeNowrap", isSignal: true, isRequired: false, transformFunction: null }, nodeAlignItems: { classPropertyName: "nodeAlignItems", publicName: "nodeAlignItems", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, scrollElement: { classPropertyName: "scrollElement", publicName: "scrollElement", isSignal: true, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: true, isRequired: false, transformFunction: null }, virtualScrollHeight: { classPropertyName: "virtualScrollHeight", publicName: "virtualScrollHeight", isSignal: true, isRequired: false, transformFunction: null }, heightAdaption: { classPropertyName: "heightAdaption", publicName: "heightAdaption", isSignal: true, isRequired: false, transformFunction: null }, itemSize: { classPropertyName: "itemSize", publicName: "itemSize", isSignal: true, isRequired: false, transformFunction: null }, minBufferPx: { classPropertyName: "minBufferPx", publicName: "minBufferPx", isSignal: true, isRequired: false, transformFunction: null }, maxBufferPx: { classPropertyName: "maxBufferPx", publicName: "maxBufferPx", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, objectArray: { classPropertyName: "objectArray", publicName: "objectArray", isSignal: true, isRequired: false, transformFunction: null }, includeChildren: { classPropertyName: "includeChildren", publicName: "includeChildren", isSignal: true, isRequired: false, transformFunction: null }, keywordText: { classPropertyName: "keywordText", publicName: "keywordText", isSignal: true, isRequired: false, transformFunction: null }, caseSensitive: { classPropertyName: "caseSensitive", publicName: "caseSensitive", isSignal: true, isRequired: false, transformFunction: null }, onlyLeaf: { classPropertyName: "onlyLeaf", publicName: "onlyLeaf", isSignal: true, isRequired: false, transformFunction: null }, expandedIcon: { classPropertyName: "expandedIcon", publicName: "expandedIcon", isSignal: true, isRequired: false, transformFunction: null }, showLine: { classPropertyName: "showLine", publicName: "showLine", isSignal: true, isRequired: false, transformFunction: null }, order: { classPropertyName: "order", publicName: "order", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activatedId: "activatedIdChange", expanded: "expandedChange", checked: "checkedChange", activatedChange: "activatedChange", checkboxChange: "checkboxChange", manual: "manualChange", nodeClick: "nodeClick", nodeDragStarted: "nodeDragStarted", nodeDragEnded: "nodeDragEnded", nodeDragMoved: "nodeDragMoved" }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
|
|
249
249
|
}
|
|
250
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
250
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTreeProperty, decorators: [{
|
|
251
251
|
type: Component,
|
|
252
252
|
args: [{ selector: `${XTreePrefix}-property`, template: '' }]
|
|
253
253
|
}] });
|
|
@@ -267,92 +267,92 @@ class XTreeNodeProperty extends XProperty {
|
|
|
267
267
|
* @zh_CN 节点数据
|
|
268
268
|
* @en_US Node data
|
|
269
269
|
*/
|
|
270
|
-
this.node = input({});
|
|
270
|
+
this.node = input({}, ...(ngDevMode ? [{ debugName: "node" }] : []));
|
|
271
271
|
/**
|
|
272
272
|
* @zh_CN 层级
|
|
273
273
|
* @en_US Level
|
|
274
274
|
*/
|
|
275
|
-
this.level = model(0);
|
|
275
|
+
this.level = model(0, ...(ngDevMode ? [{ debugName: "level" }] : []));
|
|
276
276
|
/**
|
|
277
277
|
* @zh_CN 节点的高度
|
|
278
278
|
* @en_US The height of the node
|
|
279
279
|
*/
|
|
280
|
-
this.nodeHeight = model('');
|
|
280
|
+
this.nodeHeight = model('', ...(ngDevMode ? [{ debugName: "nodeHeight" }] : []));
|
|
281
281
|
/**
|
|
282
282
|
* @zh_CN 节点内容不换行显示省略号
|
|
283
283
|
* @en_US Show ellipsis without wrapping
|
|
284
284
|
*/
|
|
285
|
-
this.nodeNowrap = model(false);
|
|
285
|
+
this.nodeNowrap = model(false, ...(ngDevMode ? [{ debugName: "nodeNowrap" }] : []));
|
|
286
286
|
/**
|
|
287
287
|
* @zh_CN 节点垂直对齐方式
|
|
288
288
|
* @en_US Show ellipsis without wrapping
|
|
289
289
|
*/
|
|
290
|
-
this.nodeAlignItems = model('center');
|
|
290
|
+
this.nodeAlignItems = model('center', ...(ngDevMode ? [{ debugName: "nodeAlignItems" }] : []));
|
|
291
291
|
/**
|
|
292
292
|
* @zh_CN 标记为虚拟滚动的节点
|
|
293
293
|
* @en_US Mark as a node of virtual rolling
|
|
294
294
|
*/
|
|
295
|
-
this.virtualScroll = model(false);
|
|
295
|
+
this.virtualScroll = model(false, ...(ngDevMode ? [{ debugName: "virtualScroll" }] : []));
|
|
296
296
|
/**
|
|
297
297
|
* @zh_CN 禁用
|
|
298
298
|
* @en_US Disabled
|
|
299
299
|
*/
|
|
300
|
-
this.disabled = model(false);
|
|
300
|
+
this.disabled = model(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
301
301
|
/**
|
|
302
302
|
* @zh_CN id
|
|
303
303
|
* @en_US Id
|
|
304
304
|
*/
|
|
305
|
-
this.id = model();
|
|
305
|
+
this.id = model(...(ngDevMode ? [undefined, { debugName: "id" }] : []));
|
|
306
306
|
/**
|
|
307
307
|
* @zh_CN pid
|
|
308
308
|
* @en_US pId
|
|
309
309
|
*/
|
|
310
|
-
this.pid = model();
|
|
310
|
+
this.pid = model(...(ngDevMode ? [undefined, { debugName: "pid" }] : []));
|
|
311
311
|
/**
|
|
312
312
|
* @zh_CN 叶子节点
|
|
313
313
|
* @en_US A leaf node
|
|
314
314
|
*/
|
|
315
|
-
this.leaf = model(false);
|
|
315
|
+
this.leaf = model(false, ...(ngDevMode ? [{ debugName: "leaf" }] : []));
|
|
316
316
|
/**
|
|
317
317
|
* @zh_CN 节点的高度
|
|
318
318
|
* @en_US The height of the node
|
|
319
319
|
*/
|
|
320
|
-
this.height = model('');
|
|
320
|
+
this.height = model('', ...(ngDevMode ? [{ debugName: "height" }] : []));
|
|
321
321
|
/**
|
|
322
322
|
* @zh_CN 节点垂直对齐方式
|
|
323
323
|
* @en_US Show ellipsis without wrapping
|
|
324
324
|
*/
|
|
325
|
-
this.alignItems = model();
|
|
325
|
+
this.alignItems = model(...(ngDevMode ? [undefined, { debugName: "alignItems" }] : []));
|
|
326
326
|
/**
|
|
327
327
|
* @zh_CN 节点垂直对齐方式
|
|
328
328
|
* @en_US Show ellipsis without wrapping
|
|
329
329
|
*/
|
|
330
|
-
this.loading = model(false);
|
|
330
|
+
this.loading = model(false, ...(ngDevMode ? [{ debugName: "loading" }] : []));
|
|
331
331
|
/**
|
|
332
332
|
* @zh_CN 展开
|
|
333
333
|
* @en_US open
|
|
334
334
|
*/
|
|
335
|
-
this.open = model(false);
|
|
335
|
+
this.open = model(false, ...(ngDevMode ? [{ debugName: "open" }] : []));
|
|
336
336
|
/**
|
|
337
337
|
* @zh_CN checkbox 是否选中
|
|
338
338
|
* @en_US whether checkbox is selected
|
|
339
339
|
*/
|
|
340
|
-
this.checked = model(false);
|
|
340
|
+
this.checked = model(false, ...(ngDevMode ? [{ debugName: "checked" }] : []));
|
|
341
341
|
/**
|
|
342
342
|
* @zh_CN checkbox 子节点是否有选中的状态
|
|
343
343
|
* @en_US Whether the child node of checkbox is selected
|
|
344
344
|
*/
|
|
345
|
-
this.indeterminate = model(false);
|
|
345
|
+
this.indeterminate = model(false, ...(ngDevMode ? [{ debugName: "indeterminate" }] : []));
|
|
346
346
|
/**
|
|
347
347
|
* @zh_CN 节点名称
|
|
348
348
|
* @en_US The name of the node
|
|
349
349
|
*/
|
|
350
|
-
this.label = model('');
|
|
350
|
+
this.label = model('', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
351
351
|
/**
|
|
352
352
|
* @zh_CN 节点内容不换行显示省略号,优先级高于 tree 参数
|
|
353
353
|
* @en_US Show ellipsis without wrapping, highest priority
|
|
354
354
|
*/
|
|
355
|
-
this.nowrap = model(false);
|
|
355
|
+
this.nowrap = model(false, ...(ngDevMode ? [{ debugName: "nowrap" }] : []));
|
|
356
356
|
/**
|
|
357
357
|
* @zh_CN 节点展开收起事件
|
|
358
358
|
* @en_US Node expansion pack up
|
|
@@ -362,12 +362,12 @@ class XTreeNodeProperty extends XProperty {
|
|
|
362
362
|
* @zh_CN 树节点操作按钮
|
|
363
363
|
* @en_US Tree node operation buttons
|
|
364
364
|
*/
|
|
365
|
-
this.actions = input([]);
|
|
365
|
+
this.actions = input([], ...(ngDevMode ? [{ debugName: "actions" }] : []));
|
|
366
366
|
}
|
|
367
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
368
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.
|
|
367
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTreeNodeProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
368
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.2.4", type: XTreeNodeProperty, isStandalone: true, selector: "x-tree-node-property", inputs: { node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: false, transformFunction: null }, level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null }, nodeHeight: { classPropertyName: "nodeHeight", publicName: "nodeHeight", isSignal: true, isRequired: false, transformFunction: null }, nodeNowrap: { classPropertyName: "nodeNowrap", publicName: "nodeNowrap", isSignal: true, isRequired: false, transformFunction: null }, nodeAlignItems: { classPropertyName: "nodeAlignItems", publicName: "nodeAlignItems", isSignal: true, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, pid: { classPropertyName: "pid", publicName: "pid", isSignal: true, isRequired: false, transformFunction: null }, leaf: { classPropertyName: "leaf", publicName: "leaf", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, alignItems: { classPropertyName: "alignItems", publicName: "alignItems", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, nowrap: { classPropertyName: "nowrap", publicName: "nowrap", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { level: "levelChange", nodeHeight: "nodeHeightChange", nodeNowrap: "nodeNowrapChange", nodeAlignItems: "nodeAlignItemsChange", virtualScroll: "virtualScrollChange", disabled: "disabledChange", id: "idChange", pid: "pidChange", leaf: "leafChange", height: "heightChange", alignItems: "alignItemsChange", loading: "loadingChange", open: "openChange", checked: "checkedChange", indeterminate: "indeterminateChange", label: "labelChange", nowrap: "nowrapChange", toggle: "toggle" }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
|
|
369
369
|
}
|
|
370
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
370
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTreeNodeProperty, decorators: [{
|
|
371
371
|
type: Component,
|
|
372
372
|
args: [{ selector: `${XTreeNodePrefix}-property`, template: '' }]
|
|
373
373
|
}] });
|
|
@@ -463,10 +463,10 @@ class XTreeService {
|
|
|
463
463
|
data.splice(pos === -1 ? index : index + 1, 0, from);
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
467
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
466
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTreeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
467
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTreeService, providedIn: 'root' }); }
|
|
468
468
|
}
|
|
469
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
469
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTreeService, decorators: [{
|
|
470
470
|
type: Injectable,
|
|
471
471
|
args: [{ providedIn: 'root' }]
|
|
472
472
|
}] });
|
|
@@ -478,18 +478,18 @@ class XTreeNodeComponent extends XTreeNodeProperty {
|
|
|
478
478
|
this.nodeMouseenter = output();
|
|
479
479
|
this.rootClass = true;
|
|
480
480
|
this.document = inject(DOCUMENT);
|
|
481
|
-
this.fontSize = computed(() => parseFloat(XComputedStyle(this.document.documentElement, 'font-size')));
|
|
481
|
+
this.fontSize = computed(() => parseFloat(XComputedStyle(this.document.documentElement, 'font-size')), ...(ngDevMode ? [{ debugName: "fontSize" }] : []));
|
|
482
482
|
this.unSubject = new Subject();
|
|
483
483
|
this.showDragIndicator = computed(() => {
|
|
484
484
|
return this.tree.dragging() && this.tree.hoverTreeNode()?.id === this.id();
|
|
485
|
-
});
|
|
485
|
+
}, ...(ngDevMode ? [{ debugName: "showDragIndicator" }] : []));
|
|
486
486
|
this.isChildrenLast = computed(() => {
|
|
487
487
|
let parent = this.tree.nodes().find((x) => x.id === this.pid());
|
|
488
488
|
if (!parent || !parent.children)
|
|
489
489
|
return false;
|
|
490
490
|
const index = parent.children.indexOf(this.node());
|
|
491
491
|
return index + 1 === parent.children.length;
|
|
492
|
-
});
|
|
492
|
+
}, ...(ngDevMode ? [{ debugName: "isChildrenLast" }] : []));
|
|
493
493
|
this.isParentLast = computed(() => {
|
|
494
494
|
let parents = this.treeService.getParents(this.tree.nodes(), this.node());
|
|
495
495
|
if (parents.length <= 1)
|
|
@@ -503,7 +503,7 @@ class XTreeNodeComponent extends XTreeNodeProperty {
|
|
|
503
503
|
return curr;
|
|
504
504
|
});
|
|
505
505
|
return res.reverse();
|
|
506
|
-
});
|
|
506
|
+
}, ...(ngDevMode ? [{ debugName: "isParentLast" }] : []));
|
|
507
507
|
this.verticalLevel = computed(() => {
|
|
508
508
|
if (this.level() > 0) {
|
|
509
509
|
return Array.from({ length: this.level() }).map((_x, index) => index + 1);
|
|
@@ -511,17 +511,17 @@ class XTreeNodeComponent extends XTreeNodeProperty {
|
|
|
511
511
|
else {
|
|
512
512
|
return [];
|
|
513
513
|
}
|
|
514
|
-
});
|
|
514
|
+
}, ...(ngDevMode ? [{ debugName: "verticalLevel" }] : []));
|
|
515
515
|
this.verticalWidth = computed(() => {
|
|
516
516
|
return XToCssPx(this.tree.spacing(), this.fontSize()) / 2;
|
|
517
|
-
});
|
|
518
|
-
this.paddingLeft = computed(() => (this.level() ? this.level() : 0) * XToCssPx(this.tree.spacing(), this.fontSize()));
|
|
517
|
+
}, ...(ngDevMode ? [{ debugName: "verticalWidth" }] : []));
|
|
518
|
+
this.paddingLeft = computed(() => (this.level() ? this.level() : 0) * XToCssPx(this.tree.spacing(), this.fontSize()), ...(ngDevMode ? [{ debugName: "paddingLeft" }] : []));
|
|
519
519
|
this.indicatorWidth = computed(() => {
|
|
520
520
|
if (this.tree.dragPosition() === 0) {
|
|
521
521
|
return `calc(100% - ${this.paddingLeft() + XToCssPx(this.tree.spacing(), this.fontSize()) + (this.leaf() ? this.fontSize() * 1.5 : 0)}px)`;
|
|
522
522
|
}
|
|
523
523
|
return `calc(100% - ${this.paddingLeft() + (this.leaf() ? this.fontSize() * 1.5 : 0)}px)`;
|
|
524
|
-
});
|
|
524
|
+
}, ...(ngDevMode ? [{ debugName: "indicatorWidth" }] : []));
|
|
525
525
|
this.indicatorStyle = computed(() => {
|
|
526
526
|
if (this.tree.dragPosition() === 1) {
|
|
527
527
|
return { bottom: `-${0.0625 * this.fontSize()}px` };
|
|
@@ -535,8 +535,8 @@ class XTreeNodeComponent extends XTreeNodeProperty {
|
|
|
535
535
|
};
|
|
536
536
|
}
|
|
537
537
|
return {};
|
|
538
|
-
});
|
|
539
|
-
this.changed = signal(false);
|
|
538
|
+
}, ...(ngDevMode ? [{ debugName: "indicatorStyle" }] : []));
|
|
539
|
+
this.changed = signal(false, ...(ngDevMode ? [{ debugName: "changed" }] : []));
|
|
540
540
|
this.activated = computed(() => {
|
|
541
541
|
this.changed();
|
|
542
542
|
const activatedId = this.tree.activatedId();
|
|
@@ -551,7 +551,7 @@ class XTreeNodeComponent extends XTreeNodeProperty {
|
|
|
551
551
|
else {
|
|
552
552
|
return activatedId === this.id();
|
|
553
553
|
}
|
|
554
|
-
});
|
|
554
|
+
}, ...(ngDevMode ? [{ debugName: "activated" }] : []));
|
|
555
555
|
this.cdr = inject(ChangeDetectorRef);
|
|
556
556
|
this.treeService = inject(XTreeService);
|
|
557
557
|
this.elementRef = inject(ElementRef);
|
|
@@ -759,10 +759,10 @@ class XTreeNodeComponent extends XTreeNodeProperty {
|
|
|
759
759
|
trackByAction(_index, item) {
|
|
760
760
|
return item.id;
|
|
761
761
|
}
|
|
762
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
763
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: XTreeNodeComponent, isStandalone: true, selector: "x-tree-node, [x-tree-node]", outputs: { nodeMouseenter: "nodeMouseenter" }, host: { listeners: { "mouseenter": "onMouseenter($event)", "mouseleave": "onMouseleave()" }, properties: { "class.x-tree-node": "this.rootClass" } }, usesInheritance: true, ngImport: i0, template: "<div\r\n class=\"x-tree-node-content\"\r\n [class.x-activated]=\"activated()\"\r\n [class.x-disabled]=\"disabled()\"\r\n [class.x-tree-node-sub]=\"!leaf()\"\r\n [class.x-tree-node-last]=\"isChildrenLast()\"\r\n [style.padding-left.px]=\"paddingLeft() + fontSize() / 2\"\r\n [style.height]=\"height() ? height() : nodeHeight() ? nodeHeight() : ''\"\r\n [style.align-items]=\"alignItems() ? alignItems() : nodeAlignItems()\"\r\n (click)=\"!disabled() && onActivate($event, node())\"\r\n>\r\n @if (tree.showLine() && level()! > 0) {\r\n <div class=\"x-tree-node-line\" [style.width.px]=\"paddingLeft()\">\r\n @for (i of verticalLevel(); track i) {\r\n <div\r\n class=\"x-tree-node-line-vertical\"\r\n [hidden]=\"isParentLast()[i - 1]\"\r\n [class.is-last]=\"i === verticalLevel().length\"\r\n [style.left.px]=\"getVerticalLeft(i)\"\r\n ></div>\r\n }\r\n <div\r\n class=\"x-tree-node-line-horizontal\"\r\n [style.width.px]=\"verticalWidth()\"\r\n [style.left.px]=\"getVerticalLeft(verticalLevel().length)\"\r\n ></div>\r\n </div>\r\n }\r\n @if (showDragIndicator()) {\r\n <div class=\"x-tree-node-drag-indicator\" [style.width]=\"indicatorWidth()\" [ngStyle]=\"indicatorStyle()\"></div>\r\n }\r\n @if (loading()) {\r\n <x-icon class=\"x-tree-node-loading\" type=\"fto-loader\" [spin]=\"loading()!\"></x-icon>\r\n } @else {\r\n <div\r\n class=\"x-tree-node-right\"\r\n [class.is-leaf]=\"leaf()\"\r\n [class.is-open]=\"open()\"\r\n [class.is-template]=\"tree.expandedIcon()\"\r\n [style.width.px]=\"verticalWidth() * 2\"\r\n (click)=\"!tree.nodeOpen() && onToggle($event, node())\"\r\n >\r\n @if (!leaf()) {\r\n @if (tree.expandedIcon()) {\r\n <ng-container *xOutlet=\"tree.expandedIcon(); context: { $node: node() }\"></ng-container>\r\n } @else {\r\n <x-icon class=\"x-tree-node-icon\" type=\"fto-chevron-right\"></x-icon>\r\n }\r\n }\r\n </div>\r\n }\r\n @if (tree.checkbox()) {\r\n <x-checkbox\r\n class=\"x-tree-node-checkbox\"\r\n [data]=\"[{ label: '', id: id() }]\"\r\n [(ngModel)]=\"checked\"\r\n (ngModelChange)=\"onCheckboxChange()\"\r\n [indeterminate]=\"indeterminate()!\"\r\n [disabled]=\"disabled()!\"\r\n (click)=\"$event.stopPropagation()\"\r\n single\r\n ></x-checkbox>\r\n }\r\n @if (!tree.labelTpl()) {\r\n <span\r\n class=\"x-tree-node-label\"\r\n [class.nowrap]=\"nowrap() === false || nowrap() === true ? nowrap() : nodeNowrap()\"\r\n [title]=\"label()\"\r\n x-keyword\r\n [text]=\"tree.keywordText()\"\r\n [caseSensitive]=\"tree.caseSensitive()\"\r\n >{{ label() }}</span\r\n >\r\n } @else {\r\n <ng-container *xOutlet=\"tree.labelTpl(); context: { $node: node() }\"></ng-container>\r\n }\r\n <span class=\"x-tree-node-operations\">\r\n @for (action of actions(); track action.id) {\r\n <x-link [icon]=\"action.icon\" [title]=\"action.label\" (click)=\"onAction($event, action, node())\">{{\r\n action.label\r\n }}</x-link>\r\n }\r\n </span>\r\n @if (tree.multiple() && activated()) {\r\n <x-icon class=\"x-tree-node-checked\" type=\"fto-check\"></x-icon>\r\n }\r\n</div>\r\n", styles: ["x-tree-node{display:block}.x-tree-node{display:block}.x-tree-node{margin:0;padding:0}.x-tree-node-content{position:relative;display:flex;border-radius:var(--x-border-radius);margin:.125rem 0;padding-right:.5rem;line-height:var(--x-height-small);cursor:pointer}.x-tree-node-content .x-tree-node-icon,.x-tree-node-content .x-tree-node-right x-icon{padding:.25rem;font-size:1.25rem;transition:var(--x-animation-duration-base)}.x-tree-node-content .x-tree-node-icon:hover,.x-tree-node-content .x-tree-node-right x-icon:hover{color:var(--x-text-200)}.x-tree-node-content .x-tree-node-checkbox{margin-right:.325rem;padding:.25rem 0}.x-tree-node-content.x-disabled{color:var(--x-text-400)}.x-tree-node-content:not(.x-disabled):hover{background-color:var(--x-background-a200)}.x-tree-node-content:not(.x-disabled):hover .x-tree-node-operations{display:flex;align-items:center}.x-tree-node-content:not(.x-disabled).x-activated{background-color:var(--x-primary-900);color:var(--x-primary)}.x-tree-node-content:not(.x-disabled).x-tree-node-checked{color:var(--x-primary)}.x-tree-node x-icon.x-tree-node-loading{padding:.2rem;font-size:1.25rem;color:var(--x-text-300)}.x-tree-node-right{display:flex;align-items:center;justify-content:center;margin-right:.125rem}.x-tree-node-right.is-leaf{visibility:hidden}.x-tree-node-right.is-open:not(.is-template) x-icon{transform:rotate(90deg)}.x-tree-node-line{position:absolute;left:.5rem;height:calc(100% + .25rem);display:flex;align-items:center;justify-content:space-between}.x-tree-node-line-vertical{position:absolute;height:100%;border-right:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-tree-node-line-horizontal{position:absolute;border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-tree-node-last .x-tree-node-line-vertical.is-last{height:50%;top:0}.x-tree-node-operations{display:none}.x-tree-node-operations .x-link{padding:0 .125rem}.x-tree-node-label{flex:1;-webkit-user-select:none;user-select:none}.x-tree-node-label.nowrap{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.x-tree-node-drag-indicator{position:absolute;height:.0625rem;border-radius:var(--x-border-radius);background-color:var(--x-primary);right:0;z-index:1}.x-tree-node-drag-indicator:before{position:absolute;top:-.125rem;left:-.2625rem;width:.325rem;height:.325rem;background-color:transparent;border-color:var(--x-primary);border-style:solid;border-width:.0625rem .0625rem 0 0;content:\" \";transform:rotate(45deg)}body>x-tree-node{display:block}body>x-tree-node.cdk-drag-preview .x-tree-node-content{position:relative;display:flex;border-radius:var(--x-border-radius);margin:.125rem 0;padding-right:.5rem;line-height:var(--x-height-small);cursor:pointer}body>x-tree-node.cdk-drag-preview .x-tree-node-content .x-tree-node-icon,body>x-tree-node.cdk-drag-preview .x-tree-node-content .x-tree-node-right x-icon{padding:.25rem;font-size:1.25rem;transition:var(--x-animation-duration-base)}body>x-tree-node.cdk-drag-preview .x-tree-node-content .x-tree-node-icon:hover,body>x-tree-node.cdk-drag-preview .x-tree-node-content .x-tree-node-right x-icon:hover{color:var(--x-text-200)}body>x-tree-node.cdk-drag-preview .x-tree-node-content .x-tree-node-checkbox{margin-right:.325rem;padding:.25rem 0}body>x-tree-node.cdk-drag-preview .x-tree-node-content.x-disabled{color:var(--x-text-400)}body>x-tree-node.cdk-drag-preview .x-tree-node-content:not(.x-disabled):hover{background-color:var(--x-background-a200)}body>x-tree-node.cdk-drag-preview .x-tree-node-content:not(.x-disabled):hover .x-tree-node-operations{display:flex;align-items:center}body>x-tree-node.cdk-drag-preview .x-tree-node-content:not(.x-disabled).x-activated{background-color:var(--x-primary-900);color:var(--x-primary)}body>x-tree-node.cdk-drag-preview .x-tree-node-content:not(.x-disabled).x-tree-node-checked{color:var(--x-primary)}body>x-tree-node.cdk-drag-preview .x-tree-node x-icon.x-tree-node-loading{padding:.2rem;font-size:1.25rem;color:var(--x-text-300)}body>x-tree-node.cdk-drag-preview .x-tree-node-right{display:flex;align-items:center;justify-content:center;margin-right:.125rem}body>x-tree-node.cdk-drag-preview .x-tree-node-right.is-leaf{visibility:hidden}body>x-tree-node.cdk-drag-preview .x-tree-node-right.is-open:not(.is-template) x-icon{transform:rotate(90deg)}body>x-tree-node.cdk-drag-preview .x-tree-node-line{position:absolute;left:.5rem;height:calc(100% + .25rem);display:flex;align-items:center;justify-content:space-between}body>x-tree-node.cdk-drag-preview .x-tree-node-line-vertical{position:absolute;height:100%;border-right:var(--x-border-width) var(--x-border-style) var(--x-border)}body>x-tree-node.cdk-drag-preview .x-tree-node-line-horizontal{position:absolute;border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border)}body>x-tree-node.cdk-drag-preview .x-tree-node-last .x-tree-node-line-vertical.is-last{height:50%;top:0}body>x-tree-node.cdk-drag-preview .x-tree-node-operations{display:none}body>x-tree-node.cdk-drag-preview .x-tree-node-operations .x-link{padding:0 .125rem}body>x-tree-node.cdk-drag-preview .x-tree-node-label{flex:1;-webkit-user-select:none;user-select:none}body>x-tree-node.cdk-drag-preview .x-tree-node-label.nowrap{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}body>x-tree-node.cdk-drag-preview .x-tree-node-drag-indicator{position:absolute;height:.0625rem;border-radius:var(--x-border-radius);background-color:var(--x-primary);right:0;z-index:1}body>x-tree-node.cdk-drag-preview .x-tree-node-drag-indicator:before{position:absolute;top:-.125rem;left:-.2625rem;width:.325rem;height:.325rem;background-color:transparent;border-color:var(--x-primary);border-style:solid;border-width:.0625rem .0625rem 0 0;content:\" \";transform:rotate(45deg)}body>x-tree-node.cdk-drag-preview .x-tree-node-content{border-color:var(--x-border);color:var(--x-text-400);background-color:var(--x-background-a100);opacity:.5}\n"], dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: XIconComponent, selector: "x-icon" }, { kind: "component", type: XCheckboxComponent, selector: "x-checkbox" }, { kind: "directive", type: XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }, { kind: "component", type: XLinkComponent, selector: "x-link" }, { kind: "directive", type: XKeywordDirective, selector: "[x-keyword]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
762
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTreeNodeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
763
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: XTreeNodeComponent, isStandalone: true, selector: "x-tree-node, [x-tree-node]", outputs: { nodeMouseenter: "nodeMouseenter" }, host: { listeners: { "mouseenter": "onMouseenter($event)", "mouseleave": "onMouseleave()" }, properties: { "class.x-tree-node": "this.rootClass" } }, usesInheritance: true, ngImport: i0, template: "<div\r\n class=\"x-tree-node-content\"\r\n [class.x-activated]=\"activated()\"\r\n [class.x-disabled]=\"disabled()\"\r\n [class.x-tree-node-sub]=\"!leaf()\"\r\n [class.x-tree-node-last]=\"isChildrenLast()\"\r\n [style.padding-left.px]=\"paddingLeft() + fontSize() / 2\"\r\n [style.height]=\"height() ? height() : nodeHeight() ? nodeHeight() : ''\"\r\n [style.align-items]=\"alignItems() ? alignItems() : nodeAlignItems()\"\r\n (click)=\"!disabled() && onActivate($event, node())\"\r\n>\r\n @if (tree.showLine() && level()! > 0) {\r\n <div class=\"x-tree-node-line\" [style.width.px]=\"paddingLeft()\">\r\n @for (i of verticalLevel(); track i) {\r\n <div\r\n class=\"x-tree-node-line-vertical\"\r\n [hidden]=\"isParentLast()[i - 1]\"\r\n [class.is-last]=\"i === verticalLevel().length\"\r\n [style.left.px]=\"getVerticalLeft(i)\"\r\n ></div>\r\n }\r\n <div\r\n class=\"x-tree-node-line-horizontal\"\r\n [style.width.px]=\"verticalWidth()\"\r\n [style.left.px]=\"getVerticalLeft(verticalLevel().length)\"\r\n ></div>\r\n </div>\r\n }\r\n @if (showDragIndicator()) {\r\n <div class=\"x-tree-node-drag-indicator\" [style.width]=\"indicatorWidth()\" [ngStyle]=\"indicatorStyle()\"></div>\r\n }\r\n @if (loading()) {\r\n <x-icon class=\"x-tree-node-loading\" type=\"fto-loader\" [spin]=\"loading()!\"></x-icon>\r\n } @else {\r\n <div\r\n class=\"x-tree-node-right\"\r\n [class.is-leaf]=\"leaf()\"\r\n [class.is-open]=\"open()\"\r\n [class.is-template]=\"tree.expandedIcon()\"\r\n [style.width.px]=\"verticalWidth() * 2\"\r\n (click)=\"!tree.nodeOpen() && onToggle($event, node())\"\r\n >\r\n @if (!leaf()) {\r\n @if (tree.expandedIcon()) {\r\n <ng-container *xOutlet=\"tree.expandedIcon(); context: { $node: node() }\"></ng-container>\r\n } @else {\r\n <x-icon class=\"x-tree-node-icon\" type=\"fto-chevron-right\"></x-icon>\r\n }\r\n }\r\n </div>\r\n }\r\n @if (tree.checkbox()) {\r\n <x-checkbox\r\n class=\"x-tree-node-checkbox\"\r\n [data]=\"[{ label: '', id: id() }]\"\r\n [(ngModel)]=\"checked\"\r\n (ngModelChange)=\"onCheckboxChange()\"\r\n [indeterminate]=\"indeterminate()!\"\r\n [disabled]=\"disabled()!\"\r\n (click)=\"$event.stopPropagation()\"\r\n single\r\n ></x-checkbox>\r\n }\r\n @if (!tree.labelTpl()) {\r\n <span\r\n class=\"x-tree-node-label\"\r\n [class.nowrap]=\"nowrap() === false || nowrap() === true ? nowrap() : nodeNowrap()\"\r\n [title]=\"label()\"\r\n x-keyword\r\n [text]=\"tree.keywordText()\"\r\n [caseSensitive]=\"tree.caseSensitive()\"\r\n >{{ label() }}</span\r\n >\r\n } @else {\r\n <ng-container *xOutlet=\"tree.labelTpl(); context: { $node: node() }\"></ng-container>\r\n }\r\n <span class=\"x-tree-node-operations\">\r\n @for (action of actions(); track action.id) {\r\n <x-link [icon]=\"action.icon\" [title]=\"action.label\" (click)=\"onAction($event, action, node())\">{{\r\n action.label\r\n }}</x-link>\r\n }\r\n </span>\r\n @if (tree.multiple() && activated()) {\r\n <x-icon class=\"x-tree-node-checked\" type=\"fto-check\"></x-icon>\r\n }\r\n</div>\r\n", styles: ["x-tree-node{display:block}.x-tree-node{display:block}.x-tree-node{margin:0;padding:0}.x-tree-node-content{position:relative;display:flex;border-radius:var(--x-border-radius);margin:.125rem 0;padding-right:.5rem;line-height:var(--x-height-small);cursor:pointer}.x-tree-node-content .x-tree-node-icon,.x-tree-node-content .x-tree-node-right x-icon{padding:.25rem;font-size:1.25rem;transition:var(--x-animation-duration-base)}.x-tree-node-content .x-tree-node-icon:hover,.x-tree-node-content .x-tree-node-right x-icon:hover{color:var(--x-text-200)}.x-tree-node-content .x-tree-node-checkbox{margin-right:.325rem;padding:.25rem 0}.x-tree-node-content.x-disabled{color:var(--x-text-400)}.x-tree-node-content:not(.x-disabled):hover{background-color:var(--x-background-a200)}.x-tree-node-content:not(.x-disabled):hover .x-tree-node-operations{display:flex;align-items:center}.x-tree-node-content:not(.x-disabled).x-activated{background-color:var(--x-primary-900);color:var(--x-primary)}.x-tree-node-content:not(.x-disabled).x-tree-node-checked{color:var(--x-primary)}.x-tree-node x-icon.x-tree-node-loading{padding:.2rem;font-size:1.25rem;color:var(--x-text-300)}.x-tree-node-right{display:flex;align-items:center;justify-content:center;margin-right:.125rem}.x-tree-node-right.is-leaf{visibility:hidden}.x-tree-node-right.is-open:not(.is-template) x-icon{transform:rotate(90deg)}.x-tree-node-line{position:absolute;left:.5rem;height:calc(100% + .25rem);display:flex;align-items:center;justify-content:space-between}.x-tree-node-line-vertical{position:absolute;height:100%;border-right:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-tree-node-line-horizontal{position:absolute;border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border)}.x-tree-node-last .x-tree-node-line-vertical.is-last{height:50%;top:0}.x-tree-node-operations{display:none}.x-tree-node-operations .x-link{padding:0 .125rem}.x-tree-node-label{flex:1;-webkit-user-select:none;user-select:none}.x-tree-node-label.nowrap{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.x-tree-node-drag-indicator{position:absolute;height:.0625rem;border-radius:var(--x-border-radius);background-color:var(--x-primary);right:0;z-index:1}.x-tree-node-drag-indicator:before{position:absolute;top:-.125rem;left:-.2625rem;width:.325rem;height:.325rem;background-color:transparent;border-color:var(--x-primary);border-style:solid;border-width:.0625rem .0625rem 0 0;content:\" \";transform:rotate(45deg)}body>x-tree-node{display:block}body>x-tree-node.cdk-drag-preview .x-tree-node-content{position:relative;display:flex;border-radius:var(--x-border-radius);margin:.125rem 0;padding-right:.5rem;line-height:var(--x-height-small);cursor:pointer}body>x-tree-node.cdk-drag-preview .x-tree-node-content .x-tree-node-icon,body>x-tree-node.cdk-drag-preview .x-tree-node-content .x-tree-node-right x-icon{padding:.25rem;font-size:1.25rem;transition:var(--x-animation-duration-base)}body>x-tree-node.cdk-drag-preview .x-tree-node-content .x-tree-node-icon:hover,body>x-tree-node.cdk-drag-preview .x-tree-node-content .x-tree-node-right x-icon:hover{color:var(--x-text-200)}body>x-tree-node.cdk-drag-preview .x-tree-node-content .x-tree-node-checkbox{margin-right:.325rem;padding:.25rem 0}body>x-tree-node.cdk-drag-preview .x-tree-node-content.x-disabled{color:var(--x-text-400)}body>x-tree-node.cdk-drag-preview .x-tree-node-content:not(.x-disabled):hover{background-color:var(--x-background-a200)}body>x-tree-node.cdk-drag-preview .x-tree-node-content:not(.x-disabled):hover .x-tree-node-operations{display:flex;align-items:center}body>x-tree-node.cdk-drag-preview .x-tree-node-content:not(.x-disabled).x-activated{background-color:var(--x-primary-900);color:var(--x-primary)}body>x-tree-node.cdk-drag-preview .x-tree-node-content:not(.x-disabled).x-tree-node-checked{color:var(--x-primary)}body>x-tree-node.cdk-drag-preview .x-tree-node x-icon.x-tree-node-loading{padding:.2rem;font-size:1.25rem;color:var(--x-text-300)}body>x-tree-node.cdk-drag-preview .x-tree-node-right{display:flex;align-items:center;justify-content:center;margin-right:.125rem}body>x-tree-node.cdk-drag-preview .x-tree-node-right.is-leaf{visibility:hidden}body>x-tree-node.cdk-drag-preview .x-tree-node-right.is-open:not(.is-template) x-icon{transform:rotate(90deg)}body>x-tree-node.cdk-drag-preview .x-tree-node-line{position:absolute;left:.5rem;height:calc(100% + .25rem);display:flex;align-items:center;justify-content:space-between}body>x-tree-node.cdk-drag-preview .x-tree-node-line-vertical{position:absolute;height:100%;border-right:var(--x-border-width) var(--x-border-style) var(--x-border)}body>x-tree-node.cdk-drag-preview .x-tree-node-line-horizontal{position:absolute;border-bottom:var(--x-border-width) var(--x-border-style) var(--x-border)}body>x-tree-node.cdk-drag-preview .x-tree-node-last .x-tree-node-line-vertical.is-last{height:50%;top:0}body>x-tree-node.cdk-drag-preview .x-tree-node-operations{display:none}body>x-tree-node.cdk-drag-preview .x-tree-node-operations .x-link{padding:0 .125rem}body>x-tree-node.cdk-drag-preview .x-tree-node-label{flex:1;-webkit-user-select:none;user-select:none}body>x-tree-node.cdk-drag-preview .x-tree-node-label.nowrap{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}body>x-tree-node.cdk-drag-preview .x-tree-node-drag-indicator{position:absolute;height:.0625rem;border-radius:var(--x-border-radius);background-color:var(--x-primary);right:0;z-index:1}body>x-tree-node.cdk-drag-preview .x-tree-node-drag-indicator:before{position:absolute;top:-.125rem;left:-.2625rem;width:.325rem;height:.325rem;background-color:transparent;border-color:var(--x-primary);border-style:solid;border-width:.0625rem .0625rem 0 0;content:\" \";transform:rotate(45deg)}body>x-tree-node.cdk-drag-preview .x-tree-node-content{border-color:var(--x-border);color:var(--x-text-400);background-color:var(--x-background-a100);opacity:.5}\n"], dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: XIconComponent, selector: "x-icon" }, { kind: "component", type: XCheckboxComponent, selector: "x-checkbox" }, { kind: "directive", type: XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }, { kind: "component", type: XLinkComponent, selector: "x-link" }, { kind: "directive", type: XKeywordDirective, selector: "[x-keyword]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
764
764
|
}
|
|
765
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
765
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTreeNodeComponent, decorators: [{
|
|
766
766
|
type: Component,
|
|
767
767
|
args: [{ selector: `${XTreeNodePrefix}, [${XTreeNodePrefix}]`, imports: [
|
|
768
768
|
NgStyle,
|
|
@@ -791,28 +791,28 @@ class XTreeComponent extends XTreeProperty {
|
|
|
791
791
|
this.elementRef = elementRef;
|
|
792
792
|
this.cdr = cdr;
|
|
793
793
|
this.treeService = treeService;
|
|
794
|
-
this.tree = viewChild('tree', { read: (ElementRef) });
|
|
795
|
-
this.virtualBody = viewChild('virtualBody', { read: CdkVirtualScrollViewport });
|
|
796
|
-
this.dropList = viewChild('dropList', { read: (CdkDropList) });
|
|
797
|
-
this.nodeComponents = viewChildren(XTreeNodeComponent);
|
|
794
|
+
this.tree = viewChild('tree', ...(ngDevMode ? [{ debugName: "tree", read: (ElementRef) }] : [{ read: (ElementRef) }]));
|
|
795
|
+
this.virtualBody = viewChild('virtualBody', ...(ngDevMode ? [{ debugName: "virtualBody", read: CdkVirtualScrollViewport }] : [{ read: CdkVirtualScrollViewport }]));
|
|
796
|
+
this.dropList = viewChild('dropList', ...(ngDevMode ? [{ debugName: "dropList", read: (CdkDropList) }] : [{ read: (CdkDropList) }]));
|
|
797
|
+
this.nodeComponents = viewChildren(XTreeNodeComponent, ...(ngDevMode ? [{ debugName: "nodeComponents" }] : []));
|
|
798
798
|
this.document = inject(DOCUMENT);
|
|
799
|
-
this.fontSize = computed(() => parseFloat(XComputedStyle(this.document.documentElement, 'font-size')));
|
|
800
|
-
this.nodes = signal([]);
|
|
801
|
-
this.virtualNodes = signal([]);
|
|
802
|
-
this.activatedNode = signal(null);
|
|
803
|
-
this.dataIsFunc = signal(false);
|
|
804
|
-
this.getting = signal(false);
|
|
805
|
-
this.treeData = signal([]);
|
|
806
|
-
this.dragging = signal(false);
|
|
807
|
-
this.dragPosition = signal(-1);
|
|
808
|
-
this.hoverTreeNode = signal(null);
|
|
809
|
-
this.draggingTreeNode = signal(null);
|
|
810
|
-
this.isEmpty = computed(() => XIsEmpty(this.nodes()));
|
|
799
|
+
this.fontSize = computed(() => parseFloat(XComputedStyle(this.document.documentElement, 'font-size')), ...(ngDevMode ? [{ debugName: "fontSize" }] : []));
|
|
800
|
+
this.nodes = signal([], ...(ngDevMode ? [{ debugName: "nodes" }] : []));
|
|
801
|
+
this.virtualNodes = signal([], ...(ngDevMode ? [{ debugName: "virtualNodes" }] : []));
|
|
802
|
+
this.activatedNode = signal(null, ...(ngDevMode ? [{ debugName: "activatedNode" }] : []));
|
|
803
|
+
this.dataIsFunc = signal(false, ...(ngDevMode ? [{ debugName: "dataIsFunc" }] : []));
|
|
804
|
+
this.getting = signal(false, ...(ngDevMode ? [{ debugName: "getting" }] : []));
|
|
805
|
+
this.treeData = signal([], ...(ngDevMode ? [{ debugName: "treeData" }] : []));
|
|
806
|
+
this.dragging = signal(false, ...(ngDevMode ? [{ debugName: "dragging" }] : []));
|
|
807
|
+
this.dragPosition = signal(-1, ...(ngDevMode ? [{ debugName: "dragPosition" }] : []));
|
|
808
|
+
this.hoverTreeNode = signal(null, ...(ngDevMode ? [{ debugName: "hoverTreeNode" }] : []));
|
|
809
|
+
this.draggingTreeNode = signal(null, ...(ngDevMode ? [{ debugName: "draggingTreeNode" }] : []));
|
|
810
|
+
this.isEmpty = computed(() => XIsEmpty(this.nodes()), ...(ngDevMode ? [{ debugName: "isEmpty" }] : []));
|
|
811
811
|
this.unSubject = new Subject();
|
|
812
|
-
this.heightAdaptionSignal = signal(0);
|
|
812
|
+
this.heightAdaptionSignal = signal(0, ...(ngDevMode ? [{ debugName: "heightAdaptionSignal" }] : []));
|
|
813
813
|
this.isVirtualScrollAdaption = computed(() => {
|
|
814
814
|
return !!(this.virtualScroll() && this.heightAdaption());
|
|
815
|
-
});
|
|
815
|
+
}, ...(ngDevMode ? [{ debugName: "isVirtualScrollAdaption" }] : []));
|
|
816
816
|
this.virtualScrollHeightSignal = computed(() => {
|
|
817
817
|
if (this.isVirtualScrollAdaption()) {
|
|
818
818
|
return this.heightAdaptionSignal();
|
|
@@ -820,7 +820,7 @@ class XTreeComponent extends XTreeProperty {
|
|
|
820
820
|
else {
|
|
821
821
|
return XToCssPx(this.virtualScrollHeight(), this.fontSize());
|
|
822
822
|
}
|
|
823
|
-
});
|
|
823
|
+
}, ...(ngDevMode ? [{ debugName: "virtualScrollHeightSignal" }] : []));
|
|
824
824
|
this.minBufferPxSignal = computed(() => {
|
|
825
825
|
if (this.isVirtualScrollAdaption()) {
|
|
826
826
|
return this.virtualScrollHeightSignal();
|
|
@@ -828,7 +828,7 @@ class XTreeComponent extends XTreeProperty {
|
|
|
828
828
|
else {
|
|
829
829
|
return this.minBufferPx();
|
|
830
830
|
}
|
|
831
|
-
});
|
|
831
|
+
}, ...(ngDevMode ? [{ debugName: "minBufferPxSignal" }] : []));
|
|
832
832
|
this.maxBufferPxSignal = computed(() => {
|
|
833
833
|
if (this.isVirtualScrollAdaption()) {
|
|
834
834
|
return this.virtualScrollHeightSignal() * 1.2;
|
|
@@ -836,7 +836,7 @@ class XTreeComponent extends XTreeProperty {
|
|
|
836
836
|
else {
|
|
837
837
|
return this.maxBufferPx();
|
|
838
838
|
}
|
|
839
|
-
});
|
|
839
|
+
}, ...(ngDevMode ? [{ debugName: "maxBufferPxSignal" }] : []));
|
|
840
840
|
effect(() => {
|
|
841
841
|
const virtualBody = this.virtualBody();
|
|
842
842
|
if (virtualBody) {
|
|
@@ -1350,20 +1350,20 @@ class XTreeComponent extends XTreeProperty {
|
|
|
1350
1350
|
trackByItem(_index, item) {
|
|
1351
1351
|
return item;
|
|
1352
1352
|
}
|
|
1353
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
1354
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
1353
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTreeComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: XTreeService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1354
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: XTreeComponent, isStandalone: true, selector: "x-tree", viewQueries: [{ propertyName: "tree", first: true, predicate: ["tree"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "virtualBody", first: true, predicate: ["virtualBody"], descendants: true, read: CdkVirtualScrollViewport, isSignal: true }, { propertyName: "dropList", first: true, predicate: ["dropList"], descendants: true, read: CdkDropList, isSignal: true }, { propertyName: "nodeComponents", predicate: XTreeNodeComponent, descendants: true, isSignal: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div #tree class=\"x-tree\" [class.x-tree-only-leaf]=\"onlyLeaf()\">\r\n @if (virtualScroll()) {\r\n <cdk-virtual-scroll-viewport\r\n #virtualBody\r\n [itemSize]=\"itemSize()\"\r\n [minBufferPx]=\"minBufferPxSignal()\"\r\n [maxBufferPx]=\"maxBufferPxSignal()\"\r\n [style.height.px]=\"virtualScrollHeightSignal()\"\r\n >\r\n <div\r\n class=\"x-tree-content\"\r\n #dropList\r\n cdkDropList\r\n [cdkDropListDisabled]=\"!drag()\"\r\n [cdkDropListSortingDisabled]=\"true\"\r\n [hidden]=\"isEmpty()\"\r\n [cdkDropListData]=\"nodes()\"\r\n [cdkDropListEnterPredicate]=\"predicate\"\r\n >\r\n <x-tree-node\r\n *cdkVirtualFor=\"let node of nodes(); templateCacheSize: 0; trackBy: trackByItem\"\r\n cdkDrag\r\n [cdkDragDisabled]=\"node.disabled\"\r\n (cdkDragStarted)=\"cdkDragStarted($event)\"\r\n (cdkDragEnded)=\"cdkDragEnded($event)\"\r\n (cdkDragMoved)=\"cdkDragMoved($event)\"\r\n [cdkDragData]=\"node\"\r\n (nodeMouseenter)=\"nodeMouseenter($event)\"\r\n [node]=\"node\"\r\n [nodeHeight]=\"nodeHeight()\"\r\n [nodeNowrap]=\"nodeNowrap()\"\r\n [nodeAlignItems]=\"nodeAlignItems()\"\r\n [actions]=\"actions()\"\r\n [(disabled)]=\"node.disabled!\"\r\n [(id)]=\"node.id\"\r\n [(pid)]=\"node.pid\"\r\n [(leaf)]=\"node.leaf!\"\r\n [(height)]=\"node.height!\"\r\n [(alignItems)]=\"node.alignItems!\"\r\n [(loading)]=\"node.loading!\"\r\n [(level)]=\"node.level!\"\r\n [(open)]=\"node.open\"\r\n [(checked)]=\"node.checked!\"\r\n [(indeterminate)]=\"node.indeterminate!\"\r\n [(label)]=\"node.label!\"\r\n [(nowrap)]=\"node.nowrap!\"\r\n (toggle)=\"onToggle(null, $event)\"\r\n ></x-tree-node>\r\n </div>\r\n </cdk-virtual-scroll-viewport>\r\n } @else {\r\n <div\r\n class=\"x-tree-content\"\r\n #dropList\r\n cdkDropList\r\n [cdkDropListDisabled]=\"!drag()\"\r\n [cdkDropListSortingDisabled]=\"true\"\r\n [hidden]=\"isEmpty()\"\r\n [cdkDropListData]=\"nodes()\"\r\n [cdkDropListEnterPredicate]=\"predicate\"\r\n >\r\n @for (node of nodes(); track node.id + '' + $index) {\r\n <x-tree-node\r\n cdkDrag\r\n [cdkDragDisabled]=\"node.disabled\"\r\n (cdkDragStarted)=\"cdkDragStarted($event)\"\r\n (cdkDragEnded)=\"cdkDragEnded($event)\"\r\n (cdkDragMoved)=\"cdkDragMoved($event)\"\r\n [cdkDragData]=\"node\"\r\n (nodeMouseenter)=\"nodeMouseenter($event)\"\r\n [node]=\"node\"\r\n [nodeHeight]=\"nodeHeight()\"\r\n [nodeNowrap]=\"nodeNowrap()\"\r\n [nodeAlignItems]=\"nodeAlignItems()\"\r\n [actions]=\"actions()\"\r\n [(disabled)]=\"node.disabled\"\r\n [(id)]=\"node.id\"\r\n [(pid)]=\"node.pid\"\r\n [(leaf)]=\"node.leaf\"\r\n [(height)]=\"node.height!\"\r\n [(alignItems)]=\"node.alignItems\"\r\n [(loading)]=\"node.loading\"\r\n [(level)]=\"node.level\"\r\n [(open)]=\"node.open\"\r\n [(checked)]=\"node.checked\"\r\n [(indeterminate)]=\"node.indeterminate\"\r\n [(label)]=\"node.label\"\r\n [(nowrap)]=\"node.nowrap\"\r\n (toggle)=\"onToggle(null, $event)\"\r\n ></x-tree-node>\r\n }\r\n </div>\r\n }\r\n</div>\r\n\r\n<!-- \u63D0\u524D\u52A0\u8F7Dloading\u7684\u56FE\u6807-->\r\n@if (lazy()) {\r\n <x-icon [style.display]=\"'none'\" type=\"fto-loader\"></x-icon>\r\n}\r\n", styles: [".x-tree{margin:0;padding:0}.x-tree-only-leaf .x-tree-node-sub{color:var(--x-text-300)}.x-tree-content.cdk-drop-list-dragging x-tree-node .x-tree-node-content:not(.x-disabled):not(.x-activated):hover{background-color:transparent}.x-tree-content.cdk-drop-list-dragging x-tree-node.cdk-drag-placeholder .x-tree-node-content{color:var(--x-primary);background-color:var(--x-background-a200);opacity:.8}.x-tree-content.cdk-drop-list-dragging x-tree-node:not(.cdk-drag-placeholder){transition:transform var(--x-animation-duration-base) cubic-bezier(0,0,.2,1)}\n"], dependencies: [{ kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i2.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i2.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i3.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i3.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i3.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "component", type: XTreeNodeComponent, selector: "x-tree-node, [x-tree-node]", outputs: ["nodeMouseenter"] }, { kind: "component", type: XIconComponent, selector: "x-icon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1355
1355
|
}
|
|
1356
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
1356
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTreeComponent, decorators: [{
|
|
1357
1357
|
type: Component,
|
|
1358
1358
|
args: [{ selector: `${XTreePrefix}`, imports: [DragDropModule, ScrollingModule, XTreeNodeComponent, XIconComponent], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div #tree class=\"x-tree\" [class.x-tree-only-leaf]=\"onlyLeaf()\">\r\n @if (virtualScroll()) {\r\n <cdk-virtual-scroll-viewport\r\n #virtualBody\r\n [itemSize]=\"itemSize()\"\r\n [minBufferPx]=\"minBufferPxSignal()\"\r\n [maxBufferPx]=\"maxBufferPxSignal()\"\r\n [style.height.px]=\"virtualScrollHeightSignal()\"\r\n >\r\n <div\r\n class=\"x-tree-content\"\r\n #dropList\r\n cdkDropList\r\n [cdkDropListDisabled]=\"!drag()\"\r\n [cdkDropListSortingDisabled]=\"true\"\r\n [hidden]=\"isEmpty()\"\r\n [cdkDropListData]=\"nodes()\"\r\n [cdkDropListEnterPredicate]=\"predicate\"\r\n >\r\n <x-tree-node\r\n *cdkVirtualFor=\"let node of nodes(); templateCacheSize: 0; trackBy: trackByItem\"\r\n cdkDrag\r\n [cdkDragDisabled]=\"node.disabled\"\r\n (cdkDragStarted)=\"cdkDragStarted($event)\"\r\n (cdkDragEnded)=\"cdkDragEnded($event)\"\r\n (cdkDragMoved)=\"cdkDragMoved($event)\"\r\n [cdkDragData]=\"node\"\r\n (nodeMouseenter)=\"nodeMouseenter($event)\"\r\n [node]=\"node\"\r\n [nodeHeight]=\"nodeHeight()\"\r\n [nodeNowrap]=\"nodeNowrap()\"\r\n [nodeAlignItems]=\"nodeAlignItems()\"\r\n [actions]=\"actions()\"\r\n [(disabled)]=\"node.disabled!\"\r\n [(id)]=\"node.id\"\r\n [(pid)]=\"node.pid\"\r\n [(leaf)]=\"node.leaf!\"\r\n [(height)]=\"node.height!\"\r\n [(alignItems)]=\"node.alignItems!\"\r\n [(loading)]=\"node.loading!\"\r\n [(level)]=\"node.level!\"\r\n [(open)]=\"node.open\"\r\n [(checked)]=\"node.checked!\"\r\n [(indeterminate)]=\"node.indeterminate!\"\r\n [(label)]=\"node.label!\"\r\n [(nowrap)]=\"node.nowrap!\"\r\n (toggle)=\"onToggle(null, $event)\"\r\n ></x-tree-node>\r\n </div>\r\n </cdk-virtual-scroll-viewport>\r\n } @else {\r\n <div\r\n class=\"x-tree-content\"\r\n #dropList\r\n cdkDropList\r\n [cdkDropListDisabled]=\"!drag()\"\r\n [cdkDropListSortingDisabled]=\"true\"\r\n [hidden]=\"isEmpty()\"\r\n [cdkDropListData]=\"nodes()\"\r\n [cdkDropListEnterPredicate]=\"predicate\"\r\n >\r\n @for (node of nodes(); track node.id + '' + $index) {\r\n <x-tree-node\r\n cdkDrag\r\n [cdkDragDisabled]=\"node.disabled\"\r\n (cdkDragStarted)=\"cdkDragStarted($event)\"\r\n (cdkDragEnded)=\"cdkDragEnded($event)\"\r\n (cdkDragMoved)=\"cdkDragMoved($event)\"\r\n [cdkDragData]=\"node\"\r\n (nodeMouseenter)=\"nodeMouseenter($event)\"\r\n [node]=\"node\"\r\n [nodeHeight]=\"nodeHeight()\"\r\n [nodeNowrap]=\"nodeNowrap()\"\r\n [nodeAlignItems]=\"nodeAlignItems()\"\r\n [actions]=\"actions()\"\r\n [(disabled)]=\"node.disabled\"\r\n [(id)]=\"node.id\"\r\n [(pid)]=\"node.pid\"\r\n [(leaf)]=\"node.leaf\"\r\n [(height)]=\"node.height!\"\r\n [(alignItems)]=\"node.alignItems\"\r\n [(loading)]=\"node.loading\"\r\n [(level)]=\"node.level\"\r\n [(open)]=\"node.open\"\r\n [(checked)]=\"node.checked\"\r\n [(indeterminate)]=\"node.indeterminate\"\r\n [(label)]=\"node.label\"\r\n [(nowrap)]=\"node.nowrap\"\r\n (toggle)=\"onToggle(null, $event)\"\r\n ></x-tree-node>\r\n }\r\n </div>\r\n }\r\n</div>\r\n\r\n<!-- \u63D0\u524D\u52A0\u8F7Dloading\u7684\u56FE\u6807-->\r\n@if (lazy()) {\r\n <x-icon [style.display]=\"'none'\" type=\"fto-loader\"></x-icon>\r\n}\r\n", styles: [".x-tree{margin:0;padding:0}.x-tree-only-leaf .x-tree-node-sub{color:var(--x-text-300)}.x-tree-content.cdk-drop-list-dragging x-tree-node .x-tree-node-content:not(.x-disabled):not(.x-activated):hover{background-color:transparent}.x-tree-content.cdk-drop-list-dragging x-tree-node.cdk-drag-placeholder .x-tree-node-content{color:var(--x-primary);background-color:var(--x-background-a200);opacity:.8}.x-tree-content.cdk-drop-list-dragging x-tree-node:not(.cdk-drag-placeholder){transition:transform var(--x-animation-duration-base) cubic-bezier(0,0,.2,1)}\n"] }]
|
|
1359
1359
|
}], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: XTreeService }] });
|
|
1360
1360
|
|
|
1361
1361
|
class XTreeModule {
|
|
1362
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
1363
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.
|
|
1364
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.
|
|
1362
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTreeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1363
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.4", ngImport: i0, type: XTreeModule, imports: [XTreeComponent, XTreeNodeComponent], exports: [XTreeComponent, XTreeNodeComponent] }); }
|
|
1364
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTreeModule, imports: [XTreeComponent, XTreeNodeComponent] }); }
|
|
1365
1365
|
}
|
|
1366
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
1366
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: XTreeModule, decorators: [{
|
|
1367
1367
|
type: NgModule,
|
|
1368
1368
|
args: [{
|
|
1369
1369
|
exports: [XTreeComponent, XTreeNodeComponent],
|