quidproquo-web-admin 0.1.1 → 0.1.2

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 (112) hide show
  1. package/lib/commonjs/Auth/Auth.js +1 -1
  2. package/lib/commonjs/Auth/AuthChallengeMfaSetup/AuthChallengeMfaSetup.js +1 -1
  3. package/lib/commonjs/Auth/AuthChallengeNewPasswordRequired/AuthChallengeNewPasswordRequired.js +2 -2
  4. package/lib/commonjs/Auth/AuthChallengeSoftwareTokenMfa/AuthChallengeSoftwareTokenMfa.js +2 -2
  5. package/lib/commonjs/Auth/Login.js +2 -2
  6. package/lib/commonjs/Config/Config.js +3 -3
  7. package/lib/commonjs/LogViewer/ActionHistoryItem.js +1 -1
  8. package/lib/commonjs/LogViewer/ActionRender/ActionRender.js +3 -3
  9. package/lib/commonjs/LogViewer/AdminLogs/AdminLogGrid/AdminLogGrid.js +3 -3
  10. package/lib/commonjs/LogViewer/AdminLogs/AdminLogSearchBar/AdminLogSearchBar.js +4 -4
  11. package/lib/commonjs/LogViewer/AdminLogs/AdminLogs.js +1 -1
  12. package/lib/commonjs/LogViewer/Dashboard.js +8 -4
  13. package/lib/commonjs/LogViewer/EventTimeline.js +4 -4
  14. package/lib/commonjs/LogViewer/HelpChat/HelpChat.js +8 -7
  15. package/lib/commonjs/LogViewer/LogCorrelationTree.js +27 -24
  16. package/lib/commonjs/LogViewer/LogCorrelations.js +1 -1
  17. package/lib/commonjs/LogViewer/LogDetails.js +1 -1
  18. package/lib/commonjs/LogViewer/LogDialog/LogDialog.js +4 -4
  19. package/lib/commonjs/LogViewer/LogDialog/MovedToColdStorage/MovedToColdStorage.js +1 -1
  20. package/lib/commonjs/LogViewer/LogDialog/tabs/LogDetailsTab/LogDetailsTab.js +1 -1
  21. package/lib/commonjs/LogViewer/LogDialog/tabs/TimelineTab/TimelineTab.js +1 -1
  22. package/lib/commonjs/LogViewer/LogDialog/tabs/TreeTab/TreeTab.js +1 -1
  23. package/lib/commonjs/LogViewer/LogMetadataGrid.js +3 -3
  24. package/lib/commonjs/LogViewer/LogRawJson.js +1 -1
  25. package/lib/commonjs/LogViewer/LogSearch.js +1 -1
  26. package/lib/commonjs/LogViewer/LogSummary.js +2 -2
  27. package/lib/commonjs/LogViewer/LogSummaryDetails.js +4 -2
  28. package/lib/commonjs/LogViewer/LogSummaryReturn.js +1 -1
  29. package/lib/commonjs/LogViewer/TopSection.js +7 -7
  30. package/lib/commonjs/LogViewer/actionComponents/custom/CoreContextListCustomAction.js +1 -1
  31. package/lib/commonjs/LogViewer/actionComponents/custom/CoreLogCreateCustomAction.js +1 -1
  32. package/lib/commonjs/LogViewer/actionComponents/custom/CoreLogDisableEventHistoryCustomAction.js +1 -1
  33. package/lib/commonjs/LogViewer/actionComponents/custom/CoreLogTemplateLiteralCustomAction.js +1 -1
  34. package/lib/commonjs/LogViewer/actionComponents/custom/CoreNetworkRequestCustomAction.js +2 -2
  35. package/lib/commonjs/LogViewer/actionComponents/genericActionRenderer/ActionResultDisplay.js +1 -1
  36. package/lib/commonjs/LogViewer/actionComponents/genericActionRenderer/AnyVariableView/AnyVariableView.js +15 -15
  37. package/lib/commonjs/LogViewer/actionComponents/genericActionRenderer/getGenericActionRenderer.js +7 -4
  38. package/lib/commonjs/LogViewer/charts/CostPerService.js +1 -1
  39. package/lib/commonjs/LogViewer/charts/ErrorsByType.js +1 -1
  40. package/lib/commonjs/LogViewer/charts/ErrorsOverTime.js +1 -1
  41. package/lib/commonjs/LogViewer/charts/RequestsByService.js +2 -2
  42. package/lib/commonjs/LogViewer/hooks/useLogManagement.js +1 -1
  43. package/lib/commonjs/LogViewer/hooks/useLogTreeData.js +14 -11
  44. package/lib/commonjs/LogViewer/hooks/useServiceNames.js +6 -5
  45. package/lib/commonjs/components/AdminDialog.js +2 -2
  46. package/lib/commonjs/components/AsyncButton.js +1 -1
  47. package/lib/commonjs/components/AutocompleteInput.js +2 -2
  48. package/lib/commonjs/components/DataGrid.js +1 -1
  49. package/lib/commonjs/components/DataGridPagination/DataGridPagination.js +1 -1
  50. package/lib/commonjs/components/DateCell/DateCell.js +1 -1
  51. package/lib/commonjs/components/DateRangePicker.js +2 -2
  52. package/lib/commonjs/components/MainLayout/MainLayout.js +2 -2
  53. package/lib/commonjs/components/TextInput.js +2 -2
  54. package/lib/commonjs/tmp/RandomView.js +1 -1
  55. package/lib/commonjs/useFederatedAddon.js +7 -6
  56. package/lib/esm/Auth/Auth.js +1 -1
  57. package/lib/esm/Auth/AuthChallengeMfaSetup/AuthChallengeMfaSetup.js +1 -1
  58. package/lib/esm/Auth/AuthChallengeMfaSetup/logic/authActionCreator.js +1 -1
  59. package/lib/esm/Auth/AuthChallengeNewPasswordRequired/AuthChallengeNewPasswordRequired.js +1 -1
  60. package/lib/esm/Auth/AuthChallengeSoftwareTokenMfa/AuthChallengeSoftwareTokenMfa.js +1 -1
  61. package/lib/esm/Auth/Login.js +2 -2
  62. package/lib/esm/Config/Config.js +3 -3
  63. package/lib/esm/LogViewer/ActionHistoryItem.js +1 -1
  64. package/lib/esm/LogViewer/ActionRender/ActionRender.js +3 -3
  65. package/lib/esm/LogViewer/AdminLogs/AdminLogGrid/AdminLogGrid.js +3 -3
  66. package/lib/esm/LogViewer/AdminLogs/AdminLogSearchBar/AdminLogSearchBar.js +4 -4
  67. package/lib/esm/LogViewer/AdminLogs/AdminLogs.js +1 -1
  68. package/lib/esm/LogViewer/Dashboard.js +9 -5
  69. package/lib/esm/LogViewer/EventTimeline.js +4 -4
  70. package/lib/esm/LogViewer/HelpChat/HelpChat.js +9 -8
  71. package/lib/esm/LogViewer/LogCorrelationTree.js +27 -24
  72. package/lib/esm/LogViewer/LogCorrelations.js +1 -1
  73. package/lib/esm/LogViewer/LogDetails.js +1 -1
  74. package/lib/esm/LogViewer/LogDialog/LogDialog.js +4 -4
  75. package/lib/esm/LogViewer/LogDialog/MovedToColdStorage/MovedToColdStorage.js +1 -1
  76. package/lib/esm/LogViewer/LogDialog/tabs/LogDetailsTab/LogDetailsTab.js +1 -1
  77. package/lib/esm/LogViewer/LogDialog/tabs/TimelineTab/TimelineTab.js +1 -1
  78. package/lib/esm/LogViewer/LogDialog/tabs/TreeTab/TreeTab.js +1 -1
  79. package/lib/esm/LogViewer/LogMetadataGrid.js +3 -3
  80. package/lib/esm/LogViewer/LogRawJson.js +1 -1
  81. package/lib/esm/LogViewer/LogSearch.js +1 -1
  82. package/lib/esm/LogViewer/LogSummary.js +2 -2
  83. package/lib/esm/LogViewer/LogSummaryDetails.js +4 -2
  84. package/lib/esm/LogViewer/LogSummaryReturn.js +1 -1
  85. package/lib/esm/LogViewer/TopSection.js +7 -7
  86. package/lib/esm/LogViewer/actionComponents/custom/CoreContextListCustomAction.js +1 -1
  87. package/lib/esm/LogViewer/actionComponents/custom/CoreLogCreateCustomAction.js +1 -1
  88. package/lib/esm/LogViewer/actionComponents/custom/CoreLogDisableEventHistoryCustomAction.js +1 -1
  89. package/lib/esm/LogViewer/actionComponents/custom/CoreLogTemplateLiteralCustomAction.js +1 -1
  90. package/lib/esm/LogViewer/actionComponents/custom/CoreNetworkRequestCustomAction.js +2 -2
  91. package/lib/esm/LogViewer/actionComponents/genericActionRenderer/ActionResultDisplay.js +1 -1
  92. package/lib/esm/LogViewer/actionComponents/genericActionRenderer/AnyVariableView/AnyVariableView.js +15 -15
  93. package/lib/esm/LogViewer/actionComponents/genericActionRenderer/getGenericActionRenderer.js +7 -4
  94. package/lib/esm/LogViewer/charts/CostPerService.js +1 -1
  95. package/lib/esm/LogViewer/charts/ErrorsByType.js +1 -1
  96. package/lib/esm/LogViewer/charts/ErrorsOverTime.js +1 -1
  97. package/lib/esm/LogViewer/charts/RequestsByService.js +2 -2
  98. package/lib/esm/LogViewer/hooks/useLogManagement.js +1 -1
  99. package/lib/esm/LogViewer/hooks/useLogTreeData.js +15 -12
  100. package/lib/esm/LogViewer/hooks/useServiceNames.js +7 -6
  101. package/lib/esm/components/AdminDialog.js +2 -2
  102. package/lib/esm/components/AsyncButton.js +1 -1
  103. package/lib/esm/components/AutocompleteInput.js +2 -2
  104. package/lib/esm/components/DataGrid.js +1 -1
  105. package/lib/esm/components/DataGridPagination/DataGridPagination.js +1 -1
  106. package/lib/esm/components/DateCell/DateCell.js +1 -1
  107. package/lib/esm/components/DateRangePicker.js +2 -2
  108. package/lib/esm/components/MainLayout/MainLayout.js +2 -2
  109. package/lib/esm/components/TextInput.js +2 -2
  110. package/lib/esm/tmp/RandomView.js +1 -1
  111. package/lib/esm/useFederatedAddon.js +8 -7
  112. package/package.json +6 -6
