@masterteam/components 0.0.116 → 0.0.117
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/assets/common.css +172 -2
- package/fesm2022/masterteam-components-business-fields.mjs +1 -1
- package/fesm2022/masterteam-components-business-fields.mjs.map +1 -1
- package/fesm2022/masterteam-components-entities.mjs +8 -4
- package/fesm2022/masterteam-components-entities.mjs.map +1 -1
- package/fesm2022/masterteam-components-table.mjs +28 -16
- package/fesm2022/masterteam-components-table.mjs.map +1 -1
- package/package.json +16 -16
- package/types/masterteam-components-entities.d.ts +2 -1
- package/types/masterteam-components-table.d.ts +4 -1
- package/fesm2022/masterteam-components-sidebar.mjs +0 -36
- package/fesm2022/masterteam-components-sidebar.mjs.map +0 -1
- package/fesm2022/masterteam-components-slider-field.mjs +0 -104
- package/fesm2022/masterteam-components-slider-field.mjs.map +0 -1
- package/fesm2022/masterteam-components-statistic-card.mjs +0 -22
- package/fesm2022/masterteam-components-statistic-card.mjs.map +0 -1
- package/fesm2022/masterteam-components-textarea-field.mjs +0 -92
- package/fesm2022/masterteam-components-textarea-field.mjs.map +0 -1
- package/fesm2022/masterteam-components-toast.mjs +0 -75
- package/fesm2022/masterteam-components-toast.mjs.map +0 -1
- package/fesm2022/masterteam-components-topbar.mjs +0 -28
- package/fesm2022/masterteam-components-topbar.mjs.map +0 -1
- package/fesm2022/masterteam-components-tree.mjs +0 -219
- package/fesm2022/masterteam-components-tree.mjs.map +0 -1
- package/types/masterteam-components-sidebar.d.ts +0 -28
- package/types/masterteam-components-slider-field.d.ts +0 -45
- package/types/masterteam-components-statistic-card.d.ts +0 -18
- package/types/masterteam-components-textarea-field.d.ts +0 -38
- package/types/masterteam-components-toast.d.ts +0 -26
- package/types/masterteam-components-topbar.d.ts +0 -17
- package/types/masterteam-components-tree.d.ts +0 -98
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"masterteam-components-topbar.mjs","sources":["../../../../packages/masterteam/components/topbar/topbar.ts","../../../../packages/masterteam/components/topbar/topbar.html","../../../../packages/masterteam/components/topbar/masterteam-components-topbar.ts"],"sourcesContent":["import { booleanAttribute, Component, input } from '@angular/core';\r\nimport { RouterLink } from '@angular/router';\r\n\r\n@Component({\r\n selector: 'mt-topbar',\r\n standalone: true,\r\n imports: [RouterLink],\r\n templateUrl: './topbar.html',\r\n})\r\nexport class Topbar {\r\n logo = input<string>();\r\n logoLink = input<string | any[]>();\r\n bgColor = input<string>('var(--p-primary-color)');\r\n bgImage = input<string>();\r\n bgRepeat = input<boolean, unknown>(false, { transform: booleanAttribute });\r\n textColor = input<string>('var(--p-primary-contrast-color)');\r\n title = input<string>();\r\n subTitle = input<string>();\r\n showBranding = input<boolean, unknown>(true, { transform: booleanAttribute });\r\n}\r\n","<div\r\n class=\"w-full flex justify-between align-center bg-primary p-4 h-[var(--header-height)]\"\r\n [style.backgroundColor]=\"bgColor()\"\r\n [style.backgroundImage]=\"bgImage() ? 'url(' + bgImage() + ')' : null\"\r\n [class.bg-no-repeat]=\"!bgRepeat()\"\r\n [class.bg-repeat]=\"bgRepeat()\"\r\n>\r\n <div class=\"flex gap-4 items-center\" [style.color]=\"textColor()\">\r\n <div\r\n class=\"flex gap-4 items-center h-full overflow-hidden transition-all duration-400 ease-in-out\"\r\n [class.max-w-0]=\"!showBranding()\"\r\n [class.opacity-0]=\"!showBranding()\"\r\n [class.max-w-lg]=\"showBranding()\"\r\n [class.opacity-100]=\"showBranding()\"\r\n >\r\n @if (logo()) {\r\n <img\r\n [src]=\"logo()\"\r\n alt=\"Logo\"\r\n class=\"h-full shrink-0\"\r\n [routerLink]=\"logoLink()\"\r\n [class.cursor-pointer]=\"logoLink()\"\r\n />\r\n }\r\n @if (logo() && (title() || subTitle())) {\r\n <div class=\"h-3/4 w-[1px] bg-current shrink-0\"></div>\r\n }\r\n @if (title() || subTitle()) {\r\n <div class=\"flex flex-col shrink-0\">\r\n <h2 class=\"text-md font-semibold product-name whitespace-nowrap\">\r\n {{ title() }}\r\n </h2>\r\n <span class=\"text-sm product-tagline whitespace-nowrap\">{{\r\n subTitle()\r\n }}</span>\r\n </div>\r\n }\r\n </div>\r\n <ng-content select=\"[start]\"></ng-content>\r\n </div>\r\n <div class=\"flex gap-2 items-center\">\r\n <ng-content select=\"[actions]\"></ng-content>\r\n </div>\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MASa,MAAM,CAAA;IACjB,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;IACtB,QAAQ,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,UAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAkB;AAClC,IAAA,OAAO,GAAG,KAAK,CAAS,wBAAwB,mDAAC;IACjD,OAAO,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,SAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;IACzB,QAAQ,GAAG,KAAK,CAAmB,KAAK,qDAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAC1E,IAAA,SAAS,GAAG,KAAK,CAAS,iCAAiC,qDAAC;IAC5D,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;IACvB,QAAQ,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,UAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;IAC1B,YAAY,GAAG,KAAK,CAAmB,IAAI,yDAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;uGATlE,MAAM,EAAA,IAAA,E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,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,YAAA,EAAA,EAAA,iBAAA,EAAA,cAAA,EAAA,UAAA,EAAA,cAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECTnB,gnDA4CA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDtCY,UAAU,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,aAAA,EAAA,UAAA,EAAA,qBAAA,EAAA,OAAA,EAAA,MAAA,EAAA,YAAA,EAAA,kBAAA,EAAA,oBAAA,EAAA,YAAA,EAAA,YAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAGT,MAAM,EAAA,UAAA,EAAA,CAAA;kBANlB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,WAAW,EAAA,UAAA,EACT,IAAI,EAAA,OAAA,EACP,CAAC,UAAU,CAAC,EAAA,QAAA,EAAA,gnDAAA,EAAA;;;AENvB;;AAEG;;;;"}
|
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
import { ToggleField } from '@masterteam/components/toggle-field';
|
|
2
|
-
import { Avatar } from '@masterteam/components/avatar';
|
|
3
|
-
import { Button } from '@masterteam/components/button';
|
|
4
|
-
import * as i0 from '@angular/core';
|
|
5
|
-
import { inject, viewChild, input, model, computed, output, signal, effect, Component } from '@angular/core';
|
|
6
|
-
import * as i1 from 'primeng/tree';
|
|
7
|
-
import { TreeModule } from 'primeng/tree';
|
|
8
|
-
import { Icon } from '@masterteam/icons';
|
|
9
|
-
import { CommonModule } from '@angular/common';
|
|
10
|
-
import { Directionality } from '@angular/cdk/bidi';
|
|
11
|
-
import * as i3 from '@angular/forms';
|
|
12
|
-
import { FormsModule } from '@angular/forms';
|
|
13
|
-
import * as i4 from 'primeng/contextmenu';
|
|
14
|
-
import { ContextMenuModule } from 'primeng/contextmenu';
|
|
15
|
-
import { TranslocoService, TranslocoModule } from '@jsverse/transloco';
|
|
16
|
-
import * as i2 from 'primeng/api';
|
|
17
|
-
|
|
18
|
-
class Tree {
|
|
19
|
-
transloco = inject(TranslocoService);
|
|
20
|
-
dir = inject(Directionality, { optional: true });
|
|
21
|
-
primeTree = viewChild('primeTree', ...(ngDevMode ? [{ debugName: "primeTree" }] : []));
|
|
22
|
-
value = input.required(...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
23
|
-
selection = model(...(ngDevMode ? [undefined, { debugName: "selection" }] : []));
|
|
24
|
-
selectionMode = input(...(ngDevMode ? [undefined, { debugName: "selectionMode" }] : []));
|
|
25
|
-
nodeIcon = input(...(ngDevMode ? [undefined, { debugName: "nodeIcon" }] : []));
|
|
26
|
-
propagateSelectionUp = input(false, ...(ngDevMode ? [{ debugName: "propagateSelectionUp" }] : []));
|
|
27
|
-
propagateSelectionDown = input(false, ...(ngDevMode ? [{ debugName: "propagateSelectionDown" }] : []));
|
|
28
|
-
checkAllChildren = input(false, ...(ngDevMode ? [{ debugName: "checkAllChildren" }] : []));
|
|
29
|
-
loading = input(false, ...(ngDevMode ? [{ debugName: "loading" }] : []));
|
|
30
|
-
emptyMessage = input(this.transloco.translate('components.tree.no-data-found'), ...(ngDevMode ? [{ debugName: "emptyMessage" }] : []));
|
|
31
|
-
checkAllLabel = input(this.transloco.translate('components.tree.check-all'), ...(ngDevMode ? [{ debugName: "checkAllLabel" }] : []));
|
|
32
|
-
filterPlaceholder = input(this.transloco.translate('components.tree.search'), ...(ngDevMode ? [{ debugName: "filterPlaceholder" }] : []));
|
|
33
|
-
dataKey = input('key', ...(ngDevMode ? [{ debugName: "dataKey" }] : []));
|
|
34
|
-
filter = input(false, ...(ngDevMode ? [{ debugName: "filter" }] : []));
|
|
35
|
-
filterMode = input('lenient', ...(ngDevMode ? [{ debugName: "filterMode" }] : []));
|
|
36
|
-
styleClass = input('', ...(ngDevMode ? [{ debugName: "styleClass" }] : []));
|
|
37
|
-
style = input(...(ngDevMode ? [undefined, { debugName: "style" }] : []));
|
|
38
|
-
pInputs = input(...(ngDevMode ? [undefined, { debugName: "pInputs" }] : []));
|
|
39
|
-
nodeActions = input([], ...(ngDevMode ? [{ debugName: "nodeActions" }] : []));
|
|
40
|
-
nodeContextmenuActions = input([], ...(ngDevMode ? [{ debugName: "nodeContextmenuActions" }] : []));
|
|
41
|
-
// Context menu state
|
|
42
|
-
contextMenuSelection = model(null, ...(ngDevMode ? [{ debugName: "contextMenuSelection" }] : []));
|
|
43
|
-
contextMenuItems = computed(() => {
|
|
44
|
-
const actions = this.nodeContextmenuActions();
|
|
45
|
-
return actions.map((action) => ({
|
|
46
|
-
label: action.label,
|
|
47
|
-
icon: action.icon,
|
|
48
|
-
command: () => {
|
|
49
|
-
const node = this.contextMenuSelection();
|
|
50
|
-
if (node) {
|
|
51
|
-
action.action(node);
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
}));
|
|
55
|
-
}, ...(ngDevMode ? [{ debugName: "contextMenuItems" }] : []));
|
|
56
|
-
action = output();
|
|
57
|
-
CheckAllValue = signal(false, ...(ngDevMode ? [{ debugName: "CheckAllValue" }] : []));
|
|
58
|
-
// Computed tree value with "Check All" nodes added recursively to all parents
|
|
59
|
-
treeValue = computed(() => {
|
|
60
|
-
const nodes = this.value();
|
|
61
|
-
const shouldAddCheckAll = this.checkAllChildren() && this.selectionMode() === 'checkbox';
|
|
62
|
-
if (!shouldAddCheckAll) {
|
|
63
|
-
return nodes;
|
|
64
|
-
}
|
|
65
|
-
// Recursively add "Check All" child to any parent node
|
|
66
|
-
const addCheckAllRecursive = (node) => {
|
|
67
|
-
if (node.children && node.children.length > 0) {
|
|
68
|
-
const checkAllNode = {
|
|
69
|
-
key: `${node.key}-check-all`,
|
|
70
|
-
label: this.checkAllLabel(),
|
|
71
|
-
icon: 'general.check-square-broken',
|
|
72
|
-
data: node,
|
|
73
|
-
};
|
|
74
|
-
return {
|
|
75
|
-
...node,
|
|
76
|
-
children: [checkAllNode, ...node.children.map(addCheckAllRecursive)],
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
return node;
|
|
80
|
-
};
|
|
81
|
-
// Transform all nodes
|
|
82
|
-
const transformedNodes = nodes.map(addCheckAllRecursive);
|
|
83
|
-
// Add "Check All" for entire tree at the beginning
|
|
84
|
-
const treeCheckAllNode = {
|
|
85
|
-
key: 'tree-check-all',
|
|
86
|
-
label: this.checkAllLabel(),
|
|
87
|
-
icon: 'general.check-square-broken',
|
|
88
|
-
data: { isTreeRoot: true, children: transformedNodes },
|
|
89
|
-
};
|
|
90
|
-
return [treeCheckAllNode, ...transformedNodes];
|
|
91
|
-
}, ...(ngDevMode ? [{ debugName: "treeValue" }] : []));
|
|
92
|
-
constructor() {
|
|
93
|
-
// Apply pInputs to the PrimeNG tree instance
|
|
94
|
-
effect(() => {
|
|
95
|
-
const tree = this.primeTree();
|
|
96
|
-
const inputs = this.pInputs();
|
|
97
|
-
if (tree && inputs) {
|
|
98
|
-
Object.assign(tree, inputs);
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
// Sync checked state when selection changes (including initial value)
|
|
102
|
-
effect(() => {
|
|
103
|
-
const value = this.treeValue();
|
|
104
|
-
// Only run if we have nodes and selection
|
|
105
|
-
if (value.length > 0 && this.selectionMode() === 'checkbox') {
|
|
106
|
-
this.handleCheckedNodes();
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
isProcessingBatchSelection = signal(false, ...(ngDevMode ? [{ debugName: "isProcessingBatchSelection" }] : []));
|
|
111
|
-
onSelectionChange(event) {
|
|
112
|
-
// Skip emitting if we're in the middle of batch processing
|
|
113
|
-
if (this.isProcessingBatchSelection()) {
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
|
-
this.handleCheckedNodes();
|
|
117
|
-
this.action.emit({ action: 'selectionChange', data: event });
|
|
118
|
-
}
|
|
119
|
-
onNodeSelect(event) {
|
|
120
|
-
this.action.emit({ action: 'nodeSelect', data: event });
|
|
121
|
-
}
|
|
122
|
-
onNodeUnselect(event) {
|
|
123
|
-
this.action.emit({ action: 'nodeUnselect', data: event });
|
|
124
|
-
}
|
|
125
|
-
onNodeExpand(event) {
|
|
126
|
-
this.action.emit({ action: 'nodeExpand', data: event });
|
|
127
|
-
}
|
|
128
|
-
onNodeCollapse(event) {
|
|
129
|
-
this.action.emit({ action: 'nodeCollapse', data: event });
|
|
130
|
-
}
|
|
131
|
-
onContextMenuSelect(event) {
|
|
132
|
-
this.contextMenuSelection.set(event);
|
|
133
|
-
}
|
|
134
|
-
getCheckAllValue(event) {
|
|
135
|
-
this.CheckAllValue.set(event);
|
|
136
|
-
}
|
|
137
|
-
toggleNodeSelection(node, event) {
|
|
138
|
-
event.stopPropagation();
|
|
139
|
-
const tree = this.primeTree();
|
|
140
|
-
if (this.selectionMode() === 'checkbox' && tree) {
|
|
141
|
-
if (node.key?.includes('check-all') && node.data) {
|
|
142
|
-
const checkValue = this.CheckAllValue() ?? true;
|
|
143
|
-
// Handle parent-level "Check All" - only check immediate children
|
|
144
|
-
const parentNode = node.data;
|
|
145
|
-
// Start batch processing to prevent multiple selection change events
|
|
146
|
-
this.isProcessingBatchSelection.set(true);
|
|
147
|
-
parentNode?.children?.forEach((child) => {
|
|
148
|
-
if (!child.key?.includes('check-all')) {
|
|
149
|
-
const isSelected = tree.isSelected(child);
|
|
150
|
-
// Only toggle if the current state doesn't match desired state
|
|
151
|
-
if ((checkValue && !isSelected) || (!checkValue && isSelected)) {
|
|
152
|
-
tree.onNodeClick(event, child);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
// End batch processing and emit single selection change event
|
|
157
|
-
this.isProcessingBatchSelection.set(false);
|
|
158
|
-
this.handleCheckedNodes();
|
|
159
|
-
this.action.emit({
|
|
160
|
-
action: 'selectionChange',
|
|
161
|
-
data: this.selection(),
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
else {
|
|
165
|
-
tree.onNodeClick(event, node);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
handleCheckedNodes() {
|
|
170
|
-
const updateNodeCheckedState = (nodes) => {
|
|
171
|
-
const tree = this.primeTree();
|
|
172
|
-
nodes.forEach((node) => {
|
|
173
|
-
if (node.key?.includes('check-all')) {
|
|
174
|
-
const isAllChildrenSelected = !nodes?.filter((n) => !tree?.isSelected(n) && !n.key?.includes('check-all'))?.length;
|
|
175
|
-
node.checked = isAllChildrenSelected;
|
|
176
|
-
}
|
|
177
|
-
else {
|
|
178
|
-
node.checked = tree?.isSelected(node);
|
|
179
|
-
}
|
|
180
|
-
if (node.children) {
|
|
181
|
-
updateNodeCheckedState(node.children);
|
|
182
|
-
}
|
|
183
|
-
});
|
|
184
|
-
};
|
|
185
|
-
updateNodeCheckedState(this.treeValue());
|
|
186
|
-
}
|
|
187
|
-
resolveActionLoading(action, node) {
|
|
188
|
-
if (typeof action.loading === 'function') {
|
|
189
|
-
return action.loading(node);
|
|
190
|
-
}
|
|
191
|
-
return action.loading;
|
|
192
|
-
}
|
|
193
|
-
nodeAction(action, node) {
|
|
194
|
-
action.action(node);
|
|
195
|
-
}
|
|
196
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: Tree, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
197
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: Tree, isStandalone: true, selector: "mt-tree", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, nodeIcon: { classPropertyName: "nodeIcon", publicName: "nodeIcon", isSignal: true, isRequired: false, transformFunction: null }, propagateSelectionUp: { classPropertyName: "propagateSelectionUp", publicName: "propagateSelectionUp", isSignal: true, isRequired: false, transformFunction: null }, propagateSelectionDown: { classPropertyName: "propagateSelectionDown", publicName: "propagateSelectionDown", isSignal: true, isRequired: false, transformFunction: null }, checkAllChildren: { classPropertyName: "checkAllChildren", publicName: "checkAllChildren", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, checkAllLabel: { classPropertyName: "checkAllLabel", publicName: "checkAllLabel", isSignal: true, isRequired: false, transformFunction: null }, filterPlaceholder: { classPropertyName: "filterPlaceholder", publicName: "filterPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, dataKey: { classPropertyName: "dataKey", publicName: "dataKey", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, filterMode: { classPropertyName: "filterMode", publicName: "filterMode", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, pInputs: { classPropertyName: "pInputs", publicName: "pInputs", isSignal: true, isRequired: false, transformFunction: null }, nodeActions: { classPropertyName: "nodeActions", publicName: "nodeActions", isSignal: true, isRequired: false, transformFunction: null }, nodeContextmenuActions: { classPropertyName: "nodeContextmenuActions", publicName: "nodeContextmenuActions", isSignal: true, isRequired: false, transformFunction: null }, contextMenuSelection: { classPropertyName: "contextMenuSelection", publicName: "contextMenuSelection", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selection: "selectionChange", contextMenuSelection: "contextMenuSelectionChange", action: "action" }, viewQueries: [{ propertyName: "primeTree", first: true, predicate: ["primeTree"], descendants: true, isSignal: true }], ngImport: i0, template: "<p-tree\r\n #primeTree\r\n [value]=\"treeValue()\"\r\n [(selection)]=\"selection\"\r\n [selectionMode]=\"selectionMode()\"\r\n [propagateSelectionUp]=\"propagateSelectionUp()\"\r\n [propagateSelectionDown]=\"propagateSelectionDown()\"\r\n [loading]=\"loading()\"\r\n [emptyMessage]=\"emptyMessage()\"\r\n [filter]=\"filter()\"\r\n [filterMode]=\"filterMode()\"\r\n [filterPlaceholder]=\"filterPlaceholder()\"\r\n [styleClass]=\"'mt-tree ' + styleClass()\"\r\n [style]=\"style()\"\r\n [contextMenu]=\"contextMenuItems().length ? cm : null\"\r\n [(contextMenuSelection)]=\"contextMenuSelection\"\r\n contextMenuSelectionMode=\"separate\"\r\n (selectionChange)=\"onSelectionChange($event)\"\r\n (onNodeSelect)=\"onNodeSelect($event)\"\r\n (onNodeUnselect)=\"onNodeUnselect($event)\"\r\n (onNodeExpand)=\"onNodeExpand($event)\"\r\n (onNodeCollapse)=\"onNodeCollapse($event)\"\r\n (onNodeContextMenuSelect)=\"onContextMenuSelect($event.node)\"\r\n>\r\n <ng-template let-node pTemplate=\"default\">\r\n <div\r\n (click)=\"selectionMode() === 'checkbox' ? $event.stopPropagation() : null\"\r\n class=\"mt-tree-node border-1 border-gray-300 cursor-default rounded-lg flex items-center hover:bg-surface-100 justify-between\"\r\n [class]=\"node?.key.includes('check-all') ? 'bg-surface-100 ' : ''\"\r\n >\r\n <div\r\n class=\"px-3 flex items-center justify-between flex-1\"\r\n [class.cursor-pointer]=\"\r\n selectionMode() === 'single' || selectionMode() === 'multiple'\r\n \"\r\n >\r\n <div class=\"flex items-center\">\r\n @if (node.children && node.children.length > 0) {\r\n <div\r\n class=\"py-3\"\r\n (click)=\"node.expanded = !node.expanded; $event.stopPropagation()\"\r\n >\r\n <mt-icon\r\n class=\"text-2xl cursor-pointer\"\r\n [icon]=\"\r\n node.expanded\r\n ? 'arrow.chevron-down'\r\n : dir?.value === 'rtl'\r\n ? 'arrow.chevron-left'\r\n : 'arrow.chevron-right'\r\n \"\r\n />\r\n </div>\r\n }\r\n @if (node.icon || nodeIcon()) {\r\n <mt-avatar\r\n class=\"ms-2\"\r\n [icon]=\"node.icon || nodeIcon()\"\r\n shape=\"square\"\r\n size=\"small\"\r\n style=\"\r\n --p-avatar-background: var(--p-primary-50);\r\n --p-avatar-color: var(--p-primary-color);\r\n \"\r\n [style]=\"\r\n node?.key.includes('check-all')\r\n ? ' --p-avatar-background: var(--p-primary-color); --p-avatar-color: white'\r\n : ''\r\n \"\r\n >\r\n </mt-avatar>\r\n }\r\n <div class=\"text-md mx-3 py-4\">{{ node.label }}</div>\r\n </div>\r\n <div class=\"flex items-center gap-2\">\r\n @if (nodeActions().length > 0) {\r\n <div class=\"flex items-center\">\r\n @for (action of nodeActions(); track action.icon) {\r\n @let hidden = action.hidden?.(node);\r\n @if (!hidden) {\r\n <mt-button\r\n [variant]=\"action.variant\"\r\n [icon]=\"action.icon\"\r\n [severity]=\"action.severity\"\r\n [size]=\"action.size\"\r\n [label]=\"action.label\"\r\n [tooltip]=\"action.tooltip\"\r\n [loading]=\"resolveActionLoading(action, node)\"\r\n (click)=\"nodeAction(action, node)\"\r\n >\r\n </mt-button>\r\n }\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n @if (selectionMode() === \"checkbox\") {\r\n <div\r\n class=\"cursor-pointer me-3\"\r\n (click)=\"toggleNodeSelection(node, $event)\"\r\n >\r\n <mt-toggle-field\r\n (ngModelChange)=\"getCheckAllValue($event)\"\r\n [ngModel]=\"node.checked\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n </ng-template>\r\n</p-tree>\r\n\r\n<p-contextMenu #cm [model]=\"contextMenuItems()\" appendTo=\"body\">\r\n <ng-template pTemplate=\"item\" let-item>\r\n <div class=\"p-menu-item-content\" (click)=\"item.command()\">\r\n <a class=\"p-menu-item-link flex items-center gap-2\">\r\n @if (item.icon) {\r\n <mt-icon [icon]=\"item.icon\" class=\"text-lg\" />\r\n }\r\n <span class=\"p-menu-item-label\">{{ item.label }}</span>\r\n </a>\r\n </div>\r\n </ng-template>\r\n</p-contextMenu>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: TreeModule }, { kind: "component", type: i1.Tree, selector: "p-tree", inputs: ["value", "selectionMode", "loadingMode", "selection", "styleClass", "contextMenu", "contextMenuSelectionMode", "contextMenuSelection", "draggableScope", "droppableScope", "draggableNodes", "droppableNodes", "metaKeySelection", "propagateSelectionUp", "propagateSelectionDown", "loading", "loadingIcon", "emptyMessage", "ariaLabel", "togglerAriaLabel", "ariaLabelledBy", "validateDrop", "filter", "filterInputAutoFocus", "filterBy", "filterMode", "filterOptions", "filterPlaceholder", "filteredNodes", "filterLocale", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "indentation", "_templateMap", "trackBy", "highlightOnSelect"], outputs: ["selectionChange", "contextMenuSelectionChange", "onNodeSelect", "onNodeUnselect", "onNodeExpand", "onNodeCollapse", "onNodeContextMenuSelect", "onNodeDoubleClick", "onNodeDrop", "onLazyLoad", "onScroll", "onScrollIndexChange", "onFilter"] }, { kind: "directive", type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "ngmodule", type: CommonModule }, { kind: "component", type: Avatar, selector: "mt-avatar", inputs: ["label", "icon", "image", "styleClass", "size", "shape", "badge", "badgeSize", "badgeSeverity"], outputs: ["onImageError"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ToggleField, selector: "mt-toggle-field", inputs: ["label", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], outputs: ["onChange"] }, { kind: "ngmodule", type: ContextMenuModule }, { kind: "component", type: i4.ContextMenu, selector: "p-contextMenu, p-contextmenu, p-context-menu", inputs: ["model", "triggerEvent", "target", "global", "style", "styleClass", "autoZIndex", "baseZIndex", "id", "breakpoint", "ariaLabel", "ariaLabelledBy", "pressDelay", "appendTo", "motionOptions"], outputs: ["onShow", "onHide"] }, { kind: "ngmodule", type: TranslocoModule }] });
|
|
198
|
-
}
|
|
199
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: Tree, decorators: [{
|
|
200
|
-
type: Component,
|
|
201
|
-
args: [{ selector: 'mt-tree', standalone: true, imports: [
|
|
202
|
-
TreeModule,
|
|
203
|
-
Icon,
|
|
204
|
-
CommonModule,
|
|
205
|
-
Avatar,
|
|
206
|
-
Button,
|
|
207
|
-
FormsModule,
|
|
208
|
-
ToggleField,
|
|
209
|
-
ContextMenuModule,
|
|
210
|
-
TranslocoModule,
|
|
211
|
-
], template: "<p-tree\r\n #primeTree\r\n [value]=\"treeValue()\"\r\n [(selection)]=\"selection\"\r\n [selectionMode]=\"selectionMode()\"\r\n [propagateSelectionUp]=\"propagateSelectionUp()\"\r\n [propagateSelectionDown]=\"propagateSelectionDown()\"\r\n [loading]=\"loading()\"\r\n [emptyMessage]=\"emptyMessage()\"\r\n [filter]=\"filter()\"\r\n [filterMode]=\"filterMode()\"\r\n [filterPlaceholder]=\"filterPlaceholder()\"\r\n [styleClass]=\"'mt-tree ' + styleClass()\"\r\n [style]=\"style()\"\r\n [contextMenu]=\"contextMenuItems().length ? cm : null\"\r\n [(contextMenuSelection)]=\"contextMenuSelection\"\r\n contextMenuSelectionMode=\"separate\"\r\n (selectionChange)=\"onSelectionChange($event)\"\r\n (onNodeSelect)=\"onNodeSelect($event)\"\r\n (onNodeUnselect)=\"onNodeUnselect($event)\"\r\n (onNodeExpand)=\"onNodeExpand($event)\"\r\n (onNodeCollapse)=\"onNodeCollapse($event)\"\r\n (onNodeContextMenuSelect)=\"onContextMenuSelect($event.node)\"\r\n>\r\n <ng-template let-node pTemplate=\"default\">\r\n <div\r\n (click)=\"selectionMode() === 'checkbox' ? $event.stopPropagation() : null\"\r\n class=\"mt-tree-node border-1 border-gray-300 cursor-default rounded-lg flex items-center hover:bg-surface-100 justify-between\"\r\n [class]=\"node?.key.includes('check-all') ? 'bg-surface-100 ' : ''\"\r\n >\r\n <div\r\n class=\"px-3 flex items-center justify-between flex-1\"\r\n [class.cursor-pointer]=\"\r\n selectionMode() === 'single' || selectionMode() === 'multiple'\r\n \"\r\n >\r\n <div class=\"flex items-center\">\r\n @if (node.children && node.children.length > 0) {\r\n <div\r\n class=\"py-3\"\r\n (click)=\"node.expanded = !node.expanded; $event.stopPropagation()\"\r\n >\r\n <mt-icon\r\n class=\"text-2xl cursor-pointer\"\r\n [icon]=\"\r\n node.expanded\r\n ? 'arrow.chevron-down'\r\n : dir?.value === 'rtl'\r\n ? 'arrow.chevron-left'\r\n : 'arrow.chevron-right'\r\n \"\r\n />\r\n </div>\r\n }\r\n @if (node.icon || nodeIcon()) {\r\n <mt-avatar\r\n class=\"ms-2\"\r\n [icon]=\"node.icon || nodeIcon()\"\r\n shape=\"square\"\r\n size=\"small\"\r\n style=\"\r\n --p-avatar-background: var(--p-primary-50);\r\n --p-avatar-color: var(--p-primary-color);\r\n \"\r\n [style]=\"\r\n node?.key.includes('check-all')\r\n ? ' --p-avatar-background: var(--p-primary-color); --p-avatar-color: white'\r\n : ''\r\n \"\r\n >\r\n </mt-avatar>\r\n }\r\n <div class=\"text-md mx-3 py-4\">{{ node.label }}</div>\r\n </div>\r\n <div class=\"flex items-center gap-2\">\r\n @if (nodeActions().length > 0) {\r\n <div class=\"flex items-center\">\r\n @for (action of nodeActions(); track action.icon) {\r\n @let hidden = action.hidden?.(node);\r\n @if (!hidden) {\r\n <mt-button\r\n [variant]=\"action.variant\"\r\n [icon]=\"action.icon\"\r\n [severity]=\"action.severity\"\r\n [size]=\"action.size\"\r\n [label]=\"action.label\"\r\n [tooltip]=\"action.tooltip\"\r\n [loading]=\"resolveActionLoading(action, node)\"\r\n (click)=\"nodeAction(action, node)\"\r\n >\r\n </mt-button>\r\n }\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n @if (selectionMode() === \"checkbox\") {\r\n <div\r\n class=\"cursor-pointer me-3\"\r\n (click)=\"toggleNodeSelection(node, $event)\"\r\n >\r\n <mt-toggle-field\r\n (ngModelChange)=\"getCheckAllValue($event)\"\r\n [ngModel]=\"node.checked\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n </ng-template>\r\n</p-tree>\r\n\r\n<p-contextMenu #cm [model]=\"contextMenuItems()\" appendTo=\"body\">\r\n <ng-template pTemplate=\"item\" let-item>\r\n <div class=\"p-menu-item-content\" (click)=\"item.command()\">\r\n <a class=\"p-menu-item-link flex items-center gap-2\">\r\n @if (item.icon) {\r\n <mt-icon [icon]=\"item.icon\" class=\"text-lg\" />\r\n }\r\n <span class=\"p-menu-item-label\">{{ item.label }}</span>\r\n </a>\r\n </div>\r\n </ng-template>\r\n</p-contextMenu>\r\n" }]
|
|
212
|
-
}], ctorParameters: () => [], propDecorators: { primeTree: [{ type: i0.ViewChild, args: ['primeTree', { isSignal: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], selection: [{ type: i0.Input, args: [{ isSignal: true, alias: "selection", required: false }] }, { type: i0.Output, args: ["selectionChange"] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], nodeIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodeIcon", required: false }] }], propagateSelectionUp: [{ type: i0.Input, args: [{ isSignal: true, alias: "propagateSelectionUp", required: false }] }], propagateSelectionDown: [{ type: i0.Input, args: [{ isSignal: true, alias: "propagateSelectionDown", required: false }] }], checkAllChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "checkAllChildren", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], checkAllLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "checkAllLabel", required: false }] }], filterPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterPlaceholder", required: false }] }], dataKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataKey", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], filterMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterMode", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], pInputs: [{ type: i0.Input, args: [{ isSignal: true, alias: "pInputs", required: false }] }], nodeActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodeActions", required: false }] }], nodeContextmenuActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodeContextmenuActions", required: false }] }], contextMenuSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "contextMenuSelection", required: false }] }, { type: i0.Output, args: ["contextMenuSelectionChange"] }], action: [{ type: i0.Output, args: ["action"] }] } });
|
|
213
|
-
|
|
214
|
-
/**
|
|
215
|
-
* Generated bundle index. Do not edit.
|
|
216
|
-
*/
|
|
217
|
-
|
|
218
|
-
export { Tree };
|
|
219
|
-
//# sourceMappingURL=masterteam-components-tree.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"masterteam-components-tree.mjs","sources":["../../../../packages/masterteam/components/tree/tree.ts","../../../../packages/masterteam/components/tree/tree.html","../../../../packages/masterteam/components/tree/masterteam-components-tree.ts"],"sourcesContent":["import { ToggleField } from '@masterteam/components/toggle-field';\r\nimport { Avatar } from '@masterteam/components/avatar';\r\nimport { Button } from '@masterteam/components/button';\r\nimport {\r\n Component,\r\n input,\r\n output,\r\n viewChild,\r\n effect,\r\n inject,\r\n computed,\r\n model,\r\n Signal,\r\n signal,\r\n} from '@angular/core';\r\nimport { Tree as PrimeTree, TreeModule } from 'primeng/tree';\r\nimport { MenuItem, TreeNode } from 'primeng/api';\r\nimport { Icon } from '@masterteam/icons';\r\nimport { MTIcon } from '@masterteam/icons';\r\nimport { CommonModule } from '@angular/common';\r\nimport { Directionality } from '@angular/cdk/bidi';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { ContextMenuModule } from 'primeng/contextmenu';\r\nimport { TranslocoModule } from '@jsverse/transloco';\r\nimport {\r\n TreeAction,\r\n TreeContextMenuAction,\r\n TreeActionEvent,\r\n} from './tree-types';\r\nimport { TranslocoService } from '@jsverse/transloco';\r\n\r\n@Component({\r\n selector: 'mt-tree',\r\n standalone: true,\r\n imports: [\r\n TreeModule,\r\n Icon,\r\n CommonModule,\r\n Avatar,\r\n Button,\r\n FormsModule,\r\n ToggleField,\r\n ContextMenuModule,\r\n TranslocoModule,\r\n ],\r\n templateUrl: './tree.html',\r\n styleUrls: ['./tree.scss'],\r\n})\r\nexport class Tree {\r\n transloco = inject(TranslocoService);\r\n\r\n dir = inject(Directionality, { optional: true });\r\n\r\n readonly primeTree = viewChild<PrimeTree>('primeTree');\r\n\r\n readonly value = input.required<TreeNode[]>();\r\n readonly selection = model<TreeNode | TreeNode[] | null>();\r\n readonly selectionMode = input<'single' | 'multiple' | 'checkbox'>();\r\n readonly nodeIcon = input<MTIcon | undefined>();\r\n readonly propagateSelectionUp = input<boolean>(false);\r\n readonly propagateSelectionDown = input<boolean>(false);\r\n readonly checkAllChildren = input<boolean>(false);\r\n readonly loading = input<boolean>(false);\r\n readonly emptyMessage = input<string>(\r\n this.transloco.translate('components.tree.no-data-found'),\r\n );\r\n readonly checkAllLabel = input<string>(\r\n this.transloco.translate('components.tree.check-all'),\r\n );\r\n readonly filterPlaceholder = input<string>(\r\n this.transloco.translate('components.tree.search'),\r\n );\r\n readonly dataKey = input<'key'>('key');\r\n readonly filter = input<boolean>(false);\r\n readonly filterMode = input<'lenient' | 'strict'>('lenient');\r\n\r\n readonly styleClass = input<string>('');\r\n readonly style = input<Record<string, string>>();\r\n readonly pInputs = input<Partial<PrimeTree>>();\r\n readonly nodeActions = input<TreeAction[]>([]);\r\n readonly nodeContextmenuActions = input<TreeContextMenuAction[]>([]);\r\n\r\n // Context menu state\r\n readonly contextMenuSelection = model<TreeNode | null>(null);\r\n readonly contextMenuItems = computed<MenuItem[]>(() => {\r\n const actions = this.nodeContextmenuActions();\r\n return actions.map((action) => ({\r\n label: action.label,\r\n icon: action.icon,\r\n command: () => {\r\n const node = this.contextMenuSelection();\r\n if (node) {\r\n action.action(node);\r\n }\r\n },\r\n }));\r\n });\r\n\r\n readonly action = output<TreeActionEvent>();\r\n CheckAllValue = signal<boolean>(false);\r\n // Computed tree value with \"Check All\" nodes added recursively to all parents\r\n readonly treeValue: Signal<TreeNode[]> = computed(() => {\r\n const nodes = this.value();\r\n const shouldAddCheckAll =\r\n this.checkAllChildren() && this.selectionMode() === 'checkbox';\r\n\r\n if (!shouldAddCheckAll) {\r\n return nodes;\r\n }\r\n\r\n // Recursively add \"Check All\" child to any parent node\r\n const addCheckAllRecursive = (node: TreeNode): TreeNode => {\r\n if (node.children && node.children.length > 0) {\r\n const checkAllNode: TreeNode = {\r\n key: `${node.key}-check-all`,\r\n label: this.checkAllLabel(),\r\n icon: 'general.check-square-broken',\r\n data: node,\r\n };\r\n\r\n return {\r\n ...node,\r\n children: [checkAllNode, ...node.children.map(addCheckAllRecursive)],\r\n };\r\n }\r\n return node;\r\n };\r\n\r\n // Transform all nodes\r\n const transformedNodes = nodes.map(addCheckAllRecursive);\r\n\r\n // Add \"Check All\" for entire tree at the beginning\r\n const treeCheckAllNode: TreeNode = {\r\n key: 'tree-check-all',\r\n label: this.checkAllLabel(),\r\n icon: 'general.check-square-broken',\r\n data: { isTreeRoot: true, children: transformedNodes },\r\n };\r\n\r\n return [treeCheckAllNode, ...transformedNodes];\r\n });\r\n\r\n constructor() {\r\n // Apply pInputs to the PrimeNG tree instance\r\n effect(() => {\r\n const tree = this.primeTree();\r\n const inputs = this.pInputs();\r\n if (tree && inputs) {\r\n Object.assign(tree, inputs);\r\n }\r\n });\r\n\r\n // Sync checked state when selection changes (including initial value)\r\n effect(() => {\r\n const value = this.treeValue();\r\n // Only run if we have nodes and selection\r\n if (value.length > 0 && this.selectionMode() === 'checkbox') {\r\n this.handleCheckedNodes();\r\n }\r\n });\r\n }\r\n private isProcessingBatchSelection = signal<boolean>(false);\r\n\r\n onSelectionChange(event: TreeNode | TreeNode[] | null) {\r\n // Skip emitting if we're in the middle of batch processing\r\n if (this.isProcessingBatchSelection()) {\r\n return;\r\n }\r\n this.handleCheckedNodes();\r\n this.action.emit({ action: 'selectionChange', data: event });\r\n }\r\n\r\n onNodeSelect(event: { node: TreeNode }) {\r\n this.action.emit({ action: 'nodeSelect', data: event });\r\n }\r\n\r\n onNodeUnselect(event: { node: TreeNode }) {\r\n this.action.emit({ action: 'nodeUnselect', data: event });\r\n }\r\n\r\n onNodeExpand(event: { node: TreeNode }) {\r\n this.action.emit({ action: 'nodeExpand', data: event });\r\n }\r\n\r\n onNodeCollapse(event: { node: TreeNode }) {\r\n this.action.emit({ action: 'nodeCollapse', data: event });\r\n }\r\n\r\n onContextMenuSelect(event: TreeNode) {\r\n this.contextMenuSelection.set(event);\r\n }\r\n getCheckAllValue(event: any) {\r\n this.CheckAllValue.set(event);\r\n }\r\n toggleNodeSelection(node: TreeNode, event: MouseEvent): void {\r\n event.stopPropagation();\r\n const tree = this.primeTree();\r\n if (this.selectionMode() === 'checkbox' && tree) {\r\n if (node.key?.includes('check-all') && node.data) {\r\n const checkValue = this.CheckAllValue() ?? true;\r\n // Handle parent-level \"Check All\" - only check immediate children\r\n const parentNode = node.data;\r\n\r\n // Start batch processing to prevent multiple selection change events\r\n this.isProcessingBatchSelection.set(true);\r\n\r\n parentNode?.children?.forEach((child: TreeNode) => {\r\n if (!child.key?.includes('check-all')) {\r\n const isSelected = tree.isSelected(child);\r\n // Only toggle if the current state doesn't match desired state\r\n if ((checkValue && !isSelected) || (!checkValue && isSelected)) {\r\n tree.onNodeClick(event, child);\r\n }\r\n }\r\n });\r\n\r\n // End batch processing and emit single selection change event\r\n this.isProcessingBatchSelection.set(false);\r\n this.handleCheckedNodes();\r\n this.action.emit({\r\n action: 'selectionChange',\r\n data: this.selection(),\r\n });\r\n } else {\r\n tree.onNodeClick(event, node);\r\n }\r\n }\r\n }\r\n\r\n handleCheckedNodes() {\r\n const updateNodeCheckedState = (nodes: TreeNode[]) => {\r\n const tree = this.primeTree();\r\n nodes.forEach((node: any) => {\r\n if (node.key?.includes('check-all')) {\r\n const isAllChildrenSelected = !nodes?.filter(\r\n (n: any) => !tree?.isSelected(n) && !n.key?.includes('check-all'),\r\n )?.length;\r\n node.checked = isAllChildrenSelected;\r\n } else {\r\n node.checked = tree?.isSelected(node);\r\n }\r\n if (node.children) {\r\n updateNodeCheckedState(node.children);\r\n }\r\n });\r\n };\r\n updateNodeCheckedState(this.treeValue());\r\n }\r\n\r\n resolveActionLoading(action: TreeAction, node: any): boolean | undefined {\r\n if (typeof action.loading === 'function') {\r\n return action.loading(node);\r\n }\r\n return action.loading;\r\n }\r\n\r\n nodeAction(action: TreeAction, node: any): void {\r\n action.action(node);\r\n }\r\n}\r\n","<p-tree\r\n #primeTree\r\n [value]=\"treeValue()\"\r\n [(selection)]=\"selection\"\r\n [selectionMode]=\"selectionMode()\"\r\n [propagateSelectionUp]=\"propagateSelectionUp()\"\r\n [propagateSelectionDown]=\"propagateSelectionDown()\"\r\n [loading]=\"loading()\"\r\n [emptyMessage]=\"emptyMessage()\"\r\n [filter]=\"filter()\"\r\n [filterMode]=\"filterMode()\"\r\n [filterPlaceholder]=\"filterPlaceholder()\"\r\n [styleClass]=\"'mt-tree ' + styleClass()\"\r\n [style]=\"style()\"\r\n [contextMenu]=\"contextMenuItems().length ? cm : null\"\r\n [(contextMenuSelection)]=\"contextMenuSelection\"\r\n contextMenuSelectionMode=\"separate\"\r\n (selectionChange)=\"onSelectionChange($event)\"\r\n (onNodeSelect)=\"onNodeSelect($event)\"\r\n (onNodeUnselect)=\"onNodeUnselect($event)\"\r\n (onNodeExpand)=\"onNodeExpand($event)\"\r\n (onNodeCollapse)=\"onNodeCollapse($event)\"\r\n (onNodeContextMenuSelect)=\"onContextMenuSelect($event.node)\"\r\n>\r\n <ng-template let-node pTemplate=\"default\">\r\n <div\r\n (click)=\"selectionMode() === 'checkbox' ? $event.stopPropagation() : null\"\r\n class=\"mt-tree-node border-1 border-gray-300 cursor-default rounded-lg flex items-center hover:bg-surface-100 justify-between\"\r\n [class]=\"node?.key.includes('check-all') ? 'bg-surface-100 ' : ''\"\r\n >\r\n <div\r\n class=\"px-3 flex items-center justify-between flex-1\"\r\n [class.cursor-pointer]=\"\r\n selectionMode() === 'single' || selectionMode() === 'multiple'\r\n \"\r\n >\r\n <div class=\"flex items-center\">\r\n @if (node.children && node.children.length > 0) {\r\n <div\r\n class=\"py-3\"\r\n (click)=\"node.expanded = !node.expanded; $event.stopPropagation()\"\r\n >\r\n <mt-icon\r\n class=\"text-2xl cursor-pointer\"\r\n [icon]=\"\r\n node.expanded\r\n ? 'arrow.chevron-down'\r\n : dir?.value === 'rtl'\r\n ? 'arrow.chevron-left'\r\n : 'arrow.chevron-right'\r\n \"\r\n />\r\n </div>\r\n }\r\n @if (node.icon || nodeIcon()) {\r\n <mt-avatar\r\n class=\"ms-2\"\r\n [icon]=\"node.icon || nodeIcon()\"\r\n shape=\"square\"\r\n size=\"small\"\r\n style=\"\r\n --p-avatar-background: var(--p-primary-50);\r\n --p-avatar-color: var(--p-primary-color);\r\n \"\r\n [style]=\"\r\n node?.key.includes('check-all')\r\n ? ' --p-avatar-background: var(--p-primary-color); --p-avatar-color: white'\r\n : ''\r\n \"\r\n >\r\n </mt-avatar>\r\n }\r\n <div class=\"text-md mx-3 py-4\">{{ node.label }}</div>\r\n </div>\r\n <div class=\"flex items-center gap-2\">\r\n @if (nodeActions().length > 0) {\r\n <div class=\"flex items-center\">\r\n @for (action of nodeActions(); track action.icon) {\r\n @let hidden = action.hidden?.(node);\r\n @if (!hidden) {\r\n <mt-button\r\n [variant]=\"action.variant\"\r\n [icon]=\"action.icon\"\r\n [severity]=\"action.severity\"\r\n [size]=\"action.size\"\r\n [label]=\"action.label\"\r\n [tooltip]=\"action.tooltip\"\r\n [loading]=\"resolveActionLoading(action, node)\"\r\n (click)=\"nodeAction(action, node)\"\r\n >\r\n </mt-button>\r\n }\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n @if (selectionMode() === \"checkbox\") {\r\n <div\r\n class=\"cursor-pointer me-3\"\r\n (click)=\"toggleNodeSelection(node, $event)\"\r\n >\r\n <mt-toggle-field\r\n (ngModelChange)=\"getCheckAllValue($event)\"\r\n [ngModel]=\"node.checked\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n </ng-template>\r\n</p-tree>\r\n\r\n<p-contextMenu #cm [model]=\"contextMenuItems()\" appendTo=\"body\">\r\n <ng-template pTemplate=\"item\" let-item>\r\n <div class=\"p-menu-item-content\" (click)=\"item.command()\">\r\n <a class=\"p-menu-item-link flex items-center gap-2\">\r\n @if (item.icon) {\r\n <mt-icon [icon]=\"item.icon\" class=\"text-lg\" />\r\n }\r\n <span class=\"p-menu-item-label\">{{ item.label }}</span>\r\n </a>\r\n </div>\r\n </ng-template>\r\n</p-contextMenu>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;MAgDa,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A,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,aAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,sBAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,wBAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,oBAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,sBAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,4BAAA,CAAA,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,QAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AErDvD;;AAEG;;;;"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { MTIcon } from '@masterteam/icons';
|
|
3
|
-
|
|
4
|
-
interface SidebarItem {
|
|
5
|
-
id: string | number;
|
|
6
|
-
title: string;
|
|
7
|
-
icon?: MTIcon;
|
|
8
|
-
routerLink?: any[] | string;
|
|
9
|
-
}
|
|
10
|
-
declare class Sidebar {
|
|
11
|
-
items: _angular_core.InputSignal<SidebarItem[]>;
|
|
12
|
-
logo: _angular_core.InputSignal<string | undefined>;
|
|
13
|
-
logoLink: _angular_core.InputSignal<string | any[] | undefined>;
|
|
14
|
-
title: _angular_core.InputSignal<string | undefined>;
|
|
15
|
-
subTitle: _angular_core.InputSignal<string | undefined>;
|
|
16
|
-
bgColor: _angular_core.InputSignal<string | undefined>;
|
|
17
|
-
bgImage: _angular_core.InputSignal<string | undefined>;
|
|
18
|
-
bgRepeat: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
19
|
-
iconsColor: _angular_core.InputSignal<string>;
|
|
20
|
-
expanded: _angular_core.WritableSignal<boolean>;
|
|
21
|
-
expandedChange: _angular_core.OutputEmitterRef<boolean>;
|
|
22
|
-
toggleSidebar(): void;
|
|
23
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Sidebar, never>;
|
|
24
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Sidebar, "mt-sidebar", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "logo": { "alias": "logo"; "required": false; "isSignal": true; }; "logoLink": { "alias": "logoLink"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "subTitle": { "alias": "subTitle"; "required": false; "isSignal": true; }; "bgColor": { "alias": "bgColor"; "required": false; "isSignal": true; }; "bgImage": { "alias": "bgImage"; "required": false; "isSignal": true; }; "bgRepeat": { "alias": "bgRepeat"; "required": false; "isSignal": true; }; "iconsColor": { "alias": "iconsColor"; "required": false; "isSignal": true; }; }, { "expandedChange": "expandedChange"; }, never, never, true, never>;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export { Sidebar };
|
|
28
|
-
export type { SidebarItem };
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { OnInit, OnChanges, EventEmitter, SimpleChanges } from '@angular/core';
|
|
3
|
-
import { ControlValueAccessor, Validators, NgControl } from '@angular/forms';
|
|
4
|
-
import { Slider, SliderChangeEvent, SliderSlideEndEvent } from 'primeng/slider';
|
|
5
|
-
import { isInvalid } from '@masterteam/components';
|
|
6
|
-
|
|
7
|
-
declare class SliderField implements ControlValueAccessor, OnInit, OnChanges {
|
|
8
|
-
input: Slider;
|
|
9
|
-
readonly field: _angular_core.InputSignal<boolean>;
|
|
10
|
-
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
11
|
-
readonly animate: _angular_core.InputSignal<boolean>;
|
|
12
|
-
readonly class: _angular_core.InputSignal<string>;
|
|
13
|
-
readonly min: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
14
|
-
readonly max: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
15
|
-
readonly step: _angular_core.InputSignalWithTransform<number | undefined, unknown>;
|
|
16
|
-
readonly hideNumber: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
17
|
-
readonly unit: _angular_core.InputSignal<string>;
|
|
18
|
-
readonly readonly: _angular_core.InputSignal<boolean>;
|
|
19
|
-
readonly pInputs: _angular_core.InputSignal<Partial<Slider> | undefined>;
|
|
20
|
-
readonly required: _angular_core.InputSignal<boolean>;
|
|
21
|
-
onChange: EventEmitter<SliderChangeEvent>;
|
|
22
|
-
onSlideEnd: EventEmitter<SliderSlideEndEvent>;
|
|
23
|
-
styleClass: string;
|
|
24
|
-
requiredValidator: typeof Validators.required;
|
|
25
|
-
value: _angular_core.WritableSignal<number | null>;
|
|
26
|
-
disabled: _angular_core.WritableSignal<boolean>;
|
|
27
|
-
displayValue: _angular_core.Signal<string>;
|
|
28
|
-
onTouched: () => void;
|
|
29
|
-
onModelChange: (value: number | null) => void;
|
|
30
|
-
ngControl: NgControl;
|
|
31
|
-
isInvalid: typeof isInvalid;
|
|
32
|
-
constructor();
|
|
33
|
-
applyInputsToInput(): void;
|
|
34
|
-
ngOnInit(): void;
|
|
35
|
-
onValueChange(value: number | null): void;
|
|
36
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
37
|
-
writeValue(value: number): void;
|
|
38
|
-
registerOnChange(fn: any): void;
|
|
39
|
-
registerOnTouched(fn: any): void;
|
|
40
|
-
setDisabledState(disabled: boolean): void;
|
|
41
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SliderField, never>;
|
|
42
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SliderField, "mt-slider-field", never, { "field": { "alias": "field"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "animate": { "alias": "animate"; "required": false; "isSignal": true; }; "class": { "alias": "class"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "hideNumber": { "alias": "hideNumber"; "required": false; "isSignal": true; }; "unit": { "alias": "unit"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "pInputs": { "alias": "pInputs"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; }, { "onChange": "onChange"; "onSlideEnd": "onSlideEnd"; }, never, never, true, never>;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export { SliderField };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { MTIcon } from '@masterteam/icons';
|
|
3
|
-
|
|
4
|
-
interface StatisticCardData {
|
|
5
|
-
title: string;
|
|
6
|
-
subTitle: string;
|
|
7
|
-
icon: MTIcon;
|
|
8
|
-
color: string;
|
|
9
|
-
}
|
|
10
|
-
declare class StatisticCard {
|
|
11
|
-
readonly data: _angular_core.InputSignal<StatisticCardData>;
|
|
12
|
-
readonly cardClass: _angular_core.InputSignal<string>;
|
|
13
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StatisticCard, never>;
|
|
14
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StatisticCard, "mt-statistic-card", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "cardClass": { "alias": "cardClass"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export { StatisticCard };
|
|
18
|
-
export type { StatisticCardData };
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { OnInit, OnChanges, SimpleChanges } from '@angular/core';
|
|
3
|
-
import { ControlValueAccessor, Validators, NgControl } from '@angular/forms';
|
|
4
|
-
import { isInvalid } from '@masterteam/components';
|
|
5
|
-
|
|
6
|
-
declare class TextareaField implements ControlValueAccessor, OnInit, OnChanges {
|
|
7
|
-
textarea: HTMLTextAreaElement;
|
|
8
|
-
readonly field: _angular_core.InputSignal<boolean>;
|
|
9
|
-
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
10
|
-
readonly placeholder: _angular_core.InputSignal<string | undefined>;
|
|
11
|
-
readonly class: _angular_core.InputSignal<string>;
|
|
12
|
-
readonly readonly: _angular_core.InputSignal<boolean>;
|
|
13
|
-
readonly noErrorStyle: _angular_core.InputSignal<boolean>;
|
|
14
|
-
readonly pInputs: _angular_core.InputSignal<Partial<HTMLTextAreaElement> | undefined>;
|
|
15
|
-
readonly rows: _angular_core.InputSignal<string>;
|
|
16
|
-
readonly required: _angular_core.InputSignal<boolean>;
|
|
17
|
-
styleClass: string;
|
|
18
|
-
requiredValidator: typeof Validators.required;
|
|
19
|
-
value: _angular_core.WritableSignal<string | null>;
|
|
20
|
-
disabled: _angular_core.WritableSignal<boolean>;
|
|
21
|
-
onTouched: () => void;
|
|
22
|
-
onModelChange: (value: string | null) => void;
|
|
23
|
-
ngControl: NgControl;
|
|
24
|
-
isInvalid: typeof isInvalid;
|
|
25
|
-
constructor();
|
|
26
|
-
applyInputsToTextarea(): void;
|
|
27
|
-
ngOnInit(): void;
|
|
28
|
-
onValueChange(value: string | null): void;
|
|
29
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
30
|
-
writeValue(value: string): void;
|
|
31
|
-
registerOnChange(fn: any): void;
|
|
32
|
-
registerOnTouched(fn: any): void;
|
|
33
|
-
setDisabledState(disabled: boolean): void;
|
|
34
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TextareaField, never>;
|
|
35
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TextareaField, "mt-textarea-field", never, { "field": { "alias": "field"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "class": { "alias": "class"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "noErrorStyle": { "alias": "noErrorStyle"; "required": false; "isSignal": true; }; "pInputs": { "alias": "pInputs"; "required": false; "isSignal": true; }; "rows": { "alias": "rows"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export { TextareaField };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { MessageService, ToastMessageOptions } from 'primeng/api';
|
|
3
|
-
|
|
4
|
-
declare class Toast {
|
|
5
|
-
protected readonly toastPosition = "bottom-right";
|
|
6
|
-
protected readonly toastTransX = "translateX(100%)";
|
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<Toast, never>;
|
|
8
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<Toast, "mt-toast", never, {}, {}, never, never, true, never>;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
declare class ToastService {
|
|
12
|
-
messageService: MessageService;
|
|
13
|
-
add(message: ToastMessageOptions): void;
|
|
14
|
-
addAll(messages: ToastMessageOptions[]): void;
|
|
15
|
-
clear(key?: string): void;
|
|
16
|
-
success(detail?: string, summary?: string): void;
|
|
17
|
-
warn(detail?: string, summary?: string): void;
|
|
18
|
-
error(detail?: string, summary?: string): void;
|
|
19
|
-
info(detail?: string, summary?: string): void;
|
|
20
|
-
secondary(detail?: string, summary?: string): void;
|
|
21
|
-
contrast(detail?: string, summary?: string): void;
|
|
22
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ToastService, never>;
|
|
23
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<ToastService>;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export { Toast, ToastService };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as _angular_core from '@angular/core';
|
|
2
|
-
|
|
3
|
-
declare class Topbar {
|
|
4
|
-
logo: _angular_core.InputSignal<string | undefined>;
|
|
5
|
-
logoLink: _angular_core.InputSignal<string | any[] | undefined>;
|
|
6
|
-
bgColor: _angular_core.InputSignal<string>;
|
|
7
|
-
bgImage: _angular_core.InputSignal<string | undefined>;
|
|
8
|
-
bgRepeat: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
9
|
-
textColor: _angular_core.InputSignal<string>;
|
|
10
|
-
title: _angular_core.InputSignal<string | undefined>;
|
|
11
|
-
subTitle: _angular_core.InputSignal<string | undefined>;
|
|
12
|
-
showBranding: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
13
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Topbar, never>;
|
|
14
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Topbar, "mt-topbar", never, { "logo": { "alias": "logo"; "required": false; "isSignal": true; }; "logoLink": { "alias": "logoLink"; "required": false; "isSignal": true; }; "bgColor": { "alias": "bgColor"; "required": false; "isSignal": true; }; "bgImage": { "alias": "bgImage"; "required": false; "isSignal": true; }; "bgRepeat": { "alias": "bgRepeat"; "required": false; "isSignal": true; }; "textColor": { "alias": "textColor"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "subTitle": { "alias": "subTitle"; "required": false; "isSignal": true; }; "showBranding": { "alias": "showBranding"; "required": false; "isSignal": true; }; }, {}, never, ["[start]", "[actions]"], true, never>;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export { Topbar };
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { Signal } from '@angular/core';
|
|
3
|
-
import { Tree as Tree$1 } from 'primeng/tree';
|
|
4
|
-
import { TreeNode, MenuItem } from 'primeng/api';
|
|
5
|
-
export { TreeNode } from 'primeng/api';
|
|
6
|
-
import { MTIcon } from '@masterteam/icons';
|
|
7
|
-
import { Directionality } from '@angular/cdk/bidi';
|
|
8
|
-
import { TranslocoService } from '@jsverse/transloco';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Defines an action button for tree nodes
|
|
12
|
-
*/
|
|
13
|
-
interface TreeAction {
|
|
14
|
-
icon?: MTIcon | undefined;
|
|
15
|
-
severity?: 'info' | 'success' | 'warn' | 'danger' | 'secondary' | 'contrast' | 'help' | 'primary';
|
|
16
|
-
variant?: 'text' | 'outlined' | undefined;
|
|
17
|
-
size?: 'small' | 'large' | undefined;
|
|
18
|
-
label?: string;
|
|
19
|
-
tooltip?: string;
|
|
20
|
-
hidden?: (node: any) => boolean;
|
|
21
|
-
action: (node: any) => void;
|
|
22
|
-
loading?: boolean | ((node: any) => boolean);
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Defines a context menu action for tree nodes
|
|
26
|
-
*/
|
|
27
|
-
interface TreeContextMenuAction {
|
|
28
|
-
icon?: MTIcon | undefined;
|
|
29
|
-
label: string;
|
|
30
|
-
action: (node: any) => void;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Tree action types - all possible events from tree component
|
|
34
|
-
*/
|
|
35
|
-
type TreeActionType = 'selectionChange' | 'nodeSelect' | 'nodeUnselect' | 'nodeExpand' | 'nodeCollapse';
|
|
36
|
-
/**
|
|
37
|
-
* Tree action event interface - unified event structure for all tree actions
|
|
38
|
-
*/
|
|
39
|
-
interface TreeActionEvent {
|
|
40
|
-
action: TreeActionType;
|
|
41
|
-
data: any;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
declare class Tree {
|
|
45
|
-
transloco: TranslocoService;
|
|
46
|
-
dir: Directionality | null;
|
|
47
|
-
readonly primeTree: Signal<Tree$1 | undefined>;
|
|
48
|
-
readonly value: _angular_core.InputSignal<TreeNode<any>[]>;
|
|
49
|
-
readonly selection: _angular_core.ModelSignal<TreeNode<any> | TreeNode<any>[] | null | undefined>;
|
|
50
|
-
readonly selectionMode: _angular_core.InputSignal<"single" | "multiple" | "checkbox" | undefined>;
|
|
51
|
-
readonly nodeIcon: _angular_core.InputSignal<MTIcon | undefined>;
|
|
52
|
-
readonly propagateSelectionUp: _angular_core.InputSignal<boolean>;
|
|
53
|
-
readonly propagateSelectionDown: _angular_core.InputSignal<boolean>;
|
|
54
|
-
readonly checkAllChildren: _angular_core.InputSignal<boolean>;
|
|
55
|
-
readonly loading: _angular_core.InputSignal<boolean>;
|
|
56
|
-
readonly emptyMessage: _angular_core.InputSignal<string>;
|
|
57
|
-
readonly checkAllLabel: _angular_core.InputSignal<string>;
|
|
58
|
-
readonly filterPlaceholder: _angular_core.InputSignal<string>;
|
|
59
|
-
readonly dataKey: _angular_core.InputSignal<"key">;
|
|
60
|
-
readonly filter: _angular_core.InputSignal<boolean>;
|
|
61
|
-
readonly filterMode: _angular_core.InputSignal<"lenient" | "strict">;
|
|
62
|
-
readonly styleClass: _angular_core.InputSignal<string>;
|
|
63
|
-
readonly style: _angular_core.InputSignal<Record<string, string> | undefined>;
|
|
64
|
-
readonly pInputs: _angular_core.InputSignal<Partial<Tree$1> | undefined>;
|
|
65
|
-
readonly nodeActions: _angular_core.InputSignal<TreeAction[]>;
|
|
66
|
-
readonly nodeContextmenuActions: _angular_core.InputSignal<TreeContextMenuAction[]>;
|
|
67
|
-
readonly contextMenuSelection: _angular_core.ModelSignal<TreeNode<any> | null>;
|
|
68
|
-
readonly contextMenuItems: Signal<MenuItem[]>;
|
|
69
|
-
readonly action: _angular_core.OutputEmitterRef<TreeActionEvent>;
|
|
70
|
-
CheckAllValue: _angular_core.WritableSignal<boolean>;
|
|
71
|
-
readonly treeValue: Signal<TreeNode[]>;
|
|
72
|
-
constructor();
|
|
73
|
-
private isProcessingBatchSelection;
|
|
74
|
-
onSelectionChange(event: TreeNode | TreeNode[] | null): void;
|
|
75
|
-
onNodeSelect(event: {
|
|
76
|
-
node: TreeNode;
|
|
77
|
-
}): void;
|
|
78
|
-
onNodeUnselect(event: {
|
|
79
|
-
node: TreeNode;
|
|
80
|
-
}): void;
|
|
81
|
-
onNodeExpand(event: {
|
|
82
|
-
node: TreeNode;
|
|
83
|
-
}): void;
|
|
84
|
-
onNodeCollapse(event: {
|
|
85
|
-
node: TreeNode;
|
|
86
|
-
}): void;
|
|
87
|
-
onContextMenuSelect(event: TreeNode): void;
|
|
88
|
-
getCheckAllValue(event: any): void;
|
|
89
|
-
toggleNodeSelection(node: TreeNode, event: MouseEvent): void;
|
|
90
|
-
handleCheckedNodes(): void;
|
|
91
|
-
resolveActionLoading(action: TreeAction, node: any): boolean | undefined;
|
|
92
|
-
nodeAction(action: TreeAction, node: any): void;
|
|
93
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Tree, never>;
|
|
94
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Tree, "mt-tree", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "nodeIcon": { "alias": "nodeIcon"; "required": false; "isSignal": true; }; "propagateSelectionUp": { "alias": "propagateSelectionUp"; "required": false; "isSignal": true; }; "propagateSelectionDown": { "alias": "propagateSelectionDown"; "required": false; "isSignal": true; }; "checkAllChildren": { "alias": "checkAllChildren"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; "isSignal": true; }; "checkAllLabel": { "alias": "checkAllLabel"; "required": false; "isSignal": true; }; "filterPlaceholder": { "alias": "filterPlaceholder"; "required": false; "isSignal": true; }; "dataKey": { "alias": "dataKey"; "required": false; "isSignal": true; }; "filter": { "alias": "filter"; "required": false; "isSignal": true; }; "filterMode": { "alias": "filterMode"; "required": false; "isSignal": true; }; "styleClass": { "alias": "styleClass"; "required": false; "isSignal": true; }; "style": { "alias": "style"; "required": false; "isSignal": true; }; "pInputs": { "alias": "pInputs"; "required": false; "isSignal": true; }; "nodeActions": { "alias": "nodeActions"; "required": false; "isSignal": true; }; "nodeContextmenuActions": { "alias": "nodeContextmenuActions"; "required": false; "isSignal": true; }; "contextMenuSelection": { "alias": "contextMenuSelection"; "required": false; "isSignal": true; }; }, { "selection": "selectionChange"; "contextMenuSelection": "contextMenuSelectionChange"; "action": "action"; }, never, never, true, never>;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export { Tree };
|
|
98
|
-
export type { TreeAction, TreeActionEvent, TreeActionType, TreeContextMenuAction };
|