orc-shared 5.8.0-dev.7 → 5.8.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 (311) hide show
  1. package/dist/actions/applications.js +5 -5
  2. package/dist/actions/authentication.js +5 -5
  3. package/dist/actions/countries.js +5 -5
  4. package/dist/actions/locale.js +5 -5
  5. package/dist/actions/makeApiAction.js +7 -7
  6. package/dist/actions/makeOrcApiAction.js +2 -2
  7. package/dist/actions/metadata.js +7 -7
  8. package/dist/actions/navigation.js +2 -2
  9. package/dist/actions/scopes.js +5 -5
  10. package/dist/actions/tasks.js +5 -5
  11. package/dist/actions/timezones.js +5 -5
  12. package/dist/actions/versionInfo.js +5 -5
  13. package/dist/buildStore.js +4 -4
  14. package/dist/components/AppFrame/About.js +9 -9
  15. package/dist/components/AppFrame/Anchor.js +1 -1
  16. package/dist/components/AppFrame/AppFrame.js +6 -6
  17. package/dist/components/AppFrame/ApplicationSelector/ApplicationDialog.js +1 -1
  18. package/dist/components/AppFrame/ApplicationSelector/Header.js +4 -4
  19. package/dist/components/AppFrame/ApplicationSelector/index.js +3 -3
  20. package/dist/components/AppFrame/ConnectedToastList.js +2 -2
  21. package/dist/components/AppFrame/Help.js +1 -1
  22. package/dist/components/AppFrame/MenuItem.js +6 -6
  23. package/dist/components/AppFrame/Preferences.js +7 -7
  24. package/dist/components/AppFrame/Sidebar.js +5 -5
  25. package/dist/components/AppFrame/Topbar.js +3 -3
  26. package/dist/components/AppFrame/index.js +2 -2
  27. package/dist/components/ApplicationModuleLoader.js +5 -5
  28. package/dist/components/Authenticate.js +2 -2
  29. package/dist/components/Button.js +1 -1
  30. package/dist/components/CategoryList.js +6 -6
  31. package/dist/components/Checkbox.js +5 -5
  32. package/dist/components/ColumnWrapper.js +1 -1
  33. package/dist/components/Culture.js +1 -1
  34. package/dist/components/DevPages.js +1 -1
  35. package/dist/components/DropMenu/Menu.js +2 -2
  36. package/dist/components/DropMenu/index.js +5 -5
  37. package/dist/components/ErrorPlaceholder.js +4 -4
  38. package/dist/components/Form/Combination.js +2 -2
  39. package/dist/components/Form/Field.js +3 -3
  40. package/dist/components/Form/FieldElements.js +4 -4
  41. package/dist/components/Form/FieldList.js +6 -6
  42. package/dist/components/Form/Fieldset.js +1 -1
  43. package/dist/components/Form/Form.js +2 -2
  44. package/dist/components/Form/FormElement.js +1 -1
  45. package/dist/components/Form/InputField.js +10 -10
  46. package/dist/components/Form/Inputs/Button.js +4 -4
  47. package/dist/components/Form/Inputs/Date.js +4 -4
  48. package/dist/components/Form/Inputs/FieldButtons.js +2 -2
  49. package/dist/components/Form/Inputs/Number.js +4 -4
  50. package/dist/components/Form/Inputs/ReadOnly.js +1 -1
  51. package/dist/components/Form/Inputs/SmallButton.js +4 -4
  52. package/dist/components/Form/Inputs/Text.js +4 -4
  53. package/dist/components/Form/Inputs/Time.js +4 -4
  54. package/dist/components/Form/Inputs/Toggles.js +4 -4
  55. package/dist/components/Form/Inputs/Translation.js +11 -11
  56. package/dist/components/Form/Inputs/index.js +1 -1
  57. package/dist/components/Form/index.js +2 -2
  58. package/dist/components/I18n.js +2 -2
  59. package/dist/components/Icon.js +3 -3
  60. package/dist/components/IconButton.js +3 -3
  61. package/dist/components/Input.js +5 -5
  62. package/dist/components/InternetExplorerWarningMessage.js +1 -1
  63. package/dist/components/List/DataCell.js +2 -2
  64. package/dist/components/List/HeadCell.js +2 -2
  65. package/dist/components/List/HeadRow.js +1 -1
  66. package/dist/components/List/List.js +5 -5
  67. package/dist/components/List/Row.js +2 -2
  68. package/dist/components/List/enhanceColumnDefs.js +2 -2
  69. package/dist/components/List/index.js +2 -2
  70. package/dist/components/Loader.js +6 -6
  71. package/dist/components/LoadingIcon.js +2 -2
  72. package/dist/components/MaterialUI/DataDisplay/Badge.js +4 -4
  73. package/dist/components/MaterialUI/DataDisplay/Chip.js +2 -2
  74. package/dist/components/MaterialUI/DataDisplay/CollapsableList.js +6 -6
  75. package/dist/components/MaterialUI/DataDisplay/Divider.js +2 -2
  76. package/dist/components/MaterialUI/DataDisplay/Icon.js +4 -4
  77. package/dist/components/MaterialUI/DataDisplay/List.js +1 -1
  78. package/dist/components/MaterialUI/DataDisplay/Modal.js +4 -4
  79. package/dist/components/MaterialUI/DataDisplay/Notification.js +8 -8
  80. package/dist/components/MaterialUI/DataDisplay/NotificationProps.js +6 -6
  81. package/dist/components/MaterialUI/DataDisplay/PopperedElements/PopperedIcon.js +2 -2
  82. package/dist/components/MaterialUI/DataDisplay/PredefinedElements/ActionModal.js +1 -1
  83. package/dist/components/MaterialUI/DataDisplay/PredefinedElements/Address.js +2 -2
  84. package/dist/components/MaterialUI/DataDisplay/PredefinedElements/ConfirmationModal.js +1 -1
  85. package/dist/components/MaterialUI/DataDisplay/PredefinedElements/DiscountedPrice.js +1 -1
  86. package/dist/components/MaterialUI/DataDisplay/PredefinedElements/GlobalErrorMessages.js +1 -1
  87. package/dist/components/MaterialUI/DataDisplay/PredefinedElements/InformationItem.js +3 -3
  88. package/dist/components/MaterialUI/DataDisplay/PredefinedElements/LookupDisplayValue.js +4 -4
  89. package/dist/components/MaterialUI/DataDisplay/PredefinedElements/Placeholder.js +1 -1
  90. package/dist/components/MaterialUI/DataDisplay/PredefinedElements/SectionTitle.js +1 -1
  91. package/dist/components/MaterialUI/DataDisplay/PredefinedElements/StepperModal.js +28 -12
  92. package/dist/components/MaterialUI/DataDisplay/PredefinedElements/TableInfoBar.js +1 -1
  93. package/dist/components/MaterialUI/DataDisplay/PredefinedElements/Translations.js +9 -9
  94. package/dist/components/MaterialUI/DataDisplay/SelectionList.js +17 -25
  95. package/dist/components/MaterialUI/DataDisplay/Table.js +9 -9
  96. package/dist/components/MaterialUI/DataDisplay/TableHeaderCell.js +1 -1
  97. package/dist/components/MaterialUI/DataDisplay/TableProps.js +6 -6
  98. package/dist/components/MaterialUI/DataDisplay/Timeline.js +1 -1
  99. package/dist/components/MaterialUI/DataDisplay/TimelineItem.js +1 -1
  100. package/dist/components/MaterialUI/DataDisplay/TooltippedElements/MultipleLinesText.js +7 -7
  101. package/dist/components/MaterialUI/DataDisplay/TooltippedElements/TooltippedIcon.js +4 -4
  102. package/dist/components/MaterialUI/DataDisplay/TooltippedElements/TooltippedTypography.js +2 -2
  103. package/dist/components/MaterialUI/DataDisplay/TransferList.js +9 -9
  104. package/dist/components/MaterialUI/DataDisplay/chipProps.js +6 -6
  105. package/dist/components/MaterialUI/DataDisplay/collapsableListProps.js +6 -6
  106. package/dist/components/MaterialUI/DataDisplay/dividerProps.js +6 -6
  107. package/dist/components/MaterialUI/DataDisplay/index.js +1 -1
  108. package/dist/components/MaterialUI/DataDisplay/modalProps.js +6 -6
  109. package/dist/components/MaterialUI/DataDisplay/tableHelpers.js +9 -5
  110. package/dist/components/MaterialUI/DataDisplay/useTableSelection.js +6 -6
  111. package/dist/components/MaterialUI/Feedback/NotificationContext.js +6 -6
  112. package/dist/components/MaterialUI/Feedback/loadingScreen.js +6 -6
  113. package/dist/components/MaterialUI/Inputs/Autocomplete.js +5 -5
  114. package/dist/components/MaterialUI/Inputs/AutocompleteProps.js +6 -6
  115. package/dist/components/MaterialUI/Inputs/Checkbox.js +4 -4
  116. package/dist/components/MaterialUI/Inputs/CheckboxGroup.js +4 -4
  117. package/dist/components/MaterialUI/Inputs/CheckboxGroupProps.js +6 -6
  118. package/dist/components/MaterialUI/Inputs/CheckboxProps.js +6 -6
  119. package/dist/components/MaterialUI/Inputs/DatePicker.js +15 -16
  120. package/dist/components/MaterialUI/Inputs/InputBase.js +14 -11
  121. package/dist/components/MaterialUI/Inputs/InputBaseProps.js +6 -6
  122. package/dist/components/MaterialUI/Inputs/LookupSelect.js +3 -3
  123. package/dist/components/MaterialUI/Inputs/PredefinedElements/SearchControl.js +2 -2
  124. package/dist/components/MaterialUI/Inputs/PredefinedElements/TitledSelect.js +1 -1
  125. package/dist/components/MaterialUI/Inputs/Radio.js +4 -3
  126. package/dist/components/MaterialUI/Inputs/RadioProps.js +6 -6
  127. package/dist/components/MaterialUI/Inputs/Select.js +23 -10
  128. package/dist/components/MaterialUI/Inputs/SelectProps.js +8 -7
  129. package/dist/components/MaterialUI/Inputs/StandaloneRadio.js +4 -4
  130. package/dist/components/MaterialUI/Inputs/Switch.js +32 -20
  131. package/dist/components/MaterialUI/Inputs/SwitchProps.js +6 -6
  132. package/dist/components/MaterialUI/Inputs/TimePicker.js +7 -7
  133. package/dist/components/MaterialUI/Inputs/createInput.js +5 -5
  134. package/dist/components/MaterialUI/Inputs/index.js +1 -1
  135. package/dist/components/MaterialUI/Inputs/standaloneRadioProps.js +6 -6
  136. package/dist/components/MaterialUI/Navigation/DropDownMenu.js +6 -6
  137. package/dist/components/MaterialUI/Navigation/DropDownMenuProps.js +6 -6
  138. package/dist/components/MaterialUI/Navigation/ExternalLink.js +1 -1
  139. package/dist/components/MaterialUI/Navigation/PredefinedElements/ActionMenu.js +1 -1
  140. package/dist/components/MaterialUI/Navigation/TabBar.js +60 -38
  141. package/dist/components/MaterialUI/Navigation/TabLabel.js +5 -5
  142. package/dist/components/MaterialUI/ScopeSelector/ScopeSelector.js +1 -1
  143. package/dist/components/MaterialUI/ScopeSelector/ScopeTreeView.js +5 -5
  144. package/dist/components/MaterialUI/ScopeSelector/TreeItem.js +12 -6
  145. package/dist/components/MaterialUI/Surfaces/ExpansionPanel.js +5 -5
  146. package/dist/components/MaterialUI/Surfaces/Paper.js +2 -2
  147. package/dist/components/MaterialUI/Surfaces/PredefinedElements/TitledPaper.js +1 -1
  148. package/dist/components/MaterialUI/Surfaces/SectionExpansionPanel.js +5 -5
  149. package/dist/components/MaterialUI/Surfaces/expansionPanelProps.js +7 -7
  150. package/dist/components/MaterialUI/Surfaces/paperProps.js +6 -6
  151. package/dist/components/MaterialUI/componentProps.js +2 -2
  152. package/dist/components/MaterialUI/hocs/withDeferredPopper.js +10 -16
  153. package/dist/components/MaterialUI/hocs/withDeferredTooltip.js +9 -9
  154. package/dist/components/MaterialUI/muiThemes.js +2 -2
  155. package/dist/components/MaterialUI/textProps.js +6 -6
  156. package/dist/components/Modal/Background.js +1 -1
  157. package/dist/components/Modal/Dialog.js +2 -2
  158. package/dist/components/Modal/Wrapper.js +2 -2
  159. package/dist/components/Modal/index.js +6 -6
  160. package/dist/components/Modules.js +9 -9
  161. package/dist/components/MultiSelector.js +9 -9
  162. package/dist/components/Navigation/Bar.js +8 -8
  163. package/dist/components/Navigation/Tab.js +8 -8
  164. package/dist/components/Navigation/index.js +1 -1
  165. package/dist/components/Navigation/useNavigationState.js +8 -8
  166. package/dist/components/Placeholder.js +5 -5
  167. package/dist/components/Provision.js +1 -1
  168. package/dist/components/Routing/FullPage.js +1 -1
  169. package/dist/components/Routing/Page.js +7 -7
  170. package/dist/components/Routing/Segment.js +2 -2
  171. package/dist/components/Routing/SegmentPage.js +10 -10
  172. package/dist/components/Routing/SubPage.js +5 -5
  173. package/dist/components/Routing/withWaypointing.js +4 -4
  174. package/dist/components/Scope/ScopeModificationConfirmationDialog.js +1 -1
  175. package/dist/components/Scope/ScopeNode.js +6 -6
  176. package/dist/components/Scope/Selector.js +1 -1
  177. package/dist/components/Scope/index.js +8 -8
  178. package/dist/components/Scope/useScopeConfirmationModalState.js +10 -10
  179. package/dist/components/Scope/useScopeSelect.js +1 -1
  180. package/dist/components/ScopeExtendedConfigurationLoader.js +5 -5
  181. package/dist/components/Selector.js +9 -9
  182. package/dist/components/Sidepanel.js +2 -2
  183. package/dist/components/Spritesheet.js +1 -1
  184. package/dist/components/Switch.js +5 -5
  185. package/dist/components/TaskDetailsModal.js +2 -2
  186. package/dist/components/Text.js +6 -6
  187. package/dist/components/ToastList.js +9 -6
  188. package/dist/components/Toolbar.js +5 -5
  189. package/dist/components/Tooltip.js +1 -1
  190. package/dist/components/Treeview/Branch.js +1 -1
  191. package/dist/components/Treeview/Label.js +2 -2
  192. package/dist/components/Treeview/Leaf.js +1 -1
  193. package/dist/components/Treeview/Node.js +6 -6
  194. package/dist/components/Treeview/index.js +10 -10
  195. package/dist/constants.js +7 -1
  196. package/dist/getThemeOverrides.js +2 -2
  197. package/dist/hocs/withAuthentication.js +2 -2
  198. package/dist/hocs/withClickOutside.js +4 -4
  199. package/dist/hocs/withErrorBoundary.js +7 -7
  200. package/dist/hocs/withId.js +4 -4
  201. package/dist/hocs/withNavigationLink.js +5 -5
  202. package/dist/hocs/withScopeData.js +5 -5
  203. package/dist/hocs/withScrollBox.js +4 -4
  204. package/dist/hocs/withToggle.js +7 -7
  205. package/dist/hocs/withUpdateHandler.js +2 -2
  206. package/dist/hocs/withViewState.js +5 -5
  207. package/dist/hooks/useEditState.js +2 -2
  208. package/dist/hooks/useEntityLoader.js +7 -7
  209. package/dist/hooks/useFullEntityEditState.js +7 -7
  210. package/dist/hooks/useInfiniteScroll.js +4 -4
  211. package/dist/hooks/useLabelMessage.js +3 -3
  212. package/dist/hooks/useMultipleFieldEditState.js +2 -2
  213. package/dist/hooks/useNotificationRequestState.js +3 -3
  214. package/dist/hooks/useRequestState.js +1 -1
  215. package/dist/hooks/useScopeGuardLoader.js +1 -1
  216. package/dist/hooks/useSelectorAndUnwrap.js +1 -1
  217. package/dist/hooks/useToggle.js +4 -4
  218. package/dist/reducers/applications.js +1 -1
  219. package/dist/reducers/authentication.js +5 -5
  220. package/dist/reducers/countries.js +1 -1
  221. package/dist/reducers/globalErrorMessages.js +1 -1
  222. package/dist/reducers/localeFactory.js +1 -1
  223. package/dist/reducers/metadata.js +6 -6
  224. package/dist/reducers/modules.js +1 -1
  225. package/dist/reducers/navigation.js +1 -1
  226. package/dist/reducers/request.js +1 -1
  227. package/dist/reducers/requestStates.js +1 -1
  228. package/dist/reducers/scopeRouteState.js +1 -1
  229. package/dist/reducers/scopes.js +1 -1
  230. package/dist/reducers/scopesExtendedConfiguration.js +1 -1
  231. package/dist/reducers/settings.js +1 -1
  232. package/dist/reducers/tasks.js +1 -1
  233. package/dist/reducers/timezones.js +1 -1
  234. package/dist/reducers/toasts.js +1 -1
  235. package/dist/reducers/versionInfo.js +1 -1
  236. package/dist/reducers/view.js +1 -1
  237. package/dist/selectors/locale.js +1 -1
  238. package/dist/selectors/metadata.js +3 -3
  239. package/dist/selectors/modules.js +2 -2
  240. package/dist/selectors/navigation.js +1 -1
  241. package/dist/selectors/route.js +1 -1
  242. package/dist/selectors/scope.js +1 -1
  243. package/dist/selectors/tasks.js +1 -1
  244. package/dist/utils/buildUrl.js +19 -5
  245. package/dist/utils/flatten.js +6 -6
  246. package/dist/utils/index.js +1 -1
  247. package/dist/utils/inputHelper.js +71 -0
  248. package/dist/utils/logPass.js +1 -1
  249. package/dist/utils/memoize.js +1 -1
  250. package/dist/utils/modelValidationHelper.js +2 -2
  251. package/dist/utils/normalizeForSearch.js +4 -1
  252. package/dist/utils/propertyBagHelper.js +4 -4
  253. package/dist/utils/propertyHelper.js +6 -6
  254. package/dist/utils/propertyValidator.js +1 -1
  255. package/dist/utils/setTranslation.js +3 -3
  256. package/dist/utils/setTranslationWithFallback.js +3 -3
  257. package/dist/utils/stripKey.js +3 -3
  258. package/dist/utils/styledPropFuncs.js +1 -1
  259. package/dist/utils/testUtils.js +8 -5
  260. package/dist/utils/timezoneHelper.js +6 -6
  261. package/dist/utils/unwrapImmutable.js +1 -1
  262. package/dist/utils/urlHelper.js +3 -3
  263. package/dist/whyDidYouRerender.js +1 -1
  264. package/package.json +2 -2
  265. package/src/components/AppFrame/ConnectedToastList.test.js +3 -1
  266. package/src/components/DropMenu/DropMenu.test.js +2 -0
  267. package/src/components/Form/InputField.js +1 -1
  268. package/src/components/Form/InputField.test.js +1 -1
  269. package/src/components/MaterialUI/DataDisplay/Badge.js +1 -1
  270. package/src/components/MaterialUI/DataDisplay/PredefinedElements/StepperModal.js +33 -6
  271. package/src/components/MaterialUI/DataDisplay/PredefinedElements/StepperModal.test.js +202 -0
  272. package/src/components/MaterialUI/DataDisplay/SelectionList.js +6 -20
  273. package/src/components/MaterialUI/DataDisplay/SelectionList.test.js +0 -6
  274. package/src/components/MaterialUI/DataDisplay/tableHelpers.js +14 -4
  275. package/src/components/MaterialUI/Feedback/loadingScreen.test.js +1 -0
  276. package/src/components/MaterialUI/Feedback/useNotification.test.js +1 -0
  277. package/src/components/MaterialUI/Inputs/DatePicker.js +16 -4
  278. package/src/components/MaterialUI/Inputs/DatePicker.test.js +35 -1
  279. package/src/components/MaterialUI/Inputs/InputBase.js +2 -0
  280. package/src/components/MaterialUI/Inputs/InputBase.test.js +49 -0
  281. package/src/components/MaterialUI/Inputs/Radio.js +1 -1
  282. package/src/components/MaterialUI/Inputs/Radio.test.js +35 -1
  283. package/src/components/MaterialUI/Inputs/Select.js +13 -1
  284. package/src/components/MaterialUI/Inputs/Select.test.js +37 -0
  285. package/src/components/MaterialUI/Inputs/SelectProps.js +1 -0
  286. package/src/components/MaterialUI/Inputs/Switch.js +28 -6
  287. package/src/components/MaterialUI/Inputs/Switch.test.js +39 -0
  288. package/src/components/MaterialUI/Navigation/TabBar.js +55 -34
  289. package/src/components/MaterialUI/ScopeSelector/TreeItem.js +6 -2
  290. package/src/components/MaterialUI/ScopeSelector/TreeItem.test.js +39 -0
  291. package/src/components/MaterialUI/hocs/withDeferredPopper.js +1 -4
  292. package/src/components/MaterialUI/hocs/withDeferredPopper.test.js +2 -0
  293. package/src/components/Modal/Modal.test.js +3 -1
  294. package/src/components/Modal/Wrapper.test.js +3 -1
  295. package/src/components/Routing/SegmentPage.js +1 -1
  296. package/src/components/Scope/Scope.test.js +3 -1
  297. package/src/components/Sidepanel.test.js +3 -1
  298. package/src/components/ToastList.js +2 -2
  299. package/src/constants.js +5 -0
  300. package/src/hocs/withErrorBoundary.test.js +4 -3
  301. package/src/hooks/useEditState.test.js +2 -0
  302. package/src/hooks/useLabelMessage.test.js +2 -0
  303. package/src/utils/buildUrl.js +15 -0
  304. package/src/utils/buildUrl.test.js +27 -1
  305. package/src/utils/inputHelper.js +22 -0
  306. package/src/utils/inputHelper.test.js +47 -0
  307. package/src/utils/normalizeForSearch.js +2 -0
  308. package/src/utils/propertyBagHelper.js +6 -3
  309. package/src/utils/propertyHelper.js +6 -6
  310. package/src/utils/testUtils.js +25 -22
  311. package/src/utils/testUtils.test.js +4 -4
