@bigbinary/neeto-github-frontend 1.0.26 → 1.0.28
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 +81 -70
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +80 -69
- package/dist/index.js.map +1 -1
- package/package.json +11 -11
package/dist/index.cjs.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var
|
|
6
|
+
var classnames = require('classnames');
|
|
7
7
|
var initializers = require('@bigbinary/neeto-commons-frontend/initializers');
|
|
8
8
|
var PageLoader = require('@bigbinary/neeto-molecules/PageLoader');
|
|
9
9
|
var reactI18next = require('react-i18next');
|
|
@@ -12,9 +12,9 @@ var reactQuery = require('react-query');
|
|
|
12
12
|
var axios = require('axios');
|
|
13
13
|
var constants = require('@bigbinary/neeto-commons-frontend/constants');
|
|
14
14
|
var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
15
|
-
var neetoIcons = require('@bigbinary/neeto-icons');
|
|
16
|
-
var neetoui = require('@bigbinary/neetoui');
|
|
17
15
|
var misc = require('@bigbinary/neeto-icons/misc');
|
|
16
|
+
var neetoui = require('@bigbinary/neetoui');
|
|
17
|
+
var neetoIcons = require('@bigbinary/neeto-icons');
|
|
18
18
|
var neetoCist = require('@bigbinary/neeto-cist');
|
|
19
19
|
var Search = require('@bigbinary/neeto-molecules/Search');
|
|
20
20
|
var DateFormat = require('@bigbinary/neeto-molecules/DateFormat');
|
|
@@ -23,7 +23,7 @@ var require$$0 = require('util');
|
|
|
23
23
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
24
24
|
|
|
25
25
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
26
|
-
var
|
|
26
|
+
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
27
27
|
var PageLoader__default = /*#__PURE__*/_interopDefaultLegacy(PageLoader);
|
|
28
28
|
var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
|
|
29
29
|
var Search__default = /*#__PURE__*/_interopDefaultLegacy(Search);
|
|
@@ -111,38 +111,45 @@ var useFetchGithubRepositories = function useFetchGithubRepositories(_ref) {
|
|
|
111
111
|
}));
|
|
112
112
|
};
|
|
113
113
|
|
|
114
|
+
var Header = reactUtils.withT(function (_ref) {
|
|
115
|
+
var t = _ref.t;
|
|
116
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
117
|
+
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"
|
|
118
|
+
}, /*#__PURE__*/React__default["default"].createElement(misc.Github, {
|
|
119
|
+
size: 16
|
|
120
|
+
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
121
|
+
style: "h4"
|
|
122
|
+
}, t("neetoGithub.github")));
|
|
123
|
+
});
|
|
124
|
+
|
|
114
125
|
var Configure = reactUtils.withT(function (_ref) {
|
|
115
126
|
var t = _ref.t,
|
|
116
127
|
isConnected = _ref.isConnected,
|
|
117
128
|
installationUrl = _ref.installationUrl;
|
|
118
129
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
119
|
-
className: "neeto-ui-text-gray-900 font-sans text-sm font-normal leading-6 antialiased"
|
|
130
|
+
className: "neeto-ui-text-gray-900 flex-shrink-0 font-sans text-sm font-normal leading-6 antialiased"
|
|
120
131
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
121
|
-
className: "mt-1 text-indigo-600 xl:mt-3",
|
|
122
132
|
href: installationUrl,
|
|
123
133
|
icon: isConnected ? neetoIcons.Settings : neetoIcons.Plus,
|
|
124
134
|
iconPosition: "left",
|
|
125
135
|
iconSize: 20,
|
|
126
136
|
size: "small",
|
|
127
|
-
style: "
|
|
137
|
+
style: "link"
|
|
128
138
|
}, isConnected ? t("neetoGithub.configureAccount") : t("neetoGithub.connectAccount")));
|
|
129
139
|
});
|
|
130
140
|
|
|
131
|
-
var Header = reactUtils.withT(function (_ref) {
|
|
132
|
-
var t = _ref.t;
|
|
133
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
134
|
-
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"
|
|
135
|
-
}, /*#__PURE__*/React__default["default"].createElement(misc.Github, {
|
|
136
|
-
size: 16
|
|
137
|
-
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
138
|
-
style: "h4"
|
|
139
|
-
}, t("neetoGithub.github")));
|
|
140
|
-
});
|
|
141
|
-
|
|
142
141
|
var List$1 = reactUtils.withT(function (_ref) {
|
|
143
142
|
var t = _ref.t,
|
|
144
|
-
accounts = _ref.accounts
|
|
145
|
-
|
|
143
|
+
accounts = _ref.accounts,
|
|
144
|
+
isConnected = _ref.isConnected,
|
|
145
|
+
installationUrl = _ref.installationUrl,
|
|
146
|
+
isPane = _ref.isPane;
|
|
147
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
148
|
+
className: classnames__default["default"]("neeto-ui-border-gray-300 flex justify-between gap-3 border-b pb-4 pt-2", {
|
|
149
|
+
"flex-col md:flex-row": isPane,
|
|
150
|
+
"flex-col": !isPane
|
|
151
|
+
})
|
|
152
|
+
}, accounts.map(function (_ref2) {
|
|
146
153
|
var id = _ref2.id,
|
|
147
154
|
name = _ref2.name,
|
|
148
155
|
avatarUrl = _ref2.avatarUrl,
|
|
@@ -150,41 +157,40 @@ var List$1 = reactUtils.withT(function (_ref) {
|
|
|
150
157
|
profileUrl = _ref2.profileUrl,
|
|
151
158
|
count = _ref2.count;
|
|
152
159
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
153
|
-
className: "
|
|
160
|
+
className: "flex w-full items-center space-x-2",
|
|
154
161
|
key: id
|
|
162
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
163
|
+
className: "flex items-center gap-1"
|
|
155
164
|
}, type === "Organization" ? /*#__PURE__*/React__default["default"].createElement(neetoIcons.Building, {
|
|
156
165
|
className: "neeto-ui-text-gray-600",
|
|
157
|
-
size:
|
|
158
|
-
}) : /*#__PURE__*/React__default["default"].createElement(
|
|
159
|
-
|
|
160
|
-
|
|
166
|
+
size: 24
|
|
167
|
+
}) : /*#__PURE__*/React__default["default"].createElement(neetoui.Avatar, {
|
|
168
|
+
size: "small",
|
|
169
|
+
user: {
|
|
170
|
+
imageUrl: avatarUrl
|
|
171
|
+
}
|
|
161
172
|
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
162
|
-
className: "neeto-ui-text-gray-
|
|
173
|
+
className: "neeto-ui-text-gray-800",
|
|
163
174
|
style: "body2"
|
|
164
|
-
},
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
169
|
-
className: "text-indigo-600",
|
|
170
|
-
icon: neetoIcons.CannedResponses,
|
|
171
|
-
iconPosition: "left",
|
|
172
|
-
iconSize: 16,
|
|
173
|
-
size: "small",
|
|
174
|
-
style: "text",
|
|
175
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
176
|
+
className: "neeto-ui-text-gray-800",
|
|
177
|
+
label: "@".concat(name),
|
|
178
|
+
style: "link",
|
|
175
179
|
onClick: function onClick() {
|
|
176
180
|
return window.open(profileUrl, "_blank");
|
|
177
181
|
}
|
|
182
|
+
}))), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
183
|
+
className: "neeto-ui-bg-gray-800 neeto-ui-rounded-full h-1 w-1"
|
|
178
184
|
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
179
|
-
className: "neeto-ui-text-
|
|
180
|
-
component: "span",
|
|
181
|
-
style: "h2"
|
|
182
|
-
}, "\u2022"), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
185
|
+
className: "neeto-ui-text-black",
|
|
183
186
|
style: "body2"
|
|
184
187
|
}, t("neetoGithub.countOf.repos", {
|
|
185
188
|
count: count
|
|
186
189
|
})));
|
|
187
|
-
})
|
|
190
|
+
}), /*#__PURE__*/React__default["default"].createElement(Configure, {
|
|
191
|
+
installationUrl: installationUrl,
|
|
192
|
+
isConnected: isConnected
|
|
193
|
+
}));
|
|
188
194
|
});
|
|
189
195
|
|
|
190
196
|
var Accounts = function Accounts(_ref) {
|
|
@@ -194,18 +200,17 @@ var Accounts = function Accounts(_ref) {
|
|
|
194
200
|
onConnect = _ref.onConnect,
|
|
195
201
|
installationUrl = _ref.installationUrl;
|
|
196
202
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
197
|
-
className:
|
|
198
|
-
"
|
|
199
|
-
"
|
|
203
|
+
className: classnames__default["default"]("flex w-full flex-col border border-solid border-transparent px-0 py-2", {
|
|
204
|
+
"order-1": isPane,
|
|
205
|
+
"md:order-2 md:max-w-72 lg:max-w-sm lg:px-6": !isPane
|
|
200
206
|
})
|
|
201
207
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
202
208
|
className: "mb-2"
|
|
203
209
|
}, /*#__PURE__*/React__default["default"].createElement(Header, null), /*#__PURE__*/React__default["default"].createElement(List$1, {
|
|
204
210
|
accounts: accounts,
|
|
205
|
-
isConnected: isConnected
|
|
206
|
-
}), /*#__PURE__*/React__default["default"].createElement(Configure, {
|
|
207
211
|
installationUrl: installationUrl,
|
|
208
212
|
isConnected: isConnected,
|
|
213
|
+
isPane: isPane,
|
|
209
214
|
onConnect: onConnect
|
|
210
215
|
})));
|
|
211
216
|
};
|
|
@@ -312,25 +317,26 @@ var RepositoryTile = function RepositoryTile(_ref) {
|
|
|
312
317
|
isPrivate = repository.isPrivate,
|
|
313
318
|
updatedAt = repository.updatedAt;
|
|
314
319
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
315
|
-
className: "neeto-ui-border-gray-300 flex
|
|
320
|
+
className: "neeto-ui-border-gray-300 flex flex-col justify-between gap-3 border-b border-solid py-3 pl-3 pr-3 last:border-b-0 md:flex-row md:items-center md:pl-5",
|
|
316
321
|
key: id
|
|
317
322
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
318
323
|
className: "width-calc flex items-center space-x-2"
|
|
319
324
|
}, /*#__PURE__*/React__default["default"].createElement(misc.Github, {
|
|
325
|
+
className: "flex-shrink-0",
|
|
320
326
|
size: 16
|
|
321
327
|
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
322
328
|
style: "body2"
|
|
323
329
|
}, fullName), isPrivate && /*#__PURE__*/React__default["default"].createElement(neetoIcons.Lock, {
|
|
330
|
+
className: "flex-shrink-0",
|
|
324
331
|
size: 16
|
|
325
332
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
326
|
-
className: "hidden
|
|
327
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
328
|
-
className: "neeto-ui-
|
|
329
|
-
|
|
330
|
-
style: "h2"
|
|
331
|
-
}, "\u2022"), /*#__PURE__*/React__default["default"].createElement(DateFormat__default["default"].FromNow, {
|
|
333
|
+
className: "hidden lg:inline-block"
|
|
334
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
335
|
+
className: "neeto-ui-bg-gray-800 neeto-ui-rounded-full h-1 w-1"
|
|
336
|
+
}), /*#__PURE__*/React__default["default"].createElement(DateFormat__default["default"].FromNow, {
|
|
332
337
|
date: updatedAt
|
|
333
338
|
}))), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
339
|
+
className: "w-max",
|
|
334
340
|
disabled: isConnecting,
|
|
335
341
|
loading: isLoading,
|
|
336
342
|
style: "primary",
|
|
@@ -354,9 +360,9 @@ var List = reactUtils.withT(function (_ref) {
|
|
|
354
360
|
installationUrl = _ref.installationUrl,
|
|
355
361
|
troubleshootUrl = _ref.troubleshootUrl;
|
|
356
362
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
357
|
-
className: "h-full overflow-y-scroll px-6 pb-6"
|
|
363
|
+
className: "h-full overflow-y-scroll px-4 pb-4 md:px-6 md:pb-6"
|
|
358
364
|
}, neetoCist.isPresent(repositories) ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
359
|
-
className:
|
|
365
|
+
className: classnames__default["default"]("neeto-ui-border-gray-300 neeto-ui-rounded-md flex flex-col items-center justify-center border", {
|
|
360
366
|
"h-auto": neetoCist.isPresent(filteredRepositories),
|
|
361
367
|
"h-full": !neetoCist.isPresent(filteredRepositories)
|
|
362
368
|
})
|
|
@@ -424,7 +430,7 @@ var Private = function Private(_ref) {
|
|
|
424
430
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
425
431
|
className: "connect-repo flex h-full flex-col"
|
|
426
432
|
}, isConnected ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
427
|
-
className: "space-y-3 p-6"
|
|
433
|
+
className: "space-y-3 p-4 md:p-6"
|
|
428
434
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
429
435
|
className: "flex-shrink-0 text-lg font-medium",
|
|
430
436
|
style: "h2"
|
|
@@ -461,9 +467,13 @@ var Repositories = function Repositories(_ref) {
|
|
|
461
467
|
repositories = _ref.repositories,
|
|
462
468
|
onConnect = _ref.onConnect,
|
|
463
469
|
installationUrl = _ref.installationUrl,
|
|
464
|
-
troubleshootUrl = _ref.troubleshootUrl
|
|
470
|
+
troubleshootUrl = _ref.troubleshootUrl,
|
|
471
|
+
isPane = _ref.isPane;
|
|
465
472
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
466
|
-
className: "neeto-ui-rounded-md neeto-ui-border-gray-300 h-full w-full space-y-6 border border-solid"
|
|
473
|
+
className: classnames__default["default"]("neeto-ui-rounded-md neeto-ui-border-gray-300 h-full w-full space-y-6 border border-solid", {
|
|
474
|
+
"order-2": isPane,
|
|
475
|
+
"order-1": !isPane
|
|
476
|
+
})
|
|
467
477
|
}, /*#__PURE__*/React__default["default"].createElement(Private, {
|
|
468
478
|
installationUrl: installationUrl,
|
|
469
479
|
isConnected: isConnected,
|
|
@@ -514,23 +524,24 @@ var NeetoGithubNanoContainer = function NeetoGithubNanoContainer(_ref) {
|
|
|
514
524
|
}));
|
|
515
525
|
}
|
|
516
526
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
517
|
-
className:
|
|
518
|
-
"
|
|
519
|
-
"
|
|
527
|
+
className: classnames__default["default"]("flex min-h-0 w-full flex-grow flex-col", {
|
|
528
|
+
"flex-col": isPane,
|
|
529
|
+
"gap-3 md:flex-row md:gap-6": !isPane
|
|
520
530
|
})
|
|
521
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
531
|
+
}, /*#__PURE__*/React__default["default"].createElement(Accounts, {
|
|
532
|
+
accounts: accounts,
|
|
533
|
+
installationUrl: installationUrl,
|
|
534
|
+
isConnected: isConnected,
|
|
535
|
+
isPane: isPane,
|
|
536
|
+
onConnect: onConnect
|
|
537
|
+
}), /*#__PURE__*/React__default["default"].createElement(Repositories, {
|
|
522
538
|
installationUrl: installationUrl,
|
|
523
539
|
isConnected: isConnected,
|
|
524
540
|
isConnecting: isConnecting,
|
|
541
|
+
isPane: isPane,
|
|
525
542
|
onConnect: onConnect,
|
|
526
543
|
repositories: repositories,
|
|
527
544
|
troubleshootUrl: troubleshootUrl
|
|
528
|
-
}), /*#__PURE__*/React__default["default"].createElement(Accounts, {
|
|
529
|
-
accounts: accounts,
|
|
530
|
-
installationUrl: installationUrl,
|
|
531
|
-
isConnected: isConnected,
|
|
532
|
-
isPane: isPane,
|
|
533
|
-
onConnect: onConnect
|
|
534
545
|
}));
|
|
535
546
|
};
|
|
536
547
|
|
|
@@ -2847,7 +2858,7 @@ var NeetoGithubNanoPane = function NeetoGithubNanoPane(_ref) {
|
|
|
2847
2858
|
|
|
2848
2859
|
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}}
|
|
2849
2860
|
|
|
2850
|
-
var css = ".width-calc{width:calc(100% - 82px)}.neeto-github-modal-pane-wrapper{width:min(
|
|
2861
|
+
var css = ".width-calc{width:100%}@media (min-width:768px){.width-calc{width:calc(100% - 82px)}}.neeto-github-modal-pane-wrapper{width:min(100%,1280px)}@media (min-width:768px){.neeto-github-modal-pane-wrapper{width:min(90%,1280px)}}@media (min-width:1024px){.neeto-github-modal-pane-wrapper{width:min(60%,1280px)}}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC9qYXZhc2NyaXB0L3N0eWxlc2hlZXRzL2NvbXBvbmVudHMvX3JlcG9zaXRvcnktdGlsZS5zY3NzIiwiYXBwL2phdmFzY3JpcHQvc3R5bGVzaGVldHMvYXBwbGljYXRpb24uc2NzcyIsImFwcC9qYXZhc2NyaXB0L3N0eWxlc2hlZXRzL2NvbXBvbmVudHMvX3BhbmUuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxZQUNFLFVDQ0YsQ0RDRSx5QkFIRixZQUlJLHVCQ0VGLENBQ0YsQ0NQQSxpQ0FDRSxzQkRVRixDQ1JFLHlCQUhGLGlDQUlJLHFCRFdGLENBQ0YsQ0NURSwwQkFQRixpQ0FRSSxxQkRZRixDQUNGIiwic291cmNlc0NvbnRlbnQiOlsiLndpZHRoLWNhbGMge1xuICB3aWR0aDogMTAwJTtcblxuICBAc2NyZWVuIG1kIHtcbiAgICB3aWR0aDogY2FsYygxMDAlIC0gODJweCk7XG4gIH1cbn1cbiIsIi53aWR0aC1jYWxjIHtcbiAgd2lkdGg6IDEwMCU7XG59XG5Ac2NyZWVuIG1kIHtcbiAgLndpZHRoLWNhbGMge1xuICAgIHdpZHRoOiBjYWxjKDEwMCUgLSA4MnB4KTtcbiAgfVxufVxuXG4ubmVldG8tZ2l0aHViLW1vZGFsLXBhbmUtd3JhcHBlciB7XG4gIHdpZHRoOiBtaW4oMTAwJSwgMTI4MHB4KTtcbn1cbkBzY3JlZW4gbWQge1xuICAubmVldG8tZ2l0aHViLW1vZGFsLXBhbmUtd3JhcHBlciB7XG4gICAgd2lkdGg6IG1pbig5MCUsIDEyODBweCk7XG4gIH1cbn1cbkBzY3JlZW4gbGcge1xuICAubmVldG8tZ2l0aHViLW1vZGFsLXBhbmUtd3JhcHBlciB7XG4gICAgd2lkdGg6IG1pbig2MCUsIDEyODBweCk7XG4gIH1cbn0iLCIubmVldG8tZ2l0aHViLW1vZGFsLXBhbmUtd3JhcHBlciB7XG4gIHdpZHRoOiBtaW4oMTAwJSwgMTI4MHB4KTtcblxuICBAc2NyZWVuIG1kIHtcbiAgICB3aWR0aDogbWluKDkwJSwgMTI4MHB4KTtcbiAgfVxuXG4gIEBzY3JlZW4gbGcge1xuICAgIHdpZHRoOiBtaW4oNjAlLCAxMjgwcHgpO1xuICB9XG59XG4iXX0= */";
|
|
2851
2862
|
n(css,{});
|
|
2852
2863
|
|
|
2853
2864
|
exports.NeetoGithubNanoContainer = NeetoGithubNanoContainer;
|