@portnet/ui 4.0.1 → 4.0.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.
|
@@ -22,6 +22,7 @@ var _PuiTable = _interopRequireDefault(require("../../../table/PuiTable"));
|
|
|
22
22
|
var _PuiDefaultPage = _interopRequireDefault(require("./PuiDefaultPage"));
|
|
23
23
|
var _ExpandMore = _interopRequireDefault(require("@mui/icons-material/ExpandMore"));
|
|
24
24
|
var _ExpandLess = _interopRequireDefault(require("@mui/icons-material/ExpandLess"));
|
|
25
|
+
var _material = require("@mui/material");
|
|
25
26
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
26
27
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
27
28
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
@@ -66,7 +67,9 @@ const PuiSearchPage = _ref2 => {
|
|
|
66
67
|
onSubmit,
|
|
67
68
|
children: _children,
|
|
68
69
|
additionalActions,
|
|
69
|
-
collapsibleSearchSection = true
|
|
70
|
+
collapsibleSearchSection = true,
|
|
71
|
+
// Collapsible by default
|
|
72
|
+
headerActions // New prop for header actions
|
|
70
73
|
} = _ref2;
|
|
71
74
|
const [isSearchSectionExpanded, setSearchSectionExpanded] = (0, _react.useState)(false);
|
|
72
75
|
const toggleSearchSection = () => {
|
|
@@ -82,7 +85,14 @@ const PuiSearchPage = _ref2 => {
|
|
|
82
85
|
loading: loading,
|
|
83
86
|
retour: retour,
|
|
84
87
|
onRetour: onRetour,
|
|
85
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
88
|
+
children: [headerActions && /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
89
|
+
sx: {
|
|
90
|
+
display: "flex",
|
|
91
|
+
justifyContent: "flex-end",
|
|
92
|
+
mb: 2
|
|
93
|
+
},
|
|
94
|
+
children: headerActions
|
|
95
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_PuiSection.default, {
|
|
86
96
|
title: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
87
97
|
onClick: toggleSearchSection,
|
|
88
98
|
style: {
|
|
@@ -214,12 +224,14 @@ PuiSearchPage.propTypes = {
|
|
|
214
224
|
action: _propTypes.default.func.isRequired,
|
|
215
225
|
icon: _propTypes.default.element
|
|
216
226
|
})),
|
|
217
|
-
collapsibleSearchSection: _propTypes.default.bool
|
|
227
|
+
collapsibleSearchSection: _propTypes.default.bool,
|
|
228
|
+
headerActions: _propTypes.default.node // New prop type
|
|
218
229
|
};
|
|
219
230
|
PuiSearchPage.defaultProps = {
|
|
220
231
|
formik: true,
|
|
221
232
|
loading: false,
|
|
222
233
|
additionalActions: [],
|
|
223
|
-
collapsibleSearchSection: true
|
|
234
|
+
collapsibleSearchSection: true,
|
|
235
|
+
headerActions: null
|
|
224
236
|
};
|
|
225
237
|
var _default = exports.default = PuiSearchPage;
|
package/package.json
CHANGED
|
@@ -1,105 +1,105 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@portnet/ui",
|
|
3
|
-
"version": "4.0.
|
|
4
|
-
"description": "Portnet UI",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"react",
|
|
7
|
-
"components",
|
|
8
|
-
"ui"
|
|
9
|
-
],
|
|
10
|
-
"main": "dist/index.js",
|
|
11
|
-
"private": false,
|
|
12
|
-
"files": [
|
|
13
|
-
"dist",
|
|
14
|
-
"README.md"
|
|
15
|
-
],
|
|
16
|
-
"dependencies": {
|
|
17
|
-
"@emotion/react": "^11.10.5",
|
|
18
|
-
"@emotion/styled": "^11.10.5",
|
|
19
|
-
"@mui/icons-material": "^5.10.16",
|
|
20
|
-
"@mui/lab": "^5.0.0-alpha.60",
|
|
21
|
-
"@mui/material": "^5.10.16",
|
|
22
|
-
"@mui/x-data-grid": "^5.17.26",
|
|
23
|
-
"@mui/x-data-grid-pro": "^5.17.26",
|
|
24
|
-
"@mui/x-date-pickers": "^7.26.0",
|
|
25
|
-
"@testing-library/jest-dom": "^5.16.5",
|
|
26
|
-
"@testing-library/react": "^13.4.0",
|
|
27
|
-
"@testing-library/user-event": "^13.5.0",
|
|
28
|
-
"ajv": "^8.17.1",
|
|
29
|
-
"ajv-keywords": "^5.1.0",
|
|
30
|
-
"axios": "^
|
|
31
|
-
"dayjs": "^1.11.13",
|
|
32
|
-
"formik": "^2.2.9",
|
|
33
|
-
"lodash": "^4.17.21",
|
|
34
|
-
"moment": "^2.
|
|
35
|
-
"moment-timezone": "^0.5.45",
|
|
36
|
-
"react": "^18.2.0",
|
|
37
|
-
"react-dom": "^18.2.0",
|
|
38
|
-
"react-scripts": "^5.0.1",
|
|
39
|
-
"react-transition-group": "^4.4.5",
|
|
40
|
-
"styled-components": "^6.1.3",
|
|
41
|
-
"uuid": "^9.0.0",
|
|
42
|
-
"web-vitals": "^2.1.4",
|
|
43
|
-
"yup": "^0.32.11"
|
|
44
|
-
},
|
|
45
|
-
"peerDependencies": {
|
|
46
|
-
"react-router-dom": "^6.0.0"
|
|
47
|
-
},
|
|
48
|
-
"scripts": {
|
|
49
|
-
"start": "react-scripts start",
|
|
50
|
-
"build": "rimraf dist && cross-env NODE_ENV=production babel src/lib --out-dir dist --copy-files",
|
|
51
|
-
"test": "react-scripts test",
|
|
52
|
-
"eject": "react-scripts eject",
|
|
53
|
-
"storybook": "storybook dev -p 6006 -s public",
|
|
54
|
-
"build-storybook": "storybook build -s public"
|
|
55
|
-
},
|
|
56
|
-
"eslintConfig": {
|
|
57
|
-
"extends": [
|
|
58
|
-
"react-app",
|
|
59
|
-
"react-app/jest"
|
|
60
|
-
],
|
|
61
|
-
"overrides": [
|
|
62
|
-
{
|
|
63
|
-
"files": [
|
|
64
|
-
"**/*.stories.*"
|
|
65
|
-
],
|
|
66
|
-
"rules": {
|
|
67
|
-
"import/no-anonymous-default-export": "off"
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
]
|
|
71
|
-
},
|
|
72
|
-
"browserslist": {
|
|
73
|
-
"production": [
|
|
74
|
-
">0.2%",
|
|
75
|
-
"not dead",
|
|
76
|
-
"not op_mini all"
|
|
77
|
-
],
|
|
78
|
-
"development": [
|
|
79
|
-
"last 1 chrome version",
|
|
80
|
-
"last 1 firefox version",
|
|
81
|
-
"last 1 safari version"
|
|
82
|
-
]
|
|
83
|
-
},
|
|
84
|
-
"devDependencies": {
|
|
85
|
-
"@babel/cli": "^7.19.3",
|
|
86
|
-
"@babel/core": "^7.20.5",
|
|
87
|
-
"@babel/preset-env": "^7.20.2",
|
|
88
|
-
"@babel/preset-react": "^7.18.6",
|
|
89
|
-
"@storybook/addon-actions": "^7.6.4",
|
|
90
|
-
"@storybook/addon-essentials": "^7.6.4",
|
|
91
|
-
"@storybook/addon-interactions": "^7.6.4",
|
|
92
|
-
"@storybook/addon-links": "^7.6.4",
|
|
93
|
-
"@storybook/node-logger": "^7.6.4",
|
|
94
|
-
"@storybook/preset-create-react-app": "^7.6.4",
|
|
95
|
-
"@storybook/react": "^7.6.4",
|
|
96
|
-
"@storybook/react-webpack5": "^7.6.4",
|
|
97
|
-
"@storybook/testing-library": "^0.2.2",
|
|
98
|
-
"cross-env": "^7.0.3",
|
|
99
|
-
"husky": "^4.3.8",
|
|
100
|
-
"prop-types": "^15.8.1",
|
|
101
|
-
"rimraf": "^5.0.5",
|
|
102
|
-
"storybook": "^7.6.4",
|
|
103
|
-
"webpack": "^5.75.0"
|
|
104
|
-
}
|
|
105
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@portnet/ui",
|
|
3
|
+
"version": "4.0.2",
|
|
4
|
+
"description": "Portnet UI",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"react",
|
|
7
|
+
"components",
|
|
8
|
+
"ui"
|
|
9
|
+
],
|
|
10
|
+
"main": "dist/index.js",
|
|
11
|
+
"private": false,
|
|
12
|
+
"files": [
|
|
13
|
+
"dist",
|
|
14
|
+
"README.md"
|
|
15
|
+
],
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@emotion/react": "^11.10.5",
|
|
18
|
+
"@emotion/styled": "^11.10.5",
|
|
19
|
+
"@mui/icons-material": "^5.10.16",
|
|
20
|
+
"@mui/lab": "^5.0.0-alpha.60",
|
|
21
|
+
"@mui/material": "^5.10.16",
|
|
22
|
+
"@mui/x-data-grid": "^5.17.26",
|
|
23
|
+
"@mui/x-data-grid-pro": "^5.17.26",
|
|
24
|
+
"@mui/x-date-pickers": "^7.26.0",
|
|
25
|
+
"@testing-library/jest-dom": "^5.16.5",
|
|
26
|
+
"@testing-library/react": "^13.4.0",
|
|
27
|
+
"@testing-library/user-event": "^13.5.0",
|
|
28
|
+
"ajv": "^8.17.1",
|
|
29
|
+
"ajv-keywords": "^5.1.0",
|
|
30
|
+
"axios": "^1.2.2",
|
|
31
|
+
"dayjs": "^1.11.13",
|
|
32
|
+
"formik": "^2.2.9",
|
|
33
|
+
"lodash": "^4.17.21",
|
|
34
|
+
"moment": "^2.30.1",
|
|
35
|
+
"moment-timezone": "^0.5.45",
|
|
36
|
+
"react": "^18.2.0",
|
|
37
|
+
"react-dom": "^18.2.0",
|
|
38
|
+
"react-scripts": "^5.0.1",
|
|
39
|
+
"react-transition-group": "^4.4.5",
|
|
40
|
+
"styled-components": "^6.1.3",
|
|
41
|
+
"uuid": "^9.0.0",
|
|
42
|
+
"web-vitals": "^2.1.4",
|
|
43
|
+
"yup": "^0.32.11"
|
|
44
|
+
},
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"react-router-dom": "^6.0.0"
|
|
47
|
+
},
|
|
48
|
+
"scripts": {
|
|
49
|
+
"start": "react-scripts start",
|
|
50
|
+
"build": "rimraf dist && cross-env NODE_ENV=production babel src/lib --out-dir dist --copy-files",
|
|
51
|
+
"test": "react-scripts test",
|
|
52
|
+
"eject": "react-scripts eject",
|
|
53
|
+
"storybook": "storybook dev -p 6006 -s public",
|
|
54
|
+
"build-storybook": "storybook build -s public"
|
|
55
|
+
},
|
|
56
|
+
"eslintConfig": {
|
|
57
|
+
"extends": [
|
|
58
|
+
"react-app",
|
|
59
|
+
"react-app/jest"
|
|
60
|
+
],
|
|
61
|
+
"overrides": [
|
|
62
|
+
{
|
|
63
|
+
"files": [
|
|
64
|
+
"**/*.stories.*"
|
|
65
|
+
],
|
|
66
|
+
"rules": {
|
|
67
|
+
"import/no-anonymous-default-export": "off"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
"browserslist": {
|
|
73
|
+
"production": [
|
|
74
|
+
">0.2%",
|
|
75
|
+
"not dead",
|
|
76
|
+
"not op_mini all"
|
|
77
|
+
],
|
|
78
|
+
"development": [
|
|
79
|
+
"last 1 chrome version",
|
|
80
|
+
"last 1 firefox version",
|
|
81
|
+
"last 1 safari version"
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
"devDependencies": {
|
|
85
|
+
"@babel/cli": "^7.19.3",
|
|
86
|
+
"@babel/core": "^7.20.5",
|
|
87
|
+
"@babel/preset-env": "^7.20.2",
|
|
88
|
+
"@babel/preset-react": "^7.18.6",
|
|
89
|
+
"@storybook/addon-actions": "^7.6.4",
|
|
90
|
+
"@storybook/addon-essentials": "^7.6.4",
|
|
91
|
+
"@storybook/addon-interactions": "^7.6.4",
|
|
92
|
+
"@storybook/addon-links": "^7.6.4",
|
|
93
|
+
"@storybook/node-logger": "^7.6.4",
|
|
94
|
+
"@storybook/preset-create-react-app": "^7.6.4",
|
|
95
|
+
"@storybook/react": "^7.6.4",
|
|
96
|
+
"@storybook/react-webpack5": "^7.6.4",
|
|
97
|
+
"@storybook/testing-library": "^0.2.2",
|
|
98
|
+
"cross-env": "^7.0.3",
|
|
99
|
+
"husky": "^4.3.8",
|
|
100
|
+
"prop-types": "^15.8.1",
|
|
101
|
+
"rimraf": "^5.0.5",
|
|
102
|
+
"storybook": "^7.6.4",
|
|
103
|
+
"webpack": "^5.75.0"
|
|
104
|
+
}
|
|
105
|
+
}
|