@bigbinary/neeto-github-frontend 2.2.4 → 2.2.6

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,91 @@
1
+ 'use strict';
2
+
3
+ var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
4
+ var _defineProperty = require('@babel/runtime/helpers/defineProperty');
5
+ var reactQuery = require('@tanstack/react-query');
6
+ var initializers = require('@bigbinary/neeto-commons-frontend/initializers');
7
+ var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
8
+ var ramda = require('ramda');
9
+ var axios = require('axios');
10
+ var constants = require('@bigbinary/neeto-commons-frontend/constants');
11
+
12
+ var _globalProps$organiza;
13
+ var GITHUB_INTEGRATIONS_BASE_API_URL = "/github_integrations";
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
+ });
18
+ var GITHUB_INTEGRATOR_PARAMS = {
19
+ integratorId: initializers.globalProps.organization.id,
20
+ integratorType: "Organization"
21
+ };
22
+
23
+ var baseUrl = "".concat(GITHUB_INTEGRATIONS_BASE_API_URL, "/app_installations");
24
+ var githubAppUrl = function githubAppUrl(id) {
25
+ return "".concat(baseUrl, "/").concat(id);
26
+ };
27
+ var fetch = function fetch(params) {
28
+ return axios.get(baseUrl, {
29
+ params: params
30
+ });
31
+ };
32
+ var destroy = function destroy(appInstallationId, params) {
33
+ return axios["delete"]("".concat(baseUrl, "/").concat(appInstallationId), {
34
+ params: params
35
+ });
36
+ };
37
+ var repositories = function repositories() {
38
+ return axios.get("".concat(githubAppUrl(initializers.globalProps.githubAppInstallationId), "/repositories"), {
39
+ params: GITHUB_INTEGRATOR_PARAMS
40
+ });
41
+ };
42
+ var githubAccountsApi = {
43
+ repositories: repositories,
44
+ fetch: fetch,
45
+ destroy: destroy
46
+ };
47
+
48
+ var QUERY_KEYS = {
49
+ GITHUB_REPOSITORIES_LIST: "github-repositories-list",
50
+ GITHUB_ACCOUNTS_LIST: "github-accounts-list"
51
+ };
52
+ var STALE_TIME_CONFIG = {
53
+ staleTime: constants.DEFAULT_STALE_TIME
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), !0).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 useFetchGithubRepositories = function useFetchGithubRepositories(_ref) {
59
+ var isConnected = _ref.isConnected;
60
+ return reactQuery.useQuery({
61
+ queryKey: [QUERY_KEYS.GITHUB_REPOSITORIES_LIST],
62
+ queryFn: githubAccountsApi.repositories,
63
+ staleTime: STALE_TIME_CONFIG.staleTime,
64
+ enabled: isConnected && ramda.isNotNil(initializers.globalProps.githubAppInstallationId)
65
+ });
66
+ };
67
+ var useFetchGithubAppInstallations = function useFetchGithubAppInstallations(params) {
68
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
69
+ return reactQuery.useQuery(_objectSpread(_objectSpread({
70
+ queryKey: [QUERY_KEYS.GITHUB_ACCOUNTS_LIST],
71
+ queryFn: function queryFn() {
72
+ return githubAccountsApi.fetch(params);
73
+ }
74
+ }, options), {}, {
75
+ select: ramda.prop("appInstallations")
76
+ }));
77
+ };
78
+ var useDestroyGithubIntegration = function useDestroyGithubIntegration(params) {
79
+ var keysToInvalidate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
80
+ var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
81
+ return reactUtils.useMutationWithInvalidation(function (appInstallationId) {
82
+ return githubAccountsApi.destroy(appInstallationId, params);
83
+ }, _objectSpread({
84
+ keysToInvalidate: [QUERY_KEYS.GITHUB_ACCOUNTS_LIST].concat(_toConsumableArray(keysToInvalidate))
85
+ }, options));
86
+ };
87
+
88
+ exports.useDestroyGithubIntegration = useDestroyGithubIntegration;
89
+ exports.useFetchGithubAppInstallations = useFetchGithubAppInstallations;
90
+ exports.useFetchGithubRepositories = useFetchGithubRepositories;
91
+ //# sourceMappingURL=useGithubAccountsApi-C9W-L_-C.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useGithubAccountsApi-C9W-L_-C.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 GITHUB_INTEGRATIONS_BASE_API_URL = \"/github_integrations\";\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 GITHUB_INTEGRATIONS_BASE_API_URL,\n GITHUB_INTEGRATOR_PARAMS,\n} from \"src/constants\";\n\nconst baseUrl = `${GITHUB_INTEGRATIONS_BASE_API_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":["GITHUB_INTEGRATIONS_BASE_API_URL","integrator_id","globalProps","_globalProps$organiza","organization","id","integrator_type","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,gCAAgC,GAAG,sBAAsB;CAErB;AAC/CC,EAAAA,aAAa,EAAEC,wBAAW,KAAXA,IAAAA,IAAAA,wBAAW,gBAAAC,qBAAA,GAAXD,wBAAW,CAAEE,YAAY,MAAAD,IAAAA,IAAAA,qBAAA,KAAzBA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,qBAAA,CAA2BE,EAAE;AAC5CC,EAAAA,eAAe,EAAE;AACnB;AAEO,IAAMC,wBAAwB,GAAG;AACtCC,EAAAA,YAAY,EAAEN,wBAAW,CAACE,YAAY,CAACC,EAAE;AACzCI,EAAAA,cAAc,EAAE;AAClB,CAAC;;ACJD,IAAMC,OAAO,GAAA,EAAA,CAAAC,MAAA,CAAMX,gCAAgC,EAAoB,oBAAA,CAAA;AAEvE,IAAMY,YAAY,GAAG,SAAfA,YAAYA,CAAGP,EAAE,EAAA;AAAA,EAAA,OAAA,EAAA,CAAAM,MAAA,CAAOD,OAAO,EAAAC,GAAAA,CAAAA,CAAAA,MAAA,CAAIN,EAAE,CAAA;AAAA,CAAE;AAE7C,IAAMQ,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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
+ import { useQuery } from '@tanstack/react-query';
4
+ import { globalProps } from '@bigbinary/neeto-commons-frontend/initializers';
5
+ import { useMutationWithInvalidation } from '@bigbinary/neeto-commons-frontend/react-utils';
6
+ import { isNotNil, prop } from 'ramda';
7
+ import axios from 'axios';
8
+ import { DEFAULT_STALE_TIME } from '@bigbinary/neeto-commons-frontend/constants';
9
+
10
+ var _globalProps$organiza;
11
+ var GITHUB_INTEGRATIONS_BASE_API_URL = "/github_integrations";
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
+ });
16
+ var GITHUB_INTEGRATOR_PARAMS = {
17
+ integratorId: globalProps.organization.id,
18
+ integratorType: "Organization"
19
+ };
20
+
21
+ var baseUrl = "".concat(GITHUB_INTEGRATIONS_BASE_API_URL, "/app_installations");
22
+ var githubAppUrl = function githubAppUrl(id) {
23
+ return "".concat(baseUrl, "/").concat(id);
24
+ };
25
+ var fetch = function fetch(params) {
26
+ return axios.get(baseUrl, {
27
+ params: params
28
+ });
29
+ };
30
+ var destroy = function destroy(appInstallationId, params) {
31
+ return axios["delete"]("".concat(baseUrl, "/").concat(appInstallationId), {
32
+ params: params
33
+ });
34
+ };
35
+ var repositories = function repositories() {
36
+ return axios.get("".concat(githubAppUrl(globalProps.githubAppInstallationId), "/repositories"), {
37
+ params: GITHUB_INTEGRATOR_PARAMS
38
+ });
39
+ };
40
+ var githubAccountsApi = {
41
+ repositories: repositories,
42
+ fetch: fetch,
43
+ destroy: destroy
44
+ };
45
+
46
+ var QUERY_KEYS = {
47
+ GITHUB_REPOSITORIES_LIST: "github-repositories-list",
48
+ GITHUB_ACCOUNTS_LIST: "github-accounts-list"
49
+ };
50
+ var STALE_TIME_CONFIG = {
51
+ staleTime: DEFAULT_STALE_TIME
52
+ };
53
+
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; }
55
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).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
+ var useFetchGithubRepositories = function useFetchGithubRepositories(_ref) {
57
+ var isConnected = _ref.isConnected;
58
+ return useQuery({
59
+ queryKey: [QUERY_KEYS.GITHUB_REPOSITORIES_LIST],
60
+ queryFn: githubAccountsApi.repositories,
61
+ staleTime: STALE_TIME_CONFIG.staleTime,
62
+ enabled: isConnected && isNotNil(globalProps.githubAppInstallationId)
63
+ });
64
+ };
65
+ var useFetchGithubAppInstallations = function useFetchGithubAppInstallations(params) {
66
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
67
+ return useQuery(_objectSpread(_objectSpread({
68
+ queryKey: [QUERY_KEYS.GITHUB_ACCOUNTS_LIST],
69
+ queryFn: function queryFn() {
70
+ return githubAccountsApi.fetch(params);
71
+ }
72
+ }, options), {}, {
73
+ select: prop("appInstallations")
74
+ }));
75
+ };
76
+ var useDestroyGithubIntegration = function useDestroyGithubIntegration(params) {
77
+ var keysToInvalidate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
78
+ var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
79
+ return useMutationWithInvalidation(function (appInstallationId) {
80
+ return githubAccountsApi.destroy(appInstallationId, params);
81
+ }, _objectSpread({
82
+ keysToInvalidate: [QUERY_KEYS.GITHUB_ACCOUNTS_LIST].concat(_toConsumableArray(keysToInvalidate))
83
+ }, options));
84
+ };
85
+
86
+ export { useDestroyGithubIntegration as a, useFetchGithubAppInstallations as b, useFetchGithubRepositories as u };
87
+ //# sourceMappingURL=useGithubAccountsApi-kFn8BvEJ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useGithubAccountsApi-kFn8BvEJ.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 GITHUB_INTEGRATIONS_BASE_API_URL = \"/github_integrations\";\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 GITHUB_INTEGRATIONS_BASE_API_URL,\n GITHUB_INTEGRATOR_PARAMS,\n} from \"src/constants\";\n\nconst baseUrl = `${GITHUB_INTEGRATIONS_BASE_API_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":["GITHUB_INTEGRATIONS_BASE_API_URL","integrator_id","globalProps","_globalProps$organiza","organization","id","integrator_type","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,gCAAgC,GAAG,sBA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AAA,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,GAAA,EAAA2B,aAAA,CAAA;IAEvEI,gBAAgB,EAAA,CAAGvB,UAAU,CAACE,oBAAoB,EAAAb,MAAA,CAAAoC,kBAAA,CAAKF,gBAAgB,CAAA;GACpER,EAAAA,OAAO,CAEd,CAAC;AAAA;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neeto-github-frontend",
3
- "version": "2.2.4",
3
+ "version": "2.2.6",
4
4
  "repository": "neeto-github-nano",
