@bigbinary/neeto-github-frontend 1.0.3 → 1.0.5

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.js CHANGED
@@ -8,6 +8,7 @@ import { Github } from '@bigbinary/neeto-icons/misc';
8
8
  import { globalProps } from '@bigbinary/neeto-commons-frontend/initializers';
9
9
  import require$$0 from 'util';
10
10
  import Search from '@bigbinary/neeto-molecules/Search';
11
+ import classNames from 'classnames';
11
12
  import Scrollable from '@bigbinary/neeto-molecules/Scrollable';
12
13
  import DateFormat from '@bigbinary/neeto-molecules/DateFormat';
13
14
 
@@ -2359,7 +2360,7 @@ var _globalProps$organiza;
2359
2360
  var newInstallationParams = lib.stringify({
2360
2361
  integrator_id: globalProps === null || globalProps === void 0 || (_globalProps$organiza = globalProps.organization) === null || _globalProps$organiza === void 0 ? void 0 : _globalProps$organiza.id,
2361
2362
  integrator_type: "Organization",
2362
- redirect_path: "/projects"
2363
+ redirect_path: "/projects/new"
2363
2364
  });
2364
2365
  var NEW_INSTALLATION_URL = "/github_integrations/app_installations/new?".concat(newInstallationParams);
2365
2366
  var TROUBLESHOOT_URL = "https://render.com/docs/github#troubleshooting";
@@ -2449,10 +2450,11 @@ var NoRepositories = withT(function (_ref) {
2449
2450
  })));
2450
2451
  });
2451
2452
 
2452
- var RepositoryTile = withT(function (_ref) {
2453
- var t = _ref.t,
2454
- onConnect = _ref.onConnect,
2453
+ var RepositoryTile = function RepositoryTile(_ref) {
2454
+ var onConnect = _ref.onConnect,
2455
2455
  repository = _ref.repository;
2456
+ var _useTranslation = useTranslation(),
2457
+ t = _useTranslation.t;
2456
2458
  var id = repository.id,
2457
2459
  fullName = repository.fullName,
2458
2460
  isPrivate = repository.isPrivate,
@@ -2486,17 +2488,21 @@ var RepositoryTile = withT(function (_ref) {
2486
2488
  });
2487
2489
  }
2488
2490
  }, t("neetoGithub.connect")));
2489
- });
2491
+ };
2490
2492
 
2491
2493
  var List = withT(function (_ref) {
2492
2494
  var t = _ref.t,
2495
+ isPublicRepoAllowed = _ref.isPublicRepoAllowed,
2493
2496
  filteredRepositories = _ref.filteredRepositories,
2494
2497
  repositories = _ref.repositories,
2495
2498
  onConnect = _ref.onConnect,
2496
2499
  installationUrl = _ref.installationUrl,
2497
2500
  troubleshootUrl = _ref.troubleshootUrl;
2498
2501
  return /*#__PURE__*/React.createElement("div", {
2499
- className: "neeto-ui-border-gray-300 neeto-ui-rounded-md m-0 flex h-52 flex-col items-center justify-center border border-solid p-0 2xl:h-96"
2502
+ className: classNames("neeto-ui-border-gray-300 neeto-ui-rounded-md m-0 flex flex-col items-center justify-center border border-solid p-0 2xl:h-96", {
2503
+ "h-52": isPublicRepoAllowed,
2504
+ "h-72": !isPublicRepoAllowed
2505
+ })
2500
2506
  }, isPresent(repositories) ? /*#__PURE__*/React.createElement(Scrollable, {
2501
2507
  className: "m-0 h-full w-full overflow-y-scroll p-0 shadow-inner"
2502
2508
  }, isPresent(filteredRepositories) ? filteredRepositories.map(function (repository) {
@@ -2532,6 +2538,7 @@ var NotConnected = withT(function (_ref) {
2532
2538
 
2533
2539
  var Private = function Private(_ref) {
2534
2540
  var isConnected = _ref.isConnected,
2541
+ isPublicRepoAllowed = _ref.isPublicRepoAllowed,
2535
2542
  repositories = _ref.repositories,
2536
2543
  onConnect = _ref.onConnect,
2537
2544
  installationUrl = _ref.installationUrl,
@@ -2569,6 +2576,7 @@ var Private = function Private(_ref) {
2569
2576
  count: filteredRepositories.length
2570
2577
  }))
2571
2578
  }), /*#__PURE__*/React.createElement(List, {
2579
+ isPublicRepoAllowed: isPublicRepoAllowed,
2572
2580
  filteredRepositories: filteredRepositories,
2573
2581
  installationUrl: installationUrl,
2574
2582
  onConnect: onConnect,
@@ -2653,8 +2661,9 @@ var Repositories = function Repositories(_ref) {
2653
2661
  installationUrl = _ref.installationUrl,
2654
2662
  troubleshootUrl = _ref.troubleshootUrl;
2655
2663
  return /*#__PURE__*/React.createElement("div", {
2656
- className: "w-full space-y-6 2xl:max-w-4xl"
2664
+ className: "w-full space-y-6 2xl:max-w-7xl"
2657
2665
  }, /*#__PURE__*/React.createElement(Private, {
2666
+ isPublicRepoAllowed: isPublicRepoAllowed,
2658
2667
  installationUrl: installationUrl,
2659
2668
  isConnected: isConnected,
2660
2669
  onConnect: onConnect,
@@ -2689,7 +2698,7 @@ var NeetoGithubNanoModal = function NeetoGithubNanoModal(_ref) {
2689
2698
  initialFocusRef: initialFocusRef,
2690
2699
  isOpen: isOpen,
2691
2700
  onClose: onClose,
2692
- closeButton: false,
2701
+ className: "neeto-github-modal-pane-wrapper",
2693
2702
  size: "large"
2694
2703
  }, /*#__PURE__*/React.createElement(Pane.Header, null, /*#__PURE__*/React.createElement(Typography, {
2695
2704
  style: "h2"
@@ -2697,7 +2706,7 @@ var NeetoGithubNanoModal = function NeetoGithubNanoModal(_ref) {
2697
2706
  className: "mt-4",
2698
2707
  style: "body2"
2699
2708
  }, t("neetoGithub.modal.description"))), /*#__PURE__*/React.createElement(Pane.Body, null, /*#__PURE__*/React.createElement("div", {
2700
- className: "w-full 2xl:max-w-7xl"
2709
+ className: "w-full"
2701
2710
  }, /*#__PURE__*/React.createElement("div", {
2702
2711
  className: "flex flex-col-reverse 2xl:flex-row"
2703
2712
  }, /*#__PURE__*/React.createElement(Repositories, {