@bigbinary/neeto-github-frontend 2.4.0-beta1 → 3.0.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.
- package/CHANGELOG.md +13 -0
- package/dist/.ready +1 -0
- package/dist/NeetoGithubIntegrationsTable.js +3 -3
- package/dist/NeetoGithubIntegrationsTable.js.map +1 -1
- package/dist/NeetoGithubNanoContainer.js +445 -21
- package/dist/NeetoGithubNanoContainer.js.map +1 -1
- package/dist/NeetoGithubNanoPane.js +4 -5
- package/dist/NeetoGithubNanoPane.js.map +1 -1
- package/dist/NeetoGithubRepositoryConnectionCard.js +5 -3
- package/dist/NeetoGithubRepositoryConnectionCard.js.map +1 -1
- package/dist/cjs/NeetoGithubIntegrationsTable.js +3 -3
- package/dist/cjs/NeetoGithubIntegrationsTable.js.map +1 -1
- package/dist/cjs/NeetoGithubNanoContainer.js +445 -25
- package/dist/cjs/NeetoGithubNanoContainer.js.map +1 -1
- package/dist/cjs/NeetoGithubNanoPane.js +5 -6
- package/dist/cjs/NeetoGithubNanoPane.js.map +1 -1
- package/dist/cjs/NeetoGithubRepositoryConnectionCard.js +5 -3
- package/dist/cjs/NeetoGithubRepositoryConnectionCard.js.map +1 -1
- package/dist/cjs/hooks.js +1 -1
- package/dist/cjs/index.js +5 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/v2/NeetoGithubIntegrationsTable.js +157 -0
- package/dist/cjs/v2/NeetoGithubIntegrationsTable.js.map +1 -0
- package/dist/{index-D1ob5VXc.js → cjs/v2/NeetoGithubNanoContainer.js} +75 -80
- package/dist/cjs/v2/NeetoGithubNanoContainer.js.map +1 -0
- package/dist/cjs/v2/NeetoGithubNanoPane.js +126 -0
- package/dist/cjs/v2/NeetoGithubNanoPane.js.map +1 -0
- package/dist/cjs/v2/NeetoGithubRepositoryConnectionCard.js +178 -0
- package/dist/cjs/v2/NeetoGithubRepositoryConnectionCard.js.map +1 -0
- package/dist/cjs/v2/hooks.js +18 -0
- package/dist/cjs/v2/hooks.js.map +1 -0
- package/dist/cjs/v2/index.js +53 -0
- package/dist/cjs/v2/index.js.map +1 -0
- package/dist/hooks.js +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/pane-CPRRz6tU.js +5 -0
- package/dist/pane-CPRRz6tU.js.map +1 -0
- package/dist/pane-DRsC3fwq.js +7 -0
- package/dist/pane-DRsC3fwq.js.map +1 -0
- package/dist/repository-tile-DxVqVMYY.js +7 -0
- package/dist/repository-tile-DxVqVMYY.js.map +1 -0
- package/dist/repository-tile-fB8WFACw.js +9 -0
- package/dist/repository-tile-fB8WFACw.js.map +1 -0
- package/dist/{useGithubAccountsApi-BFnwW6qa.js → useGithubAccountsApi-CBlDaBkA.js} +3 -5
- package/dist/useGithubAccountsApi-CBlDaBkA.js.map +1 -0
- package/dist/{useGithubAccountsApi-Bs2Imc4V.js → useGithubAccountsApi-Csym3TIW.js} +5 -7
- package/dist/useGithubAccountsApi-Csym3TIW.js.map +1 -0
- package/dist/v2/NeetoGithubIntegrationsTable.js +155 -0
- package/dist/v2/NeetoGithubIntegrationsTable.js.map +1 -0
- package/dist/{index-BrvZaXzw.js → v2/NeetoGithubNanoContainer.js} +61 -65
- package/dist/v2/NeetoGithubNanoContainer.js.map +1 -0
- package/dist/v2/NeetoGithubNanoPane.js +105 -0
- package/dist/v2/NeetoGithubNanoPane.js.map +1 -0
- package/dist/v2/NeetoGithubRepositoryConnectionCard.js +176 -0
- package/dist/v2/NeetoGithubRepositoryConnectionCard.js.map +1 -0
- package/dist/v2/hooks.js +10 -0
- package/dist/v2/hooks.js.map +1 -0
- package/dist/v2/index.js +41 -0
- package/dist/v2/index.js.map +1 -0
- package/package.json +39 -27
- package/dist/index-BrvZaXzw.js.map +0 -1
- package/dist/index-D1ob5VXc.js.map +0 -1
- package/dist/useGithubAccountsApi-BFnwW6qa.js.map +0 -1
- package/dist/useGithubAccountsApi-Bs2Imc4V.js.map +0 -1
|
@@ -12,9 +12,7 @@ var constants = require('@bigbinary/neeto-commons-frontend/constants');
|
|
|
12
12
|
var _globalProps$organiza;
|
|
13
13
|
var NEETO_GITHUB_ENGINE_BASE_URL = "/neeto_github";
|
|
14
14
|
({
|
|
15
|
-
integrator_id: initializers.globalProps === null || initializers.globalProps === void 0 || (_globalProps$organiza = initializers.globalProps.organization) === null || _globalProps$organiza === void 0 ? void 0 : _globalProps$organiza.id
|
|
16
|
-
integrator_type: "Organization"
|
|
17
|
-
});
|
|
15
|
+
integrator_id: initializers.globalProps === null || initializers.globalProps === void 0 || (_globalProps$organiza = initializers.globalProps.organization) === null || _globalProps$organiza === void 0 ? void 0 : _globalProps$organiza.id});
|
|
18
16
|
var GITHUB_INTEGRATOR_PARAMS = {
|
|
19
17
|
integratorId: initializers.globalProps.organization.id,
|
|
20
18
|
integratorType: "Organization"
|
|
@@ -54,7 +52,7 @@ var STALE_TIME_CONFIG = {
|
|
|
54
52
|
};
|
|
55
53
|
|
|
56
54
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
57
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t),
|
|
55
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
58
56
|
var useFetchGithubRepositories = function useFetchGithubRepositories(_ref) {
|
|
59
57
|
var isConnected = _ref.isConnected;
|
|
60
58
|
return reactQuery.useQuery({
|
|
@@ -89,4 +87,4 @@ exports.NEETO_GITHUB_ENGINE_BASE_URL = NEETO_GITHUB_ENGINE_BASE_URL;
|
|
|
89
87
|
exports.useDestroyGithubIntegration = useDestroyGithubIntegration;
|
|
90
88
|
exports.useFetchGithubAppInstallations = useFetchGithubAppInstallations;
|
|
91
89
|
exports.useFetchGithubRepositories = useFetchGithubRepositories;
|
|
92
|
-
//# sourceMappingURL=useGithubAccountsApi-
|
|
90
|
+
//# sourceMappingURL=useGithubAccountsApi-CBlDaBkA.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGithubAccountsApi-CBlDaBkA.js","sources":["../app/javascript/src/constants/index.js","../app/javascript/src/apis/github_accounts.js","../app/javascript/src/constants/query.js","../app/javascript/src/hooks/reactQuery/useGithubAccountsApi.js"],"sourcesContent":["import { globalProps } from \"neetocommons/initializers\";\n\nexport const NEETO_GITHUB_ENGINE_BASE_URL = \"/neeto_github\";\n\nexport const GITHUB_INTEGRATIONS_COMMON_PARAMS = {\n integrator_id: globalProps?.organization?.id,\n integrator_type: \"Organization\",\n};\n\nexport const GITHUB_INTEGRATOR_PARAMS = {\n integratorId: globalProps.organization.id,\n integratorType: \"Organization\",\n};\n\nexport const JOBS_PER_PAGE = 6;\n\nexport const PROJECTS_PER_PAGE = 10;\n","import axios from \"axios\";\nimport { globalProps } from \"neetocommons/initializers\";\n\nimport {\n NEETO_GITHUB_ENGINE_BASE_URL,\n GITHUB_INTEGRATOR_PARAMS,\n} from \"src/constants\";\n\nconst baseUrl = `${NEETO_GITHUB_ENGINE_BASE_URL}/app_installations`;\n\nconst githubAppUrl = id => `${baseUrl}/${id}`;\n\nconst fetch = params => axios.get(baseUrl, { params });\n\nconst destroy = (appInstallationId, params) =>\n axios.delete(`${baseUrl}/${appInstallationId}`, { params });\n\nconst repositories = () =>\n axios.get(\n `${githubAppUrl(globalProps.githubAppInstallationId)}/repositories`,\n { params: GITHUB_INTEGRATOR_PARAMS }\n );\n\nconst githubAccountsApi = { repositories, fetch, destroy };\n\nexport default githubAccountsApi;\n","import { DEFAULT_STALE_TIME } from \"neetocommons/constants\";\n\nexport const QUERY_KEYS = {\n GITHUB_REPOSITORIES_LIST: \"github-repositories-list\",\n GITHUB_ACCOUNTS_LIST: \"github-accounts-list\",\n};\n\nexport const STALE_TIME_CONFIG = { staleTime: DEFAULT_STALE_TIME };\n","import { useQuery } from \"@tanstack/react-query\";\nimport { globalProps } from \"neetocommons/initializers\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\nimport { isNotNil, prop } from \"ramda\";\n\nimport githubAccountsApi from \"apis/github_accounts\";\nimport { QUERY_KEYS, STALE_TIME_CONFIG } from \"src/constants/query\";\n\nexport const useFetchGithubRepositories = ({ isConnected }) =>\n useQuery({\n queryKey: [QUERY_KEYS.GITHUB_REPOSITORIES_LIST],\n queryFn: githubAccountsApi.repositories,\n staleTime: STALE_TIME_CONFIG.staleTime,\n enabled: isConnected && isNotNil(globalProps.githubAppInstallationId),\n });\n\nexport const useFetchGithubAppInstallations = (params, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.GITHUB_ACCOUNTS_LIST],\n queryFn: () => githubAccountsApi.fetch(params),\n ...options,\n select: prop(\"appInstallations\"),\n });\n\nexport const useDestroyGithubIntegration = (\n params,\n keysToInvalidate = [],\n options = {}\n) =>\n useMutationWithInvalidation(\n appInstallationId => githubAccountsApi.destroy(appInstallationId, params),\n {\n keysToInvalidate: [QUERY_KEYS.GITHUB_ACCOUNTS_LIST, ...keysToInvalidate],\n ...options,\n }\n );\n"],"names":["NEETO_GITHUB_ENGINE_BASE_URL","integrator_id","globalProps","_globalProps$organiza","organization","id","GITHUB_INTEGRATOR_PARAMS","integratorId","integratorType","baseUrl","concat","githubAppUrl","fetch","params","axios","get","destroy","appInstallationId","repositories","githubAppInstallationId","githubAccountsApi","QUERY_KEYS","GITHUB_REPOSITORIES_LIST","GITHUB_ACCOUNTS_LIST","STALE_TIME_CONFIG","staleTime","DEFAULT_STALE_TIME","useFetchGithubRepositories","_ref","isConnected","useQuery","queryKey","queryFn","enabled","isNotNil","useFetchGithubAppInstallations","options","arguments","length","undefined","_objectSpread","select","prop","useDestroyGithubIntegration","keysToInvalidate","useMutationWithInvalidation","_toConsumableArray"],"mappings":";;;;;;;;;;;;AAEO,IAAMA,4BAA4B,GAAG;CAEK;AAC/CC,EAAAA,aAAa,EAAEC,wBAAW,KAAA,IAAA,IAAXA,wBAAW,gBAAAC,qBAAA,GAAXD,wBAAW,CAAEE,YAAY,MAAA,IAAA,IAAAD,qBAAA,KAAA,MAAA,GAAA,MAAA,GAAzBA,qBAAA,CAA2BE,EAE5C;AAEO,IAAMC,wBAAwB,GAAG;AACtCC,EAAAA,YAAY,EAAEL,wBAAW,CAACE,YAAY,CAACC,EAAE;AACzCG,EAAAA,cAAc,EAAE;AAClB,CAAC;;ACJD,IAAMC,OAAO,GAAA,EAAA,CAAAC,MAAA,CAAMV,4BAA4B,EAAA,oBAAA,CAAoB;AAEnE,IAAMW,YAAY,GAAG,SAAfA,YAAYA,CAAGN,EAAE,EAAA;AAAA,EAAA,OAAA,EAAA,CAAAK,MAAA,CAAOD,OAAO,EAAA,GAAA,CAAA,CAAAC,MAAA,CAAIL,EAAE,CAAA;AAAA,CAAE;AAE7C,IAAMO,KAAK,GAAG,SAARA,KAAKA,CAAGC,MAAM,EAAA;AAAA,EAAA,OAAIC,KAAK,CAACC,GAAG,CAACN,OAAO,EAAE;AAAEI,IAAAA,MAAM,EAANA;AAAO,GAAC,CAAC;AAAA,CAAA;AAEtD,IAAMG,OAAO,GAAG,SAAVA,OAAOA,CAAIC,iBAAiB,EAAEJ,MAAM,EAAA;EAAA,OACxCC,KAAK,CAAA,QAAA,CAAO,CAAA,EAAA,CAAAJ,MAAA,CAAID,OAAO,EAAA,GAAA,CAAA,CAAAC,MAAA,CAAIO,iBAAiB,CAAA,EAAI;AAAEJ,IAAAA,MAAM,EAANA;AAAO,GAA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,CAAA;AACNT,IAAAA,QAAQ,EAAE,CAACV,UAAU,CAACE,oBAAoB,CAAC;IAC3CS,OAAO,EAAE,SAATA,OAAOA,GAAA;AAAA,MAAA,OAAQZ,iBAAiB,CAACR,KAAK,CAACC,MAAM,CAAC;AAAA,IAAA;AAAA,GAAA,EAC3CuB,OAAO,CAAA,EAAA,EAAA,EAAA;IACVK,MAAM,EAAEC,UAAI,CAAC,kBAAkB;AAAC,GAAA,CACjC,CAAC;AAAA;IAESC,2BAA2B,GAAG,SAA9BA,2BAA2BA,CACtC9B,MAAM,EAAA;AAAA,EAAA,IACN+B,gBAAgB,GAAAP,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,EAAE;AAAA,EAAA,IACrBD,OAAO,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,EAAE;EAAA,OAEZQ,sCAA2B,CACzB,UAAA5B,iBAAiB,EAAA;AAAA,IAAA,OAAIG,iBAAiB,CAACJ,OAAO,CAACC,iBAAiB,EAAEJ,MAAM,CAAC;AAAA,EAAA,CAAA,EAAA2B,aAAA,CAAA;IAEvEI,gBAAgB,EAAA,CAAGvB,UAAU,CAACE,oBAAoB,EAAAb,MAAA,CAAAoC,kBAAA,CAAKF,gBAAgB,CAAA;GAAC,EACrER,OAAO,CAEd,CAAC;AAAA;;;;;;;"}
|
|
@@ -3,16 +3,14 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
|
3
3
|
import { useQuery } from '@tanstack/react-query';
|
|
4
4
|
import { globalProps } from '@bigbinary/neeto-commons-frontend/initializers';
|
|
5
5
|
import { useMutationWithInvalidation } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
6
|
-
import {
|
|
6
|
+
import { prop, isNotNil } from 'ramda';
|
|
7
7
|
import axios from 'axios';
|
|
8
8
|
import { DEFAULT_STALE_TIME } from '@bigbinary/neeto-commons-frontend/constants';
|
|
9
9
|
|
|
10
10
|
var _globalProps$organiza;
|
|
11
11
|
var NEETO_GITHUB_ENGINE_BASE_URL = "/neeto_github";
|
|
12
12
|
({
|
|
13
|
-
integrator_id: globalProps === null || globalProps === void 0 || (_globalProps$organiza = globalProps.organization) === null || _globalProps$organiza === void 0 ? void 0 : _globalProps$organiza.id
|
|
14
|
-
integrator_type: "Organization"
|
|
15
|
-
});
|
|
13
|
+
integrator_id: globalProps === null || globalProps === void 0 || (_globalProps$organiza = globalProps.organization) === null || _globalProps$organiza === void 0 ? void 0 : _globalProps$organiza.id});
|
|
16
14
|
var GITHUB_INTEGRATOR_PARAMS = {
|
|
17
15
|
integratorId: globalProps.organization.id,
|
|
18
16
|
integratorType: "Organization"
|
|
@@ -52,7 +50,7 @@ var STALE_TIME_CONFIG = {
|
|
|
52
50
|
};
|
|
53
51
|
|
|
54
52
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
55
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t),
|
|
53
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
56
54
|
var useFetchGithubRepositories = function useFetchGithubRepositories(_ref) {
|
|
57
55
|
var isConnected = _ref.isConnected;
|
|
58
56
|
return useQuery({
|
|
@@ -83,5 +81,5 @@ var useDestroyGithubIntegration = function useDestroyGithubIntegration(params) {
|
|
|
83
81
|
}, options));
|
|
84
82
|
};
|
|
85
83
|
|
|
86
|
-
export { NEETO_GITHUB_ENGINE_BASE_URL as N, useFetchGithubAppInstallations as a,
|
|
87
|
-
//# sourceMappingURL=useGithubAccountsApi-
|
|
84
|
+
export { NEETO_GITHUB_ENGINE_BASE_URL as N, useFetchGithubAppInstallations as a, useFetchGithubRepositories as b, useDestroyGithubIntegration as u };
|
|
85
|
+
//# sourceMappingURL=useGithubAccountsApi-Csym3TIW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGithubAccountsApi-Csym3TIW.js","sources":["../app/javascript/src/constants/index.js","../app/javascript/src/apis/github_accounts.js","../app/javascript/src/constants/query.js","../app/javascript/src/hooks/reactQuery/useGithubAccountsApi.js"],"sourcesContent":["import { globalProps } from \"neetocommons/initializers\";\n\nexport const NEETO_GITHUB_ENGINE_BASE_URL = \"/neeto_github\";\n\nexport const GITHUB_INTEGRATIONS_COMMON_PARAMS = {\n integrator_id: globalProps?.organization?.id,\n integrator_type: \"Organization\",\n};\n\nexport const GITHUB_INTEGRATOR_PARAMS = {\n integratorId: globalProps.organization.id,\n integratorType: \"Organization\",\n};\n\nexport const JOBS_PER_PAGE = 6;\n\nexport const PROJECTS_PER_PAGE = 10;\n","import axios from \"axios\";\nimport { globalProps } from \"neetocommons/initializers\";\n\nimport {\n NEETO_GITHUB_ENGINE_BASE_URL,\n GITHUB_INTEGRATOR_PARAMS,\n} from \"src/constants\";\n\nconst baseUrl = `${NEETO_GITHUB_ENGINE_BASE_URL}/app_installations`;\n\nconst githubAppUrl = id => `${baseUrl}/${id}`;\n\nconst fetch = params => axios.get(baseUrl, { params });\n\nconst destroy = (appInstallationId, params) =>\n axios.delete(`${baseUrl}/${appInstallationId}`, { params });\n\nconst repositories = () =>\n axios.get(\n `${githubAppUrl(globalProps.githubAppInstallationId)}/repositories`,\n { params: GITHUB_INTEGRATOR_PARAMS }\n );\n\nconst githubAccountsApi = { repositories, fetch, destroy };\n\nexport default githubAccountsApi;\n","import { DEFAULT_STALE_TIME } from \"neetocommons/constants\";\n\nexport const QUERY_KEYS = {\n GITHUB_REPOSITORIES_LIST: \"github-repositories-list\",\n GITHUB_ACCOUNTS_LIST: \"github-accounts-list\",\n};\n\nexport const STALE_TIME_CONFIG = { staleTime: DEFAULT_STALE_TIME };\n","import { useQuery } from \"@tanstack/react-query\";\nimport { globalProps } from \"neetocommons/initializers\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\nimport { isNotNil, prop } from \"ramda\";\n\nimport githubAccountsApi from \"apis/github_accounts\";\nimport { QUERY_KEYS, STALE_TIME_CONFIG } from \"src/constants/query\";\n\nexport const useFetchGithubRepositories = ({ isConnected }) =>\n useQuery({\n queryKey: [QUERY_KEYS.GITHUB_REPOSITORIES_LIST],\n queryFn: githubAccountsApi.repositories,\n staleTime: STALE_TIME_CONFIG.staleTime,\n enabled: isConnected && isNotNil(globalProps.githubAppInstallationId),\n });\n\nexport const useFetchGithubAppInstallations = (params, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.GITHUB_ACCOUNTS_LIST],\n queryFn: () => githubAccountsApi.fetch(params),\n ...options,\n select: prop(\"appInstallations\"),\n });\n\nexport const useDestroyGithubIntegration = (\n params,\n keysToInvalidate = [],\n options = {}\n) =>\n useMutationWithInvalidation(\n appInstallationId => githubAccountsApi.destroy(appInstallationId, params),\n {\n keysToInvalidate: [QUERY_KEYS.GITHUB_ACCOUNTS_LIST, ...keysToInvalidate],\n ...options,\n }\n );\n"],"names":["NEETO_GITHUB_ENGINE_BASE_URL","integrator_id","globalProps","_globalProps$organiza","organization","id","GITHUB_INTEGRATOR_PARAMS","integratorId","integratorType","baseUrl","concat","githubAppUrl","fetch","params","axios","get","destroy","appInstallationId","repositories","githubAppInstallationId","githubAccountsApi","QUERY_KEYS","GITHUB_REPOSITORIES_LIST","GITHUB_ACCOUNTS_LIST","STALE_TIME_CONFIG","staleTime","DEFAULT_STALE_TIME","useFetchGithubRepositories","_ref","isConnected","useQuery","queryKey","queryFn","enabled","isNotNil","useFetchGithubAppInstallations","options","arguments","length","undefined","_objectSpread","select","prop","useDestroyGithubIntegration","keysToInvalidate","useMutationWithInvalidation","_toConsumableArray"],"mappings":";;;;;;;;;;AAEO,IAAMA,4BAA4B,GAAG;CAEK;AAC/CC,EAAAA,aAAa,EAAEC,WAAW,KAAA,IAAA,IAAXA,WAAW,gBAAAC,qBAAA,GAAXD,WAAW,CAAEE,YAAY,MAAA,IAAA,IAAAD,qBAAA,KAAA,MAAA,GAAA,MAAA,GAAzBA,qBAAA,CAA2BE,EAE5C;AAEO,IAAMC,wBAAwB,GAAG;AACtCC,EAAAA,YAAY,EAAEL,WAAW,CAACE,YAAY,CAACC,EAAE;AACzCG,EAAAA,cAAc,EAAE;AAClB,CAAC;;ACJD,IAAMC,OAAO,GAAA,EAAA,CAAAC,MAAA,CAAMV,4BAA4B,EAAA,oBAAA,CAAoB;AAEnE,IAAMW,YAAY,GAAG,SAAfA,YAAYA,CAAGN,EAAE,EAAA;AAAA,EAAA,OAAA,EAAA,CAAAK,MAAA,CAAOD,OAAO,EAAA,GAAA,CAAA,CAAAC,MAAA,CAAIL,EAAE,CAAA;AAAA,CAAE;AAE7C,IAAMO,KAAK,GAAG,SAARA,KAAKA,CAAGC,MAAM,EAAA;AAAA,EAAA,OAAIC,KAAK,CAACC,GAAG,CAACN,OAAO,EAAE;AAAEI,IAAAA,MAAM,EAANA;AAAO,GAAC,CAAC;AAAA,CAAA;AAEtD,IAAMG,OAAO,GAAG,SAAVA,OAAOA,CAAIC,iBAAiB,EAAEJ,MAAM,EAAA;EAAA,OACxCC,KAAK,CAAA,QAAA,CAAO,CAAA,EAAA,CAAAJ,MAAA,CAAID,OAAO,EAAA,GAAA,CAAA,CAAAC,MAAA,CAAIO,iBAAiB,CAAA,EAA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P,QAAQ,CAAAU,aAAA,CAAAA,aAAA,CAAA;AACNT,IAAAA,QAAQ,EAAE,CAACV,UAAU,CAACE,oBAAoB,CAAC;IAC3CS,OAAO,EAAE,SAATA,OAAOA,GAAA;AAAA,MAAA,OAAQZ,iBAAiB,CAACR,KAAK,CAACC,MAAM,CAAC;AAAA,IAAA;AAAA,GAAA,EAC3CuB,OAAO,CAAA,EAAA,EAAA,EAAA;IACVK,MAAM,EAAEC,IAAI,CAAC,kBAAkB;AAAC,GAAA,CACjC,CAAC;AAAA;IAESC,2BAA2B,GAAG,SAA9BA,2BAA2BA,CACtC9B,MAAM,EAAA;AAAA,EAAA,IACN+B,gBAAgB,GAAAP,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,EAAE;AAAA,EAAA,IACrBD,OAAO,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,EAAE;EAAA,OAEZQ,2BAA2B,CACzB,UAAA5B,iBAAiB,EAAA;AAAA,IAAA,OAAIG,iBAAiB,CAACJ,OAAO,CAACC,iBAAiB,EAAEJ,MAAM,CAAC;AAAA,EAAA,CAAA,EAAA2B,aAAA,CAAA;IAEvEI,gBAAgB,EAAA,CAAGvB,UAAU,CAACE,oBAAoB,EAAAb,MAAA,CAAAoC,kBAAA,CAAKF,gBAAgB,CAAA;GAAC,EACrER,OAAO,CAEd,CAAC;AAAA;;;;"}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { Typography, Empty, DataTable, Alert, Button } from '@bigbinary/neeto-atoms';
|
|
2
|
+
import Container from '@bigbinary/neeto-molecules/v2/Container';
|
|
3
|
+
import Header from '@bigbinary/neeto-molecules/v2/Header';
|
|
4
|
+
import PageLoader from '@bigbinary/neeto-molecules/v2/PageLoader';
|
|
5
|
+
import { useTranslation, Trans } from 'react-i18next';
|
|
6
|
+
import { N as NEETO_GITHUB_ENGINE_BASE_URL, u as useDestroyGithubIntegration, a as useFetchGithubAppInstallations } from '../useGithubAccountsApi-Csym3TIW.js';
|
|
7
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
8
|
+
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
9
|
+
import { useState } from 'react';
|
|
10
|
+
import { isNotEmpty } from '@bigbinary/neeto-cist';
|
|
11
|
+
import { isEmpty } from 'ramda';
|
|
12
|
+
import { t } from 'i18next';
|
|
13
|
+
import { buildUrl } from '@bigbinary/neeto-commons-frontend/v2/utils';
|
|
14
|
+
import MoreDropdown from '@bigbinary/neeto-molecules/v2/MoreDropdown';
|
|
15
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
16
|
+
import '@babel/runtime/helpers/toConsumableArray';
|
|
17
|
+
import '@tanstack/react-query';
|
|
18
|
+
import '@bigbinary/neeto-commons-frontend/initializers';
|
|
19
|
+
import '@bigbinary/neeto-commons-frontend/react-utils';
|
|
20
|
+
import 'axios';
|
|
21
|
+
import '@bigbinary/neeto-commons-frontend/constants';
|
|
22
|
+
|
|
23
|
+
function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
24
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
25
|
+
var getNewInstallationUrl = function getNewInstallationUrl(integratorParams, redirectPath) {
|
|
26
|
+
return buildUrl("".concat(NEETO_GITHUB_ENGINE_BASE_URL, "/app_installations/new"), _objectSpread$1(_objectSpread$1({}, integratorParams), {}, {
|
|
27
|
+
redirectPath: redirectPath
|
|
28
|
+
}));
|
|
29
|
+
};
|
|
30
|
+
var getGithubAccountsTableColumnData = function getGithubAccountsTableColumnData(_ref) {
|
|
31
|
+
var setAccountToDisconnect = _ref.setAccountToDisconnect;
|
|
32
|
+
return [{
|
|
33
|
+
id: "actions",
|
|
34
|
+
header: t("neetoGithub.account"),
|
|
35
|
+
cell: function cell(_ref2) {
|
|
36
|
+
var row = _ref2.row;
|
|
37
|
+
var account = row.original;
|
|
38
|
+
return /*#__PURE__*/jsxs("div", {
|
|
39
|
+
className: "flex items-center justify-between gap-x-3",
|
|
40
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
41
|
+
children: account.accountLogin
|
|
42
|
+
}), /*#__PURE__*/jsx(MoreDropdown, {
|
|
43
|
+
menuItems: [{
|
|
44
|
+
key: "delete",
|
|
45
|
+
label: t("neetoGithub.actions.delete"),
|
|
46
|
+
onClick: function onClick() {
|
|
47
|
+
return setAccountToDisconnect(account);
|
|
48
|
+
}
|
|
49
|
+
}]
|
|
50
|
+
})]
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}];
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
57
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
58
|
+
var AccountsTable = function AccountsTable(_ref) {
|
|
59
|
+
var _ref$appInstallations = _ref.appInstallations,
|
|
60
|
+
appInstallations = _ref$appInstallations === void 0 ? [] : _ref$appInstallations,
|
|
61
|
+
integratorParams = _ref.integratorParams,
|
|
62
|
+
keysToPurgeOnDelete = _ref.keysToPurgeOnDelete,
|
|
63
|
+
noDataProps = _ref.noDataProps;
|
|
64
|
+
var _useTranslation = useTranslation(),
|
|
65
|
+
t = _useTranslation.t;
|
|
66
|
+
var _useState = useState({}),
|
|
67
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
68
|
+
accountToDisconnect = _useState2[0],
|
|
69
|
+
setAccountToDisconnect = _useState2[1];
|
|
70
|
+
var _useDestroyGithubInte = useDestroyGithubIntegration(integratorParams, keysToPurgeOnDelete, {
|
|
71
|
+
onSuccess: function onSuccess() {
|
|
72
|
+
return setAccountToDisconnect({});
|
|
73
|
+
}
|
|
74
|
+
}),
|
|
75
|
+
deleteGithubAccount = _useDestroyGithubInte.mutate,
|
|
76
|
+
isDeleting = _useDestroyGithubInte.isPending;
|
|
77
|
+
if (isEmpty(appInstallations)) {
|
|
78
|
+
return /*#__PURE__*/jsx("div", {
|
|
79
|
+
className: "flex h-full w-full items-center justify-center",
|
|
80
|
+
children: /*#__PURE__*/jsx(Empty, _objectSpread({
|
|
81
|
+
title: t("neetoGithub.integrationTable.noIntegrationFound")
|
|
82
|
+
}, noDataProps))
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
86
|
+
children: [/*#__PURE__*/jsx(DataTable, {
|
|
87
|
+
data: appInstallations,
|
|
88
|
+
columns: getGithubAccountsTableColumnData({
|
|
89
|
+
setAccountToDisconnect: setAccountToDisconnect
|
|
90
|
+
})
|
|
91
|
+
}), /*#__PURE__*/jsx(Alert, {
|
|
92
|
+
isOpen: isNotEmpty(accountToDisconnect),
|
|
93
|
+
isSubmitting: isDeleting,
|
|
94
|
+
submitButtonLabel: t("neetoGithub.disconnectGitHub"),
|
|
95
|
+
title: t("neetoGithub.integrationTable.alert.title"),
|
|
96
|
+
message: /*#__PURE__*/jsx(Trans, {
|
|
97
|
+
i18nKey: "neetoGithub.integrationTable.alert.message",
|
|
98
|
+
values: {
|
|
99
|
+
login: accountToDisconnect === null || accountToDisconnect === void 0 ? void 0 : accountToDisconnect.accountLogin
|
|
100
|
+
}
|
|
101
|
+
}),
|
|
102
|
+
onClose: function onClose() {
|
|
103
|
+
return setAccountToDisconnect({});
|
|
104
|
+
},
|
|
105
|
+
onSubmit: function onSubmit() {
|
|
106
|
+
return deleteGithubAccount(accountToDisconnect === null || accountToDisconnect === void 0 ? void 0 : accountToDisconnect.id);
|
|
107
|
+
}
|
|
108
|
+
})]
|
|
109
|
+
});
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
var NeetoGithubIntegrationsTable = function NeetoGithubIntegrationsTable(_ref) {
|
|
113
|
+
var _ref$breadcrumbs = _ref.breadcrumbs,
|
|
114
|
+
breadcrumbs = _ref$breadcrumbs === void 0 ? [] : _ref$breadcrumbs,
|
|
115
|
+
integratorParams = _ref.integratorParams,
|
|
116
|
+
redirectPath = _ref.redirectPath,
|
|
117
|
+
_ref$keysToPurgeOnDel = _ref.keysToPurgeOnDelete,
|
|
118
|
+
keysToPurgeOnDelete = _ref$keysToPurgeOnDel === void 0 ? [] : _ref$keysToPurgeOnDel,
|
|
119
|
+
_ref$titleHelpPopover = _ref.titleHelpPopoverProps,
|
|
120
|
+
titleHelpPopoverProps = _ref$titleHelpPopover === void 0 ? {} : _ref$titleHelpPopover,
|
|
121
|
+
_ref$noDataProps = _ref.noDataProps,
|
|
122
|
+
noDataProps = _ref$noDataProps === void 0 ? {} : _ref$noDataProps;
|
|
123
|
+
var _useTranslation = useTranslation(),
|
|
124
|
+
t = _useTranslation.t;
|
|
125
|
+
var _useFetchGithubAppIns = useFetchGithubAppInstallations(integratorParams),
|
|
126
|
+
_useFetchGithubAppIns2 = _useFetchGithubAppIns.data,
|
|
127
|
+
appInstallations = _useFetchGithubAppIns2 === void 0 ? [] : _useFetchGithubAppIns2,
|
|
128
|
+
isLoading = _useFetchGithubAppIns.isLoading;
|
|
129
|
+
var newInstallationUrl = getNewInstallationUrl(integratorParams, redirectPath);
|
|
130
|
+
if (isLoading) {
|
|
131
|
+
return /*#__PURE__*/jsx("div", {
|
|
132
|
+
className: "flex h-screen w-screen items-center justify-center",
|
|
133
|
+
children: /*#__PURE__*/jsx(PageLoader, {})
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
return /*#__PURE__*/jsxs(Container, {
|
|
137
|
+
children: [/*#__PURE__*/jsx(Header, {
|
|
138
|
+
breadcrumbs: breadcrumbs,
|
|
139
|
+
titleHelpPopoverProps: titleHelpPopoverProps,
|
|
140
|
+
title: t("neetoGithub.github"),
|
|
141
|
+
actionBlock: /*#__PURE__*/jsx(Button, {
|
|
142
|
+
href: newInstallationUrl,
|
|
143
|
+
label: t("neetoGithub.connectGithub")
|
|
144
|
+
})
|
|
145
|
+
}), /*#__PURE__*/jsx(AccountsTable, {
|
|
146
|
+
appInstallations: appInstallations,
|
|
147
|
+
integratorParams: integratorParams,
|
|
148
|
+
keysToPurgeOnDelete: keysToPurgeOnDelete,
|
|
149
|
+
noDataProps: noDataProps
|
|
150
|
+
})]
|
|
151
|
+
});
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
export { NeetoGithubIntegrationsTable as default };
|
|
155
|
+
//# sourceMappingURL=NeetoGithubIntegrationsTable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NeetoGithubIntegrationsTable.js","sources":["../../app/javascript/src/v2/components/NeetoGithubIntegrationsTable/utils.jsx","../../app/javascript/src/v2/components/NeetoGithubIntegrationsTable/AccountsTable.jsx","../../app/javascript/src/v2/components/NeetoGithubIntegrationsTable/index.jsx"],"sourcesContent":["import { Typography } from \"@bigbinary/neeto-atoms\";\nimport { t } from \"i18next\";\nimport { buildUrl } from \"neetocommons/v2/utils\";\nimport MoreDropdown from \"neetomolecules/v2/MoreDropdown\";\n\nimport { NEETO_GITHUB_ENGINE_BASE_URL } from \"src/constants\";\n\nexport const getNewInstallationUrl = (integratorParams, redirectPath) =>\n buildUrl(`${NEETO_GITHUB_ENGINE_BASE_URL}/app_installations/new`, {\n ...integratorParams,\n redirectPath,\n });\n\nexport const getGithubAccountsTableColumnData = ({\n setAccountToDisconnect,\n}) => [\n {\n id: \"actions\",\n header: t(\"neetoGithub.account\"),\n cell: ({ row }) => {\n const account = row.original;\n\n return (\n <div className=\"flex items-center justify-between gap-x-3\">\n <Typography>{account.accountLogin}</Typography>\n <MoreDropdown\n menuItems={[\n {\n key: \"delete\",\n label: t(\"neetoGithub.actions.delete\"),\n onClick: () => setAccountToDisconnect(account),\n },\n ]}\n />\n </div>\n );\n },\n },\n];\n","import { useState } from \"react\";\n\nimport { Alert, DataTable, Empty } from \"@bigbinary/neeto-atoms\";\nimport { isNotEmpty } from \"neetocist\";\nimport { isEmpty } from \"ramda\";\nimport { useTranslation, Trans } from \"react-i18next\";\n\nimport { useDestroyGithubIntegration } from \"hooks/reactQuery/useGithubAccountsApi\";\n\nimport { getGithubAccountsTableColumnData } from \"./utils\";\n\nconst AccountsTable = ({\n appInstallations = [],\n integratorParams,\n keysToPurgeOnDelete,\n noDataProps,\n}) => {\n const { t } = useTranslation();\n const [accountToDisconnect, setAccountToDisconnect] = useState({});\n\n const { mutate: deleteGithubAccount, isPending: isDeleting } =\n useDestroyGithubIntegration(integratorParams, keysToPurgeOnDelete, {\n onSuccess: () => setAccountToDisconnect({}),\n });\n\n if (isEmpty(appInstallations)) {\n return (\n <div className=\"flex h-full w-full items-center justify-center\">\n <Empty\n title={t(\"neetoGithub.integrationTable.noIntegrationFound\")}\n {...noDataProps}\n />\n </div>\n );\n }\n\n return (\n <>\n <DataTable\n data={appInstallations}\n columns={getGithubAccountsTableColumnData({\n setAccountToDisconnect,\n })}\n />\n <Alert\n isOpen={isNotEmpty(accountToDisconnect)}\n isSubmitting={isDeleting}\n submitButtonLabel={t(\"neetoGithub.disconnectGitHub\")}\n title={t(\"neetoGithub.integrationTable.alert.title\")}\n message={\n <Trans\n i18nKey=\"neetoGithub.integrationTable.alert.message\"\n values={{ login: accountToDisconnect?.accountLogin }}\n />\n }\n onClose={() => setAccountToDisconnect({})}\n onSubmit={() => deleteGithubAccount(accountToDisconnect?.id)}\n />\n </>\n );\n};\n\nexport default AccountsTable;\n","import { Button } from \"@bigbinary/neeto-atoms\";\nimport Container from \"neetomolecules/v2/Container\";\nimport Header from \"neetomolecules/v2/Header\";\nimport PageLoader from \"neetomolecules/v2/PageLoader\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { useFetchGithubAppInstallations } from \"hooks/reactQuery/useGithubAccountsApi\";\n\nimport AccountsTable from \"./AccountsTable\";\nimport { getNewInstallationUrl } from \"./utils\";\n\nconst NeetoGithubIntegrationsTable = ({\n breadcrumbs = [],\n integratorParams,\n redirectPath,\n keysToPurgeOnDelete = [],\n titleHelpPopoverProps = {},\n noDataProps = {},\n}) => {\n const { t } = useTranslation();\n\n const { data: appInstallations = [], isLoading } =\n useFetchGithubAppInstallations(integratorParams);\n\n const newInstallationUrl = getNewInstallationUrl(\n integratorParams,\n redirectPath\n );\n\n if (isLoading) {\n return (\n <div className=\"flex h-screen w-screen items-center justify-center\">\n <PageLoader />\n </div>\n );\n }\n\n return (\n <Container>\n <Header\n {...{ breadcrumbs, titleHelpPopoverProps }}\n title={t(\"neetoGithub.github\")}\n actionBlock={\n <Button\n href={newInstallationUrl}\n label={t(\"neetoGithub.connectGithub\")}\n />\n }\n />\n <AccountsTable\n {...{\n appInstallations,\n integratorParams,\n keysToPurgeOnDelete,\n noDataProps,\n }}\n />\n </Container>\n );\n};\n\nexport default NeetoGithubIntegrationsTable;\n"],"names":["getNewInstallationUrl","integratorParams","redirectPath","buildUrl","concat","NEETO_GITHUB_ENGINE_BASE_URL","_objectSpread","getGithubAccountsTableColumnData","_ref","setAccountToDisconnect","id","header","t","cell","_ref2","row","account","original","_jsxs","className","children","_jsx","Typography","accountLogin","MoreDropdown","menuItems","key","label","onClick","AccountsTable","_ref$appInstallations","appInstallations","keysToPurgeOnDelete","noDataProps","_useTranslation","useTranslation","_useState","useState","_useState2","_slicedToArray","accountToDisconnect","_useDestroyGithubInte","useDestroyGithubIntegration","onSuccess","deleteGithubAccount","mutate","isDeleting","isPending","isEmpty","Empty","title","_Fragment","DataTable","data","columns","Alert","isOpen","isNotEmpty","isSubmitting","submitButtonLabel","message","Trans","i18nKey","values","login","onClose","onSubmit","NeetoGithubIntegrationsTable","_ref$breadcrumbs","breadcrumbs","_ref$keysToPurgeOnDel","_ref$titleHelpPopover","titleHelpPopoverProps","_ref$noDataProps","_useFetchGithubAppIns","useFetchGithubAppInstallations","_useFetchGithubAppIns2","isLoading","newInstallationUrl","PageLoader","Container","Header","actionBlock","Button","href"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAOO,IAAMA,qBAAqB,GAAG,SAAxBA,qBAAqBA,CAAIC,gBAAgB,EAAEC,YAAY,EAAA;EAAA,OAClEC,QAAQ,CAAA,EAAA,CAAAC,MAAA,CAAIC,4BAA4B,6BAAAC,eAAA,CAAAA,eAAA,CAAA,EAAA,EACnCL,gBAAgB,CAAA,EAAA,EAAA,EAAA;AACnBC,IAAAA,YAAY,EAAZA;AAAY,GAAA,CACb,CAAC;AAAA,CAAA;AAEG,IAAMK,gCAAgC,GAAG,SAAnCA,gCAAgCA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAC3CC,sBAAsB,GAAAD,IAAA,CAAtBC,sBAAsB;AAAA,EAAA,OAClB,CACJ;AACEC,IAAAA,EAAE,EAAE,SAAS;AACbC,IAAAA,MAAM,EAAEC,CAAC,CAAC,qBAAqB,CAAC;AAChCC,IAAAA,IAAI,EAAE,SAANA,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1E,gBAAgB,CAAC;IAAA2E,sBAAA,GAAAF,qBAAA,CAD1CrB,IAAI;AAAEtB,IAAAA,gBAAgB,GAAA6C,sBAAA,KAAA,MAAA,GAAG,EAAE,GAAAA,sBAAA;IAAEC,SAAS,GAAAH,qBAAA,CAATG,SAAS;AAG9C,EAAA,IAAMC,kBAAkB,GAAG9E,qBAAqB,CAC9CC,gBAAgB,EAChBC,YACF,CAAC;AAED,EAAA,IAAI2E,SAAS,EAAE;AACb,IAAA,oBACExD,GAAA,CAAA,KAAA,EAAA;AAAKF,MAAAA,SAAS,EAAC,oDAAoD;AAAAC,MAAAA,QAAA,eACjEC,GAAA,CAAC0D,UAAU,EAAA,EAAE;AAAC,KACX,CAAC;AAEV,EAAA;EAEA,oBACE7D,IAAA,CAAC8D,SAAS,EAAA;IAAA5D,QAAA,EAAA,cACRC,GAAA,CAAC4D,MAAM,EAAA;AACCZ,MAAAA,WAAW,EAAXA,WAAW;AAAEG,MAAAA,qBAAqB,EAArBA,qBAAqB;AACxCtB,MAAAA,KAAK,EAAEtC,CAAC,CAAC,oBAAoB,CAAE;MAC/BsE,WAAW,eACT7D,GAAA,CAAC8D,MAAM,EAAA;AACLC,QAAAA,IAAI,EAAEN,kBAAmB;QACzBnD,KAAK,EAAEf,CAAC,CAAC,2BAA2B;OACrC;AACF,KACF,CAAC,eACFS,GAAA,CAACQ,aAAa,EAAA;AAEVE,MAAAA,gBAAgB,EAAhBA,gBAAgB;AAChB9B,MAAAA,gBAAgB,EAAhBA,gBAAgB;AAChB+B,MAAAA,mBAAmB,EAAnBA,mBAAmB;AACnBC,MAAAA,WAAW,EAAXA;AAAW,KAEd,CAAC;AAAA,GACO,CAAC;AAEhB;;;;"}
|
|
@@ -1,33 +1,39 @@
|
|
|
1
|
+
import { Typography, Button, Avatar, Spinner } from '@bigbinary/neeto-atoms';
|
|
1
2
|
import classnames from 'classnames';
|
|
2
|
-
import { globalProps } from '@bigbinary/neeto-commons-frontend/initializers';
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { withT, isMetaKeyPressed } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
3
|
+
import { globalProps } from '@bigbinary/neeto-commons-frontend/v2/initializers';
|
|
4
|
+
import { b as useFetchGithubRepositories } from '../useGithubAccountsApi-Csym3TIW.js';
|
|
5
|
+
import { withT, isMetaKeyPressed } from '@bigbinary/neeto-commons-frontend/v2/react-utils';
|
|
6
6
|
import Github from '@bigbinary/neeto-icons/misc/Github';
|
|
7
|
-
import Typography from '@bigbinary/neetoui/Typography';
|
|
8
7
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
9
8
|
import Building from '@bigbinary/neeto-icons/Building';
|
|
10
|
-
import Avatar from '@bigbinary/neetoui/Avatar';
|
|
11
|
-
import Button from '@bigbinary/neetoui/Button';
|
|
12
9
|
import Plus from '@bigbinary/neeto-icons/Plus';
|
|
13
10
|
import Settings from '@bigbinary/neeto-icons/Settings';
|
|
14
11
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
15
12
|
import { useState, createElement } from 'react';
|
|
16
13
|
import { isPresent } from '@bigbinary/neeto-cist';
|
|
17
|
-
import Search from '@bigbinary/neeto-molecules/Search';
|
|
14
|
+
import Search from '@bigbinary/neeto-molecules/v2/Search';
|
|
18
15
|
import { Trans, useTranslation } from 'react-i18next';
|
|
19
16
|
import Lock from '@bigbinary/neeto-icons/Lock';
|
|
20
|
-
import DateFormat from '@bigbinary/neeto-molecules/DateFormat';
|
|
17
|
+
import DateFormat from '@bigbinary/neeto-molecules/v2/DateFormat';
|
|
18
|
+
import '../repository-tile-DxVqVMYY.js';
|
|
19
|
+
import '@babel/runtime/helpers/toConsumableArray';
|
|
20
|
+
import '@babel/runtime/helpers/defineProperty';
|
|
21
|
+
import '@tanstack/react-query';
|
|
22
|
+
import '@bigbinary/neeto-commons-frontend/initializers';
|
|
23
|
+
import '@bigbinary/neeto-commons-frontend/react-utils';
|
|
24
|
+
import 'ramda';
|
|
25
|
+
import 'axios';
|
|
26
|
+
import '@bigbinary/neeto-commons-frontend/constants';
|
|
21
27
|
|
|
22
28
|
var Header = withT(function (_ref) {
|
|
23
29
|
var t = _ref.t;
|
|
24
30
|
return /*#__PURE__*/jsxs("div", {
|
|
25
31
|
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",
|
|
26
32
|
children: [/*#__PURE__*/jsx(Github, {
|
|
27
|
-
className: "github-icon",
|
|
28
33
|
size: 20
|
|
29
34
|
}), /*#__PURE__*/jsx(Typography, {
|
|
30
|
-
|
|
35
|
+
className: "text-lg font-medium",
|
|
36
|
+
variant: "h4",
|
|
31
37
|
children: t("neetoGithub.github")
|
|
32
38
|
})]
|
|
33
39
|
});
|
|
@@ -43,9 +49,8 @@ var Configure = withT(function (_ref) {
|
|
|
43
49
|
href: installationUrl,
|
|
44
50
|
icon: isConnected ? Settings : Plus,
|
|
45
51
|
iconPosition: "left",
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
style: "link",
|
|
52
|
+
size: "sm",
|
|
53
|
+
variant: "link",
|
|
49
54
|
children: isConnected ? t("neetoGithub.configureAccount") : t("neetoGithub.connectAccount")
|
|
50
55
|
})
|
|
51
56
|
});
|
|
@@ -77,17 +82,17 @@ var List$1 = withT(function (_ref) {
|
|
|
77
82
|
className: "neeto-ui-text-gray-600",
|
|
78
83
|
size: 24
|
|
79
84
|
}) : /*#__PURE__*/jsx(Avatar, {
|
|
80
|
-
size: "
|
|
85
|
+
size: "sm",
|
|
81
86
|
user: {
|
|
82
87
|
imageUrl: avatarUrl
|
|
83
88
|
}
|
|
84
89
|
}), /*#__PURE__*/jsx(Typography, {
|
|
85
90
|
className: "neeto-ui-text-gray-800",
|
|
86
|
-
|
|
91
|
+
variant: "body2",
|
|
87
92
|
children: /*#__PURE__*/jsx(Button, {
|
|
88
93
|
className: "neeto-ui-text-gray-800",
|
|
89
94
|
label: "@".concat(name),
|
|
90
|
-
|
|
95
|
+
variant: "link",
|
|
91
96
|
onClick: function onClick() {
|
|
92
97
|
return window.open(profileUrl, "_blank");
|
|
93
98
|
}
|
|
@@ -97,7 +102,7 @@ var List$1 = withT(function (_ref) {
|
|
|
97
102
|
className: "neeto-ui-bg-gray-800 neeto-ui-rounded-full h-1 w-1"
|
|
98
103
|
}), /*#__PURE__*/jsx(Typography, {
|
|
99
104
|
className: "neeto-ui-text-black",
|
|
100
|
-
|
|
105
|
+
variant: "body2",
|
|
101
106
|
children: t("neetoGithub.countOf.repos", {
|
|
102
107
|
count: count
|
|
103
108
|
})
|
|
@@ -143,15 +148,14 @@ var NoRepositories = withT(function (_ref) {
|
|
|
143
148
|
children: /*#__PURE__*/jsxs("div", {
|
|
144
149
|
className: "mx-auto flex w-full max-w-sm flex-col items-center justify-center space-y-4 py-4 text-center",
|
|
145
150
|
children: [/*#__PURE__*/jsx(Typography, {
|
|
146
|
-
|
|
151
|
+
variant: "body2",
|
|
147
152
|
children: t("neetoGithub.noReposDescription")
|
|
148
153
|
}), /*#__PURE__*/jsx(Button, {
|
|
149
154
|
href: installationUrl,
|
|
150
155
|
icon: Github,
|
|
151
156
|
iconPosition: "left",
|
|
152
157
|
label: t("neetoGithub.connectRepository"),
|
|
153
|
-
|
|
154
|
-
style: "primary"
|
|
158
|
+
variant: "default"
|
|
155
159
|
}), /*#__PURE__*/jsx("div", {
|
|
156
160
|
className: "text-xs",
|
|
157
161
|
children: /*#__PURE__*/jsx(Trans, {
|
|
@@ -170,11 +174,6 @@ var NoRepositories = withT(function (_ref) {
|
|
|
170
174
|
});
|
|
171
175
|
});
|
|
172
176
|
|
|
173
|
-
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}}
|
|
174
|
-
|
|
175
|
-
var css = ".connect-repo__info{width:100%}@media (min-width:768px){.connect-repo__info{width:calc(100% - 82px)}}.github-icon{flex-shrink:0}.github-icon [data-dark-mode-color=true]{fill:rgb(var(--neeto-ui-black))}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC9qYXZhc2NyaXB0L3N0eWxlc2hlZXRzL2NvbXBvbmVudHMvcmVwb3NpdG9yeS10aWxlLmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxvQkFDRSxVQUNGLENBRUEseUJBQ0Usb0JBQ0UsdUJBQ0YsQ0FDRixDQUVBLGFBQ0UsYUFDRixDQUVBLHlDQUNFLCtCQUNGIiwic291cmNlc0NvbnRlbnQiOlsiLmNvbm5lY3QtcmVwb19faW5mbyB7XG4gIHdpZHRoOiAxMDAlO1xufVxuXG5AbWVkaWEgKG1pbi13aWR0aDogNzY4cHgpIHtcbiAgLmNvbm5lY3QtcmVwb19faW5mbyB7XG4gICAgd2lkdGg6IGNhbGMoMTAwJSAtIDgycHgpO1xuICB9XG59XG5cbi5naXRodWItaWNvbiB7XG4gIGZsZXgtc2hyaW5rOiAwO1xufVxuXG4uZ2l0aHViLWljb24gW2RhdGEtZGFyay1tb2RlLWNvbG9yPVwidHJ1ZVwiXSB7XG4gIGZpbGw6IHJnYih2YXIoLS1uZWV0by11aS1ibGFjaykpO1xufVxuIl19 */";
|
|
176
|
-
n(css,{});
|
|
177
|
-
|
|
178
177
|
var RepositoryTile = function RepositoryTile(_ref) {
|
|
179
178
|
var isConnecting = _ref.isConnecting,
|
|
180
179
|
onConnect = _ref.onConnect,
|
|
@@ -192,20 +191,21 @@ var RepositoryTile = function RepositoryTile(_ref) {
|
|
|
192
191
|
return /*#__PURE__*/jsxs("div", {
|
|
193
192
|
className: "connect-repo__row neeto-ui-border-gray-300 flex flex-col justify-between gap-3 border-b border-solid py-3 ps-3 pe-3 last:border-b-0 md:flex-row md:items-center md:ps-5",
|
|
194
193
|
children: [/*#__PURE__*/jsxs("div", {
|
|
195
|
-
className: "connect-repo__info flex items-center space-x-2",
|
|
194
|
+
className: "connect-repo__info flex min-w-0 items-center space-x-2",
|
|
196
195
|
children: [/*#__PURE__*/jsx(Github, {
|
|
197
|
-
className: "
|
|
196
|
+
className: "shrink-0",
|
|
198
197
|
size: 20
|
|
199
198
|
}), /*#__PURE__*/jsx(Typography, {
|
|
200
|
-
|
|
199
|
+
className: "truncate",
|
|
200
|
+
variant: "body2",
|
|
201
201
|
children: fullName
|
|
202
202
|
}), isPrivate && /*#__PURE__*/jsx(Lock, {
|
|
203
203
|
className: "shrink-0",
|
|
204
204
|
size: 16
|
|
205
205
|
}), /*#__PURE__*/jsxs("div", {
|
|
206
|
-
className: "hidden lg:inline-
|
|
206
|
+
className: "hidden shrink-0 items-center gap-2 whitespace-nowrap lg:inline-flex",
|
|
207
207
|
children: [/*#__PURE__*/jsx("span", {
|
|
208
|
-
className: "
|
|
208
|
+
className: "bg-foreground h-1 w-1 neeto-ui-rounded-full"
|
|
209
209
|
}), /*#__PURE__*/jsx(DateFormat.FromNow, {
|
|
210
210
|
date: updatedAt
|
|
211
211
|
})]
|
|
@@ -214,8 +214,8 @@ var RepositoryTile = function RepositoryTile(_ref) {
|
|
|
214
214
|
className: "w-max",
|
|
215
215
|
disabled: isConnecting,
|
|
216
216
|
loading: isLoading,
|
|
217
|
-
style: "primary",
|
|
218
217
|
type: "button",
|
|
218
|
+
variant: "default",
|
|
219
219
|
onClick: function onClick() {
|
|
220
220
|
return onConnect({
|
|
221
221
|
repoType: "private",
|
|
@@ -237,26 +237,20 @@ var List = withT(function (_ref) {
|
|
|
237
237
|
installationUrl = _ref.installationUrl,
|
|
238
238
|
troubleshootUrl = _ref.troubleshootUrl;
|
|
239
239
|
return /*#__PURE__*/jsx("div", {
|
|
240
|
-
className: "h-full overflow-y-
|
|
240
|
+
className: "h-full overflow-y-auto px-4 pb-4 md:px-6 md:pb-6",
|
|
241
241
|
children: isPresent(repositories) ? /*#__PURE__*/jsx("div", {
|
|
242
|
-
className:
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
});
|
|
255
|
-
}) : /*#__PURE__*/jsx(Typography, {
|
|
256
|
-
className: "flex h-full w-full items-center justify-center",
|
|
257
|
-
style: "body2",
|
|
258
|
-
children: t("neetoGithub.noRepos")
|
|
259
|
-
})
|
|
242
|
+
className: "neeto-ui-border-gray-300 neeto-ui-rounded-md flex w-full flex-col border",
|
|
243
|
+
children: isPresent(filteredRepositories) ? filteredRepositories.map(function (repository, index) {
|
|
244
|
+
return /*#__PURE__*/createElement(RepositoryTile, {
|
|
245
|
+
isConnecting: isConnecting,
|
|
246
|
+
onConnect: onConnect,
|
|
247
|
+
repository: repository,
|
|
248
|
+
key: index
|
|
249
|
+
});
|
|
250
|
+
}) : /*#__PURE__*/jsx(Typography, {
|
|
251
|
+
className: "flex h-full w-full items-center justify-center py-6",
|
|
252
|
+
variant: "body2",
|
|
253
|
+
children: t("neetoGithub.noRepos")
|
|
260
254
|
})
|
|
261
255
|
}) : /*#__PURE__*/jsx(NoRepositories, {
|
|
262
256
|
installationUrl: installationUrl,
|
|
@@ -276,7 +270,7 @@ var NotConnected = function NotConnected(_ref) {
|
|
|
276
270
|
return /*#__PURE__*/jsxs("div", {
|
|
277
271
|
className: "flex w-full max-w-sm flex-col items-center justify-center space-y-4 text-center",
|
|
278
272
|
children: [/*#__PURE__*/jsx(Typography, {
|
|
279
|
-
|
|
273
|
+
variant: "body2",
|
|
280
274
|
children: t("neetoGithub.notConnectedDescription", {
|
|
281
275
|
appName: globalProps.appName
|
|
282
276
|
})
|
|
@@ -285,8 +279,7 @@ var NotConnected = function NotConnected(_ref) {
|
|
|
285
279
|
iconPosition: "left",
|
|
286
280
|
label: t("neetoGithub.connectGithub"),
|
|
287
281
|
loading: isLoading,
|
|
288
|
-
|
|
289
|
-
style: "primary",
|
|
282
|
+
variant: "default",
|
|
290
283
|
onClick: function onClick(event) {
|
|
291
284
|
setIsLoading(true);
|
|
292
285
|
var target = isMetaKeyPressed(event) ? "_blank" : "_self";
|
|
@@ -327,18 +320,21 @@ var Private = function Private(_ref) {
|
|
|
327
320
|
className: "space-y-3 p-4 md:p-6",
|
|
328
321
|
children: [/*#__PURE__*/jsx(Typography, {
|
|
329
322
|
className: "shrink-0 text-lg font-medium",
|
|
330
|
-
|
|
323
|
+
variant: "h2",
|
|
331
324
|
children: t("neetoGithub.connectARepo")
|
|
332
|
-
}), isPresent(repositories) && /*#__PURE__*/
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
325
|
+
}), isPresent(repositories) && /*#__PURE__*/jsxs("div", {
|
|
326
|
+
className: "flex w-full items-center gap-3",
|
|
327
|
+
children: [/*#__PURE__*/jsx(Search, {
|
|
328
|
+
onSearch: onSearch,
|
|
329
|
+
className: "flex-1",
|
|
330
|
+
unlimitedChars: false
|
|
331
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
332
|
+
className: "whitespace-nowrap neeto-ui-text-gray-700",
|
|
333
|
+
variant: "body2",
|
|
338
334
|
children: t("neetoGithub.countOf.repos", {
|
|
339
335
|
count: filteredRepositories.length
|
|
340
336
|
})
|
|
341
|
-
})
|
|
337
|
+
})]
|
|
342
338
|
})]
|
|
343
339
|
}), /*#__PURE__*/jsx("div", {
|
|
344
340
|
className: "flex min-h-0 w-full grow flex-col space-y-6",
|
|
@@ -372,7 +368,7 @@ var Repositories = function Repositories(_ref) {
|
|
|
372
368
|
troubleshootUrl = _ref.troubleshootUrl,
|
|
373
369
|
isPane = _ref.isPane;
|
|
374
370
|
return /*#__PURE__*/jsx("div", {
|
|
375
|
-
className: classnames("neeto-ui-rounded-md neeto-ui-border-gray-300 h-full w-full space-y-6 border border-solid", {
|
|
371
|
+
className: classnames("neeto-ui-rounded-md neeto-ui-border-gray-300 flex h-full w-full flex-col space-y-6 overflow-hidden border border-solid", {
|
|
376
372
|
"order-2": isPane,
|
|
377
373
|
"order-1": !isPane
|
|
378
374
|
}),
|
|
@@ -446,5 +442,5 @@ var NeetoGithubNanoContainer = function NeetoGithubNanoContainer(_ref) {
|
|
|
446
442
|
});
|
|
447
443
|
};
|
|
448
444
|
|
|
449
|
-
export { NeetoGithubNanoContainer as
|
|
450
|
-
//# sourceMappingURL=
|
|
445
|
+
export { NeetoGithubNanoContainer as default };
|
|
446
|
+
//# sourceMappingURL=NeetoGithubNanoContainer.js.map
|