@@ -15,7 +15,9 @@ const runtimeTypeToCamelCase = (runtimeType) => runtimeType.toLowerCase().replac
15
15
  const LogSummaryDetails = ({ log }) => {
16
16
  const [expanded, setExpanded] = (0, react_1.useState)(false);
17
17
  const totalRuntime = new Date(log.finishedAt).getTime() - new Date(log.startedAt).getTime();
18
- const functionKey = log.qpqFunctionRuntimeInfo ? (0, quidproquo_core_1.getUniqueKeyFromQpqFunctionRuntime)(log.qpqFunctionRuntimeInfo) : runtimeTypeToCamelCase(log.runtimeType);
19
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", alignItems: "center", children: [(0, jsx_runtime_1.jsxs)(material_1.Typography, { variant: "h5", gutterBottom: true, children: [log.runtimeType, " - ", log.moduleName] }), (0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: expanded ? 'Collapse' : 'Expand', children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "small", onClick: () => setExpanded(!expanded), children: expanded ? (0, jsx_runtime_1.jsx)(ExpandLess_1.default, {}) : (0, jsx_runtime_1.jsx)(ExpandMore_1.default, {}) }) })] }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsxs)("pre", { style: AnyVariableView_1.genericFunctionRendererStyles.pre, children: [(0, jsx_runtime_1.jsxs)("div", { style: AnyVariableView_1.genericFunctionRendererStyles.commentBlock, children: [(0, jsx_runtime_1.jsx)("div", { children: "// //////////////////////////////////////////////////////" }), (0, jsx_runtime_1.jsxs)("div", { children: ["// src: ", functionKey] }), log.fromCorrelation && (0, jsx_runtime_1.jsxs)("div", { children: ["// Caller: ", log.fromCorrelation] }), (0, jsx_runtime_1.jsxs)("div", { children: ["// Total Runtime: ", (0, jsx_runtime_1.jsxs)("span", { style: AnyVariableView_1.genericFunctionRendererStyles.highlightComment, children: [totalRuntime, " ms"] })] }), (0, jsx_runtime_1.jsx)("div", { children: "// //////////////////////////////////////////////////////" })] }), (0, jsx_runtime_1.jsx)(AnyVariableView_1.GenericFunctionRenderer, { functionName: functionKey.split('::').pop() || 'unknown', args: log.input, expanded: expanded })] }) })] }));
18
+ const functionKey = log.qpqFunctionRuntimeInfo
19
+ ? (0, quidproquo_core_1.getUniqueKeyFromQpqFunctionRuntime)(log.qpqFunctionRuntimeInfo)
20
+ : runtimeTypeToCamelCase(log.runtimeType);
21
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { alignItems: "center", display: "flex", children: [(0, jsx_runtime_1.jsxs)(material_1.Typography, { gutterBottom: true, variant: "h5", children: [log.runtimeType, " - ", log.moduleName] }), (0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: expanded ? 'Collapse' : 'Expand', children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: () => setExpanded(!expanded), size: "small", children: expanded ? (0, jsx_runtime_1.jsx)(ExpandLess_1.default, {}) : (0, jsx_runtime_1.jsx)(ExpandMore_1.default, {}) }) })] }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsxs)("pre", { style: AnyVariableView_1.genericFunctionRendererStyles.pre, children: [(0, jsx_runtime_1.jsxs)("div", { style: AnyVariableView_1.genericFunctionRendererStyles.commentBlock, children: [(0, jsx_runtime_1.jsx)("div", { children: '// //////////////////////////////////////////////////////' }), (0, jsx_runtime_1.jsxs)("div", { children: ['// src: ', functionKey] }), log.fromCorrelation && ((0, jsx_runtime_1.jsxs)("div", { children: ['// Caller: ', log.fromCorrelation] })), (0, jsx_runtime_1.jsxs)("div", { children: ['// Total Runtime: ', (0, jsx_runtime_1.jsxs)("span", { style: AnyVariableView_1.genericFunctionRendererStyles.highlightComment, children: [totalRuntime, " ms"] })] }), (0, jsx_runtime_1.jsx)("div", { children: '// //////////////////////////////////////////////////////' })] }), (0, jsx_runtime_1.jsx)(AnyVariableView_1.GenericFunctionRenderer, { args: log.input, expanded: expanded, functionName: functionKey.split('::').pop() || 'unknown' })] }) })] }));
20
22
  };
21
23
  exports.LogSummaryDetails = LogSummaryDetails;
@@ -12,6 +12,6 @@ const material_1 = require("@mui/material");
12
12
  const actionComponents_1 = require("./actionComponents");
13
13
  const LogSummaryReturn = ({ log }) => {
14
14
  const [expanded, setExpanded] = (0, react_1.useState)(false);
15
- return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", alignItems: "center", children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "h6", gutterBottom: true, children: log.error ? 'Thrown Error' : 'Returned' }), (0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: expanded ? 'Collapse' : 'Expand', children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "small", onClick: () => setExpanded(!expanded), children: expanded ? (0, jsx_runtime_1.jsx)(ExpandLess_1.default, {}) : (0, jsx_runtime_1.jsx)(ExpandMore_1.default, {}) }) })] }), (0, jsx_runtime_1.jsx)("pre", { style: { whiteSpace: 'pre-wrap', wordBreak: 'break-word' }, children: (0, jsx_runtime_1.jsx)("pre", { style: actionComponents_1.genericFunctionRendererStyles.pre, children: log.error ? (0, jsx_runtime_1.jsx)(actionComponents_1.AnyVariableView, { value: log.error, expanded: expanded }) : (0, jsx_runtime_1.jsx)(actionComponents_1.AnyVariableView, { value: log.result, expanded: expanded }) }) })] }));
15
+ return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { alignItems: "center", display: "flex", children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { gutterBottom: true, variant: "h6", children: log.error ? 'Thrown Error' : 'Returned' }), (0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: expanded ? 'Collapse' : 'Expand', children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: () => setExpanded(!expanded), size: "small", children: expanded ? (0, jsx_runtime_1.jsx)(ExpandLess_1.default, {}) : (0, jsx_runtime_1.jsx)(ExpandMore_1.default, {}) }) })] }), (0, jsx_runtime_1.jsx)("pre", { style: { whiteSpace: 'pre-wrap', wordBreak: 'break-word' }, children: (0, jsx_runtime_1.jsx)("pre", { style: actionComponents_1.genericFunctionRendererStyles.pre, children: log.error ? (0, jsx_runtime_1.jsx)(actionComponents_1.AnyVariableView, { expanded: expanded, value: log.error }) : (0, jsx_runtime_1.jsx)(actionComponents_1.AnyVariableView, { expanded: expanded, value: log.result }) }) })] }));
16
16
  };
17
17
  exports.LogSummaryReturn = LogSummaryReturn;
@@ -35,20 +35,20 @@ function TopSection({ onSearch }) {
35
35
  updateStartAndEndTimeSpan(minutes);
36
36
  handleQuickTimeClose();
37
37
  };
