orc-shared 1.7.0-dev.8 → 5.2.0-dev.1

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 (175) hide show
  1. package/dist/actions/modules.js +15 -1
  2. package/dist/actions/navigation.js +1 -14
  3. package/dist/actions/scopes.js +2 -3
  4. package/dist/buildStore.js +1 -7
  5. package/dist/components/AppFrame/Sidebar.js +8 -4
  6. package/dist/components/MaterialUI/DataDisplay/Notification.js +0 -6
  7. package/dist/components/MaterialUI/DataDisplay/PredefinedElements/InformationItem.js +6 -18
  8. package/dist/components/MaterialUI/DataDisplay/PredefinedElements/StepperModal.js +1 -2
  9. package/dist/components/MaterialUI/DataDisplay/TooltippedElements/MultipleLinesText.js +2 -4
  10. package/dist/components/MaterialUI/DataDisplay/tableHelpers.js +7 -7
  11. package/dist/components/MaterialUI/Inputs/Autocomplete.js +0 -5
  12. package/dist/components/MaterialUI/Inputs/DatePicker.js +8 -15
  13. package/dist/components/MaterialUI/Inputs/InputBase.js +16 -102
  14. package/dist/components/MaterialUI/Inputs/InputBaseProps.js +1 -7
  15. package/dist/components/MaterialUI/Inputs/PredefinedElements/SearchControl.js +46 -43
  16. package/dist/components/MaterialUI/Inputs/TimePicker.js +2 -5
  17. package/dist/components/MaterialUI/Navigation/DropDownMenu.js +1 -6
  18. package/dist/components/MaterialUI/Surfaces/SectionExpansionPanel.js +0 -1
  19. package/dist/components/MaterialUI/hocs/withDeferredTooltip.js +1 -3
  20. package/dist/components/Routing/Page.js +1 -4
  21. package/dist/components/Routing/SegmentPage.js +1 -4
  22. package/dist/components/Routing/SubPage.js +8 -38
  23. package/dist/components/Scope/useScopeConfirmationModalState.js +3 -1
  24. package/dist/constants.js +2 -18
  25. package/dist/content/icons/hide.svg +1 -10
  26. package/dist/content/icons/open-in-new-tab.svg +1 -3
  27. package/dist/content/iconsSheet.svg +650 -117
  28. package/dist/content/orckestra-logo-white.png +0 -0
  29. package/dist/hooks/useEditState.js +2 -4
  30. package/dist/reducers/modules.js +3 -4
  31. package/dist/reducers/navigation.js +0 -16
  32. package/dist/reducers/request.js +1 -6
  33. package/dist/reducers/scopes.js +0 -3
  34. package/dist/reducers/view.js +1 -1
  35. package/dist/selectors/authentication.js +1 -15
  36. package/dist/selectors/metadata.js +1 -1
  37. package/dist/sharedMessages.js +1 -17
  38. package/dist/utils/propertyHelper.js +0 -33
  39. package/dist/utils/timezoneHelper.js +1 -23
  40. package/package.json +7 -10
  41. package/src/actions/modules.js +10 -0
  42. package/src/actions/modules.test.js +14 -0
  43. package/src/actions/navigation.js +0 -7
  44. package/src/actions/navigation.test.js +0 -12
  45. package/src/actions/scopes.js +1 -2
  46. package/src/actions/scopes.test.js +1 -2
  47. package/src/buildStore.js +0 -6
  48. package/src/components/AppFrame/About.test.js +3 -3
  49. package/src/components/AppFrame/Sidebar.js +3 -4
  50. package/src/components/Form/InputField.test.js +0 -18
  51. package/src/components/Form/Inputs/Date.test.js +0 -18
  52. package/src/components/MaterialUI/DataDisplay/Notification.js +0 -6
  53. package/src/components/MaterialUI/DataDisplay/Notification.test.js +0 -37
  54. package/src/components/MaterialUI/DataDisplay/PredefinedElements/InformationItem.js +5 -23
  55. package/src/components/MaterialUI/DataDisplay/PredefinedElements/InformationItem.test.js +0 -121
  56. package/src/components/MaterialUI/DataDisplay/PredefinedElements/StepperModal.js +1 -2
  57. package/src/components/MaterialUI/DataDisplay/PredefinedElements/StepperModal.test.js +0 -20
  58. package/src/components/MaterialUI/DataDisplay/TooltippedElements/MultipleLinesText.js +1 -2
  59. package/src/components/MaterialUI/DataDisplay/tableHelpers.js +8 -8
  60. package/src/components/MaterialUI/DataDisplay/tableHelpers.test.js +0 -93
  61. package/src/components/MaterialUI/Inputs/Autocomplete.js +0 -5
  62. package/src/components/MaterialUI/Inputs/Autocomplete.test.js +0 -15
  63. package/src/components/MaterialUI/Inputs/DatePicker.js +3 -17
  64. package/src/components/MaterialUI/Inputs/DatePicker.test.js +1 -143
  65. package/src/components/MaterialUI/Inputs/InputBase.js +15 -103
  66. package/src/components/MaterialUI/Inputs/InputBase.test.js +1 -376
  67. package/src/components/MaterialUI/Inputs/InputBaseProps.js +0 -6
  68. package/src/components/MaterialUI/Inputs/InputBaseProps.test.js +0 -6
  69. package/src/components/MaterialUI/Inputs/PredefinedElements/SearchControl.js +27 -39
  70. package/src/components/MaterialUI/Inputs/PredefinedElements/SearchControl.test.js +34 -39
  71. package/src/components/MaterialUI/Inputs/TimePicker.js +1 -5
  72. package/src/components/MaterialUI/Navigation/DropDownMenu.js +1 -6
  73. package/src/components/MaterialUI/Surfaces/SectionExpansionPanel.js +0 -1
  74. package/src/components/MaterialUI/hocs/withDeferredTooltip.js +1 -2
  75. package/src/components/MaterialUI/hocs/withDeferredTooltip.test.js +0 -52
  76. package/src/components/Routing/Page.js +1 -12
  77. package/src/components/Routing/SegmentPage.js +1 -12
  78. package/src/components/Routing/SubPage.js +9 -41
  79. package/src/components/Routing/SubPage.test.js +1 -295
  80. package/src/components/Scope/useScopeConfirmationModalState.js +3 -1
  81. package/src/components/Scope/useScopeConfirmationModalState.test.js +35 -4
  82. package/src/components/Text.test.js +59 -44
  83. package/src/constants.js +0 -15
  84. package/src/content/icons/hide.svg +1 -10
  85. package/src/content/icons/open-in-new-tab.svg +1 -3
  86. package/src/content/iconsSheet.svg +650 -117
  87. package/src/content/orckestra-logo-white.png +0 -0
  88. package/src/hooks/useEditState.js +2 -12
  89. package/src/hooks/useEditState.test.js +1 -1
  90. package/src/hooks/useLabelMessage.test.js +10 -16
  91. package/src/reducers/modules.js +4 -4
  92. package/src/reducers/modules.test.js +5 -5
  93. package/src/reducers/navigation.js +0 -24
  94. package/src/reducers/navigation.test.js +0 -38
  95. package/src/reducers/request.js +1 -6
  96. package/src/reducers/request.test.js +0 -34
  97. package/src/reducers/scopes.js +0 -3
  98. package/src/reducers/scopes.test.js +0 -47
  99. package/src/reducers/view.js +1 -1
  100. package/src/reducers/view.test.js +8 -1
  101. package/src/selectors/authentication.js +0 -13
  102. package/src/selectors/authentication.test.js +0 -322
  103. package/src/selectors/metadata.js +1 -1
  104. package/src/selectors/metadata.test.js +0 -12
  105. package/src/sharedMessages.js +1 -17
  106. package/src/translations/en-US.json +12 -16
  107. package/src/translations/fr-CA.json +12 -16
  108. package/src/utils/propertyHelper.js +0 -38
  109. package/src/utils/propertyHelper.test.js +0 -160
  110. package/src/utils/timezoneHelper.js +0 -18
  111. package/src/utils/timezoneHelper.test.js +1 -23
  112. package/dist/actions/globalErrorMessages.js +0 -63
  113. package/dist/actions/tasks.js +0 -170
  114. package/dist/components/MaterialUI/DataDisplay/PredefinedElements/GlobalErrorMessages.js +0 -160
  115. package/dist/components/MaterialUI/DataDisplay/PredefinedElements/LookupDisplayValue.js +0 -88
  116. package/dist/components/TaskDetailsModal.js +0 -191
  117. package/dist/content/icons/anonymize.svg +0 -3
  118. package/dist/content/icons/archives.svg +0 -3
  119. package/dist/content/icons/clean-index.svg +0 -3
  120. package/dist/content/icons/date-index.svg +0 -3
  121. package/dist/content/icons/inventory.svg +0 -4
  122. package/dist/content/icons/query-tester.svg +0 -10
  123. package/dist/content/icons/reciprocity.svg +0 -10
  124. package/dist/content/icons/schema.svg +0 -11
  125. package/dist/content/icons/synonyms.svg +0 -3
  126. package/dist/content/icons/tenant.svg +0 -3
  127. package/dist/content/icons/time-index.svg +0 -3
  128. package/dist/hooks/useDispatchWithErrorHandling.js +0 -103
  129. package/dist/hooks/useScopeGuardLoader.js +0 -77
  130. package/dist/reducers/globalErrorMessages.js +0 -78
  131. package/dist/reducers/scopeRouteState.js +0 -83
  132. package/dist/reducers/tasks.js +0 -98
  133. package/dist/selectors/globalErrorMessages.js +0 -57
  134. package/dist/selectors/scopeRouteState.js +0 -53
  135. package/dist/selectors/tasks.js +0 -64
  136. package/dist/utils/responseProcessingHelper.js +0 -86
  137. package/src/actions/globalErrorMessages.js +0 -12
  138. package/src/actions/globalErrorMessages.test.js +0 -21
  139. package/src/actions/tasks.js +0 -77
  140. package/src/actions/tasks.test.js +0 -169
  141. package/src/components/MaterialUI/DataDisplay/PredefinedElements/GlobalErrorMessages.js +0 -108
  142. package/src/components/MaterialUI/DataDisplay/PredefinedElements/GlobalErrorMessages.test.js +0 -468
  143. package/src/components/MaterialUI/DataDisplay/PredefinedElements/LookupDisplayValue.js +0 -29
  144. package/src/components/MaterialUI/DataDisplay/PredefinedElements/LookupDisplayValue.test.js +0 -147
  145. package/src/components/TaskDetailsModal.js +0 -132
  146. package/src/components/TaskDetailsModal.test.js +0 -317
  147. package/src/content/icons/anonymize.svg +0 -3
  148. package/src/content/icons/archives.svg +0 -3
  149. package/src/content/icons/clean-index.svg +0 -3
  150. package/src/content/icons/date-index.svg +0 -3
  151. package/src/content/icons/inventory.svg +0 -4
  152. package/src/content/icons/query-tester.svg +0 -10
  153. package/src/content/icons/reciprocity.svg +0 -10
  154. package/src/content/icons/schema.svg +0 -11
  155. package/src/content/icons/synonyms.svg +0 -3
  156. package/src/content/icons/tenant.svg +0 -3
  157. package/src/content/icons/time-index.svg +0 -3
  158. package/src/hooks/useDispatchWithErrorHandling.js +0 -57
  159. package/src/hooks/useDispatchWithErrorHandling.test.js +0 -230
  160. package/src/hooks/useScopeGuardLoader.js +0 -25
  161. package/src/hooks/useScopeGuardLoader.test.js +0 -187
  162. package/src/reducers/globalErrorMessages.js +0 -25
  163. package/src/reducers/globalErrorMessages.test.js +0 -66
  164. package/src/reducers/scopeRouteState.js +0 -29
  165. package/src/reducers/scopeRouteState.test.js +0 -49
  166. package/src/reducers/tasks.js +0 -56
  167. package/src/reducers/tasks.test.js +0 -404
  168. package/src/selectors/globalErrorMessages.js +0 -11
  169. package/src/selectors/globalErrorMessages.test.js +0 -25
  170. package/src/selectors/scopeRouteState.js +0 -5
  171. package/src/selectors/scopeRouteState.test.js +0 -13
  172. package/src/selectors/tasks.js +0 -16
  173. package/src/selectors/tasks.test.js +0 -60
  174. package/src/utils/responseProcessingHelper.js +0 -42
  175. package/src/utils/responseProcessingHelper.test.js +0 -218
