odaptos_design_system 2.0.83 → 2.0.85

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.
@@ -12432,7 +12432,7 @@ const SelfProtocolTaskContainer = ({
12432
12432
  text: ctaText,
12433
12433
  onClick: () => onClick(),
12434
12434
  iconRight: buttonIcon,
12435
- className: `${styles$m.cta_button} 'uf-send-task-container-btn-${elementIdx}`,
12435
+ className: `uf-send-task-container-btn-${elementIdx} ${styles$m.cta_button}`,
12436
12436
  disabled: isDisabled
12437
12437
  }));else return null;
12438
12438
  };
@@ -12458,11 +12458,6 @@ const SelfProtocolManager = ({
12458
12458
  onClickFinishScenario,
12459
12459
  ...props
12460
12460
  }) => {
12461
- const taskIndices = {
12462
- task: 0,
12463
- question: 0,
12464
- scenario: 0
12465
- };
12466
12461
  const getTaskTitle = task => {
12467
12462
  let taskType = '';
12468
12463
  if (task.type === 'task') {
@@ -12484,10 +12479,6 @@ const SelfProtocolManager = ({
12484
12479
  return false;
12485
12480
  }
12486
12481
  };
12487
- const getTaskIndex = type => {
12488
- taskIndices[type] += 1;
12489
- return taskIndices[type];
12490
- };
12491
12482
  const refTask = React.useRef(null);
12492
12483
  React.useEffect(() => {
12493
12484
  if (tasks.length) {
@@ -12525,23 +12516,23 @@ const SelfProtocolManager = ({
12525
12516
  isDisabled: isUserSharingScreen,
12526
12517
  isDisplay: true
12527
12518
  }), tasks.map(task => {
12528
- const taskIndex = getTaskIndex(task.type);
12529
12519
  if (task.type === 'question' || task.type === 'task') {
12530
12520
  return /*#__PURE__*/React__default.createElement(SelfProtocolTaskContainer, {
12531
12521
  key: task._id,
12532
- className: `uf-send-task-container-${taskIndex}`,
12522
+ className: `uf-send-task-container-${task.index}`,
12533
12523
  smallTitle: getTaskTitle(task),
12534
12524
  mainTitle: task.description,
12535
12525
  ctaText: texts.nextTaskCTA,
12536
12526
  buttonIcon: /*#__PURE__*/React__default.createElement(SendIcon, null),
12537
12527
  onClick: () => sendTask(task),
12538
12528
  isDisabled: getIsTaskDisabled(task) || isUserSharingScreen === false,
12539
- isDisplay: task.isDisplay
12529
+ isDisplay: task.isDisplay,
12530
+ elementIdx: task.index
12540
12531
  });
12541
12532
  } else if (task.type === 'scenario') {
12542
12533
  return /*#__PURE__*/React__default.createElement(SelfProtocolTaskContainer, {
12543
12534
  key: task._id,
12544
- className: `uf-send-scenario-container-${taskIndex}`,
12535
+ className: `uf-send-scenario-container-${task.index}`,
12545
12536
  smallTitle: getTaskTitle(task),
12546
12537
  mainTitle: task.name,
12547
12538
  description: task.description,
@@ -12550,6 +12541,7 @@ const SelfProtocolManager = ({
12550
12541
  buttonId: 'start_scenario',
12551
12542
  onClick: () => sendTask(task),
12552
12543
  isDisplay: task.isDisplay,
12544
+ elementIdx: task.index,
12553
12545
  isDisabled: getIsTaskDisabled(task) || isUserSharingScreen === false
12554
12546
  });
12555
12547
  } else return /*#__PURE__*/React__default.createElement(React__default.Fragment, null);