@bigbinary/neeto-github-frontend 2.2.4 → 2.2.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/NeetoGithubNanoContainer.js +25 -0
- package/dist/NeetoGithubNanoContainer.js.map +1 -0
- package/dist/NeetoGithubNanoPane.js +105 -0
- package/dist/NeetoGithubNanoPane.js.map +1 -0
- package/dist/cjs/NeetoGithubNanoContainer.js +31 -0
- package/dist/cjs/NeetoGithubNanoContainer.js.map +1 -0
- package/dist/cjs/NeetoGithubNanoPane.js +126 -0
- package/dist/cjs/NeetoGithubNanoPane.js.map +1 -0
- package/dist/cjs/index.js +35 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/index-CDx8nNam.js +483 -0
- package/dist/index-CDx8nNam.js.map +1 -0
- package/dist/index-CWvGtXnf.js +487 -0
- package/dist/index-CWvGtXnf.js.map +1 -0
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -0
- package/package.json +5 -3
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import 'classnames';
|
|
2
|
+
import '@bigbinary/neeto-commons-frontend/initializers';
|
|
3
|
+
import '@bigbinary/neetoui/Spinner';
|
|
4
|
+
export { N as default } from './index-CDx8nNam.js';
|
|
5
|
+
import 'react/jsx-runtime';
|
|
6
|
+
import '@tanstack/react-query';
|
|
7
|
+
import 'ramda';
|
|
8
|
+
import 'axios';
|
|
9
|
+
import '@bigbinary/neeto-commons-frontend/constants';
|
|
10
|
+
import '@bigbinary/neeto-commons-frontend/react-utils';
|
|
11
|
+
import '@bigbinary/neeto-icons/misc/Github';
|
|
12
|
+
import '@bigbinary/neetoui/Typography';
|
|
13
|
+
import '@bigbinary/neeto-icons/Building';
|
|
14
|
+
import '@bigbinary/neetoui/Avatar';
|
|
15
|
+
import '@bigbinary/neetoui/Button';
|
|
16
|
+
import '@bigbinary/neeto-icons/Plus';
|
|
17
|
+
import '@bigbinary/neeto-icons/Settings';
|
|
18
|
+
import '@babel/runtime/helpers/slicedToArray';
|
|
19
|
+
import 'react';
|
|
20
|
+
import '@bigbinary/neeto-cist';
|
|
21
|
+
import '@bigbinary/neeto-molecules/Search';
|
|
22
|
+
import 'react-i18next';
|
|
23
|
+
import '@bigbinary/neeto-icons/Lock';
|
|
24
|
+
import '@bigbinary/neeto-molecules/DateFormat';
|
|
25
|
+
//# sourceMappingURL=NeetoGithubNanoContainer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NeetoGithubNanoContainer.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { useRef } from 'react';
|
|
2
|
+
import { findBy, isPresent, noop } from '@bigbinary/neeto-cist';
|
|
3
|
+
import Pane from '@bigbinary/neetoui/Pane';
|
|
4
|
+
import Typography from '@bigbinary/neetoui/Typography';
|
|
5
|
+
import { useTranslation } from 'react-i18next';
|
|
6
|
+
import { n, u as useFetchGithubRepositories, N as NeetoGithubNanoContainer } from './index-CDx8nNam.js';
|
|
7
|
+
import { globalProps } from '@bigbinary/neeto-commons-frontend/initializers';
|
|
8
|
+
import * as qs from 'qs';
|
|
9
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
10
|
+
import 'classnames';
|
|
11
|
+
import '@bigbinary/neetoui/Spinner';
|
|
12
|
+
import '@tanstack/react-query';
|
|
13
|
+
import 'ramda';
|
|
14
|
+
import 'axios';
|
|
15
|
+
import '@bigbinary/neeto-commons-frontend/constants';
|
|
16
|
+
import '@bigbinary/neeto-commons-frontend/react-utils';
|
|
17
|
+
import '@bigbinary/neeto-icons/misc/Github';
|
|
18
|
+
import '@bigbinary/neeto-icons/Building';
|
|
19
|
+
import '@bigbinary/neetoui/Avatar';
|
|
20
|
+
import '@bigbinary/neetoui/Button';
|
|
21
|
+
import '@bigbinary/neeto-icons/Plus';
|
|
22
|
+
import '@bigbinary/neeto-icons/Settings';
|
|
23
|
+
import '@babel/runtime/helpers/slicedToArray';
|
|
24
|
+
import '@bigbinary/neeto-molecules/Search';
|
|
25
|
+
import '@bigbinary/neeto-icons/Lock';
|
|
26
|
+
import '@bigbinary/neeto-molecules/DateFormat';
|
|
27
|
+
|
|
28
|
+
var css = ".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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC9qYXZhc2NyaXB0L3N0eWxlc2hlZXRzL2NvbXBvbmVudHMvcGFuZS5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGlDQUNFLHNCQUNGLENBQ0UseUJBSEYsaUNBSUkscUJBRUYsQ0FDRixDQUFFLDBCQVBGLGlDQVFJLHFCQUdGLENBQ0YiLCJzb3VyY2VzQ29udGVudCI6WyIubmVldG8tZ2l0aHViLW1vZGFsLXBhbmUtd3JhcHBlciB7XG4gIHdpZHRoOiBtaW4oMTAwJSwgMTI4MHB4KTtcblxuICBAc2NyZWVuIG1kIHtcbiAgICB3aWR0aDogbWluKDkwJSwgMTI4MHB4KTtcbiAgfVxuXG4gIEBzY3JlZW4gbGcge1xuICAgIHdpZHRoOiBtaW4oNjAlLCAxMjgwcHgpO1xuICB9XG59XG4iXX0= */";
|
|
29
|
+
n(css,{});
|
|
30
|
+
|
|
31
|
+
var _globalProps$organiza;
|
|
32
|
+
var newInstallationParams = qs.stringify({
|
|
33
|
+
integrator_id: globalProps === null || globalProps === void 0 || (_globalProps$organiza = globalProps.organization) === null || _globalProps$organiza === void 0 ? void 0 : _globalProps$organiza.id,
|
|
34
|
+
integrator_type: "Organization",
|
|
35
|
+
redirect_path: "/projects/new"
|
|
36
|
+
});
|
|
37
|
+
var NEW_INSTALLATION_URL = "/github_integrations/app_installations/new?".concat(newInstallationParams);
|
|
38
|
+
var TROUBLESHOOT_URL = "https://render.com/docs/github#troubleshooting";
|
|
39
|
+
|
|
40
|
+
var NeetoGithubNanoPane = function NeetoGithubNanoPane(_ref) {
|
|
41
|
+
var isOpen = _ref.isOpen,
|
|
42
|
+
onClose = _ref.onClose,
|
|
43
|
+
_ref$isConnecting = _ref.isConnecting,
|
|
44
|
+
isConnecting = _ref$isConnecting === void 0 ? false : _ref$isConnecting,
|
|
45
|
+
_ref$isConnected = _ref.isConnected,
|
|
46
|
+
isConnected = _ref$isConnected === void 0 ? false : _ref$isConnected,
|
|
47
|
+
_ref$installationUrl = _ref.installationUrl,
|
|
48
|
+
installationUrl = _ref$installationUrl === void 0 ? NEW_INSTALLATION_URL : _ref$installationUrl,
|
|
49
|
+
_ref$troubleshootUrl = _ref.troubleshootUrl,
|
|
50
|
+
troubleshootUrl = _ref$troubleshootUrl === void 0 ? TROUBLESHOOT_URL : _ref$troubleshootUrl,
|
|
51
|
+
_ref$onConnect = _ref.onConnect,
|
|
52
|
+
onConnect = _ref$onConnect === void 0 ? noop : _ref$onConnect,
|
|
53
|
+
_ref$projects = _ref.projects,
|
|
54
|
+
projects = _ref$projects === void 0 ? [] : _ref$projects,
|
|
55
|
+
_ref$title = _ref.title,
|
|
56
|
+
title = _ref$title === void 0 ? "" : _ref$title;
|
|
57
|
+
var _useTranslation = useTranslation(),
|
|
58
|
+
t = _useTranslation.t;
|
|
59
|
+
var initialFocusRef = useRef(null);
|
|
60
|
+
var _useFetchGithubReposi = useFetchGithubRepositories({
|
|
61
|
+
isConnected: isOpen && isConnected
|
|
62
|
+
}),
|
|
63
|
+
_useFetchGithubReposi2 = _useFetchGithubReposi.data,
|
|
64
|
+
_useFetchGithubReposi3 = _useFetchGithubReposi2 === void 0 ? {} : _useFetchGithubReposi2,
|
|
65
|
+
_useFetchGithubReposi4 = _useFetchGithubReposi3.repositories,
|
|
66
|
+
repositories = _useFetchGithubReposi4 === void 0 ? [] : _useFetchGithubReposi4,
|
|
67
|
+
_useFetchGithubReposi5 = _useFetchGithubReposi3.accounts,
|
|
68
|
+
accounts = _useFetchGithubReposi5 === void 0 ? [] : _useFetchGithubReposi5,
|
|
69
|
+
isPaneLoading = _useFetchGithubReposi.isLoading;
|
|
70
|
+
var paneRepositories = repositories.filter(function (repository) {
|
|
71
|
+
return !findBy({
|
|
72
|
+
repository: repository.fullName
|
|
73
|
+
}, projects);
|
|
74
|
+
});
|
|
75
|
+
var paneAccounts = isConnected ? accounts : [];
|
|
76
|
+
return /*#__PURE__*/jsxs(Pane, {
|
|
77
|
+
initialFocusRef: initialFocusRef,
|
|
78
|
+
isOpen: isOpen,
|
|
79
|
+
onClose: onClose,
|
|
80
|
+
className: "neeto-github-modal-pane-wrapper",
|
|
81
|
+
size: "large",
|
|
82
|
+
children: [/*#__PURE__*/jsx(Pane.Header, {
|
|
83
|
+
children: /*#__PURE__*/jsx(Typography, {
|
|
84
|
+
style: "h2",
|
|
85
|
+
children: isPresent(title) ? title : t("neetoGithub.modal.title")
|
|
86
|
+
})
|
|
87
|
+
}), /*#__PURE__*/jsx(Pane.Body, {
|
|
88
|
+
children: /*#__PURE__*/jsx(NeetoGithubNanoContainer, {
|
|
89
|
+
installationUrl: installationUrl,
|
|
90
|
+
isConnected: isConnected,
|
|
91
|
+
isConnecting: isConnecting,
|
|
92
|
+
isPaneLoading: isPaneLoading,
|
|
93
|
+
onConnect: onConnect,
|
|
94
|
+
paneAccounts: paneAccounts,
|
|
95
|
+
paneRepositories: paneRepositories,
|
|
96
|
+
troubleshootUrl: troubleshootUrl,
|
|
97
|
+
isPane: true,
|
|
98
|
+
shouldFetchRepositories: false
|
|
99
|
+
})
|
|
100
|
+
})]
|
|
101
|
+
});
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
export { NeetoGithubNanoPane as default };
|
|
105
|
+
//# sourceMappingURL=NeetoGithubNanoPane.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NeetoGithubNanoPane.js","sources":["../app/javascript/src/components/NeetoGithubNanoPane/constants.js","../app/javascript/src/components/NeetoGithubNanoPane/index.jsx"],"sourcesContent":["import { globalProps } from \"neetocommons/initializers\";\nimport * as qs from \"qs\";\n\nconst newInstallationParams = qs.stringify({\n integrator_id: globalProps?.organization?.id,\n integrator_type: \"Organization\",\n redirect_path: \"/projects/new\",\n});\n\nexport const NEW_INSTALLATION_URL = `/github_integrations/app_installations/new?${newInstallationParams}`;\nexport const TROUBLESHOOT_URL =\n \"https://render.com/docs/github#troubleshooting\";\n","import { useRef } from \"react\";\n\nimport { findBy, isPresent, noop } from \"neetocist\";\nimport { Pane, Typography } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { useFetchGithubRepositories } from \"hooks/reactQuery/useGithubAccountsApi\";\nimport NeetoGithubNanoContainer from \"src/components/NeetoGithubNanoContainer\";\n// eslint-disable-next-line import/extensions\nimport \"stylesheets/components/pane.scss\";\n\nimport { NEW_INSTALLATION_URL, TROUBLESHOOT_URL } from \"./constants\";\n\nconst NeetoGithubNanoPane = ({\n isOpen,\n onClose,\n isConnecting = false,\n isConnected = false,\n installationUrl = NEW_INSTALLATION_URL,\n troubleshootUrl = TROUBLESHOOT_URL,\n onConnect = noop,\n projects = [],\n title = \"\",\n}) => {\n const { t } = useTranslation();\n\n const initialFocusRef = useRef(null);\n\n const {\n data: { repositories = [], accounts = [] } = {},\n isLoading: isPaneLoading,\n } = useFetchGithubRepositories({ isConnected: isOpen && isConnected });\n\n const paneRepositories = repositories.filter(\n repository => !findBy({ repository: repository.fullName }, projects)\n );\n\n const paneAccounts = isConnected ? accounts : [];\n\n return (\n <Pane\n {...{ initialFocusRef, isOpen, onClose }}\n className=\"neeto-github-modal-pane-wrapper\"\n size=\"large\"\n >\n <Pane.Header>\n <Typography style=\"h2\">\n {isPresent(title) ? title : t(\"neetoGithub.modal.title\")}\n </Typography>\n </Pane.Header>\n <Pane.Body>\n <NeetoGithubNanoContainer\n {...{\n installationUrl,\n isConnected,\n isConnecting,\n isPaneLoading,\n onConnect,\n paneAccounts,\n paneRepositories,\n troubleshootUrl,\n }}\n isPane\n shouldFetchRepositories={false}\n />\n </Pane.Body>\n </Pane>\n );\n};\n\nexport default NeetoGithubNanoPane;\n"],"names":["newInstallationParams","qs","stringify","integrator_id","globalProps","_globalProps$organiza","organization","id","integrator_type","redirect_path","NEW_INSTALLATION_URL","concat","TROUBLESHOOT_URL","NeetoGithubNanoPane","_ref","isOpen","onClose","_ref$isConnecting","isConnecting","_ref$isConnected","isConnected","_ref$installationUrl","installationUrl","_ref$troubleshootUrl","troubleshootUrl","_ref$onConnect","onConnect","noop","_ref$projects","projects","_ref$title","title","_useTranslation","useTranslation","t","initialFocusRef","useRef","_useFetchGithubReposi","useFetchGithubRepositories","_useFetchGithubReposi2","data","_useFetchGithubReposi3","_useFetchGithubReposi4","repositories","_useFetchGithubReposi5","accounts","isPaneLoading","isLoading","paneRepositories","filter","repository","findBy","fullName","paneAccounts","_jsxs","Pane","className","size","children","_jsx","Header","Typography","style","isPresent","Body","NeetoGithubNanoContainer","isPane","shouldFetchRepositories"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAMA,qBAAqB,GAAGC,EAAE,CAACC,SAAS,CAAC;AACzCC,EAAAA,aAAa,EAAEC,WAAW,KAAXA,IAAAA,IAAAA,WAAW,gBAAAC,qBAAA,GAAXD,WAAW,CAAEE,YAAY,MAAAD,IAAAA,IAAAA,qBAAA,KAAzBA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,qBAAA,CAA2BE,EAAE;AAC5CC,EAAAA,eAAe,EAAE,cAAc;AAC/BC,EAAAA,aAAa,EAAE;AACjB,CAAC,CAAC;AAEK,IAAMC,oBAAoB,GAAA,6CAAA,CAAAC,MAAA,CAAiDX,qBAAqB,CAAE;AAClG,IAAMY,gBAAgB,GAC3B,gDAAgD;;ACElD,IAAMC,mBAAmB,GAAG,SAA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AAe;AACfF,QAAAA,WAAW,EAAXA,WAAW;AACXF,QAAAA,YAAY,EAAZA,YAAY;AACZ4B,QAAAA,aAAa,EAAbA,aAAa;AACbpB,QAAAA,SAAS,EAATA,SAAS;AACT2B,QAAAA,YAAY,EAAZA,YAAY;AACZL,QAAAA,gBAAgB,EAAhBA,gBAAgB;AAChBxB,QAAAA,eAAe,EAAfA,eAAe;QAEjB0C,MAAM,EAAA,IAAA;AACNC,QAAAA,uBAAuB,EAAE;OAC1B;AAAC,KACO,CAAC;AAAA,GACR,CAAC;AAEX;;;;"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
require('classnames');
|
|
4
|
+
require('@bigbinary/neeto-commons-frontend/initializers');
|
|
5
|
+
require('@bigbinary/neetoui/Spinner');
|
|
6
|
+
var NeetoGithubNanoContainer = require('../index-CWvGtXnf.js');
|
|
7
|
+
require('react/jsx-runtime');
|
|
8
|
+
require('@tanstack/react-query');
|
|
9
|
+
require('ramda');
|
|
10
|
+
require('axios');
|
|
11
|
+
require('@bigbinary/neeto-commons-frontend/constants');
|
|
12
|
+
require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
13
|
+
require('@bigbinary/neeto-icons/misc/Github');
|
|
14
|
+
require('@bigbinary/neetoui/Typography');
|
|
15
|
+
require('@bigbinary/neeto-icons/Building');
|
|
16
|
+
require('@bigbinary/neetoui/Avatar');
|
|
17
|
+
require('@bigbinary/neetoui/Button');
|
|
18
|
+
require('@bigbinary/neeto-icons/Plus');
|
|
19
|
+
require('@bigbinary/neeto-icons/Settings');
|
|
20
|
+
require('@babel/runtime/helpers/slicedToArray');
|
|
21
|
+
require('react');
|
|
22
|
+
require('@bigbinary/neeto-cist');
|
|
23
|
+
require('@bigbinary/neeto-molecules/Search');
|
|
24
|
+
require('react-i18next');
|
|
25
|
+
require('@bigbinary/neeto-icons/Lock');
|
|
26
|
+
require('@bigbinary/neeto-molecules/DateFormat');
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
module.exports = NeetoGithubNanoContainer.NeetoGithubNanoContainer;
|
|
31
|
+
//# sourceMappingURL=NeetoGithubNanoContainer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NeetoGithubNanoContainer.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var react = require('react');
|
|
4
|
+
var neetoCist = require('@bigbinary/neeto-cist');
|
|
5
|
+
var Pane = require('@bigbinary/neetoui/Pane');
|
|
6
|
+
var Typography = require('@bigbinary/neetoui/Typography');
|
|
7
|
+
var reactI18next = require('react-i18next');
|
|
8
|
+
var NeetoGithubNanoContainer = require('../index-CWvGtXnf.js');
|
|
9
|
+
var initializers = require('@bigbinary/neeto-commons-frontend/initializers');
|
|
10
|
+
var qs = require('qs');
|
|
11
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
12
|
+
require('classnames');
|
|
13
|
+
require('@bigbinary/neetoui/Spinner');
|
|
14
|
+
require('@tanstack/react-query');
|
|
15
|
+
require('ramda');
|
|
16
|
+
require('axios');
|
|
17
|
+
require('@bigbinary/neeto-commons-frontend/constants');
|
|
18
|
+
require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
19
|
+
require('@bigbinary/neeto-icons/misc/Github');
|
|
20
|
+
require('@bigbinary/neeto-icons/Building');
|
|
21
|
+
require('@bigbinary/neetoui/Avatar');
|
|
22
|
+
require('@bigbinary/neetoui/Button');
|
|
23
|
+
require('@bigbinary/neeto-icons/Plus');
|
|
24
|
+
require('@bigbinary/neeto-icons/Settings');
|
|
25
|
+
require('@babel/runtime/helpers/slicedToArray');
|
|
26
|
+
require('@bigbinary/neeto-molecules/Search');
|
|
27
|
+
require('@bigbinary/neeto-icons/Lock');
|
|
28
|
+
require('@bigbinary/neeto-molecules/DateFormat');
|
|
29
|
+
|
|
30
|
+
function _interopNamespaceDefault(e) {
|
|
31
|
+
var n = Object.create(null);
|
|
32
|
+
if (e) {
|
|
33
|
+
Object.keys(e).forEach(function (k) {
|
|
34
|
+
if (k !== 'default') {
|
|
35
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
36
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () { return e[k]; }
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
n.default = e;
|
|
44
|
+
return Object.freeze(n);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
var qs__namespace = /*#__PURE__*/_interopNamespaceDefault(qs);
|
|
48
|
+
|
|
49
|
+
var css = ".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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC9qYXZhc2NyaXB0L3N0eWxlc2hlZXRzL2NvbXBvbmVudHMvcGFuZS5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGlDQUNFLHNCQUNGLENBQ0UseUJBSEYsaUNBSUkscUJBRUYsQ0FDRixDQUFFLDBCQVBGLGlDQVFJLHFCQUdGLENBQ0YiLCJzb3VyY2VzQ29udGVudCI6WyIubmVldG8tZ2l0aHViLW1vZGFsLXBhbmUtd3JhcHBlciB7XG4gIHdpZHRoOiBtaW4oMTAwJSwgMTI4MHB4KTtcblxuICBAc2NyZWVuIG1kIHtcbiAgICB3aWR0aDogbWluKDkwJSwgMTI4MHB4KTtcbiAgfVxuXG4gIEBzY3JlZW4gbGcge1xuICAgIHdpZHRoOiBtaW4oNjAlLCAxMjgwcHgpO1xuICB9XG59XG4iXX0= */";
|
|
50
|
+
NeetoGithubNanoContainer.n(css,{});
|
|
51
|
+
|
|
52
|
+
var _globalProps$organiza;
|
|
53
|
+
var newInstallationParams = qs__namespace.stringify({
|
|
54
|
+
integrator_id: initializers.globalProps === null || initializers.globalProps === void 0 || (_globalProps$organiza = initializers.globalProps.organization) === null || _globalProps$organiza === void 0 ? void 0 : _globalProps$organiza.id,
|
|
55
|
+
integrator_type: "Organization",
|
|
56
|
+
redirect_path: "/projects/new"
|
|
57
|
+
});
|
|
58
|
+
var NEW_INSTALLATION_URL = "/github_integrations/app_installations/new?".concat(newInstallationParams);
|
|
59
|
+
var TROUBLESHOOT_URL = "https://render.com/docs/github#troubleshooting";
|
|
60
|
+
|
|
61
|
+
var NeetoGithubNanoPane = function NeetoGithubNanoPane(_ref) {
|
|
62
|
+
var isOpen = _ref.isOpen,
|
|
63
|
+
onClose = _ref.onClose,
|
|
64
|
+
_ref$isConnecting = _ref.isConnecting,
|
|
65
|
+
isConnecting = _ref$isConnecting === void 0 ? false : _ref$isConnecting,
|
|
66
|
+
_ref$isConnected = _ref.isConnected,
|
|
67
|
+
isConnected = _ref$isConnected === void 0 ? false : _ref$isConnected,
|
|
68
|
+
_ref$installationUrl = _ref.installationUrl,
|
|
69
|
+
installationUrl = _ref$installationUrl === void 0 ? NEW_INSTALLATION_URL : _ref$installationUrl,
|
|
70
|
+
_ref$troubleshootUrl = _ref.troubleshootUrl,
|
|
71
|
+
troubleshootUrl = _ref$troubleshootUrl === void 0 ? TROUBLESHOOT_URL : _ref$troubleshootUrl,
|
|
72
|
+
_ref$onConnect = _ref.onConnect,
|
|
73
|
+
onConnect = _ref$onConnect === void 0 ? neetoCist.noop : _ref$onConnect,
|
|
74
|
+
_ref$projects = _ref.projects,
|
|
75
|
+
projects = _ref$projects === void 0 ? [] : _ref$projects,
|
|
76
|
+
_ref$title = _ref.title,
|
|
77
|
+
title = _ref$title === void 0 ? "" : _ref$title;
|
|
78
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
79
|
+
t = _useTranslation.t;
|
|
80
|
+
var initialFocusRef = react.useRef(null);
|
|
81
|
+
var _useFetchGithubReposi = NeetoGithubNanoContainer.useFetchGithubRepositories({
|
|
82
|
+
isConnected: isOpen && isConnected
|
|
83
|
+
}),
|
|
84
|
+
_useFetchGithubReposi2 = _useFetchGithubReposi.data,
|
|
85
|
+
_useFetchGithubReposi3 = _useFetchGithubReposi2 === void 0 ? {} : _useFetchGithubReposi2,
|
|
86
|
+
_useFetchGithubReposi4 = _useFetchGithubReposi3.repositories,
|
|
87
|
+
repositories = _useFetchGithubReposi4 === void 0 ? [] : _useFetchGithubReposi4,
|
|
88
|
+
_useFetchGithubReposi5 = _useFetchGithubReposi3.accounts,
|
|
89
|
+
accounts = _useFetchGithubReposi5 === void 0 ? [] : _useFetchGithubReposi5,
|
|
90
|
+
isPaneLoading = _useFetchGithubReposi.isLoading;
|
|
91
|
+
var paneRepositories = repositories.filter(function (repository) {
|
|
92
|
+
return !neetoCist.findBy({
|
|
93
|
+
repository: repository.fullName
|
|
94
|
+
}, projects);
|
|
95
|
+
});
|
|
96
|
+
var paneAccounts = isConnected ? accounts : [];
|
|
97
|
+
return /*#__PURE__*/jsxRuntime.jsxs(Pane, {
|
|
98
|
+
initialFocusRef: initialFocusRef,
|
|
99
|
+
isOpen: isOpen,
|
|
100
|
+
onClose: onClose,
|
|
101
|
+
className: "neeto-github-modal-pane-wrapper",
|
|
102
|
+
size: "large",
|
|
103
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Pane.Header, {
|
|
104
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
105
|
+
style: "h2",
|
|
106
|
+
children: neetoCist.isPresent(title) ? title : t("neetoGithub.modal.title")
|
|
107
|
+
})
|
|
108
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Pane.Body, {
|
|
109
|
+
children: /*#__PURE__*/jsxRuntime.jsx(NeetoGithubNanoContainer.NeetoGithubNanoContainer, {
|
|
110
|
+
installationUrl: installationUrl,
|
|
111
|
+
isConnected: isConnected,
|
|
112
|
+
isConnecting: isConnecting,
|
|
113
|
+
isPaneLoading: isPaneLoading,
|
|
114
|
+
onConnect: onConnect,
|
|
115
|
+
paneAccounts: paneAccounts,
|
|
116
|
+
paneRepositories: paneRepositories,
|
|
117
|
+
troubleshootUrl: troubleshootUrl,
|
|
118
|
+
isPane: true,
|
|
119
|
+
shouldFetchRepositories: false
|
|
120
|
+
})
|
|
121
|
+
})]
|
|
122
|
+
});
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
module.exports = NeetoGithubNanoPane;
|
|
126
|
+
//# sourceMappingURL=NeetoGithubNanoPane.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NeetoGithubNanoPane.js","sources":["../../app/javascript/src/components/NeetoGithubNanoPane/constants.js","../../app/javascript/src/components/NeetoGithubNanoPane/index.jsx"],"sourcesContent":["import { globalProps } from \"neetocommons/initializers\";\nimport * as qs from \"qs\";\n\nconst newInstallationParams = qs.stringify({\n integrator_id: globalProps?.organization?.id,\n integrator_type: \"Organization\",\n redirect_path: \"/projects/new\",\n});\n\nexport const NEW_INSTALLATION_URL = `/github_integrations/app_installations/new?${newInstallationParams}`;\nexport const TROUBLESHOOT_URL =\n \"https://render.com/docs/github#troubleshooting\";\n","import { useRef } from \"react\";\n\nimport { findBy, isPresent, noop } from \"neetocist\";\nimport { Pane, Typography } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { useFetchGithubRepositories } from \"hooks/reactQuery/useGithubAccountsApi\";\nimport NeetoGithubNanoContainer from \"src/components/NeetoGithubNanoContainer\";\n// eslint-disable-next-line import/extensions\nimport \"stylesheets/components/pane.scss\";\n\nimport { NEW_INSTALLATION_URL, TROUBLESHOOT_URL } from \"./constants\";\n\nconst NeetoGithubNanoPane = ({\n isOpen,\n onClose,\n isConnecting = false,\n isConnected = false,\n installationUrl = NEW_INSTALLATION_URL,\n troubleshootUrl = TROUBLESHOOT_URL,\n onConnect = noop,\n projects = [],\n title = \"\",\n}) => {\n const { t } = useTranslation();\n\n const initialFocusRef = useRef(null);\n\n const {\n data: { repositories = [], accounts = [] } = {},\n isLoading: isPaneLoading,\n } = useFetchGithubRepositories({ isConnected: isOpen && isConnected });\n\n const paneRepositories = repositories.filter(\n repository => !findBy({ repository: repository.fullName }, projects)\n );\n\n const paneAccounts = isConnected ? accounts : [];\n\n return (\n <Pane\n {...{ initialFocusRef, isOpen, onClose }}\n className=\"neeto-github-modal-pane-wrapper\"\n size=\"large\"\n >\n <Pane.Header>\n <Typography style=\"h2\">\n {isPresent(title) ? title : t(\"neetoGithub.modal.title\")}\n </Typography>\n </Pane.Header>\n <Pane.Body>\n <NeetoGithubNanoContainer\n {...{\n installationUrl,\n isConnected,\n isConnecting,\n isPaneLoading,\n onConnect,\n paneAccounts,\n paneRepositories,\n troubleshootUrl,\n }}\n isPane\n shouldFetchRepositories={false}\n />\n </Pane.Body>\n </Pane>\n );\n};\n\nexport default NeetoGithubNanoPane;\n"],"names":["newInstallationParams","qs","stringify","integrator_id","globalProps","_globalProps$organiza","organization","id","integrator_type","redirect_path","NEW_INSTALLATION_URL","concat","TROUBLESHOOT_URL","NeetoGithubNanoPane","_ref","isOpen","onClose","_ref$isConnecting","isConnecting","_ref$isConnected","isConnected","_ref$installationUrl","installationUrl","_ref$troubleshootUrl","troubleshootUrl","_ref$onConnect","onConnect","noop","_ref$projects","projects","_ref$title","title","_useTranslation","useTranslation","t","initialFocusRef","useRef","_useFetchGithubReposi","useFetchGithubRepositories","_useFetchGithubReposi2","data","_useFetchGithubReposi3","_useFetchGithubReposi4","repositories","_useFetchGithubReposi5","accounts","isPaneLoading","isLoading","paneRepositories","filter","repository","findBy","fullName","paneAccounts","_jsxs","Pane","className","size","children","_jsx","Header","Typography","style","isPresent","Body","NeetoGithubNanoContainer","isPane","shouldFetchRepositories"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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M,EAANA,MAAM;AAAEC,IAAAA,OAAO,EAAPA,OAAO;AACtCwC,IAAAA,SAAS,EAAC,iCAAiC;AAC3CC,IAAAA,IAAI,EAAC,OAAO;AAAAC,IAAAA,QAAA,EAEZC,cAAAA,cAAA,CAACJ,IAAI,CAACK,MAAM,EAAA;MAAAF,QAAA,eACVC,cAAA,CAACE,UAAU,EAAA;AAACC,QAAAA,KAAK,EAAC,IAAI;QAAAJ,QAAA,EACnBK,mBAAS,CAAChC,KAAK,CAAC,GAAGA,KAAK,GAAGG,CAAC,CAAC,yBAAyB;OAC7C;AAAC,KACF,CAAC,eACdyB,cAAA,CAACJ,IAAI,CAACS,IAAI,EAAA;MAAAN,QAAA,eACRC,cAAA,CAACM,iDAAwB,EAAA;AAErB3C,QAAAA,eAAe,EAAfA,eAAe;AACfF,QAAAA,WAAW,EAAXA,WAAW;AACXF,QAAAA,YAAY,EAAZA,YAAY;AACZ4B,QAAAA,aAAa,EAAbA,aAAa;AACbpB,QAAAA,SAAS,EAATA,SAAS;AACT2B,QAAAA,YAAY,EAAZA,YAAY;AACZL,QAAAA,gBAAgB,EAAhBA,gBAAgB;AAChBxB,QAAAA,eAAe,EAAfA,eAAe;QAEjB0C,MAAM,EAAA,IAAA;AACNC,QAAAA,uBAAuB,EAAE;OAC1B;AAAC,KACO,CAAC;AAAA,GACR,CAAC;AAEX;;;;"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var NeetoGithubNanoContainer = require('../index-CWvGtXnf.js');
|
|
4
|
+
var NeetoGithubNanoPane = require('./NeetoGithubNanoPane.js');
|
|
5
|
+
require('classnames');
|
|
6
|
+
require('@bigbinary/neeto-commons-frontend/initializers');
|
|
7
|
+
require('@bigbinary/neetoui/Spinner');
|
|
8
|
+
require('@tanstack/react-query');
|
|
9
|
+
require('ramda');
|
|
10
|
+
require('axios');
|
|
11
|
+
require('@bigbinary/neeto-commons-frontend/constants');
|
|
12
|
+
require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
13
|
+
require('@bigbinary/neeto-icons/misc/Github');
|
|
14
|
+
require('@bigbinary/neetoui/Typography');
|
|
15
|
+
require('react/jsx-runtime');
|
|
16
|
+
require('@bigbinary/neeto-icons/Building');
|
|
17
|
+
require('@bigbinary/neetoui/Avatar');
|
|
18
|
+
require('@bigbinary/neetoui/Button');
|
|
19
|
+
require('@bigbinary/neeto-icons/Plus');
|
|
20
|
+
require('@bigbinary/neeto-icons/Settings');
|
|
21
|
+
require('@babel/runtime/helpers/slicedToArray');
|
|
22
|
+
require('react');
|
|
23
|
+
require('@bigbinary/neeto-cist');
|
|
24
|
+
require('@bigbinary/neeto-molecules/Search');
|
|
25
|
+
require('react-i18next');
|
|
26
|
+
require('@bigbinary/neeto-icons/Lock');
|
|
27
|
+
require('@bigbinary/neeto-molecules/DateFormat');
|
|
28
|
+
require('@bigbinary/neetoui/Pane');
|
|
29
|
+
require('qs');
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
exports.NeetoGithubNanoContainer = NeetoGithubNanoContainer.NeetoGithubNanoContainer;
|
|
34
|
+
exports.NeetoGithubNanoPane = NeetoGithubNanoPane;
|
|
35
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|