@qualtrics/ui-react 2.19.0 → 2.20.0

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.
Files changed (263) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/dist/__shared/cjs/{index-bf07471d.js → index-579c4690.js} +10 -7
  3. package/dist/__shared/cjs/{index-4e4cc354.js → index-90d4069b.js} +999 -1875
  4. package/dist/components/Accordion/Accordion.js +1 -5
  5. package/dist/components/Accordion/Accordion2.js +3 -3
  6. package/dist/components/Accordion/AccordionHeader.js +8 -10
  7. package/dist/components/Accordion/AccordionPanel.js +3 -3
  8. package/dist/components/BreakpointSwitch/Breakpoint.js +0 -2
  9. package/dist/components/BreakpointSwitch/BreakpointSwitch.js +0 -3
  10. package/dist/components/Button/Button.js +3 -3
  11. package/dist/components/Button/Button2.js +2 -7
  12. package/dist/components/ButtonGroup/ButtonGroup.js +1 -2
  13. package/dist/components/ButtonGroup/ButtonGroup2.js +3 -3
  14. package/dist/components/Checkbox/Checkbox.js +11 -11
  15. package/dist/components/Checkbox/Checkbox2.js +3 -3
  16. package/dist/components/Checkbox/VisualCheckbox.js +1 -1
  17. package/dist/components/Checkbox/VisualCheckbox2.js +3 -3
  18. package/dist/components/ColorPicker/Alpha.js +9 -30
  19. package/dist/components/ColorPicker/ColorPicker.js +33 -42
  20. package/dist/components/ColorPicker/ColorPicker2.js +3 -3
  21. package/dist/components/ColorPicker/ColorPickerFlyout.js +2 -1
  22. package/dist/components/ColorPicker/ColorPickerFlyoutInputs.js +20 -23
  23. package/dist/components/ColorPicker/Hue.js +2 -19
  24. package/dist/components/ColorPicker/Palette.js +7 -27
  25. package/dist/components/ColorPicker/Saturation.js +8 -29
  26. package/dist/components/ColorPicker/utils/calculateTargetId.js +10 -20
  27. package/dist/components/ColorPicker/utils/getMousePosition.js +4 -3
  28. package/dist/components/ColorPicker/utils/hexToHsv.js +0 -5
  29. package/dist/components/ColorPicker/utils/hexToRgbaString.js +2 -4
  30. package/dist/components/ColorPicker/utils/hsvToHex.js +0 -3
  31. package/dist/components/ColorPicker/utils/rgbToHex.js +1 -1
  32. package/dist/components/ColorPicker/utils/validateHex.js +12 -19
  33. package/dist/components/Combobox/Combobox.js +57 -127
  34. package/dist/components/Combobox/Combobox2.js +3 -3
  35. package/dist/components/Combobox/ComboboxHeader.js +1 -1
  36. package/dist/components/Combobox/ComboboxIcon.js +2 -4
  37. package/dist/components/Combobox/ComboboxInput.js +4 -5
  38. package/dist/components/Combobox/ComboboxList.js +2 -2
  39. package/dist/components/ConfigPane/ConfigPane.js +0 -7
  40. package/dist/components/ConfigPane/ConfigPane2.js +3 -3
  41. package/dist/components/Divider/Divider2.js +3 -3
  42. package/dist/components/Dropdown/ChildIndexContext/index.js +0 -1
  43. package/dist/components/Dropdown/ChildIndexContext/reach-descendants.js +34 -30
  44. package/dist/components/Dropdown/Dropdown.js +17 -68
  45. package/dist/components/Dropdown/Dropdown2.js +3 -3
  46. package/dist/components/Dropdown/DropdownButton.js +23 -33
  47. package/dist/components/Dropdown/DropdownHeader.js +2 -1
  48. package/dist/components/Dropdown/DropdownList.js +8 -7
  49. package/dist/components/Dropdown/DropdownOption.js +3 -10
  50. package/dist/components/Dropdown/DropdownSearch.js +6 -24
  51. package/dist/components/FilePicker/FilePicker.js +15 -26
  52. package/dist/components/FilePicker/FilePicker2.js +3 -3
  53. package/dist/components/FormField/Caption.js +3 -3
  54. package/dist/components/FormField/FormField.js +2 -2
  55. package/dist/components/FormField/FormField2.js +3 -3
  56. package/dist/components/FormField/FormFieldContext.js +3 -6
  57. package/dist/components/FormField/ReadOnlyText.js +2 -1
  58. package/dist/components/FullScreenTakeover/FullScreenTakeover.js +5 -11
  59. package/dist/components/FullScreenTakeover/FullScreenTakeover2.js +3 -3
  60. package/dist/components/Icon/Icon.js +3 -6
  61. package/dist/components/Icon/IconTypes.js +1 -0
  62. package/dist/components/IconButton/IconButton.js +1 -6
  63. package/dist/components/IconButton/IconButton2.js +3 -3
  64. package/dist/components/InlineInput/InlineInput.js +16 -33
  65. package/dist/components/InlineInput/InlineInput2.js +3 -3
  66. package/dist/components/Input/Input.js +3 -2
  67. package/dist/components/Input/Input2.js +3 -3
  68. package/dist/components/Input/InputField.js +2 -5
  69. package/dist/components/InputGroup/InputGroup2.js +3 -3
  70. package/dist/components/InputGroup/InputGroupProvider.js +0 -2
  71. package/dist/components/Label/Label2.js +3 -3
  72. package/dist/components/Link/Link2.js +3 -3
  73. package/dist/components/LoadingSpinner/LoadingSpinner.js +1 -1
  74. package/dist/components/LoadingSpinner/LoadingSpinner2.js +3 -3
  75. package/dist/components/LogicEditor/ConditionContainer.js +0 -2
  76. package/dist/components/LogicEditor/ConditionSet.js +8 -25
  77. package/dist/components/LogicEditor/Controls.js +2 -2
  78. package/dist/components/LogicEditor/LogicEditor.js +3 -12
  79. package/dist/components/LogicEditor/LogicEditor2.js +3 -3
  80. package/dist/components/LogicEditor/utils.js +9 -34
  81. package/dist/components/Modal/Modal.js +22 -35
  82. package/dist/components/Modal/Modal2.js +3 -3
  83. package/dist/components/NewMenu/BaseMenu.js +43 -108
  84. package/dist/components/NewMenu/NewMenu.js +3 -3
  85. package/dist/components/NewMenu/SelectMenu/SelectMenu.js +2 -3
  86. package/dist/components/NewMenu/parts/ArrowNav/ArrowNav.js +20 -32
  87. package/dist/components/NewMenu/parts/MenuItem.js +2 -3
  88. package/dist/components/NewMenu/parts/MenuSearchBox.js +2 -1
  89. package/dist/components/NumberStepper/NumberStepper.js +29 -44
  90. package/dist/components/NumberStepper/NumberStepper2.js +3 -3
  91. package/dist/components/NumberStepper/NumberStepperDecrement.js +6 -5
  92. package/dist/components/NumberStepper/NumberStepperIncrement.js +6 -5
  93. package/dist/components/NumberStepper/NumberStepperInput.js +10 -12
  94. package/dist/components/PageLayout/PageLayout.js +3 -3
  95. package/dist/components/Pagination/Pagination.js +10 -6
  96. package/dist/components/Pagination/Pagination2.js +3 -3
  97. package/dist/components/Pagination/PaginationNextButton.js +8 -8
  98. package/dist/components/Pagination/PaginationPageInput.js +17 -22
  99. package/dist/components/Pagination/PaginationPreviousButton.js +8 -8
  100. package/dist/components/Popover/Popover.js +9 -18
  101. package/dist/components/Popover/Popover2.js +3 -3
  102. package/dist/components/QuickSearch/QuickSearch.js +3 -5
  103. package/dist/components/QuickSearch/QuickSearch2.js +3 -3
  104. package/dist/components/QuickSearch/QuickSearchInput.js +6 -23
  105. package/dist/components/Radio/Radio.js +11 -13
  106. package/dist/components/Radio/Radio2.js +3 -3
  107. package/dist/components/SearchInput/SearchInput.js +5 -11
  108. package/dist/components/SearchInput/SearchInput2.js +3 -3
  109. package/dist/components/SidebarNav/ExpandCollapseButton.js +0 -2
  110. package/dist/components/SidebarNav/SidebarNav.js +5 -4
  111. package/dist/components/SidebarNav/SidebarNav2.js +3 -3
  112. package/dist/components/SidebarNav/SidebarNavLink.js +1 -4
  113. package/dist/components/Slider/RangeSlider.js +8 -22
  114. package/dist/components/Slider/Slider.js +7 -26
  115. package/dist/components/Slider/Slider2.js +3 -3
  116. package/dist/components/Slider/SliderButton.js +7 -9
  117. package/dist/components/Switch/Switch.js +11 -11
  118. package/dist/components/Switch/Switch2.js +3 -3
  119. package/dist/components/Table/Table2.js +3 -3
  120. package/dist/components/Tabs/Tab.js +3 -3
  121. package/dist/components/Tabs/TabContextProvider.js +1 -1
  122. package/dist/components/Tabs/TabList.js +9 -17
  123. package/dist/components/Tabs/TabPanel.js +3 -3
  124. package/dist/components/Tabs/TabPanels.js +0 -2
  125. package/dist/components/Tabs/Tabs2.js +3 -3
  126. package/dist/components/Tooltip/Tooltip.js +13 -42
  127. package/dist/components/Tooltip/Tooltip2.js +3 -3
  128. package/dist/components/UIProvider/PortalTargetContext.js +0 -1
  129. package/dist/components/UIProvider/UIProvider.js +2 -2
  130. package/dist/components/deprecated_ColorPicker/Alpha.js +4 -11
  131. package/dist/components/deprecated_ColorPicker/Color.js +9 -66
  132. package/dist/components/deprecated_ColorPicker/ColorPicker.js +2 -8
  133. package/dist/components/deprecated_ColorPicker/ColorPicker2.js +3 -3
  134. package/dist/components/deprecated_ColorPicker/HexInput.js +1 -7
  135. package/dist/components/deprecated_ColorPicker/Hue.js +3 -10
  136. package/dist/components/deprecated_ColorPicker/Saturation.js +7 -14
  137. package/dist/components/deprecated_ColorPicker/Swatch.js +2 -6
  138. package/dist/components/deprecated_ColorPicker/useMouseDrag.js +0 -3
  139. package/dist/components/deprecated_NumberStepper/NumberStepper.js +14 -20
  140. package/dist/components/deprecated_NumberStepper/NumberStepper2.js +3 -3
  141. package/dist/components/deprecated_NumberStepper/NumberStepperDecrement.js +7 -6
  142. package/dist/components/deprecated_NumberStepper/NumberStepperIncrement.js +7 -6
  143. package/dist/components/deprecated_NumberStepper/NumberStepperInput.js +16 -17
  144. package/dist/components/deprecated_Tabs/Tabs.js +9 -25
  145. package/dist/components/deprecated_Tabs/Tabs2.js +3 -3
  146. package/dist/components/deprecated_Toolbar/Toolbar2.js +3 -3
  147. package/dist/components/deprecated_Toolbar/ToolbarPanel.js +3 -3
  148. package/dist/components/deprecated_Toolbar/ToolbarPanels.js +3 -17
  149. package/dist/components/deprecated_Toolbar/ToolbarTab.js +10 -26
  150. package/dist/components/deprecated_Toolbar/ToolbarTabs.js +6 -18
  151. package/dist/hooks/useBreakpoints/useBreakpoints.js +3 -4
  152. package/dist/hooks/useClickOutside/useClickOutside.js +2 -7
  153. package/dist/hooks/useClickOutsidePortals/useClickOutsidePortals.js +3 -6
  154. package/dist/hooks/useControllableState/useControllableState.js +5 -10
  155. package/dist/hooks/useDidUpdate/useDidUpdate.js +2 -4
  156. package/dist/hooks/useEventCallback/useEventCallback.js +2 -1
  157. package/dist/hooks/useEventListener/useEventListener.js +1 -4
  158. package/dist/hooks/useFocusSequence/useFocusSequence.js +10 -17
  159. package/dist/hooks/useId/useId.js +1 -2
  160. package/dist/hooks/useIsFocused/useIsFocused.js +0 -1
  161. package/dist/hooks/useIsHovered/useIsHovered.js +0 -1
  162. package/dist/hooks/useIsTruncated/useIsTruncated.js +4 -3
  163. package/dist/hooks/useLatest/useLatest.js +0 -1
  164. package/dist/hooks/useMounted/useMounted.js +0 -1
  165. package/dist/hooks/useMouseDrag/useMouseDrag.js +0 -4
  166. package/dist/hooks/useOverlay/useOverlay.js +4 -10
  167. package/dist/hooks/useOverlay/useOverlay2.js +3 -3
  168. package/dist/hooks/usePrevious/usePrevious.js +0 -1
  169. package/dist/hooks/useResponsiveValue/useResponsiveValue.js +1 -4
  170. package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement.js +11 -16
  171. package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement2.js +3 -3
  172. package/dist/icons/Icon.js +3 -3
  173. package/dist/icons/components/HeadsetIcon.js +6 -0
  174. package/dist/icons/components/PauseCircleIcon.js +1 -1
  175. package/dist/icons/createIconComponent.js +2 -3
  176. package/dist/icons/index.d.ts +2 -0
  177. package/dist/icons/index.es.js +1 -0
  178. package/dist/icons/index.js +2 -1
  179. package/dist/index.d.ts +4 -3
  180. package/dist/index.es.js +4 -3
  181. package/dist/index.js +6 -5
  182. package/dist/next/AdvancedTable/AdvancedTable.js +82 -188
  183. package/dist/next/AdvancedTable/AdvancedTable2.js +3 -3
  184. package/dist/next/AdvancedTable/AdvancedTableCell.js +4 -14
  185. package/dist/next/AdvancedTable/AdvancedTableCheckbox.js +0 -1
  186. package/dist/next/AdvancedTable/AdvancedTableColumnHeader.js +11 -41
  187. package/dist/next/AdvancedTable/AdvancedTableColumnHeaderMenu.js +8 -14
  188. package/dist/next/AdvancedTable/AdvancedTableDragPreview.js +4 -6
  189. package/dist/next/AdvancedTable/AdvancedTablePagination.js +1 -4
  190. package/dist/next/AdvancedTable/AdvancedTableRowExpandButton.js +0 -1
  191. package/dist/next/AdvancedTable/AdvancedTableTypes.js +1 -3
  192. package/dist/next/AdvancedTable/useAdvancedTableDragAndDrop.js +8 -13
  193. package/dist/next/AdvancedTable/useComputedWidth.js +1 -1
  194. package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput.js +5 -20
  195. package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput2.js +3 -3
  196. package/dist/next/CollapsibleSearchInput/CollapsibleSearchInputIconButton.js +1 -1
  197. package/dist/next/Combobox/Combobox2.js +3 -3
  198. package/dist/next/Combobox/ComboboxFlyout.js +3 -3
  199. package/dist/next/Combobox/ComboboxGroup.js +1 -1
  200. package/dist/next/Combobox/ComboboxInput.js +7 -20
  201. package/dist/next/Combobox/ComboboxOption.js +5 -6
  202. package/dist/next/Combobox/hooks/useComboboxFilteredGroup/useComboboxFilteredGroup.js +4 -5
  203. package/dist/next/Combobox/hooks/useComboboxFocusSequence/useComboboxFocusSequence.js +37 -54
  204. package/dist/next/Combobox/hooks/useComboboxLoadingState/useComboboxLoadingState.js +4 -5
  205. package/dist/next/Combobox/hooks/useComboboxValue/useComboboxValue.js +5 -3
  206. package/dist/next/Combobox/hooks/useListboxFlyoutDimensions/useListboxFlyoutDimensions.js +10 -10
  207. package/dist/next/Combobox/hooks/useSelectedOptionScroll/useSelectedOptionScroll.js +1 -6
  208. package/dist/next/Combobox/hooks/useShouldRenderGroupHeader/useShouldRenderGroupHeader.js +6 -6
  209. package/dist/next/Combobox/utils/nodeRegistration/nodeRegistration.js +4 -6
  210. package/dist/next/Drawer/Drawer.js +5 -16
  211. package/dist/next/Drawer/Drawer2.js +3 -3
  212. package/dist/next/FilterAnchor/FilterAnchor.js +7 -5
  213. package/dist/next/FilterAnchor/FilterAnchor2.js +3 -3
  214. package/dist/next/Input/Input.js +5 -8
  215. package/dist/next/Input/Input2.js +3 -3
  216. package/dist/next/Menu/Menu.js +10 -23
  217. package/dist/next/Menu/Menu2.js +3 -3
  218. package/dist/next/Menu/MenuButton.js +13 -6
  219. package/dist/next/Menu/MenuContext.js +0 -2
  220. package/dist/next/Menu/MenuItem.js +11 -15
  221. package/dist/next/Menu/MenuPane.js +11 -25
  222. package/dist/next/Menu/MenuSearch.js +15 -22
  223. package/dist/next/Menu/SubMenu.js +10 -27
  224. package/dist/next/Menu/usePaneSearch.js +2 -1
  225. package/dist/next/PhoneNumberInput/PhoneNumberInput.js +12 -19
  226. package/dist/next/PhoneNumberInput/PhoneNumberInput2.js +3 -3
  227. package/dist/next/SplitButton/SplitButton.js +6 -12
  228. package/dist/next/SplitButton/SplitButton2.js +3 -3
  229. package/dist/next/Stack/Stack.js +0 -3
  230. package/dist/next/TimePicker/TimeDropdown.js +4 -5
  231. package/dist/next/TimePicker/TimeInput.js +4 -5
  232. package/dist/next/TimePicker/TimePicker.js +12 -30
  233. package/dist/next/TimePicker/TimePicker2.js +3 -3
  234. package/dist/next/TimePicker/TimePickerIcon.js +1 -3
  235. package/dist/next/TimePicker/utils.js +12 -52
  236. package/dist/next/ToggleButton/ToggleButton.js +0 -5
  237. package/dist/next/ToggleButton/ToggleButtonGroup.js +2 -1
  238. package/dist/next/ToggleButton/styles.js +3 -3
  239. package/dist/next/index.d.ts +5 -4
  240. package/dist/next/index.js +389 -754
  241. package/dist/utils/Flyout/Flyout.js +4 -5
  242. package/dist/utils/Flyout/Flyout2.js +3 -3
  243. package/dist/utils/Popper/Popper.js +18 -25
  244. package/dist/utils/Portal/Portal.js +2 -1
  245. package/dist/utils/TextOverflowTooltip/TextOverflowTooltip.js +4 -4
  246. package/dist/utils/Translation/Translate.js +0 -4
  247. package/dist/utils/Translation/TranslationProvider.js +0 -1
  248. package/dist/utils/Translation/containsComponentOrElement.js +1 -5
  249. package/dist/utils/Translation/insertPlaceholders.js +0 -1
  250. package/dist/utils/Translation/useTranslation.js +7 -14
  251. package/dist/utils/concatIds/concatIds.js +0 -1
  252. package/dist/utils/constants.js +2 -2
  253. package/dist/utils/createContextUtilities/createContextUtilities.js +0 -4
  254. package/dist/utils/filterChildren/filterChildren.js +8 -17
  255. package/dist/utils/getSubDataTestId/getSubDataTestId.js +1 -2
  256. package/dist/utils/keyboardUser/keyboardUser.js +0 -1
  257. package/dist/utils/mediaQueryManager/mediaQueryManager.js +1 -12
  258. package/dist/utils/mergeRefs/mergeRefs.js +1 -2
  259. package/dist/utils/wrapAround/wrapAround.js +1 -2
  260. package/dist/utils/wrapEvent/wrapEvent.js +2 -4
  261. package/icons/package.json +2 -1
  262. package/next/package.json +5 -1
  263. package/package.json +9 -4
