@xh/hoist 64.0.1 → 64.0.4

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 (37) hide show
  1. package/CHANGELOG.md +23 -1
  2. package/appcontainer/AppContainerModel.ts +2 -2
  3. package/build/types/core/HoistComponent.d.ts +4 -8
  4. package/build/types/core/HoistProps.d.ts +3 -1
  5. package/build/types/core/elem.d.ts +1 -3
  6. package/build/types/core/types/Types.d.ts +1 -0
  7. package/build/types/desktop/cmp/appOption/AutoRefreshAppOption.d.ts +1 -0
  8. package/build/types/desktop/cmp/appOption/ThemeAppOption.d.ts +1 -0
  9. package/build/types/icon/Icon.d.ts +7 -4
  10. package/build/types/security/BaseOAuthClient.d.ts +63 -46
  11. package/build/types/security/{TokenInfo.d.ts → Token.d.ts} +5 -4
  12. package/build/types/security/authzero/AuthZeroClient.d.ts +12 -7
  13. package/build/types/security/authzero/index.d.ts +1 -0
  14. package/build/types/security/msal/MsalClient.d.ts +63 -10
  15. package/build/types/security/msal/index.d.ts +1 -0
  16. package/build/types/svc/FetchService.d.ts +5 -5
  17. package/build/types/utils/react/LayoutPropUtils.d.ts +4 -4
  18. package/core/HoistComponent.ts +4 -8
  19. package/core/HoistProps.ts +4 -1
  20. package/core/elem.ts +0 -4
  21. package/core/types/Types.ts +1 -0
  22. package/desktop/cmp/input/ButtonGroupInput.ts +4 -3
  23. package/icon/Icon.ts +7 -4
  24. package/kit/blueprint/styles.scss +31 -18
  25. package/mobile/appcontainer/ToastSource.ts +2 -1
  26. package/package.json +1 -1
  27. package/security/BaseOAuthClient.ts +148 -165
  28. package/security/{TokenInfo.ts → Token.ts} +12 -9
  29. package/security/authzero/AuthZeroClient.ts +92 -80
  30. package/security/authzero/index.ts +7 -0
  31. package/security/msal/MsalClient.ts +204 -94
  32. package/security/msal/index.ts +7 -0
  33. package/svc/FetchService.ts +14 -11
  34. package/svc/IdentityService.ts +1 -1
  35. package/svc/LocalStorageService.ts +1 -1
  36. package/tsconfig.tsbuildinfo +1 -1
  37. package/utils/react/LayoutPropUtils.ts +4 -4
@@ -4,7 +4,7 @@
4
4
  *
5
5
  * Copyright © 2024 Extremely Heavy Industries Inc.
6
6
  */
7
- import {HoistProps, LayoutProps} from '@xh/hoist/core';
7
+ import {LayoutProps, PlainObject} from '@xh/hoist/core';
8
8
  import {forOwn, isEmpty, isNumber, isString, isNil, omit, pick} from 'lodash';
9
9
 
10
10
  /**
@@ -40,7 +40,7 @@ import {forOwn, isEmpty, isNumber, isString, isNil, omit, pick} from 'lodash';
40
40
  * that afforded by the underlying flexbox styles. In particular, it accepts flex and sizing props
41
41
  * as raw numbers rather than strings.
42
42
  */
43
- export function getLayoutProps(props: HoistProps): LayoutProps {
43
+ export function getLayoutProps(props: PlainObject): LayoutProps {
44
44
  // Harvest all keys of interest
45
45
  const ret: LayoutProps = pick(props, allKeys) as LayoutProps;
46
46
 
@@ -66,14 +66,14 @@ export function getLayoutProps(props: HoistProps): LayoutProps {
66
66
  /**
67
67
  * Return all non-layout related props found in props.
68
68
  */
69
- export function getNonLayoutProps<T extends HoistProps>(props: T): T {
69
+ export function getNonLayoutProps<T extends PlainObject>(props: T): T {
70
70
  return omit(props, allKeys) as T;
71
71
  }
72
72
 
73
73
  /**
74
74
  * Split a set of props into layout and non-layout props.
75
75
  */
76
- export function splitLayoutProps<T extends HoistProps>(props: T): [LayoutProps, T] {
76
+ export function splitLayoutProps<T extends PlainObject>(props: T): [LayoutProps, T] {
77
77
  const layoutProps = getLayoutProps(props);
78
78
  return [layoutProps, isEmpty(layoutProps) ? props : getNonLayoutProps(props)];
79
79
  }