@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.
- package/CHANGELOG.md +23 -1
- package/appcontainer/AppContainerModel.ts +2 -2
- package/build/types/core/HoistComponent.d.ts +4 -8
- package/build/types/core/HoistProps.d.ts +3 -1
- package/build/types/core/elem.d.ts +1 -3
- package/build/types/core/types/Types.d.ts +1 -0
- package/build/types/desktop/cmp/appOption/AutoRefreshAppOption.d.ts +1 -0
- package/build/types/desktop/cmp/appOption/ThemeAppOption.d.ts +1 -0
- package/build/types/icon/Icon.d.ts +7 -4
- package/build/types/security/BaseOAuthClient.d.ts +63 -46
- package/build/types/security/{TokenInfo.d.ts → Token.d.ts} +5 -4
- package/build/types/security/authzero/AuthZeroClient.d.ts +12 -7
- package/build/types/security/authzero/index.d.ts +1 -0
- package/build/types/security/msal/MsalClient.d.ts +63 -10
- package/build/types/security/msal/index.d.ts +1 -0
- package/build/types/svc/FetchService.d.ts +5 -5
- package/build/types/utils/react/LayoutPropUtils.d.ts +4 -4
- package/core/HoistComponent.ts +4 -8
- package/core/HoistProps.ts +4 -1
- package/core/elem.ts +0 -4
- package/core/types/Types.ts +1 -0
- package/desktop/cmp/input/ButtonGroupInput.ts +4 -3
- package/icon/Icon.ts +7 -4
- package/kit/blueprint/styles.scss +31 -18
- package/mobile/appcontainer/ToastSource.ts +2 -1
- package/package.json +1 -1
- package/security/BaseOAuthClient.ts +148 -165
- package/security/{TokenInfo.ts → Token.ts} +12 -9
- package/security/authzero/AuthZeroClient.ts +92 -80
- package/security/authzero/index.ts +7 -0
- package/security/msal/MsalClient.ts +204 -94
- package/security/msal/index.ts +7 -0
- package/svc/FetchService.ts +14 -11
- package/svc/IdentityService.ts +1 -1
- package/svc/LocalStorageService.ts +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- 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 {
|
|
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:
|
|
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
|
|
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
|
|
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
|
}
|