@@ -1,8 +1,8 @@
1
1
  import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
2
2
 
3
- var css_248z = "._867vO{display:inline-block;height:36px;min-height:36px;padding:8px 12px;line-height:20px;font-size:14px;color:#32363a;caret-color:#32363a;background-color:#fafafa;border:1px solid #898989;border-radius:4px;outline:none}._867vO::-moz-placeholder{color:#515559;opacity:1}._867vO::placeholder{color:#515559;opacity:1}._867vO:hover{cursor:pointer;background-color:#f5f5f5}._867vO:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88;background-color:#fafafa;cursor:text;outline:none;border-color:transparent}._867vO._2HmB1{border-color:#b00}._867vO._2HmB1:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #900000;border-color:transparent}._867vO:disabled{background-color:#fafafa;border-color:#e5e5e5;color:#9d9fa1;-webkit-text-fill-color:#9d9fa1;cursor:not-allowed}._867vO:disabled::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._867vO:disabled::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._867vO._1F6ms{height:auto}._867vO._1F6ms::-webkit-resizer{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOCIgaGVpZ2h0PSI4IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik03IDF2M2EzIDMgMCAwMS0zIDNIMSIgc3Ryb2tlPSIjOTI5MjkyIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjwvc3ZnPg==);background-size:8px 8px;background-repeat:no-repeat;background-position:50%}._867vO._3v9hu{display:block;width:100%}._867vO._2Bmu0{padding:4px 8px}input._867vO._2Bmu0{height:26px;min-height:26px}[type=number]._867vO{-moz-appearance:textfield}[type=number]._867vO::-webkit-inner-spin-button,[type=number]._867vO::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}._1gw0_{line-height:20px;color:#6a6d70;display:flex;flex-direction:column;align-items:flex-start}._1gw0_:hover{cursor:pointer}._1gw0_._25qdW{color:#0b6ed0}._33fO-{margin-top:4px}";
4
- var styles = {"input":"_867vO","invalid":"_2HmB1","multiline":"_1F6ms","full":"_3v9hu","small":"_2Bmu0","label":"_1gw0_","focused":"_25qdW","wrappedInput":"_33fO-"};
5
- var stylesheet="._867vO{display:inline-block;height:36px;min-height:36px;padding:8px 12px;line-height:20px;font-size:14px;color:#32363a;caret-color:#32363a;background-color:#fafafa;border:1px solid #898989;border-radius:4px;outline:none}._867vO::-moz-placeholder{color:#515559;opacity:1}._867vO::placeholder{color:#515559;opacity:1}._867vO:hover{cursor:pointer;background-color:#f5f5f5}._867vO:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88;background-color:#fafafa;cursor:text;outline:none;border-color:transparent}._867vO._2HmB1{border-color:#b00}._867vO._2HmB1:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #900000;border-color:transparent}._867vO:disabled{background-color:#fafafa;border-color:#e5e5e5;color:#9d9fa1;-webkit-text-fill-color:#9d9fa1;cursor:not-allowed}._867vO:disabled::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._867vO:disabled::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._867vO._1F6ms{height:auto}._867vO._1F6ms::-webkit-resizer{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOCIgaGVpZ2h0PSI4IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik03IDF2M2EzIDMgMCAwMS0zIDNIMSIgc3Ryb2tlPSIjOTI5MjkyIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjwvc3ZnPg==);background-size:8px 8px;background-repeat:no-repeat;background-position:50%}._867vO._3v9hu{display:block;width:100%}._867vO._2Bmu0{padding:4px 8px}input._867vO._2Bmu0{height:26px;min-height:26px}[type=number]._867vO{-moz-appearance:textfield}[type=number]._867vO::-webkit-inner-spin-button,[type=number]._867vO::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}._1gw0_{line-height:20px;color:#6a6d70;display:flex;flex-direction:column;align-items:flex-start}._1gw0_:hover{cursor:pointer}._1gw0_._25qdW{color:#0b6ed0}._33fO-{margin-top:4px}";
3
+ var css_248z = "._trp34{display:inline-block;height:36px;min-height:36px;padding:8px 12px;line-height:20px;font-size:14px;color:#32363a;caret-color:#32363a;background-color:#fafafa;border:1px solid #898989;border-radius:4px;outline:none}._trp34::-moz-placeholder{color:#515559;opacity:1}._trp34::placeholder{color:#515559;opacity:1}._trp34:hover{cursor:pointer;background-color:#f5f5f5}._trp34:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88;background-color:#fafafa;cursor:text;outline:none;border-color:transparent}._trp34._RO-pp{border-color:#b00}._trp34._RO-pp:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #900000;border-color:transparent}._trp34:disabled{background-color:#fafafa;border-color:#e5e5e5;color:#9d9fa1;-webkit-text-fill-color:#9d9fa1;cursor:not-allowed}._trp34:disabled::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._trp34:disabled::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._trp34._-vD1O{height:auto}._trp34._-vD1O::-webkit-resizer{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOCIgaGVpZ2h0PSI4IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik03IDF2M2EzIDMgMCAwMS0zIDNIMSIgc3Ryb2tlPSIjOTI5MjkyIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjwvc3ZnPg==);background-size:8px 8px;background-repeat:no-repeat;background-position:50%}._trp34._rAsA8{display:block;width:100%}._trp34._fEj7t{padding:4px 8px}input._trp34._fEj7t{height:26px;min-height:26px}[type=number]._trp34{-moz-appearance:textfield}[type=number]._trp34::-webkit-inner-spin-button,[type=number]._trp34::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}._h6BZH{line-height:20px;color:#6a6d70;display:flex;flex-direction:column;align-items:flex-start}._h6BZH:hover{cursor:pointer}._h6BZH._RAqla{color:#0b6ed0}._KiMj8{margin-top:4px}";
4
+ var styles = {"input":"_trp34","invalid":"_RO-pp","multiline":"_-vD1O","full":"_rAsA8","small":"_fEj7t","label":"_h6BZH","focused":"_RAqla","wrappedInput":"_KiMj8"};
5
+ var stylesheet="._trp34{display:inline-block;height:36px;min-height:36px;padding:8px 12px;line-height:20px;font-size:14px;color:#32363a;caret-color:#32363a;background-color:#fafafa;border:1px solid #898989;border-radius:4px;outline:none}._trp34::-moz-placeholder{color:#515559;opacity:1}._trp34::placeholder{color:#515559;opacity:1}._trp34:hover{cursor:pointer;background-color:#f5f5f5}._trp34:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88;background-color:#fafafa;cursor:text;outline:none;border-color:transparent}._trp34._RO-pp{border-color:#b00}._trp34._RO-pp:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #900000;border-color:transparent}._trp34:disabled{background-color:#fafafa;border-color:#e5e5e5;color:#9d9fa1;-webkit-text-fill-color:#9d9fa1;cursor:not-allowed}._trp34:disabled::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._trp34:disabled::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._trp34._-vD1O{height:auto}._trp34._-vD1O::-webkit-resizer{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOCIgaGVpZ2h0PSI4IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik03IDF2M2EzIDMgMCAwMS0zIDNIMSIgc3Ryb2tlPSIjOTI5MjkyIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjwvc3ZnPg==);background-size:8px 8px;background-repeat:no-repeat;background-position:50%}._trp34._rAsA8{display:block;width:100%}._trp34._fEj7t{padding:4px 8px}input._trp34._fEj7t{height:26px;min-height:26px}[type=number]._trp34{-moz-appearance:textfield}[type=number]._trp34::-webkit-inner-spin-button,[type=number]._trp34::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}._h6BZH{line-height:20px;color:#6a6d70;display:flex;flex-direction:column;align-items:flex-start}._h6BZH:hover{cursor:pointer}._h6BZH._RAqla{color:#0b6ed0}._KiMj8{margin-top:4px}";
6
6
  styleInject(css_248z);
