@bigbinary/neeto-github-frontend 1.0.6 → 1.0.7
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/dist/index.cjs.js +140 -112
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +139 -111
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -6,13 +6,13 @@ var React = require('react');
|
|
|
6
6
|
var neetoCist = require('@bigbinary/neeto-cist');
|
|
7
7
|
var neetoui = require('@bigbinary/neetoui');
|
|
8
8
|
var reactI18next = require('react-i18next');
|
|
9
|
+
var initializers = require('@bigbinary/neeto-commons-frontend/initializers');
|
|
10
|
+
var require$$0 = require('util');
|
|
9
11
|
var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
10
12
|
var neetoIcons = require('@bigbinary/neeto-icons');
|
|
11
13
|
var misc = require('@bigbinary/neeto-icons/misc');
|
|
12
|
-
var initializers = require('@bigbinary/neeto-commons-frontend/initializers');
|
|
13
|
-
var require$$0 = require('util');
|
|
14
|
-
var Search = require('@bigbinary/neeto-molecules/Search');
|
|
15
14
|
var classNames = require('classnames');
|
|
15
|
+
var Search = require('@bigbinary/neeto-molecules/Search');
|
|
16
16
|
var Scrollable = require('@bigbinary/neeto-molecules/Scrollable');
|
|
17
17
|
var DateFormat = require('@bigbinary/neeto-molecules/DateFormat');
|
|
18
18
|
|
|
@@ -20,106 +20,11 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
20
20
|
|
|
21
21
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
22
22
|
var require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0);
|
|
23
|
-
var Search__default = /*#__PURE__*/_interopDefaultLegacy(Search);
|
|
24
23
|
var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
|
|
24
|
+
var Search__default = /*#__PURE__*/_interopDefaultLegacy(Search);
|
|
25
25
|
var Scrollable__default = /*#__PURE__*/_interopDefaultLegacy(Scrollable);
|
|
26
26
|
var DateFormat__default = /*#__PURE__*/_interopDefaultLegacy(DateFormat);
|
|
27
27
|
|
|
28
|
-
var Configure = reactUtils.withT(function (_ref) {
|
|
29
|
-
var t = _ref.t,
|
|
30
|
-
isConnected = _ref.isConnected,
|
|
31
|
-
installationUrl = _ref.installationUrl;
|
|
32
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
33
|
-
className: "neeto-ui-text-gray-900 font-sans text-sm font-normal leading-6 antialiased"
|
|
34
|
-
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
35
|
-
className: "mt-1 text-indigo-600 2xl:mt-3",
|
|
36
|
-
href: installationUrl,
|
|
37
|
-
icon: isConnected ? neetoIcons.Settings : neetoIcons.Plus,
|
|
38
|
-
iconPosition: "left",
|
|
39
|
-
iconSize: 20,
|
|
40
|
-
size: "small",
|
|
41
|
-
style: "text"
|
|
42
|
-
}, isConnected ? t("neetoGithub.configureAccount") : t("neetoGithub.connectAccount")));
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
var Header = reactUtils.withT(function (_ref) {
|
|
46
|
-
var t = _ref.t;
|
|
47
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
48
|
-
className: "neeto-ui-text-gray-800 mb-1 flex w-full flex-row items-center space-x-2 font-sans text-lg font-medium leading-6 antialiased"
|
|
49
|
-
}, /*#__PURE__*/React__default["default"].createElement(misc.Github, {
|
|
50
|
-
size: 16
|
|
51
|
-
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
52
|
-
style: "h4"
|
|
53
|
-
}, t("neetoGithub.github")));
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
var List$1 = reactUtils.withT(function (_ref) {
|
|
57
|
-
var t = _ref.t,
|
|
58
|
-
accounts = _ref.accounts;
|
|
59
|
-
return accounts.map(function (_ref2) {
|
|
60
|
-
var id = _ref2.id,
|
|
61
|
-
name = _ref2.name,
|
|
62
|
-
avatarUrl = _ref2.avatarUrl,
|
|
63
|
-
type = _ref2.type,
|
|
64
|
-
profileUrl = _ref2.profileUrl,
|
|
65
|
-
count = _ref2.count;
|
|
66
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
67
|
-
className: "neeto-ui-border-gray-300 flex w-full items-center space-x-2 border-b border-l-0 border-r-0 border-t-0 border-solid p-2",
|
|
68
|
-
key: id
|
|
69
|
-
}, type === "Organization" ? /*#__PURE__*/React__default["default"].createElement(neetoIcons.Building, {
|
|
70
|
-
className: "neeto-ui-text-gray-600",
|
|
71
|
-
size: 16
|
|
72
|
-
}) : /*#__PURE__*/React__default["default"].createElement(neetoIcons.User, {
|
|
73
|
-
className: "neeto-ui-text-gray-600",
|
|
74
|
-
size: 16
|
|
75
|
-
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
76
|
-
className: "neeto-ui-text-gray-900",
|
|
77
|
-
style: "body2"
|
|
78
|
-
}, "@", name), /*#__PURE__*/React__default["default"].createElement("img", {
|
|
79
|
-
alt: name,
|
|
80
|
-
className: "neeto-ui-rounded-full h-4 w-4",
|
|
81
|
-
src: avatarUrl
|
|
82
|
-
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
83
|
-
className: "text-indigo-600",
|
|
84
|
-
icon: neetoIcons.CannedResponses,
|
|
85
|
-
iconPosition: "left",
|
|
86
|
-
iconSize: 16,
|
|
87
|
-
size: "small",
|
|
88
|
-
style: "text",
|
|
89
|
-
onClick: function onClick() {
|
|
90
|
-
return window.open(profileUrl, "_blank");
|
|
91
|
-
}
|
|
92
|
-
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
93
|
-
className: "neeto-ui-text-gray-900 mx-2 text-sm",
|
|
94
|
-
component: "span",
|
|
95
|
-
style: "h3"
|
|
96
|
-
}, "\u2022"), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
97
|
-
style: "body2"
|
|
98
|
-
}, t("neetoGithub.countOf.repos", {
|
|
99
|
-
count: count
|
|
100
|
-
})));
|
|
101
|
-
});
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
var Accounts = function Accounts(_ref) {
|
|
105
|
-
var accounts = _ref.accounts,
|
|
106
|
-
isConnected = _ref.isConnected,
|
|
107
|
-
onConnect = _ref.onConnect,
|
|
108
|
-
installationUrl = _ref.installationUrl;
|
|
109
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
110
|
-
className: "flex w-full flex-col border border-solid border-transparent px-0 py-2 2xl:max-w-sm 2xl:px-8"
|
|
111
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
112
|
-
className: "mb-2"
|
|
113
|
-
}, /*#__PURE__*/React__default["default"].createElement(Header, null), /*#__PURE__*/React__default["default"].createElement(List$1, {
|
|
114
|
-
accounts: accounts,
|
|
115
|
-
isConnected: isConnected
|
|
116
|
-
}), /*#__PURE__*/React__default["default"].createElement(Configure, {
|
|
117
|
-
installationUrl: installationUrl,
|
|
118
|
-
isConnected: isConnected,
|
|
119
|
-
onConnect: onConnect
|
|
120
|
-
})));
|
|
121
|
-
};
|
|
122
|
-
|
|
123
28
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
124
29
|
|
|
125
30
|
/* eslint complexity: [2, 18], max-statements: [2, 33] */
|
|
@@ -2378,6 +2283,105 @@ var newInstallationParams = lib.stringify({
|
|
|
2378
2283
|
var NEW_INSTALLATION_URL = "/github_integrations/app_installations/new?".concat(newInstallationParams);
|
|
2379
2284
|
var TROUBLESHOOT_URL = "https://render.com/docs/github#troubleshooting";
|
|
2380
2285
|
|
|
2286
|
+
var Configure = reactUtils.withT(function (_ref) {
|
|
2287
|
+
var t = _ref.t,
|
|
2288
|
+
isConnected = _ref.isConnected,
|
|
2289
|
+
installationUrl = _ref.installationUrl;
|
|
2290
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2291
|
+
className: "neeto-ui-text-gray-900 font-sans text-sm font-normal leading-6 antialiased"
|
|
2292
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
2293
|
+
className: "mt-1 text-indigo-600 xl:mt-3",
|
|
2294
|
+
href: installationUrl,
|
|
2295
|
+
icon: isConnected ? neetoIcons.Settings : neetoIcons.Plus,
|
|
2296
|
+
iconPosition: "left",
|
|
2297
|
+
iconSize: 20,
|
|
2298
|
+
size: "small",
|
|
2299
|
+
style: "text"
|
|
2300
|
+
}, isConnected ? t("neetoGithub.configureAccount") : t("neetoGithub.connectAccount")));
|
|
2301
|
+
});
|
|
2302
|
+
|
|
2303
|
+
var Header = reactUtils.withT(function (_ref) {
|
|
2304
|
+
var t = _ref.t;
|
|
2305
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2306
|
+
className: "neeto-ui-text-gray-800 mb-1 flex w-full flex-row items-center space-x-2 font-sans text-lg font-medium leading-6 antialiased"
|
|
2307
|
+
}, /*#__PURE__*/React__default["default"].createElement(misc.Github, {
|
|
2308
|
+
size: 16
|
|
2309
|
+
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
2310
|
+
style: "h4"
|
|
2311
|
+
}, t("neetoGithub.github")));
|
|
2312
|
+
});
|
|
2313
|
+
|
|
2314
|
+
var List$1 = reactUtils.withT(function (_ref) {
|
|
2315
|
+
var t = _ref.t,
|
|
2316
|
+
accounts = _ref.accounts;
|
|
2317
|
+
return accounts.map(function (_ref2) {
|
|
2318
|
+
var id = _ref2.id,
|
|
2319
|
+
name = _ref2.name,
|
|
2320
|
+
avatarUrl = _ref2.avatarUrl,
|
|
2321
|
+
type = _ref2.type,
|
|
2322
|
+
profileUrl = _ref2.profileUrl,
|
|
2323
|
+
count = _ref2.count;
|
|
2324
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2325
|
+
className: "neeto-ui-border-gray-300 flex w-full items-center space-x-2 border-b border-l-0 border-r-0 border-t-0 border-solid p-2",
|
|
2326
|
+
key: id
|
|
2327
|
+
}, type === "Organization" ? /*#__PURE__*/React__default["default"].createElement(neetoIcons.Building, {
|
|
2328
|
+
className: "neeto-ui-text-gray-600",
|
|
2329
|
+
size: 16
|
|
2330
|
+
}) : /*#__PURE__*/React__default["default"].createElement(neetoIcons.User, {
|
|
2331
|
+
className: "neeto-ui-text-gray-600",
|
|
2332
|
+
size: 16
|
|
2333
|
+
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
2334
|
+
className: "neeto-ui-text-gray-900",
|
|
2335
|
+
style: "body2"
|
|
2336
|
+
}, "@", name), /*#__PURE__*/React__default["default"].createElement("img", {
|
|
2337
|
+
alt: name,
|
|
2338
|
+
className: "neeto-ui-rounded-full h-4 w-4",
|
|
2339
|
+
src: avatarUrl
|
|
2340
|
+
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
2341
|
+
className: "text-indigo-600",
|
|
2342
|
+
icon: neetoIcons.CannedResponses,
|
|
2343
|
+
iconPosition: "left",
|
|
2344
|
+
iconSize: 16,
|
|
2345
|
+
size: "small",
|
|
2346
|
+
style: "text",
|
|
2347
|
+
onClick: function onClick() {
|
|
2348
|
+
return window.open(profileUrl, "_blank");
|
|
2349
|
+
}
|
|
2350
|
+
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
2351
|
+
className: "neeto-ui-text-gray-900 mx-2 text-sm",
|
|
2352
|
+
component: "span",
|
|
2353
|
+
style: "h3"
|
|
2354
|
+
}, "\u2022"), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
2355
|
+
style: "body2"
|
|
2356
|
+
}, t("neetoGithub.countOf.repos", {
|
|
2357
|
+
count: count
|
|
2358
|
+
})));
|
|
2359
|
+
});
|
|
2360
|
+
});
|
|
2361
|
+
|
|
2362
|
+
var Accounts = function Accounts(_ref) {
|
|
2363
|
+
var isPane = _ref.isPane,
|
|
2364
|
+
accounts = _ref.accounts,
|
|
2365
|
+
isConnected = _ref.isConnected,
|
|
2366
|
+
onConnect = _ref.onConnect,
|
|
2367
|
+
installationUrl = _ref.installationUrl;
|
|
2368
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2369
|
+
className: classNames__default["default"]("flex w-full flex-col border border-solid border-transparent px-0 py-2", {
|
|
2370
|
+
"2xl:max-w-sm 2xl:px-8": isPane,
|
|
2371
|
+
"xl:max-w-sm xl:px-8": !isPane
|
|
2372
|
+
})
|
|
2373
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2374
|
+
className: "mb-2"
|
|
2375
|
+
}, /*#__PURE__*/React__default["default"].createElement(Header, null), /*#__PURE__*/React__default["default"].createElement(List$1, {
|
|
2376
|
+
accounts: accounts,
|
|
2377
|
+
isConnected: isConnected
|
|
2378
|
+
}), /*#__PURE__*/React__default["default"].createElement(Configure, {
|
|
2379
|
+
installationUrl: installationUrl,
|
|
2380
|
+
isConnected: isConnected,
|
|
2381
|
+
onConnect: onConnect
|
|
2382
|
+
})));
|
|
2383
|
+
};
|
|
2384
|
+
|
|
2381
2385
|
function _arrayWithHoles(arr) {
|
|
2382
2386
|
if (Array.isArray(arr)) return arr;
|
|
2383
2387
|
}
|
|
@@ -2674,7 +2678,7 @@ var Repositories = function Repositories(_ref) {
|
|
|
2674
2678
|
installationUrl = _ref.installationUrl,
|
|
2675
2679
|
troubleshootUrl = _ref.troubleshootUrl;
|
|
2676
2680
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2677
|
-
className: "w-full space-y-6
|
|
2681
|
+
className: "w-full space-y-6"
|
|
2678
2682
|
}, /*#__PURE__*/React__default["default"].createElement(Private, {
|
|
2679
2683
|
isPublicRepoAllowed: isPublicRepoAllowed,
|
|
2680
2684
|
installationUrl: installationUrl,
|
|
@@ -2687,6 +2691,37 @@ var Repositories = function Repositories(_ref) {
|
|
|
2687
2691
|
}));
|
|
2688
2692
|
};
|
|
2689
2693
|
|
|
2694
|
+
var NeetoGithubNanoContainer = function NeetoGithubNanoContainer(_ref) {
|
|
2695
|
+
var _ref$accounts = _ref.accounts,
|
|
2696
|
+
accounts = _ref$accounts === void 0 ? [] : _ref$accounts,
|
|
2697
|
+
installationUrl = _ref.installationUrl,
|
|
2698
|
+
isConnected = _ref.isConnected,
|
|
2699
|
+
_ref$isPublicRepoAllo = _ref.isPublicRepoAllowed,
|
|
2700
|
+
isPublicRepoAllowed = _ref$isPublicRepoAllo === void 0 ? false : _ref$isPublicRepoAllo,
|
|
2701
|
+
onConnect = _ref.onConnect,
|
|
2702
|
+
_ref$repositories = _ref.repositories,
|
|
2703
|
+
repositories = _ref$repositories === void 0 ? [] : _ref$repositories,
|
|
2704
|
+
troubleshootUrl = _ref.troubleshootUrl,
|
|
2705
|
+
_ref$isPane = _ref.isPane,
|
|
2706
|
+
isPane = _ref$isPane === void 0 ? false : _ref$isPane;
|
|
2707
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2708
|
+
className: "flex w-full flex-col-reverse 2xl:flex-row"
|
|
2709
|
+
}, /*#__PURE__*/React__default["default"].createElement(Repositories, {
|
|
2710
|
+
installationUrl: installationUrl,
|
|
2711
|
+
isConnected: isConnected,
|
|
2712
|
+
isPublicRepoAllowed: isPublicRepoAllowed,
|
|
2713
|
+
onConnect: onConnect,
|
|
2714
|
+
repositories: repositories,
|
|
2715
|
+
troubleshootUrl: troubleshootUrl
|
|
2716
|
+
}), /*#__PURE__*/React__default["default"].createElement(Accounts, {
|
|
2717
|
+
accounts: accounts,
|
|
2718
|
+
installationUrl: installationUrl,
|
|
2719
|
+
isConnected: isConnected,
|
|
2720
|
+
onConnect: onConnect,
|
|
2721
|
+
isPane: isPane
|
|
2722
|
+
}));
|
|
2723
|
+
};
|
|
2724
|
+
|
|
2690
2725
|
var NeetoGithubNanoModal = function NeetoGithubNanoModal(_ref) {
|
|
2691
2726
|
var isOpen = _ref.isOpen,
|
|
2692
2727
|
onClose = _ref.onClose,
|
|
@@ -2718,23 +2753,16 @@ var NeetoGithubNanoModal = function NeetoGithubNanoModal(_ref) {
|
|
|
2718
2753
|
}, t("neetoGithub.modal.title")), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
2719
2754
|
className: "mt-4",
|
|
2720
2755
|
style: "body2"
|
|
2721
|
-
}, t("neetoGithub.modal.description"))), /*#__PURE__*/React__default["default"].createElement(neetoui.Pane.Body, null, /*#__PURE__*/React__default["default"].createElement(
|
|
2722
|
-
|
|
2723
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2724
|
-
className: "flex flex-col-reverse 2xl:flex-row"
|
|
2725
|
-
}, /*#__PURE__*/React__default["default"].createElement(Repositories, {
|
|
2756
|
+
}, t("neetoGithub.modal.description"))), /*#__PURE__*/React__default["default"].createElement(neetoui.Pane.Body, null, /*#__PURE__*/React__default["default"].createElement(NeetoGithubNanoContainer, {
|
|
2757
|
+
accounts: accounts,
|
|
2726
2758
|
installationUrl: installationUrl,
|
|
2727
2759
|
isConnected: isConnected,
|
|
2728
2760
|
isPublicRepoAllowed: isPublicRepoAllowed,
|
|
2729
2761
|
onConnect: onConnect,
|
|
2730
2762
|
repositories: repositories,
|
|
2731
|
-
troubleshootUrl: troubleshootUrl
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
installationUrl: installationUrl,
|
|
2735
|
-
isConnected: isConnected,
|
|
2736
|
-
onConnect: onConnect
|
|
2737
|
-
})))));
|
|
2763
|
+
troubleshootUrl: troubleshootUrl,
|
|
2764
|
+
isPane: true
|
|
2765
|
+
})));
|
|
2738
2766
|
};
|
|
2739
2767
|
|
|
2740
2768
|
var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
|