tenjin-ui-kit 0.1.0-dev.0
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/README.md +13 -0
- package/assets/images/MicrosoftTeams-image (1).png +0 -0
- package/assets/images/tenjin-4.0-logo.png +0 -0
- package/common/hooks/apiHooks.js +223 -0
- package/common/hooks/newApiHook.js +270 -0
- package/common/utils/security/index.js +11 -0
- package/common/utils/security/securityConfig.js +8 -0
- package/components/Canvas.js +254 -0
- package/components/DragBox/index.js +45 -0
- package/components/InputWithChip/index.js +187 -0
- package/components/RightContext/index.css +20 -0
- package/components/RightContext/index.js +86 -0
- package/components/WorkFlow.js +47 -0
- package/components/WorkFlowBuilder.js +130 -0
- package/components/alert/Style.js +23 -0
- package/components/alert/index.js +69 -0
- package/components/attachment/index.js +138 -0
- package/components/authenticationProvider/AuthError.js +24 -0
- package/components/authenticationProvider/AuthLoader.js +21 -0
- package/components/authenticationProvider/index.js +166 -0
- package/components/avatar/index.js +95 -0
- package/components/avatar/styles.js +94 -0
- package/components/breadCrumbs/index.js +172 -0
- package/components/breadCrumbs/style.js +11 -0
- package/components/browsingTestCaseLayout/DetailsViewLayout/DetailsViewContent/index.js +19 -0
- package/components/browsingTestCaseLayout/DetailsViewLayout/DetailsViewContent/style.js +15 -0
- package/components/browsingTestCaseLayout/DetailsViewLayout/DetailsViewHeader/index.js +36 -0
- package/components/browsingTestCaseLayout/TreeViewLayout/TreeViewContent/Index.js +26 -0
- package/components/browsingTestCaseLayout/TreeViewLayout/TreeViewHeader/Index.js +48 -0
- package/components/browsingTestCaseLayout/TreeViewLayout/TreeViewHeader/style.js +26 -0
- package/components/browsingTestCaseLayout/index.js +187 -0
- package/components/browsingTestCaseLayout/style.css +82 -0
- package/components/button/index.js +131 -0
- package/components/chatBotModal/index.js +200 -0
- package/components/checkBox/index.js +30 -0
- package/components/divider/index.js +41 -0
- package/components/editableField/index.js +135 -0
- package/components/error/index.js +56 -0
- package/components/errorBoundary/Error.jpg +0 -0
- package/components/errorBoundary/index.js +160 -0
- package/components/fileUploader/index.js +156 -0
- package/components/fileUploader/style.js +60 -0
- package/components/filter/ValueSelector.js +306 -0
- package/components/filter/index.js +225 -0
- package/components/iconButton/index.js +34 -0
- package/components/iconButton/style.js +1 -0
- package/components/input/index.js +173 -0
- package/components/layout/index.js +98 -0
- package/components/layout/main/index.js +27 -0
- package/components/layout/main/style.js +22 -0
- package/components/layout/pageContent/index.js +31 -0
- package/components/layout/sidebar/FlatMenu.js +64 -0
- package/components/layout/sidebar/GroupedIconMenu.js +246 -0
- package/components/layout/sidebar/GroupedMenu.js +67 -0
- package/components/layout/sidebar/ProjectMenu.js +230 -0
- package/components/layout/sidebar/index.js +91 -0
- package/components/layout/sidebar/style.js +154 -0
- package/components/layout/topBar/ProjectTopbar.js +337 -0
- package/components/layout/topBar/UserAvatar.js +126 -0
- package/components/layout/topBar/index.js +132 -0
- package/components/loader/index.js +28 -0
- package/components/menu/index.js +80 -0
- package/components/modal/Modal.js +56 -0
- package/components/modal/index.js +91 -0
- package/components/modal/style.js +68 -0
- package/components/optionMenu/index.js +112 -0
- package/components/pagination/index.js +129 -0
- package/components/pagination/style.js +36 -0
- package/components/paginationUpdated/index.js +75 -0
- package/components/paper/index.js +44 -0
- package/components/paper/style.js +34 -0
- package/components/reactSelect/index.js +212 -0
- package/components/reactSelect/style.js +163 -0
- package/components/richTextEditor/index.js +83 -0
- package/components/richTextEditor/style.js +1 -0
- package/components/select/GroupedSelect.js +183 -0
- package/components/select/SimpleSelect.js +238 -0
- package/components/select/index.js +217 -0
- package/components/simpleSelect/index.js +122 -0
- package/components/sort/index.js +141 -0
- package/components/switch/index.js +72 -0
- package/components/switch/style.js +42 -0
- package/components/switch/switch.js +110 -0
- package/components/table/ReactTable.js +118 -0
- package/components/table/SimpleTable.js +136 -0
- package/components/table/index.js +256 -0
- package/components/text/index.js +64 -0
- package/components/timeStamp/index.js +44 -0
- package/components/timeStamp/style.js +23 -0
- package/components/topBar/index.js +176 -0
- package/components/tree/index.js +313 -0
- package/components/tree/style.js +32 -0
- package/components/valuePicker/ValueSelector.js +273 -0
- package/components/valuePicker/index.js +133 -0
- package/components/wrapperLayout/layout/index.js +30 -0
- package/components/wrapperLayout/layout/style.js +1 -0
- package/components/wrapperLayout/main/index.js +22 -0
- package/components/wrapperLayout/main/pageContainer/index.js +28 -0
- package/components/wrapperLayout/main/sideBar/index.js +262 -0
- package/components/wrapperLayout/main/sideBar/style.js +196 -0
- package/components/wrapperLayout/topBar/UserAvatar.js +17 -0
- package/components/wrapperLayout/topBar/avatar.js +57 -0
- package/components/wrapperLayout/topBar/index.js +182 -0
- package/components/wrapperLayout/topBar/menuIcon.js +14 -0
- package/components/wrapperLayout/topBar/style.js +77 -0
- package/http/index.js +226 -0
- package/index.js +354 -0
- package/package.json +119 -0
- package/templates/listPage/index.js +301 -0
- package/themes/default.js +253 -0
- package/themes/defaultSmall.js +86 -0
- package/themes/responsiveTheme.js +250 -0
package/package.json
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "tenjin-ui-kit",
|
|
3
|
+
"version": "0.1.0-dev.0",
|
|
4
|
+
"repository": {
|
|
5
|
+
"url": "https://gitlab.com/yethi/react/tenjin-ui-kit.git"
|
|
6
|
+
},
|
|
7
|
+
"dependencies": {
|
|
8
|
+
"@floating-ui/dom": "^1.2.1",
|
|
9
|
+
"@mantine/core": "^5.10.1",
|
|
10
|
+
"@mantine/hooks": "^5.10.1",
|
|
11
|
+
"@mantine/rte": "^5.10.1",
|
|
12
|
+
"@mui/icons-material": "^5.11.0",
|
|
13
|
+
"@mui/lab": "^5.0.0-alpha.116",
|
|
14
|
+
"@mui/styles": "^5.11.2",
|
|
15
|
+
"@testing-library/jest-dom": "^5.16.5",
|
|
16
|
+
"@testing-library/react": "^13.4.0",
|
|
17
|
+
"@testing-library/user-event": "^13.5.0",
|
|
18
|
+
"aria-hidden": "^1.2.2",
|
|
19
|
+
"axios": "^0.26.0",
|
|
20
|
+
"clsx": "^1.2.1",
|
|
21
|
+
"d3-hierarchy": "^3.1.2",
|
|
22
|
+
"feather-icons": "^4.29.0",
|
|
23
|
+
"final-form": "^4.20.9",
|
|
24
|
+
"material-ui-popup-state": "^5.0.8",
|
|
25
|
+
"moment": "^2.29.4",
|
|
26
|
+
"react-beautiful-dnd": "^13.1.1",
|
|
27
|
+
"react-dnd": "^16.0.1",
|
|
28
|
+
"react-dnd-html5-backend": "^16.0.1",
|
|
29
|
+
"react-dropzone": "^14.2.3",
|
|
30
|
+
"react-feather": "^2.0.10",
|
|
31
|
+
"react-final-form": "^6.5.9",
|
|
32
|
+
"react-flow-renderer": "^10.3.17",
|
|
33
|
+
"react-icons": "^4.10.1",
|
|
34
|
+
"react-moment": "^1.1.3",
|
|
35
|
+
"react-scripts": "5.0.1",
|
|
36
|
+
"react-select": "^5.7.4",
|
|
37
|
+
"react-sortable-hoc": "^2.0.0",
|
|
38
|
+
"reactflow": "^11.6.1",
|
|
39
|
+
"storybook-react-context": "^0.6.0",
|
|
40
|
+
"styled-components": "^5.3.9",
|
|
41
|
+
"uuid": "^9.0.0",
|
|
42
|
+
"web-vitals": "^2.1.4"
|
|
43
|
+
},
|
|
44
|
+
"scripts": {
|
|
45
|
+
"start": "react-scripts start",
|
|
46
|
+
"build": "react-scripts build",
|
|
47
|
+
"test": "react-scripts test",
|
|
48
|
+
"eject": "react-scripts eject",
|
|
49
|
+
"storybook": "start-storybook -p 6006 -s public",
|
|
50
|
+
"build-storybook": "build-storybook -s public",
|
|
51
|
+
"clean": "rimraf dist",
|
|
52
|
+
"compile": "npm run clean && cross-env NODE_ENV=production babel src/package --out-dir dist --copy-files --ignore __tests__,spec.js,test.js,stories.js,__snapshots__"
|
|
53
|
+
},
|
|
54
|
+
"eslintConfig": {
|
|
55
|
+
"extends": [
|
|
56
|
+
"react-app",
|
|
57
|
+
"react-app/jest"
|
|
58
|
+
],
|
|
59
|
+
"overrides": [
|
|
60
|
+
{
|
|
61
|
+
"files": [
|
|
62
|
+
"**/*.stories.*"
|
|
63
|
+
],
|
|
64
|
+
"rules": {
|
|
65
|
+
"import/no-anonymous-default-export": "off"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
"browserslist": {
|
|
71
|
+
"production": [
|
|
72
|
+
">0.2%",
|
|
73
|
+
"not dead",
|
|
74
|
+
"not op_mini all"
|
|
75
|
+
],
|
|
76
|
+
"development": [
|
|
77
|
+
"last 1 chrome version",
|
|
78
|
+
"last 1 firefox version",
|
|
79
|
+
"last 1 safari version"
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
"devDependencies": {
|
|
83
|
+
"@babel/cli": "^7.20.7",
|
|
84
|
+
"@babel/preset-env": "^7.20.2",
|
|
85
|
+
"@babel/preset-react": "^7.18.6",
|
|
86
|
+
"@emotion/react": "^11.10.5",
|
|
87
|
+
"@emotion/styled": "^11.10.5",
|
|
88
|
+
"@mui/material": "^5.11.3",
|
|
89
|
+
"@storybook/addon-actions": "^6.5.15",
|
|
90
|
+
"@storybook/addon-essentials": "^6.5.15",
|
|
91
|
+
"@storybook/addon-interactions": "^6.5.15",
|
|
92
|
+
"@storybook/addon-links": "^6.5.15",
|
|
93
|
+
"@storybook/builder-webpack5": "^6.5.15",
|
|
94
|
+
"@storybook/manager-webpack5": "^6.5.15",
|
|
95
|
+
"@storybook/node-logger": "^6.5.15",
|
|
96
|
+
"@storybook/preset-create-react-app": "^4.1.2",
|
|
97
|
+
"@storybook/react": "^6.5.15",
|
|
98
|
+
"@storybook/testing-library": "^0.0.13",
|
|
99
|
+
"babel-plugin-named-exports-order": "^0.0.2",
|
|
100
|
+
"cross-env": "^7.0.3",
|
|
101
|
+
"prop-types": "^15.8.1",
|
|
102
|
+
"react": "^18.2.0",
|
|
103
|
+
"react-dom": "^18.2.0",
|
|
104
|
+
"react-router-dom": "^6.6.1",
|
|
105
|
+
"rimraf": "^3.0.2",
|
|
106
|
+
"webpack": "^5.75.0"
|
|
107
|
+
},
|
|
108
|
+
"peerDependencies": {
|
|
109
|
+
"@emotion/react": "^11.10.5",
|
|
110
|
+
"@emotion/styled": "^11.10.5",
|
|
111
|
+
"@mui/material": "^5.11.3",
|
|
112
|
+
"@testing-library/jest-dom": "^5.16.5",
|
|
113
|
+
"@testing-library/react": "^13.4.0",
|
|
114
|
+
"@testing-library/user-event": "^13.5.0",
|
|
115
|
+
"react": "^18.2.0",
|
|
116
|
+
"react-dom": "^18.2.0",
|
|
117
|
+
"react-router-dom": "^6.6.1"
|
|
118
|
+
}
|
|
119
|
+
}
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _material = require("@mui/material");
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _fi = require("react-icons/fi");
|
|
11
|
+
var _button = _interopRequireDefault(require("../../components/button"));
|
|
12
|
+
var _input = _interopRequireDefault(require("../../components/input"));
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
16
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
17
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
18
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
19
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
20
|
+
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; }
|
|
21
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
22
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
23
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
24
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
25
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
26
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
27
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
28
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
29
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
30
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
31
|
+
var columns = [{
|
|
32
|
+
name: "id",
|
|
33
|
+
displayName: "User ID"
|
|
34
|
+
}, {
|
|
35
|
+
name: "username",
|
|
36
|
+
displayName: "Name"
|
|
37
|
+
}, {
|
|
38
|
+
name: "email",
|
|
39
|
+
displayName: "Email"
|
|
40
|
+
}, {
|
|
41
|
+
name: "address.city",
|
|
42
|
+
displayName: "City",
|
|
43
|
+
render: function render(d) {
|
|
44
|
+
return d.address.city;
|
|
45
|
+
}
|
|
46
|
+
}, {
|
|
47
|
+
name: "address.zipcode",
|
|
48
|
+
displayName: "Zip Code",
|
|
49
|
+
render: function render(d) {
|
|
50
|
+
return d.address.zipcode;
|
|
51
|
+
}
|
|
52
|
+
}, {
|
|
53
|
+
name: "phone",
|
|
54
|
+
displayName: "Phone"
|
|
55
|
+
}, {
|
|
56
|
+
name: "website",
|
|
57
|
+
displayName: "Website"
|
|
58
|
+
}, {
|
|
59
|
+
name: "company.name",
|
|
60
|
+
displayName: "Company",
|
|
61
|
+
render: function render(d) {
|
|
62
|
+
return d.company.name;
|
|
63
|
+
}
|
|
64
|
+
}];
|
|
65
|
+
var ListPage = function ListPage(_ref) {
|
|
66
|
+
var pageTitle = _ref.pageTitle;
|
|
67
|
+
var _useState = (0, _react.useState)({
|
|
68
|
+
filtered: [],
|
|
69
|
+
filter: null,
|
|
70
|
+
unfiltered: [{
|
|
71
|
+
id: 1,
|
|
72
|
+
name: "Leanne Graham",
|
|
73
|
+
username: "Bret",
|
|
74
|
+
email: "Sincere@april.biz",
|
|
75
|
+
address: {
|
|
76
|
+
street: "Kulas Light",
|
|
77
|
+
suite: "Apt. 556",
|
|
78
|
+
city: "Gwenborough",
|
|
79
|
+
zipcode: "92998-3874",
|
|
80
|
+
geo: {
|
|
81
|
+
lat: "-37.3159",
|
|
82
|
+
lng: "81.1496"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
phone: "1-770-736-8031 x56442",
|
|
86
|
+
website: "hildegard.org",
|
|
87
|
+
company: {
|
|
88
|
+
name: "Romaguera-Crona",
|
|
89
|
+
catchPhrase: "Multi-layered client-server neural-net",
|
|
90
|
+
bs: "harness real-time e-markets"
|
|
91
|
+
}
|
|
92
|
+
}, {
|
|
93
|
+
id: 2,
|
|
94
|
+
name: "Ervin Howell",
|
|
95
|
+
username: "Antonette",
|
|
96
|
+
email: "Shanna@melissa.tv",
|
|
97
|
+
address: {
|
|
98
|
+
street: "Victor Plains",
|
|
99
|
+
suite: "Suite 879",
|
|
100
|
+
city: "Wisokyburgh",
|
|
101
|
+
zipcode: "90566-7771",
|
|
102
|
+
geo: {
|
|
103
|
+
lat: "-43.9509",
|
|
104
|
+
lng: "-34.4618"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
phone: "010-692-6593 x09125",
|
|
108
|
+
website: "anastasia.net",
|
|
109
|
+
company: {
|
|
110
|
+
name: "Deckow-Crist",
|
|
111
|
+
catchPhrase: "Proactive didactic contingency",
|
|
112
|
+
bs: "synergize scalable supply-chains"
|
|
113
|
+
}
|
|
114
|
+
}, {
|
|
115
|
+
id: 3,
|
|
116
|
+
name: "Clementine Bauch",
|
|
117
|
+
username: "Samantha",
|
|
118
|
+
email: "Nathan@yesenia.net",
|
|
119
|
+
address: {
|
|
120
|
+
street: "Douglas Extension",
|
|
121
|
+
suite: "Suite 847",
|
|
122
|
+
city: "McKenziehaven",
|
|
123
|
+
zipcode: "59590-4157",
|
|
124
|
+
geo: {
|
|
125
|
+
lat: "-68.6102",
|
|
126
|
+
lng: "-47.0653"
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
phone: "1-463-123-4447",
|
|
130
|
+
website: "ramiro.info",
|
|
131
|
+
company: {
|
|
132
|
+
name: "Romaguera-Jacobson",
|
|
133
|
+
catchPhrase: "Face to face bifurcated interface",
|
|
134
|
+
bs: "e-enable strategic applications"
|
|
135
|
+
}
|
|
136
|
+
}, {
|
|
137
|
+
id: 4,
|
|
138
|
+
name: "Patricia Lebsack",
|
|
139
|
+
username: "Karianne",
|
|
140
|
+
email: "Julianne.OConner@kory.org",
|
|
141
|
+
address: {
|
|
142
|
+
street: "Hoeger Mall",
|
|
143
|
+
suite: "Apt. 692",
|
|
144
|
+
city: "South Elvis",
|
|
145
|
+
zipcode: "53919-4257",
|
|
146
|
+
geo: {
|
|
147
|
+
lat: "29.4572",
|
|
148
|
+
lng: "-164.2990"
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
phone: "493-170-9623 x156",
|
|
152
|
+
website: "kale.biz",
|
|
153
|
+
company: {
|
|
154
|
+
name: "Robel-Corkery",
|
|
155
|
+
catchPhrase: "Multi-tiered zero tolerance productivity",
|
|
156
|
+
bs: "transition cutting-edge web services"
|
|
157
|
+
}
|
|
158
|
+
}, {
|
|
159
|
+
id: 5,
|
|
160
|
+
name: "Chelsey Dietrich",
|
|
161
|
+
username: "Kamren",
|
|
162
|
+
email: "Lucio_Hettinger@annie.ca",
|
|
163
|
+
address: {
|
|
164
|
+
street: "Skiles Walks",
|
|
165
|
+
suite: "Suite 351",
|
|
166
|
+
city: "Roscoeview",
|
|
167
|
+
zipcode: "33263",
|
|
168
|
+
geo: {
|
|
169
|
+
lat: "-31.8129",
|
|
170
|
+
lng: "62.5342"
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
phone: "(254)954-1289",
|
|
174
|
+
website: "demarco.info",
|
|
175
|
+
company: {
|
|
176
|
+
name: "Keebler LLC",
|
|
177
|
+
catchPhrase: "User-centric fault-tolerant solution",
|
|
178
|
+
bs: "revolutionize end-to-end systems"
|
|
179
|
+
}
|
|
180
|
+
}, {
|
|
181
|
+
id: 6,
|
|
182
|
+
name: "Mrs. Dennis Schulist",
|
|
183
|
+
username: "Leopoldo_Corkery",
|
|
184
|
+
email: "Karley_Dach@jasper.info",
|
|
185
|
+
address: {
|
|
186
|
+
street: "Norberto Crossing",
|
|
187
|
+
suite: "Apt. 950",
|
|
188
|
+
city: "South Christy",
|
|
189
|
+
zipcode: "23505-1337",
|
|
190
|
+
geo: {
|
|
191
|
+
lat: "-71.4197",
|
|
192
|
+
lng: "71.7478"
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
phone: "1-477-935-8478 x6430",
|
|
196
|
+
website: "ola.org",
|
|
197
|
+
company: {
|
|
198
|
+
name: "Considine-Lockman",
|
|
199
|
+
catchPhrase: "Synchronised bottom-line interface",
|
|
200
|
+
bs: "e-enable innovative applications"
|
|
201
|
+
}
|
|
202
|
+
}]
|
|
203
|
+
}),
|
|
204
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
205
|
+
data = _useState2[0],
|
|
206
|
+
setData = _useState2[1];
|
|
207
|
+
(0, _react.useEffect)(function () {
|
|
208
|
+
search();
|
|
209
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
210
|
+
}, [data.unfiltered, data.filter]);
|
|
211
|
+
var search = function search() {
|
|
212
|
+
if (data.filter) {
|
|
213
|
+
var filter = data.filter,
|
|
214
|
+
unfiltered = data.unfiltered;
|
|
215
|
+
var newFiltered = unfiltered.filter(function (u) {
|
|
216
|
+
var mergedData = "".concat(u.id).concat(u.username.toLowerCase()).concat(u.email.toLowerCase());
|
|
217
|
+
return mergedData.includes(filter.toLowerCase());
|
|
218
|
+
});
|
|
219
|
+
setData(_objectSpread(_objectSpread({}, data), {}, {
|
|
220
|
+
filtered: newFiltered
|
|
221
|
+
}));
|
|
222
|
+
} else {
|
|
223
|
+
setData(_objectSpread(_objectSpread({}, data), {}, {
|
|
224
|
+
filtered: _toConsumableArray(data.unfiltered)
|
|
225
|
+
}));
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
return /*#__PURE__*/_react.default.createElement(_material.Grid, {
|
|
229
|
+
container: true,
|
|
230
|
+
spacing: 2
|
|
231
|
+
}, /*#__PURE__*/_react.default.createElement(_material.Grid, {
|
|
232
|
+
item: true,
|
|
233
|
+
xs: 12,
|
|
234
|
+
container: true
|
|
235
|
+
}, /*#__PURE__*/_react.default.createElement(_material.Grid, {
|
|
236
|
+
item: true,
|
|
237
|
+
xs: 12,
|
|
238
|
+
md: 6
|
|
239
|
+
}, /*#__PURE__*/_react.default.createElement(_material.Typography, {
|
|
240
|
+
variant: "h6"
|
|
241
|
+
}, pageTitle)), /*#__PURE__*/_react.default.createElement(_material.Grid, {
|
|
242
|
+
item: true,
|
|
243
|
+
xs: 12,
|
|
244
|
+
md: 6,
|
|
245
|
+
container: true,
|
|
246
|
+
justifyContent: "flex-end",
|
|
247
|
+
spacing: 1
|
|
248
|
+
}, /*#__PURE__*/_react.default.createElement(_material.Grid, {
|
|
249
|
+
item: true
|
|
250
|
+
}, /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
251
|
+
color: "info",
|
|
252
|
+
size: "small"
|
|
253
|
+
}, "Export to Spreadsheet")), /*#__PURE__*/_react.default.createElement(_material.Grid, {
|
|
254
|
+
item: true
|
|
255
|
+
}, /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
256
|
+
size: "small"
|
|
257
|
+
}, "New User")))), /*#__PURE__*/_react.default.createElement(_material.Grid, {
|
|
258
|
+
item: true,
|
|
259
|
+
xs: 12,
|
|
260
|
+
container: true,
|
|
261
|
+
spacing: 1,
|
|
262
|
+
alignItems: "center"
|
|
263
|
+
}, /*#__PURE__*/_react.default.createElement(_material.Grid, {
|
|
264
|
+
item: true,
|
|
265
|
+
xs: 12,
|
|
266
|
+
md: 6,
|
|
267
|
+
lg: 3
|
|
268
|
+
}, /*#__PURE__*/_react.default.createElement(_input.default, {
|
|
269
|
+
fullWidth: true,
|
|
270
|
+
placeholder: "Search by ID, name or Email",
|
|
271
|
+
onChange: function onChange(e) {
|
|
272
|
+
return setData(_objectSpread(_objectSpread({}, data), {}, {
|
|
273
|
+
filter: e.target.value
|
|
274
|
+
}));
|
|
275
|
+
},
|
|
276
|
+
value: data.filter,
|
|
277
|
+
disableAutocomplete: true,
|
|
278
|
+
startIcon: /*#__PURE__*/_react.default.createElement(_fi.FiSearch, null)
|
|
279
|
+
})), /*#__PURE__*/_react.default.createElement(_material.Grid, {
|
|
280
|
+
item: true
|
|
281
|
+
})), /*#__PURE__*/_react.default.createElement(_material.Grid, {
|
|
282
|
+
item: true,
|
|
283
|
+
xs: 12
|
|
284
|
+
}, /*#__PURE__*/_react.default.createElement(_material.TableContainer, null, /*#__PURE__*/_react.default.createElement(_material.Table, {
|
|
285
|
+
"aria-label": pageTitle
|
|
286
|
+
}, /*#__PURE__*/_react.default.createElement(_material.TableHead, null, /*#__PURE__*/_react.default.createElement(_material.TableRow, null, columns.map(function (c) {
|
|
287
|
+
return /*#__PURE__*/_react.default.createElement(_material.TableCell, {
|
|
288
|
+
key: c.name
|
|
289
|
+
}, c.displayName);
|
|
290
|
+
}))), /*#__PURE__*/_react.default.createElement(_material.TableBody, null, data.filtered.map(function (u) {
|
|
291
|
+
return /*#__PURE__*/_react.default.createElement(_material.TableRow, {
|
|
292
|
+
key: u.id
|
|
293
|
+
}, columns.map(function (c) {
|
|
294
|
+
return /*#__PURE__*/_react.default.createElement(_material.TableCell, {
|
|
295
|
+
key: u[c.name]
|
|
296
|
+
}, /*#__PURE__*/_react.default.createElement(_material.Typography, null, c.render ? c.render(u) : u[c.name]));
|
|
297
|
+
}));
|
|
298
|
+
}))))));
|
|
299
|
+
};
|
|
300
|
+
var _default = ListPage;
|
|
301
|
+
exports.default = _default;
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _material = require("@mui/material");
|
|
8
|
+
var getFontSize = function getFontSize() {
|
|
9
|
+
var devicePixelRatio = window.devicePixelRatio;
|
|
10
|
+
if (devicePixelRatio >= 1 && devicePixelRatio < 1.25) {
|
|
11
|
+
return 16;
|
|
12
|
+
} else if (devicePixelRatio >= 1.25 && devicePixelRatio < 1.5) {
|
|
13
|
+
return 14;
|
|
14
|
+
} else if (devicePixelRatio >= 1.5) {
|
|
15
|
+
return 12;
|
|
16
|
+
} else {
|
|
17
|
+
return 40;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
var getSpacing = function getSpacing() {
|
|
21
|
+
if (devicePixelRatio >= 1 && devicePixelRatio < 1.25) {
|
|
22
|
+
return 8;
|
|
23
|
+
} else if (devicePixelRatio >= 1.25 && devicePixelRatio < 1.5) {
|
|
24
|
+
return 6;
|
|
25
|
+
} else if (devicePixelRatio >= 1.5) {
|
|
26
|
+
return 4;
|
|
27
|
+
} else {
|
|
28
|
+
return 8;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
var _default = (0, _material.createTheme)({
|
|
32
|
+
spacing: getSpacing(),
|
|
33
|
+
components: {
|
|
34
|
+
MuiButton: {
|
|
35
|
+
defaultProps: {
|
|
36
|
+
variant: "contained",
|
|
37
|
+
disableRipple: true,
|
|
38
|
+
size: "small"
|
|
39
|
+
},
|
|
40
|
+
styleOverrides: {
|
|
41
|
+
root: {
|
|
42
|
+
textTransform: "initial"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
MuiAppBar: {
|
|
47
|
+
styleOverrides: {
|
|
48
|
+
root: {
|
|
49
|
+
height: "60px !important"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
MuiDivider: {
|
|
54
|
+
styleOverrides: {
|
|
55
|
+
root: {
|
|
56
|
+
height: "93% !important"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
MuiOutlinedInput: {
|
|
61
|
+
defaultProps: {
|
|
62
|
+
size: "small"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
// MuiInputBase: {
|
|
66
|
+
// styleOverrides: {
|
|
67
|
+
// input: {
|
|
68
|
+
// backgroundColor: '#ACACAC',
|
|
69
|
+
// },
|
|
70
|
+
// },
|
|
71
|
+
// },
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
MuiAutocomplete: {
|
|
75
|
+
styleOverrides: {
|
|
76
|
+
root: {
|
|
77
|
+
padding: "0.5rem 0.75rem",
|
|
78
|
+
border: "1px solid black !important",
|
|
79
|
+
borderRadius: "0.25rem",
|
|
80
|
+
backgroundColor: "white",
|
|
81
|
+
"& .MuiAutocomplete-input": {
|
|
82
|
+
padding: "0.5rem 0.75rem",
|
|
83
|
+
fontSize: "1rem",
|
|
84
|
+
border: "1px solid black !important"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
MuiInputLabel: {
|
|
89
|
+
styleOverrides: {
|
|
90
|
+
asterisk: {
|
|
91
|
+
color: "#db3131",
|
|
92
|
+
"&$error": {
|
|
93
|
+
color: "#db3131"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
overrides: {
|
|
100
|
+
MuiCssBaseline: {
|
|
101
|
+
"@global": {
|
|
102
|
+
html: {
|
|
103
|
+
"scroll-behavior": "smooth",
|
|
104
|
+
height: "100vh"
|
|
105
|
+
},
|
|
106
|
+
body: {
|
|
107
|
+
position: "relative",
|
|
108
|
+
margin: 0,
|
|
109
|
+
height: "100vh",
|
|
110
|
+
color: "#000000",
|
|
111
|
+
backgroundColor: "#f4f7fc"
|
|
112
|
+
},
|
|
113
|
+
"*::-webkit-scrollbar": {
|
|
114
|
+
width: "6px"
|
|
115
|
+
},
|
|
116
|
+
a: {
|
|
117
|
+
textDecoration: "none",
|
|
118
|
+
color: "#44409A"
|
|
119
|
+
},
|
|
120
|
+
"*::-webkit-scrollbar-thumb": {
|
|
121
|
+
backgroundColor: "#e4e4e4",
|
|
122
|
+
borderRadius: "3px",
|
|
123
|
+
opacity: 0.5
|
|
124
|
+
},
|
|
125
|
+
"*::-webkit-scrollbar-track": {
|
|
126
|
+
background: "transparent"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
palette: {
|
|
132
|
+
//primary: {
|
|
133
|
+
// main: "#44409A",
|
|
134
|
+
// light: "#5B58A9",
|
|
135
|
+
// dark: "#443F99",
|
|
136
|
+
// white: "#FFFFFF",
|
|
137
|
+
// tenjinLight: "#F4F7FC",
|
|
138
|
+
// tenjinMLight: "#F7F8FF",
|
|
139
|
+
// tenjinDarkWhite: "#F8F9FD",
|
|
140
|
+
// tenjinBlack: "#000000",
|
|
141
|
+
// tenjinMBlack: "#060606",
|
|
142
|
+
// tenjinLightBlack: "#363636",
|
|
143
|
+
// tenjinLBlack: "#343438",
|
|
144
|
+
// tenjinDark: "#323232",
|
|
145
|
+
// tenjinGray: "#757575",
|
|
146
|
+
// tenjinFGray: "#636A74",
|
|
147
|
+
// tenjinMGray: "#707070",
|
|
148
|
+
// tenjinLightGray: "#EDF2F8",
|
|
149
|
+
// tenjinLBlue: "#D7E0EB",
|
|
150
|
+
// tenjinYellow: "#F6DA6E",
|
|
151
|
+
// tenjinLightGreen: "#4CE1B6",
|
|
152
|
+
// tenjinDarkGreen: "#2e846c",
|
|
153
|
+
// tenjinLightBlue: "#70BBFD",
|
|
154
|
+
// tenjinLMBlue: "#7688E8",
|
|
155
|
+
// tenjinDarkBlue: "#006AFD",
|
|
156
|
+
// tenjinPlaceholder: "#9CABBF",
|
|
157
|
+
// green: "#2C7413",
|
|
158
|
+
// warning: "#EB9A31",
|
|
159
|
+
// blue: "#433F9B",
|
|
160
|
+
// gray: "#7d7d7d",
|
|
161
|
+
// red: "#be1515",
|
|
162
|
+
// paperBorder: "#D6D9E0",
|
|
163
|
+
// defaultShadow: "#667CBC1A",
|
|
164
|
+
//},
|
|
165
|
+
// secondary: {
|
|
166
|
+
// main: "#BF1E1E",
|
|
167
|
+
// },
|
|
168
|
+
|
|
169
|
+
primary: {
|
|
170
|
+
main: "#44409A"
|
|
171
|
+
},
|
|
172
|
+
primary_light: {
|
|
173
|
+
main: "#5B58A9"
|
|
174
|
+
},
|
|
175
|
+
primary_dark: {
|
|
176
|
+
main: "#000050"
|
|
177
|
+
},
|
|
178
|
+
primary_link: {
|
|
179
|
+
main: "#44409a"
|
|
180
|
+
},
|
|
181
|
+
secondary: {
|
|
182
|
+
main: "#BF1E1E"
|
|
183
|
+
},
|
|
184
|
+
secondary_light: {
|
|
185
|
+
main: "#CC3F3F"
|
|
186
|
+
},
|
|
187
|
+
secondary_dark: {
|
|
188
|
+
main: "#951010"
|
|
189
|
+
},
|
|
190
|
+
success: {
|
|
191
|
+
main: "#2C7413"
|
|
192
|
+
},
|
|
193
|
+
success_light: {
|
|
194
|
+
main: "#5EA342"
|
|
195
|
+
},
|
|
196
|
+
success_dark: {
|
|
197
|
+
main: "#004700"
|
|
198
|
+
},
|
|
199
|
+
info: {
|
|
200
|
+
main: "#70BBFD"
|
|
201
|
+
},
|
|
202
|
+
info_light: {
|
|
203
|
+
main: "#A6EDFF"
|
|
204
|
+
},
|
|
205
|
+
info_dark: {
|
|
206
|
+
main: "#358BCA"
|
|
207
|
+
},
|
|
208
|
+
error: {
|
|
209
|
+
main: "#BE1515"
|
|
210
|
+
},
|
|
211
|
+
error_light: {
|
|
212
|
+
main: "#F8533F"
|
|
213
|
+
},
|
|
214
|
+
error_dark: {
|
|
215
|
+
main: "#860000"
|
|
216
|
+
},
|
|
217
|
+
warning: {
|
|
218
|
+
main: "#EB9A31"
|
|
219
|
+
},
|
|
220
|
+
warning_light: {
|
|
221
|
+
main: "#FFCB62"
|
|
222
|
+
},
|
|
223
|
+
warning_dark: {
|
|
224
|
+
main: "#B46C00"
|
|
225
|
+
},
|
|
226
|
+
grey: {
|
|
227
|
+
main: "#7D7D7D"
|
|
228
|
+
},
|
|
229
|
+
grey_light: {
|
|
230
|
+
main: "#ACACAC"
|
|
231
|
+
},
|
|
232
|
+
grey_dark: {
|
|
233
|
+
main: "#515151"
|
|
234
|
+
},
|
|
235
|
+
secondary_grey: {
|
|
236
|
+
main: "#D7E2F0"
|
|
237
|
+
},
|
|
238
|
+
white: {
|
|
239
|
+
main: "#ffffff"
|
|
240
|
+
},
|
|
241
|
+
default: {
|
|
242
|
+
main: "#7D7D7D"
|
|
243
|
+
},
|
|
244
|
+
text: {
|
|
245
|
+
main: "#000000"
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
typography: {
|
|
249
|
+
fontFamily: ["-apple-system", "BlinkMacSystemFont", '"Segoe UI"', "Roboto", '"Helvetica Neue"', "Arial", "sans-serif", '"Apple Color Emoji"', '"Segoe UI Emoji"', '"Segoe UI Symbol"'].join(",")
|
|
250
|
+
// fontSize: getFontSize(),
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
exports.default = _default;
|