38
- return ((0, jsx_runtime_1.jsxs)(x_date_pickers_1.LocalizationProvider, { dateAdapter: AdapterDateFns_1.AdapterDateFns, children: [(0, jsx_runtime_1.jsxs)(Grid_1.default, { container: true, columns: 12, spacing: 2, children: [(0, jsx_runtime_1.jsx)(Grid_1.default, { item: true, xs: 2, children: (0, jsx_runtime_1.jsxs)(FormControl_1.default, { fullWidth: true, children: [(0, jsx_runtime_1.jsx)(InputLabel_1.default, { id: "runtime-select-label", children: "Runtime Type" }), (0, jsx_runtime_1.jsx)(Select_1.default, { labelId: "runtime-select-label", id: "demo-simple-select", value: runtimeType, label: "Runtime Type", onChange: handleRuntimeTypeOnChange, children: constants_1.RuntimeTypes.map((key) => ((0, jsx_runtime_1.jsx)(MenuItem_1.default, { value: key, children: key }, key))) })] }) }), (0, jsx_runtime_1.jsx)(Grid_1.default, { item: true, xs: 2, children: (0, jsx_runtime_1.jsx)(FormControl_1.default, { fullWidth: true, children: (0, jsx_runtime_1.jsx)(material_1.Autocomplete, { getOptionLabel: (option) => option.label, options: serviceOptions, value: serviceOptions.find((o) => o.value === service) || null, onChange: handleServiceOnChange, renderInput: (params) => ((0, jsx_runtime_1.jsx)(TextField_1.default, Object.assign({}, params, { label: "Service Name", InputLabelProps: {
38
+ return ((0, jsx_runtime_1.jsxs)(x_date_pickers_1.LocalizationProvider, { dateAdapter: AdapterDateFns_1.AdapterDateFns, children: [(0, jsx_runtime_1.jsxs)(Grid_1.default, { columns: 12, container: true, spacing: 2, children: [(0, jsx_runtime_1.jsx)(Grid_1.default, { item: true, xs: 2, children: (0, jsx_runtime_1.jsxs)(FormControl_1.default, { fullWidth: true, children: [(0, jsx_runtime_1.jsx)(InputLabel_1.default, { id: "runtime-select-label", children: "Runtime Type" }), (0, jsx_runtime_1.jsx)(Select_1.default, { id: "demo-simple-select", label: "Runtime Type", labelId: "runtime-select-label", onChange: handleRuntimeTypeOnChange, value: runtimeType, children: constants_1.RuntimeTypes.map((key) => ((0, jsx_runtime_1.jsx)(MenuItem_1.default, { value: key, children: key }, key))) })] }) }), (0, jsx_runtime_1.jsx)(Grid_1.default, { item: true, xs: 2, children: (0, jsx_runtime_1.jsx)(FormControl_1.default, { fullWidth: true, children: (0, jsx_runtime_1.jsx)(material_1.Autocomplete, { getOptionLabel: (option) => option.label, onChange: handleServiceOnChange, options: serviceOptions, renderInput: (params) => ((0, jsx_runtime_1.jsx)(TextField_1.default, Object.assign({}, params, { InputLabelProps: {
39
39
  shrink: true,
40
- } }))) }) }) }), (0, jsx_runtime_1.jsx)(Grid_1.default, { item: true, xs: 2, children: (0, jsx_runtime_1.jsxs)(system_1.Box, { position: "relative", children: [(0, jsx_runtime_1.jsx)(FormControl_1.default, { fullWidth: true, children: (0, jsx_runtime_1.jsx)(x_date_pickers_1.DateTimePicker, { label: "Start DateTime", value: startDate, onChange: handleStartDateChange }) }), (0, jsx_runtime_1.jsx)(material_1.IconButton, { "aria-label": "quick time select", "aria-controls": "quick-time-menu", "aria-haspopup": "true", onClick: handleQuickTimeClick, sx: {
40
+ }, label: "Service Name" }))), value: serviceOptions.find((o) => o.value === service) || null }) }) }), (0, jsx_runtime_1.jsx)(Grid_1.default, { item: true, xs: 2, children: (0, jsx_runtime_1.jsxs)(system_1.Box, { position: "relative", children: [(0, jsx_runtime_1.jsx)(FormControl_1.default, { fullWidth: true, children: (0, jsx_runtime_1.jsx)(x_date_pickers_1.DateTimePicker, { label: "Start DateTime", onChange: handleStartDateChange, value: startDate }) }), (0, jsx_runtime_1.jsx)(material_1.IconButton, { "aria-controls": "quick-time-menu", "aria-haspopup": "true", "aria-label": "quick time select", onClick: handleQuickTimeClick, sx: {
41
41
  position: 'absolute',
42
42
  right: '-28px',
43
43
  top: '50%',
44
44
  transform: 'translateY(-50%)',
45
- }, children: (0, jsx_runtime_1.jsx)(ExpandMore_1.default, {}) })] }) }), (0, jsx_runtime_1.jsx)(Grid_1.default, { item: true, xs: 2, children: (0, jsx_runtime_1.jsx)(FormControl_1.default, { fullWidth: true, children: (0, jsx_runtime_1.jsx)(x_date_pickers_1.DateTimePicker, { label: "End DateTime", value: endDate, onChange: handleEndDateChange }) }) }), (0, jsx_runtime_1.jsx)(Grid_1.default, { item: true, xs: 4, children: (0, jsx_runtime_1.jsx)(FormControl_1.default, { fullWidth: true, children: (0, jsx_runtime_1.jsx)(TextField_1.default, { label: "User", value: user, onChange: handleUserOnChange, InputLabelProps: {
45
+ }, children: (0, jsx_runtime_1.jsx)(ExpandMore_1.default, {}) })] }) }), (0, jsx_runtime_1.jsx)(Grid_1.default, { item: true, xs: 2, children: (0, jsx_runtime_1.jsx)(FormControl_1.default, { fullWidth: true, children: (0, jsx_runtime_1.jsx)(x_date_pickers_1.DateTimePicker, { label: "End DateTime", onChange: handleEndDateChange, value: endDate }) }) }), (0, jsx_runtime_1.jsx)(Grid_1.default, { item: true, xs: 4, children: (0, jsx_runtime_1.jsx)(FormControl_1.default, { fullWidth: true, children: (0, jsx_runtime_1.jsx)(TextField_1.default, { InputLabelProps: {
46
46
  shrink: true,
47
- } }) }) }), (0, jsx_runtime_1.jsx)(Grid_1.default, { item: true, xs: 6, children: (0, jsx_runtime_1.jsx)(FormControl_1.default, { fullWidth: true, children: (0, jsx_runtime_1.jsx)(TextField_1.default, { label: "Info", value: info, onChange: handleInfoOnChange, InputLabelProps: {
47
+ }, label: "User", onChange: handleUserOnChange, value: user }) }) }), (0, jsx_runtime_1.jsx)(Grid_1.default, { item: true, xs: 6, children: (0, jsx_runtime_1.jsx)(FormControl_1.default, { fullWidth: true, children: (0, jsx_runtime_1.jsx)(TextField_1.default, { InputLabelProps: {
48
48
  shrink: true,
49
- } }) }) }), (0, jsx_runtime_1.jsx)(Grid_1.default, { item: true, xs: 6, children: (0, jsx_runtime_1.jsx)(FormControl_1.default, { fullWidth: true, children: (0, jsx_runtime_1.jsx)(TextField_1.default, { label: "Error Filter", value: error, onChange: handleErrorOnChange, InputLabelProps: {
49
+ }, label: "Info", onChange: handleInfoOnChange, value: info }) }) }), (0, jsx_runtime_1.jsx)(Grid_1.default, { item: true, xs: 6, children: (0, jsx_runtime_1.jsx)(FormControl_1.default, { fullWidth: true, children: (0, jsx_runtime_1.jsx)(TextField_1.default, { InputLabelProps: {
50
50
  shrink: true,
51
- } }) }) }), (0, jsx_runtime_1.jsx)(Grid_1.default, { item: true, xs: 10, children: (0, jsx_runtime_1.jsx)(FormControl_1.default, { fullWidth: true, children: (0, jsx_runtime_1.jsx)(TextField_1.default, { label: "Deep Search", value: deep, onChange: handleDeepOnChange, placeholder: "Use with caution, reduce results with above fields first, this is a contains search on the log JSON, so it will be slow.", InputLabelProps: {
51
+ }, label: "Error Filter", onChange: handleErrorOnChange, value: error }) }) }), (0, jsx_runtime_1.jsx)(Grid_1.default, { item: true, xs: 10, children: (0, jsx_runtime_1.jsx)(FormControl_1.default, { fullWidth: true, children: (0, jsx_runtime_1.jsx)(TextField_1.default, { InputLabelProps: {
52
52
  shrink: true,
53
- } }) }) }), (0, jsx_runtime_1.jsx)(Grid_1.default, { item: true, xs: 2, children: (0, jsx_runtime_1.jsx)(AsyncButton_1.AsyncButton, { onClick: () => onSearch(), children: "Search" }) })] }), (0, jsx_runtime_1.jsxs)(material_1.Menu, { id: "quick-time-menu", anchorEl: anchorEl, keepMounted: true, open: Boolean(anchorEl), onClose: handleQuickTimeClose, children: [(0, jsx_runtime_1.jsx)(MenuItem_1.default, { onClick: () => handleQuickTimeSelect(5), children: "Last 5 minutes" }), (0, jsx_runtime_1.jsx)(MenuItem_1.default, { onClick: () => handleQuickTimeSelect(30), children: "Last 30 minutes" }), (0, jsx_runtime_1.jsx)(MenuItem_1.default, { onClick: () => handleQuickTimeSelect(1 * 60), children: "Last hour" }), (0, jsx_runtime_1.jsx)(MenuItem_1.default, { onClick: () => handleQuickTimeSelect(3 * 60), children: "Last 3 hours" }), (0, jsx_runtime_1.jsx)(MenuItem_1.default, { onClick: () => handleQuickTimeSelect(8 * 60), children: "Last 8 hours" }), (0, jsx_runtime_1.jsx)(MenuItem_1.default, { onClick: () => handleQuickTimeSelect(16 * 60), children: "Last 16 hours" }), (0, jsx_runtime_1.jsx)(MenuItem_1.default, { onClick: () => handleQuickTimeSelect(24 * 60), children: "Last 24 hours" }), (0, jsx_runtime_1.jsx)(MenuItem_1.default, { onClick: () => handleQuickTimeSelect(7 * 24 * 60), children: "Last 7 days" }), (0, jsx_runtime_1.jsx)(MenuItem_1.default, { onClick: () => handleQuickTimeSelect(30 * 24 * 60), children: "Last month" })] })] }));
53
+ }, label: "Deep Search", onChange: handleDeepOnChange, placeholder: "Use with caution, reduce results with above fields first, this is a contains search on the log JSON, so it will be slow.", value: deep }) }) }), (0, jsx_runtime_1.jsx)(Grid_1.default, { item: true, xs: 2, children: (0, jsx_runtime_1.jsx)(AsyncButton_1.AsyncButton, { onClick: () => onSearch(), children: "Search" }) })] }), (0, jsx_runtime_1.jsxs)(material_1.Menu, { anchorEl: anchorEl, id: "quick-time-menu", keepMounted: true, onClose: handleQuickTimeClose, open: Boolean(anchorEl), children: [(0, jsx_runtime_1.jsx)(MenuItem_1.default, { onClick: () => handleQuickTimeSelect(5), children: "Last 5 minutes" }), (0, jsx_runtime_1.jsx)(MenuItem_1.default, { onClick: () => handleQuickTimeSelect(30), children: "Last 30 minutes" }), (0, jsx_runtime_1.jsx)(MenuItem_1.default, { onClick: () => handleQuickTimeSelect(1 * 60), children: "Last hour" }), (0, jsx_runtime_1.jsx)(MenuItem_1.default, { onClick: () => handleQuickTimeSelect(3 * 60), children: "Last 3 hours" }), (0, jsx_runtime_1.jsx)(MenuItem_1.default, { onClick: () => handleQuickTimeSelect(8 * 60), children: "Last 8 hours" }), (0, jsx_runtime_1.jsx)(MenuItem_1.default, { onClick: () => handleQuickTimeSelect(16 * 60), children: "Last 16 hours" }), (0, jsx_runtime_1.jsx)(MenuItem_1.default, { onClick: () => handleQuickTimeSelect(24 * 60), children: "Last 24 hours" }), (0, jsx_runtime_1.jsx)(MenuItem_1.default, { onClick: () => handleQuickTimeSelect(7 * 24 * 60), children: "Last 7 days" }), (0, jsx_runtime_1.jsx)(MenuItem_1.default, { onClick: () => handleQuickTimeSelect(30 * 24 * 60), children: "Last month" })] })] }));
54
54
  }
@@ -5,6 +5,6 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const material_1 = require("@mui/material");
6
6
  const genericActionRenderer_1 = require("../genericActionRenderer");
7
7
  const CoreContextListCustomAction = ({ result, expanded, }) => {
8
- return ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: { width: '100%', my: 1 }, children: (0, jsx_runtime_1.jsx)("pre", { style: genericActionRenderer_1.genericFunctionRendererStyles.pre, children: (0, jsx_runtime_1.jsx)(genericActionRenderer_1.AnyVariableView, { value: result, expanded: expanded }) }) }));
8
+ return ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: { width: '100%', my: 1 }, children: (0, jsx_runtime_1.jsx)("pre", { style: genericActionRenderer_1.genericFunctionRendererStyles.pre, children: (0, jsx_runtime_1.jsx)(genericActionRenderer_1.AnyVariableView, { expanded: expanded, value: result }) }) }));
9
9
  };
10
10
  exports.CoreContextListCustomAction = CoreContextListCustomAction;
@@ -30,6 +30,6 @@ const CoreLogCreateCustomAction = ({ action, expanded }) => {
30
30
  return null;
31
31
  }
32
32
  const { logLevel, msg, data } = action.payload;
33
- return ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: { width: '100%', my: 1 }, children: (0, jsx_runtime_1.jsxs)(Alert_1.default, { severity: getSeverity(logLevel), children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body1", fontWeight: "bold", children: (0, quidproquo_core_1.resolveLookupText)(logLevel, quidproquo_core_1.LogLevelEnum) }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body1", children: msg }), data && ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", sx: { mt: 1, whiteSpace: 'pre-wrap' }, children: (0, jsx_runtime_1.jsx)("pre", { style: genericActionRenderer_1.genericFunctionRendererStyles.pre, children: (0, jsx_runtime_1.jsx)(genericActionRenderer_1.AnyVariableView, { value: data, expanded: expanded }) }) }))] }) }));
33
+ return ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: { width: '100%', my: 1 }, children: (0, jsx_runtime_1.jsxs)(Alert_1.default, { severity: getSeverity(logLevel), children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { fontWeight: "bold", variant: "body1", children: (0, quidproquo_core_1.resolveLookupText)(logLevel, quidproquo_core_1.LogLevelEnum) }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body1", children: msg }), data && ((0, jsx_runtime_1.jsx)(material_1.Typography, { sx: { mt: 1, whiteSpace: 'pre-wrap' }, variant: "body2", children: (0, jsx_runtime_1.jsx)("pre", { style: genericActionRenderer_1.genericFunctionRendererStyles.pre, children: (0, jsx_runtime_1.jsx)(genericActionRenderer_1.AnyVariableView, { expanded: expanded, value: data }) }) }))] }) }));
34
34
  };
35
35
  exports.CoreLogCreateCustomAction = CoreLogCreateCustomAction;
@@ -12,6 +12,6 @@ const CoreLogDisableEventHistoryCustomAction = ({ action }) => {
12
12
  return null;
13
13
  }
14
14
  const { reason } = action.payload;
15
- return ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: { width: '100%', my: 1 }, children: (0, jsx_runtime_1.jsx)(Alert_1.default, { severity: 'warning', children: (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body1", fontWeight: "bold", children: reason }) }) }));
15
+ return ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: { width: '100%', my: 1 }, children: (0, jsx_runtime_1.jsx)(Alert_1.default, { severity: 'warning', children: (0, jsx_runtime_1.jsx)(material_1.Typography, { fontWeight: "bold", variant: "body1", children: reason }) }) }));
16
16
  };