5
5
  "author": "BigBinary",
6
6
  "files": [
@@ -52,15 +52,15 @@
52
52
  "@babel/preset-env": "7.26.0",
53
53
  "@babel/preset-react": "7.25.9",
54
54
  "@babel/preset-typescript": "7.26.0",
55
- "@babel/runtime": "7.26.0",
55
+ "@babel/runtime": "7.26.10",
56
56
  "@bigbinary/babel-preset-neeto": "^1.0.3",
57
- "@bigbinary/eslint-plugin-neeto": "1.5.7",
57
+ "@bigbinary/eslint-plugin-neeto": "1.5.8",
58
58
  "@bigbinary/neeto-cist": "1.0.15",
59
- "@bigbinary/neeto-commons-frontend": "4.13.23",
60
- "@bigbinary/neeto-filters-frontend": "4.3.15",
61
- "@bigbinary/neeto-icons": "1.20.26",
62
- "@bigbinary/neeto-molecules": "3.15.38",
63
- "@bigbinary/neetoui": "8.2.65",
59
+ "@bigbinary/neeto-commons-frontend": "4.13.29",
60
+ "@bigbinary/neeto-filters-frontend": "4.3.16",
61
+ "@bigbinary/neeto-icons": "1.20.31",
62
+ "@bigbinary/neeto-molecules": "3.16.1",
63
+ "@bigbinary/neetoui": "8.2.77",
64
64
  "@emotion/is-prop-valid": "1.2.0",
65
65
  "@faker-js/faker": "8.2.0",
66
66
  "@honeybadger-io/js": "6.10.1",
@@ -72,11 +72,12 @@
72
72
  "@rollup/plugin-node-resolve": "15.3.0",
73
73
  "@rollup/plugin-replace": "5.0.4",
74
74
  "@svgr/rollup": "8.1.0",
75
+ "@tailwindcss/container-queries": "^0.1.1",
75
76
  "@tanstack/react-query": "5.59.20",
76
77
  "@tanstack/react-query-devtools": "5.59.20",
77
78
  "antd": "5.22.0",
78
79
  "autoprefixer": "^10.4.5",
79
- "axios": "1.7.7",
80
+ "axios": "1.8.2",
80
81
  "babel-loader": "^8.2.5",
81
82
  "babel-plugin-istanbul": "^6.1.1",
82
83
  "babel-plugin-js-logger": "1.0.17",
@@ -91,7 +92,7 @@
91
92
  "classnames": "2.5.1",
92
93
  "crypto-browserify": "3.12.1",
93
94
  "css-loader": "6.8.1",
94
- "dompurify": "^2.4.0",
95
+ "dompurify": "^3.2.4",
95
96
  "dotenv-webpack": "^8.0.1",
96
97
  "eslint": "8.14.0",
97
98
  "eslint-config-prettier": "8.5.0",
@@ -160,23 +161,24 @@
160
161
  "zustand": "4.3.2"
161
162
  },
