datastake-daf 0.6.368 → 0.6.370

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.
@@ -47000,7 +47000,6 @@ const filterParams = value => {
47000
47000
  };
47001
47001
  };
47002
47002
 
47003
- const NEW_PAGINATION_TITLES = ["nashiriki"];
47004
47003
  const useFilters = ({
47005
47004
  view,
47006
47005
  module,
@@ -47014,57 +47013,55 @@ const useFilters = ({
47014
47013
  doPagination = true,
47015
47014
  getRedirectLink
47016
47015
  }) => {
47017
- const PAGE = NEW_PAGINATION_TITLES.includes(module) ? "skip" : "page";
47018
- const PAGE_SIZE = NEW_PAGINATION_TITLES.includes(module) ? "take" : "pageSize";
47019
47016
  const params = React.useMemo(() => new URLSearchParams(location.search), [location.search]);
47020
47017
  const [activeFilters, setActiveFilters] = React.useState(defaultActiveFilters || getDefaultActiveFilters(params, selectFiltersConfig, defaultPageSize, defaultUrlParams, doPagination));
47021
47018
  const [pagination, setPagination] = React.useState(defaultActiveFilters ? {
47022
- current: defaultActiveFilters[PAGE] || 1,
47023
- [PAGE_SIZE]: defaultActiveFilters[PAGE_SIZE] || defaultPageSize,
47019
+ current: defaultActiveFilters.page || 1,
47020
+ pageSize: defaultActiveFilters.pageSize || defaultPageSize,
47024
47021
  showSizeChanger: true
47025
47022
  } : {
47026
- current: !isNaN(Number(params.get(PAGE))) ? Number(params.get(PAGE)) || 1 : 1,
47027
- [PAGE_SIZE]: !isNaN(Number(params.get(PAGE_SIZE))) ? Number(params.get(PAGE_SIZE)) || defaultPageSize : defaultPageSize,
47023
+ current: !isNaN(Number(params.get('page'))) ? Number(params.get('page')) || 1 : 1,
47024
+ pageSize: !isNaN(Number(params.get('pageSize'))) ? Number(params.get('pageSize')) || defaultPageSize : defaultPageSize,
47028
47025
  showSizeChanger: true
47029
47026
  });
47030
47027
  React.useEffect(() => {
47031
47028
  if (defaultActiveFilters) {
47032
47029
  setPagination(prev => ({
47033
47030
  ...prev,
47034
- current: defaultActiveFilters[PAGE] || 1,
47035
- [PAGE_SIZE]: defaultActiveFilters[PAGE_SIZE] || defaultPageSize,
47031
+ current: defaultActiveFilters.page || 1,
47032
+ pageSize: defaultActiveFilters.pageSize || defaultPageSize,
47036
47033
  showSizeChanger: true
47037
47034
  }));
47038
47035
  return;
47039
47036
  }
47040
47037
  setPagination(prev => ({
47041
47038
  ...prev,
47042
- current: !isNaN(Number(params.get(PAGE))) ? Number(params.get(PAGE)) || 1 : 1,
47043
- [PAGE_SIZE]: !isNaN(Number(params.get(PAGE_SIZE))) ? Number(params.get(PAGE_SIZE)) || defaultPageSize : defaultPageSize,
47039
+ current: !isNaN(Number(params.get('page'))) ? Number(params.get('page')) || 1 : 1,
47040
+ pageSize: !isNaN(Number(params.get('pageSize'))) ? Number(params.get('pageSize')) || defaultPageSize : defaultPageSize,
47044
47041
  showSizeChanger: true
47045
47042
  }));
47046
47043
  }, []);
47047
47044
  const updateQuery = React.useCallback((filters, page) => {
47048
47045
  const qs = Object.keys(filters).filter(key => {
47049
47046
  if (!doPagination) {
47050
- return !!filters[key] && key !== PAGE && key !== PAGE_SIZE;
47047
+ return !!filters[key] && key !== 'page' && key !== 'pageSize';
47051
47048
  }
47052
47049
  return !!filters[key];
47053
47050
  }).map(key => {
47054
- if (filters[key] && typeof filters[key] === "object") {
47051
+ if (filters[key] && typeof filters[key] === 'object') {
47055
47052
  return `${key}=${JSON.stringify(filters[key])}`;
47056
47053
  }
47057
47054
  return `${key}=${filters[key]}`;
47058
- }).join("&");
47055
+ }).join('&');
47059
47056
  if (view) {
47060
- if (typeof getRedirectLink === "function") {
47061
- goTo(getRedirectLink(view === "mine-monitoring" ? qs !== "" ? `${location.pathname}?${qs}` : doPagination ? `${location.pathname}?${PAGE}=${page}` : location.pathname : qs !== "" ? `${`/app/${view}`}?${qs}` : doPagination ? `${`/app/${view}`}?${PAGE}=${page}` : `${`/app/${view}`}`));
47057
+ if (typeof getRedirectLink === 'function') {
47058
+ goTo(getRedirectLink(view === 'mine-monitoring' ? qs !== '' ? `${location.pathname}?${qs}` : doPagination ? `${location.pathname}?page=${page}` : location.pathname : qs !== '' ? `${`/app/${view}`}?${qs}` : doPagination ? `${`/app/${view}`}?page=${page}` : `${`/app/${view}`}`));
47062
47059
  return;
47063
47060
  }
47064
- if (view === "mine-monitoring") {
47065
- goTo(qs !== "" ? `${location.pathname}?${qs}` : doPagination ? `${location.pathname}?${PAGE}=${page}` : location.pathname);
47061
+ if (view === 'mine-monitoring') {
47062
+ goTo(qs !== '' ? `${location.pathname}?${qs}` : doPagination ? `${location.pathname}?page=${page}` : location.pathname);
47066
47063
  } else {
47067
- goTo(qs !== "" ? `${`/app/${module}/${view}`}?${qs}` : doPagination ? `${`/app/${module}/${view}`}?${PAGE}=${page}` : `${`/app/${module}/${view}`}`);
47064
+ goTo(qs !== '' ? `${`/app/${module}/${view}`}?${qs}` : doPagination ? `${`/app/${module}/${view}`}?page=${page}` : `${`/app/${module}/${view}`}`);
47068
47065
  }
47069
47066
  }
47070
47067
  }, [module, view, location.pathname]); // Updated dependency array
@@ -47097,9 +47094,9 @@ const useFilters = ({
47097
47094
  const filters = StorageManager.saveFilters(module, view, {
47098
47095
  ...filteredFilters
47099
47096
  });
47100
- if (!filters[PAGE_SIZE]) {
47101
- filters[PAGE] = 1;
47102
- filters[PAGE_SIZE] = pagination[PAGE_SIZE];
47097
+ if (!filters.pageSize) {
47098
+ filters.page = 1;
47099
+ filters.pageSize = pagination.pageSize;
47103
47100
  }
47104
47101
  updateQuery(filters, 1);
47105
47102
  }, [activeFilters]);
@@ -47110,7 +47107,7 @@ const useFilters = ({
47110
47107
  const {
47111
47108
  show
47112
47109
  } = conf;
47113
- if (typeof show === "function") {
47110
+ if (typeof show === 'function') {
47114
47111
  if (show(filters)) {
47115
47112
  return all;
47116
47113
  }
@@ -47128,7 +47125,7 @@ const useFilters = ({
47128
47125
  ...prev
47129
47126
  };
47130
47127
  Object.keys(o).forEach(k => {
47131
- if (Object.keys(selectFiltersConfig).includes(k) || k === "authorId") {
47128
+ if (Object.keys(selectFiltersConfig).includes(k) || k === 'authorId') {
47132
47129
  delete o[k];
47133
47130
  }
47134
47131
  });
@@ -47136,7 +47133,7 @@ const useFilters = ({
47136
47133
  o[k] = v;
47137
47134
  });
47138
47135
  if (doPagination) {
47139
- o[PAGE] = 1;
47136
+ o.page = 1;
47140
47137
  }
47141
47138
  return o;
47142
47139
  });
@@ -47156,11 +47153,11 @@ const useFilters = ({
47156
47153
  } = sorter || {};
47157
47154
  let fs = {
47158
47155
  ...activeFilters,
47159
- [PAGE]: page[PAGE_SIZE] !== activeFilters[PAGE_SIZE] ? 1 : page.current,
47160
- [PAGE_SIZE]: page[PAGE_SIZE] || defaultPageSize
47156
+ page: page.pageSize !== activeFilters.pageSize ? 1 : page.current,
47157
+ pageSize: page.pageSize || defaultPageSize
47161
47158
  };
47162
47159
  if (sorter && (columnKey !== sortBy || order !== sortDir)) {
47163
- fs[PAGE] = 1;
47160
+ fs.page = 1;
47164
47161
  }
47165
47162
  if (order) {
47166
47163
  fs = {
@@ -47170,8 +47167,8 @@ const useFilters = ({
47170
47167
  };
47171
47168
  } else if (sortBy || sortDir) {
47172
47169
  fs = Object.keys(fs).reduce((all, key) => {
47173
- if (key !== "sortDir" && key !== "sortBy") {
47174
- if (key === PAGE || key === PAGE_SIZE) {
47170
+ if (key !== 'sortDir' && key !== 'sortBy') {
47171
+ if (key === 'page' || key === 'pageSize') {
47175
47172
  all[key] = fs[key];
47176
47173
  } else {
47177
47174
  all[key] = activeFilters[key];
@@ -47185,19 +47182,19 @@ const useFilters = ({
47185
47182
  page.current = 1;
47186
47183
  }
47187
47184
  const filters = StorageManager.saveFilters(module, view, {
47188
- [PAGE]: page.current
47185
+ page: page.current
47189
47186
  }, true);
47190
47187
  updateQuery(filters, page.current);
47191
47188
  setPagination(prev => ({
47192
47189
  ...prev,
47193
- current: fs[PAGE],
47194
- [PAGE_SIZE]: fs[PAGE_SIZE] || defaultPageSize
47190
+ current: fs.page,
47191
+ pageSize: fs.pageSize || defaultPageSize
47195
47192
  }));
47196
47193
  };
47197
47194
  const onSearch = React.useCallback((activeFilter, value) => {
47198
47195
  setActiveFilters(prev => ({
47199
47196
  ...prev,
47200
- [PAGE]: 1,
47197
+ page: 1,
47201
47198
  searchParams: activeFilter,
47202
47199
  search: value
47203
47200
  }));
@@ -47207,7 +47204,7 @@ const useFilters = ({
47207
47204
  }));
47208
47205
  }, []);
47209
47206
  const totalPages = React.useMemo(() => {
47210
- return Math.ceil(pagination.total / pagination[PAGE_SIZE]);
47207
+ return Math.ceil(pagination.total / pagination.pageSize);
47211
47208
  }, [pagination]);
47212
47209
  const canGoPrev = React.useMemo(() => pagination.current !== 1, [pagination]);
47213
47210
  const canGoNext = React.useMemo(() => pagination.current !== totalPages && totalPages, [pagination, totalPages]);
@@ -51016,12 +51013,14 @@ function DualAxesChart(_ref) {
51016
51013
  });
51017
51014
  }
51018
51015
 
51016
+ // components/Nodes/PrimaryNode.jsx
51019
51017
  const MAIN_NODE_WIDTH = 300;
51020
51018
  const MAIN_NODE_HEIGHT = 150;
51021
51019
  function PrimaryNode({
51022
51020
  id,
51023
51021
  data
51024
51022
  }) {
51023
+ const isPdf = data?.isPdf; // Get isPdf from data prop
51025
51024
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
51026
51025
  children: [/*#__PURE__*/jsxRuntime.jsx(react.Handle, {
51027
51026
  type: "source",
@@ -51040,8 +51039,9 @@ function PrimaryNode({
51040
51039
  opacity: 0
51041
51040
  }
51042
51041
  }), /*#__PURE__*/jsxRuntime.jsxs(Style$f, {
51042
+ $isPdf: isPdf,
51043
51043
  className: "flex",
51044
- children: [/*#__PURE__*/jsxRuntime.jsx("div", {
51044
+ children: [" ", /*#__PURE__*/jsxRuntime.jsx("div", {
51045
51045
  className: "left flex flex-column justify-center",
51046
51046
  style: {
51047
51047
  background: data.backgroundColor || "#ade9e1",
@@ -51151,13 +51151,20 @@ function PrimaryNode({
51151
51151
  }
51152
51152
  const Style$f = dt.div`
51153
51153
  width: ${MAIN_NODE_WIDTH}px;
51154
+ height: ${MAIN_NODE_HEIGHT}px; /* Explicitly set height */
51154
51155
  display: flex;
51155
51156
  background: white;
51156
51157
  border-radius: 8px;
51157
- box-shadow: 0px 3.76px 10.03px 0px #00000014;
51158
- box-shadow: 0px 1.88px 3.76px -2.51px #0000001f;
51159
51158
  overflow: hidden;
51160
- box-shadow: 0px 5.64px 17.56px 5.02px #0000000d;
51159
+ /* Conditional styles for PDF vs screen */
51160
+ ${props => props.$isPdf ? `
51161
+ border: 1px solid var(--base-gray-30); /* Ensure a visible border in PDF */
51162
+ box-shadow: none; /* Remove shadow for PDF */
51163
+ ` : `
51164
+ box-shadow: 0px 3.76px 10.03px 0px #00000014, 0px 1.88px 3.76px -2.51px #0000001f, 0px 5.64px 17.56px 5.02px #0000000d;
51165
+ `}
51166
+ -webkit-print-color-adjust: exact;
51167
+ print-color-adjust: exact;
51161
51168
 
51162
51169
  .left {
51163
51170
  width: 32px;
@@ -51249,7 +51256,8 @@ PrimaryNode.propTypes = {
51249
51256
  icon: PropTypes__default["default"].string,
51250
51257
  backgroundColor: PropTypes__default["default"].string,
51251
51258
  totalSources: PropTypes__default["default"].number,
51252
- onClick: PropTypes__default["default"].func
51259
+ onClick: PropTypes__default["default"].func,
51260
+ isPdf: PropTypes__default["default"].bool
51253
51261
  })
51254
51262
  };
51255
51263
 
@@ -51370,7 +51378,9 @@ const Style$e = dt.div`
51370
51378
  }
51371
51379
  `;
51372
51380
 
51381
+ // components/Nodes/NameNode.jsx
51373
51382
  const NAME_CARD_WIDTH = 315;
51383
+ const NAME_CARD_HEIGHT = 37;
51374
51384
  const {
51375
51385
  useToken: useToken$7
51376
51386
  } = antd.theme;
@@ -51381,6 +51391,7 @@ function NameNode({
51381
51391
  token
51382
51392
  } = useToken$7();
51383
51393
  const translateFN = typeof data?.t === "function" ? data.t : key => key;
51394
+ const isPdf = data?.isPdf;
51384
51395
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
51385
51396
  children: [/*#__PURE__*/jsxRuntime.jsx(react.Handle, {
51386
51397
  type: "source",
@@ -51399,6 +51410,7 @@ function NameNode({
51399
51410
  opacity: 0
51400
51411
  }
51401
51412
  }), /*#__PURE__*/jsxRuntime.jsxs(Style$d, {
51413
+ $isPdf: isPdf,
51402
51414
  style: {
51403
51415
  opacity: data.isEmpty ? 0.5 : 1
51404
51416
  },
@@ -51449,7 +51461,7 @@ function NameNode({
51449
51461
  }
51450
51462
  })
51451
51463
  }) : null]
51452
- }), /*#__PURE__*/jsxRuntime.jsx("div", {
51464
+ }), !isPdf && /*#__PURE__*/jsxRuntime.jsx("div", {
51453
51465
  style: {
51454
51466
  marginLeft: "auto"
51455
51467
  },
@@ -51486,27 +51498,35 @@ function NameNode({
51486
51498
  });
51487
51499
  }
51488
51500
  const Style$d = dt.div`
51489
- width: ${NAME_CARD_WIDTH}px;
51490
- display: flex;
51491
- background: white;
51492
- border-radius: 8px;
51493
- box-shadow: 0px 3.76px 10.03px 0px #00000014;
51494
- box-shadow: 0px 1.88px 3.76px -2.51px #0000001f;
51495
- overflow: hidden;
51496
- box-shadow: 0px 5.64px 17.56px 5.02px #0000000d;
51501
+ width: ${NAME_CARD_WIDTH}px;
51502
+ height: ${NAME_CARD_HEIGHT}px;
51503
+ display: flex;
51504
+ background: white;
51505
+ border-radius: 8px;
51506
+ overflow: hidden;
51507
+ ${props => props.$isPdf ? `
51508
+ border: 1px solid var(--base-gray-30);
51509
+ box-shadow: none;
51510
+ ` : `
51511
+ box-shadow: 0px 3.76px 10.03px 0px #00000014, 0px 1.88px 3.76px -2.51px #0000001f, 0px 5.64px 17.56px 5.02px #0000000d;
51512
+ `}
51513
+ -webkit-print-color-adjust: exact;
51514
+ print-color-adjust: exact;
51497
51515
 
51498
- .left {
51499
- width: 32px;
51500
- background: red;
51501
- border-top-left-radius: 12px;
51502
- border-bottom-left-radius: 12px;
51503
- }
51516
+ .left {
51517
+ width: 32px;
51518
+ background: red;
51519
+ border-top-left-radius: 12px;
51520
+ border-bottom-left-radius: 12px;
51521
+ }
51504
51522
 
51505
- .right {
51506
- padding: 16px 12px;
51507
- width: 100%
51508
- border-bottom: 1px solid var(--base-gray-30);
51509
- }
51523
+ .right {
51524
+ padding: 0px 12px;
51525
+ width: 100%;
51526
+ display: flex;
51527
+ align-items: center;
51528
+ border-bottom: none;
51529
+ }
51510
51530
  `;
51511
51531
 
51512
51532
  const Style$c = dt.div`
@@ -51732,6 +51752,7 @@ function ExpandedNode({
51732
51752
  });
51733
51753
  }
51734
51754
 
51755
+ // components/Edges/TooltipEdge.jsx
51735
51756
  function ToolTipEdge({
51736
51757
  sourceX,
51737
51758
  sourceY,
@@ -51741,7 +51762,20 @@ function ToolTipEdge({
51741
51762
  data,
51742
51763
  targetPosition
51743
51764
  }) {
51744
- const [smoothPath] = react.getSmoothStepPath({
51765
+ const {
51766
+ isOnlyOne,
51767
+ isPdf
51768
+ } = data; // Destructure isPdf from data
51769
+
51770
+ const [edgePath] = isPdf && isOnlyOne // Condition for straight path in PDF for single nodes
51771
+ ? react.getStraightPath({
51772
+ sourceX,
51773
+ sourceY,
51774
+ sourcePosition,
51775
+ targetX,
51776
+ targetY,
51777
+ targetPosition
51778
+ }) : react.getSmoothStepPath({
51745
51779
  sourceX,
51746
51780
  sourceY,
51747
51781
  sourcePosition,
@@ -51758,8 +51792,8 @@ function ToolTipEdge({
51758
51792
  });
51759
51793
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
51760
51794
  children: [/*#__PURE__*/jsxRuntime.jsx(react.BaseEdge, {
51761
- path: smoothPath
51762
- }), /*#__PURE__*/jsxRuntime.jsx(react.EdgeLabelRenderer, {
51795
+ path: edgePath
51796
+ }), " ", /*#__PURE__*/jsxRuntime.jsx(react.EdgeLabelRenderer, {
51763
51797
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
51764
51798
  className: "button-edge__label nodrag nopan",
51765
51799
  style: {
@@ -51957,6 +51991,7 @@ function VerticalPathEdge({
51957
51991
  });
51958
51992
  }
51959
51993
 
51994
+ // components/Edges/DefaultEdge.jsx
51960
51995
  const ACTIVE_OPACITY = 1;
51961
51996
  const DISABLED_OPACITY = 0.5;
51962
51997
  const EDGE_STROKE = "#9DA4AE";
@@ -51976,12 +52011,22 @@ function DefaultEdge({
51976
52011
  associatedNodes = [],
51977
52012
  renderTooltipItems = () => [],
51978
52013
  getTotal = () => 0,
51979
- tooltipTitle
52014
+ tooltipTitle,
52015
+ isPdf // Destructure isPdf from data
51980
52016
  } = data;
51981
52017
  const isSelected = associatedNodes?.includes(source) && associatedNodes?.includes(target) && activeNode;
51982
52018
  const opacity = activeNode ? isSelected ? ACTIVE_OPACITY : DISABLED_OPACITY : ACTIVE_OPACITY;
51983
52019
  const arrowHeadId = `arrow-head-${id}`;
51984
- const [edgePath] = react.getSmoothStepPath({
52020
+ const [edgePath] = isPdf // Use straight path for PDF
52021
+ ? react.getStraightPath({
52022
+ sourceX,
52023
+ sourceY,
52024
+ sourcePosition: data.type === "left" ? react.Position.Left : react.Position.Right,
52025
+ targetX,
52026
+ targetY,
52027
+ targetPosition: data.type === "left" ? react.Position.Right : react.Position.Left
52028
+ }) : react.getSmoothStepPath({
52029
+ // Use smooth path for normal rendering
51985
52030
  sourceX,
51986
52031
  sourceY,
51987
52032
  targetX,
@@ -52081,6 +52126,7 @@ const BaseGraph = /*#__PURE__*/React.forwardRef(function BaseGraph({
52081
52126
  t,
52082
52127
  withDuration = true,
52083
52128
  onFilterChange,
52129
+ isPdf,
52084
52130
  ...props
52085
52131
  }, ref) {
52086
52132
  const {
@@ -52137,7 +52183,7 @@ const BaseGraph = /*#__PURE__*/React.forwardRef(function BaseGraph({
52137
52183
  duration: withDuration ? 300 : undefined
52138
52184
  },
52139
52185
  ...props,
52140
- children: /*#__PURE__*/jsxRuntime.jsxs(react.Controls, {
52186
+ children: !isPdf && /*#__PURE__*/jsxRuntime.jsxs(react.Controls, {
52141
52187
  position: "bottom-right",
52142
52188
  showFitView: false,
52143
52189
  showInteractive: false,
@@ -52654,7 +52700,8 @@ function positionDataNodes(_ref2) {
52654
52700
  total,
52655
52701
  mainNode,
52656
52702
  type,
52657
- hasContent
52703
+ hasContent,
52704
+ isPdf
52658
52705
  } = _ref2;
52659
52706
  const DATA_NODE_WIDTH = DATA_NODE_SIZE[type].width;
52660
52707
  const DATA_NODE_HEIGHT = DATA_NODE_SIZE[type].height;
@@ -52672,19 +52719,40 @@ function positionDataNodes(_ref2) {
52672
52719
  }
52673
52720
  return DEFAULT_SIBLING_SPACE;
52674
52721
  };
52675
- const Y_SPACE_FROM_SIBLINGS = siblingSpace();
52722
+ siblingSpace();
52676
52723
  const X_SPACE_FROM_ICON_NODE = 130;
52677
- const MIN_SPACE_REQUIRED = Y_SPACE_FROM_SIBLINGS + DATA_NODE_HEIGHT;
52678
- const totalHeight = total * MIN_SPACE_REQUIRED;
52679
- const iconNodeCenterY = iconNode.position.y + ICON_NODE_HEIGHT / 2 + (hasContent ? 26.5 : type === "primaryNode" ? 15 : 16.5);
52680
- const startY = iconNodeCenterY - totalHeight / 2;
52681
- const END_Y = startY + totalHeight;
52682
- const yOffset = index * MIN_SPACE_REQUIRED;
52683
- let yPosition = startY + yOffset;
52684
- if (isAboveMainNode && END_Y >= mainNode.position.y + DATA_NODE_HEIGHT / 2) {
52685
- yPosition = mainNode.position.y + DATA_NODE_HEIGHT / 2 - totalHeight + yOffset;
52686
- } else if (!isAboveMainNode && startY < mainNode.position.y + DATA_NODE_HEIGHT / 2) {
52687
- yPosition = mainNode.position.y + DATA_NODE_HEIGHT / 2 + yOffset;
52724
+ iconNode.position.y + ICON_NODE_HEIGHT / 2 + (hasContent ? 26.5 : type === "primaryNode" ? 15 : 16.5);
52725
+ let yPosition;
52726
+ const iconNodeHandleCenterY = iconNode.position.y + ICON_NODE_HEIGHT / 2 + (hasContent ? 10 : 0);
52727
+ if (type === "nameNode" && total === 1) {
52728
+ yPosition = iconNodeHandleCenterY - DATA_NODE_HEIGHT / 2;
52729
+ } else {
52730
+ const siblingSpace = () => {
52731
+ var _iconNode$data2;
52732
+ if (type === "primaryNode") {
52733
+ var _iconNode$data$childr2;
52734
+ if ((iconNode === null || iconNode === void 0 || (_iconNode$data$childr2 = iconNode.data.children) === null || _iconNode$data$childr2 === void 0 ? void 0 : _iconNode$data$childr2.length) === 1 && hasContent) {
52735
+ return SINGLE_CHILDREN_PRIMARY_WITH_CONTENT_SPACE;
52736
+ }
52737
+ return DEFAULT_PRIMARY_NODE_SPACE;
52738
+ }
52739
+ if ((iconNode === null || iconNode === void 0 || (_iconNode$data2 = iconNode.data) === null || _iconNode$data2 === void 0 || (_iconNode$data2 = _iconNode$data2.children) === null || _iconNode$data2 === void 0 ? void 0 : _iconNode$data2.length) === 0) {
52740
+ return NO_CHILDREN_SIBLING_SPACE;
52741
+ }
52742
+ return DEFAULT_SIBLING_SPACE;
52743
+ };
52744
+ const Y_SPACE_FROM_SIBLINGS = siblingSpace();
52745
+ const MIN_SPACE_REQUIRED = Y_SPACE_FROM_SIBLINGS + DATA_NODE_HEIGHT;
52746
+ const totalHeight = total * MIN_SPACE_REQUIRED;
52747
+ const startY = iconNodeHandleCenterY - totalHeight / 2;
52748
+ const END_Y = startY + totalHeight;
52749
+ const yOffset = index * MIN_SPACE_REQUIRED;
52750
+ yPosition = startY + yOffset;
52751
+ if (isAboveMainNode && END_Y >= mainNode.position.y + DATA_NODE_HEIGHT / 2) {
52752
+ yPosition = mainNode.position.y + DATA_NODE_HEIGHT / 2 - totalHeight + yOffset;
52753
+ } else if (!isAboveMainNode && startY < mainNode.position.y + DATA_NODE_HEIGHT / 2) {
52754
+ yPosition = mainNode.position.y + DATA_NODE_HEIGHT / 2 + yOffset;
52755
+ }
52688
52756
  }
52689
52757
  return {
52690
52758
  x: isLeftSide ? iconNode.position.x - (DATA_NODE_WIDTH + X_SPACE_FROM_ICON_NODE) : iconNode.position.x + (X_SPACE_FROM_ICON_NODE + ICON_NODE_WIDTH),
@@ -52730,7 +52798,8 @@ function StakeholderMappings(_ref3) {
52730
52798
  isEmpty: true,
52731
52799
  name: emptyString,
52732
52800
  icon: (data === null || data === void 0 ? void 0 : data.icon) || "DashboardStakeholder",
52733
- t: t
52801
+ t: t,
52802
+ isPdf: isPdf
52734
52803
  },
52735
52804
  position: {
52736
52805
  x: centerX - MAIN_NODE_WIDTH / 2,
@@ -52752,7 +52821,8 @@ function StakeholderMappings(_ref3) {
52752
52821
  onClick: (data === null || data === void 0 ? void 0 : data.onClick) || undefined,
52753
52822
  totalSources: data === null || data === void 0 ? void 0 : data.totalSources,
52754
52823
  backgroundColor: (data === null || data === void 0 ? void 0 : data.backgroundColor) || "#ade9e1",
52755
- iconColor: (data === null || data === void 0 ? void 0 : data.iconColor) || "#08949a"
52824
+ iconColor: (data === null || data === void 0 ? void 0 : data.iconColor) || "#08949a",
52825
+ isPdf: isPdf
52756
52826
  },
52757
52827
  position: {
52758
52828
  x: centerX - MAIN_NODE_WIDTH / 2,
@@ -52802,11 +52872,13 @@ function StakeholderMappings(_ref3) {
52802
52872
  setSelectedIconNodes(openIconNOdes.map(node => node.id));
52803
52873
  }
52804
52874
  const dataNodes = openIconNOdes.flatMap(node => {
52875
+ var _node$data, _node$data2;
52805
52876
  const children = node.data.children || [];
52806
52877
  const total = (children === null || children === void 0 ? void 0 : children.length) || 0;
52807
52878
  const iconNodeId = node.id;
52879
+ (node === null || node === void 0 || (_node$data = node.data) === null || _node$data === void 0 ? void 0 : _node$data.content) !== undefined && (node === null || node === void 0 || (_node$data2 = node.data) === null || _node$data2 === void 0 ? void 0 : _node$data2.content) !== null;
52808
52880
  if (children.length === 0) {
52809
- var _node$data, _node$data2, _node$data3, _node$data4, _node$data5;
52881
+ var _node$data3, _node$data4, _node$data5, _node$data6, _node$data7;
52810
52882
  iconEdges.push({
52811
52883
  id: "".concat(node.id, "-empty"),
52812
52884
  source: node.id,
@@ -52814,7 +52886,8 @@ function StakeholderMappings(_ref3) {
52814
52886
  type: "tooltipEdge",
52815
52887
  data: {
52816
52888
  isEmpty: true,
52817
- isOnlyOne: true
52889
+ isOnlyOne: true,
52890
+ isPdf: isPdf
52818
52891
  },
52819
52892
  targetHandle: node.data.order % 2 === 0 ? "left-handle-target" : "right-handle-target"
52820
52893
  });
@@ -52824,9 +52897,10 @@ function StakeholderMappings(_ref3) {
52824
52897
  type: "nameNode",
52825
52898
  data: {
52826
52899
  isEmpty: true,
52827
- name: ((_node$data = node.data) === null || _node$data === void 0 ? void 0 : _node$data.emptyName) || "No".concat((_node$data2 = node.data) === null || _node$data2 === void 0 ? void 0 : _node$data2.name, " identified"),
52828
- icon: (_node$data3 = node.data) === null || _node$data3 === void 0 ? void 0 : _node$data3.type,
52829
- t: t
52900
+ name: ((_node$data3 = node.data) === null || _node$data3 === void 0 ? void 0 : _node$data3.emptyName) || "No".concat((_node$data4 = node.data) === null || _node$data4 === void 0 ? void 0 : _node$data4.name, " identified"),
52901
+ icon: (_node$data5 = node.data) === null || _node$data5 === void 0 ? void 0 : _node$data5.type,
52902
+ t: t,
52903
+ isPdf: isPdf
52830
52904
  },
52831
52905
  position: positionDataNodes({
52832
52906
  isLeftSide: node.data.order % 2 !== 0,
@@ -52836,21 +52910,22 @@ function StakeholderMappings(_ref3) {
52836
52910
  total: 1,
52837
52911
  mainNode,
52838
52912
  type: "nameNode",
52839
- hasContent: (node === null || node === void 0 || (_node$data4 = node.data) === null || _node$data4 === void 0 ? void 0 : _node$data4.content) !== undefined && (node === null || node === void 0 || (_node$data5 = node.data) === null || _node$data5 === void 0 ? void 0 : _node$data5.content) !== null ? true : false
52913
+ hasContent: (node === null || node === void 0 || (_node$data6 = node.data) === null || _node$data6 === void 0 ? void 0 : _node$data6.content) !== undefined && (node === null || node === void 0 || (_node$data7 = node.data) === null || _node$data7 === void 0 ? void 0 : _node$data7.content) !== null ? true : false
52840
52914
  })
52841
52915
  }];
52842
52916
  }
52843
52917
  if (isPdf) {
52844
- var _node$data6, _node$data7, _node$data8, _node$data9, _node$data10, _node$data11, _node$data12, _node$data13, _node$data14;
52918
+ var _node$data8, _node$data9, _node$data10, _node$data11, _node$data12, _node$data13, _node$data14, _node$data15, _node$data16;
52845
52919
  iconEdges.push({
52846
52920
  id: "".concat(node.id, "-empty"),
52847
52921
  source: node.id,
52848
52922
  target: node.data.name + "-name-node",
52849
52923
  type: "tooltipEdge",
52850
52924
  data: {
52851
- name: node === null || node === void 0 || (_node$data6 = node.data) === null || _node$data6 === void 0 ? void 0 : _node$data6.name,
52852
- content: node === null || node === void 0 || (_node$data7 = node.data) === null || _node$data7 === void 0 ? void 0 : _node$data7.content,
52853
- isOnlyOne: true
52925
+ name: node === null || node === void 0 || (_node$data8 = node.data) === null || _node$data8 === void 0 ? void 0 : _node$data8.name,
52926
+ content: node === null || node === void 0 || (_node$data9 = node.data) === null || _node$data9 === void 0 ? void 0 : _node$data9.content,
52927
+ isOnlyOne: true,
52928
+ isPdf: true
52854
52929
  },
52855
52930
  targetHandle: node.data.order % 2 === 0 ? "left-handle-target" : "right-handle-target"
52856
52931
  });
@@ -52859,11 +52934,11 @@ function StakeholderMappings(_ref3) {
52859
52934
  id: node.data.name + "-name-node",
52860
52935
  type: "nameNode",
52861
52936
  data: {
52862
- name: node === null || node === void 0 || (_node$data8 = node.data) === null || _node$data8 === void 0 ? void 0 : _node$data8.name,
52863
- content: node === null || node === void 0 || (_node$data9 = node.data) === null || _node$data9 === void 0 ? void 0 : _node$data9.content,
52864
- icon: (_node$data10 = node.data) === null || _node$data10 === void 0 ? void 0 : _node$data10.type,
52865
- backgroundColor: node === null || node === void 0 || (_node$data11 = node.data) === null || _node$data11 === void 0 ? void 0 : _node$data11.activeColour,
52866
- iconColor: node === null || node === void 0 || (_node$data12 = node.data) === null || _node$data12 === void 0 ? void 0 : _node$data12.hoverColor,
52937
+ name: node === null || node === void 0 || (_node$data10 = node.data) === null || _node$data10 === void 0 ? void 0 : _node$data10.name,
52938
+ content: node === null || node === void 0 || (_node$data11 = node.data) === null || _node$data11 === void 0 ? void 0 : _node$data11.content,
52939
+ icon: (_node$data12 = node.data) === null || _node$data12 === void 0 ? void 0 : _node$data12.type,
52940
+ backgroundColor: node === null || node === void 0 || (_node$data13 = node.data) === null || _node$data13 === void 0 ? void 0 : _node$data13.activeColour,
52941
+ iconColor: node === null || node === void 0 || (_node$data14 = node.data) === null || _node$data14 === void 0 ? void 0 : _node$data14.hoverColor,
52867
52942
  isPdf: true,
52868
52943
  t: t
52869
52944
  },
@@ -52871,16 +52946,17 @@ function StakeholderMappings(_ref3) {
52871
52946
  isLeftSide: node.data.order % 2 !== 0,
52872
52947
  isAboveMainNode: node.data.order <= 2,
52873
52948
  iconNode: node,
52949
+ isPdf: true,
52874
52950
  index: 0,
52875
52951
  total: 1,
52876
52952
  mainNode,
52877
52953
  type: "nameNode",
52878
- hasContent: (node === null || node === void 0 || (_node$data13 = node.data) === null || _node$data13 === void 0 ? void 0 : _node$data13.content) !== undefined && (node === null || node === void 0 || (_node$data14 = node.data) === null || _node$data14 === void 0 ? void 0 : _node$data14.content) !== null ? true : false
52954
+ hasContent: (node === null || node === void 0 || (_node$data15 = node.data) === null || _node$data15 === void 0 ? void 0 : _node$data15.content) !== undefined && (node === null || node === void 0 || (_node$data16 = node.data) === null || _node$data16 === void 0 ? void 0 : _node$data16.content) !== null ? true : false
52879
52955
  })
52880
52956
  }];
52881
52957
  }
52882
52958
  return children.map((child, index) => {
52883
- var _node$data15;
52959
+ var _node$data17;
52884
52960
  iconEdges.push({
52885
52961
  id: "".concat(node.id, "-").concat(child.id),
52886
52962
  source: node.id,
@@ -52892,7 +52968,8 @@ function StakeholderMappings(_ref3) {
52892
52968
  value: child.value,
52893
52969
  tooltipHeader: child.tooltipHeader,
52894
52970
  tooltipLabel: (child === null || child === void 0 ? void 0 : child.tooltipLabel) || "Holding",
52895
- totalSources: child.totalSources || 0
52971
+ totalSources: child.totalSources || 0,
52972
+ isPdf: isPdf
52896
52973
  },
52897
52974
  targetHandle: node.data.order % 2 === 0 ? "left-handle-target" : "right-handle-target"
52898
52975
  });
@@ -52919,7 +52996,8 @@ function StakeholderMappings(_ref3) {
52919
52996
  backgroundColor: child.backgroundColor || "#ade9e1",
52920
52997
  iconColor: child.iconColor || "#08949a",
52921
52998
  icon: child.icon || "UserCircle",
52922
- content: children.length
52999
+ content: children.length,
53000
+ isPdf: isPdf
52923
53001
  },
52924
53002
  position: positionDataNodes({
52925
53003
  isLeftSide,
@@ -52929,7 +53007,8 @@ function StakeholderMappings(_ref3) {
52929
53007
  total,
52930
53008
  mainNode,
52931
53009
  type: child.type || "primaryNode",
52932
- hasContent: node !== null && node !== void 0 && (_node$data15 = node.data) !== null && _node$data15 !== void 0 && _node$data15.content ? true : false
53010
+ hasContent: node !== null && node !== void 0 && (_node$data17 = node.data) !== null && _node$data17 !== void 0 && _node$data17.content ? true : false,
53011
+ isPdf: isPdf
52933
53012
  })
52934
53013
  };
52935
53014
  });
@@ -52943,7 +53022,8 @@ function StakeholderMappings(_ref3) {
52943
53022
  type: "default",
52944
53023
  data: {
52945
53024
  group: child.id,
52946
- type: "mainNode"
53025
+ type: "mainNode",
53026
+ isPdf: isPdf
52947
53027
  }
52948
53028
  };
52949
53029
  });
@@ -52969,7 +53049,8 @@ function StakeholderMappings(_ref3) {
52969
53049
  duration: 300
52970
53050
  });
52971
53051
  },
52972
- ref: reactFlowWrapper
53052
+ ref: reactFlowWrapper,
53053
+ isPdf: isPdf
52973
53054
  });
52974
53055
  }
52975
53056
  var index$1 = withProvider(StakeholderMappings);