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.
@@ -12424,7 +12424,7 @@ const SelfProtocolTaskContainer = ({
12424
12424
  text: ctaText,
12425
12425
  onClick: () => onClick(),
12426
12426
  iconRight: buttonIcon,
12427
- className: `${styles$m.cta_button} 'uf-send-task-container-btn-${elementIdx}`,
12427
+ className: `uf-send-task-container-btn-${elementIdx} ${styles$m.cta_button}`,
12428
12428
  disabled: isDisabled
12429
12429
  }));else return null;
12430
12430
  };
@@ -12450,11 +12450,6 @@ const SelfProtocolManager = ({
12450
12450
  onClickFinishScenario,
12451
12451
  ...props
12452
12452
  }) => {
12453
- const taskIndices = {
12454
- task: 0,
12455
- question: 0,
12456
- scenario: 0
12457
- };
12458
12453
  const getTaskTitle = task => {
12459
12454
  let taskType = '';
12460
12455
  if (task.type === 'task') {
@@ -12476,10 +12471,6 @@ const SelfProtocolManager = ({
12476
12471
  return false;
12477
12472
  }
12478
12473
  };
12479
- const getTaskIndex = type => {
12480
- taskIndices[type] += 1;
12481
- return taskIndices[type];
12482
- };
12483
12474
  const refTask = useRef(null);
12484
12475
  useEffect(() => {
12485
12476
  if (tasks.length) {
@@ -12517,23 +12508,23 @@ const SelfProtocolManager = ({
12517
12508
  isDisabled: isUserSharingScreen,
12518
12509
  isDisplay: true
12519
12510
  }), tasks.map(task => {
12520
- const taskIndex = getTaskIndex(task.type);
12521
12511
  if (task.type === 'question' || task.type === 'task') {
12522
12512
  return /*#__PURE__*/React.createElement(SelfProtocolTaskContainer, {
12523
12513
  key: task._id,
12524
- className: `uf-send-task-container-${taskIndex}`,
12514
+ className: `uf-send-task-container-${task.index}`,
12525
12515
  smallTitle: getTaskTitle(task),
12526
12516
  mainTitle: task.description,
12527
12517
  ctaText: texts.nextTaskCTA,
12528
12518
  buttonIcon: /*#__PURE__*/React.createElement(SendIcon, null),
12529
12519
  onClick: () => sendTask(task),
12530
12520
  isDisabled: getIsTaskDisabled(task) || isUserSharingScreen === false,
12531
- isDisplay: task.isDisplay
12521
+ isDisplay: task.isDisplay,
12522
+ elementIdx: task.index
12532
12523
  });
12533
12524
  } else if (task.type === 'scenario') {
12534
12525
  return /*#__PURE__*/React.createElement(SelfProtocolTaskContainer, {
12535
12526
  key: task._id,
12536
- className: `uf-send-scenario-container-${taskIndex}`,
12527
+ className: `uf-send-scenario-container-${task.index}`,
12537
12528
  smallTitle: getTaskTitle(task),
12538
12529
  mainTitle: task.name,
12539
12530
  description: task.description,
@@ -12542,6 +12533,7 @@ const SelfProtocolManager = ({
12542
12533
  buttonId: 'start_scenario',
12543
12534
  onClick: () => sendTask(task),
12544
12535
  isDisplay: task.isDisplay,
12536
+ elementIdx: task.index,
12545
12537
  isDisabled: getIsTaskDisabled(task) || isUserSharingScreen === false
12546
12538
  });
12547
12539
  } else return /*#__PURE__*/React.createElement(React.Fragment, null);