gogoclient 1.2.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.
- package/LICENSE +21 -0
- package/README.md +1 -0
- package/dist/components/AuthWrapper.js +61 -0
- package/dist/components/PageLayout.js +53 -0
- package/dist/components/RequireAuth.js +86 -0
- package/dist/components/index.js +27 -0
- package/dist/helpers/Root.js +206 -0
- package/dist/helpers/SubscriptionManager.js +61 -0
- package/dist/helpers/currentUserContext.js +12 -0
- package/dist/helpers/currentUserQuery.js +11 -0
- package/dist/helpers/getUrl.js +18 -0
- package/dist/helpers/sentry.js +25 -0
- package/dist/helpers/startClient.js +25 -0
- package/dist/helpers/subscriptionManagerContext.js +22 -0
- package/dist/index.js +109 -0
- package/dist/pages/ProviderConnection.page.js +99 -0
- package/dist/pages/ProviderConnection.queries.js +12 -0
- package/dist/pages/index.js +28 -0
- package/dist/theme/elements/Action.js +29 -0
- package/dist/theme/elements/ActionGroup.js +14 -0
- package/dist/theme/elements/AppBar.js +17 -0
- package/dist/theme/elements/Button.js +31 -0
- package/dist/theme/elements/Checkbox.js +38 -0
- package/dist/theme/elements/GlobalStyle.js +10 -0
- package/dist/theme/elements/Logo.js +10 -0
- package/dist/theme/elements/Menu.js +15 -0
- package/dist/theme/elements/Radio.js +27 -0
- package/dist/theme/elements/TextField.js +39 -0
- package/dist/theme/elements/index.js +76 -0
- package/dist/theme/index.js +93 -0
- package/dist/toolkit/darkenLighten.js +57 -0
- package/dist/toolkit/headingScale.js +29 -0
- package/dist/toolkit/index.js +79 -0
- package/dist/toolkit/media.js +23 -0
- package/dist/toolkit/override.js +74 -0
- package/dist/toolkit/styles/fadeInOut.js +11 -0
- package/dist/toolkit/styles/rotate360.js +11 -0
- package/dist/toolkit/themeHelper.js +53 -0
- package/dist/ui/_helpers/_helpers.js +69 -0
- package/dist/ui/_helpers/cssSnippets.js +11 -0
- package/dist/ui/_helpers/index.js +40 -0
- package/dist/ui/_helpers/useBreakpoint.js +35 -0
- package/dist/ui/assignReviewers/AssignReviewers.js +174 -0
- package/dist/ui/assignReviewers/InviteRowProp.js +130 -0
- package/dist/ui/assignReviewers/ReviewerTable.js +268 -0
- package/dist/ui/assignReviewers/SearchBox.js +160 -0
- package/dist/ui/assignReviewers/SuggestedReviewer.js +28 -0
- package/dist/ui/assignReviewers/index.js +13 -0
- package/dist/ui/authentication/AuthenticationForm.js +87 -0
- package/dist/ui/authentication/AuthenticationHeader.js +13 -0
- package/dist/ui/authentication/AuthenticationWrapper.js +13 -0
- package/dist/ui/authentication/ChangePassword.js +128 -0
- package/dist/ui/authentication/DeactivatedUser.js +17 -0
- package/dist/ui/authentication/Login.js +74 -0
- package/dist/ui/authentication/ProfileForm.js +79 -0
- package/dist/ui/authentication/ProviderConnection.js +69 -0
- package/dist/ui/authentication/RequestPasswordReset.js +89 -0
- package/dist/ui/authentication/ResetPassword.js +96 -0
- package/dist/ui/authentication/Signup.js +180 -0
- package/dist/ui/authentication/SuccessSubTitle.js +20 -0
- package/dist/ui/authentication/VerifyCheck.js +55 -0
- package/dist/ui/authentication/VerifyEmail.js +119 -0
- package/dist/ui/authentication/index.js +104 -0
- package/dist/ui/chat/ChatInput.js +63 -0
- package/dist/ui/chat/ChatMessage.js +67 -0
- package/dist/ui/chat/ChatMessageList.js +45 -0
- package/dist/ui/chat/ChatThread.js +41 -0
- package/dist/ui/chat/index.js +34 -0
- package/dist/ui/common/AutoComplete.js +56 -0
- package/dist/ui/common/Button.js +83 -0
- package/dist/ui/common/ButtonGroup.js +58 -0
- package/dist/ui/common/Checkbox.js +30 -0
- package/dist/ui/common/CheckboxGroup.js +42 -0
- package/dist/ui/common/CokoLink.js +24 -0
- package/dist/ui/common/Collapse.js +14 -0
- package/dist/ui/common/DateParser.js +49 -0
- package/dist/ui/common/Divider.js +8 -0
- package/dist/ui/common/Empty.js +14 -0
- package/dist/ui/common/Form.js +216 -0
- package/dist/ui/common/FormSection.js +35 -0
- package/dist/ui/common/Headings.js +74 -0
- package/dist/ui/common/Input.js +72 -0
- package/dist/ui/common/InputNumber.js +54 -0
- package/dist/ui/common/InviteStatus.js +63 -0
- package/dist/ui/common/Layout.js +17 -0
- package/dist/ui/common/LinkWithoutStyles.js +12 -0
- package/dist/ui/common/List.js +390 -0
- package/dist/ui/common/Modal.js +17 -0
- package/dist/ui/common/Note.js +23 -0
- package/dist/ui/common/Page.js +33 -0
- package/dist/ui/common/Pagination.js +126 -0
- package/dist/ui/common/Popup.js +146 -0
- package/dist/ui/common/Radio.js +54 -0
- package/dist/ui/common/Result.js +8 -0
- package/dist/ui/common/Ribbon.js +54 -0
- package/dist/ui/common/Search.js +30 -0
- package/dist/ui/common/Select.js +148 -0
- package/dist/ui/common/Spin.js +87 -0
- package/dist/ui/common/Split.js +49 -0
- package/dist/ui/common/Status.js +53 -0
- package/dist/ui/common/Switch.js +47 -0
- package/dist/ui/common/Table.js +111 -0
- package/dist/ui/common/Tabs.js +8 -0
- package/dist/ui/common/TabsStyled.js +65 -0
- package/dist/ui/common/TextArea.js +29 -0
- package/dist/ui/common/Typography.js +9 -0
- package/dist/ui/common/VisuallyHiddenElement.js +17 -0
- package/dist/ui/common/_reusableStyles.js +14 -0
- package/dist/ui/common/index.js +341 -0
- package/dist/ui/index.js +49 -0
- package/package.json +114 -0
- package/scripts/coko-client-build.js +42 -0
- package/scripts/coko-client-build.sh +28 -0
- package/scripts/coko-client-dev.js +16 -0
- package/scripts/coko-client-dev.sh +28 -0
- package/scripts/env.sh +41 -0
- package/webpack/changes.md +20 -0
- package/webpack/index.ejs +15 -0
- package/webpack/noop.js +11 -0
- package/webpack/webpack.config.js +483 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
|
+
var _toolkit = require("../../toolkit");
|
|
11
|
+
var _excluded = ["className", "status"];
|
|
12
|
+
var _templateObject;
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
14
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
15
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
16
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
17
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
18
|
+
var Wrapper = _styledComponents["default"].span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: ", ";\n border-radius: 2px;\n color: ", ";\n font-size: ", ";\n /* font-weight: bold; */\n padding: ", " ", ";\n text-align: center;\n"])), function (_ref) {
|
|
19
|
+
var variant = _ref.variant;
|
|
20
|
+
switch (variant) {
|
|
21
|
+
case 'Not Submitted':
|
|
22
|
+
return (0, _toolkit.lighten)('colorBorder', 0.5);
|
|
23
|
+
case 'Submitted':
|
|
24
|
+
return (0, _toolkit.th)('colorText');
|
|
25
|
+
case 'Rejected':
|
|
26
|
+
return (0, _toolkit.th)('colorError');
|
|
27
|
+
case 'Under Review':
|
|
28
|
+
return (0, _toolkit.th)('colorWarning');
|
|
29
|
+
case 'In Production':
|
|
30
|
+
return (0, _toolkit.th)('colorPrimary');
|
|
31
|
+
case 'Published':
|
|
32
|
+
return (0, _toolkit.th)('colorSuccess');
|
|
33
|
+
default:
|
|
34
|
+
return (0, _toolkit.th)('colorBackground');
|
|
35
|
+
}
|
|
36
|
+
}, function (_ref2) {
|
|
37
|
+
var variant = _ref2.variant;
|
|
38
|
+
return variant === 'Not Submitted' ? (0, _toolkit.th)('colorTextDark') : (0, _toolkit.th)('colorTextReverse');
|
|
39
|
+
}, (0, _toolkit.th)('fontSizeBaseSmall'), (0, _toolkit.grid)(1), (0, _toolkit.grid)(3));
|
|
40
|
+
var Status = function Status(props) {
|
|
41
|
+
var className = props.className,
|
|
42
|
+
status = props.status,
|
|
43
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
44
|
+
return /*#__PURE__*/_react["default"].createElement(Wrapper, _extends({
|
|
45
|
+
className: className,
|
|
46
|
+
variant: status
|
|
47
|
+
}, rest), status);
|
|
48
|
+
};
|
|
49
|
+
Status.propTypes = {
|
|
50
|
+
status: _propTypes["default"].oneOf(['Not Submitted', 'Submitted', 'Rejected', 'Under Review', 'In Production', 'Published']).isRequired
|
|
51
|
+
};
|
|
52
|
+
Status.defaultProps = {};
|
|
53
|
+
var _default = exports["default"] = Status;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports["default"] = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
11
|
+
var _antd = require("antd");
|
|
12
|
+
var _toolkit = require("../../toolkit");
|
|
13
|
+
var _excluded = ["className", "label", "labelPosition"];
|
|
14
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
15
|
+
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 (var _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); }
|
|
16
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
17
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
18
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
19
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
20
|
+
var Wrapper = _styledComponents["default"].span(_templateObject || (_templateObject = _taggedTemplateLiteral([""])));
|
|
21
|
+
var Label = _styledComponents["default"].span(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n\n ", "\n"])), function (props) {
|
|
22
|
+
return props.labelPosition === 'left' && (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-right: ", ";\n "])), (0, _toolkit.grid)(2));
|
|
23
|
+
}, function (props) {
|
|
24
|
+
return props.labelPosition === 'right' && (0, _styledComponents.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin-left: ", ";\n "])), (0, _toolkit.grid)(2));
|
|
25
|
+
});
|
|
26
|
+
var Switch = function Switch(props) {
|
|
27
|
+
var className = props.className,
|
|
28
|
+
label = props.label,
|
|
29
|
+
labelPosition = props.labelPosition,
|
|
30
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
31
|
+
return /*#__PURE__*/_react["default"].createElement(Wrapper, {
|
|
32
|
+
className: className
|
|
33
|
+
}, label && labelPosition === 'left' && /*#__PURE__*/_react["default"].createElement(Label, {
|
|
34
|
+
labelPosition: labelPosition
|
|
35
|
+
}, label), /*#__PURE__*/_react["default"].createElement(_antd.Switch, rest), label && labelPosition === 'right' && /*#__PURE__*/_react["default"].createElement(Label, {
|
|
36
|
+
labelPosition: labelPosition
|
|
37
|
+
}, label));
|
|
38
|
+
};
|
|
39
|
+
Switch.propTypes = {
|
|
40
|
+
label: _propTypes["default"].string,
|
|
41
|
+
labelPosition: _propTypes["default"].string
|
|
42
|
+
};
|
|
43
|
+
Switch.defaultProps = {
|
|
44
|
+
label: null,
|
|
45
|
+
labelPosition: 'right'
|
|
46
|
+
};
|
|
47
|
+
var _default = exports["default"] = Switch;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports["default"] = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
|
+
var _antd = require("antd");
|
|
12
|
+
var _toolkit = require("../../toolkit");
|
|
13
|
+
var _Search = _interopRequireDefault(require("./Search"));
|
|
14
|
+
var _Spin = _interopRequireDefault(require("./Spin"));
|
|
15
|
+
var _Pagination = _interopRequireDefault(require("./Pagination"));
|
|
16
|
+
var _excluded = ["className", "children", "loading", "showSearch", "searchLoading", "onSearch", "searchPlaceholder", "dataSource", "pagination"];
|
|
17
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
18
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
19
|
+
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 (var _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); }
|
|
20
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
21
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
22
|
+
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."); }
|
|
23
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
24
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
25
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
26
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
27
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
28
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
29
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
30
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
31
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
32
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
33
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
34
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
35
|
+
var Wrapper = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n\n > div:last-child {\n flex-grow: 1;\n\n .ant-spin-nested-loading,\n .ant-spin-container,\n .ant-table-wrapper {\n height: 100%;\n }\n\n .ant-table {\n height: calc(100% - ", ");\n }\n }\n"])), (0, _toolkit.grid)(16));
|
|
36
|
+
var SearchWrapper = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n margin-bottom: ", ";\n\n > span {\n max-width: 1200px;\n }\n"])), (0, _toolkit.grid)(3));
|
|
37
|
+
var PaginationNav = (0, _styledComponents["default"])(_Pagination["default"])(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding: ", " 0;\n text-align: right;\n"])), (0, _toolkit.grid)(4));
|
|
38
|
+
var Table = function Table(props) {
|
|
39
|
+
var className = props.className,
|
|
40
|
+
children = props.children,
|
|
41
|
+
loading = props.loading,
|
|
42
|
+
showSearch = props.showSearch,
|
|
43
|
+
searchLoading = props.searchLoading,
|
|
44
|
+
onSearch = props.onSearch,
|
|
45
|
+
searchPlaceholder = props.searchPlaceholder,
|
|
46
|
+
dataSource = props.dataSource,
|
|
47
|
+
pagination = props.pagination,
|
|
48
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
49
|
+
var paginationObj = _objectSpread({
|
|
50
|
+
current: 1,
|
|
51
|
+
pageSize: 10
|
|
52
|
+
}, pagination);
|
|
53
|
+
var _useState = (0, _react.useState)(paginationObj.current),
|
|
54
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
55
|
+
paginationCurrent = _useState2[0],
|
|
56
|
+
setPaginationCurrent = _useState2[1];
|
|
57
|
+
var _useState3 = (0, _react.useState)(paginationObj.pageSize),
|
|
58
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
59
|
+
paginationSize = _useState4[0],
|
|
60
|
+
setPaginationSize = _useState4[1];
|
|
61
|
+
(0, _react.useEffect)(function () {
|
|
62
|
+
setPaginationCurrent(paginationObj.current);
|
|
63
|
+
setPaginationSize(paginationObj.pageSize);
|
|
64
|
+
}, [pagination]);
|
|
65
|
+
var passedPagination = _objectSpread(_objectSpread({}, paginationObj), {}, {
|
|
66
|
+
current: paginationCurrent,
|
|
67
|
+
pageSize: paginationSize
|
|
68
|
+
});
|
|
69
|
+
var triggerPaginationEvent = function triggerPaginationEvent(eventName) {
|
|
70
|
+
return function (page, pageSize) {
|
|
71
|
+
setPaginationCurrent(page);
|
|
72
|
+
setPaginationSize(pageSize);
|
|
73
|
+
if (pagination && pagination[eventName]) {
|
|
74
|
+
pagination[eventName](page, pageSize);
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
var onPaginationChange = triggerPaginationEvent('onChange');
|
|
79
|
+
var onPaginationShowSizeChange = triggerPaginationEvent('onShowSizeChange');
|
|
80
|
+
return /*#__PURE__*/_react["default"].createElement(Wrapper, {
|
|
81
|
+
className: className
|
|
82
|
+
}, showSearch && /*#__PURE__*/_react["default"].createElement(SearchWrapper, null, /*#__PURE__*/_react["default"].createElement(_Search["default"], {
|
|
83
|
+
loading: searchLoading,
|
|
84
|
+
onSearch: onSearch,
|
|
85
|
+
placeholder: searchPlaceholder
|
|
86
|
+
})), /*#__PURE__*/_react["default"].createElement(_Spin["default"], {
|
|
87
|
+
spinning: loading
|
|
88
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Table, _extends({}, rest, {
|
|
89
|
+
dataSource: dataSource,
|
|
90
|
+
pagination: false
|
|
91
|
+
}), children)), pagination && /*#__PURE__*/_react["default"].createElement(PaginationNav, {
|
|
92
|
+
onChange: onPaginationChange,
|
|
93
|
+
onShowSizeChange: onPaginationShowSizeChange,
|
|
94
|
+
pagination: passedPagination
|
|
95
|
+
}));
|
|
96
|
+
};
|
|
97
|
+
Table.propTypes = {
|
|
98
|
+
loading: _propTypes["default"].bool,
|
|
99
|
+
showSearch: _propTypes["default"].bool,
|
|
100
|
+
searchLoading: _propTypes["default"].bool,
|
|
101
|
+
onSearch: _propTypes["default"].func,
|
|
102
|
+
searchPlaceholder: _propTypes["default"].string
|
|
103
|
+
};
|
|
104
|
+
Table.defaultProps = {
|
|
105
|
+
loading: false,
|
|
106
|
+
showSearch: false,
|
|
107
|
+
searchLoading: false,
|
|
108
|
+
onSearch: null,
|
|
109
|
+
searchPlaceholder: null
|
|
110
|
+
};
|
|
111
|
+
var _default = exports["default"] = Table;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
var _antd = require("antd");
|
|
10
|
+
var _toolkit = require("../../toolkit");
|
|
11
|
+
var _templateObject;
|
|
12
|
+
/* stylelint-disable string-quotes */
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
14
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
15
|
+
// const TabsWrapper = styled.div`
|
|
16
|
+
// height: 100%;
|
|
17
|
+
// `
|
|
18
|
+
|
|
19
|
+
var TabsStyled = (0, _styledComponents["default"])(_antd.Tabs)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ant-tabs-nav {\n background-color: ", ";\n margin: 0;\n padding: 0 ", ";\n }\n\n .ant-tabs-nav-list {\n .ant-tabs-tab {\n background: ", ";\n font-weight: 700;\n margin: 0;\n padding: ", ";\n text-transform: uppercase;\n\n &:hover {\n color: inherit;\n }\n\n &.ant-tabs-tab-active {\n background-color: ", ";\n }\n\n [role='tab'] {\n color: inherit;\n padding: ", " ", ";\n transition: none;\n\n &:focus {\n color: ", ";\n outline: 2px solid ", ";\n }\n }\n }\n\n .ant-tabs-ink-bar {\n display: none;\n }\n }\n"])), (0, _toolkit.th)('colorBackgroundHue'), (0, _toolkit.grid)(3), (0, _toolkit.th)('colorBackgroundHue'), (0, _toolkit.grid)(0.5), (0, _toolkit.th)('colorBackground'), (0, _toolkit.grid)(3), (0, _toolkit.grid)(4), (0, _toolkit.th)('colorPrimary'), (0, _toolkit.th)('colorPrimary'));
|
|
20
|
+
var Tabs = function Tabs(props) {
|
|
21
|
+
// const { className, ...rest } = props
|
|
22
|
+
|
|
23
|
+
// const ref = useRef()
|
|
24
|
+
|
|
25
|
+
// const handleKeyDown = (e, index) => {
|
|
26
|
+
// const { key } = e
|
|
27
|
+
// const isArrowLeft = key === 'ArrowLeft'
|
|
28
|
+
// const isArrowRight = key === 'ArrowRight'
|
|
29
|
+
// const isArrowKey = isArrowLeft || isArrowRight
|
|
30
|
+
|
|
31
|
+
// if (isArrowKey) {
|
|
32
|
+
// e.preventDefault()
|
|
33
|
+
// }
|
|
34
|
+
|
|
35
|
+
// if (isArrowKey) {
|
|
36
|
+
// const listItems = ref.current.querySelectorAll('[role="tab"]')
|
|
37
|
+
|
|
38
|
+
// const newIndex = isArrowRight
|
|
39
|
+
// ? (index + 1) % listItems.length
|
|
40
|
+
// : (index + listItems.length - 1) % listItems.length
|
|
41
|
+
|
|
42
|
+
// listItems[newIndex].focus()
|
|
43
|
+
// }
|
|
44
|
+
// }
|
|
45
|
+
|
|
46
|
+
// useEffect(() => {
|
|
47
|
+
// // remove role="tablist" from outer wrapper and apply it to inner wrapper
|
|
48
|
+
// // purpose: to not have illegal elements (role != tab) inside tablist
|
|
49
|
+
// ref.current.querySelector('[role="tablist"')?.removeAttribute('role')
|
|
50
|
+
// ref.current
|
|
51
|
+
// .querySelector('.ant-tabs-nav-list')
|
|
52
|
+
// ?.setAttribute('role', 'tablist')
|
|
53
|
+
// // https://www.w3.org/WAI/ARIA/apg/patterns/tabs/#keyboardinteraction
|
|
54
|
+
// // implement proper keyboard interaction
|
|
55
|
+
// ref.current
|
|
56
|
+
// .querySelectorAll('[role=tab][aria-selected=false]')
|
|
57
|
+
// ?.forEach(innactiveTab => innactiveTab.setAttribute('tabIndex', '-1'))
|
|
58
|
+
// ref.current.querySelectorAll('[role=tab]')?.forEach((tab, index) => {
|
|
59
|
+
// tab.addEventListener('keydown', e => handleKeyDown(e, index))
|
|
60
|
+
// })
|
|
61
|
+
// }, [])
|
|
62
|
+
|
|
63
|
+
return /*#__PURE__*/_react["default"].createElement(TabsStyled, props);
|
|
64
|
+
};
|
|
65
|
+
var _default = exports["default"] = Tabs;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
var _antd = require("antd");
|
|
10
|
+
var _excluded = ["className"];
|
|
11
|
+
var _templateObject; // import PropTypes from 'prop-types'
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
13
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
14
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
15
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
16
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
17
|
+
var StyledTextArea = (0, _styledComponents["default"])(_antd.Input.TextArea)(_templateObject || (_templateObject = _taggedTemplateLiteral([""])));
|
|
18
|
+
var TextArea = function TextArea(props) {
|
|
19
|
+
var className = props.className,
|
|
20
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
21
|
+
|
|
22
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
23
|
+
return /*#__PURE__*/_react["default"].createElement(StyledTextArea, _extends({
|
|
24
|
+
className: className
|
|
25
|
+
}, rest));
|
|
26
|
+
};
|
|
27
|
+
TextArea.propTypes = {};
|
|
28
|
+
TextArea.defaultProps = {};
|
|
29
|
+
var _default = exports["default"] = TextArea;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Text = exports.Paragraph = void 0;
|
|
7
|
+
var _antd = require("antd");
|
|
8
|
+
var Paragraph = exports.Paragraph = _antd.Typography.Paragraph,
|
|
9
|
+
Text = exports.Text = _antd.Typography.Text;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
var _templateObject;
|
|
10
|
+
/* stylelint-disable declaration-no-important */
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
12
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
13
|
+
var VisuallyHiddenElement = _styledComponents["default"].span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border: 0 !important;\n clip: rect(1px, 1px, 1px, 1px) !important; /* 1 */\n clip-path: inset(50%) !important; /* 2 */\n height: 1px !important;\n margin: -1px !important;\n overflow: hidden !important;\n padding: 0 !important;\n position: absolute !important;\n white-space: nowrap !important;\n width: 1px !important;\n"])));
|
|
14
|
+
var HiddenElement = function HiddenElement(props) {
|
|
15
|
+
return /*#__PURE__*/_react["default"].createElement(VisuallyHiddenElement, props);
|
|
16
|
+
};
|
|
17
|
+
var _default = exports["default"] = HiddenElement;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.inputShadow = void 0;
|
|
7
|
+
var _styledComponents = require("styled-components");
|
|
8
|
+
var _toolkit = require("../../toolkit");
|
|
9
|
+
var _templateObject;
|
|
10
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
11
|
+
/* eslint-disable-next-line import/prefer-default-export */
|
|
12
|
+
var inputShadow = exports.inputShadow = (0, _styledComponents.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n transition: outline 0s;\n\n &:focus {\n box-shadow: 0 0 2px ", ";\n outline: ", "px solid\n ", ";\n outline-offset: 1px;\n }\n"])), (0, _toolkit.th)('colorPrimary'), function (props) {
|
|
13
|
+
return "".concat(props.theme.lineWidth * 4);
|
|
14
|
+
}, (0, _toolkit.th)('colorPrimaryBorder'));
|