17
17
  exports.CoreLogDisableEventHistoryCustomAction = CoreLogDisableEventHistoryCustomAction;
@@ -13,6 +13,6 @@ const CoreLogTemplateLiteralCustomAction = ({ action, expanded }) => {
13
13
  return null;
14
14
  }
15
15
  const { messageParts: [strings, values], } = action.payload;
16
- return ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: { width: '100%', my: 1 }, children: (0, jsx_runtime_1.jsx)(Alert_1.default, { severity: 'info', children: (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body1", children: values.reduce((preComp, value, index) => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [preComp, (0, jsx_runtime_1.jsx)(genericActionRenderer_1.AnyVariableView, { value: value, expanded: expanded, hideStringQuotes: true }), (0, jsx_runtime_1.jsx)("span", { children: strings[index + 1] })] })), (0, jsx_runtime_1.jsx)("span", { children: strings[0] })) }) }) }));
16
+ return ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: { width: '100%', my: 1 }, children: (0, jsx_runtime_1.jsx)(Alert_1.default, { severity: 'info', children: (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body1", children: values.reduce((preComp, value, index) => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [preComp, (0, jsx_runtime_1.jsx)(genericActionRenderer_1.AnyVariableView, { expanded: expanded, hideStringQuotes: true, value: value }), (0, jsx_runtime_1.jsx)("span", { children: strings[index + 1] })] })), (0, jsx_runtime_1.jsx)("span", { children: strings[0] })) }) }) }));
17
17
  };
18
18
  exports.CoreLogTemplateLiteralCustomAction = CoreLogTemplateLiteralCustomAction;
@@ -11,7 +11,7 @@ const CoreNetworkRequestCustomAction = ({ action, result, expanded }) => {
11
11
  if (!action.payload) {
12
12
  return null;
13
13
  }
14
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("pre", { style: genericActionRenderer_1.genericFunctionRendererStyles.pre, children: (0, jsx_runtime_1.jsx)(genericActionRenderer_1.GenericFunctionRenderer, { functionName: 'askNetworkRequest', args: [
14
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("pre", { style: genericActionRenderer_1.genericFunctionRendererStyles.pre, children: (0, jsx_runtime_1.jsx)(genericActionRenderer_1.GenericFunctionRenderer, { args: [
15
15
  action.payload.method,
16
16
  action.payload.url,
17
17
  {
@@ -21,6 +21,6 @@ const CoreNetworkRequestCustomAction = ({ action, result, expanded }) => {
21
21
  params: action.payload.params,
22
22
  responseType: action.payload.responseType,
23
23
  },
24
- ], tooltipMap: ['method', 'url', 'httpRequestOptions'], expanded: expanded }) }), (0, jsx_runtime_1.jsx)(ActionResultDisplay_1.default, { action: action, result: result, expanded: expanded })] }));
24
+ ], expanded: expanded, functionName: 'askNetworkRequest', tooltipMap: ['method', 'url', 'httpRequestOptions'] }) }), (0, jsx_runtime_1.jsx)(ActionResultDisplay_1.default, { action: action, expanded: expanded, result: result })] }));
25
25
  };
26
26
  exports.CoreNetworkRequestCustomAction = CoreNetworkRequestCustomAction;
@@ -5,7 +5,7 @@ const AnyVariableView_1 = require("./AnyVariableView");
5
5
  const AnyVariableView_2 = require("./AnyVariableView");
6
6
  const ActionResultDisplay = ({ result, expanded }) => {
7
7
  const [successResult, errorResult] = result || [];
8
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [successResult !== undefined && !errorResult && ((0, jsx_runtime_1.jsxs)("pre", { style: AnyVariableView_1.genericFunctionRendererStyles.pre, children: [(0, jsx_runtime_1.jsx)("span", { children: "Result: " }), (0, jsx_runtime_1.jsx)(AnyVariableView_2.AnyVariableView, { value: successResult, expanded: expanded })] })), errorResult !== undefined && ((0, jsx_runtime_1.jsx)("pre", { style: AnyVariableView_1.genericFunctionRendererStyles.pre, children: (0, jsx_runtime_1.jsx)(AnyVariableView_2.AnyVariableView, { value: errorResult, expanded: expanded }) }))] }));
8
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [successResult !== undefined && !errorResult && ((0, jsx_runtime_1.jsxs)("pre", { style: AnyVariableView_1.genericFunctionRendererStyles.pre, children: [(0, jsx_runtime_1.jsx)("span", { children: "Result: " }), (0, jsx_runtime_1.jsx)(AnyVariableView_2.AnyVariableView, { expanded: expanded, value: successResult })] })), errorResult !== undefined && ((0, jsx_runtime_1.jsx)("pre", { style: AnyVariableView_1.genericFunctionRendererStyles.pre, children: (0, jsx_runtime_1.jsx)(AnyVariableView_2.AnyVariableView, { expanded: expanded, value: errorResult }) }))] }));
9
9
  };
10
10
  // Make sure to export ActionResultDisplay if it's defined in a separate file
11
11
  exports.default = ActionResultDisplay;
@@ -66,13 +66,13 @@ const tryDecodeBase64 = (text) => {
66
66
  const StringVariableView = ({ value, expanded, hideStringQuotes }) => {
67
67
  const asJson = tryParseJson(value);
68
68
  if (asJson.ok) {
69
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("span", { style: exports.genericFunctionRendererStyles.jsonComment, children: ['<', "json", '>'] }), (0, jsx_runtime_1.jsx)(exports.AnyVariableView, { value: asJson.value, expanded: expanded })] }));
69
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("span", { style: exports.genericFunctionRendererStyles.jsonComment, children: ['<', "json", '>'] }), (0, jsx_runtime_1.jsx)(exports.AnyVariableView, { expanded: expanded, value: asJson.value })] }));
70
70
  }
71
71
  const decoded = tryDecodeBase64(value);
72
72
  if (decoded !== undefined) {
73
73
  const asBase64Json = tryParseJson(decoded);
74
74
  if (asBase64Json.ok) {
75
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("span", { style: exports.genericFunctionRendererStyles.jsonComment, children: ['<', "base64-json", '>'] }), (0, jsx_runtime_1.jsx)(exports.AnyVariableView, { value: asBase64Json.value, expanded: expanded })] }));
75
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("span", { style: exports.genericFunctionRendererStyles.jsonComment, children: ['<', "base64-json", '>'] }), (0, jsx_runtime_1.jsx)(exports.AnyVariableView, { expanded: expanded, value: asBase64Json.value })] }));
76
76
  }
77
77
  }
78
78
  const trimmedValue = value.length > 25 && !expanded ? `${value.slice(0, 25)}...` : value;
@@ -87,17 +87,17 @@ const ArrayVariableView = ({ value, expanded }) => {
87
87
  return !expanded ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { children: "[" }), (0, jsx_runtime_1.jsx)("span", { style: exports.genericFunctionRendererStyles.emptyObject, children: "Empty Array" }), (0, jsx_runtime_1.jsx)("span", { children: "]" })] })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "[]" }));
88
88
  }
89
89
  if (expanded) {
90
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { children: "[" }), (0, jsx_runtime_1.jsx)("div", { style: { paddingLeft: 10 }, children: value.map((item, index) => ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(exports.AnyVariableView, { value: item, expanded: expanded }), ","] }, index))) }), (0, jsx_runtime_1.jsx)("span", { children: "]" })] }));
90
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { children: "[" }), (0, jsx_runtime_1.jsx)("div", { style: { paddingLeft: 10 }, children: value.map((item, index) => ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(exports.AnyVariableView, { expanded: expanded, value: item }), ","] }, index))) }), (0, jsx_runtime_1.jsx)("span", { children: "]" })] }));
91
91
  }
92
92
  return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { children: "[ " }), (0, jsx_runtime_1.jsxs)("span", { style: exports.genericFunctionRendererStyles.arrayItems, children: [value.length, " items"] }), (0, jsx_runtime_1.jsx)("span", { children: " ]" })] }));
93
93
  };
94
94
  exports.ArrayVariableView = ArrayVariableView;
95
95
  const KvsQueryConditionVariableView = ({ value, expanded }) => {
96
- return (0, jsx_runtime_1.jsx)(exports.GenericFunctionRenderer, { functionName: `kvs${value.operation}`, args: [value.key, value.valueA], expanded: expanded });
96
+ return (0, jsx_runtime_1.jsx)(exports.GenericFunctionRenderer, { args: [value.key, value.valueA], expanded: expanded, functionName: `kvs${value.operation}` });
97
97
  };
98
98
  exports.KvsQueryConditionVariableView = KvsQueryConditionVariableView;
99
99
  const KvsLogicalOperatorVariableView = ({ value, expanded }) => {
100
- return (0, jsx_runtime_1.jsx)(exports.GenericFunctionRenderer, { functionName: `kvs${value.operation}`, args: [value.conditions], expanded: expanded });
100
+ return (0, jsx_runtime_1.jsx)(exports.GenericFunctionRenderer, { args: [value.conditions], expanded: expanded, functionName: `kvs${value.operation}` });
101
101
  };
102
102
  exports.KvsLogicalOperatorVariableView = KvsLogicalOperatorVariableView;