7
7
 
8
8
  export { styles as default, stylesheet };
@@ -30,17 +30,14 @@ const InputField = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
30
30
  } = inputProps;
31
31
  const [focused, setFocused] = useState(false);
32
32
  useFormFieldType('input');
33
-
34
33
  function handleFocus(e) {
35
34
  setFocused(true);
36
- onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
35
+ onFocus?.(e);
37
36
  }
38
-
39
37
  function handleBlur(e) {
40
38
  setFocused(false);
41
- onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
39
+ onBlur?.(e);
42
40
  }
43
-
44
41
  return /*#__PURE__*/React__default.createElement(Label, _extends({
45
42
  htmlFor: id,
46
43
  "data-testid": dataTestId,
@@ -1,8 +1,8 @@
1
1
  import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
2
2
 
3
- var css_248z = "._2COgs{border:1px solid #898989;border-radius:4px;height:36px;min-height:36px;color:#6a6d70;fill:#6a6d70;background-color:#fafafa;font-size:14px;display:inline-flex;justify-content:center;align-items:center;line-height:1;padding:0 13px}._2COgs._2JwVM{height:26px;min-height:26px;padding:5px 8px}._2EBG3{display:flex;align-items:stretch}._2EBG3._3oDWL{width:100%}._2EBG3 ._XkPH2{margin:0;position:relative;flex-shrink:0;z-index:10}._2EBG3 ._XkPH2:first-child{margin:0 -1px 0 0;border-top-left-radius:4px;border-bottom-left-radius:4px;border-top-right-radius:0;border-bottom-right-radius:0}._2EBG3 ._XkPH2:not(:last-child):not(:first-child){margin:0 -1px 0 0;border-radius:0}._2EBG3 ._XkPH2:last-child{border-top-left-radius:0;border-bottom-left-radius:0}._2EBG3 ._XkPH2:last-child,._2EBG3 ._XkPH2:only-child{margin:0;border-top-right-radius:4px;border-bottom-right-radius:4px}._2EBG3 ._XkPH2:only-child{border-top-left-radius:4px;border-bottom-left-radius:4px}._2EBG3 ._XkPH2._3G_M5{flex-shrink:1;min-width:40px;z-index:0}._2EBG3 ._XkPH2._3G_M5._3oDWL{flex-grow:1}._2EBG3 ._XkPH2:focus{z-index:20}";
4
- var styles = {"addon":"_2COgs","small":"_2JwVM","inputGroup":"_2EBG3","full":"_3oDWL","inputGroupElement":"_XkPH2","input":"_3G_M5"};
5
- var stylesheet="._2COgs{border:1px solid #898989;border-radius:4px;height:36px;min-height:36px;color:#6a6d70;fill:#6a6d70;background-color:#fafafa;font-size:14px;display:inline-flex;justify-content:center;align-items:center;line-height:1;padding:0 13px}._2COgs._2JwVM{height:26px;min-height:26px;padding:5px 8px}._2EBG3{display:flex;align-items:stretch}._2EBG3._3oDWL{width:100%}._2EBG3 ._XkPH2{margin:0;position:relative;flex-shrink:0;z-index:10}._2EBG3 ._XkPH2:first-child{margin:0 -1px 0 0;border-top-left-radius:4px;border-bottom-left-radius:4px;border-top-right-radius:0;border-bottom-right-radius:0}._2EBG3 ._XkPH2:not(:last-child):not(:first-child){margin:0 -1px 0 0;border-radius:0}._2EBG3 ._XkPH2:last-child{border-top-left-radius:0;border-bottom-left-radius:0}._2EBG3 ._XkPH2:last-child,._2EBG3 ._XkPH2:only-child{margin:0;border-top-right-radius:4px;border-bottom-right-radius:4px}._2EBG3 ._XkPH2:only-child{border-top-left-radius:4px;border-bottom-left-radius:4px}._2EBG3 ._XkPH2._3G_M5{flex-shrink:1;min-width:40px;z-index:0}._2EBG3 ._XkPH2._3G_M5._3oDWL{flex-grow:1}._2EBG3 ._XkPH2:focus{z-index:20}";
3
+ var css_248z = "._CT103{border:1px solid #898989;border-radius:4px;height:36px;min-height:36px;color:#6a6d70;fill:#6a6d70;background-color:#fafafa;font-size:14px;display:inline-flex;justify-content:center;align-items:center;line-height:1;padding:0 13px}._CT103._Q2Xhh{height:26px;min-height:26px;padding:5px 8px}._wFX9z{display:flex;align-items:stretch}._wFX9z._c3Zd-{width:100%}._wFX9z ._pzkOZ{margin:0;position:relative;flex-shrink:0;z-index:10}._wFX9z ._pzkOZ:first-child{margin:0 -1px 0 0;border-top-left-radius:4px;border-bottom-left-radius:4px;border-top-right-radius:0;border-bottom-right-radius:0}._wFX9z ._pzkOZ:not(:last-child):not(:first-child){margin:0 -1px 0 0;border-radius:0}._wFX9z ._pzkOZ:last-child{border-top-left-radius:0;border-bottom-left-radius:0}._wFX9z ._pzkOZ:last-child,._wFX9z ._pzkOZ:only-child{margin:0;border-top-right-radius:4px;border-bottom-right-radius:4px}._wFX9z ._pzkOZ:only-child{border-top-left-radius:4px;border-bottom-left-radius:4px}._wFX9z ._pzkOZ._6AQf3{flex-shrink:1;min-width:40px;z-index:0}._wFX9z ._pzkOZ._6AQf3._c3Zd-{flex-grow:1}._wFX9z ._pzkOZ:focus{z-index:20}";
4
+ var styles = {"addon":"_CT103","small":"_Q2Xhh","inputGroup":"_wFX9z","full":"_c3Zd-","inputGroupElement":"_pzkOZ","input":"_6AQf3"};
5
+ var stylesheet="._CT103{border:1px solid #898989;border-radius:4px;height:36px;min-height:36px;color:#6a6d70;fill:#6a6d70;background-color:#fafafa;font-size:14px;display:inline-flex;justify-content:center;align-items:center;line-height:1;padding:0 13px}._CT103._Q2Xhh{height:26px;min-height:26px;padding:5px 8px}._wFX9z{display:flex;align-items:stretch}._wFX9z._c3Zd-{width:100%}._wFX9z ._pzkOZ{margin:0;position:relative;flex-shrink:0;z-index:10}._wFX9z ._pzkOZ:first-child{margin:0 -1px 0 0;border-top-left-radius:4px;border-bottom-left-radius:4px;border-top-right-radius:0;border-bottom-right-radius:0}._wFX9z ._pzkOZ:not(:last-child):not(:first-child){margin:0 -1px 0 0;border-radius:0}._wFX9z ._pzkOZ:last-child{border-top-left-radius:0;border-bottom-left-radius:0}._wFX9z ._pzkOZ:last-child,._wFX9z ._pzkOZ:only-child{margin:0;border-top-right-radius:4px;border-bottom-right-radius:4px}._wFX9z ._pzkOZ:only-child{border-top-left-radius:4px;border-bottom-left-radius:4px}._wFX9z ._pzkOZ._6AQf3{flex-shrink:1;min-width:40px;z-index:0}._wFX9z ._pzkOZ._6AQf3._c3Zd-{flex-grow:1}._wFX9z ._pzkOZ:focus{z-index:20}";
6
6
  styleInject(css_248z);
7
7
 
8
8
  export { styles as default, stylesheet };
@@ -11,12 +11,10 @@ function createContextValue(value) {
11
11
  if (value.overrideFull) {
12
12
  return false;
13
13
  }
14
-
15
14
  return full;
16
15
  }
17
16
  };
18
17
  }
19
-
20
18
  const {
21
19
  Provider: InputGroupContextProvider,
22
20
  useContext: useInputGroupContext
@@ -1,8 +1,8 @@
1
1
  import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
2
2
 
3
- var css_248z = "._1IXPU{font-size:14px}._3vwvZ{color:#6a6d70;line-height:20px;display:inline-flex;flex-direction:column;align-items:flex-start}._2DYCV{color:#0b6ed0}";
4
- var styles = {"label":"_1IXPU","control":"_3vwvZ","focused":"_2DYCV"};
5
- var stylesheet="._1IXPU{font-size:14px}._3vwvZ{color:#6a6d70;line-height:20px;display:inline-flex;flex-direction:column;align-items:flex-start}._2DYCV{color:#0b6ed0}";
3
+ var css_248z = "._bT-c5{font-size:14px}._eekJX{color:#6a6d70;line-height:20px;display:inline-flex;flex-direction:column;align-items:flex-start}._fsGBJ{color:#0b6ed0}";
4
+ var styles = {"label":"_bT-c5","control":"_eekJX","focused":"_fsGBJ"};
5
+ var stylesheet="._bT-c5{font-size:14px}._eekJX{color:#6a6d70;line-height:20px;display:inline-flex;flex-direction:column;align-items:flex-start}._fsGBJ{color:#0b6ed0}";
6
6
  styleInject(css_248z);
7
7
 
8
8
  export { styles as default, stylesheet };
@@ -1,8 +1,8 @@
1
1
  import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
2
2
 
3
- var css_248z = "._3KKTI{color:#0b6ed0;cursor:pointer;text-decoration:underline;text-decoration-thickness:1px;-webkit-text-decoration-skip:ink;text-decoration-skip-ink:auto;text-underline-offset:3px;border-radius:1px}._3KKTI:active:focus,._3KKTI:focus{outline:none}._3KKTI:visited{color:#0854a1}._3KKTI:hover{color:#085caf}._3KKTI:active{color:#0854a1}body.keyboard-user ._3KKTI:active:focus,body.keyboard-user ._3KKTI:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
4
- var styles = {"link":"_3KKTI"};
5
- var stylesheet="._3KKTI{color:#0b6ed0;cursor:pointer;text-decoration:underline;text-decoration-thickness:1px;-webkit-text-decoration-skip:ink;text-decoration-skip-ink:auto;text-underline-offset:3px;border-radius:1px}._3KKTI:active:focus,._3KKTI:focus{outline:none}._3KKTI:visited{color:#0854a1}._3KKTI:hover{color:#085caf}._3KKTI:active{color:#0854a1}body.keyboard-user ._3KKTI:active:focus,body.keyboard-user ._3KKTI:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
3
+ var css_248z = "._P2cCU{color:#0b6ed0;cursor:pointer;text-decoration:underline;text-decoration-thickness:1px;-webkit-text-decoration-skip:ink;text-decoration-skip-ink:auto;text-underline-offset:3px;border-radius:1px}._P2cCU:active:focus,._P2cCU:focus{outline:none}._P2cCU:visited{color:#0854a1}._P2cCU:hover{color:#085caf}._P2cCU:active{color:#0854a1}body.keyboard-user ._P2cCU:active:focus,body.keyboard-user ._P2cCU:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
4
+ var styles = {"link":"_P2cCU"};
5
+ var stylesheet="._P2cCU{color:#0b6ed0;cursor:pointer;text-decoration:underline;text-decoration-thickness:1px;-webkit-text-decoration-skip:ink;text-decoration-skip-ink:auto;text-underline-offset:3px;border-radius:1px}._P2cCU:active:focus,._P2cCU:focus{outline:none}._P2cCU:visited{color:#0854a1}._P2cCU:hover{color:#085caf}._P2cCU:active{color:#0854a1}body.keyboard-user ._P2cCU:active:focus,body.keyboard-user ._P2cCU:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
6
6
  styleInject(css_248z);
7
7
 
8
8
  export { styles as default, stylesheet };
@@ -36,7 +36,7 @@ const LoadingSpinner = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
36
36
  }),
