@bigbinary/neeto-github-frontend 2.1.0 → 2.2.1

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.
@@ -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-46d2dabc.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-46d2dabc.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 ? 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,wBAAAC,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,eAAA;AACjB,CAAC,CAAC,CAAA;AAEK,IAAMC,oBAAoB,GAAA,6CAAA,CAAAC,MAAA,CAAiDX,qBAAqB,CAAE,CAAA;AAClG,IAAMY,gBAAgB,GAC3B,gDAAgD;;ACElD,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAAC,IAAA,EAUnB;AAAA,EAAA,IATJC,MAAM,GAAAD,IAAA,CAANC,MAAM;IACNC,OAAO,GAAAF,IAAA,CAAPE,OAAO;IAAAC,iBAAA,GAAAH,IAAA,CACPI,YAAY;AAAZA,IAAAA,YAAY,GAAAD,iBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,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AAZA,YAAY;AACZL,QAAAA,gBAAgB,EAAhBA,gBAAgB;AAChBxB,QAAAA,eAAe,EAAfA,eAAe;QAEjB0C,MAAM,EAAA,IAAA;AACNC,QAAAA,uBAAuB,EAAE,KAAA;OAC1B,CAAA;AAAC,KACO,CAAC,CAAA;AAAA,GACR,CAAC,CAAA;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-d094c561.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,131 @@
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-d094c561.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 _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
31
+
32
+ function _interopNamespace(e) {
33
+ if (e && e.__esModule) return e;
34
+ var n = Object.create(null);
35
+ if (e) {
36
+ Object.keys(e).forEach(function (k) {
37
+ if (k !== 'default') {
38
+ var d = Object.getOwnPropertyDescriptor(e, k);
39
+ Object.defineProperty(n, k, d.get ? d : {
40
+ enumerable: true,
41
+ get: function () { return e[k]; }
42
+ });
43
+ }
44
+ });
45
+ }
46
+ n["default"] = e;
47
+ return Object.freeze(n);
48
+ }
49
+
50
+ var Pane__default = /*#__PURE__*/_interopDefaultLegacy(Pane);
51
+ var Typography__default = /*#__PURE__*/_interopDefaultLegacy(Typography);
52
+ var qs__namespace = /*#__PURE__*/_interopNamespace(qs);
53
+
54
+ 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= */";
55
+ NeetoGithubNanoContainer.n(css,{});
56
+
57
+ var _globalProps$organiza;
58
+ var newInstallationParams = qs__namespace.stringify({
59
+ integrator_id: initializers.globalProps === null || initializers.globalProps === void 0 ? void 0 : (_globalProps$organiza = initializers.globalProps.organization) === null || _globalProps$organiza === void 0 ? void 0 : _globalProps$organiza.id,
60
+ integrator_type: "Organization",
61
+ redirect_path: "/projects/new"
62
+ });
63
+ var NEW_INSTALLATION_URL = "/github_integrations/app_installations/new?".concat(newInstallationParams);
64
+ var TROUBLESHOOT_URL = "https://render.com/docs/github#troubleshooting";
65
+
66
+ var NeetoGithubNanoPane = function NeetoGithubNanoPane(_ref) {
67
+ var isOpen = _ref.isOpen,
68
+ onClose = _ref.onClose,
69
+ _ref$isConnecting = _ref.isConnecting,
70
+ isConnecting = _ref$isConnecting === void 0 ? false : _ref$isConnecting,
71
+ _ref$isConnected = _ref.isConnected,
72
+ isConnected = _ref$isConnected === void 0 ? false : _ref$isConnected,
73
+ _ref$installationUrl = _ref.installationUrl,
74
+ installationUrl = _ref$installationUrl === void 0 ? NEW_INSTALLATION_URL : _ref$installationUrl,
75
+ _ref$troubleshootUrl = _ref.troubleshootUrl,
76
+ troubleshootUrl = _ref$troubleshootUrl === void 0 ? TROUBLESHOOT_URL : _ref$troubleshootUrl,
77
+ _ref$onConnect = _ref.onConnect,
78
+ onConnect = _ref$onConnect === void 0 ? neetoCist.noop : _ref$onConnect,
79
+ _ref$projects = _ref.projects,
80
+ projects = _ref$projects === void 0 ? [] : _ref$projects,
81
+ _ref$title = _ref.title,
82
+ title = _ref$title === void 0 ? "" : _ref$title;
83
+ var _useTranslation = reactI18next.useTranslation(),
84
+ t = _useTranslation.t;
85
+ var initialFocusRef = react.useRef(null);
86
+ var _useFetchGithubReposi = NeetoGithubNanoContainer.useFetchGithubRepositories({
87
+ isConnected: isOpen && isConnected
88
+ }),
89
+ _useFetchGithubReposi2 = _useFetchGithubReposi.data,
90
+ _useFetchGithubReposi3 = _useFetchGithubReposi2 === void 0 ? {} : _useFetchGithubReposi2,
91
+ _useFetchGithubReposi4 = _useFetchGithubReposi3.repositories,
92
+ repositories = _useFetchGithubReposi4 === void 0 ? [] : _useFetchGithubReposi4,
93
+ _useFetchGithubReposi5 = _useFetchGithubReposi3.accounts,
94
+ accounts = _useFetchGithubReposi5 === void 0 ? [] : _useFetchGithubReposi5,
95
+ isPaneLoading = _useFetchGithubReposi.isLoading;
96
+ var paneRepositories = repositories.filter(function (repository) {
97
+ return !neetoCist.findBy({
98
+ repository: repository.fullName
99
+ }, projects);
100
+ });
101
+ var paneAccounts = isConnected ? accounts : [];
102
+ return /*#__PURE__*/jsxRuntime.jsxs(Pane__default["default"], {
103
+ initialFocusRef: initialFocusRef,
104
+ isOpen: isOpen,
105
+ onClose: onClose,
106
+ className: "neeto-github-modal-pane-wrapper",
107
+ size: "large",
108
+ children: [/*#__PURE__*/jsxRuntime.jsx(Pane__default["default"].Header, {
109
+ children: /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
110
+ style: "h2",
111
+ children: neetoCist.isPresent(title) ? title : t("neetoGithub.modal.title")
112
+ })
113
+ }), /*#__PURE__*/jsxRuntime.jsx(Pane__default["default"].Body, {
114
+ children: /*#__PURE__*/jsxRuntime.jsx(NeetoGithubNanoContainer.NeetoGithubNanoContainer, {
115
+ installationUrl: installationUrl,
116
+ isConnected: isConnected,
117
+ isConnecting: isConnecting,
118
+ isPaneLoading: isPaneLoading,
119
+ onConnect: onConnect,
120
+ paneAccounts: paneAccounts,
121
+ paneRepositories: paneRepositories,
122
+ troubleshootUrl: troubleshootUrl,
123
+ isPane: true,
124
+ shouldFetchRepositories: false
125
+ })
126
+ })]
127
+ });
128
+ };
129
+
130
+ module.exports = NeetoGithubNanoPane;
131
+ //# 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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,CAAC,CAAA;AAAA,GACtE,CAAC,CAAA;AAED,EAAA,IAAMwB,YAAY,GAAGjC,WAAW,GAAGyB,QAAQ,GAAG,EAAE,CAAA;EAEhD,oBACES,eAAA,CAACC,wBAAI,EAAA;AACGpB,IAAAA,eAAe,EAAfA,eAAe;AAAEpB,IAAAA,MAAM,EAANA,MAAM;AAAEC,IAAAA,OAAO,EAAPA,OAAO;AACtCwC,IAAAA,SAAS,EAAC,iCAAiC;AAC3CC,IAAAA,IAAI,EAAC,OAAO;AAAAC,IAAAA,QAAA,EAEZC,cAAAA,cAAA,CAACJ,wBAAI,CAACK,MAAM,EAAA;MAAAF,QAAA,eACVC,cAAA,CAACE,8BAAU,EAAA;AAACC,QAAAA,KAAK,EAAC,IAAI;QAAAJ,QAAA,EACnBK,mBAAS,CAAChC,KAAK,CAAC,GAAGA,KAAK,GAAGG,CAAC,CAAC,yBAAyB,CAAA;OAC7C,CAAA;AAAC,KACF,CAAC,eACdyB,cAAA,CAACJ,wBAAI,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,KAAA;OAC1B,CAAA;AAAC,KACO,CAAC,CAAA;AAAA,GACR,CAAC,CAAA;AAEX;;;;"}
@@ -0,0 +1,37 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var NeetoGithubNanoContainer = require('../index-d094c561.js');
6
+ var NeetoGithubNanoPane = require('./NeetoGithubNanoPane.js');
7
+ require('classnames');
8
+ require('@bigbinary/neeto-commons-frontend/initializers');
9
+ require('@bigbinary/neetoui/Spinner');
10
+ require('@tanstack/react-query');
11
+ require('ramda');
12
+ require('axios');
13
+ require('@bigbinary/neeto-commons-frontend/constants');
14
+ require('@bigbinary/neeto-commons-frontend/react-utils');
15
+ require('@bigbinary/neeto-icons/misc/Github');
16
+ require('@bigbinary/neetoui/Typography');
17
+ require('react/jsx-runtime');
18
+ require('@bigbinary/neeto-icons/Building');
19
+ require('@bigbinary/neetoui/Avatar');
20
+ require('@bigbinary/neetoui/Button');
21
+ require('@bigbinary/neeto-icons/Plus');
22
+ require('@bigbinary/neeto-icons/Settings');
23
+ require('@babel/runtime/helpers/slicedToArray');
24
+ require('react');
25
+ require('@bigbinary/neeto-cist');
26
+ require('@bigbinary/neeto-molecules/Search');
27
+ require('react-i18next');
28
+ require('@bigbinary/neeto-icons/Lock');
29
+ require('@bigbinary/neeto-molecules/DateFormat');
30
+ require('@bigbinary/neetoui/Pane');
31
+ require('qs');
32
+
33
+
34
+
35
+ exports.NeetoGithubNanoContainer = NeetoGithubNanoContainer.NeetoGithubNanoContainer;
36
+ exports.NeetoGithubNanoPane = NeetoGithubNanoPane;
37
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}