103
103
  const EmptyObjectVariableView = ({ value, expanded }) => {
@@ -105,29 +105,29 @@ const EmptyObjectVariableView = ({ value, expanded }) => {
105
105
  };
106
106
  exports.EmptyObjectVariableView = EmptyObjectVariableView;
107
107
  const QpqBinaryDataVariableView = ({ value, expanded }) => {
108
- return ((0, jsx_runtime_1.jsx)("img", { src: `data:${value.mimeType || 'image/jpeg'};base64,${value.base64Data}`, alt: "Binary Data", style: { width: '100px', height: 'auto' } }));
108
+ return ((0, jsx_runtime_1.jsx)("img", { alt: "Binary Data", src: `data:${value.mimeType || 'image/jpeg'};base64,${value.base64Data}`, style: { width: '100px', height: 'auto' } }));
109
109
  };
110
110
  exports.QpqBinaryDataVariableView = QpqBinaryDataVariableView;
111
111
  const ObjectVariableView = ({ value, expanded }) => {
112
112
  if (Array.isArray(value)) {
113
- return (0, jsx_runtime_1.jsx)(exports.ArrayVariableView, { value: value, expanded: expanded });
113
+ return (0, jsx_runtime_1.jsx)(exports.ArrayVariableView, { expanded: expanded, value: value });
114
114
  }
115
115
  const objectKeys = Object.keys(value);
116
116
  if (value.operation && value.key && objectKeys.length <= 4) {
117
- return (0, jsx_runtime_1.jsx)(exports.KvsQueryConditionVariableView, { value: value, expanded: expanded });
117
+ return (0, jsx_runtime_1.jsx)(exports.KvsQueryConditionVariableView, { expanded: expanded, value: value });
118
118
  }
119
119
  else if (value.operation && value.conditions && objectKeys.length == 2) {
120
- return (0, jsx_runtime_1.jsx)(exports.KvsLogicalOperatorVariableView, { value: value, expanded: expanded });
120
+ return (0, jsx_runtime_1.jsx)(exports.KvsLogicalOperatorVariableView, { expanded: expanded, value: value });
121
121
  }
122
122
  else if (objectKeys.length == 0) {
123
- return (0, jsx_runtime_1.jsx)(exports.EmptyObjectVariableView, { value: value, expanded: expanded });
123
+ return (0, jsx_runtime_1.jsx)(exports.EmptyObjectVariableView, { expanded: expanded, value: value });
124
124
  }
125
125
  else if (value.base64Data && value.filename) {
126
- return (0, jsx_runtime_1.jsx)(exports.QpqBinaryDataVariableView, { value: value, expanded: expanded });
126
+ return (0, jsx_runtime_1.jsx)(exports.QpqBinaryDataVariableView, { expanded: expanded, value: value });
127
127
  }
128
128
  const cleanObject = JSON.parse(JSON.stringify(value));
129
129
  const cleanObjectKeys = Object.keys(cleanObject);
130
- return !expanded ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { children: '{ ' }), cleanObjectKeys.map((key, index) => ((0, jsx_runtime_1.jsxs)("span", { children: [key, Array.isArray(cleanObject[key]) && !expanded && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { children: ":" }), " ", (0, jsx_runtime_1.jsx)(exports.ArrayVariableView, { value: cleanObject[key], expanded: false })] })), index < cleanObjectKeys.length - 1 && ', '] }, key))), (0, jsx_runtime_1.jsx)("span", { children: ' }' })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { children: '{ ' }), (0, jsx_runtime_1.jsx)("div", { style: { paddingLeft: 10 }, children: cleanObjectKeys.map((key, index) => ((0, jsx_runtime_1.jsxs)("div", { children: [key, ": ", (0, jsx_runtime_1.jsx)(exports.AnyVariableView, { value: cleanObject[key], expanded: expanded }), ","] }, key))) }), (0, jsx_runtime_1.jsx)("span", { children: '}' })] }));
130
+ return !expanded ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { children: '{ ' }), cleanObjectKeys.map((key, index) => ((0, jsx_runtime_1.jsxs)("span", { children: [key, Array.isArray(cleanObject[key]) && !expanded && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { children: ":" }), " ", (0, jsx_runtime_1.jsx)(exports.ArrayVariableView, { expanded: false, value: cleanObject[key] })] })), index < cleanObjectKeys.length - 1 && ', '] }, key))), (0, jsx_runtime_1.jsx)("span", { children: ' }' })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { children: '{ ' }), (0, jsx_runtime_1.jsx)("div", { style: { paddingLeft: 10 }, children: cleanObjectKeys.map((key, index) => ((0, jsx_runtime_1.jsxs)("div", { children: [key, ": ", (0, jsx_runtime_1.jsx)(exports.AnyVariableView, { expanded: expanded, value: cleanObject[key] }), ","] }, key))) }), (0, jsx_runtime_1.jsx)("span", { children: '}' })] }));
131
131
  };
132
132
  exports.ObjectVariableView = ObjectVariableView;
133
133
  // Helper function to style values based on their type
@@ -145,10 +145,10 @@ const AnyVariableView = ({ value, expanded, hideStringQuotes }) => {
145
145
  return (0, jsx_runtime_1.jsx)("span", { style: exports.genericFunctionRendererStyles.numberValue, children: value });
146
146
  }
147
147
  else if (typeof value === 'string') {
148
- return (0, jsx_runtime_1.jsx)(exports.StringVariableView, { value: value, expanded: expanded, hideStringQuotes: hideStringQuotes });
148
+ return (0, jsx_runtime_1.jsx)(exports.StringVariableView, { expanded: expanded, hideStringQuotes: hideStringQuotes, value: value });
149
149
  }
150
150
  else if (typeof value === 'object') {
151
- return (0, jsx_runtime_1.jsx)(exports.ObjectVariableView, { value: value, expanded: expanded });
151
+ return (0, jsx_runtime_1.jsx)(exports.ObjectVariableView, { expanded: expanded, value: value });
152
152
  }
153
153
  // Fallback for other types, using normal text color
154
154
  return (0, jsx_runtime_1.jsx)("span", { children: value.toString() });
@@ -156,7 +156,7 @@ const AnyVariableView = ({ value, expanded, hideStringQuotes }) => {
156
156
  exports.AnyVariableView = AnyVariableView;
157
157
  const renderBasicArg = (arg, value, index, expanded, tooltip) => {
158
158
  const tooltipText = `${tooltip || arg}\n\nvalue: ${JSON.stringify(value, null, 2)}`;
159
- return ((0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: (0, jsx_runtime_1.jsx)("span", { title: tooltipText, children: (0, jsx_runtime_1.jsx)(exports.AnyVariableView, { value: value, expanded: expanded }) }) }, arg));
159
+ return ((0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: (0, jsx_runtime_1.jsx)("span", { title: tooltipText, children: (0, jsx_runtime_1.jsx)(exports.AnyVariableView, { expanded: expanded, value: value }) }) }, arg));
160
160
  };
161
161
  const GenericFunctionRenderer = ({ functionName, args, expanded, tooltipMap = [], argRenderer = renderBasicArg, }) => {
162
162
  // Convert args object to an array of key-value pairs and map each to a span element with dynamic styling and optional tooltip
@@ -7,9 +7,12 @@ exports.getGenericActionRenderer = void 0;
7
7
  const jsx_runtime_1 = require("react/jsx-runtime");
8
8
  const ActionResultDisplay_1 = __importDefault(require("./ActionResultDisplay"));
9
9
  const AnyVariableView_1 = require("./AnyVariableView"); // Assuming this is the correct path
10
- const getGenericActionRenderer = (functionName, argMap, tooltipMap = argMap) => ({ action, expanded, result }) => {
11
- const anyPayload = action.payload;
12
- const args = argMap.reduce((acc, arg) => (Object.assign(Object.assign({}, acc), { [arg]: anyPayload[arg] })), {});
13
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("pre", { style: AnyVariableView_1.genericFunctionRendererStyles.pre, children: (0, jsx_runtime_1.jsx)(AnyVariableView_1.GenericFunctionRenderer, { functionName: functionName, args: args, tooltipMap: tooltipMap, expanded: expanded }) }), (0, jsx_runtime_1.jsx)(ActionResultDisplay_1.default, { action: action, result: result, expanded: expanded })] }));
10
+ const getGenericActionRenderer = (functionName, argMap, tooltipMap = argMap) => {
11
+ const GenericActionRenderer = ({ action, expanded, result }) => {
12
+ const anyPayload = action.payload;
13
+ const args = argMap.reduce((acc, arg) => (Object.assign(Object.assign({}, acc), { [arg]: anyPayload[arg] })), {});
14
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("pre", { style: AnyVariableView_1.genericFunctionRendererStyles.pre, children: (0, jsx_runtime_1.jsx)(AnyVariableView_1.GenericFunctionRenderer, { args: args, expanded: expanded, functionName: functionName, tooltipMap: tooltipMap }) }), (0, jsx_runtime_1.jsx)(ActionResultDisplay_1.default, { action: action, expanded: expanded, result: result })] }));
15
+ };
16
+ return GenericActionRenderer;
14
17
  };
15
18
  exports.getGenericActionRenderer = getGenericActionRenderer;
@@ -28,6 +28,6 @@ const CostPerService = ({ logs }) => {
28
28
  }))
29
29
  .sort((a, b) => b.cost - a.cost);
30
30
  }, [logs]);
31
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "h5", gutterBottom: true, children: "Cost per Service" }), (0, jsx_runtime_1.jsx)(material_1.TableContainer, { component: material_1.Paper, children: (0, jsx_runtime_1.jsxs)(material_1.Table, { children: [(0, jsx_runtime_1.jsx)(material_1.TableHead, { children: (0, jsx_runtime_1.jsxs)(material_1.TableRow, { children: [(0, jsx_runtime_1.jsx)(material_1.TableCell, { children: "Service" }), (0, jsx_runtime_1.jsx)(material_1.TableCell, { align: "right", children: "Executions" }), (0, jsx_runtime_1.jsx)(material_1.TableCell, { align: "right", children: "Runtime (ms)" }), (0, jsx_runtime_1.jsx)(material_1.TableCell, { align: "right", children: "Cost ($)" })] }) }), (0, jsx_runtime_1.jsx)(material_1.TableBody, { children: data.map((row) => ((0, jsx_runtime_1.jsxs)(material_1.TableRow, { children: [(0, jsx_runtime_1.jsx)(material_1.TableCell, { component: "th", scope: "row", children: row.service }), (0, jsx_runtime_1.jsx)(material_1.TableCell, { align: "right", children: row.executions }), (0, jsx_runtime_1.jsx)(material_1.TableCell, { align: "right", children: row.runtime }), (0, jsx_runtime_1.jsx)(material_1.TableCell, { align: "right", children: row.cost.toFixed(8) })] }, row.service))) })] }) })] }));
31
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { gutterBottom: true, variant: "h5", children: "Cost per Service" }), (0, jsx_runtime_1.jsx)(material_1.TableContainer, { component: material_1.Paper, children: (0, jsx_runtime_1.jsxs)(material_1.Table, { children: [(0, jsx_runtime_1.jsx)(material_1.TableHead, { children: (0, jsx_runtime_1.jsxs)(material_1.TableRow, { children: [(0, jsx_runtime_1.jsx)(material_1.TableCell, { children: "Service" }), (0, jsx_runtime_1.jsx)(material_1.TableCell, { align: "right", children: "Executions" }), (0, jsx_runtime_1.jsx)(material_1.TableCell, { align: "right", children: "Runtime (ms)" }), (0, jsx_runtime_1.jsx)(material_1.TableCell, { align: "right", children: "Cost ($)" })] }) }), (0, jsx_runtime_1.jsx)(material_1.TableBody, { children: data.map((row) => ((0, jsx_runtime_1.jsxs)(material_1.TableRow, { children: [(0, jsx_runtime_1.jsx)(material_1.TableCell, { component: "th", scope: "row", children: row.service }), (0, jsx_runtime_1.jsx)(material_1.TableCell, { align: "right", children: row.executions }), (0, jsx_runtime_1.jsx)(material_1.TableCell, { align: "right", children: row.runtime }), (0, jsx_runtime_1.jsx)(material_1.TableCell, { align: "right", children: row.cost.toFixed(8) })] }, row.service))) })] }) })] }));
32
32
  };
