pixel-react 1.14.84 → 1.14.86
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/lib/ComponentProps/TreeNodeProps.d.ts +2 -0
- package/lib/_virtual/index10.js +2 -2
- package/lib/_virtual/index11.js +2 -2
- package/lib/components/Excel/ExcelFile/ExcelFile.js +4 -4
- package/lib/components/Excel/ExcelFile/ExcelFile.js.map +1 -1
- package/lib/components/InputWithDropdown/InputWithDropdown.js +4 -2
- package/lib/components/InputWithDropdown/InputWithDropdown.js.map +1 -1
- package/lib/components/InputWithDropdown/types.d.ts +1 -0
- package/lib/components/MenuOption/MenuOption.js +2 -1
- package/lib/components/MenuOption/MenuOption.js.map +1 -1
- package/lib/components/MultiSelect/MultiSelect.js +1 -0
- package/lib/components/MultiSelect/MultiSelect.js.map +1 -1
- package/lib/components/Select/Select.js +41 -24
- package/lib/components/Select/Select.js.map +1 -1
- package/lib/components/Select/components/types.d.ts +1 -0
- package/lib/components/Select/components/types.js.map +1 -1
- package/lib/components/Select/types.d.ts +1 -0
- package/lib/components/SessionDropdown/SessionDropdown.js +45 -29
- package/lib/components/SessionDropdown/SessionDropdown.js.map +1 -1
- package/lib/components/SessionDropdown/type.d.ts +2 -0
- package/lib/components/TableTreeFn/Utils/addNewRow.js +30 -14
- package/lib/components/TableTreeFn/Utils/addNewRow.js.map +1 -1
- package/lib/components/TableTreeFn/Utils/updateParentSibling.d.ts +3 -0
- package/lib/components/TableTreeFn/Utils/updateParentSibling.js +56 -0
- package/lib/components/TableTreeFn/Utils/updateParentSibling.js.map +1 -0
- package/lib/components/TextArea/Textarea.js +2 -2
- package/lib/components/TextArea/Textarea.js.map +1 -1
- package/lib/index.cjs +181 -75
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.ts +6 -0
- package/lib/node_modules/js-beautify/js/src/css/index.js +1 -1
- package/lib/node_modules/js-beautify/js/src/css/options.js +1 -1
- package/lib/node_modules/js-beautify/js/src/html/options.js +1 -1
- package/lib/node_modules/js-beautify/js/src/html/tokenizer.js +1 -1
- package/lib/node_modules/js-beautify/js/src/javascript/index.js +1 -1
- package/lib/node_modules/js-beautify/js/src/javascript/tokenizer.js +1 -1
- package/lib/styles.css +1 -1
- package/lib/styles.css.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/validations/regex.d.ts +2 -1
- package/lib/validations/regex.js +2 -2
- package/lib/validations/regex.js.map +1 -1
- package/package.json +1 -1
package/lib/index.cjs
CHANGED
@@ -3611,7 +3611,7 @@ const ELEMENTS_TRAILING_SPACE_REGEX = /^\S.*\S$/;
|
|
3611
3611
|
const ELEMENTS_WHITE_SPACE_REGEX = /.*\S.*/;
|
3612
3612
|
const PARAMETER_ALPHANUMERIC_REGEX = /^[-_A-Za-z0-9 ]*$|^[-_A-Za-z0-9 ][A-Za-z0-9 ]*[-_A-Za-z-_]$/;
|
3613
3613
|
const ALPHANUMERIC_PARENTHESIS_REGEX = /^[-_A-Za-z0-9 ()]*$|^[-_A-Za-z0-9 ()][A-Za-z0-9 ()]*[-_A-Za-z-()]$/;
|
3614
|
-
const
|
3614
|
+
const ENTER_NEW_LINE_REGEX = /\r/g;
|
3615
3615
|
//Regular expression to convert lower camel case by excluding spaces
|
3616
3616
|
const CAMEL_CASE_REGEX = /(?:^\w|[A-Z]|\b\w|\s+)/g;
|
3617
3617
|
const SPECIAL_REGEX_CHARACTERS_PATTERN = /[.*+?^${}()|[\]\\]/g;
|
@@ -4229,6 +4229,7 @@ const MultiSelect = ({
|
|
4229
4229
|
if (withSelectButton && dropdownWrapper.current && selectWrapper.current && dropdownRef.current && !dropdownRef.current.contains(event?.target) && !selectWrapper.current.contains(event?.target)) {
|
4230
4230
|
setInputError('');
|
4231
4231
|
setIsOpen(false);
|
4232
|
+
setSearchedKeyword('');
|
4232
4233
|
if (!isSelectFocusedOnce) {
|
4233
4234
|
setIsSelectFocusedOnce(true);
|
4234
4235
|
}
|
@@ -7332,7 +7333,8 @@ const Select$1 = ({
|
|
7332
7333
|
dropDownRef,
|
7333
7334
|
dropDownHeight = 160,
|
7334
7335
|
onSearchText,
|
7335
|
-
isCustomButtonDisabled = false
|
7336
|
+
isCustomButtonDisabled = false,
|
7337
|
+
hasInnerClearIcon = false
|
7336
7338
|
}) => {
|
7337
7339
|
const selectWidth = typeof width === 'number' ? `${width}px` : width;
|
7338
7340
|
const memoizedOptionsList = React.useMemo(() => optionsList, [optionsList]);
|
@@ -7514,28 +7516,43 @@ const Select$1 = ({
|
|
7514
7516
|
window.removeEventListener('resize', checkTruncate);
|
7515
7517
|
};
|
7516
7518
|
}, [searchedText, width]);
|
7517
|
-
const inputElement = jsxRuntime.
|
7518
|
-
|
7519
|
-
|
7520
|
-
|
7521
|
-
|
7522
|
-
'ff-select-
|
7523
|
-
|
7524
|
-
|
7525
|
-
|
7526
|
-
|
7527
|
-
|
7528
|
-
|
7529
|
-
|
7530
|
-
|
7531
|
-
|
7532
|
-
|
7533
|
-
|
7534
|
-
|
7535
|
-
|
7536
|
-
|
7537
|
-
|
7538
|
-
|
7519
|
+
const inputElement = jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
7520
|
+
children: [jsxRuntime.jsx("input", {
|
7521
|
+
type: "text",
|
7522
|
+
ref: inputRef,
|
7523
|
+
id: "select-input-element",
|
7524
|
+
className: classNames('ff-select-inputField', {
|
7525
|
+
'ff-select-inputField__disabled': disabled,
|
7526
|
+
'ff-select-inputField__readonly': disableInput,
|
7527
|
+
'ff-select-inputField__icon': showIcon && !checkEmpty(searchedIcon)
|
7528
|
+
}),
|
7529
|
+
onFocus: handleFocus,
|
7530
|
+
value: searchedText,
|
7531
|
+
autoCorrect: "off",
|
7532
|
+
autoComplete: "off",
|
7533
|
+
spellCheck: "false",
|
7534
|
+
style: {
|
7535
|
+
zIndex: optionZIndex,
|
7536
|
+
color: selectedOptionColor
|
7537
|
+
},
|
7538
|
+
disabled: disabled,
|
7539
|
+
onChange: handleChange,
|
7540
|
+
readOnly: disableInput,
|
7541
|
+
placeholder: placeHolder
|
7542
|
+
}), hasInnerClearIcon && jsxRuntime.jsx("span", {
|
7543
|
+
className: "ff-select-clear-icon",
|
7544
|
+
children: jsxRuntime.jsx(Tooltip, {
|
7545
|
+
title: "Clear",
|
7546
|
+
children: jsxRuntime.jsx(Icon, {
|
7547
|
+
name: "close",
|
7548
|
+
height: 16,
|
7549
|
+
width: 16,
|
7550
|
+
onClick: handelClear,
|
7551
|
+
hoverEffect: true,
|
7552
|
+
cursorType: "pointer"
|
7553
|
+
})
|
7554
|
+
})
|
7555
|
+
})]
|
7539
7556
|
});
|
7540
7557
|
return jsxRuntime.jsxs("div", {
|
7541
7558
|
className: `ff-select-wrapper ${className} ${showClearIcon ? 'show-clear-icon' : ''}`,
|
@@ -7629,6 +7646,7 @@ const Select$1 = ({
|
|
7629
7646
|
valueAccessor: valueAccessor,
|
7630
7647
|
showArrowIcon: showArrowIcon,
|
7631
7648
|
showClearIcon: showClearIcon,
|
7649
|
+
hasInnerClearIcon: hasInnerClearIcon,
|
7632
7650
|
noResultsMessage: noResultsMessage,
|
7633
7651
|
ref: dropDownRef,
|
7634
7652
|
searchedIcon: searchedIcon,
|
@@ -7652,7 +7670,7 @@ const Select$1 = ({
|
|
7652
7670
|
};
|
7653
7671
|
|
7654
7672
|
const getCharacterCount = value => {
|
7655
|
-
return value.replace(
|
7673
|
+
return value.replace(ENTER_NEW_LINE_REGEX, '').length;
|
7656
7674
|
};
|
7657
7675
|
const Textarea = ({
|
7658
7676
|
capacity = 200,
|
@@ -7881,7 +7899,8 @@ const calculatePosition = (menuPosition, dropdownPlacement, optionCardHeight, op
|
|
7881
7899
|
newTop = availableSpace.bottom > optionCardHeight + gap ? top + height + gap : top - optionCardHeight - gap;
|
7882
7900
|
if (isAddResourceButton) {
|
7883
7901
|
if (!(availableSpace?.bottom > optionCardHeight + gap)) {
|
7884
|
-
newLeft = left +
|
7902
|
+
newLeft = left + 25;
|
7903
|
+
newTop = top + 5;
|
7885
7904
|
}
|
7886
7905
|
}
|
7887
7906
|
break;
|
@@ -17213,7 +17232,8 @@ const InputWithDropdown = /*#__PURE__*/React.forwardRef(({
|
|
17213
17232
|
pattern,
|
17214
17233
|
inputMode,
|
17215
17234
|
disableSelectHover = false,
|
17216
|
-
inputRefWithDropdown
|
17235
|
+
inputRefWithDropdown,
|
17236
|
+
autoFocus = false
|
17217
17237
|
}, ref) => {
|
17218
17238
|
const isValueFilled = !checkEmpty(value) || dropdownPosition === 'left';
|
17219
17239
|
const handleWheel = e => {
|
@@ -17309,7 +17329,8 @@ const InputWithDropdown = /*#__PURE__*/React.forwardRef(({
|
|
17309
17329
|
'ff-floating-input--left-dropdown': dropdownPosition === 'left'
|
17310
17330
|
}),
|
17311
17331
|
inputMode: inputMode,
|
17312
|
-
pattern: pattern
|
17332
|
+
pattern: pattern,
|
17333
|
+
autoFocus: autoFocus
|
17313
17334
|
})]
|
17314
17335
|
}), dropdownPosition === 'right' && jsxRuntime.jsx(Select$1, {
|
17315
17336
|
optionsList: optionsList,
|
@@ -45191,7 +45212,7 @@ const ExcelFile = ({
|
|
45191
45212
|
};
|
45192
45213
|
const handleNameChange = (event, index, name) => {
|
45193
45214
|
const target = event.target;
|
45194
|
-
if (!target) {
|
45215
|
+
if (!target || target?.textContent?.trim()?.toLowerCase() === name?.trim()?.toLowerCase()) {
|
45195
45216
|
setEditingSheet(null);
|
45196
45217
|
return;
|
45197
45218
|
}
|
@@ -45202,13 +45223,13 @@ const ExcelFile = ({
|
|
45202
45223
|
setEditingSheet(null);
|
45203
45224
|
return;
|
45204
45225
|
}
|
45205
|
-
if (updatedSheetValue.length >
|
45206
|
-
toast.warning('The sheet name cannot be greater than
|
45226
|
+
if (updatedSheetValue.length > 50) {
|
45227
|
+
toast.warning('The sheet name cannot be greater than 50 characters');
|
45207
45228
|
target.textContent = selectedSheet.name;
|
45208
45229
|
setEditingSheet(null);
|
45209
45230
|
return;
|
45210
45231
|
}
|
45211
|
-
if (sheetNames.includes(updatedSheetValue) &&
|
45232
|
+
if (sheetNames.map(name => name.toLowerCase()).includes(updatedSheetValue.toLowerCase()) && name.trim()?.toLowerCase() !== updatedSheetValue?.toLowerCase()) {
|
45212
45233
|
toast.warning('Sheet name already exists');
|
45213
45234
|
target.textContent = selectedSheet.name;
|
45214
45235
|
setEditingSheet(null);
|
@@ -52274,9 +52295,14 @@ const SessionDropdown = ({
|
|
52274
52295
|
onTabClick,
|
52275
52296
|
onDownloadClick,
|
52276
52297
|
onDeleteClick,
|
52298
|
+
downloadIconName = "download_file",
|
52299
|
+
deleteIconName = "delete_icon",
|
52277
52300
|
tabsData
|
52278
52301
|
}) => {
|
52279
52302
|
const itemsToDisplay = secondaryHeader && activeTab === 'secondary' ? secondaryItems : primaryItems;
|
52303
|
+
const hasSecondaryItems = secondaryCount && parseInt(secondaryCount) > 0;
|
52304
|
+
const hasPrimaryItems = primaryCount && parseInt(primaryCount) > 0;
|
52305
|
+
const showActionIcons = secondaryHeader && (hasPrimaryItems || hasSecondaryItems);
|
52280
52306
|
const handleTabClick = tabId => {
|
52281
52307
|
if (onTabClick) {
|
52282
52308
|
onTabClick(tabId);
|
@@ -52287,6 +52313,22 @@ const SessionDropdown = ({
|
|
52287
52313
|
onSecondaryTabClick();
|
52288
52314
|
}
|
52289
52315
|
};
|
52316
|
+
const renderHeaderIcons = () => jsxRuntime.jsxs("div", {
|
52317
|
+
className: "ff-dropdown-header-icons",
|
52318
|
+
children: [onDownloadClick && jsxRuntime.jsx(Icon, {
|
52319
|
+
name: downloadIconName,
|
52320
|
+
className: "ff-dropdown-icon ff-download-icon",
|
52321
|
+
onClick: onDownloadClick,
|
52322
|
+
width: 18,
|
52323
|
+
height: 20
|
52324
|
+
}), onDeleteClick && jsxRuntime.jsx(Icon, {
|
52325
|
+
name: deleteIconName,
|
52326
|
+
className: "ff-dropdown-icon ff-delete-icon",
|
52327
|
+
onClick: onDeleteClick,
|
52328
|
+
width: 25,
|
52329
|
+
height: 25
|
52330
|
+
})]
|
52331
|
+
});
|
52290
52332
|
return jsxRuntime.jsxs("div", {
|
52291
52333
|
className: "ff-resolution-dropdown",
|
52292
52334
|
style: width ? {
|
@@ -52303,22 +52345,32 @@ const SessionDropdown = ({
|
|
52303
52345
|
tabsData: tabsData,
|
52304
52346
|
activeTabId: activeTabId,
|
52305
52347
|
onTabClick: handleTabClick
|
52348
|
+
}), showActionIcons && renderHeaderIcons()]
|
52349
|
+
}) : secondaryHeader && showActionIcons ? jsxRuntime.jsxs("div", {
|
52350
|
+
className: "ff-dropdown-header-dual",
|
52351
|
+
children: [jsxRuntime.jsxs("div", {
|
52352
|
+
className: `ff-dropdown-header-item ${activeTab === "primary" ? "active" : ""}`,
|
52353
|
+
onClick: onPrimaryTabClick,
|
52354
|
+
children: [jsxRuntime.jsx(Typography, {
|
52355
|
+
fontWeight: "semi-bold",
|
52356
|
+
className: "ff-dropdown-text",
|
52357
|
+
children: header
|
52358
|
+
}), primaryCount && jsxRuntime.jsx("span", {
|
52359
|
+
className: "ff-dropdown-count",
|
52360
|
+
children: primaryCount
|
52361
|
+
})]
|
52306
52362
|
}), jsxRuntime.jsxs("div", {
|
52307
|
-
className:
|
52308
|
-
|
52309
|
-
|
52310
|
-
|
52311
|
-
|
52312
|
-
|
52313
|
-
|
52314
|
-
|
52315
|
-
|
52316
|
-
className: "ff-dropdown-icon ff-delete-icon",
|
52317
|
-
onClick: onDeleteClick,
|
52318
|
-
width: 25,
|
52319
|
-
height: 25
|
52363
|
+
className: `ff-dropdown-header-item ${activeTab === "secondary" ? "active" : ""}`,
|
52364
|
+
onClick: onSecondaryTabClick,
|
52365
|
+
children: [jsxRuntime.jsx(Typography, {
|
52366
|
+
fontWeight: "semi-bold",
|
52367
|
+
className: "ff-dropdown-text",
|
52368
|
+
children: secondaryHeader
|
52369
|
+
}), secondaryCount && jsxRuntime.jsx("span", {
|
52370
|
+
className: "ff-dropdown-count",
|
52371
|
+
children: secondaryCount
|
52320
52372
|
})]
|
52321
|
-
})]
|
52373
|
+
}), renderHeaderIcons()]
|
52322
52374
|
}) : secondaryHeader ? jsxRuntime.jsxs("div", {
|
52323
52375
|
className: "ff-dropdown-header-dual",
|
52324
52376
|
children: [jsxRuntime.jsxs("div", {
|
@@ -52343,21 +52395,6 @@ const SessionDropdown = ({
|
|
52343
52395
|
className: "ff-dropdown-count",
|
52344
52396
|
children: secondaryCount
|
52345
52397
|
})]
|
52346
|
-
}), jsxRuntime.jsxs("div", {
|
52347
|
-
className: "ff-dropdown-header-icons",
|
52348
|
-
children: [jsxRuntime.jsx(Icon, {
|
52349
|
-
name: "download_file",
|
52350
|
-
className: "ff-dropdown-icon ff-download-icon",
|
52351
|
-
onClick: onDownloadClick,
|
52352
|
-
width: 18,
|
52353
|
-
height: 20
|
52354
|
-
}), jsxRuntime.jsx(Icon, {
|
52355
|
-
name: "delete_icon",
|
52356
|
-
className: "ff-dropdown-icon ff-delete-icon",
|
52357
|
-
onClick: onDeleteClick,
|
52358
|
-
width: 25,
|
52359
|
-
height: 25
|
52360
|
-
})]
|
52361
52398
|
})]
|
52362
52399
|
}) : jsxRuntime.jsx(Typography, {
|
52363
52400
|
fontSize: 16,
|
@@ -52503,6 +52540,60 @@ const addLastChild = treeData => {
|
|
52503
52540
|
return updatedTreeData;
|
52504
52541
|
};
|
52505
52542
|
|
52543
|
+
const calculateParentSiblings = (node, allNodes) => {
|
52544
|
+
const hierarchy = node.hierarchy || 0;
|
52545
|
+
if (hierarchy === 0) {
|
52546
|
+
return []; // Root nodes have no parent connecting lines
|
52547
|
+
}
|
52548
|
+
const parentSiblings = [];
|
52549
|
+
const currentNodeIndex = allNodes.findIndex(n => n.key === node.key);
|
52550
|
+
if (currentNodeIndex === -1) {
|
52551
|
+
return new Array(hierarchy).fill(false);
|
52552
|
+
}
|
52553
|
+
// Build path from root to current node
|
52554
|
+
const path = getPathToNode(node, allNodes);
|
52555
|
+
// For each hierarchy level from 0 to hierarchy-1
|
52556
|
+
for (let level = 0; level < hierarchy; level++) {
|
52557
|
+
if (level === 0) {
|
52558
|
+
// Special case for level 0: check for more root children after this node
|
52559
|
+
const rootChildrenAfter = allNodes.slice(currentNodeIndex + 1).filter(n => (n.hierarchy || 0) === 1); // Root children have hierarchy 1
|
52560
|
+
parentSiblings.push(rootChildrenAfter.length > 0);
|
52561
|
+
} else {
|
52562
|
+
// For other levels: find ancestor and check for siblings after
|
52563
|
+
const ancestor = path.find(n => (n.hierarchy || 0) === level);
|
52564
|
+
if (!ancestor) {
|
52565
|
+
parentSiblings.push(false);
|
52566
|
+
continue;
|
52567
|
+
}
|
52568
|
+
// Find children of this ancestor
|
52569
|
+
const ancestorChildren = allNodes.filter(n => n.parentId === ancestor.key);
|
52570
|
+
// Check if any child appears after the current node
|
52571
|
+
let hasChildrenAfter = false;
|
52572
|
+
for (const child of ancestorChildren) {
|
52573
|
+
const childIndex = allNodes.findIndex(n => n.key === child.key);
|
52574
|
+
if (childIndex > currentNodeIndex) {
|
52575
|
+
hasChildrenAfter = true;
|
52576
|
+
break;
|
52577
|
+
}
|
52578
|
+
}
|
52579
|
+
parentSiblings.push(hasChildrenAfter);
|
52580
|
+
}
|
52581
|
+
}
|
52582
|
+
return parentSiblings;
|
52583
|
+
};
|
52584
|
+
const getPathToNode = (node, allNodes) => {
|
52585
|
+
const path = [];
|
52586
|
+
let current = node;
|
52587
|
+
while (current) {
|
52588
|
+
path.unshift(current);
|
52589
|
+
if (!current.parentId) break;
|
52590
|
+
const found = allNodes.find(n => n.key === current.parentId);
|
52591
|
+
if (!found) break;
|
52592
|
+
current = found;
|
52593
|
+
}
|
52594
|
+
return path;
|
52595
|
+
};
|
52596
|
+
|
52506
52597
|
const addNewRow = (treeData, newNode, rootNode) => {
|
52507
52598
|
const {
|
52508
52599
|
sourceId,
|
@@ -52538,8 +52629,26 @@ const addNewRow = (treeData, newNode, rootNode) => {
|
|
52538
52629
|
}
|
52539
52630
|
const updatedTreeData = [...treeData];
|
52540
52631
|
const sourceIndex = treeData.findIndex(node => node.key === sourceId);
|
52632
|
+
// Create new node with proper parentId and hierarchy
|
52633
|
+
let newNodeParentId = null;
|
52634
|
+
let newNodeHierarchy = 0;
|
52635
|
+
switch (action) {
|
52636
|
+
case 'addAbove':
|
52637
|
+
newNodeParentId = sourceNode.parentId;
|
52638
|
+
newNodeHierarchy = sourceNode.hierarchy;
|
52639
|
+
break;
|
52640
|
+
case 'addBelow':
|
52641
|
+
newNodeParentId = payloadSourceNode?.parentId || sourceNode.parentId;
|
52642
|
+
newNodeHierarchy = payloadSourceNode?.hierarchy || sourceNode.hierarchy;
|
52643
|
+
break;
|
52644
|
+
case 'addInside':
|
52645
|
+
newNodeParentId = payloadSourceNode?.key || sourceNode.key;
|
52646
|
+
newNodeHierarchy = (payloadSourceNode?.hierarchy || sourceNode.hierarchy) + 1;
|
52647
|
+
break;
|
52648
|
+
}
|
52541
52649
|
const newNodeBase = {
|
52542
|
-
hierarchy:
|
52650
|
+
hierarchy: newNodeHierarchy,
|
52651
|
+
parentId: newNodeParentId,
|
52543
52652
|
sourceId: sourceNode.key,
|
52544
52653
|
isNewNode: true,
|
52545
52654
|
key: 'new-node',
|
@@ -52552,28 +52661,25 @@ const addNewRow = (treeData, newNode, rootNode) => {
|
|
52552
52661
|
confirmIconTooltip,
|
52553
52662
|
cancelIconTooltip
|
52554
52663
|
};
|
52555
|
-
let parentId;
|
52556
52664
|
switch (action) {
|
52557
52665
|
case 'addAbove':
|
52558
52666
|
updatedTreeData.splice(sourceIndex, 0, newNodeBase);
|
52559
52667
|
break;
|
52560
52668
|
case 'addBelow':
|
52561
|
-
|
52562
|
-
updatedTreeData.splice(sourceIndex + 1, 0, {
|
52563
|
-
...newNodeBase,
|
52564
|
-
parentId
|
52565
|
-
});
|
52669
|
+
updatedTreeData.splice(sourceIndex + 1, 0, newNodeBase);
|
52566
52670
|
break;
|
52567
52671
|
case 'addInside':
|
52568
|
-
|
52569
|
-
updatedTreeData.splice(sourceIndex + 1, 0, {
|
52570
|
-
...newNodeBase,
|
52571
|
-
hierarchy: newNodeBase.hierarchy + 1,
|
52572
|
-
parentId
|
52573
|
-
});
|
52672
|
+
updatedTreeData.splice(sourceIndex + 1, 0, newNodeBase);
|
52574
52673
|
break;
|
52575
52674
|
}
|
52576
|
-
|
52675
|
+
// Apply lastChild updates
|
52676
|
+
const treeWithLastChild = addLastChild(updatedTreeData);
|
52677
|
+
// Calculate parentSiblings for all nodes
|
52678
|
+
const treeWithParentSiblings = treeWithLastChild.map(node => ({
|
52679
|
+
...node,
|
52680
|
+
parentSiblings: calculateParentSiblings(node, treeWithLastChild)
|
52681
|
+
}));
|
52682
|
+
return treeWithParentSiblings;
|
52577
52683
|
};
|
52578
52684
|
|
52579
52685
|
const renderSpaces = (level, parentSiblings = [], isLast, nextSibling, isContainer) => {
|