@acorex/modules 20.0.5 → 20.0.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.
Files changed (66) hide show
  1. package/conversation/index.d.ts +157 -217
  2. package/fesm2022/{acorex-modules-application-management-module-designer.component-CvFiEI1a.mjs → acorex-modules-application-management-module-designer.component-oGgCaUDu.mjs} +2 -2
  3. package/fesm2022/{acorex-modules-application-management-module-designer.component-CvFiEI1a.mjs.map → acorex-modules-application-management-module-designer.component-oGgCaUDu.mjs.map} +1 -1
  4. package/fesm2022/acorex-modules-application-management.mjs +1 -1
  5. package/fesm2022/{acorex-modules-auth-acorex-modules-auth-B10cRw3M.mjs → acorex-modules-auth-acorex-modules-auth-Cj4td3eM.mjs} +9 -9
  6. package/fesm2022/{acorex-modules-auth-acorex-modules-auth-B10cRw3M.mjs.map → acorex-modules-auth-acorex-modules-auth-Cj4td3eM.mjs.map} +1 -1
  7. package/fesm2022/{acorex-modules-auth-app-chooser.component-C-HPf2jz.mjs → acorex-modules-auth-app-chooser.component-C60idNYx.mjs} +2 -2
  8. package/fesm2022/{acorex-modules-auth-app-chooser.component-C-HPf2jz.mjs.map → acorex-modules-auth-app-chooser.component-C60idNYx.mjs.map} +1 -1
  9. package/fesm2022/{acorex-modules-auth-login.module-eC1_ukrb.mjs → acorex-modules-auth-login.module-siRdi16m.mjs} +4 -4
  10. package/fesm2022/{acorex-modules-auth-login.module-eC1_ukrb.mjs.map → acorex-modules-auth-login.module-siRdi16m.mjs.map} +1 -1
  11. package/fesm2022/{acorex-modules-auth-master.layout-DpfqRgAl.mjs → acorex-modules-auth-master.layout-BJCAe5Ai.mjs} +2 -2
  12. package/fesm2022/{acorex-modules-auth-master.layout-DpfqRgAl.mjs.map → acorex-modules-auth-master.layout-BJCAe5Ai.mjs.map} +1 -1
  13. package/fesm2022/{acorex-modules-auth-password.component-DAB9dWB8.mjs → acorex-modules-auth-password.component-6-EEsfc2.mjs} +2 -2
  14. package/fesm2022/{acorex-modules-auth-password.component-DAB9dWB8.mjs.map → acorex-modules-auth-password.component-6-EEsfc2.mjs.map} +1 -1
  15. package/fesm2022/{acorex-modules-auth-password.component-rE9yrcGW.mjs → acorex-modules-auth-password.component-VhDUmkMc.mjs} +3 -3
  16. package/fesm2022/acorex-modules-auth-password.component-VhDUmkMc.mjs.map +1 -0
  17. package/fesm2022/{acorex-modules-auth-routes-EGvejNu9.mjs → acorex-modules-auth-routes-BwBn4o81.mjs} +2 -2
  18. package/fesm2022/{acorex-modules-auth-routes-EGvejNu9.mjs.map → acorex-modules-auth-routes-BwBn4o81.mjs.map} +1 -1
  19. package/fesm2022/{acorex-modules-auth-two-factor.module-DF3_fgzH.mjs → acorex-modules-auth-two-factor.module-D7NgZHmC.mjs} +2 -2
  20. package/fesm2022/{acorex-modules-auth-two-factor.module-DF3_fgzH.mjs.map → acorex-modules-auth-two-factor.module-D7NgZHmC.mjs.map} +1 -1
  21. package/fesm2022/{acorex-modules-auth-user-sessions.component-BPb-WS4k.mjs → acorex-modules-auth-user-sessions.component-DhlBCxly.mjs} +2 -2
  22. package/fesm2022/{acorex-modules-auth-user-sessions.component-BPb-WS4k.mjs.map → acorex-modules-auth-user-sessions.component-DhlBCxly.mjs.map} +1 -1
  23. package/fesm2022/acorex-modules-auth.mjs +1 -1
  24. package/fesm2022/acorex-modules-conversation.mjs +1762 -1568
  25. package/fesm2022/acorex-modules-conversation.mjs.map +1 -1
  26. package/fesm2022/acorex-modules-dashboard-management.mjs +9 -9
  27. package/fesm2022/acorex-modules-dashboard-management.mjs.map +1 -1
  28. package/fesm2022/acorex-modules-notification-management.mjs +3 -3
  29. package/fesm2022/acorex-modules-notification-management.mjs.map +1 -1
  30. package/fesm2022/acorex-modules-organization-management-role.entity-BDErzNv-.mjs.map +1 -1
  31. package/fesm2022/{acorex-modules-platform-management-acorex-modules-platform-management-DqpAYmHM.mjs → acorex-modules-platform-management-acorex-modules-platform-management-Dfux0tkB.mjs} +6 -6
  32. package/fesm2022/acorex-modules-platform-management-acorex-modules-platform-management-Dfux0tkB.mjs.map +1 -0
  33. package/fesm2022/{acorex-modules-platform-management-list-version.component-DidjxkmH.mjs → acorex-modules-platform-management-list-version.component-CSNKxghv.mjs} +2 -2
  34. package/fesm2022/{acorex-modules-platform-management-list-version.component-DidjxkmH.mjs.map → acorex-modules-platform-management-list-version.component-CSNKxghv.mjs.map} +1 -1
  35. package/fesm2022/{acorex-modules-platform-management-settings.provider-DcHKHrSK.mjs → acorex-modules-platform-management-settings.provider-C4RaOgkr.mjs} +35 -25
  36. package/fesm2022/acorex-modules-platform-management-settings.provider-C4RaOgkr.mjs.map +1 -0
  37. package/fesm2022/acorex-modules-platform-management.mjs +1 -1
  38. package/fesm2022/acorex-modules-report-management-report-runner-root-page.component-CtEDcg_B.mjs +589 -0
  39. package/fesm2022/acorex-modules-report-management-report-runner-root-page.component-CtEDcg_B.mjs.map +1 -0
  40. package/fesm2022/acorex-modules-report-management.mjs +208 -0
  41. package/fesm2022/acorex-modules-report-management.mjs.map +1 -0
  42. package/fesm2022/acorex-modules-security-management.mjs +582 -72
  43. package/fesm2022/acorex-modules-security-management.mjs.map +1 -1
  44. package/fesm2022/{acorex-modules-workflow-management-task-board.page-R4x5Rq-D.mjs → acorex-modules-workflow-management-task-board.page-Bugxqd0W.mjs} +2 -2
  45. package/fesm2022/acorex-modules-workflow-management-task-board.page-Bugxqd0W.mjs.map +1 -0
  46. package/fesm2022/acorex-modules-workflow-management.mjs +1 -1
  47. package/package.json +5 -1
  48. package/report-management/README.md +356 -0
  49. package/report-management/index.d.ts +39 -0
  50. package/security-management/index.d.ts +162 -2
  51. package/fesm2022/acorex-modules-auth-password.component-rE9yrcGW.mjs.map +0 -1
  52. package/fesm2022/acorex-modules-platform-management-acorex-modules-platform-management-DqpAYmHM.mjs.map +0 -1
  53. package/fesm2022/acorex-modules-platform-management-settings.provider-DcHKHrSK.mjs.map +0 -1
  54. package/fesm2022/acorex-modules-security-management-permissions-editor.component-B4TdyHtv.mjs +0 -218
  55. package/fesm2022/acorex-modules-security-management-permissions-editor.component-B4TdyHtv.mjs.map +0 -1
  56. package/fesm2022/acorex-modules-security-management-permissions-widget-column.component-DTMj6gxb.mjs +0 -41
  57. package/fesm2022/acorex-modules-security-management-permissions-widget-column.component-DTMj6gxb.mjs.map +0 -1
  58. package/fesm2022/acorex-modules-security-management-permissions-widget-designer.component-BJdbKpRQ.mjs +0 -20
  59. package/fesm2022/acorex-modules-security-management-permissions-widget-designer.component-BJdbKpRQ.mjs.map +0 -1
  60. package/fesm2022/acorex-modules-security-management-permissions-widget-edit.component-GTmDlgWW.mjs +0 -51
  61. package/fesm2022/acorex-modules-security-management-permissions-widget-edit.component-GTmDlgWW.mjs.map +0 -1
  62. package/fesm2022/acorex-modules-security-management-permissions-widget-print.component-BZ75aI18.mjs +0 -21
  63. package/fesm2022/acorex-modules-security-management-permissions-widget-print.component-BZ75aI18.mjs.map +0 -1
  64. package/fesm2022/acorex-modules-security-management-permissions-widget-view.component-CYQqerAX.mjs +0 -20
  65. package/fesm2022/acorex-modules-security-management-permissions-widget-view.component-CYQqerAX.mjs.map +0 -1
  66. package/fesm2022/acorex-modules-workflow-management-task-board.page-R4x5Rq-D.mjs.map +0 -1