37
37
  "data-loadingspinner": show || undefined,
38
38
  role: role,
39
- "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : ariaLabelledby ? undefined : defaultAriaLabel,
39
+ "aria-label": ariaLabel ?? (ariaLabelledby ? undefined : defaultAriaLabel),
40
40
  "aria-labelledby": ariaLabelledby,
41
41
  "aria-live": ariaLive,
42
42
  "aria-hidden": ariaHidden
@@ -1,8 +1,8 @@
1
1
  import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
2
2
 
3
- var css_248z = "._M28dq{position:relative;display:inline-block}._M28dq._36K0o{min-height:20px;min-width:20px}._M28dq._1eLhY{min-height:25px;min-width:25px}._M28dq._3wDkK{min-height:40px;min-width:40px}._M28dq._1NvF4{min-height:64px;min-width:64px}._M28dq ._oEKLB{display:inline-block;background-color:transparent;position:absolute;z-index:10;width:0;height:0;left:50%;bottom:50%;pointer-events:none}._M28dq ._oEKLB._1ToQV{visibility:hidden}._M28dq ._oEKLB div{position:absolute;transform:rotate(20deg)}._M28dq ._oEKLB div div:nth-child(-n+9){background-color:#fff;transform-origin:0 0;-webkit-animation:_oEKLB .8s linear infinite;animation:_oEKLB .8s linear infinite}._M28dq ._oEKLB div div:nth-child(-n+9):after{content:\" \";display:block;position:absolute;top:5px;left:-1px;width:2px;height:10px;border-radius:20%;background:#000}._M28dq ._oEKLB div div:first-child{transform:rotate(20deg);-webkit-animation-delay:-.8s;animation-delay:-.8s}._M28dq ._oEKLB div div:nth-child(2){transform:rotate(60deg);-webkit-animation-delay:-.7s;animation-delay:-.7s}._M28dq ._oEKLB div div:nth-child(3){transform:rotate(100deg);-webkit-animation-delay:-.6s;animation-delay:-.6s}._M28dq ._oEKLB div div:nth-child(4){transform:rotate(140deg);-webkit-animation-delay:-.5s;animation-delay:-.5s}._M28dq ._oEKLB div div:nth-child(5){transform:rotate(180deg);-webkit-animation-delay:-.4s;animation-delay:-.4s}._M28dq ._oEKLB div div:nth-child(6){transform:rotate(220deg);-webkit-animation-delay:-.3s;animation-delay:-.3s}._M28dq ._oEKLB div div:nth-child(7){transform:rotate(260deg);-webkit-animation-delay:-.2s;animation-delay:-.2s}._M28dq ._oEKLB div div:nth-child(8){transform:rotate(300deg);-webkit-animation-delay:-.1s;animation-delay:-.1s}._M28dq ._oEKLB div div:nth-child(9){transform:rotate(340deg);-webkit-animation-delay:0s;animation-delay:0s}._M28dq ._1NvF4 div div:nth-child(-n+9):after{top:10px;left:-2px;width:4px;height:18px}._M28dq ._36K0o div div:nth-child(-n+9):after{top:2px;left:-1px;width:1.5px;height:6px}._M28dq ._1eLhY div div:nth-child(-n+9):after{top:4px;left:-1px;width:2px;height:7px}._M28dq ._2TQuI div div:nth-child(-n+9):after{background:#fff}._M28dq ._3l4IJ{width:100%;height:100%}._M28dq ._3l4IJ._3SBzO{pointer-events:none}._M28dq ._3l4IJ._1ToQV{opacity:0}._M28dq ._3l4IJ._3RCRM{opacity:.5}@-webkit-keyframes _oEKLB{0%{opacity:1}to{opacity:0}}@keyframes _oEKLB{0%{opacity:1}to{opacity:0}}";
4
- var styles = {"spinnerContainer":"_M28dq","xs":"_36K0o","small":"_1eLhY","medium":"_3wDkK","large":"_1NvF4","spinnerComponent":"_oEKLB","hide":"_1ToQV","inverted":"_2TQuI","spinnerContent":"_3l4IJ","disablePointerEvents":"_3SBzO","fade":"_3RCRM"};
5
- var stylesheet="._M28dq{position:relative;display:inline-block}._M28dq._36K0o{min-height:20px;min-width:20px}._M28dq._1eLhY{min-height:25px;min-width:25px}._M28dq._3wDkK{min-height:40px;min-width:40px}._M28dq._1NvF4{min-height:64px;min-width:64px}._M28dq ._oEKLB{display:inline-block;background-color:transparent;position:absolute;z-index:10;width:0;height:0;left:50%;bottom:50%;pointer-events:none}._M28dq ._oEKLB._1ToQV{visibility:hidden}._M28dq ._oEKLB div{position:absolute;transform:rotate(20deg)}._M28dq ._oEKLB div div:nth-child(-n+9){background-color:#fff;transform-origin:0 0;-webkit-animation:_oEKLB .8s linear infinite;animation:_oEKLB .8s linear infinite}._M28dq ._oEKLB div div:nth-child(-n+9):after{content:\" \";display:block;position:absolute;top:5px;left:-1px;width:2px;height:10px;border-radius:20%;background:#000}._M28dq ._oEKLB div div:first-child{transform:rotate(20deg);-webkit-animation-delay:-.8s;animation-delay:-.8s}._M28dq ._oEKLB div div:nth-child(2){transform:rotate(60deg);-webkit-animation-delay:-.7s;animation-delay:-.7s}._M28dq ._oEKLB div div:nth-child(3){transform:rotate(100deg);-webkit-animation-delay:-.6s;animation-delay:-.6s}._M28dq ._oEKLB div div:nth-child(4){transform:rotate(140deg);-webkit-animation-delay:-.5s;animation-delay:-.5s}._M28dq ._oEKLB div div:nth-child(5){transform:rotate(180deg);-webkit-animation-delay:-.4s;animation-delay:-.4s}._M28dq ._oEKLB div div:nth-child(6){transform:rotate(220deg);-webkit-animation-delay:-.3s;animation-delay:-.3s}._M28dq ._oEKLB div div:nth-child(7){transform:rotate(260deg);-webkit-animation-delay:-.2s;animation-delay:-.2s}._M28dq ._oEKLB div div:nth-child(8){transform:rotate(300deg);-webkit-animation-delay:-.1s;animation-delay:-.1s}._M28dq ._oEKLB div div:nth-child(9){transform:rotate(340deg);-webkit-animation-delay:0s;animation-delay:0s}._M28dq ._1NvF4 div div:nth-child(-n+9):after{top:10px;left:-2px;width:4px;height:18px}._M28dq ._36K0o div div:nth-child(-n+9):after{top:2px;left:-1px;width:1.5px;height:6px}._M28dq ._1eLhY div div:nth-child(-n+9):after{top:4px;left:-1px;width:2px;height:7px}._M28dq ._2TQuI div div:nth-child(-n+9):after{background:#fff}._M28dq ._3l4IJ{width:100%;height:100%}._M28dq ._3l4IJ._3SBzO{pointer-events:none}._M28dq ._3l4IJ._1ToQV{opacity:0}._M28dq ._3l4IJ._3RCRM{opacity:.5}@-webkit-keyframes _oEKLB{0%{opacity:1}to{opacity:0}}@keyframes _oEKLB{0%{opacity:1}to{opacity:0}}";
3
+ var css_248z = "._hPy3F{position:relative;display:inline-block}._hPy3F._6G4QD{min-height:20px;min-width:20px}._hPy3F._NWOuR{min-height:25px;min-width:25px}._hPy3F._QO3mu{min-height:40px;min-width:40px}._hPy3F._1gEgr{min-height:64px;min-width:64px}._hPy3F ._bZGDW{display:inline-block;background-color:transparent;position:absolute;z-index:10;width:0;height:0;left:50%;bottom:50%;pointer-events:none}._hPy3F ._bZGDW._PpS2S{visibility:hidden}._hPy3F ._bZGDW div{position:absolute;transform:rotate(20deg)}._hPy3F ._bZGDW div div:nth-child(-n+9){background-color:#fff;transform-origin:0 0;animation:_bZGDW .8s linear infinite}._hPy3F ._bZGDW div div:nth-child(-n+9):after{content:\" \";display:block;position:absolute;top:5px;left:-1px;width:2px;height:10px;border-radius:20%;background:#000}._hPy3F ._bZGDW div div:first-child{transform:rotate(20deg);animation-delay:-.8s}._hPy3F ._bZGDW div div:nth-child(2){transform:rotate(60deg);animation-delay:-.7s}._hPy3F ._bZGDW div div:nth-child(3){transform:rotate(100deg);animation-delay:-.6s}._hPy3F ._bZGDW div div:nth-child(4){transform:rotate(140deg);animation-delay:-.5s}._hPy3F ._bZGDW div div:nth-child(5){transform:rotate(180deg);animation-delay:-.4s}._hPy3F ._bZGDW div div:nth-child(6){transform:rotate(220deg);animation-delay:-.3s}._hPy3F ._bZGDW div div:nth-child(7){transform:rotate(260deg);animation-delay:-.2s}._hPy3F ._bZGDW div div:nth-child(8){transform:rotate(300deg);animation-delay:-.1s}._hPy3F ._bZGDW div div:nth-child(9){transform:rotate(340deg);animation-delay:0s}._hPy3F ._1gEgr div div:nth-child(-n+9):after{top:10px;left:-2px;width:4px;height:18px}._hPy3F ._6G4QD div div:nth-child(-n+9):after{top:2px;left:-1px;width:1.5px;height:6px}._hPy3F ._NWOuR div div:nth-child(-n+9):after{top:4px;left:-1px;width:2px;height:7px}._hPy3F ._1C97H div div:nth-child(-n+9):after{background:#fff}._hPy3F ._R0YzJ{width:100%;height:100%}._hPy3F ._R0YzJ._mOWKM{pointer-events:none}._hPy3F ._R0YzJ._PpS2S{opacity:0}._hPy3F ._R0YzJ._1gtxg{opacity:.5}@keyframes _bZGDW{0%{opacity:1}to{opacity:0}}";
4
+ var styles = {"spinnerContainer":"_hPy3F","xs":"_6G4QD","small":"_NWOuR","medium":"_QO3mu","large":"_1gEgr","spinnerComponent":"_bZGDW","hide":"_PpS2S","inverted":"_1C97H","spinnerContent":"_R0YzJ","disablePointerEvents":"_mOWKM","fade":"_1gtxg"};
5
+ var stylesheet="._hPy3F{position:relative;display:inline-block}._hPy3F._6G4QD{min-height:20px;min-width:20px}._hPy3F._NWOuR{min-height:25px;min-width:25px}._hPy3F._QO3mu{min-height:40px;min-width:40px}._hPy3F._1gEgr{min-height:64px;min-width:64px}._hPy3F ._bZGDW{display:inline-block;background-color:transparent;position:absolute;z-index:10;width:0;height:0;left:50%;bottom:50%;pointer-events:none}._hPy3F ._bZGDW._PpS2S{visibility:hidden}._hPy3F ._bZGDW div{position:absolute;transform:rotate(20deg)}._hPy3F ._bZGDW div div:nth-child(-n+9){background-color:#fff;transform-origin:0 0;animation:_bZGDW .8s linear infinite}._hPy3F ._bZGDW div div:nth-child(-n+9):after{content:\" \";display:block;position:absolute;top:5px;left:-1px;width:2px;height:10px;border-radius:20%;background:#000}._hPy3F ._bZGDW div div:first-child{transform:rotate(20deg);animation-delay:-.8s}._hPy3F ._bZGDW div div:nth-child(2){transform:rotate(60deg);animation-delay:-.7s}._hPy3F ._bZGDW div div:nth-child(3){transform:rotate(100deg);animation-delay:-.6s}._hPy3F ._bZGDW div div:nth-child(4){transform:rotate(140deg);animation-delay:-.5s}._hPy3F ._bZGDW div div:nth-child(5){transform:rotate(180deg);animation-delay:-.4s}._hPy3F ._bZGDW div div:nth-child(6){transform:rotate(220deg);animation-delay:-.3s}._hPy3F ._bZGDW div div:nth-child(7){transform:rotate(260deg);animation-delay:-.2s}._hPy3F ._bZGDW div div:nth-child(8){transform:rotate(300deg);animation-delay:-.1s}._hPy3F ._bZGDW div div:nth-child(9){transform:rotate(340deg);animation-delay:0s}._hPy3F ._1gEgr div div:nth-child(-n+9):after{top:10px;left:-2px;width:4px;height:18px}._hPy3F ._6G4QD div div:nth-child(-n+9):after{top:2px;left:-1px;width:1.5px;height:6px}._hPy3F ._NWOuR div div:nth-child(-n+9):after{top:4px;left:-1px;width:2px;height:7px}._hPy3F ._1C97H div div:nth-child(-n+9):after{background:#fff}._hPy3F ._R0YzJ{width:100%;height:100%}._hPy3F ._R0YzJ._mOWKM{pointer-events:none}._hPy3F ._R0YzJ._PpS2S{opacity:0}._hPy3F ._R0YzJ._1gtxg{opacity:.5}@keyframes _bZGDW{0%{opacity:1}to{opacity:0}}";
6
6
  styleInject(css_248z);