33
33
  exports.CostPerService = CostPerService;
@@ -7,6 +7,6 @@ const material_1 = require("@mui/material");
7
7
  const useErrorsByType_1 = require("../hooks/useErrorsByType");
8
8
  const ErrorsByType = ({ logs }) => {
9
9
  const data = (0, useErrorsByType_1.useErrorsByType)(logs);
10
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "h5", gutterBottom: true, children: "Errors by Type" }), (0, jsx_runtime_1.jsxs)(recharts_1.BarChart, { width: 1200, height: 300, data: data, children: [(0, jsx_runtime_1.jsx)(recharts_1.CartesianGrid, { strokeDasharray: "3 3" }), (0, jsx_runtime_1.jsx)(recharts_1.XAxis, { dataKey: "errorText" }), (0, jsx_runtime_1.jsx)(recharts_1.YAxis, {}), (0, jsx_runtime_1.jsx)(recharts_1.Tooltip, {}), (0, jsx_runtime_1.jsx)(recharts_1.Legend, {}), (0, jsx_runtime_1.jsx)(recharts_1.Bar, { dataKey: "count", fill: "#8884d8" })] }), (0, jsx_runtime_1.jsx)(material_1.TableContainer, { component: material_1.Paper, children: (0, jsx_runtime_1.jsxs)(material_1.Table, { children: [(0, jsx_runtime_1.jsx)(material_1.TableHead, { children: (0, jsx_runtime_1.jsxs)(material_1.TableRow, { children: [(0, jsx_runtime_1.jsx)(material_1.TableCell, { children: "Error Type" }), (0, jsx_runtime_1.jsx)(material_1.TableCell, { align: "right", children: "Count" })] }) }), (0, jsx_runtime_1.jsx)(material_1.TableBody, { children: data.map((row) => ((0, jsx_runtime_1.jsxs)(material_1.TableRow, { children: [(0, jsx_runtime_1.jsx)(material_1.TableCell, { component: "th", scope: "row", children: row.errorText }), (0, jsx_runtime_1.jsx)(material_1.TableCell, { align: "right", children: row.count })] }, row.errorText))) })] }) })] }));
10
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { gutterBottom: true, variant: "h5", children: "Errors by Type" }), (0, jsx_runtime_1.jsxs)(recharts_1.BarChart, { data: data, height: 300, width: 1200, children: [(0, jsx_runtime_1.jsx)(recharts_1.CartesianGrid, { strokeDasharray: "3 3" }), (0, jsx_runtime_1.jsx)(recharts_1.XAxis, { dataKey: "errorText" }), (0, jsx_runtime_1.jsx)(recharts_1.YAxis, {}), (0, jsx_runtime_1.jsx)(recharts_1.Tooltip, {}), (0, jsx_runtime_1.jsx)(recharts_1.Legend, {}), (0, jsx_runtime_1.jsx)(recharts_1.Bar, { dataKey: "count", fill: "#8884d8" })] }), (0, jsx_runtime_1.jsx)(material_1.TableContainer, { component: material_1.Paper, children: (0, jsx_runtime_1.jsxs)(material_1.Table, { children: [(0, jsx_runtime_1.jsx)(material_1.TableHead, { children: (0, jsx_runtime_1.jsxs)(material_1.TableRow, { children: [(0, jsx_runtime_1.jsx)(material_1.TableCell, { children: "Error Type" }), (0, jsx_runtime_1.jsx)(material_1.TableCell, { align: "right", children: "Count" })] }) }), (0, jsx_runtime_1.jsx)(material_1.TableBody, { children: data.map((row) => ((0, jsx_runtime_1.jsxs)(material_1.TableRow, { children: [(0, jsx_runtime_1.jsx)(material_1.TableCell, { component: "th", scope: "row", children: row.errorText }), (0, jsx_runtime_1.jsx)(material_1.TableCell, { align: "right", children: row.count })] }, row.errorText))) })] }) })] }));
11
11
  };
12
12
  exports.ErrorsByType = ErrorsByType;
@@ -7,6 +7,6 @@ const material_1 = require("@mui/material");
7
7
  const useErrorsOverTime_1 = require("../hooks/useErrorsOverTime");
8
8
  const ErrorsOverTime = ({ logs, searchParams }) => {
9
9
  const data = (0, useErrorsOverTime_1.useErrorsOverTime)(logs, searchParams);
10
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "h5", gutterBottom: true, children: "Errors Over Time" }), (0, jsx_runtime_1.jsxs)(recharts_1.LineChart, { width: 1200, height: 300, data: data, children: [(0, jsx_runtime_1.jsx)(recharts_1.CartesianGrid, { strokeDasharray: "3 3" }), (0, jsx_runtime_1.jsx)(recharts_1.XAxis, { dataKey: "time" }), (0, jsx_runtime_1.jsx)(recharts_1.YAxis, {}), (0, jsx_runtime_1.jsx)(recharts_1.Tooltip, {}), (0, jsx_runtime_1.jsx)(recharts_1.Legend, {}), (0, jsx_runtime_1.jsx)(recharts_1.Line, { type: "monotone", dataKey: "errors", stroke: "#8884d8", activeDot: { r: 8 } })] })] }));
10
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { gutterBottom: true, variant: "h5", children: "Errors Over Time" }), (0, jsx_runtime_1.jsxs)(recharts_1.LineChart, { data: data, height: 300, width: 1200, children: [(0, jsx_runtime_1.jsx)(recharts_1.CartesianGrid, { strokeDasharray: "3 3" }), (0, jsx_runtime_1.jsx)(recharts_1.XAxis, { dataKey: "time" }), (0, jsx_runtime_1.jsx)(recharts_1.YAxis, {}), (0, jsx_runtime_1.jsx)(recharts_1.Tooltip, {}), (0, jsx_runtime_1.jsx)(recharts_1.Legend, {}), (0, jsx_runtime_1.jsx)(recharts_1.Line, { activeDot: { r: 8 }, dataKey: "errors", stroke: "#8884d8", type: "monotone" })] })] }));
11
11
  };
12
12
  exports.ErrorsOverTime = ErrorsOverTime;
@@ -7,8 +7,8 @@ const material_1 = require("@mui/material");
7
7
  const useRequestsByService_1 = require("../hooks/useRequestsByService");
8
8
  const RequestsByService = ({ logs, searchParams }) => {
9
9
  const data = (0, useRequestsByService_1.useRequestsByService)(logs, searchParams);
10
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "h5", gutterBottom: true, children: "Requests by Service" }), (0, jsx_runtime_1.jsxs)(recharts_1.LineChart, { width: 1200, height: 300, data: data, children: [(0, jsx_runtime_1.jsx)(recharts_1.CartesianGrid, { strokeDasharray: "3 3" }), (0, jsx_runtime_1.jsx)(recharts_1.XAxis, { dataKey: "time" }), (0, jsx_runtime_1.jsx)(recharts_1.YAxis, {}), (0, jsx_runtime_1.jsx)(recharts_1.Tooltip, {}), (0, jsx_runtime_1.jsx)(recharts_1.Legend, {}), Object.keys(data[0] || {})
10
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { gutterBottom: true, variant: "h5", children: "Requests by Service" }), (0, jsx_runtime_1.jsxs)(recharts_1.LineChart, { data: data, height: 300, width: 1200, children: [(0, jsx_runtime_1.jsx)(recharts_1.CartesianGrid, { strokeDasharray: "3 3" }), (0, jsx_runtime_1.jsx)(recharts_1.XAxis, { dataKey: "time" }), (0, jsx_runtime_1.jsx)(recharts_1.YAxis, {}), (0, jsx_runtime_1.jsx)(recharts_1.Tooltip, {}), (0, jsx_runtime_1.jsx)(recharts_1.Legend, {}), Object.keys(data[0] || {})
11
11
  .filter((key) => key !== 'time')
12
- .map((service) => ((0, jsx_runtime_1.jsx)(recharts_1.Line, { type: "monotone", dataKey: service, stroke: `#${Math.floor(Math.random() * 16777215).toString(16)}` }, service)))] })] }));
12
+ .map((service) => ((0, jsx_runtime_1.jsx)(recharts_1.Line, { dataKey: service, stroke: `#${Math.floor(Math.random() * 16777215).toString(16)}`, type: "monotone" }, service)))] })] }));
13
13
  };
14
14
  exports.RequestsByService = RequestsByService;
@@ -13,7 +13,7 @@ const useLogManagement = () => {
13
13
  window.viewLog = (log) => {
14
14
  setCorrelation(log.correlation);
15
15
  };
16
- }, [logs]);
16
+ }, [logs, setCorrelation]);
17
17
  (0, react_1.useEffect)(() => {
18
18
  console.log('logs attached to window, try: viewLog(logs[0])');
19
19
  }, []);
@@ -42,20 +42,23 @@ const useLogTreeData = (correlationId, hideQpqActions = false) => {
42
42
  }
43
43
  setIsLoading(false);
44
44
  });
