@xh/hoist 59.3.0 → 59.3.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 59.3.1 - 2023-11-10
4
+
5
+ ### 🐞 Bug Fixes
6
+
7
+ * Ensure an unauthorized response from a proxy service endpoint does not prompt the user to refresh
8
+ and log in again on an SSO-enabled application.
9
+ * Revert change to `Panel` which affected where `className` was applied with `modalSupport` enabled
10
+
3
11
  ## 59.3.0 - 2023-11-09
4
12
 
5
13
  ### 🎁 New Features
@@ -345,6 +345,7 @@ export class ExceptionHandler {
345
345
  // Detect an expired server session for special messaging, but only for requests back to the
346
346
  // app's own server on a relative URL (to avoid triggering w/auth failures on remote CORS URLs).
347
347
  private sessionExpired(e: HoistException): boolean {
348
+ if (XH.appSpec.isSSO) return false;
348
349
  const {httpStatus, fetchOptions} = e,
349
350
  relativeRequest = !fetchOptions?.url?.startsWith('http');
350
351
 
@@ -90,5 +90,5 @@ export const dismissButton = hoistCmp.factory<ExceptionDialogModel>(({model}) =>
90
90
  });
91
91
 
92
92
  function isSessionExpired(e) {
93
- return e?.httpStatus === 401;
93
+ return !XH.appSpec.isSSO && e?.httpStatus === 401;
94
94
  }
@@ -228,19 +228,21 @@ export const [Panel, panel] = hoistCmp.withFactory<PanelProps>({
228
228
 
229
229
  const useResizeContainer = resizable || collapsible || showSplitter;
230
230
 
231
- // 5a) For modalSupport, className + testId need additional frame that will follow content
231
+ // For modalSupport, create additional frame that will follow content to portal and apply
232
+ // className and testId accordingly
232
233
  if (modalSupportModel) {
233
234
  item = modalSupport({
234
235
  model: modalSupportModel,
235
- item: frame({item, className, testId})
236
+ item: frame({
237
+ item,
238
+ className: model.isModal ? className : undefined,
239
+ testId: model.isModal ? testId : undefined
240
+ })
236
241
  });
237
-
238
- return useResizeContainer
239
- ? resizeContainer({ref, item})
240
- : box({ref, item, ...layoutProps});
241
242
  }
242
243
 
243
- // 5b) No modalSupport, className + testId applied directly to parent
244
+ testId = model.isModal ? undefined : testId; // Only apply testId once
245
+
244
246
  return useResizeContainer
245
247
  ? resizeContainer({ref, item, className, testId})
246
248
  : box({ref, item, className, testId, ...layoutProps});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xh/hoist",
3
- "version": "59.3.0",
3
+ "version": "59.3.1",
4
4
  "description": "Hoist add-on for building and deploying React Applications.",
5
5
  "repository": "github:xh/hoist-react",
6
6
  "homepage": "https://xh.io",