7
7
 
8
8
  export { styles as default, stylesheet };
@@ -14,7 +14,6 @@ const ConditionContainer = function ConditionContainer(_ref) {
14
14
  conditionTemplate: ConditionTemplate,
15
15
  onConditionChange
16
16
  } = useLogicEditorContext();
17
-
18
17
  const handleChange = value => {
19
18
  onConditionChange({
20
19
  id: condition.id,
@@ -22,7 +21,6 @@ const ConditionContainer = function ConditionContainer(_ref) {
22
21
  value
23
22
  }, position);
24
23
  };
25
-
26
24
  return /*#__PURE__*/React__default.createElement("div", {
27
25
  className: styles.condition
28
26
  }, /*#__PURE__*/React__default.createElement(ConditionTemplate, {
@@ -38,7 +38,6 @@ const ConditionSet = function ConditionSet(_ref) {
38
38
  const conditionRef = React__default.useRef(null);
39
39
  const lastConnectionRef = React__default.useRef();
40
40
  const lastItemRef = React__default.useRef();
41
-
42
41
  function setupLastLine() {
43
42
  if (lastConnectionRef.current && conditionRef.current && lastItemRef.current) {
44
43
  let {
@@ -47,58 +46,49 @@ const ConditionSet = function ConditionSet(_ref) {
47
46
  const {
48
47
  height: lastItemHeight
49
48
  } = lastItemRef.current.getBoundingClientRect();
50
-
51
49
  if (lastItemHeight > 52) {
52
50
  height -= lastItemHeight - 52;
53
-
54
51
  if (fixedSet) {
55
52
  height -= 18;
56
53
  }
57
54
  }
58
-
59
55
  if (fixedSet) {
60
- lastConnectionRef.current.style.height = "".concat(height - 38, "px");
61
- lastConnectionRef.current.style.top = "-".concat(height - 56, "px");
56
+ lastConnectionRef.current.style.height = `${height - 38}px`;
57
+ lastConnectionRef.current.style.top = `-${height - 56}px`;
62
58
  } else {
63
- lastConnectionRef.current.style.height = "".concat(height - 18, "px");
64
- lastConnectionRef.current.style.top = "-".concat(height - 52, "px");
59
+ lastConnectionRef.current.style.height = `${height - 18}px`;
60
+ lastConnectionRef.current.style.top = `-${height - 52}px`;
65
61
  }
66
62
  }
67
63
  }
68
-
69
64
  useEventListener(window, 'resize', setupLastLine);
70
65
  React__default.useLayoutEffect(setupLastLine);
71
-
72
66
  const handleNewLogicItem = (item, newItemIndex) => () => {
73
67
  onNewLogicItem(item, {
74
68
  parent: position,
75
69
  index: newItemIndex
76
70
  });
77
71
  };
72
+
78
73
  /**
79
74
  * Returns a data-testid unique to the current position in the tree.
80
75
  * @param prefix - A string that is injected between the root data-testid and the index list.
81
76
  * @returns A `-` separated string of indices where the left-most number is the root index and the right-most number is the index of the current controls menu. The string is prefixed with the root data-testid and the string passed to `prefix`;
82
77
  */
83
-
84
-
85
78
  const getDataTestId = useCallback((prefix, elementPosition) => {
86
79
  const indices = [elementPosition.index];
87
80
  let currentParent = elementPosition.parent;
88
-
89
81
  while (currentParent) {
90
82
  indices.unshift(currentParent.index);
91
83
  currentParent = currentParent.parent;
92
- } // Fixed sets still include a root index (which would account for a set dropdown that doesn't actually exist) so the root index is removed from the list
93
-
84
+ }
94
85
 
86
+ // Fixed sets still include a root index (which would account for a set dropdown that doesn't actually exist) so the root index is removed from the list
95
87
  if (fixedSet) {
96
88
  indices.shift();
97
89
  }
98
-
99
- return getSubDataTestId(rootDataTestId, "".concat(prefix, "-").concat(indices.join('-')));
90
+ return getSubDataTestId(rootDataTestId, `${prefix}-${indices.join('-')}`);
100
91
  }, [fixedSet, rootDataTestId]);
101
-
102
92
  function renderControls(itemType, itemPosition, itemIndex, itemLevel, numberOfSetItems, itemId) {
103
93
  return /*#__PURE__*/React__default.createElement(Controls, {
104
94
  handleNewLogicItem: handleNewLogicItem,
@@ -112,22 +102,18 @@ const ConditionSet = function ConditionSet(_ref) {
112
102
  "data-testid": getDataTestId('condition-actions', itemPosition)
113
103
  });
114
104
  }
115
-
116
105
  const renderSetChildren = () => value.conditions.map((item, i, items) => {
117
106
  let itemConnectionRef;
118
107
  let itemRef;
119
-
120
108
  if (i === items.length - 1) {
121
109
  if (lastConnectionRef.current) {
122
110
  // Remove previous last-line styles
123
111
  lastConnectionRef.current.style.height = '';
124
112
  lastConnectionRef.current.style.top = '';
125
113
  }
126
-
127
114
  itemConnectionRef = lastConnectionRef;
128
115
  itemRef = lastItemRef;
129
116
  }
130
-
131
117
  if (item.logicType === LOGIC_TYPE_CONDITION) {
132
118
  const conditionPosition = {
133
119
  parent: position,
@@ -148,7 +134,6 @@ const ConditionSet = function ConditionSet(_ref) {
148
134
  conditionControls: !readOnly ? renderControls(LOGIC_TYPE_CONDITION, conditionPosition, i + 1, level + 1, value.conditions.length, item.id) : undefined
149
135
  }));
150
136
  }
151
-
152
137
  if (item.logicType === LOGIC_TYPE_SET) {
153
138
  return /*#__PURE__*/React__default.createElement("div", {
154
139
  key: item.id,
@@ -164,10 +149,8 @@ const ConditionSet = function ConditionSet(_ref) {
164
149
  parent: position
165
150
  }));
166
151
  }
167
-
168
152
  return undefined;
169
153
  });
170
-
171
154
  return /*#__PURE__*/React__default.createElement("div", {
172
155
  className: classNames(styles.set, {
173
156
  [styles.fixedSet]: !!fixedSet
@@ -69,10 +69,10 @@ const Controls = function Controls(_ref) {
69
69
  }, translations.insertSetBelow)), (fixedSet && numberOfSetItems > 1 || !fixedSet && itemLevel > 0) && /*#__PURE__*/React__default.createElement(MenuItem, {
70
70
  value: "delete",
71
71
  onSelect: e => {
72
- onDelete(itemPosition); // We want to move focus to the previous control
72
+ onDelete(itemPosition);
73
+ // We want to move focus to the previous control
73
74
  // item when this one is deleted, so we need to
74
75
  // prevent Menu's default focus behavior
75
-
76
76
  e.preventDefault();
77
77
  }
78
78
  }, /*#__PURE__*/React__default.createElement(RemoveItemIcon, {
@@ -41,57 +41,48 @@ const LogicEditor = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
41
41
  maxNestedSets
42
42
  }));
43
43
  const classes = classNames(className, styles.editor);
44
-
45
44
  function update(newState) {
46
45
  setState(newState);
47
- onChange === null || onChange === void 0 ? void 0 : onChange(newState);
46
+ onChange?.(newState);
48
47
  }
49
-
50
48
  const handleNewLogicItem = (item, position) => {
51
49
  const newState = shallowCopy(state);
52
50
  const parent = getParentSet(newState, position);
53
51
  parent.conditions.splice(position.index, 0, item);
54
52
  update(newState);
55
53
  };
56
-
57
54
  const handleSetChange = (newSetValue, position) => {
58
55
  const rootState = shallowCopy(state);
59
56
  const parent = getParentSet(rootState, position);
60
-
61
57
  if (!position.parent) {
62
58
  // root set
63
59
  parent.value = newSetValue;
64
60
  } else {
65
61
  parent.conditions[position.index].value = newSetValue;
66
62
  }
67
-
68
63
  update(rootState);
69
64
  };
70
-
71
65
  const handleConditionChange = (newCondition, position) => {
72
66
  const newState = shallowCopy(state);
73
67
  const parent = getParentSet(newState, position);
74
68
  parent.conditions[position.index] = newCondition;
75
69
  update(newState);
76
70
  };
77
-
78
71
  const controlsRef = useRef({});
79
-
80
72
  const handleDelete = position => {
81
73
  let previousItemId = getPreviousItemId(state, position);
82
74
  const newState = shallowCopy(state);
83
75
  const parent = getParentSet(newState, position);
84
- parent.conditions.splice(position.index, 1); // If the last condition in a set was deleted, also delete the set.
76
+ parent.conditions.splice(position.index, 1);
85
77
 
78
+ // If the last condition in a set was deleted, also delete the set.
86
79
  if (parent.conditions.length === 0) {
87
80
  previousItemId = getPreviousItemId(newState, position.parent);
88
81
  getParentSet(newState, position.parent).conditions.splice(position.parent.index, 1);
89
82
  }
90
-
91
83
  controlsRef.current[previousItemId].focus();
92
84
  update(newState);
93
85
  };
94
-
95
86
  return /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
96
87
  role: "group",
97
88
  className: classes,
@@ -1,8 +1,8 @@
1
1
  import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
2
2
 
3
- var css_248z = "._1x2CY{width:100%}._oiflc{display:flex;align-items:center}._1GHH8{display:flex;flex-wrap:wrap;grid-gap:4px}._1GHH8 :nth-last-child(2){margin-right:42px}._1oeq8{position:relative;padding-left:32px;padding-top:16px;display:flex}._RS3cR ._1oeq8{padding-top:0;padding-left:16px}._RS3cR ._1oeq8+._1oeq8{margin-top:16px}._2dp7o{position:absolute;left:16px;top:0;height:34px;width:16px;border-left:1px solid #c2c2c2;border-bottom:1px solid #c2c2c2;border-bottom-left-radius:4px}._RS3cR ._1oeq8:first-of-type ._2dp7o{top:16px;border-bottom:none;border-bottom-left-radius:0;border-top:1px solid #c2c2c2;border-top-left-radius:4px}._RS3cR ._2dp7o{top:-16px;left:0}._RS3cR ._1oeq8:not(:first-of-type):not(:last-of-type) ._2dp7o{border-bottom-left-radius:0}._328IN{margin-left:-46px}._3SDXD{margin:0 2px 0 4px}body._1Fxbr ._3SDXD{outline-width:2px}._3hPtH{margin-left:4px}";
4
- var styles = {"set":"_1x2CY","setWrapper":"_oiflc","condition":"_1GHH8","branch":"_1oeq8","fixedSet":"_RS3cR","connection":"_2dp7o","conditionControlsContainer":"_328IN","controls":"_3SDXD","keyboard-user":"_1Fxbr","controlMenuItem":"_3hPtH"};
5
- var stylesheet="._1x2CY{width:100%}._oiflc{display:flex;align-items:center}._1GHH8{display:flex;flex-wrap:wrap;grid-gap:4px}._1GHH8 :nth-last-child(2){margin-right:42px}._1oeq8{position:relative;padding-left:32px;padding-top:16px;display:flex}._RS3cR ._1oeq8{padding-top:0;padding-left:16px}._RS3cR ._1oeq8+._1oeq8{margin-top:16px}._2dp7o{position:absolute;left:16px;top:0;height:34px;width:16px;border-left:1px solid #c2c2c2;border-bottom:1px solid #c2c2c2;border-bottom-left-radius:4px}._RS3cR ._1oeq8:first-of-type ._2dp7o{top:16px;border-bottom:none;border-bottom-left-radius:0;border-top:1px solid #c2c2c2;border-top-left-radius:4px}._RS3cR ._2dp7o{top:-16px;left:0}._RS3cR ._1oeq8:not(:first-of-type):not(:last-of-type) ._2dp7o{border-bottom-left-radius:0}._328IN{margin-left:-46px}._3SDXD{margin:0 2px 0 4px}body._1Fxbr ._3SDXD{outline-width:2px}._3hPtH{margin-left:4px}";
3
+ var css_248z = "._K-1V1{width:100%}._132Vd{display:flex;align-items:center}._1pLtQ{display:flex;flex-wrap:wrap;grid-gap:4px}._1pLtQ :nth-last-child(2){margin-right:42px}._aoa-3{position:relative;padding-left:32px;padding-top:16px;display:flex}._Ms-Uj ._aoa-3{padding-top:0;padding-left:16px}._Ms-Uj ._aoa-3+._aoa-3{margin-top:16px}._GSq7X{position:absolute;left:16px;top:0;height:34px;width:16px;border-left:1px solid #c2c2c2;border-bottom:1px solid #c2c2c2;border-bottom-left-radius:4px}._Ms-Uj ._aoa-3:first-of-type ._GSq7X{top:16px;border-bottom:none;border-bottom-left-radius:0;border-top:1px solid #c2c2c2;border-top-left-radius:4px}._Ms-Uj ._GSq7X{top:-16px;left:0}._Ms-Uj ._aoa-3:not(:first-of-type):not(:last-of-type) ._GSq7X{border-bottom-left-radius:0}._x1xR0{margin-left:-46px}._pHBCw{margin:0 2px 0 4px}body._VHviF ._pHBCw{outline-width:2px}._GOCCp{margin-left:4px}";
4
+ var styles = {"set":"_K-1V1","setWrapper":"_132Vd","condition":"_1pLtQ","branch":"_aoa-3","fixedSet":"_Ms-Uj","connection":"_GSq7X","conditionControlsContainer":"_x1xR0","controls":"_pHBCw","keyboard-user":"_VHviF","controlMenuItem":"_GOCCp"};
5
+ var stylesheet="._K-1V1{width:100%}._132Vd{display:flex;align-items:center}._1pLtQ{display:flex;flex-wrap:wrap;grid-gap:4px}._1pLtQ :nth-last-child(2){margin-right:42px}._aoa-3{position:relative;padding-left:32px;padding-top:16px;display:flex}._Ms-Uj ._aoa-3{padding-top:0;padding-left:16px}._Ms-Uj ._aoa-3+._aoa-3{margin-top:16px}._GSq7X{position:absolute;left:16px;top:0;height:34px;width:16px;border-left:1px solid #c2c2c2;border-bottom:1px solid #c2c2c2;border-bottom-left-radius:4px}._Ms-Uj ._aoa-3:first-of-type ._GSq7X{top:16px;border-bottom:none;border-bottom-left-radius:0;border-top:1px solid #c2c2c2;border-top-left-radius:4px}._Ms-Uj ._GSq7X{top:-16px;left:0}._Ms-Uj ._aoa-3:not(:first-of-type):not(:last-of-type) ._GSq7X{border-bottom-left-radius:0}._x1xR0{margin-left:-46px}._pHBCw{margin:0 2px 0 4px}body._VHviF ._pHBCw{outline-width:2px}._GOCCp{margin-left:4px}";
6
6
  styleInject(css_248z);
7
7
 
8
8
  export { styles as default, stylesheet };
@@ -11,38 +11,29 @@ function constructValidDefaultState(_ref) {
11
11
  maxNestedSets
12
12
  } = _ref;
13
13
  let clone;
14
-
15
14
  if (defaultValue) {
16
15
  clone = deepCopy(defaultValue);
17
16
  } else {
18
17
  clone = newConditionSet(defaultSetValue);
19
18
  }
20
-
21
19
  let internalMaxNestedSets = maxNestedSets;
22
-
23
20
  if (fixedSet) {
24
21
  internalMaxNestedSets = 0;
25
22
  }
26
-
27
23
  ensureFixedSetHasOneCondition(clone, fixedSet);
28
24
  pruneSets(clone, 0, internalMaxNestedSets);
29
25
  assignIdentifiersAndSetValues(clone, defaultSetValue);
30
26
  return clone;
31
27
  }
32
-
33
28
  function fixedSetHasNoConditions(defaultValue, fixedSet) {
34
- var _defaultValue$conditi;
35
-
36
- return fixedSet && defaultValue && (!(defaultValue !== null && defaultValue !== void 0 && defaultValue.conditions) || !((defaultValue === null || defaultValue === void 0 ? void 0 : (_defaultValue$conditi = defaultValue.conditions) === null || _defaultValue$conditi === void 0 ? void 0 : _defaultValue$conditi.length) >= 1));
29
+ return fixedSet && defaultValue && (!defaultValue?.conditions || !(defaultValue?.conditions?.length >= 1));
37
30
  }
38
-
39
31
  function ensureFixedSetHasOneCondition(defaultValue, fixedSet) {
40
32
  if (fixedSetHasNoConditions(defaultValue, fixedSet)) {
41
33
  // eslint-disable-next-line no-param-reassign
42
34
  defaultValue.conditions = [newCondition()];
43
35
  }
44
36
  }
45
-
46
37
  function pruneSets(set, level, maxNestedSets) {
47
38
  if (level === maxNestedSets) {
48
39
  // eslint-disable-next-line no-param-reassign
@@ -55,23 +46,21 @@ function pruneSets(set, level, maxNestedSets) {
55
46
  });
56
47
  }
57
48
  }
58
-
59
49
  function uuidv4() {
60
50
  return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => {
61
51
  // eslint-disable-next-line no-bitwise
62
- const r = Math.random() * 16 | 0; // eslint-disable-next-line no-bitwise
63
-
52
+ const r = Math.random() * 16 | 0;
53
+ // eslint-disable-next-line no-bitwise
64
54
  const v = c === 'x' ? r : r & 0x3 | 0x8;
65
55
  return v.toString(16);
66
56
  });
67
57
  }
68
-
69
58
  function deepCopy(object) {
70
59
  return JSON.parse(JSON.stringify(object));
71
60
  }
72
-
73
61
  function shallowCopy(object) {
74
- return { ...object
62
+ return {
63
+ ...object
75
64
  };
76
65
  }
77
66
  function newCondition() {
@@ -91,73 +80,59 @@ function newConditionSet(value) {
91
80
  function assignIdentifiersAndSetValues(tree, defaultSetValue) {
92
81
  const queue = [];
93
82
  queue.push(tree);
94
-
95
83
  while (queue.length > 0) {
96
84
  const node = queue.pop();
97
-
98
85
  if (!node.id) {
99
86
  node.id = uuidv4();
100
87
  }
101
-
102
88
  if (node.logicType === LOGIC_TYPE_SET && !node.value) {
103
89
  node.value = defaultSetValue;
104
90
  }
105
-
106
91
  if (node.conditions) {
107
92
  queue.push(...node.conditions);
108
93
  }
109
94
  }
110
-
111
95
  return tree;
112
96
  }
113
-
114
97
  function walkToRoot(position) {
115
98
  let root = {
116
99
  level: position.level,
117
100
  index: position.index
118
101
  };
119
-
120
102
  for (let current = position.parent; current; current = current.parent) {
121
103
  root = {
122
104
  level: current.level,
123
105
  index: current.index,
124
- child: { ...root
106
+ child: {
107
+ ...root
125
108
  }
126
109
  };
127
110
  }
128
-
129
111
  return root;
130
112
  }
131
-
132
113
  function getPreviousItemId(conditionRoot, position) {
133
114
  const parentSet = getParentSet(conditionRoot, position);
134
-
135
115
  if (position.index === 0) {
136
116
  // The previous item is the parent
137
117
  return parentSet.id;
138
- } // The previous item is the previous sibling's deepest child
139
-
140
-
118
+ }
119
+ // The previous item is the previous sibling's deepest child
141
120
  let previousIndex = position.index - 1;
142
121
  let previousItem = parentSet.conditions[previousIndex];
143
-
144
122
  while (previousItem.conditions) {
145
123
  previousIndex = previousItem.conditions.length - 1;
146
124
  previousItem = previousItem.conditions[previousIndex];
147
125
  }
148
-
149
126
  return previousItem.id;
150
127
  }
151
128
  function getParentSet(conditionRoot, position) {
152
129
  const positionFromRoot = walkToRoot(position);
153
130
  let set = conditionRoot;
154
-
155
131
  for (let {
156
132
  child
157
133
  } = positionFromRoot; child && child.child; child = child.child) {
158
134
  set = set.conditions[child.index];
159
135
  }
160
-
161
136
  return set;
162
137
  }
163
138