@flusys/ng-iam 9.1.0-rc.1 → 9.1.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/fesm2022/flusys-ng-iam-action-form-page.component-DJ-A1gc2.mjs +685 -0
- package/fesm2022/flusys-ng-iam-action-form-page.component-DJ-A1gc2.mjs.map +1 -0
- package/fesm2022/{flusys-ng-iam-action-list-page.component-Cf4Dhh5S.mjs → flusys-ng-iam-action-list-page.component-Br0PbgRa.mjs} +369 -166
- package/fesm2022/flusys-ng-iam-action-list-page.component-Br0PbgRa.mjs.map +1 -0
- package/fesm2022/flusys-ng-iam-iam-container.component-CIdxVCSW.mjs +141 -0
- package/fesm2022/flusys-ng-iam-iam-container.component-CIdxVCSW.mjs.map +1 -0
- package/fesm2022/flusys-ng-iam-permission-api.service-C7-Yxvz8.mjs +76 -0
- package/fesm2022/flusys-ng-iam-permission-api.service-C7-Yxvz8.mjs.map +1 -0
- package/fesm2022/flusys-ng-iam-permission-page.component-BlNt83uR.mjs +306 -0
- package/fesm2022/flusys-ng-iam-permission-page.component-BlNt83uR.mjs.map +1 -0
- package/fesm2022/flusys-ng-iam-role-api.service-OwPgmSFc.mjs +33 -0
- package/fesm2022/flusys-ng-iam-role-api.service-OwPgmSFc.mjs.map +1 -0
- package/fesm2022/flusys-ng-iam-role-form-page.component-DnkWkbTF.mjs +427 -0
- package/fesm2022/flusys-ng-iam-role-form-page.component-DnkWkbTF.mjs.map +1 -0
- package/fesm2022/flusys-ng-iam-role-list-page.component-BCO_gQ8k.mjs +685 -0
- package/fesm2022/flusys-ng-iam-role-list-page.component-BCO_gQ8k.mjs.map +1 -0
- package/fesm2022/flusys-ng-iam-tree-utils-B1pBG4At.mjs +110 -0
- package/fesm2022/flusys-ng-iam-tree-utils-B1pBG4At.mjs.map +1 -0
- package/fesm2022/flusys-ng-iam-user-action-selector.component-CAXEmJWx.mjs +4592 -0
- package/fesm2022/flusys-ng-iam-user-action-selector.component-CAXEmJWx.mjs.map +1 -0
- package/fesm2022/flusys-ng-iam.mjs +2051 -2
- package/fesm2022/flusys-ng-iam.mjs.map +1 -1
- package/package.json +5 -5
- package/types/flusys-ng-iam.d.ts +621 -604
- package/fesm2022/flusys-ng-iam-action-form-page.component-Dn0TD1Zu.mjs +0 -509
- package/fesm2022/flusys-ng-iam-action-form-page.component-Dn0TD1Zu.mjs.map +0 -1
- package/fesm2022/flusys-ng-iam-action-list-page.component-Cf4Dhh5S.mjs.map +0 -1
- package/fesm2022/flusys-ng-iam-flusys-ng-iam-Y7U2lGZk.mjs +0 -5584
- package/fesm2022/flusys-ng-iam-flusys-ng-iam-Y7U2lGZk.mjs.map +0 -1
- package/fesm2022/flusys-ng-iam-iam-container.component-XBoIeQ0t.mjs +0 -105
- package/fesm2022/flusys-ng-iam-iam-container.component-XBoIeQ0t.mjs.map +0 -1
- package/fesm2022/flusys-ng-iam-permission-page.component-CCAQuZSJ.mjs +0 -204
- package/fesm2022/flusys-ng-iam-permission-page.component-CCAQuZSJ.mjs.map +0 -1
- package/fesm2022/flusys-ng-iam-role-form-page.component-EFjxhBRY.mjs +0 -352
- package/fesm2022/flusys-ng-iam-role-form-page.component-EFjxhBRY.mjs.map +0 -1
- package/fesm2022/flusys-ng-iam-role-list-page.component-DBfhjdkM.mjs +0 -486
- package/fesm2022/flusys-ng-iam-role-list-page.component-DBfhjdkM.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flusys-ng-iam-action-form-page.component-DJ-A1gc2.mjs","names":[],"sources":["../../../projects/ng-iam/pages/action/action-form-page.component.ts"],"sourcesContent":["import { Component, computed, effect, inject, signal } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { form, FormField, required } from '@angular/forms/signals';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport {\n CheckboxComponent,\n FButtonDirective,\n InputTextDirective,\n MessageService,\n SelectComponent,\n TreeSelectComponent,\n UiIconComponent,\n} from '@flusys/ng-ui';\nimport {\n ILogicNode,\n TranslatePipe,\n TranslateService,\n} from '@flusys/ng-shared';\nimport { LogicBuilderComponent } from '../../components/logic-builder.component';\nimport { ActionType, IAction } from '../../interfaces/action.interface';\nimport { ActionApiService } from '../../services/action-api.service';\nimport { TreeNode } from '@flusys/ng-ui';\nimport { buildActionParentTree } from '../../utils/tree-utils';\n\ninterface IActionFormModel {\n id: string;\n name: string;\n description: string;\n code: string;\n actionType: ActionType;\n permissionLogic: ILogicNode | null;\n parentId: string | null;\n serial: string;\n isActive: boolean;\n}\n\n@Component({\n selector: 'lib-action-form-page',\n imports: [\n CheckboxComponent,\n FButtonDirective,\n InputTextDirective,\n SelectComponent,\n TreeSelectComponent,\n UiIconComponent,\n FormField,\n LogicBuilderComponent,\n TranslatePipe,\n ],\n template: `\n <div class=\"card\">\n <h3 class=\"text-lg sm:text-xl font-semibold mb-4\">\n {{\n isEditMode()\n ? ('iam.action.edit' | translate)\n : ('iam.action.new' | translate)\n }}\n </h3>\n\n <form\n (submit)=\"onSubmit($event)\"\n class=\"grid grid-cols-1 md:grid-cols-2 gap-4\"\n >\n <!-- Name -->\n <div class=\"flex flex-col gap-2\">\n <label for=\"name\" class=\"font-medium\"\n >{{ 'iam.action.name' | translate }} *</label\n >\n <input\n fInputText\n id=\"name\"\n [formField]=\"actionForm.name\"\n [placeholder]=\"'iam.action.name.placeholder' | translate\"\n />\n </div>\n\n <!-- Code -->\n <div class=\"flex flex-col gap-2\">\n <label for=\"code\" class=\"font-medium\">{{\n 'iam.action.code' | translate\n }}</label>\n <input\n fInputText\n id=\"code\"\n [formField]=\"actionForm.code\"\n [placeholder]=\"'iam.action.code.placeholder' | translate\"\n />\n </div>\n\n <!-- Description -->\n <div class=\"flex flex-col gap-2\">\n <label for=\"description\" class=\"font-medium\">{{\n 'shared.description' | translate\n }}</label>\n <input\n fInputText\n id=\"description\"\n [formField]=\"actionForm.description\"\n [placeholder]=\"'shared.description.placeholder' | translate\"\n />\n </div>\n\n <!-- Action Type -->\n <div class=\"flex flex-col gap-2\">\n <label for=\"actionType\" class=\"font-medium\"\n >{{ 'iam.action.type' | translate }} *</label\n >\n <f-select\n inputId=\"actionType\"\n [options]=\"actionTypes()\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [formField]=\"actionForm.actionType\"\n [placeholder]=\"'iam.action.type' | translate\"\n />\n </div>\n\n <!-- Parent Action -->\n <div class=\"flex flex-col gap-2\">\n <label class=\"font-medium\">{{\n 'iam.action.parent' | translate\n }}</label>\n <f-treeselect\n [options]=\"parentTreeNodes()\"\n [formField]=\"actionForm.parentId\"\n [placeholder]=\"'iam.action.select.parent' | translate\"\n [filter]=\"true\"\n [showClear]=\"true\"\n />\n </div>\n\n <!-- Order -->\n <div class=\"flex flex-col gap-2\">\n <label for=\"serial\" class=\"font-medium\">{{\n 'shared.display.order' | translate\n }}</label>\n <input\n fInputText\n id=\"serial\"\n type=\"number\"\n [formField]=\"actionForm.serial\"\n [placeholder]=\"'shared.display.order.placeholder' | translate\"\n />\n </div>\n\n <!-- Is Active -->\n <div class=\"flex items-end gap-2 pb-1 md:col-span-2\">\n <f-checkbox\n [formField]=\"actionForm.isActive\"\n [binary]=\"true\"\n inputId=\"isActive\"\n />\n <label for=\"isActive\">{{ 'shared.active' | translate }}</label>\n </div>\n\n <!-- Permission Logic Builder -->\n <div class=\"md:col-span-2\">\n <lib-logic-builder\n [logic]=\"formModel().permissionLogic\"\n [actions]=\"allActionsForLogic()\"\n (logicChange)=\"onLogicChange($event)\"\n />\n </div>\n\n <!-- Actions -->\n <div class=\"flex justify-end gap-2 md:col-span-2 pt-4\">\n <button\n fButton\n type=\"button\"\n severity=\"secondary\"\n [outlined]=\"true\"\n (click)=\"onBack()\"\n >\n <span pButtonLabel>{{ 'shared.cancel' | translate }}</span>\n </button>\n <button\n fButton\n type=\"submit\"\n [disabled]=\"!isFormValid() || isLoading()\"\n >\n @if (isLoading()) {\n <ui-icon pButtonIcon name=\"spinner\" [spin]=\"true\"></ui-icon>\n }\n <span pButtonLabel>{{ \n isEditMode()\n ? ('shared.update' | translate)\n : ('shared.create' | translate)\n }}</span>\n </button>\n </div>\n </form>\n </div>\n `,\n})\nexport class ActionFormPageComponent {\n private readonly route = inject(ActivatedRoute);\n private readonly router = inject(Router);\n private readonly actionApi = inject(ActionApiService);\n private readonly messageService = inject(MessageService);\n private readonly translateAdapter = inject(TranslateService, {\n optional: true,\n });\n private readonly routeParams = toSignal(this.route.paramMap);\n private initialized = false;\n\n private translate(\n key: string,\n vars?: Record<string, string | number>,\n ): string {\n return this.translateAdapter?.translate(key, vars) ?? key;\n }\n\n readonly isLoading = signal(false);\n readonly existingAction = signal<IAction | null>(null);\n readonly isEditMode = computed(() => !!this.existingAction());\n readonly allActionsForLogic = signal<Array<{ id: string; name: string }>>([]);\n readonly allActions = signal<IAction[]>([]);\n\n readonly parentTreeNodes = computed<TreeNode<IAction>[]>(() =>\n buildActionParentTree(this.allActions(), this.existingAction()?.id),\n );\n\n readonly formModel = signal<IActionFormModel>({\n id: '',\n name: '',\n description: '',\n code: '',\n actionType: ActionType.BACKEND,\n permissionLogic: null,\n parentId: null,\n serial: '',\n isActive: true,\n });\n\n readonly actionTypes = computed(() => [\n {\n label: this.translate('iam.action.type.backend.label'),\n value: ActionType.BACKEND,\n },\n {\n label: this.translate('iam.action.type.frontend.label'),\n value: ActionType.FRONTEND,\n },\n {\n label: this.translate('iam.action.type.both.label'),\n value: ActionType.BOTH,\n },\n ]);\n\n readonly actionForm = form(this.formModel, (f) => {\n required(f.name, {\n message: this.translate('shared.validation.required', {\n field: this.translate('iam.action.name'),\n }),\n });\n });\n\n readonly isFormValid = computed(() => {\n const model = this.formModel();\n return model.name.trim().length > 0;\n });\n\n constructor() {\n effect(() => {\n const params = this.routeParams();\n if (!params || this.initialized) return;\n\n this.initialized = true;\n this.initializeForm(params.get('id'));\n });\n }\n\n private async initializeForm(id: string | null): Promise<void> {\n try {\n const response = await this.actionApi.getAll({\n pagination: { currentPage: 0, pageSize: 10000 },\n select: ['id', 'name', 'code', 'actionType', 'permissionLogic', 'parentId'],\n });\n if (response?.success && response.data) {\n this.allActionsForLogic.set(\n response.data.map((a) => ({\n id: a.id!,\n name: a.name ?? this.translate('shared.unnamed'),\n })),\n );\n this.allActions.set(response.data);\n }\n } catch {\n // Ignored - form will show empty parent dropdown\n }\n\n if (id && id !== 'new') {\n await this.loadAction(id);\n }\n }\n\n async loadAction(id: string): Promise<void> {\n this.isLoading.set(true);\n try {\n const response = await this.actionApi.findById(id, [\n 'id',\n 'name',\n 'description',\n 'code',\n 'actionType',\n 'permissionLogic',\n 'parentId',\n 'serial',\n 'isActive',\n 'readOnly',\n ]);\n\n if (response?.success && response.data) {\n const action = response.data;\n\n if (action.readOnly) {\n this.messageService.add({\n severity: 'error',\n summary: this.translate('shared.error'),\n detail: this.translate('iam.action.readonly.edit.forbidden'),\n });\n this.router.navigate(['/iam/actions']);\n return;\n }\n\n this.existingAction.set(action);\n this.formModel.set({\n id: action.id ?? '',\n name: action.name ?? '',\n description: action.description ?? '',\n code: action.code ?? '',\n actionType: action.actionType ?? ActionType.BACKEND,\n permissionLogic: action.permissionLogic ?? null,\n parentId: action.parentId ?? null,\n serial: action.serial?.toString() ?? '',\n isActive: action.isActive ?? true,\n });\n } else {\n this.router.navigate(['/iam/actions']);\n }\n } catch {\n this.router.navigate(['/iam/actions']);\n } finally {\n this.isLoading.set(false);\n }\n }\n\n async onSubmit(event: Event): Promise<void> {\n event.preventDefault();\n\n if (!this.isFormValid()) {\n this.messageService.add({\n severity: 'error',\n summary: this.translate('shared.validation.error'),\n detail: this.translate('shared.fill.required.fields'),\n });\n return;\n }\n\n this.isLoading.set(true);\n\n try {\n const formValue = this.formModel();\n const dto = {\n ...formValue,\n description: formValue.description || undefined,\n code: formValue.code || undefined,\n parentId: formValue.parentId || undefined,\n serial: formValue.serial ? parseInt(formValue.serial, 10) : undefined,\n permissionLogic: formValue.permissionLogic ?? undefined,\n };\n\n const response = this.isEditMode()\n ? await this.actionApi.update(dto)\n : await this.actionApi.insert(dto);\n\n this.messageService.add({\n severity: 'success',\n summary: this.translate('shared.success'),\n detail: response.messageKey\n ? this.translate(\n response.messageKey,\n response.messageVariables as Record<string, string | number>,\n )\n : (response.message ?? ''),\n });\n\n this.router.navigate(['/iam/actions']);\n } catch {\n // Handled by global interceptor\n } finally {\n this.isLoading.set(false);\n }\n }\n\n onBack(): void {\n this.router.navigate(['/iam/actions']);\n }\n\n onLogicChange(logic: ILogicNode | null): void {\n this.formModel.update((model) => ({ ...model, permissionLogic: logic }));\n }\n}\n"],"mappings":";;;;;;;;;AAkMA,IAAa,0BAAb,MAAa,wBAAuB;CACjB,QAAQ,OAAO,cAAc;CAC7B,SAAS,OAAO,MAAM;CACtB,YAAY,OAAO,gBAAgB;CACnC,iBAAiB,OAAO,cAAc;CACtC,mBAAmB,OAAO,kBAAkB,EAC3D,UAAU,KACX,CAAA;CACgB,cAAc,SAAS,KAAK,MAAM,QAAQ;CACnD,cAAc;CAEd,UACN,KACA,MAAsC;EAEtC,OAAO,KAAK,kBAAkB,UAAU,KAAK,IAAI,KAAK;CACxD;CAES,YAAY,OAAO,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CACzB,iBAAiB,OAAuB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,iBAAA,CAAA,+BAAA,CAAA,CAAA;CAC7C,aAAa,eAAe,CAAC,CAAC,KAAK,eAAc,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;CACpD,qBAAqB,OAA4C,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,qBAAA,CAAA,+BAAA,CAAA,CAAA;CACpE,aAAa,OAAkB,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;CAElC,kBAAkB,eACzB,sBAAsB,KAAK,WAAU,GAAI,KAA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AAA;KAAA;KAAA;KAAA;KAAA;IAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MACf;IAAS,UAAA;IAAA,QAAA,CAAA,WAAA;IAAA,UAAA,CAAA,WAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MACT;IAAqB,UAAA;IAAA,QAAA,CAAA,SAAA,SAAA;IAAA,SAAA,CAAA,aAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MACrB;IAAa,MAAA;GAAA;EAAA;CAAA,CAAA;;AAmJJ,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAuB,YAAA,CAAA;EA9JnC,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,SAAS;IACP;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;GACD,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgJX,CAAA"}
|
|
@@ -1,144 +1,135 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import * as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { APP_CONFIG, getPermissionMode } from
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
1
|
+
import { a as ActionApiService, r as convertActionToTreeNode } from "./flusys-ng-iam-tree-utils-B1pBG4At.mjs";
|
|
2
|
+
import { ActionPermittedUsersDialogComponent, ActionType } from "./flusys-ng-iam.mjs";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import { Component, computed, effect, inject, signal, untracked } from "@angular/core";
|
|
5
|
+
import { ACTION_PERMISSIONS, HasPermissionDirective, TranslatePipe, TranslateService, USER_ACTION_PERMISSIONS } from "@flusys/ng-shared";
|
|
6
|
+
import { APP_CONFIG, getPermissionMode } from "@flusys/ng-core";
|
|
7
|
+
import { ConfirmationService, FButtonDirective, IconFieldComponent, InputIconComponent, InputTextDirective, MessageService, TagComponent, TooltipDirective, TreeTableComponent, TreeTableTogglerComponent, UiIconComponent } from "@flusys/ng-ui";
|
|
8
|
+
import { firstValueFrom } from "rxjs";
|
|
9
|
+
import * as i1 from "@angular/forms";
|
|
10
|
+
import { FormsModule } from "@angular/forms";
|
|
11
|
+
import { LAYOUT_AUTH_STATE } from "@flusys/ng-layout";
|
|
12
|
+
import { Router } from "@angular/router";
|
|
13
13
|
function filterActionTree(nodes, search) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}, []);
|
|
26
|
-
return filter(nodes);
|
|
14
|
+
const term = search.trim().toLowerCase();
|
|
15
|
+
if (!term) return nodes;
|
|
16
|
+
const filter = (items) => items.reduce((acc, node) => {
|
|
17
|
+
const children = filter(node.children ?? []);
|
|
18
|
+
if (node.name?.toLowerCase().includes(term) || node.code?.toLowerCase().includes(term) || children.length) acc.push({
|
|
19
|
+
...node,
|
|
20
|
+
children
|
|
21
|
+
});
|
|
22
|
+
return acc;
|
|
23
|
+
}, []);
|
|
24
|
+
return filter(nodes);
|
|
27
25
|
}
|
|
28
|
-
class ActionListPageComponent {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
// Handled by global interceptor
|
|
136
|
-
}
|
|
137
|
-
},
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: ActionListPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
141
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: ActionListPageComponent, isStandalone: true, selector: "lib-action-list-page", ngImport: i0, template: `
|
|
26
|
+
var ActionListPageComponent = class ActionListPageComponent {
|
|
27
|
+
ACTION_PERMISSIONS = ACTION_PERMISSIONS;
|
|
28
|
+
USER_ACTION_PERMISSIONS = USER_ACTION_PERMISSIONS;
|
|
29
|
+
router = inject(Router);
|
|
30
|
+
appConfig = inject(APP_CONFIG);
|
|
31
|
+
companyContext = inject(LAYOUT_AUTH_STATE);
|
|
32
|
+
actionApi = inject(ActionApiService);
|
|
33
|
+
messageService = inject(MessageService);
|
|
34
|
+
confirmationService = inject(ConfirmationService);
|
|
35
|
+
translateAdapter = inject(TranslateService, { optional: true });
|
|
36
|
+
isLoading = signal(false, ...ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []);
|
|
37
|
+
rawActions = signal([], ...ngDevMode ? [{ debugName: "rawActions" }] : /* istanbul ignore next */ []);
|
|
38
|
+
_searchTerm = signal("", ...ngDevMode ? [{ debugName: "_searchTerm" }] : /* istanbul ignore next */ []);
|
|
39
|
+
searchTerm = this._searchTerm.asReadonly();
|
|
40
|
+
treeNodes = computed(() => convertActionToTreeNode(filterActionTree(this.rawActions(), this._searchTerm())), ...ngDevMode ? [{ debugName: "treeNodes" }] : /* istanbul ignore next */ []);
|
|
41
|
+
permittedUsersDialogVisible = signal(false, ...ngDevMode ? [{ debugName: "permittedUsersDialogVisible" }] : /* istanbul ignore next */ []);
|
|
42
|
+
selectedAction = signal(null, ...ngDevMode ? [{ debugName: "selectedAction" }] : /* istanbul ignore next */ []);
|
|
43
|
+
showActionUsers = computed(() => {
|
|
44
|
+
const permissionMode = getPermissionMode(this.appConfig);
|
|
45
|
+
return permissionMode === "direct" || permissionMode === "full";
|
|
46
|
+
}, ...ngDevMode ? [{ debugName: "showActionUsers" }] : /* istanbul ignore next */ []);
|
|
47
|
+
translate(key, vars) {
|
|
48
|
+
return this.translateAdapter?.translate(key, vars) ?? key;
|
|
49
|
+
}
|
|
50
|
+
static TYPE_SEVERITIES = {
|
|
51
|
+
[ActionType.BACKEND]: "info",
|
|
52
|
+
[ActionType.FRONTEND]: "success",
|
|
53
|
+
[ActionType.BOTH]: "warn"
|
|
54
|
+
};
|
|
55
|
+
static TYPE_LABEL_KEYS = {
|
|
56
|
+
[ActionType.BACKEND]: "iam.action.type.backend",
|
|
57
|
+
[ActionType.FRONTEND]: "iam.action.type.frontend",
|
|
58
|
+
[ActionType.BOTH]: "iam.action.type.both"
|
|
59
|
+
};
|
|
60
|
+
constructor() {
|
|
61
|
+
effect(() => {
|
|
62
|
+
this.companyContext.currentCompanyInfo();
|
|
63
|
+
untracked(() => this.loadActions());
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
async loadActions() {
|
|
67
|
+
this.isLoading.set(true);
|
|
68
|
+
try {
|
|
69
|
+
const response = await firstValueFrom(this.actionApi.getTree());
|
|
70
|
+
this.rawActions.set(response?.success ? response.data ?? [] : []);
|
|
71
|
+
} catch {} finally {
|
|
72
|
+
this.isLoading.set(false);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
onSearchChange(value) {
|
|
76
|
+
this._searchTerm.set(value);
|
|
77
|
+
}
|
|
78
|
+
getActionTypeLabel(type) {
|
|
79
|
+
const key = ActionListPageComponent.TYPE_LABEL_KEYS[type] ?? "shared.unknown";
|
|
80
|
+
return this.translate(key);
|
|
81
|
+
}
|
|
82
|
+
getActionTypeSeverity(type) {
|
|
83
|
+
return ActionListPageComponent.TYPE_SEVERITIES[type] ?? "info";
|
|
84
|
+
}
|
|
85
|
+
onCreate() {
|
|
86
|
+
this.router.navigate(["/iam/actions/new"]);
|
|
87
|
+
}
|
|
88
|
+
onEdit(action) {
|
|
89
|
+
this.router.navigate(["/iam/actions", action.id]);
|
|
90
|
+
}
|
|
91
|
+
onViewUsers(action) {
|
|
92
|
+
this.selectedAction.set(action);
|
|
93
|
+
this.permittedUsersDialogVisible.set(true);
|
|
94
|
+
}
|
|
95
|
+
onDelete(action) {
|
|
96
|
+
if (!action?.id || !action?.name) return;
|
|
97
|
+
this.confirmationService.confirm({
|
|
98
|
+
message: this.translate("shared.confirm.delete.item", { name: action.name }),
|
|
99
|
+
header: this.translate("iam.action.delete.title"),
|
|
100
|
+
icon: "exclamation-triangle",
|
|
101
|
+
accept: async () => {
|
|
102
|
+
try {
|
|
103
|
+
const response = await this.actionApi.delete({
|
|
104
|
+
id: action.id,
|
|
105
|
+
type: "permanent"
|
|
106
|
+
});
|
|
107
|
+
await this.loadActions();
|
|
108
|
+
this.messageService.add({
|
|
109
|
+
severity: "success",
|
|
110
|
+
summary: this.translate("shared.success"),
|
|
111
|
+
detail: response?.messageKey ? this.translate(response.messageKey, response.messageVariables) : response?.message ?? ""
|
|
112
|
+
});
|
|
113
|
+
} catch {}
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
118
|
+
minVersion: "12.0.0",
|
|
119
|
+
version: "22.2.1",
|
|
120
|
+
ngImport: i0,
|
|
121
|
+
type: ActionListPageComponent,
|
|
122
|
+
deps: [],
|
|
123
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
124
|
+
});
|
|
125
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
126
|
+
minVersion: "17.0.0",
|
|
127
|
+
version: "22.2.1",
|
|
128
|
+
type: ActionListPageComponent,
|
|
129
|
+
isStandalone: true,
|
|
130
|
+
selector: "lib-action-list-page",
|
|
131
|
+
ngImport: i0,
|
|
132
|
+
template: `
|
|
142
133
|
<div class="card">
|
|
143
134
|
<div
|
|
144
135
|
class="flex flex-col sm:flex-row justify-between items-start sm:items-center gap-3 mb-4"
|
|
@@ -285,28 +276,238 @@ class ActionListPageComponent {
|
|
|
285
276
|
[action]="selectedAction()"
|
|
286
277
|
(closed)="permittedUsersDialogVisible.set(false)"
|
|
287
278
|
/>
|
|
288
|
-
`,
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
279
|
+
`,
|
|
280
|
+
isInline: true,
|
|
281
|
+
dependencies: [
|
|
282
|
+
{
|
|
283
|
+
kind: "directive",
|
|
284
|
+
type: FButtonDirective,
|
|
285
|
+
selector: "[fButton]",
|
|
286
|
+
inputs: [
|
|
287
|
+
"severity",
|
|
288
|
+
"text",
|
|
289
|
+
"outlined",
|
|
290
|
+
"link",
|
|
291
|
+
"variant",
|
|
292
|
+
"rounded",
|
|
293
|
+
"raised",
|
|
294
|
+
"fluid",
|
|
295
|
+
"disabled",
|
|
296
|
+
"loading",
|
|
297
|
+
"loadingIcon",
|
|
298
|
+
"size",
|
|
299
|
+
"label",
|
|
300
|
+
"icon",
|
|
301
|
+
"iconPos",
|
|
302
|
+
"ariaLabel",
|
|
303
|
+
"plain"
|
|
304
|
+
]
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
kind: "ngmodule",
|
|
308
|
+
type: FormsModule
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
kind: "directive",
|
|
312
|
+
type: i1.DefaultValueAccessor,
|
|
313
|
+
selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]"
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
kind: "directive",
|
|
317
|
+
type: i1.NgControlStatus,
|
|
318
|
+
selector: "[formControlName],[ngModel],[formControl]"
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
kind: "directive",
|
|
322
|
+
type: i1.NgModel,
|
|
323
|
+
selector: "[ngModel]:not([formControlName]):not([formControl])",
|
|
324
|
+
inputs: [
|
|
325
|
+
"name",
|
|
326
|
+
"disabled",
|
|
327
|
+
"ngModel",
|
|
328
|
+
"ngModelOptions"
|
|
329
|
+
],
|
|
330
|
+
outputs: ["ngModelChange"],
|
|
331
|
+
exportAs: ["ngModel"]
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
kind: "component",
|
|
335
|
+
type: IconFieldComponent,
|
|
336
|
+
selector: "f-iconfield",
|
|
337
|
+
inputs: ["iconPosition", "styleClass"]
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
kind: "component",
|
|
341
|
+
type: InputIconComponent,
|
|
342
|
+
selector: "f-inputicon",
|
|
343
|
+
inputs: [
|
|
344
|
+
"icon",
|
|
345
|
+
"position",
|
|
346
|
+
"styleClass",
|
|
347
|
+
"style"
|
|
348
|
+
]
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
kind: "directive",
|
|
352
|
+
type: InputTextDirective,
|
|
353
|
+
selector: "[fInputText]",
|
|
354
|
+
inputs: [
|
|
355
|
+
"invalid",
|
|
356
|
+
"touched",
|
|
357
|
+
"variant",
|
|
358
|
+
"size",
|
|
359
|
+
"fluid"
|
|
360
|
+
]
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
kind: "component",
|
|
364
|
+
type: TagComponent,
|
|
365
|
+
selector: "f-tag",
|
|
366
|
+
inputs: [
|
|
367
|
+
"value",
|
|
368
|
+
"severity",
|
|
369
|
+
"icon",
|
|
370
|
+
"rounded",
|
|
371
|
+
"color",
|
|
372
|
+
"styleClass",
|
|
373
|
+
"style"
|
|
374
|
+
]
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
kind: "directive",
|
|
378
|
+
type: TooltipDirective,
|
|
379
|
+
selector: "[fTooltip]",
|
|
380
|
+
inputs: [
|
|
381
|
+
"fTooltip",
|
|
382
|
+
"tooltipPosition",
|
|
383
|
+
"positionStyle",
|
|
384
|
+
"tooltipStyleClass",
|
|
385
|
+
"disabled",
|
|
386
|
+
"tooltipEvent",
|
|
387
|
+
"showDelay",
|
|
388
|
+
"hideDelay",
|
|
389
|
+
"life",
|
|
390
|
+
"autoHide",
|
|
391
|
+
"positionTop",
|
|
392
|
+
"positionLeft",
|
|
393
|
+
"escape"
|
|
394
|
+
]
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
kind: "component",
|
|
398
|
+
type: TreeTableComponent,
|
|
399
|
+
selector: "f-treetable",
|
|
400
|
+
inputs: [
|
|
401
|
+
"value",
|
|
402
|
+
"loading",
|
|
403
|
+
"dataKey",
|
|
404
|
+
"styleClass",
|
|
405
|
+
"tableStyle",
|
|
406
|
+
"scrollable",
|
|
407
|
+
"scrollHeight",
|
|
408
|
+
"resizableColumns",
|
|
409
|
+
"lazy",
|
|
410
|
+
"totalRecords",
|
|
411
|
+
"paginator",
|
|
412
|
+
"first",
|
|
413
|
+
"rows",
|
|
414
|
+
"rowsPerPageOptions",
|
|
415
|
+
"showCurrentPageReport",
|
|
416
|
+
"currentPageReportTemplate",
|
|
417
|
+
"globalFilterFields",
|
|
418
|
+
"filterDelay",
|
|
419
|
+
"selectionMode",
|
|
420
|
+
"sortMode",
|
|
421
|
+
"virtualScroll",
|
|
422
|
+
"virtualScrollItemSize",
|
|
423
|
+
"sortField",
|
|
424
|
+
"sortOrder",
|
|
425
|
+
"multiSortMeta",
|
|
426
|
+
"filters",
|
|
427
|
+
"selection",
|
|
428
|
+
"contextMenuSelection"
|
|
429
|
+
],
|
|
430
|
+
outputs: [
|
|
431
|
+
"sortFieldChange",
|
|
432
|
+
"sortOrderChange",
|
|
433
|
+
"multiSortMetaChange",
|
|
434
|
+
"filtersChange",
|
|
435
|
+
"selectionChange",
|
|
436
|
+
"contextMenuSelectionChange",
|
|
437
|
+
"onLazyLoad",
|
|
438
|
+
"onSort",
|
|
439
|
+
"onFilter",
|
|
440
|
+
"onNodeExpand",
|
|
441
|
+
"onNodeCollapse",
|
|
442
|
+
"onNodeSelect",
|
|
443
|
+
"onNodeUnselect",
|
|
444
|
+
"onRowContextMenu"
|
|
445
|
+
]
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
kind: "component",
|
|
449
|
+
type: TreeTableTogglerComponent,
|
|
450
|
+
selector: "f-treetabletoggler",
|
|
451
|
+
inputs: ["rowNode"]
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
kind: "component",
|
|
455
|
+
type: UiIconComponent,
|
|
456
|
+
selector: "ui-icon",
|
|
457
|
+
inputs: [
|
|
458
|
+
"name",
|
|
459
|
+
"size",
|
|
460
|
+
"spin",
|
|
461
|
+
"fill",
|
|
462
|
+
"severity"
|
|
463
|
+
]
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
kind: "directive",
|
|
467
|
+
type: HasPermissionDirective,
|
|
468
|
+
selector: "[hasPermission]",
|
|
469
|
+
inputs: ["hasPermission"]
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
kind: "component",
|
|
473
|
+
type: ActionPermittedUsersDialogComponent,
|
|
474
|
+
selector: "flusys-action-permitted-users-dialog",
|
|
475
|
+
inputs: ["visible", "action"],
|
|
476
|
+
outputs: ["closed"]
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
kind: "pipe",
|
|
480
|
+
type: TranslatePipe,
|
|
481
|
+
name: "translate"
|
|
482
|
+
}
|
|
483
|
+
]
|
|
484
|
+
});
|
|
485
|
+
};
|
|
486
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
487
|
+
minVersion: "12.0.0",
|
|
488
|
+
version: "22.2.1",
|
|
489
|
+
ngImport: i0,
|
|
490
|
+
type: ActionListPageComponent,
|
|
491
|
+
decorators: [{
|
|
492
|
+
type: Component,
|
|
493
|
+
args: [{
|
|
494
|
+
selector: "lib-action-list-page",
|
|
495
|
+
imports: [
|
|
496
|
+
FButtonDirective,
|
|
497
|
+
FormsModule,
|
|
498
|
+
IconFieldComponent,
|
|
499
|
+
InputIconComponent,
|
|
500
|
+
InputTextDirective,
|
|
501
|
+
TagComponent,
|
|
502
|
+
TooltipDirective,
|
|
503
|
+
TreeTableComponent,
|
|
504
|
+
TreeTableTogglerComponent,
|
|
505
|
+
UiIconComponent,
|
|
506
|
+
HasPermissionDirective,
|
|
507
|
+
ActionPermittedUsersDialogComponent,
|
|
508
|
+
TranslatePipe
|
|
509
|
+
],
|
|
510
|
+
template: `
|
|
310
511
|
<div class="card">
|
|
311
512
|
<div
|
|
312
513
|
class="flex flex-col sm:flex-row justify-between items-start sm:items-center gap-3 mb-4"
|
|
@@ -453,9 +654,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
|
|
|
453
654
|
[action]="selectedAction()"
|
|
454
655
|
(closed)="permittedUsersDialogVisible.set(false)"
|
|
455
656
|
/>
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
657
|
+
`
|
|
658
|
+
}]
|
|
659
|
+
}],
|
|
660
|
+
ctorParameters: () => []
|
|
661
|
+
});
|
|
460
662
|
export { ActionListPageComponent };
|
|
461
|
-
|
|
663
|
+
|
|
664
|
+
//# sourceMappingURL=flusys-ng-iam-action-list-page.component-Br0PbgRa.mjs.map
|