@ng-nest/ui 21.0.13 → 22.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/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 +46 -34
- package/fesm2022/ng-nest-ui-alert.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-anchor.mjs +43 -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-attachments.mjs +74 -48
- package/fesm2022/ng-nest-ui-attachments.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-auto-complete.mjs +114 -70
- package/fesm2022/ng-nest-ui-auto-complete.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-avatar.mjs +47 -32
- package/fesm2022/ng-nest-ui-avatar.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-back-top.mjs +23 -18
- package/fesm2022/ng-nest-ui-back-top.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-badge.mjs +30 -23
- package/fesm2022/ng-nest-ui-badge.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-base-form.mjs +75 -44
- package/fesm2022/ng-nest-ui-base-form.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-bubble.mjs +76 -48
- package/fesm2022/ng-nest-ui-bubble.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-button.mjs +53 -42
- package/fesm2022/ng-nest-ui-button.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-calendar.mjs +30 -20
- package/fesm2022/ng-nest-ui-calendar.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-card.mjs +21 -16
- package/fesm2022/ng-nest-ui-card.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-carousel.mjs +68 -46
- package/fesm2022/ng-nest-ui-carousel.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-cascade.mjs +121 -73
- package/fesm2022/ng-nest-ui-cascade.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-checkbox.mjs +54 -38
- package/fesm2022/ng-nest-ui-checkbox.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-collapse.mjs +38 -30
- package/fesm2022/ng-nest-ui-collapse.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-color-picker.mjs +119 -72
- package/fesm2022/ng-nest-ui-color-picker.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-color.mjs +22 -16
- package/fesm2022/ng-nest-ui-color.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-comment.mjs +23 -21
- package/fesm2022/ng-nest-ui-comment.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-container.mjs +40 -37
- package/fesm2022/ng-nest-ui-container.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-contextmenu.mjs +71 -45
- package/fesm2022/ng-nest-ui-contextmenu.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-core.mjs +24 -21
- package/fesm2022/ng-nest-ui-core.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-coversations.mjs +25 -18
- package/fesm2022/ng-nest-ui-coversations.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-crumb.mjs +15 -13
- package/fesm2022/ng-nest-ui-crumb.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-date-picker.mjs +425 -256
- package/fesm2022/ng-nest-ui-date-picker.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-description.mjs +42 -31
- package/fesm2022/ng-nest-ui-description.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-dialog.mjs +106 -82
- package/fesm2022/ng-nest-ui-dialog.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-divider.mjs +24 -17
- package/fesm2022/ng-nest-ui-divider.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-doc.mjs +7 -7
- package/fesm2022/ng-nest-ui-drag.mjs +10 -10
- package/fesm2022/ng-nest-ui-drawer.mjs +52 -43
- package/fesm2022/ng-nest-ui-drawer.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-dropdown.mjs +94 -58
- package/fesm2022/ng-nest-ui-dropdown.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-empty.mjs +14 -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-find.mjs +111 -71
- package/fesm2022/ng-nest-ui-find.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-form.mjs +45 -33
- package/fesm2022/ng-nest-ui-form.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-highlight.mjs +26 -20
- package/fesm2022/ng-nest-ui-highlight.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-i18n.mjs +16 -15
- package/fesm2022/ng-nest-ui-i18n.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-icon.mjs +28 -21
- package/fesm2022/ng-nest-ui-icon.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-image.mjs +57 -51
- 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 +63 -42
- package/fesm2022/ng-nest-ui-input-number.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-input.mjs +130 -85
- package/fesm2022/ng-nest-ui-input.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-keyword.mjs +19 -15
- package/fesm2022/ng-nest-ui-keyword.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-layout.mjs +37 -31
- package/fesm2022/ng-nest-ui-layout.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-link.mjs +23 -18
- package/fesm2022/ng-nest-ui-link.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-list.mjs +137 -89
- package/fesm2022/ng-nest-ui-list.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-loading.mjs +36 -25
- package/fesm2022/ng-nest-ui-loading.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-menu.mjs +68 -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.mjs +10 -10
- package/fesm2022/ng-nest-ui-notification.mjs +10 -10
- package/fesm2022/ng-nest-ui-outlet.mjs +11 -9
- package/fesm2022/ng-nest-ui-outlet.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-page-header.mjs +20 -15
- package/fesm2022/ng-nest-ui-page-header.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-pagination.mjs +69 -48
- package/fesm2022/ng-nest-ui-pagination.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-pattern.mjs +7 -7
- package/fesm2022/ng-nest-ui-popconfirm.mjs +40 -27
- package/fesm2022/ng-nest-ui-popconfirm.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-popover.mjs +57 -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-progress.mjs +60 -41
- package/fesm2022/ng-nest-ui-progress.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-prompts.mjs +18 -15
- package/fesm2022/ng-nest-ui-prompts.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-radio.mjs +50 -35
- package/fesm2022/ng-nest-ui-radio.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-rate.mjs +43 -29
- package/fesm2022/ng-nest-ui-rate.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-resizable.mjs +18 -16
- package/fesm2022/ng-nest-ui-resizable.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-result.mjs +22 -16
- package/fesm2022/ng-nest-ui-result.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-ripple.mjs +14 -13
- package/fesm2022/ng-nest-ui-ripple.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-scrollable.mjs +41 -24
- package/fesm2022/ng-nest-ui-scrollable.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-select.mjs +197 -118
- package/fesm2022/ng-nest-ui-select.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-sender.mjs +43 -31
- package/fesm2022/ng-nest-ui-sender.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-skeleton.mjs +17 -15
- package/fesm2022/ng-nest-ui-skeleton.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-slider-select.mjs +85 -53
- package/fesm2022/ng-nest-ui-slider-select.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-slider.mjs +58 -37
- package/fesm2022/ng-nest-ui-slider.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-splitter.mjs +32 -24
- package/fesm2022/ng-nest-ui-splitter.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-statistic.mjs +44 -30
- package/fesm2022/ng-nest-ui-statistic.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-steps.mjs +30 -22
- package/fesm2022/ng-nest-ui-steps.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-suggestion.mjs +23 -20
- package/fesm2022/ng-nest-ui-suggestion.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-switch.mjs +35 -25
- package/fesm2022/ng-nest-ui-switch.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-table-view.mjs +78 -69
- package/fesm2022/ng-nest-ui-table-view.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-table.mjs +320 -205
- package/fesm2022/ng-nest-ui-table.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tabs.mjs +74 -56
- package/fesm2022/ng-nest-ui-tabs.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tag.mjs +30 -23
- package/fesm2022/ng-nest-ui-tag.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-text-retract.mjs +19 -15
- package/fesm2022/ng-nest-ui-text-retract.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-textarea.mjs +69 -44
- package/fesm2022/ng-nest-ui-textarea.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-theme.mjs +34 -23
- package/fesm2022/ng-nest-ui-theme.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-thought-chain.mjs +26 -19
- package/fesm2022/ng-nest-ui-thought-chain.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-time-ago.mjs +7 -7
- package/fesm2022/ng-nest-ui-time-picker.mjs +164 -96
- 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-timeline.mjs +26 -19
- package/fesm2022/ng-nest-ui-timeline.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tooltip.mjs +53 -35
- package/fesm2022/ng-nest-ui-tooltip.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-transfer.mjs +66 -40
- package/fesm2022/ng-nest-ui-transfer.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tree-file.mjs +39 -28
- package/fesm2022/ng-nest-ui-tree-file.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tree-select.mjs +186 -111
- package/fesm2022/ng-nest-ui-tree-select.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tree.mjs +166 -105
- package/fesm2022/ng-nest-ui-tree.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-typography.mjs +16 -13
- package/fesm2022/ng-nest-ui-typography.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-upload.mjs +81 -53
- package/fesm2022/ng-nest-ui-upload.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-watermark.mjs +45 -35
- package/fesm2022/ng-nest-ui-watermark.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-welcome.mjs +22 -16
- package/fesm2022/ng-nest-ui-welcome.mjs.map +1 -1
- package/package.json +3 -2
- package/types/ng-nest-ui-base-form.d.ts +3 -3
- package/types/ng-nest-ui-carousel.d.ts +1 -1
- package/types/ng-nest-ui-container.d.ts +1 -1
- package/types/ng-nest-ui-core.d.ts +1 -1
- package/types/ng-nest-ui-dialog.d.ts +1 -1
- package/types/ng-nest-ui-drawer.d.ts +1 -1
- package/types/ng-nest-ui-form.d.ts +12 -12
- package/types/ng-nest-ui-layout.d.ts +1 -1
- package/types/ng-nest-ui-list.d.ts +1 -1
- package/types/ng-nest-ui-portal.d.ts +3 -3
- package/types/ng-nest-ui-table-view.d.ts +1 -1
- package/types/ng-nest-ui-table.d.ts +1 -1
- package/types/ng-nest-ui-tabs.d.ts +1 -1
- package/types/ng-nest-ui-tree.d.ts +1 -1
|
@@ -40,72 +40,77 @@ 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([], /* @ts-ignore */
|
|
44
|
+
...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
44
45
|
/**
|
|
45
46
|
* @zh_CN 显示多选框
|
|
46
47
|
* @en_US Show checkbox
|
|
47
48
|
*/
|
|
48
|
-
this.checkbox = input(false, { ...(ngDevMode ? { debugName: "checkbox" } : {}), transform: XToBoolean });
|
|
49
|
+
this.checkbox = input(false, { ...(ngDevMode ? { debugName: "checkbox" } : /* istanbul ignore next */ {}), transform: XToBoolean });
|
|
49
50
|
/**
|
|
50
51
|
* @zh_CN 开启懒加载节点,data 必须设置成函数类型
|
|
51
52
|
* @en_US Open lazy loading node, data must be set to function type
|
|
52
53
|
*/
|
|
53
|
-
this.lazy = input(false, { ...(ngDevMode ? { debugName: "lazy" } : {}), transform: XToBoolean });
|
|
54
|
+
this.lazy = input(false, { ...(ngDevMode ? { debugName: "lazy" } : /* istanbul ignore next */ {}), transform: XToBoolean });
|
|
54
55
|
/**
|
|
55
56
|
* @zh_CN 当前激活的节点 Id, 当 multiple 为 true 时,值为数组(默认是 Id 数组,objectArray 为 true,对象数组)
|
|
56
57
|
* @en_US Currently active node Id. When Multiple is true, the value is the Id array
|
|
57
58
|
*/
|
|
58
|
-
this.activatedId = model(null,
|
|
59
|
+
this.activatedId = model(null, /* @ts-ignore */
|
|
60
|
+
...(ngDevMode ? [{ debugName: "activatedId" }] : /* istanbul ignore next */ []));
|
|
59
61
|
/**
|
|
60
62
|
* @zh_CN 展开的节点
|
|
61
63
|
* @en_US Expanded node
|
|
62
64
|
*/
|
|
63
|
-
this.expanded = model([],
|
|
65
|
+
this.expanded = model([], /* @ts-ignore */
|
|
66
|
+
...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
|
|
64
67
|
/**
|
|
65
68
|
* @zh_CN checkbox 选中的节点
|
|
66
69
|
* @en_US Checkbox selected node
|
|
67
70
|
*/
|
|
68
|
-
this.checked = model([],
|
|
71
|
+
this.checked = model([], /* @ts-ignore */
|
|
72
|
+
...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
|
|
69
73
|
/**
|
|
70
74
|
* @zh_CN 展开所有节点
|
|
71
75
|
* @en_US Expand all nodes
|
|
72
76
|
*/
|
|
73
|
-
this.expandedAll = input(false, { ...(ngDevMode ? { debugName: "expandedAll" } : {}), transform: XToBoolean });
|
|
77
|
+
this.expandedAll = input(false, { ...(ngDevMode ? { debugName: "expandedAll" } : /* istanbul ignore next */ {}), transform: XToBoolean });
|
|
74
78
|
/**
|
|
75
79
|
* @zh_CN 默认展开的层级
|
|
76
80
|
* @en_US Default expanded level
|
|
77
81
|
*/
|
|
78
|
-
this.expandedLevel = input(-1, { ...(ngDevMode ? { debugName: "expandedLevel" } : {}), transform: XToNumber });
|
|
82
|
+
this.expandedLevel = input(-1, { ...(ngDevMode ? { debugName: "expandedLevel" } : /* istanbul ignore next */ {}), transform: XToNumber });
|
|
79
83
|
/**
|
|
80
84
|
* @zh_CN 点击节点就触发展开/收起的操作,请确保节点上没有其它操作(checkbox、自定义的操作按钮)
|
|
81
85
|
* @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
86
|
*/
|
|
83
|
-
this.nodeOpen = input(false, { ...(ngDevMode ? { debugName: "nodeOpen" } : {}), transform: XToBoolean });
|
|
87
|
+
this.nodeOpen = input(false, { ...(ngDevMode ? { debugName: "nodeOpen" } : /* istanbul ignore next */ {}), transform: XToBoolean });
|
|
84
88
|
/**
|
|
85
89
|
* @zh_CN 单位间距,这个与层级的乘积算出节点的左边距
|
|
86
90
|
* @en_US Unit spacing, the product of this and the level calculates the left margin of the node
|
|
87
91
|
*/
|
|
88
|
-
this.spacing = input(this.config?.spacing ?? '1.5rem', { ...(ngDevMode ? { debugName: "spacing" } : {}), transform: XToCssPixelValue });
|
|
92
|
+
this.spacing = input(this.config?.spacing ?? '1.5rem', { ...(ngDevMode ? { debugName: "spacing" } : /* istanbul ignore next */ {}), transform: XToCssPixelValue });
|
|
89
93
|
/**
|
|
90
94
|
* @zh_CN 标签自定义模板
|
|
91
95
|
* @en_US Label custom template
|
|
92
96
|
*/
|
|
93
|
-
this.labelTpl = input(
|
|
97
|
+
this.labelTpl = input(/* @ts-ignore */
|
|
98
|
+
...(ngDevMode ? [undefined, { debugName: "labelTpl" }] : /* istanbul ignore next */ []));
|
|
94
99
|
/**
|
|
95
100
|
* @zh_CN 节点的高度, 默认是自适应高度
|
|
96
101
|
* @en_US The height of the node
|
|
97
102
|
*/
|
|
98
|
-
this.nodeHeight = input(this.config?.nodeHeight ?? '', { ...(ngDevMode ? { debugName: "nodeHeight" } : {}), transform: XToCssPixelValue });
|
|
103
|
+
this.nodeHeight = input(this.config?.nodeHeight ?? '', { ...(ngDevMode ? { debugName: "nodeHeight" } : /* istanbul ignore next */ {}), transform: XToCssPixelValue });
|
|
99
104
|
/**
|
|
100
105
|
* @zh_CN 是否允许多次点击一个节点触发多次事件
|
|
101
106
|
* @en_US Whether to allow multiple clicks on a node to trigger multiple events
|
|
102
107
|
*/
|
|
103
|
-
this.allowManyActivated = input(false, { ...(ngDevMode ? { debugName: "allowManyActivated" } : {}), transform: XToBoolean });
|
|
108
|
+
this.allowManyActivated = input(false, { ...(ngDevMode ? { debugName: "allowManyActivated" } : /* istanbul ignore next */ {}), transform: XToBoolean });
|
|
104
109
|
/**
|
|
105
110
|
* @zh_CN 拖动节点
|
|
106
111
|
* @en_US Drag node
|
|
107
112
|
*/
|
|
108
|
-
this.drag = input(false, { ...(ngDevMode ? { debugName: "drag" } : {}), transform: XToBoolean });
|
|
113
|
+
this.drag = input(false, { ...(ngDevMode ? { debugName: "drag" } : /* istanbul ignore next */ {}), transform: XToBoolean });
|
|
109
114
|
/**
|
|
110
115
|
* @zh_CN 当前点击选中的节点变化的事件
|
|
111
116
|
* @en_US The event of the currently clicked node change
|
|
@@ -120,107 +125,115 @@ class XTreeProperty extends XPropertyFunction(X_TREE_CONFIG_NAME) {
|
|
|
120
125
|
* @zh_CN 如果 data 是函数类型,可以通过此参数控制请求,用于弹框中的表格,弹出后再请求
|
|
121
126
|
* @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
127
|
*/
|
|
123
|
-
this.manual = model(true,
|
|
128
|
+
this.manual = model(true, /* @ts-ignore */
|
|
129
|
+
...(ngDevMode ? [{ debugName: "manual" }] : /* istanbul ignore next */ []));
|
|
124
130
|
/**
|
|
125
131
|
* @zh_CN checkbox 状态改变触发层级检查
|
|
126
132
|
* @en_US Checkbox status changes trigger level checks
|
|
127
133
|
*/
|
|
128
|
-
this.levelCheck = input(true, { ...(ngDevMode ? { debugName: "levelCheck" } : {}), transform: XToBoolean });
|
|
134
|
+
this.levelCheck = input(true, { ...(ngDevMode ? { debugName: "levelCheck" } : /* istanbul ignore next */ {}), transform: XToBoolean });
|
|
129
135
|
/**
|
|
130
136
|
* @zh_CN 节点内容不换行显示省略号
|
|
131
137
|
* @en_US Show ellipsis without wrapping
|
|
132
138
|
*/
|
|
133
|
-
this.nodeNowrap = input(true, { ...(ngDevMode ? { debugName: "nodeNowrap" } : {}), transform: XToBoolean });
|
|
139
|
+
this.nodeNowrap = input(true, { ...(ngDevMode ? { debugName: "nodeNowrap" } : /* istanbul ignore next */ {}), transform: XToBoolean });
|
|
134
140
|
/**
|
|
135
141
|
* @zh_CN 节点垂直对齐方式
|
|
136
142
|
* @en_US Show ellipsis without wrapping
|
|
137
143
|
*/
|
|
138
|
-
this.nodeAlignItems = input(this.config?.nodeAlignItems ?? 'center',
|
|
144
|
+
this.nodeAlignItems = input(this.config?.nodeAlignItems ?? 'center', /* @ts-ignore */
|
|
145
|
+
...(ngDevMode ? [{ debugName: "nodeAlignItems" }] : /* istanbul ignore next */ []));
|
|
139
146
|
/**
|
|
140
147
|
* @zh_CN 树节点操作按钮
|
|
141
148
|
* @en_US Tree node operation buttons
|
|
142
149
|
*/
|
|
143
|
-
this.actions = input([],
|
|
150
|
+
this.actions = input([], /* @ts-ignore */
|
|
151
|
+
...(ngDevMode ? [{ debugName: "actions" }] : /* istanbul ignore next */ []));
|
|
144
152
|
/**
|
|
145
153
|
* @zh_CN 滚动区域元素
|
|
146
154
|
* @en_US Rolling area element
|
|
147
155
|
*/
|
|
148
|
-
this.scrollElement = input(
|
|
156
|
+
this.scrollElement = input(/* @ts-ignore */
|
|
157
|
+
...(ngDevMode ? [undefined, { debugName: "scrollElement" }] : /* istanbul ignore next */ []));
|
|
149
158
|
/**
|
|
150
159
|
* @zh_CN 开启虚拟滚动
|
|
151
160
|
* @en_US Turn on virtual scrolling
|
|
152
161
|
*/
|
|
153
|
-
this.virtualScroll = input(this.config?.virtualScroll ?? false, { ...(ngDevMode ? { debugName: "virtualScroll" } : {}), transform: XToBoolean });
|
|
162
|
+
this.virtualScroll = input(this.config?.virtualScroll ?? false, { ...(ngDevMode ? { debugName: "virtualScroll" } : /* istanbul ignore next */ {}), transform: XToBoolean });
|
|
154
163
|
/**
|
|
155
164
|
* @zh_CN 滚动区域高度,开启虚拟滚动的时候生效
|
|
156
165
|
* @en_US Rolling area height
|
|
157
166
|
*/
|
|
158
|
-
this.virtualScrollHeight = input(this.config?.virtualScrollHeight ?? '400px', { ...(ngDevMode ? { debugName: "virtualScrollHeight" } : {}), transform: XToCssPixelValue });
|
|
167
|
+
this.virtualScrollHeight = input(this.config?.virtualScrollHeight ?? '400px', { ...(ngDevMode ? { debugName: "virtualScrollHeight" } : /* istanbul ignore next */ {}), transform: XToCssPixelValue });
|
|
159
168
|
/**
|
|
160
169
|
* @zh_CN 虚拟滚动高度自适应指定元素
|
|
161
170
|
* @en_US virtual rolling height follows the specified object
|
|
162
171
|
*/
|
|
163
|
-
this.heightAdaption = input(
|
|
172
|
+
this.heightAdaption = input(/* @ts-ignore */
|
|
173
|
+
...(ngDevMode ? [undefined, { debugName: "heightAdaption" }] : /* istanbul ignore next */ []));
|
|
164
174
|
/**
|
|
165
175
|
* @zh_CN itemSize,对应 cdk scroll 中的参数,开启虚拟滚动才生效
|
|
166
176
|
* @en_US itemSize,corresponding to the parameters in cdk scroll
|
|
167
177
|
*/
|
|
168
|
-
this.itemSize = input(this.config?.itemSize ?? 34, { ...(ngDevMode ? { debugName: "itemSize" } : {}), transform: XToNumber });
|
|
178
|
+
this.itemSize = input(this.config?.itemSize ?? 34, { ...(ngDevMode ? { debugName: "itemSize" } : /* istanbul ignore next */ {}), transform: XToNumber });
|
|
169
179
|
/**
|
|
170
180
|
* @zh_CN 超出可视窗口缓冲区的最小值,对应 cdk scroll 中的参数,开启虚拟滚动才生效
|
|
171
181
|
* @en_US Exceed the minimum value of the visible window buffer, corresponding to the parameters in cdk scroll
|
|
172
182
|
*/
|
|
173
|
-
this.minBufferPx = input(100, { ...(ngDevMode ? { debugName: "minBufferPx" } : {}), transform: XToNumber });
|
|
183
|
+
this.minBufferPx = input(100, { ...(ngDevMode ? { debugName: "minBufferPx" } : /* istanbul ignore next */ {}), transform: XToNumber });
|
|
174
184
|
/**
|
|
175
185
|
* @zh_CN 渲染新数据缓冲区的像素,对应 cdk scroll 中的参数,开启虚拟滚动才生效
|
|
176
186
|
* @en_US Render the pixels of the new data buffer, corresponding to the parameters in cdk scroll
|
|
177
187
|
*/
|
|
178
|
-
this.maxBufferPx = input(200, { ...(ngDevMode ? { debugName: "maxBufferPx" } : {}), transform: XToNumber });
|
|
188
|
+
this.maxBufferPx = input(200, { ...(ngDevMode ? { debugName: "maxBufferPx" } : /* istanbul ignore next */ {}), transform: XToNumber });
|
|
179
189
|
/**
|
|
180
190
|
* @zh_CN 多选功能,当前激活的节点可以是多个
|
|
181
191
|
* @en_US Multiple choice
|
|
182
192
|
*/
|
|
183
|
-
this.multiple = input(false, { ...(ngDevMode ? { debugName: "multiple" } : {}), transform: XToBoolean });
|
|
193
|
+
this.multiple = input(false, { ...(ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {}), transform: XToBoolean });
|
|
184
194
|
/**
|
|
185
195
|
* @zh_CN 当开启多选的时候,activatedId 的值为对象数组
|
|
186
196
|
* @en_US When multiple selection is enabled, the value of activatedId is an array of objects
|
|
187
197
|
*/
|
|
188
|
-
this.objectArray = input(false, { ...(ngDevMode ? { debugName: "objectArray" } : {}), transform: XToBoolean });
|
|
198
|
+
this.objectArray = input(false, { ...(ngDevMode ? { debugName: "objectArray" } : /* istanbul ignore next */ {}), transform: XToBoolean });
|
|
189
199
|
/**
|
|
190
200
|
* @zh_CN 当开启多选的时候,点击父节点,包含子节点
|
|
191
201
|
* @en_US When selecting multiple options, click on the parent node to include the child nodes
|
|
192
202
|
*/
|
|
193
|
-
this.includeChildren = input(this.config?.includeChildren ?? false, { ...(ngDevMode ? { debugName: "includeChildren" } : {}), transform: XToBoolean });
|
|
203
|
+
this.includeChildren = input(this.config?.includeChildren ?? false, { ...(ngDevMode ? { debugName: "includeChildren" } : /* istanbul ignore next */ {}), transform: XToBoolean });
|
|
194
204
|
/**
|
|
195
205
|
* @zh_CN 关键字高亮,针对下拉树搜索
|
|
196
206
|
* @en_US Keyword highlighting
|
|
197
207
|
*/
|
|
198
|
-
this.keywordText = input(
|
|
208
|
+
this.keywordText = input(/* @ts-ignore */
|
|
209
|
+
...(ngDevMode ? [undefined, { debugName: "keywordText" }] : /* istanbul ignore next */ []));
|
|
199
210
|
/**
|
|
200
211
|
* @zh_CN 匹配关键字区分大小写,针对下拉树搜索
|
|
201
212
|
* @en_US Case-sensitive
|
|
202
213
|
*/
|
|
203
|
-
this.caseSensitive = input(this.config?.caseSensitive ?? true, { ...(ngDevMode ? { debugName: "caseSensitive" } : {}), transform: XToBoolean });
|
|
214
|
+
this.caseSensitive = input(this.config?.caseSensitive ?? true, { ...(ngDevMode ? { debugName: "caseSensitive" } : /* istanbul ignore next */ {}), transform: XToBoolean });
|
|
204
215
|
/**
|
|
205
216
|
* @zh_CN 只能选择叶子节点
|
|
206
217
|
* @en_US Only leaf nodes can be selected
|
|
207
218
|
*/
|
|
208
|
-
this.onlyLeaf = input(this.config?.onlyLeaf ?? false, { ...(ngDevMode ? { debugName: "onlyLeaf" } : {}), transform: XToBoolean });
|
|
219
|
+
this.onlyLeaf = input(this.config?.onlyLeaf ?? false, { ...(ngDevMode ? { debugName: "onlyLeaf" } : /* istanbul ignore next */ {}), transform: XToBoolean });
|
|
209
220
|
/**
|
|
210
221
|
* @zh_CN 展开收起的图标自定义模版
|
|
211
222
|
* @en_US Expand the folded icon custom template
|
|
212
223
|
*/
|
|
213
|
-
this.expandedIcon = input(
|
|
224
|
+
this.expandedIcon = input(/* @ts-ignore */
|
|
225
|
+
...(ngDevMode ? [undefined, { debugName: "expandedIcon" }] : /* istanbul ignore next */ []));
|
|
214
226
|
/**
|
|
215
227
|
* @zh_CN 显示连接线
|
|
216
228
|
* @en_US Show line
|
|
217
229
|
*/
|
|
218
|
-
this.showLine = input(this.config?.showLine ?? false, { ...(ngDevMode ? { debugName: "showLine" } : {}), transform: XToBoolean });
|
|
230
|
+
this.showLine = input(this.config?.showLine ?? false, { ...(ngDevMode ? { debugName: "showLine" } : /* istanbul ignore next */ {}), transform: XToBoolean });
|
|
219
231
|
/**
|
|
220
232
|
* @zh_CN 排序属性
|
|
221
233
|
* @en_US Order property
|
|
222
234
|
*/
|
|
223
|
-
this.order = input(this.config?.order ?? X_TREE_ORDER_DEFAULT,
|
|
235
|
+
this.order = input(this.config?.order ?? X_TREE_ORDER_DEFAULT, /* @ts-ignore */
|
|
236
|
+
...(ngDevMode ? [{ debugName: "order" }] : /* istanbul ignore next */ []));
|
|
224
237
|
/**
|
|
225
238
|
* @zh_CN 节点点击事件
|
|
226
239
|
* @en_US Node click event
|
|
@@ -242,10 +255,10 @@ class XTreeProperty extends XPropertyFunction(X_TREE_CONFIG_NAME) {
|
|
|
242
255
|
*/
|
|
243
256
|
this.nodeDragMoved = output();
|
|
244
257
|
}
|
|
245
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
246
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
258
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XTreeProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
259
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.1", 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 }); }
|
|
247
260
|
}
|
|
248
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
261
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XTreeProperty, decorators: [{
|
|
249
262
|
type: Component,
|
|
250
263
|
args: [{ selector: `${XTreePrefix}-property`, template: '' }]
|
|
251
264
|
}], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], checkbox: [{ type: i0.Input, args: [{ isSignal: true, alias: "checkbox", required: false }] }], lazy: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazy", required: false }] }], activatedId: [{ type: i0.Input, args: [{ isSignal: true, alias: "activatedId", required: false }] }, { type: i0.Output, args: ["activatedIdChange"] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }, { type: i0.Output, args: ["expandedChange"] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], expandedAll: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandedAll", required: false }] }], expandedLevel: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandedLevel", required: false }] }], nodeOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodeOpen", required: false }] }], spacing: [{ type: i0.Input, args: [{ isSignal: true, alias: "spacing", required: false }] }], labelTpl: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelTpl", required: false }] }], nodeHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodeHeight", required: false }] }], allowManyActivated: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowManyActivated", required: false }] }], drag: [{ type: i0.Input, args: [{ isSignal: true, alias: "drag", required: false }] }], activatedChange: [{ type: i0.Output, args: ["activatedChange"] }], checkboxChange: [{ type: i0.Output, args: ["checkboxChange"] }], manual: [{ type: i0.Input, args: [{ isSignal: true, alias: "manual", required: false }] }, { type: i0.Output, args: ["manualChange"] }], levelCheck: [{ type: i0.Input, args: [{ isSignal: true, alias: "levelCheck", required: false }] }], nodeNowrap: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodeNowrap", required: false }] }], nodeAlignItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodeAlignItems", required: false }] }], actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], scrollElement: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollElement", required: false }] }], virtualScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScroll", required: false }] }], virtualScrollHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScrollHeight", required: false }] }], heightAdaption: [{ type: i0.Input, args: [{ isSignal: true, alias: "heightAdaption", required: false }] }], itemSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemSize", required: false }] }], minBufferPx: [{ type: i0.Input, args: [{ isSignal: true, alias: "minBufferPx", required: false }] }], maxBufferPx: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxBufferPx", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], objectArray: [{ type: i0.Input, args: [{ isSignal: true, alias: "objectArray", required: false }] }], includeChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "includeChildren", required: false }] }], keywordText: [{ type: i0.Input, args: [{ isSignal: true, alias: "keywordText", required: false }] }], caseSensitive: [{ type: i0.Input, args: [{ isSignal: true, alias: "caseSensitive", required: false }] }], onlyLeaf: [{ type: i0.Input, args: [{ isSignal: true, alias: "onlyLeaf", required: false }] }], expandedIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandedIcon", required: false }] }], showLine: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLine", required: false }] }], order: [{ type: i0.Input, args: [{ isSignal: true, alias: "order", required: false }] }], nodeClick: [{ type: i0.Output, args: ["nodeClick"] }], nodeDragStarted: [{ type: i0.Output, args: ["nodeDragStarted"] }], nodeDragEnded: [{ type: i0.Output, args: ["nodeDragEnded"] }], nodeDragMoved: [{ type: i0.Output, args: ["nodeDragMoved"] }] } });
|
|
@@ -265,92 +278,110 @@ class XTreeNodeProperty extends XProperty {
|
|
|
265
278
|
* @zh_CN 节点数据
|
|
266
279
|
* @en_US Node data
|
|
267
280
|
*/
|
|
268
|
-
this.node = input({},
|
|
281
|
+
this.node = input({}, /* @ts-ignore */
|
|
282
|
+
...(ngDevMode ? [{ debugName: "node" }] : /* istanbul ignore next */ []));
|
|
269
283
|
/**
|
|
270
284
|
* @zh_CN 层级
|
|
271
285
|
* @en_US Level
|
|
272
286
|
*/
|
|
273
|
-
this.level = model(0,
|
|
287
|
+
this.level = model(0, /* @ts-ignore */
|
|
288
|
+
...(ngDevMode ? [{ debugName: "level" }] : /* istanbul ignore next */ []));
|
|
274
289
|
/**
|
|
275
290
|
* @zh_CN 节点的高度
|
|
276
291
|
* @en_US The height of the node
|
|
277
292
|
*/
|
|
278
|
-
this.nodeHeight = model('',
|
|
293
|
+
this.nodeHeight = model('', /* @ts-ignore */
|
|
294
|
+
...(ngDevMode ? [{ debugName: "nodeHeight" }] : /* istanbul ignore next */ []));
|
|
279
295
|
/**
|
|
280
296
|
* @zh_CN 节点内容不换行显示省略号
|
|
281
297
|
* @en_US Show ellipsis without wrapping
|
|
282
298
|
*/
|
|
283
|
-
this.nodeNowrap = model(false,
|
|
299
|
+
this.nodeNowrap = model(false, /* @ts-ignore */
|
|
300
|
+
...(ngDevMode ? [{ debugName: "nodeNowrap" }] : /* istanbul ignore next */ []));
|
|
284
301
|
/**
|
|
285
302
|
* @zh_CN 节点垂直对齐方式
|
|
286
303
|
* @en_US Show ellipsis without wrapping
|
|
287
304
|
*/
|
|
288
|
-
this.nodeAlignItems = model('center',
|
|
305
|
+
this.nodeAlignItems = model('center', /* @ts-ignore */
|
|
306
|
+
...(ngDevMode ? [{ debugName: "nodeAlignItems" }] : /* istanbul ignore next */ []));
|
|
289
307
|
/**
|
|
290
308
|
* @zh_CN 标记为虚拟滚动的节点
|
|
291
309
|
* @en_US Mark as a node of virtual rolling
|
|
292
310
|
*/
|
|
293
|
-
this.virtualScroll = model(false,
|
|
311
|
+
this.virtualScroll = model(false, /* @ts-ignore */
|
|
312
|
+
...(ngDevMode ? [{ debugName: "virtualScroll" }] : /* istanbul ignore next */ []));
|
|
294
313
|
/**
|
|
295
314
|
* @zh_CN 禁用
|
|
296
315
|
* @en_US Disabled
|
|
297
316
|
*/
|
|
298
|
-
this.disabled = model(false,
|
|
317
|
+
this.disabled = model(false, /* @ts-ignore */
|
|
318
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
299
319
|
/**
|
|
300
320
|
* @zh_CN id
|
|
301
321
|
* @en_US Id
|
|
302
322
|
*/
|
|
303
|
-
this.id = model(
|
|
323
|
+
this.id = model(/* @ts-ignore */
|
|
324
|
+
...(ngDevMode ? [undefined, { debugName: "id" }] : /* istanbul ignore next */ []));
|
|
304
325
|
/**
|
|
305
326
|
* @zh_CN pid
|
|
306
327
|
* @en_US pId
|
|
307
328
|
*/
|
|
308
|
-
this.pid = model(
|
|
329
|
+
this.pid = model(/* @ts-ignore */
|
|
330
|
+
...(ngDevMode ? [undefined, { debugName: "pid" }] : /* istanbul ignore next */ []));
|
|
309
331
|
/**
|
|
310
332
|
* @zh_CN 叶子节点
|
|
311
333
|
* @en_US A leaf node
|
|
312
334
|
*/
|
|
313
|
-
this.leaf = model(false,
|
|
335
|
+
this.leaf = model(false, /* @ts-ignore */
|
|
336
|
+
...(ngDevMode ? [{ debugName: "leaf" }] : /* istanbul ignore next */ []));
|
|
314
337
|
/**
|
|
315
338
|
* @zh_CN 节点的高度
|
|
316
339
|
* @en_US The height of the node
|
|
317
340
|
*/
|
|
318
|
-
this.height = model('',
|
|
341
|
+
this.height = model('', /* @ts-ignore */
|
|
342
|
+
...(ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []));
|
|
319
343
|
/**
|
|
320
344
|
* @zh_CN 节点垂直对齐方式
|
|
321
345
|
* @en_US Show ellipsis without wrapping
|
|
322
346
|
*/
|
|
323
|
-
this.alignItems = model(
|
|
347
|
+
this.alignItems = model(/* @ts-ignore */
|
|
348
|
+
...(ngDevMode ? [undefined, { debugName: "alignItems" }] : /* istanbul ignore next */ []));
|
|
324
349
|
/**
|
|
325
350
|
* @zh_CN 节点垂直对齐方式
|
|
326
351
|
* @en_US Show ellipsis without wrapping
|
|
327
352
|
*/
|
|
328
|
-
this.loading = model(false,
|
|
353
|
+
this.loading = model(false, /* @ts-ignore */
|
|
354
|
+
...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
329
355
|
/**
|
|
330
356
|
* @zh_CN 展开
|
|
331
357
|
* @en_US open
|
|
332
358
|
*/
|
|
333
|
-
this.open = model(false,
|
|
359
|
+
this.open = model(false, /* @ts-ignore */
|
|
360
|
+
...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
334
361
|
/**
|
|
335
362
|
* @zh_CN checkbox 是否选中
|
|
336
363
|
* @en_US whether checkbox is selected
|
|
337
364
|
*/
|
|
338
|
-
this.checked = model(false,
|
|
365
|
+
this.checked = model(false, /* @ts-ignore */
|
|
366
|
+
...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
|
|
339
367
|
/**
|
|
340
368
|
* @zh_CN checkbox 子节点是否有选中的状态
|
|
341
369
|
* @en_US Whether the child node of checkbox is selected
|
|
342
370
|
*/
|
|
343
|
-
this.indeterminate = model(false,
|
|
371
|
+
this.indeterminate = model(false, /* @ts-ignore */
|
|
372
|
+
...(ngDevMode ? [{ debugName: "indeterminate" }] : /* istanbul ignore next */ []));
|
|
344
373
|
/**
|
|
345
374
|
* @zh_CN 节点名称
|
|
346
375
|
* @en_US The name of the node
|
|
347
376
|
*/
|
|
348
|
-
this.label = model('',
|
|
377
|
+
this.label = model('', /* @ts-ignore */
|
|
378
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
349
379
|
/**
|
|
350
380
|
* @zh_CN 节点内容不换行显示省略号,优先级高于 tree 参数
|
|
351
381
|
* @en_US Show ellipsis without wrapping, highest priority
|
|
352
382
|
*/
|
|
353
|
-
this.nowrap = model(false,
|
|
383
|
+
this.nowrap = model(false, /* @ts-ignore */
|
|
384
|
+
...(ngDevMode ? [{ debugName: "nowrap" }] : /* istanbul ignore next */ []));
|
|
354
385
|
/**
|
|
355
386
|
* @zh_CN 节点展开收起事件
|
|
356
387
|
* @en_US Node expansion pack up
|
|
@@ -360,12 +391,13 @@ class XTreeNodeProperty extends XProperty {
|
|
|
360
391
|
* @zh_CN 树节点操作按钮
|
|
361
392
|
* @en_US Tree node operation buttons
|
|
362
393
|
*/
|
|
363
|
-
this.actions = input([],
|
|
394
|
+
this.actions = input([], /* @ts-ignore */
|
|
395
|
+
...(ngDevMode ? [{ debugName: "actions" }] : /* istanbul ignore next */ []));
|
|
364
396
|
}
|
|
365
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
366
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
397
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XTreeNodeProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
398
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.1", 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 }); }
|
|
367
399
|
}
|
|
368
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
400
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XTreeNodeProperty, decorators: [{
|
|
369
401
|
type: Component,
|
|
370
402
|
args: [{ selector: `${XTreeNodePrefix}-property`, template: '' }]
|
|
371
403
|
}], propDecorators: { node: [{ type: i0.Input, args: [{ isSignal: true, alias: "node", required: false }] }], level: [{ type: i0.Input, args: [{ isSignal: true, alias: "level", required: false }] }, { type: i0.Output, args: ["levelChange"] }], nodeHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodeHeight", required: false }] }, { type: i0.Output, args: ["nodeHeightChange"] }], nodeNowrap: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodeNowrap", required: false }] }, { type: i0.Output, args: ["nodeNowrapChange"] }], nodeAlignItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodeAlignItems", required: false }] }, { type: i0.Output, args: ["nodeAlignItemsChange"] }], virtualScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScroll", required: false }] }, { type: i0.Output, args: ["virtualScrollChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }, { type: i0.Output, args: ["disabledChange"] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }, { type: i0.Output, args: ["idChange"] }], pid: [{ type: i0.Input, args: [{ isSignal: true, alias: "pid", required: false }] }, { type: i0.Output, args: ["pidChange"] }], leaf: [{ type: i0.Input, args: [{ isSignal: true, alias: "leaf", required: false }] }, { type: i0.Output, args: ["leafChange"] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }, { type: i0.Output, args: ["heightChange"] }], alignItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "alignItems", required: false }] }, { type: i0.Output, args: ["alignItemsChange"] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }, { type: i0.Output, args: ["loadingChange"] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], indeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminate", required: false }] }, { type: i0.Output, args: ["indeterminateChange"] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }, { type: i0.Output, args: ["labelChange"] }], nowrap: [{ type: i0.Input, args: [{ isSignal: true, alias: "nowrap", required: false }] }, { type: i0.Output, args: ["nowrapChange"] }], toggle: [{ type: i0.Output, args: ["toggle"] }], actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }] } });
|
|
@@ -461,10 +493,10 @@ class XTreeService {
|
|
|
461
493
|
data.splice(pos === -1 ? index : index + 1, 0, from);
|
|
462
494
|
}
|
|
463
495
|
}
|
|
464
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
465
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
496
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XTreeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
497
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XTreeService, providedIn: 'root' }); }
|
|
466
498
|
}
|
|
467
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
499
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XTreeService, decorators: [{
|
|
468
500
|
type: Injectable,
|
|
469
501
|
args: [{ providedIn: 'root' }]
|
|
470
502
|
}] });
|
|
@@ -478,18 +510,21 @@ class XTreeNodeComponent extends XTreeNodeProperty {
|
|
|
478
510
|
this.nodeMouseenter = output();
|
|
479
511
|
this.rootClass = true;
|
|
480
512
|
this.document = inject(DOCUMENT);
|
|
481
|
-
this.fontSize = computed(() => parseFloat(XComputedStyle(this.document.documentElement, 'font-size')),
|
|
513
|
+
this.fontSize = computed(() => parseFloat(XComputedStyle(this.document.documentElement, 'font-size')), /* @ts-ignore */
|
|
514
|
+
...(ngDevMode ? [{ debugName: "fontSize" }] : /* istanbul ignore next */ []));
|
|
482
515
|
this.unSubject = new Subject();
|
|
483
516
|
this.showDragIndicator = computed(() => {
|
|
484
517
|
return this.tree.dragging() && this.tree.hoverTreeNode()?.id === this.id();
|
|
485
|
-
},
|
|
518
|
+
}, /* @ts-ignore */
|
|
519
|
+
...(ngDevMode ? [{ debugName: "showDragIndicator" }] : /* istanbul ignore next */ []));
|
|
486
520
|
this.isChildrenLast = computed(() => {
|
|
487
521
|
let parent = this.tree.nodes().find((x) => x.id === this.pid());
|
|
488
522
|
if (!parent || !parent.children)
|
|
489
523
|
return false;
|
|
490
524
|
const index = parent.children.indexOf(this.node());
|
|
491
525
|
return index + 1 === parent.children.length;
|
|
492
|
-
},
|
|
526
|
+
}, /* @ts-ignore */
|
|
527
|
+
...(ngDevMode ? [{ debugName: "isChildrenLast" }] : /* istanbul ignore next */ []));
|
|
493
528
|
this.isParentLast = computed(() => {
|
|
494
529
|
let parents = this.treeService.getParents(this.tree.nodes(), this.node());
|
|
495
530
|
if (parents.length <= 1)
|
|
@@ -503,7 +538,8 @@ class XTreeNodeComponent extends XTreeNodeProperty {
|
|
|
503
538
|
return curr;
|
|
504
539
|
});
|
|
505
540
|
return res.reverse();
|
|
506
|
-
},
|
|
541
|
+
}, /* @ts-ignore */
|
|
542
|
+
...(ngDevMode ? [{ debugName: "isParentLast" }] : /* istanbul ignore next */ []));
|
|
507
543
|
this.verticalLevel = computed(() => {
|
|
508
544
|
if (this.level() > 0) {
|
|
509
545
|
return Array.from({ length: this.level() }).map((_x, index) => index + 1);
|
|
@@ -511,17 +547,21 @@ class XTreeNodeComponent extends XTreeNodeProperty {
|
|
|
511
547
|
else {
|
|
512
548
|
return [];
|
|
513
549
|
}
|
|
514
|
-
},
|
|
550
|
+
}, /* @ts-ignore */
|
|
551
|
+
...(ngDevMode ? [{ debugName: "verticalLevel" }] : /* istanbul ignore next */ []));
|
|
515
552
|
this.verticalWidth = computed(() => {
|
|
516
553
|
return XToCssPx(this.tree.spacing(), this.fontSize()) / 2;
|
|
517
|
-
},
|
|
518
|
-
|
|
554
|
+
}, /* @ts-ignore */
|
|
555
|
+
...(ngDevMode ? [{ debugName: "verticalWidth" }] : /* istanbul ignore next */ []));
|
|
556
|
+
this.paddingLeft = computed(() => (this.level() ? this.level() : 0) * XToCssPx(this.tree.spacing(), this.fontSize()), /* @ts-ignore */
|
|
557
|
+
...(ngDevMode ? [{ debugName: "paddingLeft" }] : /* istanbul ignore next */ []));
|
|
519
558
|
this.indicatorWidth = computed(() => {
|
|
520
559
|
if (this.tree.dragPosition() === 0) {
|
|
521
560
|
return `calc(100% - ${this.paddingLeft() + XToCssPx(this.tree.spacing(), this.fontSize()) + (this.leaf() ? this.fontSize() * 1.5 : 0)}px)`;
|
|
522
561
|
}
|
|
523
562
|
return `calc(100% - ${this.paddingLeft() + (this.leaf() ? this.fontSize() * 1.5 : 0)}px)`;
|
|
524
|
-
},
|
|
563
|
+
}, /* @ts-ignore */
|
|
564
|
+
...(ngDevMode ? [{ debugName: "indicatorWidth" }] : /* istanbul ignore next */ []));
|
|
525
565
|
this.indicatorStyle = computed(() => {
|
|
526
566
|
if (this.tree.dragPosition() === 1) {
|
|
527
567
|
return { bottom: `-${0.0625 * this.fontSize()}px` };
|
|
@@ -535,8 +575,10 @@ class XTreeNodeComponent extends XTreeNodeProperty {
|
|
|
535
575
|
};
|
|
536
576
|
}
|
|
537
577
|
return {};
|
|
538
|
-
},
|
|
539
|
-
|
|
578
|
+
}, /* @ts-ignore */
|
|
579
|
+
...(ngDevMode ? [{ debugName: "indicatorStyle" }] : /* istanbul ignore next */ []));
|
|
580
|
+
this.changed = signal(false, /* @ts-ignore */
|
|
581
|
+
...(ngDevMode ? [{ debugName: "changed" }] : /* istanbul ignore next */ []));
|
|
540
582
|
this.activated = computed(() => {
|
|
541
583
|
this.changed();
|
|
542
584
|
const activatedId = this.tree.activatedId();
|
|
@@ -551,7 +593,8 @@ class XTreeNodeComponent extends XTreeNodeProperty {
|
|
|
551
593
|
else {
|
|
552
594
|
return activatedId === this.id();
|
|
553
595
|
}
|
|
554
|
-
},
|
|
596
|
+
}, /* @ts-ignore */
|
|
597
|
+
...(ngDevMode ? [{ debugName: "activated" }] : /* istanbul ignore next */ []));
|
|
555
598
|
this.cdr = inject(ChangeDetectorRef);
|
|
556
599
|
this.treeService = inject(XTreeService);
|
|
557
600
|
this.elementRef = inject(ElementRef);
|
|
@@ -759,10 +802,10 @@ class XTreeNodeComponent extends XTreeNodeProperty {
|
|
|
759
802
|
trackByAction(_index, item) {
|
|
760
803
|
return item.id;
|
|
761
804
|
}
|
|
762
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
763
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: XTreeNodeComponent, isStandalone: true, selector: "x-tree-node, [x-tree-node]", outputs: { nodeMouseenter: "nodeMouseenter" }, host: { listeners: { "mouseenter": "onMouseenter($event)", "mouseleave": "onMouseleave($event)" }, 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 }); }
|
|
805
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XTreeNodeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
806
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: XTreeNodeComponent, isStandalone: true, selector: "x-tree-node, [x-tree-node]", outputs: { nodeMouseenter: "nodeMouseenter" }, host: { listeners: { "mouseenter": "onMouseenter($event)", "mouseleave": "onMouseleave($event)" }, 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
807
|
}
|
|
765
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
808
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XTreeNodeComponent, decorators: [{
|
|
766
809
|
type: Component,
|
|
767
810
|
args: [{ selector: `${XTreeNodePrefix}, [${XTreeNodePrefix}]`, imports: [
|
|
768
811
|
NgStyle,
|
|
@@ -791,28 +834,43 @@ class XTreeComponent extends XTreeProperty {
|
|
|
791
834
|
this.elementRef = elementRef;
|
|
792
835
|
this.cdr = cdr;
|
|
793
836
|
this.treeService = treeService;
|
|
794
|
-
this.tree = viewChild('tree', { ...(ngDevMode ? { debugName: "tree" } : {}), read: (ElementRef) });
|
|
795
|
-
this.virtualBody = viewChild('virtualBody', { ...(ngDevMode ? { debugName: "virtualBody" } : {}), read: CdkVirtualScrollViewport });
|
|
796
|
-
this.dropList = viewChild('dropList', { ...(ngDevMode ? { debugName: "dropList" } : {}), read: (CdkDropList) });
|
|
797
|
-
this.nodeComponents = viewChildren(XTreeNodeComponent,
|
|
837
|
+
this.tree = viewChild('tree', { ...(ngDevMode ? { debugName: "tree" } : /* istanbul ignore next */ {}), read: (ElementRef) });
|
|
838
|
+
this.virtualBody = viewChild('virtualBody', { ...(ngDevMode ? { debugName: "virtualBody" } : /* istanbul ignore next */ {}), read: CdkVirtualScrollViewport });
|
|
839
|
+
this.dropList = viewChild('dropList', { ...(ngDevMode ? { debugName: "dropList" } : /* istanbul ignore next */ {}), read: (CdkDropList) });
|
|
840
|
+
this.nodeComponents = viewChildren(XTreeNodeComponent, /* @ts-ignore */
|
|
841
|
+
...(ngDevMode ? [{ debugName: "nodeComponents" }] : /* istanbul ignore next */ []));
|
|
798
842
|
this.document = inject(DOCUMENT);
|
|
799
|
-
this.fontSize = computed(() => parseFloat(XComputedStyle(this.document.documentElement, 'font-size')),
|
|
800
|
-
|
|
801
|
-
this.
|
|
802
|
-
|
|
803
|
-
this.
|
|
804
|
-
|
|
805
|
-
this.
|
|
806
|
-
|
|
807
|
-
this.
|
|
808
|
-
|
|
809
|
-
this.
|
|
810
|
-
|
|
843
|
+
this.fontSize = computed(() => parseFloat(XComputedStyle(this.document.documentElement, 'font-size')), /* @ts-ignore */
|
|
844
|
+
...(ngDevMode ? [{ debugName: "fontSize" }] : /* istanbul ignore next */ []));
|
|
845
|
+
this.nodes = signal([], /* @ts-ignore */
|
|
846
|
+
...(ngDevMode ? [{ debugName: "nodes" }] : /* istanbul ignore next */ []));
|
|
847
|
+
this.virtualNodes = signal([], /* @ts-ignore */
|
|
848
|
+
...(ngDevMode ? [{ debugName: "virtualNodes" }] : /* istanbul ignore next */ []));
|
|
849
|
+
this.activatedNode = signal(null, /* @ts-ignore */
|
|
850
|
+
...(ngDevMode ? [{ debugName: "activatedNode" }] : /* istanbul ignore next */ []));
|
|
851
|
+
this.dataIsFunc = signal(false, /* @ts-ignore */
|
|
852
|
+
...(ngDevMode ? [{ debugName: "dataIsFunc" }] : /* istanbul ignore next */ []));
|
|
853
|
+
this.getting = signal(false, /* @ts-ignore */
|
|
854
|
+
...(ngDevMode ? [{ debugName: "getting" }] : /* istanbul ignore next */ []));
|
|
855
|
+
this.treeData = signal([], /* @ts-ignore */
|
|
856
|
+
...(ngDevMode ? [{ debugName: "treeData" }] : /* istanbul ignore next */ []));
|
|
857
|
+
this.dragging = signal(false, /* @ts-ignore */
|
|
858
|
+
...(ngDevMode ? [{ debugName: "dragging" }] : /* istanbul ignore next */ []));
|
|
859
|
+
this.dragPosition = signal(-1, /* @ts-ignore */
|
|
860
|
+
...(ngDevMode ? [{ debugName: "dragPosition" }] : /* istanbul ignore next */ []));
|
|
861
|
+
this.hoverTreeNode = signal(null, /* @ts-ignore */
|
|
862
|
+
...(ngDevMode ? [{ debugName: "hoverTreeNode" }] : /* istanbul ignore next */ []));
|
|
863
|
+
this.draggingTreeNode = signal(null, /* @ts-ignore */
|
|
864
|
+
...(ngDevMode ? [{ debugName: "draggingTreeNode" }] : /* istanbul ignore next */ []));
|
|
865
|
+
this.isEmpty = computed(() => XIsEmpty(this.nodes()), /* @ts-ignore */
|
|
866
|
+
...(ngDevMode ? [{ debugName: "isEmpty" }] : /* istanbul ignore next */ []));
|
|
811
867
|
this.unSubject = new Subject();
|
|
812
|
-
this.heightAdaptionSignal = signal(0,
|
|
868
|
+
this.heightAdaptionSignal = signal(0, /* @ts-ignore */
|
|
869
|
+
...(ngDevMode ? [{ debugName: "heightAdaptionSignal" }] : /* istanbul ignore next */ []));
|
|
813
870
|
this.isVirtualScrollAdaption = computed(() => {
|
|
814
871
|
return !!(this.virtualScroll() && this.heightAdaption());
|
|
815
|
-
},
|
|
872
|
+
}, /* @ts-ignore */
|
|
873
|
+
...(ngDevMode ? [{ debugName: "isVirtualScrollAdaption" }] : /* istanbul ignore next */ []));
|
|
816
874
|
this.virtualScrollHeightSignal = computed(() => {
|
|
817
875
|
if (this.isVirtualScrollAdaption()) {
|
|
818
876
|
return this.heightAdaptionSignal();
|
|
@@ -820,7 +878,8 @@ class XTreeComponent extends XTreeProperty {
|
|
|
820
878
|
else {
|
|
821
879
|
return XToCssPx(this.virtualScrollHeight(), this.fontSize());
|
|
822
880
|
}
|
|
823
|
-
},
|
|
881
|
+
}, /* @ts-ignore */
|
|
882
|
+
...(ngDevMode ? [{ debugName: "virtualScrollHeightSignal" }] : /* istanbul ignore next */ []));
|
|
824
883
|
this.minBufferPxSignal = computed(() => {
|
|
825
884
|
if (this.isVirtualScrollAdaption()) {
|
|
826
885
|
return this.virtualScrollHeightSignal();
|
|
@@ -828,7 +887,8 @@ class XTreeComponent extends XTreeProperty {
|
|
|
828
887
|
else {
|
|
829
888
|
return this.minBufferPx();
|
|
830
889
|
}
|
|
831
|
-
},
|
|
890
|
+
}, /* @ts-ignore */
|
|
891
|
+
...(ngDevMode ? [{ debugName: "minBufferPxSignal" }] : /* istanbul ignore next */ []));
|
|
832
892
|
this.maxBufferPxSignal = computed(() => {
|
|
833
893
|
if (this.isVirtualScrollAdaption()) {
|
|
834
894
|
return this.virtualScrollHeightSignal() * 1.2;
|
|
@@ -836,7 +896,8 @@ class XTreeComponent extends XTreeProperty {
|
|
|
836
896
|
else {
|
|
837
897
|
return this.maxBufferPx();
|
|
838
898
|
}
|
|
839
|
-
},
|
|
899
|
+
}, /* @ts-ignore */
|
|
900
|
+
...(ngDevMode ? [{ debugName: "maxBufferPxSignal" }] : /* istanbul ignore next */ []));
|
|
840
901
|
effect(() => {
|
|
841
902
|
const virtualBody = this.virtualBody();
|
|
842
903
|
if (virtualBody) {
|
|
@@ -1356,15 +1417,15 @@ class XTreeComponent extends XTreeProperty {
|
|
|
1356
1417
|
trackByItem(_index, item) {
|
|
1357
1418
|
return item;
|
|
1358
1419
|
}
|
|
1359
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1360
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1420
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XTreeComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: XTreeService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1421
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: XTreeComponent, isStandalone: true, selector: "x-tree", providers: [
|
|
1361
1422
|
{
|
|
1362
1423
|
provide: X_TREE_CONTEXT,
|
|
1363
1424
|
useExisting: XTreeComponent
|
|
1364
1425
|
}
|
|
1365
1426
|
], 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 }); }
|
|
1366
1427
|
}
|
|
1367
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1428
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XTreeComponent, decorators: [{
|
|
1368
1429
|
type: Component,
|
|
1369
1430
|
args: [{ selector: `${XTreePrefix}`, imports: [DragDropModule, ScrollingModule, XTreeNodeComponent, XIconComponent], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
1370
1431
|
{
|
|
@@ -1375,11 +1436,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
|
|
|
1375
1436
|
}], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: XTreeService }], propDecorators: { tree: [{ type: i0.ViewChild, args: ['tree', { ...{ read: (ElementRef) }, isSignal: true }] }], virtualBody: [{ type: i0.ViewChild, args: ['virtualBody', { ...{ read: CdkVirtualScrollViewport }, isSignal: true }] }], dropList: [{ type: i0.ViewChild, args: ['dropList', { ...{ read: (CdkDropList) }, isSignal: true }] }], nodeComponents: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => XTreeNodeComponent), { isSignal: true }] }] } });
|
|
1376
1437
|
|
|
1377
1438
|
class XTreeModule {
|
|
1378
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1379
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
1380
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1439
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XTreeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1440
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.1", ngImport: i0, type: XTreeModule, imports: [XTreeComponent, XTreeNodeComponent], exports: [XTreeComponent, XTreeNodeComponent] }); }
|
|
1441
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XTreeModule, imports: [XTreeComponent, XTreeNodeComponent] }); }
|
|
1381
1442
|
}
|
|
1382
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1443
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XTreeModule, decorators: [{
|
|
1383
1444
|
type: NgModule,
|
|
1384
1445
|
args: [{
|
|
1385
1446
|
exports: [XTreeComponent, XTreeNodeComponent],
|