@@ -1,19 +1,40 @@
1
1
  import { createAllQueryView, AXPEntityCommandScope, AXPEntityQueryType, AXPSearchCommandProvider, AXPRefreshEvent, AXP_MENU_PROVIDER, AXP_SEARCH_PROVIDER } from '@acorex/platform/common';
2
2
  import * as i2 from '@acorex/platform/layout/builder';
3
- import { AXPWidgetsCatalog, AXPWidgetGroupEnum, AXPLayoutBuilderModule } from '@acorex/platform/layout/builder';
3
+ import { AXPWidgetsCatalog, AXPWidgetGroupEnum, AXPLayoutBuilderModule, AXPValueWidgetComponent, AXPColumnWidgetComponent, AXPLayoutWidgetComponent } from '@acorex/platform/layout/builder';
4
4
  import { AXMEntityCrudServiceImpl, AXPEntityService, AXPEntityResolver, AXPEntityDefinitionRegistryService, AXP_ENTITY_DEFINITION_LOADER } from '@acorex/platform/layout/entity';
5
5
  import * as i0 from '@angular/core';
6
- import { Injectable, NgModule, inject, Injector } from '@angular/core';
6
+ import { Injectable, NgModule, inject, Injector, signal, input, output, computed, ViewEncapsulation, Component, ViewChild, effect, ChangeDetectionStrategy } from '@angular/core';
7
7
  import * as i1 from '@acorex/platform/workflow';
8
- import { createWorkFlowEvent, AXPWorkflowAction, AXPWorkflowModule } from '@acorex/platform/workflow';
8
+ import { createWorkFlowEvent, AXPWorkflowAction, AXPWorkflowModule, AXPWorkflowService } from '@acorex/platform/workflow';
9
9
  import { AXPSessionService, AXPPermissionDefinitionService } from '@acorex/platform/auth';
10
10
  import { AXDataSource } from '@acorex/cdk/common';
11
11
  import { AXDialogService } from '@acorex/components/dialog';
12
12
  import { AXLoadingDialogService } from '@acorex/components/loading-dialog';
13
- import { AXTranslationService } from '@acorex/core/translation';
14
- import { AXP_USER_AVATAR_PROVIDER } from '@acorex/platform/layout/components';
13
+ import * as i3$1 from '@acorex/core/translation';
14
+ import { AXTranslationService, AXTranslationModule } from '@acorex/core/translation';
15
+ import { AXP_USER_AVATAR_PROVIDER, AXPThemeLayoutBlockComponent } from '@acorex/platform/layout/components';
15
16
  import { AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_DISABLED_PROPERTY } from '@acorex/platform/widgets';
16
17
  import { AXPopupService } from '@acorex/components/popup';
18
+ import * as i1$1 from '@angular/common';
19
+ import { CommonModule } from '@angular/common';
20
+ import { AXFormModule } from '@acorex/components/form';
21
+ import { AXButtonModule } from '@acorex/components/button';
22
+ import { AXTextBoxModule } from '@acorex/components/text-box';
23
+ import * as i4 from '@acorex/components/check-box';
24
+ import { AXCheckBoxModule } from '@acorex/components/check-box';
25
+ import * as i3 from '@acorex/components/label';
26
+ import { AXLabelModule } from '@acorex/components/label';
27
+ import * as i6 from '@acorex/components/decorators';
28
+ import { AXDecoratorModule } from '@acorex/components/decorators';
29
+ import * as i5 from '@acorex/components/tabs';
30
+ import { AXTabsModule } from '@acorex/components/tabs';
31
+ import * as i7 from '@acorex/components/badge';
32
+ import { AXBadgeModule } from '@acorex/components/badge';
33
+ import * as i2$1 from '@angular/forms';
34
+ import { FormsModule } from '@angular/forms';
35
+ import { AXTooltipModule } from '@acorex/components/tooltip';
36
+ import { AXPPopupLayoutBaseComponent, AXPPopupLayoutComponent, AXPPopupLayoutBase } from '@acorex/platform/layout/views';
37
+ import { castArray } from 'lodash-es';
17
38
 