@@ -48,11 +48,11 @@ function getPropertyOrDefault(obj, property, defaultValue, ignoreCase, startWith
48
48
  return getPropertyOrDefaultFromMap(obj, property, defaultValue, ignoreCase, startWith);
49
49
  }
50
50
  if (ignoreCase === false && startWith === false) {
51
- return obj.hasOwnProperty(property) ? obj[property] : defaultValue;
51
+ return Object.prototype.hasOwnProperty.call(obj, property) ? obj[property] : defaultValue;
52
52
  }
53
53
  var compareFunction = startWith ? caseInsensitiveStartWithCompare : caseInsensitiveCompare;
54
54
  for (var prop in obj) {
55
- if (obj.hasOwnProperty(prop) && compareFunction(prop, property)) {
55
+ if (Object.prototype.hasOwnProperty.call(obj, prop) && compareFunction(prop, property)) {
56
56
  return obj[prop];
57
57
  }
58
58
  }
@@ -60,11 +60,11 @@ function getPropertyOrDefault(obj, property, defaultValue, ignoreCase, startWith
60
60
  }
61
61
  var isObjectContainsPropertyWithValue = exports.isObjectContainsPropertyWithValue = function isObjectContainsPropertyWithValue(obj, propertyName, value) {
62
62
  if (obj === null || obj === undefined) return false;
63
- if (obj.hasOwnProperty(propertyName) && obj[propertyName] === value) {
63
+ if (Object.prototype.hasOwnProperty.call(obj, propertyName) && obj[propertyName] === value) {
64
64
  return true;
65
65
  }
66
66
  for (var prop in obj) {
67
- if (obj.hasOwnProperty(prop) && typeof obj[prop] === "object") {
67
+ if (Object.prototype.hasOwnProperty.call(obj, prop) && typeof obj[prop] === "object") {
68
68
  if (isObjectContainsPropertyWithValue(obj[prop], propertyName, value)) return true;
69
69
  }
70
70
  }
@@ -72,11 +72,11 @@ var isObjectContainsPropertyWithValue = exports.isObjectContainsPropertyWithValu
72
72
  };
73
73
  var isObjectContainsPropertyWithAnyValue = exports.isObjectContainsPropertyWithAnyValue = function isObjectContainsPropertyWithAnyValue(obj, propertyName) {
74
74
  if (!obj) return false;
75
- if (obj.hasOwnProperty(propertyName) && obj[propertyName]) {
75
+ if (Object.prototype.hasOwnProperty.call(obj, propertyName) && obj[propertyName]) {
76
76
  return true;
77
77
  }
78
78
  for (var prop in obj) {
79
- if (obj.hasOwnProperty(prop) && typeof obj[prop] === "object") {
79
+ if (Object.prototype.hasOwnProperty.call(obj, prop) && typeof obj[prop] === "object") {
80
80
  if (isObjectContainsPropertyWithAnyValue(obj[prop], propertyName)) return true;
81
81
  }
82
82
  }
@@ -3,7 +3,7 @@
3
3
  exports.__esModule = true;
4
4
  exports.isStringNullOrWhitespace = exports.isString = exports.isReactComponent = exports.isObject = void 0;
5
5
  var _react = _interopRequireDefault(require("react"));
6
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
6
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
7
7
  (function () {
8
8
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
9
9
  enterModule && enterModule(module);
@@ -11,9 +11,9 @@ var _flatten = require("./flatten");
11
11
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
12
12
  enterModule && enterModule(module);
13
13
  })();
14
- function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
15
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
16
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
14
+ function _createForOfIteratorHelperLoose(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: !0 } : { done: !1, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
15
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
16
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
17
17
  var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
18
18
  return a;
19
19
  };
@@ -11,9 +11,9 @@ var _flatten = require("./flatten");
11
11
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
12
12
  enterModule && enterModule(module);
13
13
  })();
14
- function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
15
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
16
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
14
+ function _createForOfIteratorHelperLoose(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: !0 } : { done: !1, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
15
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
16
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
17
17
  var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
18
18
  return a;
19
19
  };
@@ -10,9 +10,9 @@ exports.default = void 0;
10
10
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
11
11
  enterModule && enterModule(module);
12
12
  })();
13
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
14
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
15
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
13
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
14
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
15
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
16
16
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
17
17
  var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
18
18
  return a;
@@ -3,7 +3,7 @@
3
3
  exports.__esModule = true;
4
4
  exports.switchEnum = exports.ifFlag = exports.getThemeProp = void 0;
5
5
  var _safeGet = _interopRequireDefault(require("./safeGet"));
6
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
6
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
7
7
  (function () {
8
8
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
9
9
  enterModule && enterModule(module);
@@ -14,7 +14,7 @@ var _styles = require("@material-ui/core/styles");
14
14
  var _reactIntl = require("react-intl");
15
15
  var _reactRedux = require("react-redux");
16
16
  var _NotificationContext = require("./../components/MaterialUI/Feedback/NotificationContext");
17
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
18
18
  (function () {
19
19
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
20
20
  enterModule && enterModule(module);
@@ -23,12 +23,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
23
23
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
24
24
  enterModule && enterModule(module);
25
25
  })();
26
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
26
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
27
27
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
28
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
29
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
28
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
29
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
30
30
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
31
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
31
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
32
32
  var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
33
33
  return a;
34
34
  };
@@ -43,6 +43,7 @@ var spyOnConsole = exports.spyOnConsole = function spyOnConsole(spyNames) {
43
43
  spyNames = ["log", "warn", "error"];
44
44
  }
45
45
  var spiedFuncs;
46
+ // eslint-disable-next-line no-undef
46
47
  beforeEach(function () {
47
48
  spiedFuncs = spyNames.map(function (funcName) {
48
49
  var func = sinon.spy().named("console." + funcName);
@@ -51,6 +52,7 @@ var spyOnConsole = exports.spyOnConsole = function spyOnConsole(spyNames) {
51
52
  return oldFunc;
52
53
  });
53
54
  });
55
+ // eslint-disable-next-line no-undef
54
56
  afterEach(function () {
55
57
  spiedFuncs.forEach(function (func, index) {
56
58
  var name = spyNames[index];
@@ -117,6 +119,7 @@ var PropStruct = exports.PropStruct = _react.default.forwardRef(function (props,
117
119
  );
118
120
  });
119
121
  var ignoreConsoleError = exports.ignoreConsoleError = function ignoreConsoleError(func) {
122
+ // eslint-disable-next-line no-undef
120
123
  jest.spyOn(console, "error");
121
124
  console.error.mockImplementation(function () {});
122
125
  func();
@@ -3,7 +3,7 @@
3
3
  exports.__esModule = true;
4
4
  exports.timeZonesList = exports.getTimeZoneName = exports.getTimeZoneByName = exports.getTimeZone = exports.convertTimeToOtherTimeZone = exports.convertTimeToLocalTimeZone = void 0;
5
5
  var _momentTimezone = _interopRequireDefault(require("moment-timezone"));
6
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
6
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
7
7
  (function () {
8
8
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
9
9
  enterModule && enterModule(module);
@@ -12,13 +12,13 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
12
12
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
13
13
  enterModule && enterModule(module);
14
14
  })();
15
- function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
16
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
15
+ function _createForOfIteratorHelperLoose(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: !0 } : { done: !1, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
16
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
17
17
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
18
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
19
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
18
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
19
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
20
20
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
21
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
21
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
22
22
  var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
23
23
  return a;
24
24
  };
@@ -3,7 +3,7 @@
3
3
  exports.__esModule = true;
4
4
  exports.unwrapImmutable = exports.default = void 0;
5
5
  var _immutable = _interopRequireDefault(require("immutable4"));
6
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
6
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
7
7
  (function () {
8
8
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
9
9
  enterModule && enterModule(module);
@@ -10,9 +10,9 @@ exports.tryGetNewEntityIdKey = exports.resolveEntityId = exports.getValueFromUrl
10
10
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
11
11
  enterModule && enterModule(module);
12
12
  })();
13
- function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
14
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
15
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
13
+ function _createForOfIteratorHelperLoose(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: !0 } : { done: !1, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
14
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
15
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
16
16
  var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
17
17
  return a;
18
18
  };
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  var _react = _interopRequireDefault(require("react"));
4
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
4
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
5
5
  var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
6
6
  return a;
7
7
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orc-shared",
3
- "version": "5.8.0-dev.7",
3
+ "version": "5.8.0",
4
4
  "description": "Shared code for Orckestra applications",
5
5
  "main": "./src/index.js",
6
6
  "exports": {
@@ -55,7 +55,7 @@
55
55
  "@testing-library/react": "^10.4.9"
56
56
  },
57
57
  "dependencies": {
58
- "orc-scripts": "^2.0.0",
58
+ "orc-scripts": "^4.0.1",
59
59
  "react-number-format": "^5.3.0"
60
60
  },
61
61
  "sideEffects": false,
@@ -169,7 +169,9 @@ describe("ConnectedToastList", () => {
169
169
  try {
170
170
  ReactDOM.unmountComponentAtNode(appRoot);
171
171
  ReactDOM.unmountComponentAtNode(document.getElementById("toast"));
172
- } catch (_) {}
172
+ } catch {
173
+ // don't do anything
174
+ }
173
175
  document.body.removeChild(appRoot);
174
176
  });
175
177
  });
@@ -93,6 +93,7 @@ describe("DropMenu", () => {
93
93
  const clock = sinon.useFakeTimers();
94
94
  const menuNode = document.createElement("div");
95
95
  document.body.appendChild(menuNode);
96
+ // eslint-disable-next-line react/no-render-return-value
96
97
  const menu = ReactDOM.render(
97
98
  <div>
98
99
  <div id="outside" />
@@ -212,6 +213,7 @@ describe("DropMenu", () => {
212
213
  const clock = sinon.useFakeTimers();
213
214
  const menuNode = document.createElement("div");
214
215
  document.body.appendChild(menuNode);
216
+ // eslint-disable-next-line react/no-render-return-value
215
217
  const menu = ReactDOM.render(
216
218
  <div>
217
219
  <div id="outside" />
@@ -19,7 +19,7 @@ export const InputField = ({ name, type = "undefined", label, labelOnly, placeho
19
19
  const Input = inputs[type];
20
20
  if (!Input) {
21
21
  console.error(`Unknown type "${type}", cannot render field`);
22
- return <p>Cannot render unknown type "{type}"</p>;
22
+ return <p>Cannot render unknown type &amp;{type}&amp;</p>;
23
23
  }
24
24
  return (
25
25
  <Field
@@ -93,7 +93,7 @@ describe("InputField", () => {
93
93
  </SubjectWrapper>,
94
94
  "when mounted",
95
95
  "to satisfy",
96
- <p>Cannot render unknown type "{"undefined"}"</p>,
96
+ <p>Cannot render unknown type &amp;{"undefined"}&amp;</p>,
97
97
  ).then(() =>
98
98
  expect(console.error, "to have calls satisfying", [{ args: ['Unknown type "undefined", cannot render field'] }]),
99
99
  ));
@@ -13,7 +13,7 @@ const useStyles = makeStyles(theme => ({
13
13
 
14
14
  const Badge = ({ children, badge, ...props }) => {
15
15
  const classes = useStyles();
16
- const classProp = !!props.classProp?.badge ? props.classProp : classes;
16
+ const classProp = props.classProp?.badge ? props.classProp : classes;
17
17
 
18
18
  return (
19
19
  <BadgeMui overlap="circular" color="primary" max={999} badgeContent={badge} classes={classProp}>
@@ -142,7 +142,12 @@ const StepperModal = ({
142
142
  modalProps.set(ModalProps.propNames.backdropClickCallback, backdropCallback ?? closeCallback);
143
143
  modalProps.set(ModalProps.propNames.type, type);
144
144
 
145
- const nextClick = useCallback(() => changeCurrentStep(step => step + 1), []);
145
+ const nextClick = useCallback(customHandler => {
146
+ if (customHandler) {
147
+ customHandler();
148
+ }
149
+ changeCurrentStep(step => step + 1);
150
+ }, []);
146
151
  const backClick = useCallback(() => changeCurrentStep(step => step - 1), []);
147
152
 
148
153
  const actionPanel = (
@@ -159,11 +164,33 @@ const StepperModal = ({
159
164
  <Button variant="outlined" onClick={closeCallback}>
160
165
  <FormattedMessage {...sharedMessages.cancel} />
161
166
  </Button>
162
- {currentStep < steps.length - 1 && (
163
- <Button variant="contained" color="primary" disabled={nextDisabled} onClick={nextClick} disableElevation>
164
- <FormattedMessage {...sharedMessages.next} />
165
- </Button>
166
- )}
167
+
168
+ {currentStep < steps.length - 1 &&
169
+ (steps[currentStep]?.actions?.length > 0 ? (
170
+ steps[currentStep].actions.map(action => (
171
+ <Button
172
+ key={action.value}
173
+ variant="contained"
174
+ color="primary"
175
+ disabled={nextDisabled}
176
+ onClick={() => nextClick(action.handler)}
177
+ disableElevation
178
+ >
179
+ {action.label}
180
+ </Button>
181
+ ))
182
+ ) : (
183
+ <Button
184
+ variant="contained"
185
+ color="primary"
186
+ disabled={nextDisabled}
187
+ onClick={() => nextClick()}
188
+ disableElevation
189
+ >
190
+ <FormattedMessage {...sharedMessages.next} />
191
+ </Button>
192
+ ))}
193
+
167
194
  {currentStep === steps.length - 1 && (
168
195
  <Button
169
196
  variant="contained"
@@ -133,6 +133,208 @@ describe("StepperModal", () => {
133
133
  expect(component, "when mounted", "to satisfy", expected);
134
134
  });
135
135
 
136
+ it("Renders StepperModal correctly with custom actions", () => {
137
+ const open = true;
138
+ const title = "title";
139
+ const backdropClickCallback = jest.fn();
140
+ const okCallback = jest.fn();
141
+ const cancelCallback = jest.fn();
142
+ const modalProps = new ModalProps();
143
+ const actions = [
144
+ {
145
+ value: "first value",
146
+ label: "first action",
147
+ Handler: () => {},
148
+ },
149
+ {
150
+ value: "second value",
151
+ label: "second action",
152
+ Handler: () => {},
153
+ },
154
+ ];
155
+ const steps = [{ title: "step1", content: <div>content</div>, actions }, { title: "step2" }];
156
+
157
+ const titleComponent = (
158
+ <div>
159
+ <div>{title}</div>
160
+ <div>step1</div>
161
+ <div>step2</div>
162
+ </div>
163
+ );
164
+ const messageComponent = <div>{steps[0].content}</div>;
165
+
166
+ modalProps.set(ModalProps.propNames.title, titleComponent);
167
+ modalProps.set(ModalProps.propNames.open, open);
168
+ modalProps.set(ModalProps.propNames.backdropClickCallback, backdropClickCallback);
169
+ modalProps.set(ModalProps.propNames.type, "wide");
170
+
171
+ const actionPanel = (
172
+ <div>
173
+ <div></div>
174
+ <div>
175
+ <Button variant="outlined" disabled={false} onClick={() => cancelCallback()}>
176
+ {sharedMessages.cancel.defaultMessage}
177
+ </Button>
178
+ <Button variant="contained" color="primary" disabled={false} onClick={() => {}} disableElevation>
179
+ first action
180
+ </Button>
181
+ <Button variant="contained" color="primary" disabled={false} onClick={() => {}} disableElevation>
182
+ second action
183
+ </Button>
184
+ </div>
185
+ </div>
186
+ );
187
+
188
+ modalProps.set(ModalProps.propNames.actionPanel, actionPanel);
189
+
190
+ const component = (
191
+ <IntlProvider locale="en-US" messages={messages}>
192
+ <StepperModal
193
+ steps={steps}
194
+ title={title}
195
+ open={open}
196
+ confirmCallback={okCallback}
197
+ closeCallback={cancelCallback}
198
+ />
199
+ </IntlProvider>
200
+ );
201
+
202
+ const expected = (
203
+ <IntlProvider locale="en-US" messages={messages}>
204
+ <Modal message={messageComponent} modalProps={modalProps} />
205
+ </IntlProvider>
206
+ );
207
+
208
+ expect(component, "when mounted", "to satisfy", expected);
209
+ });
210
+
211
+ it("Renders StepperModal correctly with disabled custom actions", () => {
212
+ const open = true;
213
+ const title = "title";
214
+ const backdropClickCallback = jest.fn();
215
+ const okCallback = jest.fn();
216
+ const cancelCallback = jest.fn();
217
+ const modalProps = new ModalProps();
218
+ const actions = [
219
+ {
220
+ value: "first value",
221
+ label: "first action",
222
+ Handler: () => {},
223
+ },
224
+ {
225
+ value: "second value",
226
+ label: "second action",
227
+ Handler: () => {},
228
+ },
229
+ ];
230
+ const steps = [
231
+ { title: "step1", nextDisabled: () => true, content: <div>content</div>, actions },
232
+ { title: "step2" },
233
+ ];
234
+
235
+ const titleComponent = (
236
+ <div>
237
+ <div>{title}</div>
238
+ <div>step1</div>
239
+ <div>step2</div>
240
+ </div>
241
+ );
242
+ const messageComponent = <div>{steps[0].content}</div>;
243
+
244
+ modalProps.set(ModalProps.propNames.title, titleComponent);
245
+ modalProps.set(ModalProps.propNames.open, open);
246
+ modalProps.set(ModalProps.propNames.backdropClickCallback, backdropClickCallback);
247
+ modalProps.set(ModalProps.propNames.type, "wide");
248
+
249
+ const actionPanel = (
250
+ <div>
251
+ <div></div>
252
+ <div>
253
+ <Button variant="outlined" disabled={false} onClick={() => cancelCallback()}>
254
+ {sharedMessages.cancel.defaultMessage}
255
+ </Button>
256
+ <Button variant="contained" color="primary" disabled={true} onClick={() => {}} disableElevation>
257
+ first action
258
+ </Button>
259
+ <Button variant="contained" color="primary" disabled={true} onClick={() => {}} disableElevation>
260
+ second action
261
+ </Button>
262
+ </div>
263
+ </div>
264
+ );
265
+
266
+ modalProps.set(ModalProps.propNames.actionPanel, actionPanel);
267
+
268
+ const component = (
269
+ <IntlProvider locale="en-US" messages={messages}>
270
+ <StepperModal
271
+ steps={steps}
272
+ title={title}
273
+ open={open}
274
+ confirmCallback={okCallback}
275
+ closeCallback={cancelCallback}
276
+ />
277
+ </IntlProvider>
278
+ );
279
+
280
+ const expected = (
281
+ <IntlProvider locale="en-US" messages={messages}>
282
+ <Modal message={messageComponent} modalProps={modalProps} />
283
+ </IntlProvider>
284
+ );
285
+
286
+ expect(component, "when mounted", "to satisfy", expected);
287
+ });
288
+
289
+ it("Renders StepperModal correctly when custom action is clicked", () => {
290
+ const open = true;
291
+ const actions = [
292
+ {
293
+ value: "first value",
294
+ label: "first action",
295
+ handler: jest.fn(),
296
+ },
297
+ {
298
+ value: "second value",
299
+ label: "second action",
300
+ handler: jest.fn(),
301
+ },
302
+ ];
303
+
304
+ const okCallback = sinon.spy();
305
+ const cancelCallback = sinon.spy();
306
+ const steps = [
307
+ { title: "step1", content: "content", actions },
308
+ { title: "step2", content: "content2" },
309
+ ];
310
+
311
+ const component = (
312
+ <IntlProvider locale="en-US" messages={messages}>
313
+ <StepperModal open={open} steps={steps} closeCallback={cancelCallback} confirmCallback={okCallback} />
314
+ </IntlProvider>
315
+ );
316
+
317
+ const mountedComponent = mount(component);
318
+
319
+ const firstAction = mountedComponent.find(Button).at(1);
320
+ firstAction.invoke("onClick")();
321
+
322
+ expect(mountedComponent.containsMatchingElement(steps[1].content), "to be truthy");
323
+
324
+ const back = mountedComponent.find(Button).at(0);
325
+ back.invoke("onClick")();
326
+
327
+ expect(mountedComponent.containsMatchingElement(steps[0].content), "to be truthy");
328
+
329
+ const secondAction = mountedComponent.find(Button).at(2);
330
+ secondAction.invoke("onClick")();
331
+
332
+ const okButton = mountedComponent.find(Button).at(2);
333
+ okButton.invoke("onClick")();
334
+
335
+ expect(okCallback, "was called");
336
+ });
337
+
136
338
  it("Render closed modal", () => {
137
339
  const open = false;
138
340