react-toolkits 0.8.59 → 0.8.61

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/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as r, D as u, F as n, G as m, H as d, i as l, L as p, N as L, k as S, O as g, l as y, P, n as x, Q as c, o as F, R as G, p as M, S as T, q as h, t as k, v as q, r as Q, b as R, x as v, y as B, z as C, c as N, B as f, u as w, E as D, J as E, d as H, a as I, K as O, M as W } from "./index-eKHR8-cg.chunk.js";
1
+ import { C as r, D as u, F as n, G as m, H as d, l, L as p, N as L, o as S, O as g, p as y, P, q as x, Q as c, r as F, R as G, t as M, S as R, B as T, k as h, n as k, b as q, v as Q, x as v, y as B, c as C, z as N, u as f, e as w, E as D, J as E, d as H, a as I, K as O, M as W } from "./index-SyU1uyhZ.chunk.js";
2
2
  import "react";
3
3
  import "antd";
4
4
  import "react-dom";
@@ -21,18 +21,18 @@ export {
21
21
  F as QueryListAction,
22
22
  G as RequestError,
23
23
  M as RequireGame,
24
- T as SignIn,
25
- h as UserWidget,
26
- k as contextStore,
27
- q as mixedStorage,
28
- Q as request,
29
- R as useFormModal,
30
- v as useGameStore,
31
- B as useModal,
32
- C as useModalStore,
33
- N as usePermission,
34
- f as usePermissions,
35
- w as useQueryListStore,
24
+ R as SignIn,
25
+ T as UserWidget,
26
+ h as contextStore,
27
+ k as mixedStorage,
28
+ q as useFormModal,
29
+ Q as useGameStore,
30
+ v as useModal,
31
+ B as useModalStore,
32
+ C as usePermission,
33
+ N as usePermissions,
34
+ f as useQueryListStore,
35
+ w as useRequest,
36
36
  D as useTokenStore,
37
37
  E as useTokenValidation,
38
38
  H as useToolkitsContext,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-toolkits",
3
- "version": "0.8.59",
3
+ "version": "0.8.61",
4
4
  "packageManager": "^pnpm@8.7.5",
5
5
  "sideEffects": [
6
6
  "**/*.css"
@@ -70,8 +70,8 @@
70
70
  "vite": "^5.0.10",
71
71
  "vite-plugin-dts": "^3.6.4",
72
72
  "@flow97/eslint-config-mono": "0.0.4",
73
- "tsconfig": "0.0.5",
74
- "tailwind-config": "0.1.1"
73
+ "tailwind-config": "0.1.1",
74
+ "tsconfig": "0.0.5"
75
75
  },
76
76
  "peerDependencies": {
77
77
  "antd": "^5.12.2",
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-FfLQ-ViS.chunk.js","sources":["../../../node_modules/.pnpm/@ant-design+icons-svg@4.3.2/node_modules/@ant-design/icons-svg/es/asn/UsergroupAddOutlined.js","../../../node_modules/.pnpm/@ant-design+icons@5.2.6_react-dom@18.2.0_react@18.2.0/node_modules/@ant-design/icons/es/icons/UsergroupAddOutlined.js","../src/pages/permission/RoleList/index.tsx"],"sourcesContent":["// This icon file is generated automatically.\nvar UsergroupAddOutlined = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"64 64 896 896\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M892 772h-80v-80c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v80h-80c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h80v80c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-80h80c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM373.5 498.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.8-1.7-203.2 89.2-203.2 200 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.8-1.1 6.4-4.8 5.9-8.8zM824 472c0-109.4-87.9-198.3-196.9-200C516.3 270.3 424 361.2 424 472c0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C357 742.6 326 814.8 324 891.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5C505.8 695.7 563 672 624 672c110.4 0 200-89.5 200-200zm-109.5 90.5C690.3 586.7 658.2 600 624 600s-66.3-13.3-90.5-37.5a127.26 127.26 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4-.1 34.2-13.4 66.3-37.6 90.5z\" } }] }, \"name\": \"usergroup-add\", \"theme\": \"outlined\" };\nexport default UsergroupAddOutlined;\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\n\nimport * as React from 'react';\nimport UsergroupAddOutlinedSvg from \"@ant-design/icons-svg/es/asn/UsergroupAddOutlined\";\nimport AntdIcon from \"../components/AntdIcon\";\nvar UsergroupAddOutlined = function UsergroupAddOutlined(props, ref) {\n return /*#__PURE__*/React.createElement(AntdIcon, _extends({}, props, {\n ref: ref,\n icon: UsergroupAddOutlinedSvg\n }));\n};\nif (process.env.NODE_ENV !== 'production') {\n UsergroupAddOutlined.displayName = 'UsergroupAddOutlined';\n}\nexport default /*#__PURE__*/React.forwardRef(UsergroupAddOutlined);","import { UsergroupAddOutlined } from '@ant-design/icons'\nimport type { TableColumnsType } from 'antd'\nimport { App, Card, Form, Input, Space } from 'antd'\nimport { produce } from 'immer'\nimport { Link } from 'react-router-dom'\nimport { useToolkitsContext } from '../../../components/ContextProvider'\nimport Highlight from '../../../components/Highlight'\nimport PermissionButton from '../../../components/PermissionButton'\nimport QueryList from '../../../components/QueryList'\nimport type { RoleListItem, RoleV1, RoleV2 } from '../../../features/permission'\nimport { PermissionList, useCreateRole, useRemoveRole, useUpdateRole } from '../../../features/permission'\nimport { useFormModal } from '../../../hooks/formModal'\nimport { useTranslation } from '../../../hooks/i18n'\nimport { usePermission } from '../../../hooks/permission'\nimport { useQueryListStore } from '../../../stores/queryList'\nimport { request } from '../../../utils/request'\n\nconst action = '/api/usystem/role/list'\n\nconst useCreateModal = () => {\n const { message } = App.useApp()\n const { setPayload } = useQueryListStore()\n const create = useCreateRole()\n const t = useTranslation()\n\n const onConfirm = async (values: { name: string; permissions: RoleV1['permissions'] | RoleV2['permissions'] }) => {\n await create.trigger({\n name: `role_${values.name}`,\n permissions: values.permissions,\n })\n setPayload(action, { page: 1 })\n message.success(t('RoleList.createSuccessfully'))\n }\n\n return useFormModal<{\n name: string\n permissions: RoleV1['permissions'] | RoleV2['permissions']\n }>({\n title: t('RoleList.createTitle'),\n width: '50vw',\n formProps: {\n layout: 'vertical',\n },\n content: (\n <>\n <Form.Item label={t('global.name')} name=\"name\" rules={[{ required: true }]}>\n <Input addonBefore=\"role_\" />\n </Form.Item>\n <Form.Item name=\"permissions\">\n <PermissionList />\n </Form.Item>\n </>\n ),\n onConfirm,\n })\n}\n\nconst useUpdateModal = () => {\n const { message } = App.useApp()\n const { mutate } = useQueryListStore()\n const update = useUpdateRole()\n const t = useTranslation()\n\n return useFormModal<\n {\n name: string\n permissions: RoleV1['permissions'] | RoleV2['permissions']\n },\n {\n id: number\n }\n >({\n title: t('RoleList.updateTitle'),\n width: '50vw',\n content: (\n <>\n <Form.Item label={t('global.name')} name=\"name\" rules={[{ required: true }]}>\n <Input readOnly addonBefore=\"role_\" />\n </Form.Item>\n <Form.Item name=\"permissions\">\n <PermissionList />\n </Form.Item>\n </>\n ),\n onConfirm: async (values, extraValues) => {\n await update.trigger({\n id: extraValues?.id as number,\n name: `role_${values.name}`,\n permissions: values.permissions,\n })\n mutate(\n action,\n prev =>\n produce(prev, draft => {\n const match = draft?.dataSource?.find(item => item.id === extraValues?.id)\n\n if (match) {\n match.permissions = values.permissions\n }\n }),\n { revalidate: false },\n )\n message.success(t('RoleList.updateSuccessfully'))\n },\n })\n}\n\nconst RoleList = () => {\n const { accessible: viewable } = usePermission('200005', true)\n const { modal, message } = App.useApp()\n const { usePermissionApiV2 } = useToolkitsContext()\n const remove = useRemoveRole()\n const { mutate } = useQueryListStore()\n const { show: showCreateModal, modal: createModal } = useCreateModal()\n const { show: showUpdateModal, modal: updateModal } = useUpdateModal()\n const t = useTranslation()\n\n const columns: TableColumnsType<RoleListItem> = [\n {\n title: t('global.name'),\n key: 'name',\n render(value: RoleListItem) {\n if (viewable) {\n return (\n <Link to={`${value.name}`} relative=\"path\">\n {value.name}\n </Link>\n )\n } else {\n return <>{value.name}</>\n }\n },\n },\n {\n title: 'ID',\n dataIndex: 'id',\n key: 'id',\n },\n {\n title: t('global.creationTime'),\n dataIndex: 'ctime',\n key: 'ctime',\n },\n {\n title: t('global.operation'),\n width: 150,\n align: 'center',\n render: (value: RoleListItem) => {\n return (\n <Space size=\"small\">\n <PermissionButton\n isGlobal\n code=\"200003\"\n size=\"small\"\n type=\"link\"\n onClick={async () => {\n const { data: role } = await request<RoleV1 | RoleV2>(\n `/api/usystem/role/info${usePermissionApiV2 ? 'V2' : ''}?name=${value.name}`,\n { isGlobal: true },\n )\n showUpdateModal({\n initialValues: {\n permissions: role?.permissions,\n name: role?.name.replace(/^role_/, ''),\n },\n extraValues: {\n id: role?.id,\n },\n })\n }}\n >\n {t('global.edit')}\n </PermissionButton>\n <PermissionButton\n isGlobal\n danger\n code=\"200004\"\n size=\"small\"\n type=\"link\"\n onClick={() => {\n modal.confirm({\n title: t('RoleList.deleteTitle'),\n content: (\n <Highlight texts={[value.name]}>{t('RoleList.deleteContent', { role: value.name })}</Highlight>\n ),\n async onOk() {\n await remove.trigger({\n id: value.id,\n name: value.name,\n })\n mutate(action, prev => {\n return produce(prev, draft => {\n const index = draft?.dataSource?.findIndex(item => item.id === value.id)\n if (index) {\n draft?.dataSource?.splice(index, 1)\n }\n })\n })\n message.success(t('RoleList.deleteSuccessfully'))\n },\n })\n }}\n >\n {t('global.delete')}\n </PermissionButton>\n </Space>\n )\n },\n },\n ]\n\n return (\n <>\n <Card\n title={t('global.role')}\n extra={\n <PermissionButton\n isGlobal\n type=\"primary\"\n code=\"200002\"\n icon={<UsergroupAddOutlined />}\n onClick={() => {\n showCreateModal()\n }}\n >\n {t('RoleList.createTitle')}\n </PermissionButton>\n }\n >\n <QueryList<RoleListItem, undefined, { List: RoleListItem[]; Total: number }>\n isGlobal\n rowKey=\"name\"\n columns={columns}\n code=\"200001\"\n action={action}\n getTotal={response => response.Total}\n getDataSource={response => response.List}\n />\n </Card>\n {createModal}\n {updateModal}\n </>\n )\n}\n\nexport default RoleList\n"],"names":["UsergroupAddOutlined","UsergroupAddOutlinedSvg","props","ref","React","AntdIcon","_extends","UsergroupAddOutlined$1","action","useCreateModal","message","App","setPayload","useQueryListStore","create","useCreateRole","t","useTranslation","onConfirm","values","useFormModal","jsxs","Fragment","jsx","Form","Input","PermissionList","useUpdateModal","mutate","update","useUpdateRole","extraValues","prev","produce","draft","match","_a","item","RoleList","viewable","usePermission","modal","usePermissionApiV2","useToolkitsContext","remove","useRemoveRole","showCreateModal","createModal","showUpdateModal","updateModal","columns","value","Link","Space","PermissionButton","role","request","Highlight","index","_b","Card","QueryList","response"],"mappings":";;;;;;;;AACA,IAAIA,IAAuB,EAAE,MAAQ,EAAE,KAAO,OAAO,OAAS,EAAE,SAAW,iBAAiB,WAAa,QAAS,GAAE,UAAY,CAAC,EAAE,KAAO,QAAQ,OAAS,EAAE,GAAK,4wCAA2wC,GAAI,EAAC,GAAI,M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A;AAAA,QACC,OAAO,EAAE,aAAa;AAAA,QACtB,OACErC,gBAAAA,EAAA;AAAA,UAAC+B;AAAA,UAAA;AAAA,YACC,UAAQ;AAAA,YACR,MAAK;AAAA,YACL,MAAK;AAAA,YACL,4BAAOtD,GAAqB,EAAA;AAAA,YAC5B,SAAS,MAAM;AACG,cAAA8C;YAClB;AAAA,YAEC,YAAE,sBAAsB;AAAA,UAAA;AAAA,QAC3B;AAAA,QAGF,UAAAvB,gBAAAA,EAAA;AAAA,UAACsC;AAAA,UAAA;AAAA,YACC,UAAQ;AAAA,YACR,QAAO;AAAA,YACP,SAAAX;AAAA,YACA,MAAK;AAAA,YACL,QAAA1C;AAAA,YACA,UAAU,OAAYsD,EAAS;AAAA,YAC/B,eAAe,OAAYA,EAAS;AAAA,UAAA;AAAA,QACtC;AAAA,MAAA;AAAA,IACF;AAAA,IACCf;AAAA,IACAE;AAAA,EACH,EAAA,CAAA;AAEJ;","x_google_ignoreList":[0,1]}
@@ -1,213 +0,0 @@
1
- import { I as W, w as x, e as h, f as z, s as K, m as G, g as P, U as R, h as v, d as S, r as n, c as L } from "./index-eKHR8-cg.chunk.js";
2
- import N, { useRef as o, useCallback as M, useState as $ } from "react";
3
- const U = W ? (e) => {
4
- e();
5
- } : N.startTransition, j = (e) => {
6
- const [, t] = $({}), r = o(!1), i = o(e), d = o({
7
- data: !1,
8
- error: !1,
9
- isValidating: !1
10
- }), m = M((c) => {
11
- let a = !1;
12
- const g = i.current;
13
- for (const p in c) {
14
- const s = p;
15
- g[s] !== c[s] && (g[s] = c[s], d.current[s] && (a = !0));
16
- }
17
- a && !r.current && t({});
18
- }, []);
19
- return v(() => (r.current = !1, () => {
20
- r.current = !0;
21
- })), [
22
- i,
23
- d.current,
24
- m
25
- ];
26
- }, q = () => (e, t, r = {}) => {
27
- const { mutate: i } = z(), d = o(e), m = o(t), c = o(r), a = o(0), [g, p, s] = j({
28
- data: R,
29
- error: R,
30
- isMutating: !1
31
- }), b = g.current, D = M(
32
- async (k, I) => {
33
- const [y, O] = K(d.current);
34
- if (!m.current)
35
- throw new Error("Can’t trigger the mutation: missing fetcher.");
36
- if (!y)
37
- throw new Error("Can’t trigger the mutation: missing key.");
38
- const l = G(G({
39
- populateCache: !1,
40
- throwOnError: !0
41
- }, c.current), I), w = P();
42
- a.current = w, s({
43
- isMutating: !0
44
- });
45
- try {
46
- const u = await i(
47
- y,
48
- m.current(O, {
49
- arg: k
50
- }),
51
- // We must throw the error here so we can catch and update the states.
52
- G(l, {
53
- throwOnError: !0
54
- })
55
- );
56
- if (a.current <= w) {
57
- var C, E;
58
- U(() => s({
59
- data: u,
60
- isMutating: !1,
61
- error: void 0
62
- })), (C = (E = l).onSuccess) == null || C.call(E, u, y, l);
63
- }
64
- return u;
65
- } catch (u) {
66
- if (a.current <= w) {
67
- var A, V;
68
- if (U(() => s({
69
- error: u,
70
- isMutating: !1
71
- })), (A = (V = l).onError) == null || A.call(V, u, y, l), l.throwOnError)
72
- throw u;
73
- }
74
- }
75
- },
76
- // eslint-disable-next-line react-hooks/exhaustive-deps
77
- []
78
- ), T = M(() => {
79
- a.current = P(), s({
80
- data: R,
81
- error: R,
82
- isMutating: !1
83
- });
84
- }, []);
85
- return v(() => {
86
- d.current = e, m.current = t, c.current = r;
87
- }), {
88
- trigger: D,
89
- reset: T,
90
- get data() {
91
- return p.data = !0, b.data;
92
- },
93
- get error() {
94
- return p.error = !0, b.error;
95
- },
96
- get isMutating() {
97
- return p.isMutating = !0, b.isMutating;
98
- }
99
- };
100
- }, f = x(h, q);
101
- function B() {
102
- return h(
103
- "/api/usystem/user/allPermssions",
104
- (e) => n(e, { isGlobal: !0 }).then((t) => t.data)
105
- );
106
- }
107
- function H() {
108
- return h(
109
- "/api/usystem/user/allPermissionsV2",
110
- (e) => n(e, { isGlobal: !0 }).then((t) => t.data)
111
- );
112
- }
113
- function J() {
114
- const { accessible: e } = L("200005", !0);
115
- return h(
116
- e ? "/api/usystem/role/all" : null,
117
- (t) => n(t, { isGlobal: !0 }).then((r) => r.data)
118
- );
119
- }
120
- function Q(e) {
121
- const { usePermissionApiV2: t } = S();
122
- return h(
123
- `/api/usystem/role/${t ? "infoV2" : "info"}?name=${e}`,
124
- (r) => n(r, { isGlobal: !0 }).then((i) => i.data)
125
- );
126
- }
127
- function X() {
128
- const { usePermissionApiV2: e } = S();
129
- return f(
130
- e ? "/api/usystem/role/createV2" : "/api/usystem/role/create",
131
- (t, {
132
- arg: r
133
- }) => n(t, {
134
- method: "post",
135
- body: r,
136
- isGlobal: !0
137
- })
138
- );
139
- }
140
- function Z() {
141
- const { usePermissionApiV2: e } = S();
142
- return f(
143
- e ? "/api/usystem/role/updateV2" : "/api/usystem/role/update",
144
- (t, {
145
- arg: r
146
- }) => n(t, {
147
- method: "post",
148
- body: r,
149
- isGlobal: !0
150
- })
151
- );
152
- }
153
- function _() {
154
- return f(
155
- "/api/usystem/role/delete",
156
- (e, {
157
- arg: t
158
- }) => n(e, {
159
- method: "post",
160
- body: t,
161
- isGlobal: !0
162
- })
163
- );
164
- }
165
- function ee() {
166
- return f(
167
- "/api/usystem/user/create",
168
- (e, {
169
- arg: t
170
- }) => n(e, {
171
- method: "post",
172
- body: t,
173
- isGlobal: !0
174
- })
175
- );
176
- }
177
- function te() {
178
- return f(
179
- "/api/usystem/user/update",
180
- (e, {
181
- arg: t
182
- }) => n(e, {
183
- method: "post",
184
- body: t,
185
- isGlobal: !0
186
- })
187
- );
188
- }
189
- function re() {
190
- return f(
191
- "/api/usystem/user/delete",
192
- (e, {
193
- arg: t
194
- }) => n(e, {
195
- method: "post",
196
- body: t,
197
- isGlobal: !0
198
- })
199
- );
200
- }
201
- export {
202
- ee as a,
203
- J as b,
204
- te as c,
205
- _ as d,
206
- X as e,
207
- Z as f,
208
- Q as g,
209
- B as h,
210
- H as i,
211
- re as u
212
- };
213
- //# sourceMappingURL=index-bJfFm7t0.chunk.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-bJfFm7t0.chunk.js","sources":["../../../node_modules/.pnpm/swr@2.2.4_react@18.2.0/node_modules/swr/mutation/dist/index.mjs","../src/features/permission/hooks/index.ts"],"sourcesContent":["import React, { useState, useRef, useCallback } from 'react';\nimport useSWR, { useSWRConfig } from 'swr';\nimport { IS_REACT_LEGACY, useIsomorphicLayoutEffect, withMiddleware, serialize, mergeObjects, getTimestamp, UNDEFINED } from 'swr/_internal';\n\nconst startTransition = IS_REACT_LEGACY ? (cb)=>{\n cb();\n} : React.startTransition;\n/**\n * An implementation of state with dependency-tracking.\n */ const useStateWithDeps = (state)=>{\n const [, rerender] = useState({});\n const unmountedRef = useRef(false);\n const stateRef = useRef(state);\n // If a state property (data, error, or isValidating) is accessed by the render\n // function, we mark the property as a dependency so if it is updated again\n // in the future, we trigger a rerender.\n // This is also known as dependency-tracking.\n const stateDependenciesRef = useRef({\n data: false,\n error: false,\n isValidating: false\n });\n /**\n * @param payload To change stateRef, pass the values explicitly to setState:\n * @example\n * ```js\n * setState({\n * isValidating: false\n * data: newData // set data to newData\n * error: undefined // set error to undefined\n * })\n *\n * setState({\n * isValidating: false\n * data: undefined // set data to undefined\n * error: err // set error to err\n * })\n * ```\n */ const setState = useCallback((payload)=>{\n let shouldRerender = false;\n const currentState = stateRef.current;\n for(const _ in payload){\n const k = _;\n // If the property has changed, update the state and mark rerender as\n // needed.\n if (currentState[k] !== payload[k]) {\n currentState[k] = payload[k];\n // If the property is accessed by the component, a rerender should be\n // triggered.\n if (stateDependenciesRef.current[k]) {\n shouldRerender = true;\n }\n }\n }\n if (shouldRerender && !unmountedRef.current) {\n rerender({});\n }\n }, []);\n useIsomorphicLayoutEffect(()=>{\n unmountedRef.current = false;\n return ()=>{\n unmountedRef.current = true;\n };\n });\n return [\n stateRef,\n stateDependenciesRef.current,\n setState\n ];\n};\n\nconst mutation = ()=>(key, fetcher, config = {})=>{\n const { mutate } = useSWRConfig();\n const keyRef = useRef(key);\n const fetcherRef = useRef(fetcher);\n const configRef = useRef(config);\n // Ditch all mutation results that happened earlier than this timestamp.\n const ditchMutationsUntilRef = useRef(0);\n const [stateRef, stateDependencies, setState] = useStateWithDeps({\n data: UNDEFINED,\n error: UNDEFINED,\n isMutating: false\n });\n const currentState = stateRef.current;\n const trigger = useCallback(async (arg, opts)=>{\n const [serializedKey, resolvedKey] = serialize(keyRef.current);\n if (!fetcherRef.current) {\n throw new Error('Can’t trigger the mutation: missing fetcher.');\n }\n if (!serializedKey) {\n throw new Error('Can’t trigger the mutation: missing key.');\n }\n // Disable cache population by default.\n const options = mergeObjects(mergeObjects({\n populateCache: false,\n throwOnError: true\n }, configRef.current), opts);\n // Trigger a mutation, and also track the timestamp. Any mutation that happened\n // earlier this timestamp should be ignored.\n const mutationStartedAt = getTimestamp();\n ditchMutationsUntilRef.current = mutationStartedAt;\n setState({\n isMutating: true\n });\n try {\n const data = await mutate(serializedKey, fetcherRef.current(resolvedKey, {\n arg\n }), // We must throw the error here so we can catch and update the states.\n mergeObjects(options, {\n throwOnError: true\n }));\n // If it's reset after the mutation, we don't broadcast any state change.\n if (ditchMutationsUntilRef.current <= mutationStartedAt) {\n var _options_onSuccess, _options;\n startTransition(()=>setState({\n data,\n isMutating: false,\n error: undefined\n }));\n (_options_onSuccess = (_options = options).onSuccess) == null ? void 0 : _options_onSuccess.call(_options, data, serializedKey, options);\n }\n return data;\n } catch (error) {\n // If it's reset after the mutation, we don't broadcast any state change\n // or throw because it's discarded.\n if (ditchMutationsUntilRef.current <= mutationStartedAt) {\n var _options_onError, _options1;\n startTransition(()=>setState({\n error: error,\n isMutating: false\n }));\n (_options_onError = (_options1 = options).onError) == null ? void 0 : _options_onError.call(_options1, error, serializedKey, options);\n if (options.throwOnError) {\n throw error;\n }\n }\n }\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n []);\n const reset = useCallback(()=>{\n ditchMutationsUntilRef.current = getTimestamp();\n setState({\n data: UNDEFINED,\n error: UNDEFINED,\n isMutating: false\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n useIsomorphicLayoutEffect(()=>{\n keyRef.current = key;\n fetcherRef.current = fetcher;\n configRef.current = config;\n });\n // We don't return `mutate` here as it can be pretty confusing (e.g. people\n // calling `mutate` but they actually mean `trigger`).\n // And also, `mutate` relies on the useSWR hook to exist too.\n return {\n trigger,\n reset,\n get data () {\n stateDependencies.data = true;\n return currentState.data;\n },\n get error () {\n stateDependencies.error = true;\n return currentState.error;\n },\n get isMutating () {\n stateDependencies.isMutating = true;\n return currentState.isMutating;\n }\n };\n };\n/**\n * A hook to define and manually trigger remote mutations like POST, PUT, DELETE and PATCH use cases.\n *\n * @link https://swr.vercel.app/docs/mutation\n * @example\n * ```jsx\n * import useSWRMutation from 'swr/mutation'\n *\n * const {\n * data,\n * error,\n * trigger,\n * reset,\n * isMutating\n * } = useSWRMutation(key, fetcher, options?)\n * ```\n */ const useSWRMutation = withMiddleware(useSWR, mutation);\n\nexport { useSWRMutation as default };\n","import useSWR from 'swr'\nimport useSWRMutation from 'swr/mutation'\nimport { useToolkitsContext } from '../../../components/ContextProvider'\nimport type { Game } from '../../../components/GameSelect'\nimport { usePermission } from '../../../hooks/permission'\nimport { request } from '../../../utils/request'\nimport type { PermissionEnumItem, RoleEnumItem, RoleV1, RoleV2 } from '../types'\n\nexport function useAllPermissions() {\n return useSWR('/api/usystem/user/allPermssions', url =>\n request<PermissionEnumItem[]>(url, { isGlobal: true }).then(response => response.data),\n )\n}\n\nexport function useAllPermissionsV2() {\n return useSWR('/api/usystem/user/allPermissionsV2', url =>\n request<{\n game: Game[]\n permission: PermissionEnumItem[]\n }>(url, { isGlobal: true }).then(response => response.data),\n )\n}\n\nexport function useAllRoles() {\n const { accessible } = usePermission('200005', true)\n return useSWR(accessible ? '/api/usystem/role/all' : null, url =>\n request<RoleEnumItem[]>(url, { isGlobal: true }).then(response => response.data),\n )\n}\n\nexport function useRole(name: string) {\n const { usePermissionApiV2 } = useToolkitsContext()\n return useSWR(`/api/usystem/role/${usePermissionApiV2 ? 'infoV2' : 'info'}?name=${name}`, (url: string) =>\n request<RoleV1 | RoleV2>(url, { isGlobal: true }).then(response => response.data),\n )\n}\n\nexport function useCreateRole() {\n const { usePermissionApiV2 } = useToolkitsContext()\n\n return useSWRMutation(\n usePermissionApiV2 ? '/api/usystem/role/createV2' : '/api/usystem/role/create',\n (\n url: string,\n {\n arg,\n }: {\n arg: { name: string; permissions: RoleV1['permissions'] | RoleV2['permissions'] }\n },\n ) =>\n request(url, {\n method: 'post',\n body: arg,\n isGlobal: true,\n }),\n )\n}\n\nexport function useUpdateRole() {\n const { usePermissionApiV2 } = useToolkitsContext()\n\n return useSWRMutation(\n usePermissionApiV2 ? '/api/usystem/role/updateV2' : '/api/usystem/role/update',\n (\n url: string,\n {\n arg,\n }: {\n arg: { id: number; name: string; permissions: RoleV1['permissions'] | RoleV2['permissions'] }\n },\n ) =>\n request(url, {\n method: 'post',\n body: arg,\n isGlobal: true,\n }),\n )\n}\n\nexport function useRemoveRole() {\n return useSWRMutation(\n '/api/usystem/role/delete',\n (\n url,\n {\n arg,\n }: {\n arg: { id: number; name: string }\n },\n ) =>\n request(url, {\n method: 'post',\n body: arg,\n isGlobal: true,\n }),\n )\n}\n\nexport function useCreateUser() {\n return useSWRMutation(\n '/api/usystem/user/create',\n (\n url,\n {\n arg,\n }: {\n arg: { name: string; roles: string[] }\n },\n ) =>\n request(url, {\n method: 'post',\n body: arg,\n isGlobal: true,\n }),\n )\n}\n\nexport function useUpdateUser() {\n return useSWRMutation(\n '/api/usystem/user/update',\n (\n url,\n {\n arg,\n }: {\n arg: { id: string; name: string; roles: string[] }\n },\n ) =>\n request(url, {\n method: 'post',\n body: arg,\n isGlobal: true,\n }),\n )\n}\n\nexport function useRemoveUser() {\n return useSWRMutation(\n '/api/usystem/user/delete',\n (\n url,\n {\n arg,\n }: {\n arg: { id: string; name: string }\n },\n ) =>\n request(url, {\n method: 'post',\n body: arg,\n isGlobal: true,\n }),\n )\n}\n"],"names":["startTransition","IS_REACT_LEGACY","cb","React","useStateWithDeps","state","rerender","useState","unmountedRef","useRef","stateRef","stateDependenciesRef","setState","useCallback","payload","shouldRerender","currentState","_","k","useIsomorphicLayoutEffect","mutation","key","fetcher","config","mutate","useSWRConfig","keyRef","fetcherRef","configRef","ditchMutationsUntilRef","stateDependencies","UNDEFINED","trigger","arg","opts","serializedKey","resolvedKey","serialize","options","mergeObjects","mutationStartedAt","getTimestamp","data","_options_onSuccess","_options","error","_options_onError","_options1","reset","useSWRMutation","withMiddleware","useSWR","useAllPermissions","url","request","response","useAllPermissionsV2","useAllRoles","accessible","usePermission","useRole","name","usePermissionApiV2","useToolkitsContext","useCreateRole","useUpdateRole","useRemoveRole","useCreateUser","useUpdateUser","useRemoveUser"],"mappings":";;AAIA,MAAMA,IAAkBC,IAAkB,CAACC,MAAK;AAC5C,EAAAA;AACJ,IAAIC,EAAM,iBAGAC,IAAmB,CAACC,MAAQ;AAClC,QAAM,GAAGC,CAAQ,IAAIC,EAAS,CAAE,CAAA,GAC1BC,IAAeC,EAAO,EAAK,GAC3BC,IAAWD,EAAOJ,CAAK,GAKvBM,IAAuBF,EAAO;AAAA,IAChC,MAAM;AAAA,IACN,OAAO;AAAA,IACP,cAAc;AAAA,EACtB,CAAK,GAiBOG,IAAWC,EAAY,CAACC,MAAU;AACtC,QAAIC,IAAiB;AACrB,UAAMC,IAAeN,EAAS;AAC9B,eAAUO,KAAKH,GAAQ;AACnB,YAAMI,IAAID;AAGV,MAAID,EAAaE,CAAC,MAAMJ,EAAQI,CAAC,MAC7BF,EAAaE,CAAC,IAAIJ,EAAQI,CAAC,GAGvBP,EAAqB,QAAQO,CAAC,MAC9BH,IAAiB;AAAA,IAG5B;AACD,IAAIA,KAAkB,CAACP,EAAa,WAChCF,EAAS,CAAE,CAAA;AAAA,EAElB,GAAE,CAAE,CAAA;AACL,SAAAa,EAA0B,OACtBX,EAAa,UAAU,IAChB,MAAI;AACP,IAAAA,EAAa,UAAU;AAAA,EACnC,EACK,GACM;AAAA,IACHE;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;AAAA,IAAA,MAKFqB,EAAQD,GAAK;AAAA,MACX,QAAQ;AAAA,MACR,MAAMpB;AAAA,MACN,UAAU;AAAA,IAAA,CACX;AAAA,EAAA;AAEP;AAEO,SAASkC,KAAgB;AACvB,SAAAlB;AAAA,IACL;AAAA,IACA,CACEI,GACA;AAAA,MACE,KAAApB;AAAA,IAAA,MAKFqB,EAAQD,GAAK;AAAA,MACX,QAAQ;AAAA,MACR,MAAMpB;AAAA,MACN,UAAU;AAAA,IAAA,CACX;AAAA,EAAA;AAEP;AAEO,SAASmC,KAAgB;AACvB,SAAAnB;AAAA,IACL;AAAA,IACA,CACEI,GACA;AAAA,MACE,KAAApB;AAAA,IAAA,MAKFqB,EAAQD,GAAK;AAAA,MACX,QAAQ;AAAA,MACR,MAAMpB;AAAA,MACN,UAAU;AAAA,IAAA,CACX;AAAA,EAAA;AAEP;AAEO,SAASoC,KAAgB;AACvB,SAAApB;AAAA,IACL;AAAA,IACA,CACEI,GACA;AAAA,MACE,KAAApB;AAAA,IAAA,MAKFqB,EAAQD,GAAK;AAAA,MACX,QAAQ;AAAA,MACR,MAAMpB;AAAA,MACN,UAAU;AAAA,IAAA,CACX;AAAA,EAAA;AAEP;","x_google_ignoreList":[0]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-teS68i3t.chunk.js","sources":["../../../node_modules/.pnpm/@ant-design+icons-svg@4.3.2/node_modules/@ant-design/icons-svg/es/asn/UserAddOutlined.js","../../../node_modules/.pnpm/@ant-design+icons@5.2.6_react-dom@18.2.0_react@18.2.0/node_modules/@ant-design/icons/es/icons/UserAddOutlined.js","../src/pages/permission/UserList/index.tsx"],"sourcesContent":["// This icon file is generated automatically.\nvar UserAddOutlined = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"64 64 896 896\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M678.3 642.4c24.2-13 51.9-20.4 81.4-20.4h.1c3 0 4.4-3.6 2.2-5.6a371.67 371.67 0 00-103.7-65.8c-.4-.2-.8-.3-1.2-.5C719.2 505 759.6 431.7 759.6 349c0-137-110.8-248-247.5-248S264.7 212 264.7 349c0 82.7 40.4 156 102.6 201.1-.4.2-.8.3-1.2.5-44.7 18.9-84.8 46-119.3 80.6a373.42 373.42 0 00-80.4 119.5A373.6 373.6 0 00137 888.8a8 8 0 008 8.2h59.9c4.3 0 7.9-3.5 8-7.8 2-77.2 32.9-149.5 87.6-204.3C357 628.2 432.2 597 512.2 597c56.7 0 111.1 15.7 158 45.1a8.1 8.1 0 008.1.3zM512.2 521c-45.8 0-88.9-17.9-121.4-50.4A171.2 171.2 0 01340.5 349c0-45.9 17.9-89.1 50.3-121.6S466.3 177 512.2 177s88.9 17.9 121.4 50.4A171.2 171.2 0 01683.9 349c0 45.9-17.9 89.1-50.3 121.6C601.1 503.1 558 521 512.2 521zM880 759h-84v-84c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v84h-84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h84v84c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-84h84c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z\" } }] }, \"name\": \"user-add\", \"theme\": \"outlined\" };\nexport default UserAddOutlined;\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\n\nimport * as React from 'react';\nimport UserAddOutlinedSvg from \"@ant-design/icons-svg/es/asn/UserAddOutlined\";\nimport AntdIcon from \"../components/AntdIcon\";\nvar UserAddOutlined = function UserAddOutlined(props, ref) {\n return /*#__PURE__*/React.createElement(AntdIcon, _extends({}, props, {\n ref: ref,\n icon: UserAddOutlinedSvg\n }));\n};\nif (process.env.NODE_ENV !== 'production') {\n UserAddOutlined.displayName = 'UserAddOutlined';\n}\nexport default /*#__PURE__*/React.forwardRef(UserAddOutlined);","import { UserAddOutlined } from '@ant-design/icons'\nimport type { TableColumnsType } from 'antd'\nimport { App, Card, Col, Form, Input, Row, Select, Space, Tag } from 'antd'\nimport { produce } from 'immer'\nimport type { FC } from 'react'\nimport { Link } from 'react-router-dom'\nimport Highlight from '../../../components/Highlight'\nimport PermissionButton from '../../../components/PermissionButton'\nimport QueryList from '../../../components/QueryList'\nimport type { UserListItem } from '../../../features/permission'\nimport { useAllRoles, useCreateUser, useRemoveUser, useUpdateUser } from '../../../features/permission'\nimport { useFormModal } from '../../../hooks/formModal'\nimport { useTranslation } from '../../../hooks/i18n'\nimport { useQueryListStore } from '../../../stores/queryList'\n\nconst { Option } = Select\n\nexport const action = '/api/usystem/user/list'\n\nfunction useCreateModal() {\n const { message } = App.useApp()\n const create = useCreateUser()\n const { data: roles, isLoading } = useAllRoles()\n const { setPayload } = useQueryListStore()\n const t = useTranslation()\n\n return useFormModal<{ id: string; name: string; roles: string[] }>({\n title: t('UserList.createTitle'),\n formProps: {\n labelCol: { flex: '80px' },\n },\n content: (\n <>\n <Form.Item label={t('global.name')} name=\"name\" rules={[{ required: true }]}>\n <Input />\n </Form.Item>\n <Form.Item label={t('global.role')} name=\"roles\">\n <Select allowClear mode=\"multiple\" loading={isLoading}>\n {(roles ?? []).map(role => (\n <Option value={role.name} key={role.id}>\n {role.name}\n </Option>\n ))}\n </Select>\n </Form.Item>\n </>\n ),\n async onConfirm(values) {\n await create.trigger(values)\n setPayload(action, { page: 1 })\n message.success(t('UserList.createSuccessfully'))\n },\n })\n}\n\nfunction useUpdateUserModal() {\n const { message } = App.useApp()\n const update = useUpdateUser()\n const { data: roles, isLoading } = useAllRoles()\n const { mutate } = useQueryListStore()\n const t = useTranslation()\n\n return useFormModal<{ id: string; name: string; roles: string[] }, { id: string }>({\n title: t('UserList.updateTitle'),\n formProps: {\n labelCol: { flex: '80px' },\n },\n content: (\n <>\n <Form.Item label={t('global.name')} name=\"name\" rules={[{ required: true }]}>\n <Input readOnly />\n </Form.Item>\n <Form.Item label={t('global.role')} name=\"roles\">\n <Select\n allowClear\n mode=\"multiple\"\n loading={isLoading}\n options={roles?.map(role => ({\n label: role.name,\n value: role.name,\n }))}\n />\n </Form.Item>\n </>\n ),\n async onConfirm(values, extraValues) {\n await update.trigger(values)\n mutate<UserListItem>(\n action,\n prev => {\n return produce(prev, draft => {\n if (draft?.dataSource) {\n const index = draft.dataSource?.findIndex(item => item.id === extraValues?.id)\n if (index !== -1) {\n draft.dataSource[index].roles = values.roles\n }\n }\n })\n },\n { revalidate: false },\n )\n message.success(t('UserList.updateSuccessfully'))\n },\n })\n}\n\nconst UserList: FC = () => {\n const { modal, message } = App.useApp()\n const remove = useRemoveUser()\n const { mutate } = useQueryListStore()\n const { show: showCreateModal, modal: createModal } = useCreateModal()\n const { show: showUpdateModal, modal: updateModal } = useUpdateUserModal()\n const t = useTranslation()\n\n const columns: TableColumnsType<UserListItem> = [\n {\n title: t('global.name'),\n dataIndex: 'name',\n key: 'name',\n },\n {\n title: 'ID',\n dataIndex: 'id',\n key: 'id',\n },\n {\n title: t('global.role'),\n dataIndex: 'roles',\n key: 'roles',\n width: '40%',\n render(value: string[]) {\n return (\n <Row gutter={[4, 4]}>\n {(value || []).map((item: string) => (\n <Col key={item}>\n {item === 'root' ? (\n <Tag color=\"#f50\">{item}</Tag>\n ) : (\n <Tag color=\"#ff5a00\">\n <Link to={`/permission/role/${item}`}>{item}</Link>\n </Tag>\n )}\n </Col>\n ))}\n </Row>\n )\n },\n },\n {\n title: t('global.creationTime'),\n dataIndex: 'Ctime',\n key: 'ctime',\n },\n {\n title: t('global.operation'),\n width: 150,\n align: 'center',\n render: (value: UserListItem) => (\n <Space>\n <PermissionButton\n isGlobal\n size=\"small\"\n type=\"link\"\n code=\"100003\"\n onClick={() => {\n showUpdateModal({\n initialValues: {\n name: value.name,\n roles: value.roles,\n },\n extraValues: {\n id: value.id,\n },\n })\n }}\n >\n {t('global.update')}\n </PermissionButton>\n <PermissionButton\n isGlobal\n danger\n size=\"small\"\n code=\"100004\"\n type=\"link\"\n onClick={() => {\n modal.confirm({\n title: t('UserList.deleteTitle'),\n content: (\n <Highlight texts={[value.name]}>{t('UserList.deleteContent', { user: value.name })}</Highlight>\n ),\n async onOk() {\n await remove.trigger({\n id: value.id,\n name: value.name,\n })\n mutate(action, prev => {\n return produce(prev, draft => {\n const index = draft?.dataSource?.findIndex(item => item.id === value.id)\n if (index) {\n draft?.dataSource?.splice(index, 1)\n }\n })\n })\n message.success(t('UserList.deleteSuccessfully'))\n },\n })\n }}\n >\n {t('global.delete')}\n </PermissionButton>\n </Space>\n ),\n },\n ]\n\n return (\n <>\n <Card\n title={t('global.user')}\n extra={\n <PermissionButton\n isGlobal\n type=\"primary\"\n icon={<UserAddOutlined />}\n code=\"100002\"\n onClick={() => {\n showCreateModal()\n }}\n >\n {t('UserList.createTitle')}\n </PermissionButton>\n }\n >\n <QueryList<UserListItem, undefined, { List: UserListItem[]; Total: number }>\n isGlobal\n code=\"100001\"\n action={action}\n rowKey=\"id\"\n columns={columns}\n getTotal={response => response.Total}\n getDataSource={response => response.List}\n />\n </Card>\n {createModal}\n {updateModal}\n </>\n )\n}\n\nexport default UserList\n"],"names":["UserAddOutlined","UserAddOutlinedSvg","props","ref","React","AntdIcon","_extends","UserAddOutlined$1","Option","Select","action","useCreateModal","message","App","create","useCreateUser","roles","isLoading","useAllRoles","setPayload","useQueryListStore","t","useTranslation","useFormModal","jsxs","Fragment","jsx","Form","Input","role","values","useUpdateUserModal","update","useUpdateUser","mutate","extraValues","prev","produce","draft","index","_a","item","UserList","modal","remove","useRemoveUser","showCreateModal","createModal","showUpdateModal","updateModal","columns","value","Row","Col","Tag","Link","Space","PermissionButton","Highlight","_b","Card","QueryList","response"],"mappings":";;;;;;;AACA,IAAIA,IAAkB,EAAE,MAAQ,EAAE,KAAO,OAAO,OAAS,EAAE,SAAW,iBAAiB,WAAa,QAAS,GAAE,UAAY,CAAC,EAAE,KAAO,QAAQ,OAAS,EAAE,GAAK,m2BAAk2B,GAAI,EAAC,GAAI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