45
+ // Stable identity so the effect below can list it as a dependency while
46
+ // still only re-running when a correlation id appears or disappears.
47
+ const fetchTreeData = (0, quidproquo_web_react_1.useEffectCallback)(() => __awaiter(void 0, void 0, void 0, function* () {
48
+ setIsLoading(true);
49
+ console.log('correlationId: ', correlationId);
50
+ const logHierarchy = yield (0, logic_1.getLogHierarchy)(baseUrlResolvers.getApiUrl(), correlationId, false, accessToken);
51
+ if (logHierarchy) {
52
+ setTreeData([logHierarchy]);
53
+ }
54
+ setIsLoading(false);
55
+ }));
56
+ const hasCorrelationId = !!correlationId;
45
57
  (0, react_1.useEffect)(() => {
46
- const fetchTreeData = () => __awaiter(void 0, void 0, void 0, function* () {
47
- setIsLoading(true);
48
- console.log('correlationId: ', correlationId);
49
- const logHierarchy = yield (0, logic_1.getLogHierarchy)(baseUrlResolvers.getApiUrl(), correlationId, false, accessToken);
50
- if (logHierarchy) {
51
- setTreeData([logHierarchy]);
52
- }
53
- setIsLoading(false);
54
- });
55
- if (correlationId) {
58
+ if (hasCorrelationId) {
56
59
  fetchTreeData();
57
60
  }
58
- }, [!!correlationId]);
61
+ }, [hasCorrelationId, fetchTreeData]);
59
62
  const result = {
60
63
  isLoading,
61
64
  refreshTreeData: refreshTreeData,
@@ -17,13 +17,14 @@ const useServiceNames = () => {
17
17
  const [serviceNames, setServiceNames] = (0, react_1.useState)(['All']);
18
18
  const accessToken = (0, quidproquo_web_react_1.useAuthAccessToken)();
19
19
  const baseUrlResolvers = (0, quidproquo_web_react_1.useBaseUrlResolvers)();
20
+ // Stable identity so the mount-only effect below can list it as a dependency.
21
+ const fetchData = (0, quidproquo_web_react_1.useEffectCallback)(() => __awaiter(void 0, void 0, void 0, function* () {
22
+ const updatedServiceNames = yield (0, logic_1.getServiceNames)(baseUrlResolvers.getApiUrl(), accessToken);
23
+ setServiceNames(updatedServiceNames);
24
+ }));
20
25
  (0, react_1.useEffect)(() => {
21
- const fetchData = () => __awaiter(void 0, void 0, void 0, function* () {
22
- const updatedServiceNames = yield (0, logic_1.getServiceNames)(baseUrlResolvers.getApiUrl(), accessToken);
23
- setServiceNames(updatedServiceNames);
24
- });
25
26
  fetchData();
26
- }, []);
27
+ }, [fetchData]);
27
28
  const serviceOptions = (0, react_1.useMemo)(() => serviceNames.map((s) => ({
28
29
  label: s
29
30
  .split('-')
@@ -24,14 +24,14 @@ const AdminDialog = ({ open, handleClose, title, selectedTab, onSelectTab, tabs,
24
24
  const handleTabChange = (event, newValue) => {
25
25
  onSelectTab(tabs[newValue]);
26
26
  };
27
- return ((0, jsx_runtime_1.jsxs)(material_1.Dialog, { open: open, scroll: 'paper', "aria-labelledby": "scroll-dialog-title", "aria-describedby": "scroll-dialog-description", onClose: handleClose, maxWidth: false, fullWidth: true, PaperProps: {
27
+ return ((0, jsx_runtime_1.jsxs)(material_1.Dialog, { "aria-describedby": "scroll-dialog-description", "aria-labelledby": "scroll-dialog-title", fullWidth: true, maxWidth: false, onClose: handleClose, open: open, PaperProps: {
28
28
  style: {
29
29
  width: '90%',
30
30
  height: '90%',
31
31
  maxHeight: '90%',
32
32
  maxWidth: '90%',
33
33
  },
34
- }, children: [(0, jsx_runtime_1.jsx)(material_1.DialogTitle, { id: "scroll-dialog-title", children: title }), tabs.length > 0 && ((0, jsx_runtime_1.jsx)(material_1.AppBar, { position: "sticky", color: "primary", children: (0, jsx_runtime_1.jsx)(material_1.Tabs, { value: selectedTabIndex, onChange: handleTabChange, textColor: "inherit", indicatorColor: "secondary", children: tabs.map((t) => ((0, jsx_runtime_1.jsx)(material_1.Tab, { label: t }, t))) }) })), (0, jsx_runtime_1.jsx)(material_1.DialogContent, { dividers: true, sx: {
34
+ }, scroll: 'paper', children: [(0, jsx_runtime_1.jsx)(material_1.DialogTitle, { id: "scroll-dialog-title", children: title }), tabs.length > 0 && ((0, jsx_runtime_1.jsx)(material_1.AppBar, { color: "primary", position: "sticky", children: (0, jsx_runtime_1.jsx)(material_1.Tabs, { indicatorColor: "secondary", onChange: handleTabChange, textColor: "inherit", value: selectedTabIndex, children: tabs.map((t) => ((0, jsx_runtime_1.jsx)(material_1.Tab, { label: t }, t))) }) })), (0, jsx_runtime_1.jsx)(material_1.DialogContent, { dividers: true, sx: {
35
35
  minHeight: '150px',
36
36
  overflowY: 'scroll',
37
37
  }, children: children }), buttons.length > 0 && ((0, jsx_runtime_1.jsx)(material_1.DialogActions, { children: buttons.map((b) => ((0, jsx_runtime_1.jsx)(material_1.Button, { disabled: b.disabled, onClick: b.onClick, children: b.text }, b.text))) }))] }));
@@ -32,5 +32,5 @@ function AsyncButton({ onClick, children, disabled, type }) {
32
32
  setLoading(false);
33
33
  }
34
34
  });
35
- return ((0, jsx_runtime_1.jsx)(Button_1.default, { onClick: handleLogin, fullWidth: true, variant: "contained", color: "primary", disabled: loading || disabled, style: { maxHeight: '100%', height: '4em' }, type: type, children: loading ? (0, jsx_runtime_1.jsx)(CircularProgress_1.default, { size: 24 }) : children }));
35
+ return ((0, jsx_runtime_1.jsx)(Button_1.default, { color: "primary", disabled: loading || disabled, fullWidth: true, onClick: handleLogin, style: { maxHeight: '100%', height: '4em' }, type: type, variant: "contained", children: loading ? (0, jsx_runtime_1.jsx)(CircularProgress_1.default, { size: 24 }) : children }));
36
36
  }
@@ -8,8 +8,8 @@ const AutocompleteInput = ({ label, value, options, onChange }) => {
8
8
  onChange(newValue ? newValue.value : '');
9
9
  };
10
10
  const selectedValue = options.find((option) => option.value === value) || null;
11
- return ((0, jsx_runtime_1.jsx)(material_1.FormControl, { fullWidth: true, children: (0, jsx_runtime_1.jsx)(material_1.Autocomplete, { options: options, getOptionLabel: (option) => option.label, value: selectedValue, onChange: handleChange, renderInput: (params) => ((0, jsx_runtime_1.jsx)(material_1.TextField, Object.assign({}, params, { label: label, InputLabelProps: {
11
+ return ((0, jsx_runtime_1.jsx)(material_1.FormControl, { fullWidth: true, children: (0, jsx_runtime_1.jsx)(material_1.Autocomplete, { getOptionLabel: (option) => option.label, onChange: handleChange, options: options, renderInput: (params) => ((0, jsx_runtime_1.jsx)(material_1.TextField, Object.assign({}, params, { InputLabelProps: {
12
12
  shrink: true,
13
- } }))) }) }));
13
+ }, label: label }))), value: selectedValue }) }));
14
14
  };
15
15
  exports.AutocompleteInput = AutocompleteInput;
@@ -16,6 +16,6 @@ const DataGrid = ({ items, columns, onRowClick }) => {
16
16
  valueGetter: 'valueGetter' in col ? (params) => col.valueGetter(params.row, params) : undefined,
17
17
  renderCell: (params) => { var _a; return (_a = col.renderCell) === null || _a === void 0 ? void 0 : _a.call(col, params.row, params); },
18
18
  }));
19
- return ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: { height: '100%', width: '100%' }, children: (0, jsx_runtime_1.jsx)(x_data_grid_1.DataGrid, { rows: items, columns: muiColumns, onRowClick: handleRowClick }) }));
19
+ return ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: { height: '100%', width: '100%' }, children: (0, jsx_runtime_1.jsx)(x_data_grid_1.DataGrid, { columns: muiColumns, onRowClick: handleRowClick, rows: items }) }));
20
20
  };
21
21
  exports.DataGrid = DataGrid;
@@ -11,5 +11,5 @@ function DataGridPagination() {
11
11
  const apiRef = (0, x_data_grid_1.useGridApiContext)();
12
12
  const page = (0, x_data_grid_1.useGridSelector)(apiRef, x_data_grid_1.gridPageSelector);
13
13
  const pageCount = (0, x_data_grid_1.useGridSelector)(apiRef, x_data_grid_1.gridPageCountSelector);
14
- return (0, jsx_runtime_1.jsx)(Pagination_1.default, { color: "primary", count: pageCount, page: page + 1, onChange: (event, value) => apiRef.current.setPage(value - 1) });
14
+ return (0, jsx_runtime_1.jsx)(Pagination_1.default, { color: "primary", count: pageCount, onChange: (event, value) => apiRef.current.setPage(value - 1), page: page + 1 });
15
15
  }
@@ -18,6 +18,6 @@ const DateCell = (props) => {
18
18
  month: '2-digit',
19
19
  year: '2-digit',
20
20
  });
21
- return ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'column' }, children: [(0, jsx_runtime_1.jsxs)(Typography_1.default, { variant: "body2", component: "span", children: [formattedDate, " ", formattedTime] }), (0, jsx_runtime_1.jsx)(LastSeen_1.default, { isoTime: date.toISOString(), timeStyle: "twitter" })] }));
21
+ return ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'column' }, children: [(0, jsx_runtime_1.jsxs)(Typography_1.default, { component: "span", variant: "body2", children: [formattedDate, " ", formattedTime] }), (0, jsx_runtime_1.jsx)(LastSeen_1.default, { isoTime: date.toISOString(), timeStyle: "twitter" })] }));
22
22
  };
23
23
  exports.DateCell = DateCell;