18
39
  const config = {
19
40
  i18n: 'security-management',
@@ -1613,15 +1634,13 @@ async function factory(injector) {
1613
1634
  groupId: 'info',
1614
1635
  schema: {
1615
1636
  dataType: 'string',
1616
- interface: {
1617
- type: AXPWidgetsCatalog.text,
1637
+ hidden: true,
1638
+ nullable: false,
1639
+ readonly: true,
1640
+ unique: {
1641
+ enabled: true,
1618
1642
  },
1619
1643
  },
1620
- validations: [
1621
- {
1622
- rule: 'required',
1623
- },
1624
- ],
1625
1644
  },
1626
1645
  {
1627
1646
  name: 'title',
@@ -1671,54 +1690,6 @@ async function factory(injector) {
1671
1690
  },
1672
1691
  },
1673
1692
  },
1674
- // {
1675
- // name: 'disabled',
1676
- // title: `t("active", {scope:"${i18n}"})`,
1677
- // groupId: 'info',
1678
- // options: {
1679
- // filter: {
1680
- // advance: {
1681
- // enabled: true,
1682
- // },
1683
- // },
1684
- // },
1685
- // schema: {
1686
- // dataType: 'boolean',
1687
- // interface: {
1688
- // type: AXPWidgetsCatalog.checkbox,
1689
- // options: {
1690
- // negative: true,
1691
- // },
1692
- // },
1693
- // },
1694
- // },
1695
- // {
1696
- // name: 'permissions',
1697
- // title: `t("permissions", { scope: "${i18n}" })`,
1698
- // groupId: 'permissions',
1699
- // schema: {
1700
- // dataType: 'string',
1701
- // interface: {
1702
- // type: AXPWidgetsCatalog.select,
1703
- // options: {
1704
- // dataSource: new AXDataSource({
1705
- // load: async () => {
1706
- // const permissions = await permissionService.getPermissions();
1707
- // return {
1708
- // items: permissions,
1709
- // total: permissions.length,
1710
- // };
1711
- // },
1712
- // pageSize: 1000,
1713
- // key: 'name',
1714
- // }),
1715
- // valueField: 'name',
1716
- // textField: 'title',
1717
- // multiple: true,
1718
- // },
1719
- // },
1720
- // },
1721
- // },
1722
1693
  {
1723
1694
  name: 'permissions',
1724
1695
  title: `t("permissions", { scope: "${i18n}" })`,
@@ -1853,7 +1824,7 @@ async function factory(injector) {
1853
1824
  },
1854
1825
  },
1855
1826
  {
1856
- name: 'permissions',
1827
+ name: 'description',
1857
1828
  layout: {
1858
1829
  positions: {
1859
1830
  lg: {
@@ -1863,7 +1834,7 @@ async function factory(injector) {
1863
1834
  },
1864
1835
  },
1865
1836
  {
1866
- name: 'description',
1837
+ name: 'permissions',
1867
1838
  layout: {
1868
1839
  positions: {
1869
1840
  lg: {
@@ -1922,6 +1893,9 @@ async function factory(injector) {
1922
1893
  {
1923
1894
  name: 'permissions',
1924
1895
  layout: {
1896
+ label: {
1897
+ visible: false,
1898
+ },
1925
1899
  positions: {
1926
1900
  lg: {
1927
1901
  colSpan: 12,
@@ -1979,6 +1953,28 @@ async function factory(injector) {
1979
1953
  type: 'view',
1980
1954
  scope: AXPEntityCommandScope.Individual,
1981
1955
  },
1956
+ {
1957
+ title: '@activity-log:actions.view-history',
1958
+ command: {
1959
+ name: 'show-version-history-popup',
1960
+ options: {
1961
+ refId: '{{ context.eval("id") }}',
1962
+ refType: RootConfig.module.name + '.' + RootConfig.entities.roles.name,
1963
+ }
1964
+ },
1965
+ priority: 'secondary',
1966
+ type: 'version-history',
1967
+ scope: AXPEntityCommandScope.Individual,
1968
+ },
1969
+ {
1970
+ title: 'Compare',
1971
+ command: {
1972
+ name: 'show-entity-records-compare',
1973
+ },
1974
+ priority: 'secondary',
1975
+ type: 'version-history',
1976
+ scope: AXPEntityCommandScope.Selected
1977
+ }
1982
1978
  ],
1983
1979
  views: [
1984
1980
  {
@@ -2180,11 +2176,11 @@ class AXMUserAvatarProvider {
2180
2176
  const AXPPermissionsWidget = {
2181
2177
  name: "permissions-editor",
2182
2178
  title: "Permissions Editor",
2183
- description: '',
2179
+ description: 'Widget for managing permissions with full editor interface',
2184
2180
  type: 'view',
2185
2181
  categories: [],
2186
2182
  groups: [AXPWidgetGroupEnum.EntityWidget],
2187
- icon: "fa-solid fa-square",
2183
+ icon: "fa-solid fa-user-shield",
2188
2184
  properties: [
2189
2185
  AXP_NAME_PROPERTY,
2190
2186
  AXP_DATA_PATH_PROPERTY,
@@ -2192,19 +2188,19 @@ const AXPPermissionsWidget = {
2192
2188
  ],
2193
2189
  components: {
2194
2190
  view: {
2195
- component: () => import('./acorex-modules-security-management-permissions-widget-view.component-CYQqerAX.mjs').then((c) => c.AXPPermissionsWidgetViewComponent),
2191
+ component: () => Promise.resolve().then(function () { return permissionsWidgetView_component; }).then((c) => c.AXPPermissionsWidgetViewComponent),
2196
2192
  },
2197
2193
  edit: {
2198
- component: () => import('./acorex-modules-security-management-permissions-widget-edit.component-GTmDlgWW.mjs').then((c) => c.AXPPermissionsWidgetEditComponent),
2194
+ component: () => Promise.resolve().then(function () { return permissionsWidgetEdit_component; }).then((c) => c.AXPPermissionsWidgetEditComponent),
2199
2195
  },
2200
2196
  column: {
2201
- component: () => import('./acorex-modules-security-management-permissions-widget-column.component-DTMj6gxb.mjs').then((c) => c.AXPPermissionsWidgetColumnComponent),
2197
+ component: () => Promise.resolve().then(function () { return permissionsWidgetColumn_component; }).then((c) => c.AXPPermissionsWidgetColumnComponent),
2202
2198
  },
2203
2199
  print: {
2204
- component: () => import('./acorex-modules-security-management-permissions-widget-print.component-BZ75aI18.mjs').then((c) => c.AXPPermissionsWidgetPrintComponent),
2200
+ component: () => Promise.resolve().then(function () { return permissionsWidgetPrint_component; }).then((c) => c.AXPPermissionsWidgetPrintComponent),
2205
2201
  },
2206
2202
  designer: {
2207
- component: () => import('./acorex-modules-security-management-permissions-widget-designer.component-BJdbKpRQ.mjs').then((c) => c.AXPPermissionsWidgetDesignerComponent),
2203
+ component: () => Promise.resolve().then(function () { return permissionsWidgetDesigner_component; }).then((c) => c.AXPPermissionsWidgetDesignerComponent),
2208
2204
  },
2209
2205
  }
2210
2206
  };
@@ -2217,15 +2213,18 @@ class AXMOpenPermissionsEditorAction extends AXPWorkflowAction {
2217
2213
  }
2218
2214
  async execute(context) {
2219
2215
  const role = context.getVariable('data');
2220
- const component = await import('./acorex-modules-security-management-permissions-editor.component-B4TdyHtv.mjs').then(m => m.AXPPermissionsEditorComponent);
2216
+ const component = await Promise.resolve().then(function () { return permissionsEditorPopup_component; }).then(m => m.AXPPermissionsEditorPopupComponent);
2221
2217
  const title = await this.translateService.translateAsync("@security-management:features.permissions.terms.permissions-editor");
2222
2218
  const result = await this.modalService.open(component, {
2223
2219
  title: `${title} - ${role.title}`,
2224
2220
  size: 'md',
2225
2221
  data: {
2226
- initialPermissions: role['permissions'] ?? []
2222
+ initialPermissions: role['permissions'] ?? [],
2227
2223
  }
2228
2224
  });
2225
+ //
2226
+ context.setVariable('entity', `${RootConfig.module.name}.${RootConfig.entities.roles.name}`);
2227
+ //
2229
2228
  const permissions = result.data;
2230
2229
  if (permissions) {
2231
2230
  context.setVariable('data.permissions', permissions);
@@ -2404,9 +2403,520 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
2404
2403
  }]
2405
2404
  }] });
2406
2405
 
2406
+ // #region ---------------- Imports ----------------
2407
+ // #endregion
2408
+ class AXPPermissionsEditorComponent {
2409
+ constructor() {
2410
+ // #region ---------------- Class Properties ----------------
2411
+ /** Service for fetching permission groups and definitions */
2412
+ this.permissionService = inject(AXPPermissionDefinitionService);
2413
+ /** Currently selected permission group */
2414
+ this.selectedGroup = signal(null);
2415
+ /** All available permission groups */
2416
+ this.groups = signal([]);
2417
+ /** Initial permissions to be selected - exposed as signal input */
2418
+ this.initialPermissions = input([]);
2419
+ /** Whether the editor is in read-only mode */
2420
+ this.readOnly = input(false);
2421
+ /** List of selected permission names */
2422
+ this.selectedPermissions = signal([]);
2423
+ /** Event emitted when permissions selection changes */
2424
+ this.permissionsChanged = output();
2425
+ /** Event emitted when permissions are applied/selected */
2426
+ this.permissionsSelected = output();
2427
+ /**
2428
+ * Computed: Returns mapped permissions for the selected group.
2429
+ */
2430
+ this.items = computed(() => {
2431
+ const permissions = this.selectedGroup()?.permissions || [];
2432
+ return this.mapPermissions(permissions);
2433
+ });
2434
+ /**
2435
+ * Computed: Returns groups with badge counts.
2436
+ */
2437
+ this.groupsWithBadge = computed(() => {
2438
+ const groups = this.groups();
2439
+ const result = groups.map(group => {
2440
+ return {
2441
+ ...group,
2442
+ badge: this.getBadge(group) || ''
2443
+ };
2444
+ });
2445
+ return result;
2446
+ });
2447
+ }
2448
+ // #endregion
2449
+ // #region ---------------- Computed Properties ----------------
2450
+ /**
2451
+ * Recursively maps permissions to include selection state and children.
2452
+ */
2453
+ mapPermissions(items) {
2454
+ return (items || []).map(item => {
2455
+ const hasChild = Array.isArray(item.children) && item.children.length > 0;
2456
+ return {
2457
+ ...item,
2458
+ isSelected: this.isSelected(item.name),
2459
+ children: hasChild ? this.mapPermissions(item.children) : null
2460
+ };
2461
+ });
2462
+ }
2463
+ // #endregion
2464
+ // #region ---------------- Utility Methods ----------------
2465
+ /**
2466
+ * Recursively collects all permission names (parents and children) from an array.
2467
+ */
2468
+ collectAllPermissionNames(permissions) {
2469
+ let names = [];
2470
+ for (const item of permissions) {
2471
+ names.push(item.name);
2472
+ if (Array.isArray(item.children) && item.children.length > 0) {
2473
+ names = names.concat(this.collectAllPermissionNames(item.children));
2474
+ }
2475
+ }
2476
+ return names;
2477
+ }
2478
+ /**
2479
+ * Returns the badge count for a group (all selected permissions, including parents).
2480
+ */
2481
+ getBadge(group) {
2482
+ const allNames = this.collectAllPermissionNames(group.permissions || []);
2483
+ const selectedPermissions = this.selectedPermissions();
2484
+ const count = allNames.filter(name => selectedPermissions.includes(name)).length;
2485
+ return count.toString();
2486
+ }
2487
+ /**
2488
+ * Checks if a permission is selected.
2489
+ */
2490
+ isSelected(name) {
2491
+ return this.selectedPermissions().includes(name);
2492
+ }
2493
+ /**
2494
+ * Recursively collects all descendant permission names for a single item (including itself).
2495
+ */
2496
+ collectPermissionNames(item) {
2497
+ let names = [item.name];
2498
+ if (Array.isArray(item.children) && item.children.length > 0) {
2499
+ for (const child of item.children) {
2500
+ names = names.concat(this.collectPermissionNames(child));
2501
+ }
2502
+ }
2503
+ return names;
2504
+ }
2505
+ /**
2506
+ * Gets the current selected permissions.
2507
+ */
2508
+ getSelectedPermissions() {
2509
+ return this.selectedPermissions();
2510
+ }
2511
+ /**
2512
+ * Sets the selected permissions.
2513
+ */
2514
+ setSelectedPermissions(permissions) {
2515
+ this.selectedPermissions.set(permissions || []);
2516
+ this.permissionsChanged.emit(this.selectedPermissions());
2517
+ }
2518
+ /**
2519
+ * Applies/selects the current permissions.
2520
+ */
2521
+ selectPermissions() {
2522
+ this.permissionsSelected.emit(this.selectedPermissions());
2523
+ }
2524
+ // #endregion
2525
+ // #region ---------------- Lifecycle Methods ----------------
2526
+ /**
2527
+ * Initializes the component and loads permission groups.
2528
+ */
2529
+ async ngOnInit() {
2530
+ const groups = await this.permissionService.getGroups();
2531
+ this.groups.set(groups);
2532
+ this.selectedGroup.set(groups[0]);
2533
+ this.selectedPermissions.set(this.initialPermissions());
2534
+ }
2535
+ // #endregion
2536
+ // #region ---------------- UI Handlers ----------------
2537
+ /**
2538
+ * Handles group tab/menu item click.
2539
+ */
2540
+ handleMenuItemClick(item) {
2541
+ this.selectedGroup.set(item);
2542
+ }
2543
+ /**
2544
+ * Handles permission checkbox toggle (checks/unchecks all children recursively).
2545
+ */
2546
+ onPermissionToggle(item, e) {
2547
+ // Don't allow changes in read-only mode
2548
+ if (this.readOnly()) {
2549
+ return;
2550
+ }
2551
+ const names = this.collectPermissionNames(item);
2552
+ if (e.value) {
2553
+ // Add all names (parent + children), avoiding duplicates
2554
+ const set = new Set([...this.selectedPermissions(), ...names]);
2555
+ this.selectedPermissions.set(Array.from(set));
2556
+ }
2557
+ else {
2558
+ // Remove all names (parent + children)
2559
+ this.selectedPermissions.set(this.selectedPermissions().filter(name => !names.includes(name)));
2560
+ }
2561
+ this.permissionsChanged.emit(this.selectedPermissions());
2562
+ }
2563
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPPermissionsEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2564
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.4", type: AXPPermissionsEditorComponent, isStandalone: true, selector: "axm-permissions-editor", inputs: { initialPermissions: { classPropertyName: "initialPermissions", publicName: "initialPermissions", isSignal: true, isRequired: false, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { permissionsChanged: "permissionsChanged", permissionsSelected: "permissionsSelected" }, ngImport: i0, template: "<div class=\"axm-permissions-editor\">\n\n <div class=\"ax-flex ax-min-h-96\">\n\n <div class=\"__groups ax-p-4 ax-min-h-full ax-overflow-auto ax-w-2/5\">\n\n <ax-tabs location=\"start\" look=\"with-line-color\" class=\"ax-h-full\">\n @for (group of groupsWithBadge(); track $index) {\n <ax-tab-item [active]=\"group.name === selectedGroup()?.name\" [text]=\"group.title\"\n (onClick)=\"handleMenuItemClick(group)\">\n <ax-suffix>\n <ax-badge color=\"primary\" [text]=\"group.badge\"></ax-badge>\n </ax-suffix>\n </ax-tab-item>\n }\n </ax-tabs>\n\n </div>\n\n <div class=\"__permissions ax-flex ax-h-full ax-overflow-auto ax-flex-col ax-w-3/5 ax-border-s\">\n\n <div class=\"__header ax-p-4 ax-border-b ax-border-lightest\">\n <span class=\"ax-h6\">{{ selectedGroup()?.title! }}</span>\n </div>\n\n <div class=\"__content ax-flex ax-p-4\">\n\n <ul class=\"__list\">\n <ng-template #recursiveList let-items>\n @for (item of items; track $index) {\n <li class=\"__item ax-py-1 ax-ps-2\">\n\n <ax-check-box [ngModel]=\"item.isSelected\" [readonly]=\"readOnly()\"\n (onValueChanged)=\"onPermissionToggle(item, $event)\">\n <ax-label>\n {{ item.title }}\n @if (item.description) {\n <i class=\"ax-ps-2 ax-text-xs fa-light fa-circle-info\"\n [title]=\"item.description\"></i>\n }\n </ax-label>\n </ax-check-box>\n\n @if (item.children && item.children.length > 0) {\n <ul class=\"__children ax-p-2 ax-mt-1 ax-ms-1\">\n <ng-container\n *ngTemplateOutlet=\"recursiveList; context: { $implicit: item.children }\"></ng-container>\n </ul>\n }\n\n </li>\n }\n </ng-template>\n <ng-container *ngTemplateOutlet=\"recursiveList; context: { $implicit: items() }\"></ng-container>\n </ul>\n\n </div>\n\n </div>\n\n </div>\n\n</div>", styles: [".axm-permissions-editor{display:flex;height:100%;flex-direction:column}.axm-permissions-editor .__groups .__tabs{height:100%}.axm-permissions-editor .__permissions .__header .__title{font-size:1rem;font-weight:500;line-height:1rem}.axm-permissions-editor .__permissions .__content .__list{width:100%}.axm-permissions-editor .__permissions .__content .__list .__item .__children{margin-left:.5rem;border-left-width:1px;border-style:dashed;--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-border-lighter-surface),var(--tw-border-opacity, 1))}\n"], dependencies: [{ kind: "ngmodule", type:
2565
+ // Angular
2566
+ CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type:
2567
+ // ACoreX
2568
+ AXFormModule }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i3.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXCheckBoxModule }, { kind: "component", type: i4.AXCheckBoxComponent, selector: "ax-check-box", inputs: ["disabled", "tabIndex", "readonly", "color", "value", "name", "id", "checked", "isLoading", "indeterminate"], outputs: ["onBlur", "onFocus", "valueChange", "onValueChanged"] }, { kind: "ngmodule", type: AXTabsModule }, { kind: "component", type: i5.AXTabsComponent, selector: "ax-tabs", inputs: ["look", "location", "fitParent", "minWidth", "content"], outputs: ["onActiveTabChanged"] }, { kind: "component", type: i5.AXTabItemComponent, selector: "ax-tab-item", inputs: ["disabled", "text", "key", "headerTemplate", "active"], outputs: ["disabledChange", "onClick", "onBlur", "onFocus", "activeChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i6.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i7.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }, { kind: "ngmodule", type: AXTooltipModule }], encapsulation: i0.ViewEncapsulation.None }); }
2569
+ }
2570
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPPermissionsEditorComponent, decorators: [{
2571
+ type: Component,
2572
+ args: [{ selector: 'axm-permissions-editor', imports: [
2573
+ // Angular
2574
+ CommonModule,
2575
+ FormsModule,
2576
+ // ACoreX
2577
+ AXFormModule,
2578
+ AXTextBoxModule,
2579
+ AXButtonModule,
2580
+ AXLabelModule,
2581
+ AXCheckBoxModule,
2582
+ AXTabsModule,
2583
+ AXDecoratorModule,
2584
+ AXTranslationModule,
2585
+ AXBadgeModule,
2586
+ AXCheckBoxModule,
2587
+ AXTooltipModule,
2588
+ ], encapsulation: ViewEncapsulation.None, template: "<div class=\"axm-permissions-editor\">\n\n <div class=\"ax-flex ax-min-h-96\">\n\n <div class=\"__groups ax-p-4 ax-min-h-full ax-overflow-auto ax-w-2/5\">\n\n <ax-tabs location=\"start\" look=\"with-line-color\" class=\"ax-h-full\">\n @for (group of groupsWithBadge(); track $index) {\n <ax-tab-item [active]=\"group.name === selectedGroup()?.name\" [text]=\"group.title\"\n (onClick)=\"handleMenuItemClick(group)\">\n <ax-suffix>\n <ax-badge color=\"primary\" [text]=\"group.badge\"></ax-badge>\n </ax-suffix>\n </ax-tab-item>\n }\n </ax-tabs>\n\n </div>\n\n <div class=\"__permissions ax-flex ax-h-full ax-overflow-auto ax-flex-col ax-w-3/5 ax-border-s\">\n\n <div class=\"__header ax-p-4 ax-border-b ax-border-lightest\">\n <span class=\"ax-h6\">{{ selectedGroup()?.title! }}</span>\n </div>\n\n <div class=\"__content ax-flex ax-p-4\">\n\n <ul class=\"__list\">\n <ng-template #recursiveList let-items>\n @for (item of items; track $index) {\n <li class=\"__item ax-py-1 ax-ps-2\">\n\n <ax-check-box [ngModel]=\"item.isSelected\" [readonly]=\"readOnly()\"\n (onValueChanged)=\"onPermissionToggle(item, $event)\">\n <ax-label>\n {{ item.title }}\n @if (item.description) {\n <i class=\"ax-ps-2 ax-text-xs fa-light fa-circle-info\"\n [title]=\"item.description\"></i>\n }\n </ax-label>\n </ax-check-box>\n\n @if (item.children && item.children.length > 0) {\n <ul class=\"__children ax-p-2 ax-mt-1 ax-ms-1\">\n <ng-container\n *ngTemplateOutlet=\"recursiveList; context: { $implicit: item.children }\"></ng-container>\n </ul>\n }\n\n </li>\n }\n </ng-template>\n <ng-container *ngTemplateOutlet=\"recursiveList; context: { $implicit: items() }\"></ng-container>\n </ul>\n\n </div>\n\n </div>\n\n </div>\n\n</div>", styles: [".axm-permissions-editor{display:flex;height:100%;flex-direction:column}.axm-permissions-editor .__groups .__tabs{height:100%}.axm-permissions-editor .__permissions .__header .__title{font-size:1rem;font-weight:500;line-height:1rem}.axm-permissions-editor .__permissions .__content .__list{width:100%}.axm-permissions-editor .__permissions .__content .__list .__item .__children{margin-left:.5rem;border-left-width:1px;border-style:dashed;--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-border-lighter-surface),var(--tw-border-opacity, 1))}\n"] }]
2589
+ }] });
2590
+
2591
+ // #region ---------------- Imports ----------------
2592
+ // #endregion
2593
+ class AXPPermissionsEditorPopupComponent extends AXPPopupLayoutBaseComponent {
2594
+ constructor() {
2595
+ super(...arguments);
2596
+ /** Initial permissions to be selected */
2597
+ this.initialPermissions = [];
2598
+ }
2599
+ // #endregion
2600
+ // #region ---------------- Lifecycle Methods ----------------
2601
+ /**
2602
+ * Initializes the component.
2603
+ */
2604
+ async ngOnInit() {
2605
+ super.ngOnInit();
2606
+ // Any popup-specific initialization can go here
2607
+ }
2608
+ // #endregion
2609
+ // #region ---------------- UI Handlers ----------------
2610
+ /**
2611
+ * Returns the primary menu items for the popup layout.
2612
+ */
2613
+ getPrimaryMenuItems() {
2614
+ return [
2615
+ {
2616
+ title: 't("select")',
2617
+ icon: 'fa-solid fa-check',
2618
+ command: {
2619
+ name: 'select'
2620
+ }
2621
+ }
2622
+ ];
2623
+ }
2624
+ /**
2625
+ * Handles permission selection changes from the editor component.
2626
+ */
2627
+ onPermissionsChanged(permissions) {
2628
+ // Handle permission changes if needed for popup-specific logic
2629
+ }
2630
+ /**
2631
+ * Handles when permissions are selected from the editor component.
2632
+ */
2633
+ onPermissionsSelected(permissions) {
2634
+ this.close(permissions);
2635
+ }
2636
+ /**
2637
+ * Executes popup commands.
2638
+ */
2639
+ execute(command) {
2640
+ if (command.name === 'select') {
2641
+ const selectedPermissions = this.permissionEditor.getSelectedPermissions();
2642
+ this.close(selectedPermissions);
2643
+ }
2644
+ }
2645
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPPermissionsEditorPopupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2646
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: AXPPermissionsEditorPopupComponent, isStandalone: true, selector: "axm-permissions-editor-popup", providers: [
2647
+ {
2648
+ provide: AXPPopupLayoutBase,
2649
+ useExisting: AXPPermissionsEditorPopupComponent
2650
+ }
2651
+ ], viewQueries: [{ propertyName: "permissionEditor", first: true, predicate: AXPPermissionsEditorComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<axp-popup-layout>\n <axp-page-content>\n <axm-permissions-editor [initialPermissions]=\"initialPermissions\"\n (permissionsChanged)=\"onPermissionsChanged($event)\" (permissionsSelected)=\"onPermissionsSelected($event)\">\n </axm-permissions-editor>\n </axp-page-content>\n</axp-popup-layout>", dependencies: [{ kind: "ngmodule", type:
2652
+ // Angular
2653
+ CommonModule }, { kind: "ngmodule", type:
2654
+ // ACoreX
2655
+ AXTranslationModule }, { kind: "component", type:
2656
+ // Platform
2657
+ AXPPopupLayoutComponent, selector: "axp-popup-layout" }, { kind: "component", type:
2658
+ // Local
2659
+ AXPPermissionsEditorComponent, selector: "axm-permissions-editor", inputs: ["initialPermissions", "readOnly"], outputs: ["permissionsChanged", "permissionsSelected"] }, { kind: "component", type: AXPThemeLayoutBlockComponent, selector: " axp-page-content, axp-page-footer-container, axp-page-footer, axp-page-header, axp-page-header-container, axp-page-toolbar, axp-layout-content, axp-layout-page-content, axp-layout-sections, axp-layout-body, axp-layout-page-body, axp-layout-prefix, axp-layout-suffix, axp-layout-title-bar, axp-layout-title, axp-layout-title-actions, axp-layout-nav-button, axp-layout-description, axp-layout-breadcrumbs, axp-layout-list-action, " }], encapsulation: i0.ViewEncapsulation.None }); }
2660
+ }
2661
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPPermissionsEditorPopupComponent, decorators: [{
2662
+ type: Component,
2663
+ args: [{ selector: 'axm-permissions-editor-popup', imports: [
2664
+ // Angular
2665
+ CommonModule,
2666
+ // ACoreX
2667
+ AXTranslationModule,
2668
+ // Platform
2669
+ AXPPopupLayoutComponent,
2670
+ // Local
2671
+ AXPPermissionsEditorComponent,
2672
+ AXPThemeLayoutBlockComponent
2673
+ ], encapsulation: ViewEncapsulation.None, providers: [
2674
+ {
2675
+ provide: AXPPopupLayoutBase,
2676
+ useExisting: AXPPermissionsEditorPopupComponent
2677
+ }
2678
+ ], template: "<axp-popup-layout>\n <axp-page-content>\n <axm-permissions-editor [initialPermissions]=\"initialPermissions\"\n (permissionsChanged)=\"onPermissionsChanged($event)\" (permissionsSelected)=\"onPermissionsSelected($event)\">\n </axm-permissions-editor>\n </axp-page-content>\n</axp-popup-layout>" }]
2679
+ }], propDecorators: { permissionEditor: [{
2680
+ type: ViewChild,
2681
+ args: [AXPPermissionsEditorComponent]
2682
+ }] } });
2683
+
2684
+ var permissionsEditorPopup_component = /*#__PURE__*/Object.freeze({
2685
+ __proto__: null,
2686
+ AXPPermissionsEditorPopupComponent: AXPPermissionsEditorPopupComponent
2687
+ });
2688
+
2689
+ class AXPPermissionsWidgetViewComponent extends AXPValueWidgetComponent {
2690
+ constructor() {
2691
+ super(...arguments);
2692
+ this.permissionService = inject(AXPPermissionDefinitionService);
2693
+ this.workflowService = inject(AXPWorkflowService);
2694
+ this.groups = signal([]);
2695
+ this.loadGroupsEffect = effect(async () => {
2696
+ // Load groups when component initializes
2697
+ if (this.groups().length === 0) {
2698
+ const groupsData = await this.permissionService.getGroups();
2699
+ this.groups.set(groupsData);
2700
+ }
2701
+ });
2702
+ this.selectedPermissionsByGroup = computed(() => {
2703
+ const selected = new Set(this.getValue() ?? []);
2704
+ const result = {};
2705
+ for (const group of this.groups()) {
2706
+ const permPaths = [];
2707
+ const findPermissionPaths = (items, path = []) => {
2708
+ for (const item of items) {
2709
+ const currentPath = [...path, item];
2710
+ if (selected.has(item.name)) {
2711
+ const displayPath = currentPath.map(p => p.title).join(' > ');
2712
+ permPaths.push({
2713
+ group,
2714
+ path: currentPath,
2715
+ displayPath
2716
+ });
2717
+ }
2718
+ if (item.children?.length) {
2719
+ findPermissionPaths(item.children, currentPath);
2720
+ }
2721
+ }
2722
+ };
2723
+ findPermissionPaths(group.permissions);
2724
+ result[group.name] = permPaths;
2725
+ }
2726
+ return result;
2727
+ });
2728
+ this.isEmpty = computed(() => {
2729
+ return Object.values(this.selectedPermissionsByGroup()).every(arr => !arr.length);
2730
+ });
2731
+ }
2732
+ async openPermissionsEditor() {
2733
+ await this.workflowService.execute('assign-permissions', {
2734
+ data: this.contextService.data(),
2735
+ });
2736
+ }
2737
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPPermissionsWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2738
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.4", type: AXPPermissionsWidgetViewComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
2739
+ <!-- <axm-permissions-editor
2740
+ [initialPermissions]="getValue() || []"
2741
+ [readOnly]="true">
2742
+ </axm-permissions-editor> -->
2743
+ <div class="ax-flex ax-flex-col ax-gap-2">
2744
+ @for (group of groups(); track group.name) {
2745
+ <div *ngIf="selectedPermissionsByGroup()[group.name]?.length">
2746
+ <div class="ax-text-xs ax-font-semibold ax-mb-2 ax-text-muted">{{ group.title }}</div>
2747
+ <div class="ax-flex ax-gap-1 ax-flex-wrap">
2748
+ @for (permPath of selectedPermissionsByGroup()[group.name]; track permPath.path[permPath.path.length - 1].name) {
2749
+ <ax-badge [text]="permPath.displayPath" color="primary" size="sm"></ax-badge>
2750
+ }
2751
+ </div>
2752
+ </div>
2753
+ }
2754
+ @if (isEmpty()) {
2755
+ <div class="ax-text-muted">{{'@security-management:features.permissions.no-permissions' | translate | async}}</div>
2756
+ }
2757
+ </div>
2758
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i7.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i3$1.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2759
+ }
2760
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPPermissionsWidgetViewComponent, decorators: [{
2761
+ type: Component,
2762
+ args: [{
2763
+ template: `
2764
+ <!-- <axm-permissions-editor
2765
+ [initialPermissions]="getValue() || []"
2766
+ [readOnly]="true">
2767
+ </axm-permissions-editor> -->
2768
+ <div class="ax-flex ax-flex-col ax-gap-2">
2769
+ @for (group of groups(); track group.name) {
2770
+ <div *ngIf="selectedPermissionsByGroup()[group.name]?.length">
2771
+ <div class="ax-text-xs ax-font-semibold ax-mb-2 ax-text-muted">{{ group.title }}</div>
2772
+ <div class="ax-flex ax-gap-1 ax-flex-wrap">
2773
+ @for (permPath of selectedPermissionsByGroup()[group.name]; track permPath.path[permPath.path.length - 1].name) {
2774
+ <ax-badge [text]="permPath.displayPath" color="primary" size="sm"></ax-badge>
2775
+ }
2776
+ </div>
2777
+ </div>
2778
+ }
2779
+ @if (isEmpty()) {
2780
+ <div class="ax-text-muted">{{'@security-management:features.permissions.no-permissions' | translate | async}}</div>
2781
+ }
2782
+ </div>
2783
+ `,
2784
+ standalone: true,
2785
+ changeDetection: ChangeDetectionStrategy.OnPush,
2786
+ imports: [CommonModule, AXBadgeModule, AXTranslationModule]
2787
+ }]
2788
+ }] });
2789
+
2790
+ var permissionsWidgetView_component = /*#__PURE__*/Object.freeze({
2791
+ __proto__: null,
2792
+ AXPPermissionsWidgetViewComponent: AXPPermissionsWidgetViewComponent
2793
+ });
2794
+
2795
+ class AXPPermissionsWidgetEditComponent extends AXPValueWidgetComponent {
2796
+ // #region ---------------- UI Handlers ----------------
2797
+ /**
2798
+ * Handles permissions changes from the editor.
2799
+ */
2800
+ onPermissionsChanged(permissions) {
2801
+ this.setValue(permissions);
2802
+ }
2803
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPPermissionsWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2804
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: AXPPermissionsWidgetEditComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
2805
+ <axm-permissions-editor
2806
+ [initialPermissions]="getValue() || []"
2807
+ [readOnly]="false"
2808
+ (permissionsChanged)="onPermissionsChanged($event)">
2809
+ </axm-permissions-editor>
2810
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type:
2811
+ // Angular
2812
+ CommonModule }, { kind: "component", type:
2813
+ // Local
2814
+ AXPPermissionsEditorComponent, selector: "axm-permissions-editor", inputs: ["initialPermissions", "readOnly"], outputs: ["permissionsChanged", "permissionsSelected"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2815
+ }
2816
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPPermissionsWidgetEditComponent, decorators: [{
2817
+ type: Component,
2818
+ args: [{
2819
+ template: `
2820
+ <axm-permissions-editor
2821
+ [initialPermissions]="getValue() || []"
2822
+ [readOnly]="false"
2823
+ (permissionsChanged)="onPermissionsChanged($event)">
2824
+ </axm-permissions-editor>
2825
+ `,
2826
+ standalone: true,
2827
+ changeDetection: ChangeDetectionStrategy.OnPush,
2828
+ imports: [
2829
+ // Angular
2830
+ CommonModule,
2831
+ // Local
2832
+ AXPPermissionsEditorComponent
2833
+ ]
2834
+ }]
2835
+ }] });
2836
+
2837
+ var permissionsWidgetEdit_component = /*#__PURE__*/Object.freeze({
2838
+ __proto__: null,
2839
+ AXPPermissionsWidgetEditComponent: AXPPermissionsWidgetEditComponent
2840
+ });
2841
+
2842
+ class AXPPermissionsWidgetColumnComponent extends AXPColumnWidgetComponent {
2843
+ constructor() {
2844
+ super(...arguments);
2845
+ this.count = computed(() => castArray(this.rawValue).length);
2846
+ this.workflowService = inject(AXPWorkflowService);
2847
+ }
2848
+ async openPermissionsEditor() {
2849
+ await this.workflowService.execute('assign-permissions', {
2850
+ data: this.rowData
2851
+ });
2852
+ }
2853
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPPermissionsWidgetColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2854
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: AXPPermissionsWidgetColumnComponent, isStandalone: true, selector: "ng-component", inputs: { rawValue: "rawValue", rowData: "rowData" }, usesInheritance: true, ngImport: i0, template: `
2855
+ <span class="ax-cursor-pointer ax-text-primary ax-underline" (click)="openPermissionsEditor()">{{count()}} {{'@security-management:features.permissions.terms.permissions' | translate | async}}</span>
2856
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i3$1.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2857
+ }
2858
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPPermissionsWidgetColumnComponent, decorators: [{
2859
+ type: Component,
2860
+ args: [{
2861
+ template: `
2862
+ <span class="ax-cursor-pointer ax-text-primary ax-underline" (click)="openPermissionsEditor()">{{count()}} {{'@security-management:features.permissions.terms.permissions' | translate | async}}</span>
2863
+ `,
2864
+ standalone: true,
2865
+ changeDetection: ChangeDetectionStrategy.OnPush,
2866
+ imports: [CommonModule, AXTranslationModule],
2867
+ inputs: ['rawValue', 'rowData']
2868
+ }]
2869
+ }] });
2870
+
2871
+ var permissionsWidgetColumn_component = /*#__PURE__*/Object.freeze({
2872
+ __proto__: null,
2873
+ AXPPermissionsWidgetColumnComponent: AXPPermissionsWidgetColumnComponent
2874
+ });
2875
+
2876
+ class AXPPermissionsWidgetPrintComponent extends AXPLayoutWidgetComponent {
2877
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPPermissionsWidgetPrintComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2878
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: AXPPermissionsWidgetPrintComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2879
+ }
2880
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPPermissionsWidgetPrintComponent, decorators: [{
2881
+ type: Component,
2882
+ args: [{
2883
+ template: ``,
2884
+ standalone: true,
2885
+ changeDetection: ChangeDetectionStrategy.OnPush,
2886
+ imports: [],
2887
+ inputs: []
2888
+ }]
2889
+ }] });
2890
+
2891
+ var permissionsWidgetPrint_component = /*#__PURE__*/Object.freeze({
2892
+ __proto__: null,
2893
+ AXPPermissionsWidgetPrintComponent: AXPPermissionsWidgetPrintComponent
2894
+ });
2895
+
2896
+ class AXPPermissionsWidgetDesignerComponent extends AXPLayoutWidgetComponent {
2897
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPPermissionsWidgetDesignerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2898
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: AXPPermissionsWidgetDesignerComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2899
+ }
2900
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPPermissionsWidgetDesignerComponent, decorators: [{
2901
+ type: Component,
2902
+ args: [{
2903
+ template: ``,
2904
+ standalone: true,
2905
+ changeDetection: ChangeDetectionStrategy.OnPush,
2906
+ imports: []
2907
+ }]
2908
+ }] });
2909
+
2910
+ var permissionsWidgetDesigner_component = /*#__PURE__*/Object.freeze({
2911
+ __proto__: null,
2912
+ AXPPermissionsWidgetDesignerComponent: AXPPermissionsWidgetDesignerComponent
2913
+ });
2914
+
2915
+ // Permission Editor Components
2916
+
2407
2917
  /**
2408
2918
  * Generated bundle index. Do not edit.
2409
2919
  */
2410
2920
 
2411
- export { AXMDeviceSessionsService, AXMDeviceSessionsServiceImpl, AXMSecurityManagementDeviceSessionsEntityModule, AXMSecurityManagementModule, AXMSecurityManagementRolesEntityService, AXMSecurityManagementRolesEntityServiceImpl, AXMSessionStatusTypes, AXMUsersEntityService, AXMUsersEntityServiceImpl, AXPSecurityManagementMenuKeys, RootConfig, factory$3 as factory };
2921
+ export { AXMDeviceSessionsService, AXMDeviceSessionsServiceImpl, AXMPermissionsModule, AXMSecurityManagementDeviceSessionsEntityModule, AXMSecurityManagementModule, AXMSecurityManagementRolesEntityService, AXMSecurityManagementRolesEntityServiceImpl, AXMSessionStatusTypes, AXMUsersEntityService, AXMUsersEntityServiceImpl, AXPPermissionsEditorComponent, AXPPermissionsEditorPopupComponent, AXPPermissionsWidget, AXPPermissionsWidgetColumnComponent, AXPPermissionsWidgetDesignerComponent, AXPPermissionsWidgetEditComponent, AXPPermissionsWidgetPrintComponent, AXPPermissionsWidgetViewComponent, AXPSecurityManagementMenuKeys, RootConfig, factory$3 as factory };
2412
2922
  //# sourceMappingURL=acorex-modules-security-management.mjs.map