162
163
  "peerDependencies": {
163
- "@babel/runtime": "7.26.0",
164
+ "@babel/runtime": "7.26.10",
164
165
  "@bigbinary/neeto-cist": "1.0.15",
165
- "@bigbinary/neeto-commons-frontend": "4.13.23",
166
- "@bigbinary/neeto-filters-frontend": "4.3.15",
167
- "@bigbinary/neeto-icons": "1.20.26",
168
- "@bigbinary/neeto-molecules": "3.15.38",
169
- "@bigbinary/neetoui": "8.2.65",
166
+ "@bigbinary/neeto-commons-frontend": "4.13.29",
167
+ "@bigbinary/neeto-filters-frontend": "4.3.16",
168
+ "@bigbinary/neeto-icons": "1.20.31",
169
+ "@bigbinary/neeto-molecules": "3.16.1",
170
+ "@bigbinary/neetoui": "8.2.77",
170
171
  "@honeybadger-io/js": "6.10.1",
171
172
  "@honeybadger-io/react": "6.1.25",
173
+ "@tailwindcss/container-queries": "^0.1.1",
172
174
  "@tanstack/react-query": "5.59.20",
173
175
  "@tanstack/react-query-devtools": "5.59.20",
174
176
  "antd": "5.22.0",
175
- "axios": "1.7.7",
177
+ "axios": "1.8.2",
176
178
  "buffer": "^6.0.3",
177
179
  "classnames": "2.5.1",
178
180
  "crypto-browserify": "3.12.1",
179
- "dompurify": "^2.4.0",
181
+ "dompurify": "^3.2.4",
180
182
  "formik": "2.4.6",
181
183
  "https-browserify": "1.0.0",
182
184
  "i18next": "22.5.1",
package/types.d.ts CHANGED
@@ -1,3 +1,5 @@
1
1
  import React from "react";
2
2
 
3
3
  export const NeetoGithubNanoPane = React.FC<{}>;
4
+
5
+ export const NeetoGithubIntegrationsTable = React.FC<{}>;