@@ -36,11 +36,11 @@ const DateRangePicker = ({ startIsoDateTime, endIsoDateTime, setStartIsoDateTime
36
36
  const handleQuickTimeClose = () => {
37
37
  setAnchorEl(null);
38
38
  };
39
- return ((0, jsx_runtime_1.jsxs)(x_date_pickers_1.LocalizationProvider, { dateAdapter: AdapterDateFns_1.AdapterDateFns, children: [(0, jsx_runtime_1.jsxs)(material_1.Grid, { container: true, spacing: 2, children: [(0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 6, children: (0, jsx_runtime_1.jsx)(material_1.Box, { position: "relative", children: (0, jsx_runtime_1.jsx)(material_1.FormControl, { fullWidth: true, children: (0, jsx_runtime_1.jsx)(x_date_pickers_1.DateTimePicker, { label: "Start DateTime", value: new Date(startIsoDateTime), onChange: handleStartDateChange }) }) }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 6, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { position: "relative", children: [(0, jsx_runtime_1.jsx)(material_1.FormControl, { fullWidth: true, children: (0, jsx_runtime_1.jsx)(x_date_pickers_1.DateTimePicker, { label: "End DateTime", value: new Date(endIsoDateTime), onChange: handleEndDateChange }) }), (0, jsx_runtime_1.jsx)(material_1.IconButton, { "aria-label": "quick time select", "aria-controls": "quick-time-menu", "aria-haspopup": "true", onClick: handleQuickTimeClick, sx: {
39
+ return ((0, jsx_runtime_1.jsxs)(x_date_pickers_1.LocalizationProvider, { dateAdapter: AdapterDateFns_1.AdapterDateFns, children: [(0, jsx_runtime_1.jsxs)(material_1.Grid, { container: true, spacing: 2, children: [(0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 6, children: (0, jsx_runtime_1.jsx)(material_1.Box, { position: "relative", children: (0, jsx_runtime_1.jsx)(material_1.FormControl, { fullWidth: true, children: (0, jsx_runtime_1.jsx)(x_date_pickers_1.DateTimePicker, { label: "Start DateTime", onChange: handleStartDateChange, value: new Date(startIsoDateTime) }) }) }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 6, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { position: "relative", children: [(0, jsx_runtime_1.jsx)(material_1.FormControl, { fullWidth: true, children: (0, jsx_runtime_1.jsx)(x_date_pickers_1.DateTimePicker, { label: "End DateTime", onChange: handleEndDateChange, value: new Date(endIsoDateTime) }) }), (0, jsx_runtime_1.jsx)(material_1.IconButton, { "aria-controls": "quick-time-menu", "aria-haspopup": "true", "aria-label": "quick time select", onClick: handleQuickTimeClick, sx: {
40
40
  position: 'absolute',
41
41
  right: '-28px',
42
42
  top: '50%',
43
43
  transform: 'translateY(-50%)',
44
- }, children: (0, jsx_runtime_1.jsx)(ExpandMore_1.default, {}) })] }) })] }), (0, jsx_runtime_1.jsxs)(material_1.Menu, { id: "quick-time-menu", anchorEl: anchorEl, keepMounted: true, open: Boolean(anchorEl), onClose: handleQuickTimeClose, children: [(0, jsx_runtime_1.jsx)(material_1.MenuItem, { onClick: () => handleQuickTimeSelect(5), children: "Last 5 minutes" }), (0, jsx_runtime_1.jsx)(material_1.MenuItem, { onClick: () => handleQuickTimeSelect(30), children: "Last 30 minutes" }), (0, jsx_runtime_1.jsx)(material_1.MenuItem, { onClick: () => handleQuickTimeSelect(1 * 60), children: "Last hour" }), (0, jsx_runtime_1.jsx)(material_1.MenuItem, { onClick: () => handleQuickTimeSelect(3 * 60), children: "Last 3 hours" }), (0, jsx_runtime_1.jsx)(material_1.MenuItem, { onClick: () => handleQuickTimeSelect(8 * 60), children: "Last 8 hours" }), (0, jsx_runtime_1.jsx)(material_1.MenuItem, { onClick: () => handleQuickTimeSelect(16 * 60), children: "Last 16 hours" }), (0, jsx_runtime_1.jsx)(material_1.MenuItem, { onClick: () => handleQuickTimeSelect(24 * 60), children: "Last 24 hours" }), (0, jsx_runtime_1.jsx)(material_1.MenuItem, { onClick: () => handleQuickTimeSelect(7 * 24 * 60), children: "Last 7 days" }), (0, jsx_runtime_1.jsx)(material_1.MenuItem, { onClick: () => handleQuickTimeSelect(30 * 24 * 60), children: "Last month" })] })] }));
44
+ }, children: (0, jsx_runtime_1.jsx)(ExpandMore_1.default, {}) })] }) })] }), (0, jsx_runtime_1.jsxs)(material_1.Menu, { anchorEl: anchorEl, id: "quick-time-menu", keepMounted: true, onClose: handleQuickTimeClose, open: Boolean(anchorEl), children: [(0, jsx_runtime_1.jsx)(material_1.MenuItem, { onClick: () => handleQuickTimeSelect(5), children: "Last 5 minutes" }), (0, jsx_runtime_1.jsx)(material_1.MenuItem, { onClick: () => handleQuickTimeSelect(30), children: "Last 30 minutes" }), (0, jsx_runtime_1.jsx)(material_1.MenuItem, { onClick: () => handleQuickTimeSelect(1 * 60), children: "Last hour" }), (0, jsx_runtime_1.jsx)(material_1.MenuItem, { onClick: () => handleQuickTimeSelect(3 * 60), children: "Last 3 hours" }), (0, jsx_runtime_1.jsx)(material_1.MenuItem, { onClick: () => handleQuickTimeSelect(8 * 60), children: "Last 8 hours" }), (0, jsx_runtime_1.jsx)(material_1.MenuItem, { onClick: () => handleQuickTimeSelect(16 * 60), children: "Last 16 hours" }), (0, jsx_runtime_1.jsx)(material_1.MenuItem, { onClick: () => handleQuickTimeSelect(24 * 60), children: "Last 24 hours" }), (0, jsx_runtime_1.jsx)(material_1.MenuItem, { onClick: () => handleQuickTimeSelect(7 * 24 * 60), children: "Last 7 days" }), (0, jsx_runtime_1.jsx)(material_1.MenuItem, { onClick: () => handleQuickTimeSelect(30 * 24 * 60), children: "Last month" })] })] }));
45
45
  };
46
46
  exports.DateRangePicker = DateRangePicker;
@@ -27,7 +27,7 @@ function MainLayout() {
27
27
  pb: '56px', // <— prevent content from being hidden behind bottom nav
28
28
  }, children: tabs
29
29
  .filter((t, index) => index === tab)
30
- .map((tab) => ((0, jsx_runtime_1.jsx)(tab.View, {}, tab.name))) }), (0, jsx_runtime_1.jsxs)(material_1.BottomNavigation, { value: tab, onChange: (event, newValue) => {
30
+ .map((tab) => ((0, jsx_runtime_1.jsx)(tab.View, {}, tab.name))) }), (0, jsx_runtime_1.jsxs)(material_1.BottomNavigation, { onChange: (event, newValue) => {
31
31
  // The trailing Logout / Loading actions are not tabs
32
32
  if (newValue < tabs.length) {
33
33
  handleTabOnChange(event, newValue);
@@ -41,5 +41,5 @@ function MainLayout() {
41
41
  borderTop: 1,
42
42
  borderColor: 'divider',
43
43
  bgcolor: 'background.paper',
44
- }, children: [tabs.map((t) => ((0, jsx_runtime_1.jsx)(material_1.BottomNavigationAction, { label: t.name, icon: t.icon }, t.name))), loading && (0, jsx_runtime_1.jsx)(material_1.BottomNavigationAction, { label: "Loading", icon: (0, jsx_runtime_1.jsx)(material_1.CircularProgress, { size: 18 }), disabled: true }), (0, jsx_runtime_1.jsx)(material_1.BottomNavigationAction, { label: "Logout", icon: (0, jsx_runtime_1.jsx)(Logout_1.default, {}), onClick: () => authApi.authLogout() })] })] }));
44
+ }, value: tab, children: [tabs.map((t) => ((0, jsx_runtime_1.jsx)(material_1.BottomNavigationAction, { icon: t.icon, label: t.name }, t.name))), loading && (0, jsx_runtime_1.jsx)(material_1.BottomNavigationAction, { disabled: true, icon: (0, jsx_runtime_1.jsx)(material_1.CircularProgress, { size: 18 }), label: "Loading" }), (0, jsx_runtime_1.jsx)(material_1.BottomNavigationAction, { icon: (0, jsx_runtime_1.jsx)(Logout_1.default, {}), label: "Logout", onClick: () => authApi.authLogout() })] })] }));
45
45
  }
@@ -7,8 +7,8 @@ const TextInput = ({ label, value, onChange }) => {
7
7
  const handleChange = (event) => {
8
8
  onChange(event.target.value);
9
9
  };
10
- return ((0, jsx_runtime_1.jsx)(material_1.FormControl, { fullWidth: true, children: (0, jsx_runtime_1.jsx)(material_1.TextField, { label: label, value: value || '', onChange: handleChange, InputLabelProps: {
10
+ return ((0, jsx_runtime_1.jsx)(material_1.FormControl, { fullWidth: true, children: (0, jsx_runtime_1.jsx)(material_1.TextField, { InputLabelProps: {
11
11
  shrink: true,
12
- } }) }));
12
+ }, label: label, onChange: handleChange, value: value || '' }) }));
13
13
  };
14
14
  exports.TextInput = TextInput;
@@ -47,6 +47,6 @@ const columns = [
47
47
  ];
48
48
  const AdminView = () => {
49
49
  const accessToken = (0, quidproquo_web_react_1.useAuthAccessToken)();
50
- return ((0, jsx_runtime_1.jsx)(components_1.TabViewBox, { header: () => ((0, jsx_runtime_1.jsxs)(components_1.GridContainer, { spacing: 2, xs: 12, children: [(0, jsx_runtime_1.jsx)(components_1.GridItem, { xs: 6, children: (0, jsx_runtime_1.jsx)(components_1.DateRangePicker, { startIsoDateTime: new Date().toISOString(), endIsoDateTime: new Date().toISOString(), setStartIsoDateTime: () => { }, setEndIsoDateTime: () => { } }) }), (0, jsx_runtime_1.jsx)(components_1.GridItem, { xs: 4, children: (0, jsx_runtime_1.jsx)(components_1.TextInput, { label: "Email", onChange: () => { }, value: "" }) }), (0, jsx_runtime_1.jsx)(components_1.GridItem, { xs: 2, children: (0, jsx_runtime_1.jsx)(components_1.AsyncButton, { onClick: () => __awaiter(void 0, void 0, void 0, function* () { }), children: "Search" }) })] })), body: () => (0, jsx_runtime_1.jsx)(components_1.DataGrid, { items: [], columns: columns }) }));
50
+ return ((0, jsx_runtime_1.jsx)(components_1.TabViewBox, { body: () => (0, jsx_runtime_1.jsx)(components_1.DataGrid, { columns: columns, items: [] }), header: () => ((0, jsx_runtime_1.jsxs)(components_1.GridContainer, { spacing: 2, xs: 12, children: [(0, jsx_runtime_1.jsx)(components_1.GridItem, { xs: 6, children: (0, jsx_runtime_1.jsx)(components_1.DateRangePicker, { endIsoDateTime: new Date().toISOString(), setEndIsoDateTime: () => { }, setStartIsoDateTime: () => { }, startIsoDateTime: new Date().toISOString() }) }), (0, jsx_runtime_1.jsx)(components_1.GridItem, { xs: 4, children: (0, jsx_runtime_1.jsx)(components_1.TextInput, { label: "Email", onChange: () => { }, value: "" }) }), (0, jsx_runtime_1.jsx)(components_1.GridItem, { xs: 2, children: (0, jsx_runtime_1.jsx)(components_1.AsyncButton, { onClick: () => __awaiter(void 0, void 0, void 0, function* () { }), children: "Search" }) })] })) }));
51
51
  };
52
52
  exports.default = (0, react_1.memo)(AdminView);
@@ -19,12 +19,13 @@ function useFederatedAddon() {
19
19
  const accessToken = (0, quidproquo_web_react_1.useAuthAccessToken)();
20
20
  const baseUrlResolvers = (0, quidproquo_web_react_1.useBaseUrlResolvers)();
21
21
  const loadAddons = (0, FederatedAddonProvider_1.useLoadFederatedAddons)();
22
+ // Stable identity so the mount-only effect below can list it as a dependency.
23
+ const doAsyncWork = (0, quidproquo_web_react_1.useEffectCallback)(() => __awaiter(this, void 0, void 0, function* () {
24
+ setLoading(true);
25
+ const addons = yield loadAddons({ baseUrlResolvers, accessToken });
26
+ setFederatedAddons(addons);
27
+ }));
22
28
  (0, react_1.useEffect)(() => {
23
- const doAsyncWork = () => __awaiter(this, void 0, void 0, function* () {
24
- setLoading(true);
25
- const addons = yield loadAddons({ baseUrlResolvers, accessToken });
26
- setFederatedAddons(addons);
27
- });
28
29
  doAsyncWork()
29
30
  .catch((e) => {
30
31
  console.log(e);
@@ -33,7 +34,7 @@ function useFederatedAddon() {
33
34
  .finally(() => {
34
35
  setLoading(false);
35
36
  });
36
- }, []);
37
+ }, [doAsyncWork]);
37
38
  return {
38
39
  addons: federatedAddons,
39
40
  loading,