@progress/kendo-vue-treeview 8.0.3-develop.2 → 8.0.3-develop.3
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/ItemRenderProps.d.ts +20 -0
- package/TreeView.d.ts +241 -0
- package/TreeView.mjs +3 -3
- package/TreeViewDragAnalyzer.d.ts +70 -0
- package/TreeViewDragClue.d.ts +48 -0
- package/TreeViewItem.d.ts +127 -0
- package/TreeViewOperationDescriptors.d.ts +83 -0
- package/TreeViewProps.d.ts +133 -0
- package/dist/cdn/js/kendo-vue-treeview.js +1 -1
- package/events.d.ts +150 -0
- package/handleTreeViewCheckChange.d.ts +56 -0
- package/index.d.mts +12 -937
- package/index.d.ts +12 -937
- package/moveTreeViewItem.d.ts +53 -0
- package/package-metadata.d.ts +12 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +12 -6
- package/processTreeViewItems.d.ts +31 -0
- package/utils/FieldsService.d.ts +33 -0
- package/utils/SortedPublicItemIds.d.ts +15 -0
- package/utils/consts.d.ts +47 -0
- package/utils/getItemIdUponKeyboardNavigation.d.ts +12 -0
- package/utils/getItemIdUponKeyboardNavigation.mjs +1 -1
- package/utils/itemIdUtils.d.ts +67 -0
- package/utils/itemIdUtils.mjs +51 -51
- package/utils/itemUtils.d.ts +52 -0
- package/utils/misc.d.ts +16 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* A helper function which moves a TreeView item in an immutable way.
|
|
10
|
+
*
|
|
11
|
+
* {% meta height:400 %}
|
|
12
|
+
* {% embed_file drag/single/main.vue preview %}
|
|
13
|
+
* {% embed_file drag/single/main.js %}
|
|
14
|
+
* {% endmeta %}
|
|
15
|
+
*
|
|
16
|
+
* #### Parameters
|
|
17
|
+
* ##### sourceItemHierarchicalIndex <span class='code'>string</span>
|
|
18
|
+
* The hierarchical index of the item that will be moved.
|
|
19
|
+
*
|
|
20
|
+
* ##### sourceData <span class='code'>any[] | null | undefined</span>
|
|
21
|
+
* The tree which contains the item that will be moved.
|
|
22
|
+
*
|
|
23
|
+
* ##### operation <span class='code'>"before" | "after" | "child"</span>
|
|
24
|
+
* The specific move operation.
|
|
25
|
+
*
|
|
26
|
+
* The available options are:
|
|
27
|
+
* * `before`—Indicates that the source item will become the previous sibling of the target item.
|
|
28
|
+
* * `after`—Indicates that the source item will become the next sibling of the target item.
|
|
29
|
+
* * `child`—Indicates that the source item will become a child of the target item.
|
|
30
|
+
*
|
|
31
|
+
* ##### targetItemHierarchicalIndex <span class='code'>string</span>
|
|
32
|
+
* The hierarchical index of the item next to which the source item will be moved.
|
|
33
|
+
*
|
|
34
|
+
* ##### targetData? <span class='code'>any[] | null</span>
|
|
35
|
+
* The tree which contains the target item.
|
|
36
|
+
* If the argument is skipped, then the move operation will be executed within the same tree.
|
|
37
|
+
* Setting the `sourceData` and `targetData` arguments to the same tree is also supported.
|
|
38
|
+
*
|
|
39
|
+
* ##### childrenField? <span class='code'>string</span>
|
|
40
|
+
* The field that points to the dataItem sub items. Defaults to `items`.
|
|
41
|
+
*
|
|
42
|
+
* #### Returns
|
|
43
|
+
* <span class='code'>any[] | { sourceData: any[]; targetData: any[]; }</span> - The updated copies of the `sourceData` and `targetData` input arguments.
|
|
44
|
+
* If `targetData` is not passed, then only the updated copy of the `sourceData` will be returned.
|
|
45
|
+
*/
|
|
46
|
+
declare const moveTreeViewItem: (sourceItemHierarchicalIndex: string, sourceData: any[] | null | undefined, operation: 'before' | 'after' | 'child', targetItemHierarchicalIndex: string, targetData?: any[] | null, childrenField?: string) => any[] | {
|
|
47
|
+
sourceData: any[];
|
|
48
|
+
targetData: any[];
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* @hidden
|
|
52
|
+
*/
|
|
53
|
+
export { moveTreeViewItem };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { PackageMetadata } from '@progress/kendo-licensing';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export declare const packageMetadata: PackageMetadata;
|
package/package-metadata.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-vue-treeview",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-vue-treeview",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate: 1773401421,version:"8.0.3-develop.3",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"};exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -10,8 +10,8 @@ const e = {
|
|
|
10
10
|
productName: "Kendo UI for Vue",
|
|
11
11
|
productCode: "KENDOUIVUE",
|
|
12
12
|
productCodes: ["KENDOUIVUE"],
|
|
13
|
-
publishDate:
|
|
14
|
-
version: "8.0.3-develop.
|
|
13
|
+
publishDate: 1773401421,
|
|
14
|
+
version: "8.0.3-develop.3",
|
|
15
15
|
licensingDocsUrl: "https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"
|
|
16
16
|
};
|
|
17
17
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-vue-treeview",
|
|
3
|
-
"version": "8.0.3-develop.
|
|
3
|
+
"version": "8.0.3-develop.3",
|
|
4
4
|
"description": "TODO",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -9,8 +9,14 @@
|
|
|
9
9
|
"types": "./index.d.ts",
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
|
-
"import":
|
|
13
|
-
|
|
12
|
+
"import": {
|
|
13
|
+
"types": "./index.d.mts",
|
|
14
|
+
"default": "./index.mjs"
|
|
15
|
+
},
|
|
16
|
+
"require": {
|
|
17
|
+
"types": "./index.d.ts",
|
|
18
|
+
"default": "./index.js"
|
|
19
|
+
}
|
|
14
20
|
},
|
|
15
21
|
"./package.json": {
|
|
16
22
|
"default": "./package.json"
|
|
@@ -19,8 +25,8 @@
|
|
|
19
25
|
"sideEffects": false,
|
|
20
26
|
"peerDependencies": {
|
|
21
27
|
"@progress/kendo-licensing": "^1.7.2",
|
|
22
|
-
"@progress/kendo-vue-animation": "8.0.3-develop.
|
|
23
|
-
"@progress/kendo-vue-common": "8.0.3-develop.
|
|
28
|
+
"@progress/kendo-vue-animation": "8.0.3-develop.3",
|
|
29
|
+
"@progress/kendo-vue-common": "8.0.3-develop.3",
|
|
24
30
|
"@progress/kendo-svg-icons": "^4.4.0",
|
|
25
31
|
"vue": "^3.0.2"
|
|
26
32
|
},
|
|
@@ -41,7 +47,7 @@
|
|
|
41
47
|
"package": {
|
|
42
48
|
"productName": "Kendo UI for Vue",
|
|
43
49
|
"productCode": "KENDOUIVUE",
|
|
44
|
-
"publishDate":
|
|
50
|
+
"publishDate": 1773401421,
|
|
45
51
|
"licensingDocsUrl": "https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"
|
|
46
52
|
}
|
|
47
53
|
},
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { TreeViewOperationDescriptors } from './TreeViewOperationDescriptors';
|
|
9
|
+
/**
|
|
10
|
+
* A helper function which applies the specified operation descriptors to the data.
|
|
11
|
+
* [Expanding and collapsing items]({% slug expansion_ways_treeview %}#toc-using-a-helper-function)
|
|
12
|
+
* [Selecting and deselecting items]({% slug selection_ways_treeview %}#toc-using-a-helper-function)
|
|
13
|
+
* [Checking and unchecking items]({% slug check_helper_funcs_treeview %})
|
|
14
|
+
*
|
|
15
|
+
* {% meta height:350 %}
|
|
16
|
+
* {% embed_file select/selection-update-helper-function/main.vue preview %}
|
|
17
|
+
* {% embed_file select/selection-update-helper-function/main.js %}
|
|
18
|
+
* {% endmeta %}
|
|
19
|
+
*
|
|
20
|
+
* #### Parameters
|
|
21
|
+
* ##### data <span class='code'>any[] | null | undefined</span>
|
|
22
|
+
* The data that will be processed.
|
|
23
|
+
*
|
|
24
|
+
* ##### operations <span class='code'>[TreeViewOperationDescriptors]({% slug api_treeview_treeviewoperationdescriptors %})</span>
|
|
25
|
+
* The operation descriptors that will be applied to the data.
|
|
26
|
+
*
|
|
27
|
+
* #### Returns
|
|
28
|
+
* <span class='code'>any[]</span> - The processed copy of the input data.
|
|
29
|
+
*/
|
|
30
|
+
declare const processTreeViewItems: (data: any[] | null | undefined, operations: TreeViewOperationDescriptors) => any[];
|
|
31
|
+
export { processTreeViewItems };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { TreeViewProps } from '../TreeViewProps';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export default class FieldsService {
|
|
13
|
+
focusIdField: string | undefined;
|
|
14
|
+
private expandField;
|
|
15
|
+
private selectField;
|
|
16
|
+
private childrenField;
|
|
17
|
+
private hasChildrenField;
|
|
18
|
+
private textField;
|
|
19
|
+
private disableField;
|
|
20
|
+
private checkField;
|
|
21
|
+
private checkIndeterminateField;
|
|
22
|
+
constructor(treeViewProps: TreeViewProps);
|
|
23
|
+
expanded(item: any): boolean | undefined;
|
|
24
|
+
selected(item: any): boolean | undefined;
|
|
25
|
+
text(item: any): string | undefined;
|
|
26
|
+
disabled(item: any): boolean | undefined;
|
|
27
|
+
hasChildren(item: any): boolean | undefined;
|
|
28
|
+
children(item: any): any[];
|
|
29
|
+
checked(item: any): boolean | undefined;
|
|
30
|
+
checkIndeterminate(item: any): boolean | undefined;
|
|
31
|
+
focusId(item: any): any;
|
|
32
|
+
getChildrenField(): string;
|
|
33
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* @hidden
|
|
10
|
+
*/
|
|
11
|
+
export default class SortedPublicItemIds {
|
|
12
|
+
private objects;
|
|
13
|
+
init(publicItemIds: any[]): void;
|
|
14
|
+
hasId(publicItemId: any): boolean;
|
|
15
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* @hidden
|
|
10
|
+
*/
|
|
11
|
+
export declare const EXPAND_FIELD = "expanded";
|
|
12
|
+
/**
|
|
13
|
+
* @hidden
|
|
14
|
+
*/
|
|
15
|
+
export declare const TEXT_FIELD = "text";
|
|
16
|
+
/**
|
|
17
|
+
* @hidden
|
|
18
|
+
*/
|
|
19
|
+
export declare const DISABLED_FIELD = "disabled";
|
|
20
|
+
/**
|
|
21
|
+
* @hidden
|
|
22
|
+
*/
|
|
23
|
+
export declare const CHILDREN_FIELD = "items";
|
|
24
|
+
/**
|
|
25
|
+
* @hidden
|
|
26
|
+
*/
|
|
27
|
+
export declare const HAS_CHILDREN_FIELD = "hasChildren";
|
|
28
|
+
/**
|
|
29
|
+
* @hidden
|
|
30
|
+
*/
|
|
31
|
+
export declare const SELECT_FIELD = "selected";
|
|
32
|
+
/**
|
|
33
|
+
* @hidden
|
|
34
|
+
*/
|
|
35
|
+
export declare const CHECK_FIELD = "checked";
|
|
36
|
+
/**
|
|
37
|
+
* @hidden
|
|
38
|
+
*/
|
|
39
|
+
export declare const CHECK_INDETERMINATE_FIELD = "checkIndeterminate";
|
|
40
|
+
/**
|
|
41
|
+
* @hidden
|
|
42
|
+
*/
|
|
43
|
+
export declare const DOM_KENDO_ITEM_ID_FIELD = "_kendoItemId";
|
|
44
|
+
/**
|
|
45
|
+
* @hidden
|
|
46
|
+
*/
|
|
47
|
+
export declare const DOM_KENDO_TREEVIEW_GUID_FIELD = "_kendoTreeViewGuid";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { default as FieldsService } from './FieldsService';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export default function getItemIdUponKeyboardNavigation(item: any, itemId: string, items: any[], keyCode: number, fieldsSvc: FieldsService): any;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import { Keys as l } from "@progress/kendo-vue-common";
|
|
9
|
-
import { ZERO_LEVEL_ZERO_NODE_ID as I,
|
|
9
|
+
import { ZERO_LEVEL_ZERO_NODE_ID as I, isIdZeroLevel as E, getDirectParentId as i, getFirstChildId as y, getShortId as C, createId as p, getItemById as s } from "./itemIdUtils.mjs";
|
|
10
10
|
import { isEnabledAndAllParentsEnabled as N, isItemExpandedAndWithChildren as d } from "./itemUtils.mjs";
|
|
11
11
|
function D(r, n, e, o, t) {
|
|
12
12
|
switch (o) {
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* @hidden
|
|
10
|
+
*/
|
|
11
|
+
export declare const EMPTY_ID = "";
|
|
12
|
+
/**
|
|
13
|
+
* @hidden
|
|
14
|
+
*/
|
|
15
|
+
export declare const ZERO_LEVEL_ZERO_NODE_ID = "0";
|
|
16
|
+
/**
|
|
17
|
+
* @hidden
|
|
18
|
+
*/
|
|
19
|
+
export declare const SEPARATOR = "_";
|
|
20
|
+
/**
|
|
21
|
+
* @hidden
|
|
22
|
+
*/
|
|
23
|
+
export declare function getItemById(itemId: string, items: any, childrenField: string): any;
|
|
24
|
+
/**
|
|
25
|
+
* @hidden
|
|
26
|
+
*/
|
|
27
|
+
export declare function getRootParentId(itemId: string): string;
|
|
28
|
+
/**
|
|
29
|
+
* @hidden
|
|
30
|
+
*/
|
|
31
|
+
export declare function getIdWithoutRootParentId(itemId: string): string;
|
|
32
|
+
/**
|
|
33
|
+
* @hidden
|
|
34
|
+
*/
|
|
35
|
+
export declare function getFirstChildId(itemId: string): string;
|
|
36
|
+
/**
|
|
37
|
+
* @hidden
|
|
38
|
+
*/
|
|
39
|
+
export declare function createId(childId: string | number, parentId?: string): string;
|
|
40
|
+
/**
|
|
41
|
+
* @hidden
|
|
42
|
+
*/
|
|
43
|
+
export declare function getDirectParentId(itemId: string): string;
|
|
44
|
+
/**
|
|
45
|
+
* @hidden
|
|
46
|
+
*/
|
|
47
|
+
export declare function isIdEmptyOrZeroLevel(itemId: string): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* @hidden
|
|
50
|
+
*/
|
|
51
|
+
export declare function isIdZeroLevel(itemId: string): boolean;
|
|
52
|
+
/**
|
|
53
|
+
* @hidden
|
|
54
|
+
*/
|
|
55
|
+
export declare function getAllShortIds(itemId: string): string[];
|
|
56
|
+
/**
|
|
57
|
+
* @hidden
|
|
58
|
+
*/
|
|
59
|
+
export declare function getShortId(itemId: string): string;
|
|
60
|
+
/**
|
|
61
|
+
* @hidden
|
|
62
|
+
*/
|
|
63
|
+
export declare function isItemFirstFromSiblings(itemId: string): boolean;
|
|
64
|
+
/**
|
|
65
|
+
* @hidden
|
|
66
|
+
*/
|
|
67
|
+
export declare function getDecrementedItemIdAfterRemoval(removedItemId: string, itemId: string): string;
|
package/utils/itemIdUtils.mjs
CHANGED
|
@@ -5,78 +5,78 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
const
|
|
9
|
-
function
|
|
10
|
-
if (
|
|
8
|
+
const a = "", g = "0", i = "_";
|
|
9
|
+
function f(t, n, o) {
|
|
10
|
+
if (S(t))
|
|
11
11
|
return n[Number(t)];
|
|
12
12
|
{
|
|
13
|
-
const
|
|
14
|
-
return
|
|
13
|
+
const r = n[Number(u(t))], e = r && r[o] || [];
|
|
14
|
+
return e.length ? f(R(t), e, o) : void 0;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
function
|
|
18
|
-
return
|
|
17
|
+
function u(t) {
|
|
18
|
+
return A(t) ? t : t.split("_")[0];
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
if (
|
|
20
|
+
function R(t) {
|
|
21
|
+
if (A(t))
|
|
22
22
|
return t;
|
|
23
23
|
{
|
|
24
|
-
const n = t.indexOf(
|
|
24
|
+
const n = t.indexOf("_");
|
|
25
25
|
return t.substring(n + 1);
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
return
|
|
28
|
+
function T(t) {
|
|
29
|
+
return E("0", t);
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
return t = t.toString(), n ? n +
|
|
31
|
+
function E(t, n) {
|
|
32
|
+
return t = t.toString(), n ? n + "_" + t : t;
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
const n = t.lastIndexOf(
|
|
36
|
-
return n < 0 ?
|
|
34
|
+
function P(t) {
|
|
35
|
+
const n = t.lastIndexOf("_");
|
|
36
|
+
return n < 0 ? "" : t.substring(0, n);
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
return t ===
|
|
38
|
+
function A(t) {
|
|
39
|
+
return t === "" || t.indexOf("_") < 0;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
return t !==
|
|
41
|
+
function S(t) {
|
|
42
|
+
return t !== "" && t.indexOf("_") < 0;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
45
|
-
return t.split(
|
|
44
|
+
function l(t) {
|
|
45
|
+
return t.split("_");
|
|
46
46
|
}
|
|
47
|
-
function
|
|
48
|
-
const n = t.lastIndexOf(
|
|
47
|
+
function O(t) {
|
|
48
|
+
const n = t.lastIndexOf("_");
|
|
49
49
|
return n < 0 ? t : t.substring(n + 1);
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
const
|
|
53
|
-
t = "
|
|
54
|
-
const
|
|
55
|
-
if (n.startsWith(
|
|
56
|
-
const
|
|
57
|
-
if (
|
|
58
|
-
const
|
|
59
|
-
if (Number(
|
|
60
|
-
const
|
|
61
|
-
return
|
|
51
|
+
function b(t, n) {
|
|
52
|
+
const o = n;
|
|
53
|
+
t = "r_" + t, n = "r_" + n;
|
|
54
|
+
const r = P(t) + "_";
|
|
55
|
+
if (n.startsWith(r)) {
|
|
56
|
+
const e = n.substring(r.length);
|
|
57
|
+
if (e) {
|
|
58
|
+
const s = u(e);
|
|
59
|
+
if (Number(O(t)) < Number(s)) {
|
|
60
|
+
const c = r + (Number(s) - 1).toString() + e.substring(s.length);
|
|
61
|
+
return R(c);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
return
|
|
65
|
+
return o;
|
|
66
66
|
}
|
|
67
67
|
export {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
68
|
+
a as EMPTY_ID,
|
|
69
|
+
i as SEPARATOR,
|
|
70
|
+
g as ZERO_LEVEL_ZERO_NODE_ID,
|
|
71
|
+
E as createId,
|
|
72
|
+
l as getAllShortIds,
|
|
73
|
+
b as getDecrementedItemIdAfterRemoval,
|
|
74
|
+
P as getDirectParentId,
|
|
75
|
+
T as getFirstChildId,
|
|
76
|
+
R as getIdWithoutRootParentId,
|
|
77
|
+
f as getItemById,
|
|
78
|
+
u as getRootParentId,
|
|
79
|
+
O as getShortId,
|
|
80
|
+
A as isIdEmptyOrZeroLevel,
|
|
81
|
+
S as isIdZeroLevel
|
|
82
82
|
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { default as FieldsService } from './FieldsService';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export declare function hasChildren(item: any, childrenField: string): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* @hidden
|
|
15
|
+
*/
|
|
16
|
+
export declare function isItemExpandedAndWithChildren(item: any, fieldsSvc: FieldsService): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* @hidden
|
|
19
|
+
*/
|
|
20
|
+
export declare function resolveItemId(publicId: any, idField: string, items: any[], childrenField: string): string;
|
|
21
|
+
/**
|
|
22
|
+
* @hidden
|
|
23
|
+
*/
|
|
24
|
+
export declare function resolveItemsIds(publicIds: any[], idField: string, items: any[], childrenField: string): string[];
|
|
25
|
+
/**
|
|
26
|
+
* @hidden
|
|
27
|
+
*/
|
|
28
|
+
export declare function updateItem(items: any[], itemId: string, update: (item: any) => void, cloneField: string, childrenField: string): any[];
|
|
29
|
+
/**
|
|
30
|
+
* @hidden
|
|
31
|
+
*/
|
|
32
|
+
export declare function isEnabledAndAllParentsEnabled(itemId: string, items: any, fieldsSvc: FieldsService): any;
|
|
33
|
+
/**
|
|
34
|
+
* @hidden
|
|
35
|
+
*/
|
|
36
|
+
export declare function getAllDirectIndirectChildrenIds(item: any, itemId: string, childrenField: string, idField: string | undefined): any[];
|
|
37
|
+
/**
|
|
38
|
+
* @hidden
|
|
39
|
+
*/
|
|
40
|
+
export declare function areAllDirectChildrenChecked(item: any, itemId: any, idField: string | undefined, childrenField: string, check: string[]): any;
|
|
41
|
+
/**
|
|
42
|
+
* @hidden
|
|
43
|
+
*/
|
|
44
|
+
export declare function getAllParents(itemId: string, childrenField: string, items: any[]): any[];
|
|
45
|
+
/**
|
|
46
|
+
* @hidden
|
|
47
|
+
*/
|
|
48
|
+
export declare function removeItem(itemId: string, childrenField: string, items: any[]): any[];
|
|
49
|
+
/**
|
|
50
|
+
* @hidden
|
|
51
|
+
*/
|
|
52
|
+
export declare function addItem(item: any, operation: 'before' | 'after' | 'child', childrenField: string, targetItemId: string, items: any[]): any[];
|
package/utils/misc.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { TreeViewOperationDescriptor } from '../TreeViewOperationDescriptors';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export declare function getNestedValue(fieldName: string | undefined, dataItem: any): any;
|
|
13
|
+
/**
|
|
14
|
+
* @hidden
|
|
15
|
+
*/
|
|
16
|
+
export declare function isArray(operation: string[] | TreeViewOperationDescriptor): operation is any[];
|