@elliemae/ds-global-header 2.0.2 → 2.1.0-rc.3
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/cjs/components/Toolbar/ToolbarItems.js +2 -9
- package/cjs/config/useValidateProps.js +1 -3
- package/cjs/config/validateHelpers.js +1 -1
- package/cjs/propTypes.js +1 -1
- package/esm/components/Toolbar/ToolbarItems.js +2 -9
- package/esm/config/useValidateProps.js +1 -3
- package/esm/config/validateHelpers.js +1 -1
- package/esm/propTypes.js +1 -1
- package/package.json +7 -7
- package/types/GlobalHeader.d.ts +8 -8
- package/types/GlobalHeaderTypes.d.ts +1 -4
- package/types/propTypes.d.ts +8 -8
|
@@ -27,7 +27,7 @@ var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
|
27
27
|
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
28
28
|
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
29
29
|
|
|
30
|
-
const _excluded = ["Icon", "type", "onClick", "componentProps", "label", "onKeyPress", "id"
|
|
30
|
+
const _excluded = ["Icon", "type", "onClick", "componentProps", "label", "onKeyPress", "id"];
|
|
31
31
|
|
|
32
32
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
33
33
|
|
|
@@ -49,8 +49,7 @@ const ToolbarItems = () => {
|
|
|
49
49
|
componentProps,
|
|
50
50
|
label,
|
|
51
51
|
onKeyPress,
|
|
52
|
-
id
|
|
53
|
-
CustomComponent
|
|
52
|
+
id
|
|
54
53
|
} = item,
|
|
55
54
|
otherProps = _objectWithoutProperties__default["default"](item, _excluded);
|
|
56
55
|
|
|
@@ -79,12 +78,6 @@ const ToolbarItems = () => {
|
|
|
79
78
|
componentProps: componentProps
|
|
80
79
|
}, otherProps), "".concat(instanceUID, "-ds-search-toggle-").concat(id));
|
|
81
80
|
|
|
82
|
-
case 'custom':
|
|
83
|
-
if (CustomComponent) return /*#__PURE__*/_jsx__default["default"](CustomComponent, {
|
|
84
|
-
item: item
|
|
85
|
-
});
|
|
86
|
-
return null;
|
|
87
|
-
|
|
88
81
|
default:
|
|
89
82
|
return /*#__PURE__*/jsxRuntime.jsx(styles.Button, _objectSpread(_objectSpread({
|
|
90
83
|
onClick: onClick,
|
|
@@ -80,9 +80,7 @@ const useValidateProps = props => {
|
|
|
80
80
|
|
|
81
81
|
if (toolbarItem.type === 'ds-popup-menu') {
|
|
82
82
|
validatePopupItem(toolbarItem.componentProps);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
if (toolbarItem.type === 'ds-app-picker') {
|
|
83
|
+
} else {
|
|
86
84
|
validateAppPickerItem(toolbarItem.componentProps);
|
|
87
85
|
}
|
|
88
86
|
}
|
|
@@ -28,7 +28,7 @@ const getVariableType = arg => {
|
|
|
28
28
|
if (arg === undefined) return 'undefined';
|
|
29
29
|
return typeof arg;
|
|
30
30
|
};
|
|
31
|
-
const isValidToolbarType = string => string === 'ds-app-picker' || string === 'ds-popup-menu' || string === 'ds-search-toggle'
|
|
31
|
+
const isValidToolbarType = string => string === 'ds-app-picker' || string === 'ds-popup-menu' || string === 'ds-search-toggle';
|
|
32
32
|
const throwBreadcrumbItemError = (validPropKey, invalidProp) => {
|
|
33
33
|
throw new Error("You are trying to pass a not valid \"".concat(validPropKey, "\" property for a breadcrumb item, please provide a valid type.\n\n Received: ").concat(invalidProp, " (").concat(typeof invalidProp, ")\n Expected: (").concat(breadcrumbProps[validPropKey], ")\n "));
|
|
34
34
|
};
|
package/cjs/propTypes.js
CHANGED
|
@@ -12,7 +12,7 @@ const breadcrumbItem = reactDesc.PropTypes.shape({
|
|
|
12
12
|
});
|
|
13
13
|
const toolbarItem = reactDesc.PropTypes.shape({
|
|
14
14
|
label: reactDesc.PropTypes.string.description('title tag description'),
|
|
15
|
-
type: reactDesc.PropTypes.oneOf(['ds-app-picker', 'ds-popup-menu'
|
|
15
|
+
type: reactDesc.PropTypes.oneOf(['ds-app-picker', 'ds-popup-menu']).description('use to select one of the out-of-the-box types of items'),
|
|
16
16
|
componentProps: reactDesc.PropTypes.object.description('props of out-of-the-box component'),
|
|
17
17
|
Icon: reactDesc.PropTypes.func.description('Icon to display'),
|
|
18
18
|
onClick: reactDesc.PropTypes.func.description('Callback executed on click')
|
|
@@ -17,7 +17,7 @@ import { GlobalHeaderContext } from '../../GlobalHeaderContext.js';
|
|
|
17
17
|
import { getDataProps } from '@elliemae/ds-props-helpers';
|
|
18
18
|
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
19
19
|
|
|
20
|
-
const _excluded = ["Icon", "type", "onClick", "componentProps", "label", "onKeyPress", "id"
|
|
20
|
+
const _excluded = ["Icon", "type", "onClick", "componentProps", "label", "onKeyPress", "id"];
|
|
21
21
|
|
|
22
22
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
23
23
|
|
|
@@ -39,8 +39,7 @@ const ToolbarItems = () => {
|
|
|
39
39
|
componentProps,
|
|
40
40
|
label,
|
|
41
41
|
onKeyPress,
|
|
42
|
-
id
|
|
43
|
-
CustomComponent
|
|
42
|
+
id
|
|
44
43
|
} = item,
|
|
45
44
|
otherProps = _objectWithoutProperties(item, _excluded);
|
|
46
45
|
|
|
@@ -69,12 +68,6 @@ const ToolbarItems = () => {
|
|
|
69
68
|
componentProps: componentProps
|
|
70
69
|
}, otherProps), "".concat(instanceUID, "-ds-search-toggle-").concat(id));
|
|
71
70
|
|
|
72
|
-
case 'custom':
|
|
73
|
-
if (CustomComponent) return /*#__PURE__*/_jsx(CustomComponent, {
|
|
74
|
-
item: item
|
|
75
|
-
});
|
|
76
|
-
return null;
|
|
77
|
-
|
|
78
71
|
default:
|
|
79
72
|
return /*#__PURE__*/jsx(Button, _objectSpread(_objectSpread({
|
|
80
73
|
onClick: onClick,
|
|
@@ -76,9 +76,7 @@ const useValidateProps = props => {
|
|
|
76
76
|
|
|
77
77
|
if (toolbarItem.type === 'ds-popup-menu') {
|
|
78
78
|
validatePopupItem(toolbarItem.componentProps);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
if (toolbarItem.type === 'ds-app-picker') {
|
|
79
|
+
} else {
|
|
82
80
|
validateAppPickerItem(toolbarItem.componentProps);
|
|
83
81
|
}
|
|
84
82
|
}
|
|
@@ -24,7 +24,7 @@ const getVariableType = arg => {
|
|
|
24
24
|
if (arg === undefined) return 'undefined';
|
|
25
25
|
return typeof arg;
|
|
26
26
|
};
|
|
27
|
-
const isValidToolbarType = string => string === 'ds-app-picker' || string === 'ds-popup-menu' || string === 'ds-search-toggle'
|
|
27
|
+
const isValidToolbarType = string => string === 'ds-app-picker' || string === 'ds-popup-menu' || string === 'ds-search-toggle';
|
|
28
28
|
const throwBreadcrumbItemError = (validPropKey, invalidProp) => {
|
|
29
29
|
throw new Error("You are trying to pass a not valid \"".concat(validPropKey, "\" property for a breadcrumb item, please provide a valid type.\n\n Received: ").concat(invalidProp, " (").concat(typeof invalidProp, ")\n Expected: (").concat(breadcrumbProps[validPropKey], ")\n "));
|
|
30
30
|
};
|
package/esm/propTypes.js
CHANGED
|
@@ -8,7 +8,7 @@ const breadcrumbItem = PropTypes.shape({
|
|
|
8
8
|
});
|
|
9
9
|
const toolbarItem = PropTypes.shape({
|
|
10
10
|
label: PropTypes.string.description('title tag description'),
|
|
11
|
-
type: PropTypes.oneOf(['ds-app-picker', 'ds-popup-menu'
|
|
11
|
+
type: PropTypes.oneOf(['ds-app-picker', 'ds-popup-menu']).description('use to select one of the out-of-the-box types of items'),
|
|
12
12
|
componentProps: PropTypes.object.description('props of out-of-the-box component'),
|
|
13
13
|
Icon: PropTypes.func.description('Icon to display'),
|
|
14
14
|
onClick: PropTypes.func.description('Callback executed on click')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-global-header",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.1.0-rc.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Global Header",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -132,12 +132,12 @@
|
|
|
132
132
|
"build": "node ../../scripts/build/build.js"
|
|
133
133
|
},
|
|
134
134
|
"dependencies": {
|
|
135
|
-
"@elliemae/ds-app-picker": "2.0.
|
|
136
|
-
"@elliemae/ds-grid": "2.0.
|
|
137
|
-
"@elliemae/ds-icons": "2.0.
|
|
138
|
-
"@elliemae/ds-popperjs": "2.0.
|
|
139
|
-
"@elliemae/ds-props-helpers": "2.0.
|
|
140
|
-
"@elliemae/ds-utilities": "2.0.
|
|
135
|
+
"@elliemae/ds-app-picker": "2.1.0-rc.3",
|
|
136
|
+
"@elliemae/ds-grid": "2.1.0-rc.3",
|
|
137
|
+
"@elliemae/ds-icons": "2.1.0-rc.3",
|
|
138
|
+
"@elliemae/ds-popperjs": "2.1.0-rc.3",
|
|
139
|
+
"@elliemae/ds-props-helpers": "2.1.0-rc.3",
|
|
140
|
+
"@elliemae/ds-utilities": "2.1.0-rc.3",
|
|
141
141
|
"react-desc": "~4.1.3",
|
|
142
142
|
"uid": "~2.0.0"
|
|
143
143
|
},
|
package/types/GlobalHeader.d.ts
CHANGED
|
@@ -6,28 +6,28 @@ declare const GlobalHeader: {
|
|
|
6
6
|
defaultProps: Props;
|
|
7
7
|
propTypes: {
|
|
8
8
|
Logo: {
|
|
9
|
-
defaultValue
|
|
9
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
10
10
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
11
11
|
};
|
|
12
|
-
isRequired: import("react-desc").
|
|
12
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
13
13
|
};
|
|
14
14
|
LogoWithBrand: {
|
|
15
|
-
defaultValue
|
|
15
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
16
16
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
17
17
|
};
|
|
18
|
-
isRequired: import("react-desc").
|
|
18
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
19
19
|
};
|
|
20
20
|
breadcrumb: {
|
|
21
|
-
defaultValue
|
|
21
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
22
22
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
23
23
|
};
|
|
24
|
-
isRequired: import("react-desc").
|
|
24
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
25
25
|
};
|
|
26
26
|
toolbar: {
|
|
27
|
-
defaultValue
|
|
27
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
28
28
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
29
29
|
};
|
|
30
|
-
isRequired: import("react-desc").
|
|
30
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
33
|
};
|
|
@@ -27,14 +27,11 @@ export interface BreadcrumbItemT {
|
|
|
27
27
|
length: number;
|
|
28
28
|
}
|
|
29
29
|
export interface ToolbarItemT {
|
|
30
|
-
type?: 'ds-app-picker' | 'ds-popup-menu' | 'ds-search-toggle'
|
|
30
|
+
type?: 'ds-app-picker' | 'ds-popup-menu' | 'ds-search-toggle';
|
|
31
31
|
label: string;
|
|
32
32
|
Icon: React.ComponentType<Record<string, unknown>>;
|
|
33
33
|
onClick: (event: React.MouseEvent<HTMLElement>) => void;
|
|
34
34
|
componentProps?: PopupPropsT | AppPickerProps | SearchTogglePropsT;
|
|
35
|
-
CustomComponent?: React.ComponentType<{
|
|
36
|
-
item: ToolbarItemT;
|
|
37
|
-
}>;
|
|
38
35
|
}
|
|
39
36
|
export interface PopupPropsT {
|
|
40
37
|
Icon?: React.ComponentType<Record<string, unknown>>;
|
package/types/propTypes.d.ts
CHANGED
|
@@ -3,27 +3,27 @@ export declare const breadcrumbItem: import("react-desc").PropTypesDescValue;
|
|
|
3
3
|
export declare const toolbarItem: import("react-desc").PropTypesDescValue;
|
|
4
4
|
export declare const globalHeaderProps: {
|
|
5
5
|
Logo: {
|
|
6
|
-
defaultValue
|
|
6
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
7
7
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
8
8
|
};
|
|
9
|
-
isRequired: import("react-desc").
|
|
9
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
10
10
|
};
|
|
11
11
|
LogoWithBrand: {
|
|
12
|
-
defaultValue
|
|
12
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
13
13
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
14
14
|
};
|
|
15
|
-
isRequired: import("react-desc").
|
|
15
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
16
16
|
};
|
|
17
17
|
breadcrumb: {
|
|
18
|
-
defaultValue
|
|
18
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
19
19
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
20
20
|
};
|
|
21
|
-
isRequired: import("react-desc").
|
|
21
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
22
22
|
};
|
|
23
23
|
toolbar: {
|
|
24
|
-
defaultValue
|
|
24
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
25
25
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
26
26
|
};
|
|
27
|
-
isRequired: import("react-desc").
|
|
27
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
28
28
|
};
|
|
29
29
|
};
|