@tager/admin-administrators 1.0.1 → 1.0.2
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/dev/App.vue.d.ts +4 -3
- package/dist/index.mjs +560 -634
- package/dist/services/requests.d.ts +8 -8
- package/dist/style.css +1 -1
- package/dist/typings/model.d.ts +5 -5
- package/dist/views/AdminForm/AdminForm.helpers.d.ts +6 -6
- package/dist/views/AdminForm/AdminForm.vue.d.ts +1847 -372
- package/dist/views/AdminList/AdminList.vue.d.ts +5 -4
- package/dist/views/RoleForm/RoleForm.helpers.d.ts +5 -5
- package/dist/views/RoleForm/RoleForm.vue.d.ts +6 -5
- package/dist/views/RoleList/RoleList.vue.d.ts +7 -7
- package/package.json +20 -24
- package/src/dev/App.vue +2 -3
- package/src/dev/env.ts +11 -11
- package/src/services/requests.ts +5 -5
- package/src/typings/model.ts +1 -1
- package/src/views/AdminForm/AdminForm.helpers.ts +6 -6
- package/src/views/AdminForm/AdminForm.vue +11 -11
- package/src/views/AdminList/AdminList.vue +4 -4
- package/src/views/RoleForm/RoleForm.helpers.ts +5 -5
- package/src/views/RoleForm/RoleForm.vue +7 -10
- package/src/views/RoleList/RoleList.vue +2 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ResponseBody } from '@tager/admin-services';
|
|
2
|
-
import { FieldConfigUnion, FieldShortType, OutgoingValueUnion } from '@tager/admin-dynamic-field';
|
|
3
|
-
import { AdminType, RoleType, ScopeGroupsData } from '../typings/model';
|
|
4
|
-
|
|
1
|
+
import { type ResponseBody } from '@tager/admin-services';
|
|
2
|
+
import { type FieldConfigUnion, type FieldShortType, type OutgoingValueUnion } from '@tager/admin-dynamic-field';
|
|
3
|
+
import { type AdminType, type RoleType, type ScopeGroupsData } from '../typings/model';
|
|
4
|
+
type SuccessData = {
|
|
5
5
|
success: boolean;
|
|
6
6
|
};
|
|
7
7
|
/** Fields */
|
|
@@ -9,12 +9,12 @@ export declare function getFieldList(): Promise<ResponseBody<Array<FieldConfigUn
|
|
|
9
9
|
/** Roles */
|
|
10
10
|
export declare function getRoleList(): Promise<ResponseBody<Array<RoleType>>>;
|
|
11
11
|
export declare function getRole(roleId: string | number): Promise<ResponseBody<RoleType>>;
|
|
12
|
-
export
|
|
12
|
+
export type RoleCreationPayload = {
|
|
13
13
|
name: string;
|
|
14
14
|
scopes: Array<string>;
|
|
15
15
|
};
|
|
16
16
|
export declare function createRole(payload: RoleCreationPayload): Promise<ResponseBody<RoleType>>;
|
|
17
|
-
export
|
|
17
|
+
export type RoleUpdatePayload = RoleCreationPayload;
|
|
18
18
|
export declare function updateRole(roleId: string | number, payload: RoleUpdatePayload): Promise<ResponseBody<RoleType>>;
|
|
19
19
|
export declare function deleteRole(roleId: string | number): Promise<SuccessData>;
|
|
20
20
|
/** Scopes */
|
|
@@ -22,14 +22,14 @@ export declare function getScopes(): Promise<ResponseBody<ScopeGroupsData>>;
|
|
|
22
22
|
/** Admin */
|
|
23
23
|
export declare function getAdminList(): Promise<ResponseBody<Array<AdminType>>>;
|
|
24
24
|
export declare function getAdmin(adminId: string | number): Promise<ResponseBody<AdminType>>;
|
|
25
|
-
export
|
|
25
|
+
export type AdminUpdatePayload = {
|
|
26
26
|
name: string;
|
|
27
27
|
email: string;
|
|
28
28
|
roles: Array<number>;
|
|
29
29
|
password: string;
|
|
30
30
|
params: Array<FieldShortType<OutgoingValueUnion>>;
|
|
31
31
|
};
|
|
32
|
-
export
|
|
32
|
+
export type AdminCreationPayload = AdminUpdatePayload;
|
|
33
33
|
export declare function createAdmin(payload: AdminCreationPayload): Promise<ResponseBody<AdminType>>;
|
|
34
34
|
export declare function updateAdmin(adminId: string | number, payload: AdminUpdatePayload): Promise<ResponseBody<AdminType>>;
|
|
35
35
|
export declare function deleteAdmin(adminId: string | number): Promise<SuccessData>;
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.no-scopes{font-style:italic}.scope-group{margin-bottom:.5rem}.module-name{display:block;font-weight:700;margin-bottom:.3rem}.scope-list{padding-left:1rem}.rest-scopes-text{padding-left:35px}[data-v-
|
|
1
|
+
.no-scopes{font-style:italic}.scope-group{margin-bottom:.5rem}.module-name{display:block;font-weight:700;margin-bottom:.3rem}.scope-list{padding-left:1rem}.rest-scopes-text{padding-left:35px}[data-v-2e498e82] [data-multi-select-list]{max-height:500px}
|
package/dist/typings/model.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { FieldShortType, IncomingValueUnion } from '@tager/admin-dynamic-field';
|
|
2
|
-
export
|
|
1
|
+
import { type FieldShortType, type IncomingValueUnion } from '@tager/admin-dynamic-field';
|
|
2
|
+
export type ScopeType = {
|
|
3
3
|
readonly value: string;
|
|
4
4
|
readonly label: string;
|
|
5
5
|
readonly module: string;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
7
|
+
export type RoleType = {
|
|
8
8
|
readonly id: number;
|
|
9
9
|
readonly name: string;
|
|
10
10
|
readonly isSuperAdmin: boolean;
|
|
11
11
|
readonly scopes: Array<ScopeType>;
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type ScopeGroupsData = {
|
|
14
14
|
readonly groups: Array<{
|
|
15
15
|
readonly name: string;
|
|
16
16
|
readonly scopes: Array<ScopeType>;
|
|
17
17
|
}>;
|
|
18
18
|
};
|
|
19
|
-
export
|
|
19
|
+
export type AdminType = {
|
|
20
20
|
readonly id: number;
|
|
21
21
|
readonly name: string;
|
|
22
22
|
readonly email: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Nullable } from '@tager/admin-services';
|
|
2
|
-
import { OptionType } from '@tager/admin-ui';
|
|
3
|
-
import { FieldUnion } from '@tager/admin-dynamic-field';
|
|
4
|
-
import { AdminType, RoleType } from '../../typings/model';
|
|
5
|
-
import { AdminCreationPayload, AdminUpdatePayload } from '../../services/requests';
|
|
6
|
-
export
|
|
1
|
+
import { type Nullable } from '@tager/admin-services';
|
|
2
|
+
import { type OptionType } from '@tager/admin-ui';
|
|
3
|
+
import { type FieldUnion } from '@tager/admin-dynamic-field';
|
|
4
|
+
import { type AdminType, type RoleType } from '../../typings/model';
|
|
5
|
+
import { type AdminCreationPayload, type AdminUpdatePayload } from '../../services/requests';
|
|
6
|
+
export type FormValues = {
|
|
7
7
|
name: string;
|
|
8
8
|
email: string;
|
|
9
9
|
password: string;
|