@bigbinary/neeto-github-frontend 1.0.13 → 1.0.15
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 +38 -263
- package/app/javascript/src/translations/en.json +2 -6
- package/dist/index.cjs.js +5 -95
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +6 -96
- package/dist/index.js.map +1 -1
- package/package.json +17 -17
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import axios from 'axios';
|
|
|
9
9
|
import { DEFAULT_STALE_TIME } from '@bigbinary/neeto-commons-frontend/constants';
|
|
10
10
|
import { withT } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
11
11
|
import { Settings, Plus, Building, User, CannedResponses, Lock } from '@bigbinary/neeto-icons';
|
|
12
|
-
import { Button, Typography,
|
|
12
|
+
import { Button, Typography, Pane } from '@bigbinary/neetoui';
|
|
13
13
|
import { Github } from '@bigbinary/neeto-icons/misc';
|
|
14
14
|
import { isPresent, findBy, noop } from '@bigbinary/neeto-cist';
|
|
15
15
|
import Search from '@bigbinary/neeto-molecules/Search';
|
|
@@ -332,7 +332,6 @@ var RepositoryTile = function RepositoryTile(_ref) {
|
|
|
332
332
|
|
|
333
333
|
var List = withT(function (_ref) {
|
|
334
334
|
var t = _ref.t,
|
|
335
|
-
isPublicRepoAllowed = _ref.isPublicRepoAllowed,
|
|
336
335
|
filteredRepositories = _ref.filteredRepositories,
|
|
337
336
|
repositories = _ref.repositories,
|
|
338
337
|
isConnecting = _ref.isConnecting,
|
|
@@ -340,10 +339,7 @@ var List = withT(function (_ref) {
|
|
|
340
339
|
installationUrl = _ref.installationUrl,
|
|
341
340
|
troubleshootUrl = _ref.troubleshootUrl;
|
|
342
341
|
return /*#__PURE__*/React.createElement("div", {
|
|
343
|
-
className:
|
|
344
|
-
"h-52": isPublicRepoAllowed,
|
|
345
|
-
"h-72": !isPublicRepoAllowed
|
|
346
|
-
})
|
|
342
|
+
className: "neeto-ui-border-gray-300 neeto-ui-rounded-md m-0 flex h-80 flex-col items-center justify-center border border-solid p-0 2xl:h-96"
|
|
347
343
|
}, isPresent(repositories) ? /*#__PURE__*/React.createElement(Scrollable, {
|
|
348
344
|
className: "m-0 h-full w-full overflow-y-scroll p-0 shadow-inner"
|
|
349
345
|
}, isPresent(filteredRepositories) ? filteredRepositories.map(function (repository, index) {
|
|
@@ -384,7 +380,6 @@ var NotConnected = withT(function (_ref) {
|
|
|
384
380
|
var Private = function Private(_ref) {
|
|
385
381
|
var isConnected = _ref.isConnected,
|
|
386
382
|
isConnecting = _ref.isConnecting,
|
|
387
|
-
isPublicRepoAllowed = _ref.isPublicRepoAllowed,
|
|
388
383
|
repositories = _ref.repositories,
|
|
389
384
|
onConnect = _ref.onConnect,
|
|
390
385
|
installationUrl = _ref.installationUrl,
|
|
@@ -408,13 +403,14 @@ var Private = function Private(_ref) {
|
|
|
408
403
|
};
|
|
409
404
|
return /*#__PURE__*/React.createElement("div", {
|
|
410
405
|
className: "connect-repo neeto-ui-rounded-md neeto-ui-border-gray-300 border border-solid px-8 py-7"
|
|
411
|
-
}, /*#__PURE__*/React.createElement(Typography, {
|
|
406
|
+
}, isConnected && /*#__PURE__*/React.createElement(Typography, {
|
|
412
407
|
className: "mb-2 pb-5 text-lg font-medium",
|
|
413
408
|
style: "h2"
|
|
414
409
|
}, t("neetoGithub.connectARepo")), isConnected ? /*#__PURE__*/React.createElement("div", {
|
|
415
410
|
className: "flex w-full flex-col space-y-6"
|
|
416
411
|
}, /*#__PURE__*/React.createElement(Search, {
|
|
417
412
|
onSearch: onSearch,
|
|
413
|
+
unlimitedChars: false,
|
|
418
414
|
className: "w-full",
|
|
419
415
|
suffix: /*#__PURE__*/React.createElement(Typography, {
|
|
420
416
|
style: "body2"
|
|
@@ -425,7 +421,6 @@ var Private = function Private(_ref) {
|
|
|
425
421
|
filteredRepositories: filteredRepositories,
|
|
426
422
|
installationUrl: installationUrl,
|
|
427
423
|
isConnecting: isConnecting,
|
|
428
|
-
isPublicRepoAllowed: isPublicRepoAllowed,
|
|
429
424
|
onConnect: onConnect,
|
|
430
425
|
repositories: repositories,
|
|
431
426
|
troubleshootUrl: troubleshootUrl
|
|
@@ -438,79 +433,9 @@ var Private = function Private(_ref) {
|
|
|
438
433
|
}))));
|
|
439
434
|
};
|
|
440
435
|
|
|
441
|
-
var Public = function Public(_ref) {
|
|
442
|
-
var isConnecting = _ref.isConnecting,
|
|
443
|
-
onConnect = _ref.onConnect;
|
|
444
|
-
var _useTranslation = useTranslation(),
|
|
445
|
-
t = _useTranslation.t;
|
|
446
|
-
var _useState = useState(false),
|
|
447
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
448
|
-
isLoading = _useState2[0],
|
|
449
|
-
setIsLoading = _useState2[1];
|
|
450
|
-
var _useState3 = useState(""),
|
|
451
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
452
|
-
publicRepoUrl = _useState4[0],
|
|
453
|
-
setPublicRepoUrl = _useState4[1];
|
|
454
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
455
|
-
className: "transition-drop-shadow neeto-ui-border-gray-300 neeto-ui-rounded-md border border-solid px-8 py-7 font-sans transition-colors"
|
|
456
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
457
|
-
className: "mb-2 pb-5"
|
|
458
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
459
|
-
className: "flex justify-between"
|
|
460
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
461
|
-
className: "pr-4"
|
|
462
|
-
}, /*#__PURE__*/React.createElement(Typography, {
|
|
463
|
-
className: "text-lg font-medium",
|
|
464
|
-
style: "h2"
|
|
465
|
-
}, t("neetoGithub.publicGitRepo")), /*#__PURE__*/React.createElement("div", {
|
|
466
|
-
className: "neeto-ui-text-gray-900 mt-2 flex max-w-xl space-x-1 font-sans text-sm font-normal leading-6 antialiased"
|
|
467
|
-
}, /*#__PURE__*/React.createElement(Typography, {
|
|
468
|
-
style: "body2"
|
|
469
|
-
}, t("neetoGithub.publicGitRepoDescription")))))), /*#__PURE__*/React.createElement("div", {
|
|
470
|
-
className: "neeto-ui-text-gray-900 font-sans text-sm font-normal leading-6 antialiased"
|
|
471
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
472
|
-
className: "flex"
|
|
473
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
474
|
-
className: "z-0 flex-1"
|
|
475
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
476
|
-
className: "w-full"
|
|
477
|
-
}, /*#__PURE__*/React.createElement(Input, {
|
|
478
|
-
nakedInput: true,
|
|
479
|
-
autocomplete: "false",
|
|
480
|
-
className: "relative rounded-b rounded-l rounded-r-none rounded-t border-b border-l border-r-0 border-t border-solid px-2",
|
|
481
|
-
placeholder: t("neetoGithub.publicGitRepoPlaceholder"),
|
|
482
|
-
size: "large",
|
|
483
|
-
spellcheck: "false",
|
|
484
|
-
type: "text",
|
|
485
|
-
value: publicRepoUrl,
|
|
486
|
-
onChange: function onChange(e) {
|
|
487
|
-
return setPublicRepoUrl(e.target.value);
|
|
488
|
-
}
|
|
489
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
490
|
-
className: "relative"
|
|
491
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
492
|
-
className: "rounded-b rounded-l-none rounded-r rounded-t",
|
|
493
|
-
disabled: !isPresent(publicRepoUrl) || isLoading || isConnecting,
|
|
494
|
-
loading: isLoading,
|
|
495
|
-
size: "large",
|
|
496
|
-
style: "primary",
|
|
497
|
-
type: "button",
|
|
498
|
-
onClick: function onClick() {
|
|
499
|
-
return onConnect({
|
|
500
|
-
repoType: "public",
|
|
501
|
-
repository: {
|
|
502
|
-
fullName: publicRepoUrl
|
|
503
|
-
},
|
|
504
|
-
setIsLoading: setIsLoading
|
|
505
|
-
});
|
|
506
|
-
}
|
|
507
|
-
}, t("neetoGithub.continue"))))));
|
|
508
|
-
};
|
|
509
|
-
|
|
510
436
|
var Repositories = function Repositories(_ref) {
|
|
511
437
|
var isConnected = _ref.isConnected,
|
|
512
438
|
isConnecting = _ref.isConnecting,
|
|
513
|
-
isPublicRepoAllowed = _ref.isPublicRepoAllowed,
|
|
514
439
|
repositories = _ref.repositories,
|
|
515
440
|
onConnect = _ref.onConnect,
|
|
516
441
|
installationUrl = _ref.installationUrl,
|
|
@@ -521,13 +446,9 @@ var Repositories = function Repositories(_ref) {
|
|
|
521
446
|
installationUrl: installationUrl,
|
|
522
447
|
isConnected: isConnected,
|
|
523
448
|
isConnecting: isConnecting,
|
|
524
|
-
isPublicRepoAllowed: isPublicRepoAllowed,
|
|
525
449
|
onConnect: onConnect,
|
|
526
450
|
repositories: repositories,
|
|
527
451
|
troubleshootUrl: troubleshootUrl
|
|
528
|
-
}), isPublicRepoAllowed && /*#__PURE__*/React.createElement(Public, {
|
|
529
|
-
isConnecting: isConnecting,
|
|
530
|
-
onConnect: onConnect
|
|
531
452
|
}));
|
|
532
453
|
};
|
|
533
454
|
|
|
@@ -542,8 +463,6 @@ var NeetoGithubNanoContainer = function NeetoGithubNanoContainer(_ref) {
|
|
|
542
463
|
isConnected = _ref.isConnected,
|
|
543
464
|
_ref$isConnecting = _ref.isConnecting,
|
|
544
465
|
isConnecting = _ref$isConnecting === void 0 ? false : _ref$isConnecting,
|
|
545
|
-
_ref$isPublicRepoAllo = _ref.isPublicRepoAllowed,
|
|
546
|
-
isPublicRepoAllowed = _ref$isPublicRepoAllo === void 0 ? false : _ref$isPublicRepoAllo,
|
|
547
466
|
onConnect = _ref.onConnect,
|
|
548
467
|
_ref$paneRepositories = _ref.paneRepositories,
|
|
549
468
|
paneRepositories = _ref$paneRepositories === void 0 ? [] : _ref$paneRepositories,
|
|
@@ -581,7 +500,6 @@ var NeetoGithubNanoContainer = function NeetoGithubNanoContainer(_ref) {
|
|
|
581
500
|
installationUrl: installationUrl,
|
|
582
501
|
isConnected: isConnected,
|
|
583
502
|
isConnecting: isConnecting,
|
|
584
|
-
isPublicRepoAllowed: isPublicRepoAllowed,
|
|
585
503
|
onConnect: onConnect,
|
|
586
504
|
repositories: repositories,
|
|
587
505
|
troubleshootUrl: troubleshootUrl
|
|
@@ -2854,8 +2772,6 @@ var NeetoGithubNanoPane = function NeetoGithubNanoPane(_ref) {
|
|
|
2854
2772
|
isConnecting = _ref$isConnecting === void 0 ? false : _ref$isConnecting,
|
|
2855
2773
|
_ref$isConnected = _ref.isConnected,
|
|
2856
2774
|
isConnected = _ref$isConnected === void 0 ? false : _ref$isConnected,
|
|
2857
|
-
_ref$isPublicRepoAllo = _ref.isPublicRepoAllowed,
|
|
2858
|
-
isPublicRepoAllowed = _ref$isPublicRepoAllo === void 0 ? false : _ref$isPublicRepoAllo,
|
|
2859
2775
|
_ref$installationUrl = _ref.installationUrl,
|
|
2860
2776
|
installationUrl = _ref$installationUrl === void 0 ? NEW_INSTALLATION_URL : _ref$installationUrl,
|
|
2861
2777
|
_ref$troubleshootUrl = _ref.troubleshootUrl,
|
|
@@ -2865,9 +2781,7 @@ var NeetoGithubNanoPane = function NeetoGithubNanoPane(_ref) {
|
|
|
2865
2781
|
_ref$projects = _ref.projects,
|
|
2866
2782
|
projects = _ref$projects === void 0 ? [] : _ref$projects,
|
|
2867
2783
|
_ref$title = _ref.title,
|
|
2868
|
-
title = _ref$title === void 0 ? "" : _ref$title
|
|
2869
|
-
_ref$description = _ref.description,
|
|
2870
|
-
description = _ref$description === void 0 ? "" : _ref$description;
|
|
2784
|
+
title = _ref$title === void 0 ? "" : _ref$title;
|
|
2871
2785
|
var _useTranslation = useTranslation(),
|
|
2872
2786
|
t = _useTranslation.t;
|
|
2873
2787
|
var initialFocusRef = useRef(null);
|
|
@@ -2895,15 +2809,11 @@ var NeetoGithubNanoPane = function NeetoGithubNanoPane(_ref) {
|
|
|
2895
2809
|
size: "large"
|
|
2896
2810
|
}, /*#__PURE__*/React.createElement(Pane.Header, null, /*#__PURE__*/React.createElement(Typography, {
|
|
2897
2811
|
style: "h2"
|
|
2898
|
-
}, isPresent(title) ? title : t("neetoGithub.modal.title")), /*#__PURE__*/React.createElement(
|
|
2899
|
-
className: "mt-4",
|
|
2900
|
-
style: "body2"
|
|
2901
|
-
}, isPresent(description) ? description : t("neetoGithub.modal.description"))), /*#__PURE__*/React.createElement(Pane.Body, null, /*#__PURE__*/React.createElement(NeetoGithubNanoContainer, {
|
|
2812
|
+
}, isPresent(title) ? title : t("neetoGithub.modal.title"))), /*#__PURE__*/React.createElement(Pane.Body, null, /*#__PURE__*/React.createElement(NeetoGithubNanoContainer, {
|
|
2902
2813
|
installationUrl: installationUrl,
|
|
2903
2814
|
isConnected: isConnected,
|
|
2904
2815
|
isConnecting: isConnecting,
|
|
2905
2816
|
isPaneLoading: isPaneLoading,
|
|
2906
|
-
isPublicRepoAllowed: isPublicRepoAllowed,
|
|
2907
2817
|
onConnect: onConnect,
|
|
2908
2818
|
paneAccounts: paneAccounts,
|
|
2909
2819
|
paneRepositories: paneRepositories,
|