@@ -112,43 +112,6 @@ describe("Notification Component", () => {
112
112
  );
113
113
  });
114
114
 
115
- it("Renders Info Notification component without errors", () => {
116
- const mockedMessage = {
117
- key: new Date().getTime(),
118
- message: "This is confirmation notification message",
119
- type: "info",
120
- };
121
- let snackPack = [mockedMessage];
122
- const autoHideDuration = 5000;
123
- const anchorOrigin = { vertical: "top", horizontal: "right" };
124
- const lastOnly = false;
125
-
126
- const notificationProps = new NotificationProps();
127
-
128
- notificationProps.set(NotificationProps.propNames.autoHideDuration, autoHideDuration);
129
- notificationProps.set(NotificationProps.propNames.anchorOrigin, anchorOrigin);
130
- notificationProps.set(NotificationProps.propNames.lastOnly, lastOnly);
131
-
132
- expect(
133
- <TestWrapper provider={{ store }} stylesProvider muiThemeProvider={{ theme }}>
134
- <Notification notificationProps={notificationProps} snackPack={snackPack} setSnackPack={setSnackPack} />
135
- </TestWrapper>,
136
- "when mounted",
137
- "to satisfy",
138
- <TestWrapper stylesProvider muiThemeProvider={{ theme }}>
139
- <div>
140
- <div>
141
- <Icon id="info" />
142
- <div>{mockedMessage.message}</div>
143
- <IconButton aria-label="close">
144
- <Icon id="close2" />
145
- </IconButton>
146
- </div>
147
- </div>
148
- </TestWrapper>,
149
- );
150
- });
151
-
152
115
  it("Renders Notification component without errors", () => {
153
116
  const mockedMessage = { key: new Date().getTime(), message: "This is confirmation notification message" };
154
117
  let snackPack = [mockedMessage];
@@ -7,7 +7,6 @@ import TextProps from "../../textProps";
7
7
  import { isReactComponent } from "../../../../utils/propertyValidator";
8
8
  import sharedMessages from "../../../../sharedMessages";
9
9
  import { useIntl } from "react-intl";
10
- import classNames from "classnames";
11
10
 
12
11
  const useStyles = makeStyles(theme => ({
13
12
  title: {
@@ -54,14 +53,7 @@ const useStyles = makeStyles(theme => ({
54
53
  },
55
54
  }));
56
55
 
57
- const InformationItemChildren = ({
58
- classes,
59
- children,
60
- showNotAvailable,
61
- isMaxLineCountEnabled = true,
62
- tooltipClasses,
63
- valueClasses,
64
- }) => {
56
+ const InformationItemChildren = ({ classes, children, showNotAvailable }) => {
65
57
  const { formatMessage } = useIntl();
66
58
 
67
59
  if (isReactComponent(children)) {
@@ -69,12 +61,12 @@ const InformationItemChildren = ({
69
61
  }
70
62
 
71
63
  const multipleLinesTextProps = new TextProps();
72
- if (isMaxLineCountEnabled) multipleLinesTextProps.set(TextProps.propNames.lineCount, 2);
73
- multipleLinesTextProps.set(TextProps.propNames.classes, classNames(classes.value, valueClasses));
64
+ multipleLinesTextProps.set(TextProps.propNames.lineCount, 2);
65
+ multipleLinesTextProps.set(TextProps.propNames.classes, classes.value);
74
66
 
75
67
  const value = children ?? (showNotAvailable ? formatMessage(sharedMessages.notAvailable) : "");
76
68
 
77
- return <MultipleLinesText textProps={multipleLinesTextProps} children={value} tooltipClasses={tooltipClasses} />;
69
+ return <MultipleLinesText textProps={multipleLinesTextProps} children={value} />;
78
70
  };
79
71
 
80
72
  const InformationItemHeader = ({ classes, label, headerIcon }) => {
@@ -101,23 +93,13 @@ const InformationItem = ({
101
93
  headerIcon = undefined,
102
94
  showNotAvailable = false,
103
95
  marginTop = 0,
104
- isMaxLineCountEnabled,
105
- tooltipClasses,
106
- valueClasses,
107
96
  }) => {
108
97
  const classes = useStyles({ required, error, marginTop });
109
98
 
110
99
  return (
111
100
  <div className={classes.container}>
112
101
  <InformationItemHeader classes={classes} label={label} headerIcon={headerIcon} />
113
- <InformationItemChildren
114
- classes={classes}
115
- children={children}
116
- showNotAvailable={showNotAvailable}
117
- isMaxLineCountEnabled={isMaxLineCountEnabled}
118
- tooltipClasses={tooltipClasses}
119
- valueClasses={valueClasses}
120
- />
102
+ <InformationItemChildren classes={classes} children={children} showNotAvailable={showNotAvailable} />
121
103
  </div>
122
104
  );
123
105
  };
@@ -7,7 +7,6 @@ import MultipleLinesText from "../TooltippedElements/MultipleLinesText";
7
7
  import { stringifyWithoutQuotes } from "./../../../../utils/parseHelper";
8
8
  import sharedMessages from "./../../../../sharedMessages";
9
9
  import { extractMessages } from "./../../../../utils/testUtils";
10
- import TextProps from "../../textProps";
11
10
 
12
11
  const messages = extractMessages(sharedMessages);
13
12
 
@@ -52,126 +51,6 @@ describe("Information Item", () => {
52
51
  expect(component, "when mounted", "to satisfy", expected);
53
52
  });
54
53
 
55
- it("Renders Information Item with max line count", () => {
56
- const label = "label";
57
- const value = "value";
58
-
59
- const multipleLinesTextProps = new TextProps();
60
- multipleLinesTextProps.set(TextProps.propNames.lineCount, 2);
61
-
62
- const component = (
63
- <IntlProvider locale="en-US">
64
- <InformationItem label={label} isMaxLineCountEnabled={true}>
65
- {value}
66
- </InformationItem>
67
- </IntlProvider>
68
- );
69
-
70
- const expected = (
71
- <div>
72
- <Typography children={label} />
73
- <MultipleLinesText textProps={multipleLinesTextProps}>{value}</MultipleLinesText>
74
- </div>
75
- );
76
-
77
- expect(component, "when mounted", "to satisfy", expected);
78
- });
79
-
80
- it("Renders Information Item without max line count", () => {
81
- const label = "label";
82
- const value = "value";
83
-
84
- const multipleLinesTextProps = new TextProps();
85
- multipleLinesTextProps.set(TextProps.propNames.lineCount, 2);
86
-
87
- const component = (
88
- <IntlProvider locale="en-US">
89
- <InformationItem label={label}>{value}</InformationItem>
90
- </IntlProvider>
91
- );
92
-
93
- const expected = (
94
- <div>
95
- <Typography children={label} />
96
- <MultipleLinesText textProps={multipleLinesTextProps}>{value}</MultipleLinesText>
97
- </div>
98
- );
99
-
100
- expect(component, "when mounted", "to satisfy", expected);
101
- });
102
-
103
- it("Renders Information Item with max line count false", () => {
104
- const label = "label";
105
- const value = "value";
106
-
107
- const component = (
108
- <IntlProvider locale="en-US">
109
- <InformationItem label={label} isMaxLineCountEnabled={false}>
110
- {value}
111
- </InformationItem>
112
- </IntlProvider>
113
- );
114
-
115
- const expected = (
116
- <div>
117
- <Typography children={label} />
118
- <MultipleLinesText>{value}</MultipleLinesText>
119
- </div>
120
- );
121
-
122
- expect(component, "when mounted", "to satisfy", expected);
123
- });
124
-
125
- it("Renders Information Item with null max line count", () => {
126
- const label = "label";
127
- const value = "value";
128
-
129
- const multipleLinesTextProps = new TextProps();
130
- multipleLinesTextProps.set(TextProps.propNames.lineCount, 2);
131
-
132
- const component = (
133
- <IntlProvider locale="en-US">
134
- <InformationItem label={label} isMaxLineCountEnabled={null}>
135
- {value}
136
- </InformationItem>
137
- </IntlProvider>
138
- );
139
-
140
- const expected = (
141
- <div>
142
- <Typography children={label} />
143
- <MultipleLinesText textProps={multipleLinesTextProps}>{value}</MultipleLinesText>
144
- </div>
145
- );
146
-
147
- expect(component, "when mounted", "to satisfy", expected);
148
- });
149
-
150
- it("Renders Information Item with undefined max line count", () => {
151
- const label = "label";
152
- const value = "value";
153
-
154
- const multipleLinesTextProps = new TextProps();
155
- multipleLinesTextProps.set(TextProps.propNames.lineCount, 2);
156
-
157
- const component = (
158
- <IntlProvider locale="en-US">
159
- <InformationItem label={label} isMaxLineCountEnabled={undefined}>
160
- {value}
161
- </InformationItem>
162
- </IntlProvider>
163
- );
164
-
165
- const expected = (
166
- <div>
167
- <Typography children={label} />
168
- <MultipleLinesText textProps={multipleLinesTextProps}>{value}</MultipleLinesText>
169
- </div>
170
- );
171
-
172
- expect(component, "when mounted", "to satisfy", expected);
173
- });
174
-
175
54
  it("Renders Information Item with null value and showNotAvailable property is true", () => {
176
55
  const label = "label";
177
56
  const value = null;
@@ -96,7 +96,6 @@ const StepperModal = ({
96
96
  open,
97
97
  closeCallback,
98
98
  confirmCallback,
99
- backdropCallback,
100
99
  confirmTitle,
101
100
  type = "wide",
102
101
  }) => {
@@ -139,7 +138,7 @@ const StepperModal = ({
139
138
 
140
139
  modalProps.set(ModalProps.propNames.title, titleComponent);
141
140
  modalProps.set(ModalProps.propNames.open, open);
142
- modalProps.set(ModalProps.propNames.backdropClickCallback, backdropCallback ?? closeCallback);
141
+ modalProps.set(ModalProps.propNames.backdropClickCallback, closeCallback);
143
142
  modalProps.set(ModalProps.propNames.type, type);
144
143
 
145
144
  const nextClick = useCallback(() => changeCurrentStep(step => step + 1), []);
@@ -3,7 +3,6 @@ import StepperModal from "./StepperModal";
3
3
  import Modal from "./../Modal";
4
4
  import ModalProps from "./../modalProps";
5
5
  import Button from "@material-ui/core/Button";
6
- import ModalMui from "@material-ui/core/Modal";
7
6
  import { mount } from "enzyme";
8
7
  import sinon from "sinon";
9
8
  import { IntlProvider } from "react-intl";
@@ -164,25 +163,6 @@ describe("StepperModal", () => {
164
163
  expect(cancelCallbackSpy, "was called");
165
164
  });
166
165
 
167
- it("Calls backdropCallback when clicking away from component", () => {
168
- const open = true;
169
- const backdropCallbackSpy = sinon.spy();
170
-
171
- const component = (
172
- <IntlProvider locale="en-US" messages={messages}>
173
- <StepperModal open={open} backdropCallback={backdropCallbackSpy} />
174
- </IntlProvider>
175
- );
176
-
177
- const mountedComponent = mount(component);
178
-
179
- const muiModal = mountedComponent.find(ModalMui);
180
-
181
- muiModal.invoke("onClose")({}, "backdropClick");
182
-
183
- expect(backdropCallbackSpy, "was called");
184
- });
185
-
186
166
  it("Calls cancelCallback when ok button is pressed", () => {
187
167
  const open = true;
188
168
  const okCallback = sinon.spy();
@@ -11,7 +11,7 @@ const useStyles = makeStyles(theme => ({
11
11
  },
12
12
  }));
13
13
 
14
- const MultipleLinesText = ({ children, titleValue, textProps, tooltipClasses }) => {
14
+ const MultipleLinesText = ({ children, titleValue, textProps }) => {
15
15
  const classes = useStyles();
16
16
 
17
17
  const [isClamped, setIsClamped] = useState(false);
@@ -48,7 +48,6 @@ const MultipleLinesText = ({ children, titleValue, textProps, tooltipClasses })
48
48
  titleValue={title}
49
49
  alwaysDisplay={isClamped}
50
50
  onClampStart={event => clampHandler(event)}
51
- tooltipClasses={tooltipClasses}
52
51
  />
53
52
  );
54
53
  };
@@ -18,10 +18,10 @@ const defaultRendering = (e, def, rowId, readOnly, transformedValue) => {
18
18
  ) : null;
19
19
  };
20
20
 
21
- const renderByType = (e, def, rowId, readOnly, transformedValue, index) => {
21
+ const renderByType = (e, def, rowId, readOnly, transformedValue) => {
22
22
  switch (def.type) {
23
23
  case "custom": {
24
- return [def.builder(e, readOnly, def, index) || defaultRendering(e, def, rowId, readOnly, transformedValue)];
24
+ return [def.builder(e, readOnly, def) || defaultRendering(e, def, rowId, readOnly, transformedValue)];
25
25
  }
26
26
 
27
27
  case "currency": {
@@ -130,11 +130,11 @@ const renderByType = (e, def, rowId, readOnly, transformedValue, index) => {
130
130
  }
131
131
  };
132
132
 
133
- const renderByTypeInEditingMode = (e, def, rowId, readOnly, transformedValue, index) => {
133
+ const renderByTypeInEditingMode = (e, def, rowId, readOnly, transformedValue) => {
134
134
  if ((def.editingBuilder || null) !== null)
135
- return [def.editingBuilder(e, readOnly, def, index) || defaultRendering(e, def, rowId, readOnly, transformedValue)];
135
+ return [def.editingBuilder(e, readOnly, def) || defaultRendering(e, def, rowId, readOnly, transformedValue)];
136
136
 
137
- return renderByType(e, def, rowId, readOnly, transformedValue, index);
137
+ return renderByType(e, def, rowId, readOnly, transformedValue);
138
138
  };
139
139
 
140
140
  export const buildHeaderAndRowFromConfig = (
@@ -155,7 +155,7 @@ export const buildHeaderAndRowFromConfig = (
155
155
  className: def.className,
156
156
  }));
157
157
 
158
- const rows = elements.map((e, index) => {
158
+ const rows = elements.map(e => {
159
159
  const rowId = e[keyField];
160
160
  const elementClass = e.customClass || "";
161
161
  return {
@@ -168,8 +168,8 @@ export const buildHeaderAndRowFromConfig = (
168
168
  const transformedValue = def.transform?.value ? def.transform.value(e[def.fieldName]) : e[def.fieldName];
169
169
 
170
170
  const [cellElement, title] = readOnly
171
- ? renderByType(e, def, rowId, readOnly, transformedValue, index)
172
- : renderByTypeInEditingMode(e, def, rowId, readOnly, transformedValue, index);
171
+ ? renderByType(e, def, rowId, readOnly, transformedValue)
172
+ : renderByTypeInEditingMode(e, def, rowId, readOnly, transformedValue);
173
173
 
174
174
  return {
175
175
  title: def.tooltipable !== false ? (title === undefined ? cellElement : title) : null,
@@ -358,59 +358,6 @@ describe("table helpers buildHeaderAndRowFromConfig", () => {
358
358
  expect(rows[1].columns[0].title, "to equal", "44 a value from builder");
359
359
  });
360
360
 
361
- it("validate builder inputs", () => {
362
- const elements = [
363
- {
364
- id: "an_id1",
365
- test: "A text row 1",
366
- another: "another 1",
367
- extraneous: "Don't show 1",
368
- },
369
- {
370
- id: "an_id2",
371
- test: "A text row 2",
372
- another: "another 2",
373
- extraneous: "Don't show 2",
374
- },
375
- ];
376
-
377
- let counter = 0;
378
-
379
- const builder = (e, readOnly, def, index) => {
380
- if (e.id === "an_id1") {
381
- expect(index, "to equal", 0);
382
- } else {
383
- expect(index, "to equal", 1);
384
- }
385
-
386
- expect(readOnly, "to be", false);
387
-
388
- counter++;
389
- };
390
-
391
- const columnDef = [
392
- {
393
- type: "custom",
394
- builder: builder,
395
- label: messages.a_label,
396
- },
397
- {
398
- type: "custom",
399
- builder: builder,
400
- label: messages.a_label,
401
- },
402
- {
403
- type: "custom",
404
- builder: builder,
405
- label: messages.a_label,
406
- },
407
- ];
408
-
409
- buildHeaderAndRowFromConfig(columnDef, elements, false);
410
-
411
- expect(counter, "to equal", 6);
412
- });
413
-
414
361
  it("build table rows as expected with a custom builder returning not valid component", () => {
415
362
  const columnDef = [
416
363
  {
@@ -1645,46 +1592,6 @@ describe("table helpers buildHeaderAndRowFromConfig", () => {
1645
1592
  expect(rows[1].columns[1].title, "to equal", "another 2 a value from builder");
1646
1593
  });
1647
1594
 
1648
- it("validate editingBuilder inputs", () => {
1649
- const elements = [
1650
- {
1651
- id: "an_id1",
1652
- test: "A text row 1",
1653
- another: "another 1",
1654
- extraneous: "Don't show 1",
1655
- },
1656
- {
1657
- id: "an_id2",
1658
- test: "A text row 2",
1659
- another: "another 2",
1660
- extraneous: "Don't show 2",
1661
- },
1662
- ];
1663
-
1664
- let counter = 0;
1665
-
1666
- const editingBuilder = (e, readOnly, def, index) => {
1667
- if (e.id === "an_id1") {
1668
- expect(index, "to equal", 0);
1669
- } else {
1670
- expect(index, "to equal", 1);
1671
- }
1672
-
1673
- expect(readOnly, "to be", false);
1674
-
1675
- counter++;
1676
- };
1677
-
1678
- const columnDef = [
1679
- { fieldName: "test", label: messages.a_label, className: "aClassXYZ", editingBuilder: editingBuilder },
1680
- { fieldName: "another", label: messages.another, editingBuilder: editingBuilder },
1681
- ];
1682
-
1683
- buildHeaderAndRowFromConfig(columnDef, elements, false);
1684
-
1685
- expect(counter, "to equal", 4);
1686
- });
1687
-
1688
1595
  it("build table headers and rows as expected when a column should not be visible", () => {
1689
1596
  const editingBuilder = (e, readOnly, def) =>
1690
1597
  def.fieldName === "test" ? null : e.another + " a value from builder";
@@ -125,11 +125,6 @@ const Autocomplete = ({ id, options, autocompleteProps }) => {
125
125
  options={options}
126
126
  getOptionLabel={option => option.label}
127
127
  onChange={onChangeOption}
128
- openText={null}
129
- closeText={null}
130
- clearText={null}
131
- noOptionsText={null}
132
- loadingText={null}
133
128
  classes={{
134
129
  paper: classes.selectPaper,
135
130
  popupIndicator: classes.popupIndicator,
@@ -64,11 +64,6 @@ describe("Autocomplete Component", () => {
64
64
  closeIcon={<Icon id="close2" />}
65
65
  popupIcon={<Icon id="dropdown-chevron-down" />}
66
66
  getOptionLabel={option => option.label}
67
- openText={null}
68
- closeText={null}
69
- clearText={null}
70
- noOptionsText={null}
71
- loadingText={null}
72
67
  renderInput={params => (
73
68
  <TextField
74
69
  {...params}
@@ -114,11 +109,6 @@ describe("Autocomplete Component", () => {
114
109
  closeIcon={<Icon id="close2" />}
115
110
  popupIcon={<Icon id="dropdown-chevron-down" />}
116
111
  getOptionLabel={option => option.label}
117
- openText={null}
118
- closeText={null}
119
- clearText={null}
120
- noOptionsText={null}
121
- loadingText={null}
122
112
  renderInput={params => (
123
113
  <TextField
124
114
  {...params}
@@ -166,11 +156,6 @@ describe("Autocomplete Component", () => {
166
156
  closeIcon={<Icon id="close2" />}
167
157
  popupIcon={<Icon id="dropdown-chevron-down" />}
168
158
  getOptionLabel={option => option.label}
169
- openText={null}
170
- closeText={null}
171
- clearText={null}
172
- noOptionsText={null}
173
- loadingText={null}
174
159
  renderInput={params => (
175
160
  <TextField
176
161
  {...params}
@@ -5,13 +5,6 @@ import DatePicker from "react-datepicker";
5
5
  import "react-datepicker/dist/react-datepicker.css";
6
6
  import TimePicker from "./TimePicker";
7
7
  import { makeStyles } from "@material-ui/core/styles";
8
- import {
9
- getTimeZoneByName,
10
- convertTimeToOtherTimeZone,
11
- convertTimeToLocalTimeZone,
12
- } from "../../../utils/timezoneHelper";
13
- import { namedLookupLocalizedSelector } from "../../../selectors/metadata";
14
- import { useSelector } from "react-redux";
15
8
 
16
9
  const useStyles = makeStyles(theme => ({
17
10
  container: {
@@ -127,7 +120,6 @@ const WrappedDatePicker = ({
127
120
  useTime,
128
121
  useDate = true,
129
122
  onChange,
130
- useTimeZone = false,
131
123
  dateFormat,
132
124
  showTimeZone,
133
125
  timeInputLabel,
@@ -139,18 +131,12 @@ const WrappedDatePicker = ({
139
131
  ...props
140
132
  }) => {
141
133
  const classes = useStyles({ readOnly });
142
- const timeZoneName = getTimeZoneByName(timePickerTimeZone);
143
- const startDate = value
144
- ? timePickerTimeZone && useTimeZone
145
- ? convertTimeToLocalTimeZone(new Date(value), timeZoneName)
146
- : new Date(value)
147
- : null;
134
+ const startDate = value ? new Date(value) : null;
148
135
  const disabledCls = classNames({ [classes.disabled]: props.disabled });
149
- const localizedTimeZoneName = useSelector(namedLookupLocalizedSelector("customer", "TimeZone", timePickerTimeZone));
150
136
 
151
137
  const updateDate = (date, metadata) => {
152
138
  if (onChange) {
153
- onChange(useTimeZone && timePickerTimeZone ? convertTimeToOtherTimeZone(date, timeZoneName) : date, metadata);
139
+ onChange(date, metadata);
154
140
  }
155
141
  };
156
142
 
@@ -166,7 +152,7 @@ const WrappedDatePicker = ({
166
152
  showTimeInput={useTime ?? false}
167
153
  useTime={useTime ?? false}
168
154
  customTimeInput={
169
- useTime ? <TimePicker showTimeZone={showTimeZone} requestedTimeZone={localizedTimeZoneName} /> : null
155
+ useTime ? <TimePicker showTimeZone={showTimeZone} requestedTimeZone={timePickerTimeZone} /> : null
170
156
  }
171
157
  timeInputLabel={timeInputLabel ?? ""}
172
158
  readOnly={readOnly}