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
@@ -1,169 +0,0 @@
1
- import { RSAA } from "redux-api-middleware";
2
- import {
3
- GET_TASKINFO_REQUEST,
4
- GET_TASKINFO_SUCCESS,
5
- GET_TASKINFO_FAILURE,
6
- getTaskInfo,
7
- getTaskList,
8
- getTaskLog,
9
- ssrsDownloadFilterTaskNames,
10
- deleteTask,
11
- } from "./tasks";
12
-
13
- jest.mock("../utils/buildUrl", () => {
14
- const modExport = {};
15
- modExport.loadConfig = () => Promise.resolve({});
16
- modExport.buildUrl = (path = [], params = "") => "URL: " + path.join("/") + " " + JSON.stringify(params);
17
- return modExport;
18
- });
19
-
20
- describe("getTaskInfo", () => {
21
- it("creates a RSAA to get task info", () =>
22
- expect(getTaskInfo, "when called with", ["1234"], "to exhaustively satisfy", {
23
- [RSAA]: {
24
- types: [GET_TASKINFO_REQUEST, GET_TASKINFO_SUCCESS, GET_TASKINFO_FAILURE],
25
- endpoint: 'URL: tasks/1234 ""',
26
- method: "GET",
27
- body: undefined,
28
- credentials: "include",
29
- bailout: expect.it("to be a function"),
30
- headers: {
31
- Accept: "application/json; charset=utf-8",
32
- "Content-Type": "application/json",
33
- },
34
- options: { redirect: "follow" },
35
- },
36
- }));
37
- });
38
-
39
- describe("getTaskLog", () => {
40
- it("creates a RSAA to get task info", () =>
41
- expect(getTaskLog, "when called with", ["1234"], "to exhaustively satisfy", {
42
- [RSAA]: {
43
- types: [
44
- { type: "GET_TASK_LOG_REQUEST", meta: { taskId: "1234", addToActiveRequests: true } },
45
- { type: "GET_TASK_LOG_SUCCESS", meta: { taskId: "1234", addToActiveRequests: true } },
46
- { type: "GET_TASK_LOG_FAILURE", meta: { taskId: "1234", addToActiveRequests: true } },
47
- ],
48
- endpoint: 'URL: tasks/1234/logs ""',
49
- method: "GET",
50
- body: undefined,
51
- credentials: "include",
52
- bailout: expect.it("to be a function"),
53
- headers: {
54
- Accept: "application/json; charset=utf-8",
55
- "Content-Type": "application/json",
56
- },
57
- options: { redirect: "follow" },
58
- },
59
- }));
60
-
61
- it("creates a RSAA to get task info with addToActiveRequests false", () =>
62
- expect(getTaskLog, "when called with", ["1234", false], "to exhaustively satisfy", {
63
- [RSAA]: {
64
- types: [
65
- { type: "GET_TASK_LOG_REQUEST", meta: { taskId: "1234", addToActiveRequests: false } },
66
- { type: "GET_TASK_LOG_SUCCESS", meta: { taskId: "1234", addToActiveRequests: false } },
67
- { type: "GET_TASK_LOG_FAILURE", meta: { taskId: "1234", addToActiveRequests: false } },
68
- ],
69
- endpoint: 'URL: tasks/1234/logs ""',
70
- method: "GET",
71
- body: undefined,
72
- credentials: "include",
73
- bailout: expect.it("to be a function"),
74
- headers: {
75
- Accept: "application/json; charset=utf-8",
76
- "Content-Type": "application/json",
77
- },
78
- options: { redirect: "follow" },
79
- },
80
- }));
81
- });
82
-
83
- describe("getTaskList", () => {
84
- it("creates a RSAA to get task info", () => {
85
- const expectedParameters = {
86
- filterTaskNames: ssrsDownloadFilterTaskNames,
87
- requester: "freddie",
88
- lastModified: "date value",
89
- };
90
-
91
- expect(
92
- getTaskList,
93
- "when called with",
94
- ["freddie", ssrsDownloadFilterTaskNames, "date value", false],
95
- "to exhaustively satisfy",
96
- {
97
- [RSAA]: {
98
- types: [
99
- { type: "GET_TASK_LIST_REQUEST", meta: { addToActiveRequests: false } },
100
- { type: "GET_TASK_LIST_SUCCESS", meta: { addToActiveRequests: false } },
101
- { type: "GET_TASK_LIST_FAILURE", meta: { addToActiveRequests: false } },
102
- ],
103
- endpoint: "URL: tasks " + JSON.stringify(expectedParameters),
104
- method: "GET",
105
- body: undefined,
106
- credentials: "include",
107
- bailout: expect.it("to be a function"),
108
- headers: {
109
- Accept: "application/json; charset=utf-8",
110
- "Content-Type": "application/json",
111
- },
112
- options: { redirect: "follow" },
113
- },
114
- },
115
- );
116
- });
117
-
118
- it("creates a RSAA to get task info with null lastModified and true addToActiveRequests", () => {
119
- const expectedParameters = {
120
- filterTaskNames: ssrsDownloadFilterTaskNames,
121
- requester: "freddie",
122
- lastModified: null,
123
- };
124
-
125
- expect(getTaskList, "when called with", ["freddie", ssrsDownloadFilterTaskNames], "to exhaustively satisfy", {
126
- [RSAA]: {
127
- types: [
128
- { type: "GET_TASK_LIST_REQUEST", meta: { addToActiveRequests: true } },
129
- { type: "GET_TASK_LIST_SUCCESS", meta: { addToActiveRequests: true } },
130
- { type: "GET_TASK_LIST_FAILURE", meta: { addToActiveRequests: true } },
131
- ],
132
- endpoint: "URL: tasks " + JSON.stringify(expectedParameters),
133
- method: "GET",
134
- body: undefined,
135
- credentials: "include",
136
- bailout: expect.it("to be a function"),
137
- headers: {
138
- Accept: "application/json; charset=utf-8",
139
- "Content-Type": "application/json",
140
- },
141
- options: { redirect: "follow" },
142
- },
143
- });
144
- });
145
- });
146
-
147
- describe("deleteTask", () => {
148
- it("creates a RSAA to delete a task", () => {
149
- expect(deleteTask, "when called with", ["1234"], "to exhaustively satisfy", {
150
- [RSAA]: {
151
- types: [
152
- { type: "DELETE_TASK_REQUEST", meta: { taskId: "1234" } },
153
- { type: "DELETE_TASK_SUCCESS", meta: { taskId: "1234" } },
154
- { type: "DELETE_TASK_FAILURE", meta: { taskId: "1234" } },
155
- ],
156
- endpoint: 'URL: tasks/1234 ""',
157
- method: "DELETE",
158
- body: undefined,
159
- credentials: "include",
160
- bailout: expect.it("to be a function"),
161
- headers: {
162
- Accept: "application/json; charset=utf-8",
163
- "Content-Type": "application/json",
164
- },
165
- options: { redirect: "follow" },
166
- },
167
- });
168
- });
169
- });
@@ -1,108 +0,0 @@
1
- import React from "react";
2
- import { useIntl } from "react-intl";
3
- import { makeStyles } from "@material-ui/core/styles";
4
- import sharedMessages from "../../../../sharedMessages";
5
- import Grid from "@material-ui/core/Grid";
6
- import ListItemText from "@material-ui/core/ListItemText";
7
- import List from "@material-ui/core/List";
8
- import ListItem from "@material-ui/core/ListItem";
9
- import ListItemIcon from "@material-ui/core/ListItemIcon";
10
- import LookupDisplayValue from "./LookupDisplayValue";
11
- import ActionModal from "./ActionModal";
12
- import { useDispatch, useSelector } from "react-redux";
13
- import { firstDialogErrorMessageSelector } from "../../../../selectors/globalErrorMessages";
14
- import { popGlobalErrorMessage } from "../../../../actions/globalErrorMessages";
15
-
16
- const useStyles = makeStyles(theme => ({
17
- grid: {
18
- maxHeight: "40vh",
19
- overflowY: "auto",
20
- },
21
- }));
22
-
23
- const useMessageStyles = makeStyles(theme => ({
24
- label: {
25
- fontSize: theme.typography.fontSize,
26
- color: theme.palette.grey.dark,
27
- fontFamily: theme.typography.fontFamily,
28
- },
29
- }));
30
-
31
- export const GlobalErrorMessageLabel = ({ children }) => {
32
- const classes = useMessageStyles();
33
-
34
- return <span className={classes.label}>{children}</span>;
35
- };
36
-
37
- const GlobalErrorMessagesModal = ({ children }) => {
38
- const classes = useStyles();
39
- const { formatMessage } = useIntl();
40
- const dispatch = useDispatch();
41
-
42
- const msg = useSelector(firstDialogErrorMessageSelector);
43
-
44
- if (msg === null) {
45
- return <>{children}</>;
46
- }
47
-
48
- const closeCallback = () => {
49
- dispatch(popGlobalErrorMessage());
50
- };
51
- const actions = [{ label: sharedMessages.close, isPrimary: true, handler: closeCallback }];
52
-
53
- let content = (
54
- <Grid container spacing={2} className={classes.grid}>
55
- <Grid container item spacing={0}>
56
- {msg.description && (
57
- <Grid item xs={12}>
58
- {msg.description}
59
- </Grid>
60
- )}
61
-
62
- {msg.messages?.length > 0 && (
63
- <Grid item xs={12}>
64
- <List className={classes.root}>
65
- {msg.messages.map((msg, index) => {
66
- const hasLookup = msg.lookupModule && msg.lookupName && msg.lookupKey;
67
-
68
- return (
69
- <ListItem key={index}>
70
- <ListItemIcon>●</ListItemIcon>
71
- <ListItemText>
72
- {hasLookup && (
73
- <LookupDisplayValue
74
- moduleName={msg.lookupModule}
75
- lookupName={msg.lookupName}
76
- lookupKey={msg.lookupKey}
77
- lookupReplacementValues={msg.lookupReplacementValues}
78
- labelComponent={GlobalErrorMessageLabel}
79
- />
80
- )}
81
- {!hasLookup && <GlobalErrorMessageLabel>{msg.message}</GlobalErrorMessageLabel>}
82
- </ListItemText>
83
- </ListItem>
84
- );
85
- })}
86
- </List>
87
- </Grid>
88
- )}
89
- </Grid>
90
- </Grid>
91
- );
92
-
93
- return (
94
- <>
95
- {children}
96
- {
97
- <ActionModal
98
- title={msg.title || formatMessage(sharedMessages.error)}
99
- message={content}
100
- open={true}
101
- actions={actions}
102
- />
103
- }
104
- </>
105
- );
106
- };
107
-
108
- export default GlobalErrorMessagesModal;