@haneinfo/m2m-api-key 8.1.33 → 8.1.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/frontend/api-keys-messages.d.ts +2 -0
- package/dist/frontend/api-keys-messages.d.ts.map +1 -0
- package/dist/frontend/api-keys-messages.js +14 -0
- package/dist/frontend/api-keys-messages.js.map +1 -0
- package/dist/frontend/api-keys-table.d.ts.map +1 -1
- package/dist/frontend/api-keys-table.js +2 -1
- package/dist/frontend/api-keys-table.js.map +1 -1
- package/package.json +6 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-keys-messages.d.ts","sourceRoot":"","sources":["../../src/frontend/api-keys-messages.tsx"],"names":[],"mappings":"AAQA,wBAAgB,mBAAmB,gCAGlC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ApiKeyActionsHeader = ApiKeyActionsHeader;
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
const frontend_shell_1 = require("@haneinfo/frontend-shell");
|
|
7
|
+
// Package-owned wording: Apps do not need a new table message key.
|
|
8
|
+
const zhTW = { actions: '操作' };
|
|
9
|
+
const en = { actions: 'Actions' };
|
|
10
|
+
function ApiKeyActionsHeader() {
|
|
11
|
+
const text = (0, frontend_shell_1.useLocale)() === 'en' ? en : zhTW;
|
|
12
|
+
return (0, jsx_runtime_1.jsx)("span", { className: "sr-only", children: text.actions });
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=api-keys-messages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-keys-messages.js","sourceRoot":"","sources":["../../src/frontend/api-keys-messages.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;AAQb,kDAGC;;AATD,6DAAqD;AAErD,mEAAmE;AACnE,MAAM,IAAI,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAC/B,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;AAElC,SAAgB,mBAAmB;IACjC,MAAM,IAAI,GAAG,IAAA,0BAAS,GAAE,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IAC9C,OAAO,iCAAM,SAAS,EAAC,SAAS,YAAE,IAAI,CAAC,OAAO,GAAQ,CAAC;AACzD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-keys-table.d.ts","sourceRoot":"","sources":["../../src/frontend/api-keys-table.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"api-keys-table.d.ts","sourceRoot":"","sources":["../../src/frontend/api-keys-table.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAmB,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAErE,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,eAAe,EACf,SAAS,EACT,SAAS,EACT,aAAa,EACb,aAAa,EACb,CAAC,EACD,qBAAqB,EACrB,kBAAkB,EAClB,4BAA4B,EAC5B,KAAK,EACL,YAAY,EACZ,WAAW,EACX,kBAAkB,EAClB,2BAA2B,GAC5B,EAAE,iBAAiB,+BA6GnB"}
|
|
@@ -4,8 +4,9 @@ exports.ApiKeysTable = ApiKeysTable;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const frontend_shell_1 = require("@haneinfo/frontend-shell");
|
|
6
6
|
const api_key_row_actions_js_1 = require("./api-key-row-actions.js");
|
|
7
|
+
const api_keys_messages_js_1 = require("./api-keys-messages.js");
|
|
7
8
|
function ApiKeysTable({ apiKeys, serviceAccounts, sortField, sortOrder, LinkComponent, buildSortHref, t, setApiKeyActiveAction, deleteApiKeyAction, updateApiKeyActingUserAction, roles, scopeOptions, scopeGroups, updateApiKeyAction, searchServiceAccountsAction, }) {
|
|
8
9
|
const serviceAccountEmailById = new Map(serviceAccounts.map((account) => [account.id, account.email]));
|
|
9
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: "rounded-lg border", children: (0, jsx_runtime_1.jsxs)(frontend_shell_1.Table, { children: [(0, jsx_runtime_1.jsx)(frontend_shell_1.TableHeader, { children: (0, jsx_runtime_1.jsxs)(frontend_shell_1.TableRow, { children: [(0, jsx_runtime_1.jsx)(frontend_shell_1.TableHead, { children: (0, jsx_runtime_1.jsx)(frontend_shell_1.SortableColumnHeader, { label: t('name'), field: "name", currentSortField: sortField, currentSortOrder: sortOrder, LinkComponent: LinkComponent, buildSortHref: buildSortHref }) }), (0, jsx_runtime_1.jsx)(frontend_shell_1.TableHead, { children: t('key') }), (0, jsx_runtime_1.jsx)(frontend_shell_1.TableHead, { children: t('role') }), (0, jsx_runtime_1.jsx)(frontend_shell_1.TableHead, { children: t('actingUser') }), (0, jsx_runtime_1.jsx)(frontend_shell_1.TableHead, { children: t('scopes') }), (0, jsx_runtime_1.jsx)(frontend_shell_1.TableHead, { children: t('status') }), (0, jsx_runtime_1.jsx)(frontend_shell_1.TableHead, { children: (0, jsx_runtime_1.jsx)(frontend_shell_1.SortableColumnHeader, { label: t('lastUsed'), field: "lastUsedAt", currentSortField: sortField, currentSortOrder: sortOrder, LinkComponent: LinkComponent, buildSortHref: buildSortHref }) }), (0, jsx_runtime_1.jsx)(frontend_shell_1.TableHead, { className: "w-10" })] }) }), (0, jsx_runtime_1.jsxs)(frontend_shell_1.TableBody, { children: [apiKeys.length === 0 && ((0, jsx_runtime_1.jsx)(frontend_shell_1.TableRow, { children: (0, jsx_runtime_1.jsx)(frontend_shell_1.TableCell, { colSpan: 8, className: "text-center text-muted-foreground", children: t('noApiKeys') }) })), apiKeys.map((apiKey) => ((0, jsx_runtime_1.jsxs)(frontend_shell_1.TableRow, { children: [(0, jsx_runtime_1.jsx)(frontend_shell_1.TableCell, { children: apiKey.name }), (0, jsx_runtime_1.jsx)(frontend_shell_1.TableCell, { children: (0, jsx_runtime_1.jsxs)("code", { className: "rounded bg-muted px-1.5 py-0.5 text-xs font-mono", children: [apiKey.prefix, "\u2026"] }) }), (0, jsx_runtime_1.jsx)(frontend_shell_1.TableCell, { children: (0, jsx_runtime_1.jsx)(frontend_shell_1.Badge, { variant: "secondary", children: apiKey.role.displayName }) }), (0, jsx_runtime_1.jsx)(frontend_shell_1.TableCell, { children: apiKey.actingUserId ? ((0, jsx_runtime_1.jsx)("span", { className: "text-sm", children: serviceAccountEmailById.get(apiKey.actingUserId) ?? apiKey.actingUserId })) : ((0, jsx_runtime_1.jsx)("span", { className: "text-xs text-muted-foreground", children: t('actingUserNone') })) }), (0, jsx_runtime_1.jsx)(frontend_shell_1.TableCell, { children: apiKey.scopes.length === 0 ? ((0, jsx_runtime_1.jsx)("span", { className: "text-xs text-muted-foreground", children: "-" })) : ((0, jsx_runtime_1.jsx)("div", { className: "flex max-w-xs flex-wrap gap-1", children: apiKey.scopes.map((s) => ((0, jsx_runtime_1.jsx)(frontend_shell_1.Badge, { variant: "outline", className: "text-xs font-mono", children: s }, s))) })) }), (0, jsx_runtime_1.jsx)(frontend_shell_1.TableCell, { children: (0, jsx_runtime_1.jsx)(frontend_shell_1.Badge, { variant: apiKey.isActive ? 'default' : 'outline', children: apiKey.isActive ? t('active') : t('inactive') }) }), (0, jsx_runtime_1.jsx)(frontend_shell_1.TableCell, { className: "text-xs text-muted-foreground", children: apiKey.lastUsedAt ? new Date(apiKey.lastUsedAt).toLocaleDateString() : t('never') }), (0, jsx_runtime_1.jsx)(frontend_shell_1.TableCell, { children: (0, jsx_runtime_1.jsx)(api_key_row_actions_js_1.ApiKeyRowActions, { apiKey: apiKey, serviceAccounts: serviceAccounts, setApiKeyActiveAction: setApiKeyActiveAction, deleteApiKeyAction: deleteApiKeyAction, updateApiKeyActingUserAction: updateApiKeyActingUserAction, roles: roles, scopeOptions: scopeOptions, scopeGroups: scopeGroups, updateApiKeyAction: updateApiKeyAction, searchServiceAccountsAction: searchServiceAccountsAction }) })] }, apiKey.id)))] })] }) }));
|
|
10
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: "rounded-lg border", children: (0, jsx_runtime_1.jsxs)(frontend_shell_1.Table, { children: [(0, jsx_runtime_1.jsx)(frontend_shell_1.TableHeader, { children: (0, jsx_runtime_1.jsxs)(frontend_shell_1.TableRow, { children: [(0, jsx_runtime_1.jsx)(frontend_shell_1.TableHead, { children: (0, jsx_runtime_1.jsx)(frontend_shell_1.SortableColumnHeader, { label: t('name'), field: "name", currentSortField: sortField, currentSortOrder: sortOrder, LinkComponent: LinkComponent, buildSortHref: buildSortHref }) }), (0, jsx_runtime_1.jsx)(frontend_shell_1.TableHead, { children: t('key') }), (0, jsx_runtime_1.jsx)(frontend_shell_1.TableHead, { children: t('role') }), (0, jsx_runtime_1.jsx)(frontend_shell_1.TableHead, { children: t('actingUser') }), (0, jsx_runtime_1.jsx)(frontend_shell_1.TableHead, { children: t('scopes') }), (0, jsx_runtime_1.jsx)(frontend_shell_1.TableHead, { children: t('status') }), (0, jsx_runtime_1.jsx)(frontend_shell_1.TableHead, { children: (0, jsx_runtime_1.jsx)(frontend_shell_1.SortableColumnHeader, { label: t('lastUsed'), field: "lastUsedAt", currentSortField: sortField, currentSortOrder: sortOrder, LinkComponent: LinkComponent, buildSortHref: buildSortHref }) }), (0, jsx_runtime_1.jsx)(frontend_shell_1.TableHead, { className: "w-10", children: (0, jsx_runtime_1.jsx)(api_keys_messages_js_1.ApiKeyActionsHeader, {}) })] }) }), (0, jsx_runtime_1.jsxs)(frontend_shell_1.TableBody, { children: [apiKeys.length === 0 && ((0, jsx_runtime_1.jsx)(frontend_shell_1.TableRow, { children: (0, jsx_runtime_1.jsx)(frontend_shell_1.TableCell, { colSpan: 8, className: "text-center text-muted-foreground", children: t('noApiKeys') }) })), apiKeys.map((apiKey) => ((0, jsx_runtime_1.jsxs)(frontend_shell_1.TableRow, { children: [(0, jsx_runtime_1.jsx)(frontend_shell_1.TableCell, { children: apiKey.name }), (0, jsx_runtime_1.jsx)(frontend_shell_1.TableCell, { children: (0, jsx_runtime_1.jsxs)("code", { className: "rounded bg-muted px-1.5 py-0.5 text-xs font-mono", children: [apiKey.prefix, "\u2026"] }) }), (0, jsx_runtime_1.jsx)(frontend_shell_1.TableCell, { children: (0, jsx_runtime_1.jsx)(frontend_shell_1.Badge, { variant: "secondary", children: apiKey.role.displayName }) }), (0, jsx_runtime_1.jsx)(frontend_shell_1.TableCell, { children: apiKey.actingUserId ? ((0, jsx_runtime_1.jsx)("span", { className: "text-sm", children: serviceAccountEmailById.get(apiKey.actingUserId) ?? apiKey.actingUserId })) : ((0, jsx_runtime_1.jsx)("span", { className: "text-xs text-muted-foreground", children: t('actingUserNone') })) }), (0, jsx_runtime_1.jsx)(frontend_shell_1.TableCell, { children: apiKey.scopes.length === 0 ? ((0, jsx_runtime_1.jsx)("span", { className: "text-xs text-muted-foreground", children: "-" })) : ((0, jsx_runtime_1.jsx)("div", { className: "flex max-w-xs flex-wrap gap-1", children: apiKey.scopes.map((s) => ((0, jsx_runtime_1.jsx)(frontend_shell_1.Badge, { variant: "outline", className: "text-xs font-mono", children: s }, s))) })) }), (0, jsx_runtime_1.jsx)(frontend_shell_1.TableCell, { children: (0, jsx_runtime_1.jsx)(frontend_shell_1.Badge, { variant: apiKey.isActive ? 'default' : 'outline', children: apiKey.isActive ? t('active') : t('inactive') }) }), (0, jsx_runtime_1.jsx)(frontend_shell_1.TableCell, { className: "text-xs text-muted-foreground", children: apiKey.lastUsedAt ? new Date(apiKey.lastUsedAt).toLocaleDateString() : t('never') }), (0, jsx_runtime_1.jsx)(frontend_shell_1.TableCell, { children: (0, jsx_runtime_1.jsx)(api_key_row_actions_js_1.ApiKeyRowActions, { apiKey: apiKey, serviceAccounts: serviceAccounts, setApiKeyActiveAction: setApiKeyActiveAction, deleteApiKeyAction: deleteApiKeyAction, updateApiKeyActingUserAction: updateApiKeyActingUserAction, roles: roles, scopeOptions: scopeOptions, scopeGroups: scopeGroups, updateApiKeyAction: updateApiKeyAction, searchServiceAccountsAction: searchServiceAccountsAction }) })] }, apiKey.id)))] })] }) }));
|
|
10
11
|
}
|
|
11
12
|
//# sourceMappingURL=api-keys-table.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-keys-table.js","sourceRoot":"","sources":["../../src/frontend/api-keys-table.tsx"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"api-keys-table.js","sourceRoot":"","sources":["../../src/frontend/api-keys-table.tsx"],"names":[],"mappings":";;AAcA,oCA6HC;;AA3ID,6DASkC;AAClC,qEAA4D;AAC5D,iEAA6D;AAG7D,SAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,eAAe,EACf,SAAS,EACT,SAAS,EACT,aAAa,EACb,aAAa,EACb,CAAC,EACD,qBAAqB,EACrB,kBAAkB,EAClB,4BAA4B,EAC5B,KAAK,EACL,YAAY,EACZ,WAAW,EACX,kBAAkB,EAClB,2BAA2B,GACT;IAClB,MAAM,uBAAuB,GAAG,IAAI,GAAG,CACrC,eAAe,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAC9D,CAAC;IAEF,OAAO,CACL,gCAAK,SAAS,EAAC,mBAAmB,YAChC,wBAAC,sBAAK,eACJ,uBAAC,4BAAW,cACV,wBAAC,yBAAQ,eACP,uBAAC,0BAAS,cACR,uBAAC,qCAAoB,IACnB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,EAChB,KAAK,EAAC,MAAM,EACZ,gBAAgB,EAAE,SAAS,EAC3B,gBAAgB,EAAE,SAAS,EAC3B,aAAa,EAAE,aAAa,EAC5B,aAAa,EAAE,aAAa,GAC5B,GACQ,EACZ,uBAAC,0BAAS,cAAE,CAAC,CAAC,KAAK,CAAC,GAAa,EACjC,uBAAC,0BAAS,cAAE,CAAC,C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GACQ,KArDC,MAAM,CAAC,EAAE,CAsDb,CACZ,CAAC,IACQ,IACN,GACJ,CACP,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haneinfo/m2m-api-key",
|
|
3
|
-
"version": "8.1.
|
|
3
|
+
"version": "8.1.35",
|
|
4
4
|
"private": false,
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@haneinfo/common": "0.6.1",
|
|
35
|
-
"@haneinfo/
|
|
36
|
-
"@haneinfo/
|
|
35
|
+
"@haneinfo/frontend-shell": "1.7.1",
|
|
36
|
+
"@haneinfo/plugin-api": "1.28.0"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@haneinfo/common": "^0.6.1",
|
|
@@ -79,11 +79,11 @@
|
|
|
79
79
|
"typescript": "^5.9.3",
|
|
80
80
|
"vitest": "^4.1.11",
|
|
81
81
|
"zod": "^4.4.0",
|
|
82
|
-
"@haneinfo/
|
|
82
|
+
"@haneinfo/frontend-shell": "1.7.1",
|
|
83
83
|
"@haneinfo/plugin-host-nest": "2.1.1",
|
|
84
|
+
"@haneinfo/common": "0.6.1",
|
|
84
85
|
"@haneinfo/plugin-testkit": "2.3.1",
|
|
85
|
-
"@haneinfo/rbac": "8.2.
|
|
86
|
-
"@haneinfo/frontend-shell": "1.6.2"
|
|
86
|
+
"@haneinfo/rbac": "8.2.20"
|
|
87
87
|
},
|
|
88
88
|
"license": "UNLICENSED",
|
|
89
89
|
"publishConfig": {
|