@acorex/modules 19.4.4 → 19.4.5

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 (141) hide show
  1. package/conversation/README.md +113 -2
  2. package/conversation/index.d.ts +2 -14
  3. package/conversation/lib/const.d.ts +25 -6
  4. package/conversation/lib/conversation.module.d.ts +32 -3
  5. package/conversation/lib/entities/index.d.ts +2 -0
  6. package/conversation/lib/entities/message/index.d.ts +3 -0
  7. package/conversation/lib/entities/message/message.entity.d.ts +3 -0
  8. package/conversation/lib/entities/message/message.service.d.ts +10 -0
  9. package/conversation/lib/entities/message/message.types.d.ts +20 -0
  10. package/conversation/lib/entities/room/index.d.ts +3 -0
  11. package/conversation/lib/entities/room/room.entity.d.ts +3 -0
  12. package/conversation/lib/entities/room/room.service.d.ts +10 -0
  13. package/conversation/lib/entities/room/room.types.d.ts +8 -0
  14. package/conversation/lib/entity.provider.d.ts +12 -0
  15. package/conversation/lib/features/chat/chat-preview.helper.d.ts +68 -0
  16. package/conversation/lib/features/chat/chat.component.d.ts +42 -0
  17. package/conversation/lib/features/chat/chat.service.d.ts +101 -0
  18. package/conversation/lib/features/chat/chat.type.d.ts +38 -0
  19. package/conversation/lib/{entities → features}/chat/components/chat-item/chat-item.component.d.ts +6 -1
  20. package/conversation/lib/{entities → features}/chat/components/chat-preview/chat-preview.component.d.ts +3 -0
  21. package/conversation/lib/features/chat/index.d.ts +5 -0
  22. package/conversation/lib/{entities/comments/pages → features/comment}/comment-list-view.component.d.ts +12 -12
  23. package/conversation/lib/features/comment/comment.service.d.ts +66 -0
  24. package/conversation/lib/features/comment/comment.type.d.ts +45 -0
  25. package/conversation/lib/features/comment/index.d.ts +4 -0
  26. package/conversation/lib/features/index.d.ts +2 -0
  27. package/document-management/lib/entities/folder/folder.types.d.ts +3 -2
  28. package/document-management/lib/features/document-explorer/components/create-folder-dialog/create-folder-dialog.component.d.ts +5 -2
  29. package/document-management/lib/features/document-explorer/document-explorer.component.d.ts +22 -20
  30. package/document-management/lib/features/document-explorer/document-explorer.viewmodel.d.ts +22 -2
  31. package/document-management/lib/features/document-explorer/views/attachement-widget/attachment-widget.component.d.ts +52 -33
  32. package/document-management/lib/features/document-explorer/views/detail-panel/detail-panel.component.d.ts +52 -33
  33. package/document-management/lib/features/document-explorer/views/details/details-view.component.d.ts +52 -33
  34. package/document-management/lib/features/document-explorer/views/large-icons/large-icons-view.component.d.ts +52 -33
  35. package/document-management/lib/features/document-explorer/views/large-tiles/large-tiles-view.component.d.ts +52 -33
  36. package/document-management/lib/features/document-explorer/views/list/list-view.component.d.ts +52 -33
  37. package/document-management/lib/features/document-explorer/views/small-icons/small-icons-view.component.d.ts +52 -33
  38. package/document-management/lib/features/document-explorer/views/small-tiles/small-tiles-view.component.d.ts +52 -33
  39. package/document-management/lib/features/drive/drive.component.d.ts +52 -31
  40. package/document-management/lib/features/drive-choose/drive-choose.component.d.ts +49 -28
  41. package/document-management/lib/features/shared/components/document-type-choose-file/document-type-choose-file.component.d.ts +6 -6
  42. package/document-management/lib/features/shared/components/folder-path-breadcrumbs/folder-path-breadcrumbs.component.d.ts +21 -2
  43. package/document-management/lib/features/shared/document-manager.service.d.ts +177 -45
  44. package/document-management/lib/features/shared/document-manager.types.d.ts +2 -1
  45. package/document-management/lib/features/shared/index.d.ts +1 -0
  46. package/fesm2022/acorex-modules-common.mjs +7 -0
  47. package/fesm2022/acorex-modules-common.mjs.map +1 -1
  48. package/fesm2022/acorex-modules-conversation.mjs +2382 -820
  49. package/fesm2022/acorex-modules-conversation.mjs.map +1 -1
  50. package/fesm2022/{acorex-modules-document-management-acorex-modules-document-management-BpmG6Dyx.mjs → acorex-modules-document-management-acorex-modules-document-management-BATdoqJi.mjs} +1679 -2019
  51. package/fesm2022/acorex-modules-document-management-acorex-modules-document-management-BATdoqJi.mjs.map +1 -0
  52. package/fesm2022/{acorex-modules-document-management-attachment-widget.component-DIF_t4fE.mjs → acorex-modules-document-management-attachment-widget.component-C1-gQepw.mjs} +2 -2
  53. package/fesm2022/{acorex-modules-document-management-attachment-widget.component-DIF_t4fE.mjs.map → acorex-modules-document-management-attachment-widget.component-C1-gQepw.mjs.map} +1 -1
  54. package/fesm2022/acorex-modules-document-management-create-folder-dialog.component-ZMvsadWt.mjs +144 -0
  55. package/fesm2022/acorex-modules-document-management-create-folder-dialog.component-ZMvsadWt.mjs.map +1 -0
  56. package/fesm2022/{acorex-modules-document-management-details-view.component-D0RIYrHB.mjs → acorex-modules-document-management-details-view.component-CvHIETNf.mjs} +2 -2
  57. package/fesm2022/{acorex-modules-document-management-details-view.component-D0RIYrHB.mjs.map → acorex-modules-document-management-details-view.component-CvHIETNf.mjs.map} +1 -1
  58. package/fesm2022/{acorex-modules-document-management-drive-choose.component-DMAQr0nK.mjs → acorex-modules-document-management-drive-choose.component-UTy9OISj.mjs} +29 -9
  59. package/fesm2022/acorex-modules-document-management-drive-choose.component-UTy9OISj.mjs.map +1 -0
  60. package/fesm2022/acorex-modules-document-management-drive.component-Crh10Z5J.mjs +363 -0
  61. package/fesm2022/acorex-modules-document-management-drive.component-Crh10Z5J.mjs.map +1 -0
  62. package/fesm2022/{acorex-modules-document-management-large-icons-view.component-C686Ec7s.mjs → acorex-modules-document-management-large-icons-view.component-BuV7MPG5.mjs} +2 -2
  63. package/fesm2022/{acorex-modules-document-management-large-icons-view.component-C686Ec7s.mjs.map → acorex-modules-document-management-large-icons-view.component-BuV7MPG5.mjs.map} +1 -1
  64. package/fesm2022/{acorex-modules-document-management-large-tiles-view.component-0GpMVYv5.mjs → acorex-modules-document-management-large-tiles-view.component-CwYwVxoG.mjs} +2 -2
  65. package/fesm2022/{acorex-modules-document-management-large-tiles-view.component-0GpMVYv5.mjs.map → acorex-modules-document-management-large-tiles-view.component-CwYwVxoG.mjs.map} +1 -1
  66. package/fesm2022/{acorex-modules-document-management-list-view.component-C1inszTC.mjs → acorex-modules-document-management-list-view.component-BHEwRA3m.mjs} +2 -2
  67. package/fesm2022/{acorex-modules-document-management-list-view.component-C1inszTC.mjs.map → acorex-modules-document-management-list-view.component-BHEwRA3m.mjs.map} +1 -1
  68. package/fesm2022/{acorex-modules-document-management-permission-definition.provider-B7lgRLHi.mjs → acorex-modules-document-management-permission-definition.provider-B3qaYwRL.mjs} +2 -2
  69. package/fesm2022/{acorex-modules-document-management-permission-definition.provider-B7lgRLHi.mjs.map → acorex-modules-document-management-permission-definition.provider-B3qaYwRL.mjs.map} +1 -1
  70. package/fesm2022/{acorex-modules-document-management-rename-node-dialog.component-C9k8WgDG.mjs → acorex-modules-document-management-rename-node-dialog.component-CrcJm9jP.mjs} +5 -5
  71. package/fesm2022/{acorex-modules-document-management-rename-node-dialog.component-C9k8WgDG.mjs.map → acorex-modules-document-management-rename-node-dialog.component-CrcJm9jP.mjs.map} +1 -1
  72. package/fesm2022/{acorex-modules-document-management-small-icons-view.component-BGcUzNCv.mjs → acorex-modules-document-management-small-icons-view.component-CD5UORaq.mjs} +2 -2
  73. package/fesm2022/{acorex-modules-document-management-small-icons-view.component-BGcUzNCv.mjs.map → acorex-modules-document-management-small-icons-view.component-CD5UORaq.mjs.map} +1 -1
  74. package/fesm2022/{acorex-modules-document-management-small-tiles-view.component-CumumWvO.mjs → acorex-modules-document-management-small-tiles-view.component-cpc_xfbT.mjs} +2 -2
  75. package/fesm2022/{acorex-modules-document-management-small-tiles-view.component-CumumWvO.mjs.map → acorex-modules-document-management-small-tiles-view.component-cpc_xfbT.mjs.map} +1 -1
  76. package/fesm2022/acorex-modules-document-management.mjs +1 -1
  77. package/fesm2022/{acorex-modules-issue-management-acorex-modules-issue-management-ErtEMU89.mjs → acorex-modules-issue-management-acorex-modules-issue-management-DbVfrgVX.mjs} +5 -5
  78. package/fesm2022/acorex-modules-issue-management-acorex-modules-issue-management-DbVfrgVX.mjs.map +1 -0
  79. package/fesm2022/{acorex-modules-issue-management-capture-screen.component-B6k0Zn9C.mjs → acorex-modules-issue-management-capture-screen.component-_9mwJVkz.mjs} +2 -2
  80. package/fesm2022/{acorex-modules-issue-management-capture-screen.component-B6k0Zn9C.mjs.map → acorex-modules-issue-management-capture-screen.component-_9mwJVkz.mjs.map} +1 -1
  81. package/fesm2022/acorex-modules-issue-management.mjs +1 -1
  82. package/fesm2022/acorex-modules-notification-management.mjs +5 -5
  83. package/fesm2022/acorex-modules-notification-management.mjs.map +1 -1
  84. package/fesm2022/{acorex-modules-organization-management-org-chart.page-CP8zz-Bc.mjs → acorex-modules-organization-management-org-chart.page-CrOUUr4c.mjs} +1 -2
  85. package/fesm2022/acorex-modules-organization-management-org-chart.page-CrOUUr4c.mjs.map +1 -0
  86. package/fesm2022/acorex-modules-organization-management.mjs +2 -2
  87. package/fesm2022/{acorex-modules-platform-management-acorex-modules-platform-management-C9ZApxct.mjs → acorex-modules-platform-management-acorex-modules-platform-management-DtXOjIIK.mjs} +326 -87
  88. package/fesm2022/acorex-modules-platform-management-acorex-modules-platform-management-DtXOjIIK.mjs.map +1 -0
  89. package/fesm2022/{acorex-modules-platform-management-list-version.component-D50Xundj.mjs → acorex-modules-platform-management-list-version.component-DY4yMd8n.mjs} +2 -2
  90. package/fesm2022/{acorex-modules-platform-management-list-version.component-D50Xundj.mjs.map → acorex-modules-platform-management-list-version.component-DY4yMd8n.mjs.map} +1 -1
  91. package/fesm2022/{acorex-modules-platform-management-settings.provider-DsHGn3AZ.mjs → acorex-modules-platform-management-settings.provider-BO-1dmVc.mjs} +2 -2
  92. package/fesm2022/{acorex-modules-platform-management-settings.provider-DsHGn3AZ.mjs.map → acorex-modules-platform-management-settings.provider-BO-1dmVc.mjs.map} +1 -1
  93. package/fesm2022/acorex-modules-platform-management.mjs +1 -1
  94. package/fesm2022/acorex-modules-project-management.mjs +108 -0
  95. package/fesm2022/acorex-modules-project-management.mjs.map +1 -1
  96. package/fesm2022/acorex-modules-settings-management.mjs +20 -21
  97. package/fesm2022/acorex-modules-settings-management.mjs.map +1 -1
  98. package/fesm2022/acorex-modules-workflow-management-task-board.page-3_Tn2GeA.mjs +305 -0
  99. package/fesm2022/acorex-modules-workflow-management-task-board.page-3_Tn2GeA.mjs.map +1 -0
  100. package/fesm2022/acorex-modules-workflow-management.mjs +123 -0
  101. package/fesm2022/acorex-modules-workflow-management.mjs.map +1 -0
  102. package/package.json +18 -14
  103. package/platform-management/lib/task-board.provider.d.ts +14 -0
  104. package/project-management/lib/task-board.provider.d.ts +14 -0
  105. package/settings-management/lib/settings-management.module.d.ts +1 -1
  106. package/workflow-management/README.md +3 -0
  107. package/workflow-management/index.d.ts +2 -0
  108. package/workflow-management/lib/const.d.ts +11 -0
  109. package/workflow-management/lib/features/task-board/index.d.ts +2 -0
  110. package/workflow-management/lib/features/task-board/settings.keys.d.ts +5 -0
  111. package/workflow-management/lib/features/task-board/task-board.module.d.ts +6 -0
  112. package/workflow-management/lib/features/task-board/task-board.page.d.ts +76 -0
  113. package/workflow-management/lib/features/task-board/task-board.service.d.ts +13 -0
  114. package/workflow-management/lib/features/task-board/task-board.viewmodel.d.ts +20 -0
  115. package/workflow-management/lib/features/task-board/views/task-board-calendar-view/task-board-calendar-view.page.d.ts +25 -0
  116. package/workflow-management/lib/workflow-management.module.d.ts +8 -0
  117. package/conversation/lib/entities/chat/chat.module.d.ts +0 -28
  118. package/conversation/lib/entities/chat/chat.service.d.ts +0 -14
  119. package/conversation/lib/entities/chat/chat.type.d.ts +0 -22
  120. package/conversation/lib/entities/chat/components/chat-item-footer/chat-item-footer.component.d.ts +0 -5
  121. package/conversation/lib/entities/chat/components/chat-item-header/chat-item-header.component.d.ts +0 -12
  122. package/conversation/lib/entities/chat/components/chat-preview-header/chat-preview-header.component.d.ts +0 -7
  123. package/conversation/lib/entities/chat/pages/chat/chat.component.d.ts +0 -23
  124. package/conversation/lib/entities/comments/comment.module.d.ts +0 -26
  125. package/conversation/lib/entities/comments/comments.service.d.ts +0 -13
  126. package/conversation/lib/entities/comments/comments.type.d.ts +0 -74
  127. package/document-management/lib/features/widgets/document-attachment/document-attachment-widget-column.component.d.ts +0 -6
  128. package/document-management/lib/features/widgets/document-attachment/document-attachment-widget-edit.component.d.ts +0 -212
  129. package/document-management/lib/features/widgets/document-attachment/document-attachment-widget-print.component.d.ts +0 -6
  130. package/document-management/lib/features/widgets/document-attachment/document-attachment-widget-view.component.d.ts +0 -6
  131. package/document-management/lib/features/widgets/document-attachment/document-attachment-widget.config.d.ts +0 -7
  132. package/document-management/lib/features/widgets/document-attachment/index.d.ts +0 -5
  133. package/document-management/lib/features/widgets/index.d.ts +0 -1
  134. package/fesm2022/acorex-modules-document-management-acorex-modules-document-management-BpmG6Dyx.mjs.map +0 -1
  135. package/fesm2022/acorex-modules-document-management-create-folder-dialog.component-CCvKUDsw.mjs +0 -141
  136. package/fesm2022/acorex-modules-document-management-create-folder-dialog.component-CCvKUDsw.mjs.map +0 -1
  137. package/fesm2022/acorex-modules-document-management-drive-choose.component-DMAQr0nK.mjs.map +0 -1
  138. package/fesm2022/acorex-modules-issue-management-acorex-modules-issue-management-ErtEMU89.mjs.map +0 -1
  139. package/fesm2022/acorex-modules-organization-management-org-chart.page-CP8zz-Bc.mjs.map +0 -1
  140. package/fesm2022/acorex-modules-platform-management-acorex-modules-platform-management-C9ZApxct.mjs.map +0 -1
  141. /package/conversation/lib/{entities/comments/pages → features/comment}/comment-lookup-popup.component.d.ts +0 -0
@@ -11,9 +11,9 @@ import * as i1 from '@acorex/platform/core';
11
11
  import { resolvePlatformScopeName, AXPPlatformScope } from '@acorex/platform/core';
12
12
  import { AXLocaleService } from '@acorex/core/locale';
13
13
  import { AXPLayoutThemeService } from '@acorex/platform/themes/shared';
14
- import { ROUTES } from '@angular/router';
15
14
  import { AXPSessionService, AXPAuthGuard } from '@acorex/platform/auth';
16
15
  import { AXPRootLayoutComponent } from '@acorex/platform/themes/default';
16
+ import { ROUTES } from '@angular/router';
17
17
 
18
18
  function searchSettings(groups, search) {
19
19
  const sectionMatchResult = [];
@@ -294,6 +294,23 @@ const AXPSettingsViewModel = signalStore(withState(() => ({
294
294
  onDestroy() { },
295
295
  })));
296
296
 
297
+ class AXPSettingSearchDefinitionProvider {
298
+ async provide(context) {
299
+ context.addDefinition('setting', 'Setting', 'setting', 'fa-solid fa-gear', 3, {
300
+ format: {
301
+ id: '{{data.name}}',
302
+ },
303
+ actions: [
304
+ {
305
+ name: 'navigate',
306
+ type: 'view',
307
+ priority: 'primary',
308
+ },
309
+ ],
310
+ });
311
+ }
312
+ }
313
+
297
314
  class AXPSettingSearchProvider {
298
315
  constructor() {
299
316
  this.settingService = inject(AXPSettingDefinitionProviderService);
@@ -343,23 +360,6 @@ class AXPSettingSearchProvider {
343
360
  }
344
361
  }
345
362
 
346
- class AXPSettingSearchDefinitionProvider {
347
- async provide(context) {
348
- context.addDefinition('setting', 'Setting', 'setting', 'fa-solid fa-gear', 3, {
349
- format: {
350
- id: '{{data.name}}',
351
- },
352
- actions: [
353
- {
354
- name: 'navigate',
355
- type: 'view',
356
- priority: 'primary',
357
- },
358
- ],
359
- });
360
- }
361
- }
362
-
363
363
  function routesFacory() {
364
364
  let routes = [
365
365
  {
@@ -386,8 +386,7 @@ function routesFacory() {
386
386
  return routes;
387
387
  }
388
388
  class AXMSettingsManagementModule {
389
- constructor(appInitService, injector) {
390
- }
389
+ constructor(appInitService, injector) { }
391
390
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXMSettingsManagementModule, deps: [{ token: i1.AXPAppStartUpService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.NgModule }); }
392
391
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.10", ngImport: i0, type: AXMSettingsManagementModule }); }
393
392
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXMSettingsManagementModule, providers: [
@@ -430,7 +429,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
430
429
  multi: true,
431
430
  useFactory: routesFacory,
432
431
  },
433
- ]
432
+ ],
434
433
  }]
435
434
  }], ctorParameters: () => [{ type: i1.AXPAppStartUpService }, { type: i0.Injector }] });
436
435
 
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-modules-settings-management.mjs","sources":["../../../../libs/modules/settings-management/src/lib/features/settings/convert-setting-data.ts","../../../../libs/modules/settings-management/src/lib/features/settings/settings.viewmodel.ts","../../../../libs/modules/settings-management/src/lib/features/settings/search.provider.ts","../../../../libs/modules/settings-management/src/lib/features/settings/search-definition.provider.ts","../../../../libs/modules/settings-management/src/lib/settings-management.module.ts","../../../../libs/modules/settings-management/src/acorex-modules-settings-management.ts"],"sourcesContent":["import { AXPSettingDefinitionGroup, AXPSettingDefinitionSection } from '@acorex/platform/common';\n\n\nexport function searchSettings(groups: AXPSettingDefinitionGroup[], search: string): AXPSettingDefinitionGroup[] {\n const sectionMatchResult: AXPSettingDefinitionGroup[] = [];\n const settingMatchResult: AXPSettingDefinitionGroup[] = [];\n const processedGroups = new Set<string>();\n\n const createGroupIdentifier = (group: AXPSettingDefinitionGroup): string => `${group.name}-${group.title}`;\n\n const addGroupToResult = (\n group: AXPSettingDefinitionGroup,\n sections: AXPSettingDefinitionSection[],\n resultArray: AXPSettingDefinitionGroup[]\n ) => {\n const groupId = createGroupIdentifier(group);\n if (!processedGroups.has(groupId)) {\n resultArray.push({\n ...group,\n sections,\n groups: [], // Exclude nested groups\n });\n processedGroups.add(groupId);\n }\n };\n\n const processSections = (\n group: AXPSettingDefinitionGroup,\n filterFn: (section: AXPSettingDefinitionSection) => boolean\n ) => {\n const matchedSections = group.sections.filter(filterFn);\n if (matchedSections.length > 0) {\n addGroupToResult(group, matchedSections, sectionMatchResult);\n }\n };\n\n const processSettings = (\n group: AXPSettingDefinitionGroup,\n filterFn: (section: AXPSettingDefinitionSection) => AXPSettingDefinitionSection | null\n ) => {\n const matchedSections = group.sections\n .map(filterFn)\n .filter((section): section is AXPSettingDefinitionSection => section !== null);\n if (matchedSections.length > 0) {\n addGroupToResult(group, matchedSections, settingMatchResult);\n }\n };\n\n const sectionMatches = (section: AXPSettingDefinitionSection): boolean =>\n section.name.toLowerCase().includes(search.toLowerCase()) ||\n section.title.toLowerCase().includes(search.toLowerCase());\n\n const filterSettings = (section: AXPSettingDefinitionSection): AXPSettingDefinitionSection | null => {\n const matchedSettings = section.settings.filter(\n (setting) =>\n setting.name.toLowerCase().includes(search.toLowerCase()) ||\n setting.title.toLowerCase().includes(search.toLowerCase())\n );\n return matchedSettings.length > 0 ? { ...section, settings: matchedSettings } : null;\n };\n\n const processGroupRecursively = (group: AXPSettingDefinitionGroup) => {\n processSections(group, sectionMatches); // Match sections with all settings\n processSettings(group, filterSettings); // Match settings within sections\n group.groups.forEach(processGroupRecursively); // Recurse into nested groups\n };\n\n groups.forEach(processGroupRecursively);\n\n return [...sectionMatchResult, ...settingMatchResult];\n}\n","import { AXPSettingDefinitionGroup, AXPSettingDefinitionProviderService, AXPSettingService } from \"@acorex/platform/common\";\nimport { AXPPageStatus } from \"@acorex/platform/layout/builder\";\nimport { computed, inject } from \"@angular/core\";\nimport { signalStore, withMethods, withComputed, withState, withHooks, patchState } from \"@ngrx/signals\";\nimport { get, isEmpty, isEqual, isNil } from \"lodash-es\";\nimport { filter, merge } from \"rxjs\";\nimport { searchSettings } from \"./convert-setting-data\";\nimport { AXFormComponent } from \"@acorex/components/form\";\nimport { AXToastService } from \"@acorex/components/toast\";\nimport { AXTranslationService } from \"@acorex/core/translation\";\nimport { AXPPlatformScopeKey, resolvePlatformScopeName, AXPPlatformScope } from \"@acorex/platform/core\";\nimport { AXLocaleService } from \"@acorex/core/locale\";\nimport { AXPLayoutThemeService } from \"@acorex/platform/themes/shared\";\n\n\n\nexport const AXPSettingsViewModel = signalStore(\n withState(() => ({\n groups: [] as AXPSettingDefinitionGroup[],\n activateGroup: undefined as AXPSettingDefinitionGroup | undefined,\n scope: 'U' as AXPPlatformScopeKey,\n //\n searchExpression: null as string | null,\n //\n previousContext: {} as Record<string, any>,\n context: {} as Record<string, any>,\n //\n status: AXPPageStatus.Processing,\n form: null as AXFormComponent | null,\n })),\n withComputed((store, layout = inject(AXPLayoutThemeService)) => ({\n searchResults: computed(() => searchSettings(store.groups(), store.searchExpression()!)),\n hasActivateGroup: computed(() => store.activateGroup() != null),\n showGroups: computed(() => store.activateGroup() != null && layout.isLarge()),\n scopeTitle: computed(() => {\n return `${resolvePlatformScopeName(store.scope())}.title`;\n }),\n scopeDescription: computed(() => {\n return `${resolvePlatformScopeName(store.scope())}.description`;\n }),\n isSearching: computed(() => store.searchExpression() != null),\n isBusy: computed(() => store.status() == AXPPageStatus.Processing),\n isSaving: computed(() => store.status() == AXPPageStatus.Submitting),\n isLoaded: computed(() => store.groups().length > 0),\n })),\n withMethods(\n (store,\n settingDefinitionService = inject(AXPSettingDefinitionProviderService),\n settingValueService = inject(AXPSettingService),\n toastService = inject(AXToastService),\n translateService = inject(AXTranslationService),\n ) => ({\n registerForm(form: AXFormComponent) {\n patchState(store, {\n form: form,\n })\n },\n async load(scope: AXPPlatformScopeKey) {\n patchState(store, {\n scope: scope,\n status: AXPPageStatus.Processing,\n })\n //\n const groups = await settingDefinitionService.getListAsync(scope);\n patchState(store, {\n groups: groups,\n })\n const currentContext = await settingValueService.scope(scope as AXPPlatformScope).all();\n const defaults = await settingValueService.scope(scope as AXPPlatformScope).defaultValues();\n patchState(store, {\n context: { ...defaults, ...currentContext },\n })\n patchState(store, {\n previousContext: store.context(),\n status: AXPPageStatus.Rendered,\n })\n },\n async reload() {\n await settingDefinitionService.reload();\n const groups = await settingDefinitionService.getListAsync(store.scope());\n const oldActivateGroupName = store.activateGroup()?.name;\n patchState(store, {\n groups: groups,\n activateGroup: undefined,\n })\n if (oldActivateGroupName) {\n this.setActivateGroupByName(oldActivateGroupName);\n }\n },\n updateContext(context: Record<string, any>) {\n patchState(store, {\n context: { ...store.context(), ...context },\n })\n },\n updatePreviousContext(context: Record<string, any>) {\n patchState(store, {\n previousContext: { ...store.previousContext(), ...context },\n })\n },\n setActivateGroup(group: AXPSettingDefinitionGroup) {\n patchState(store, {\n activateGroup: group,\n })\n },\n unloadActivateGroup() {\n patchState(store, {\n activateGroup: undefined,\n })\n },\n setActivateGroupByName(name: string) {\n const group = store.groups().find(g => g.name === name);\n if (group) {\n patchState(store, {\n activateGroup: group,\n })\n }\n },\n //\n async search(expression: string) {\n if (!isNil(expression) && !isEmpty(expression)) {\n patchState(store, {\n searchExpression: expression,\n })\n }\n else {\n patchState(store, {\n searchExpression: null,\n })\n }\n },\n clearSearch() {\n patchState(store, {\n searchExpression: null,\n })\n },\n isDirty() {\n return store.groups()?.some((group) =>\n group.sections.some((sec) =>\n sec.settings.some((setting) => {\n const currentValue = get(store.context(), setting.name);\n const previousValue = get(store.previousContext(), setting.name);\n return !isEqual(currentValue, previousValue);\n })\n )\n ) || false\n },\n async apply(): Promise<boolean> {\n const i18nScope = \"settings\";\n try {\n if (await store.form() && this.isDirty()) {\n const form = store.form()!;\n form.resetErrors();\n //\n patchState(store, {\n status: AXPPageStatus.Submitting,\n });\n const formResult = await form.validate();\n if (!formResult.result) {\n toastService.show({\n color: 'danger',\n title: await translateService.translateAsync('actions.apply.invalid.title', { scope: i18nScope }),\n content: await translateService.translateAsync('actions.apply.invalid.message', { scope: i18nScope }),\n location: 'bottom-center',\n closeButton: true,\n timeOut: 3000,\n timeOutProgress: true,\n });\n patchState(store, {\n status: AXPPageStatus.Error,\n });\n return false;\n }\n await settingValueService.scope(store.scope() as AXPPlatformScope).set(store.context());\n // Show success notification\n toastService.show({\n color: 'success',\n title: await translateService.translateAsync('actions.apply.success.title', { scope: i18nScope }),\n content: await translateService.translateAsync('actions.apply.success.message', { scope: i18nScope }),\n location: 'bottom-center',\n closeButton: true,\n timeOut: 3000,\n timeOutProgress: true,\n });\n patchState(store, {\n status: AXPPageStatus.Submitted,\n });\n return true;\n }\n return false;\n } catch (error) {\n toastService.show({\n color: 'danger',\n title: await translateService.translateAsync('actions.apply.error.title', { scope: i18nScope }),\n content: await translateService.translateAsync('actions.apply.error.message', { scope: i18nScope }),\n location: 'bottom-center',\n closeButton: true,\n timeOut: 3000,\n timeOutProgress: true,\n });\n patchState(store, {\n status: AXPPageStatus.Error,\n })\n return false;\n }\n },\n async discard() {\n const form = store.form()!;\n form.resetErrors();\n //\n patchState(store, {\n status: AXPPageStatus.Rendered,\n })\n patchState(store, {\n context: store.previousContext(),\n })\n },\n async resetToDefault() {\n // Update the context with the defaults\n const defaults = await settingValueService.scope(store.scope() as AXPPlatformScope).defaultValues();\n patchState(store, {\n context: defaults,\n })\n //\n const result = await this.apply();\n if (!result) {\n this.discard();\n }\n },\n })),\n withHooks((store,\n settingValueService = inject(AXPSettingService),\n translationService = inject(AXTranslationService),\n localeService = inject(AXLocaleService)\n ) => ({\n async onInit() {\n //\n settingValueService.onChanged.pipe(filter((c) => c.scope == store.scope())).subscribe((e) => {\n e.keys.forEach((k) => {\n const currentValue = e.values[k];\n const contextValue = get(store.context(), k);\n const previousValue = get(store.previousContext(), k);\n // Update only if there are actual changes\n if (!isEqual(previousValue, currentValue) || !isEqual(currentValue, contextValue)) {\n patchState(store, {\n previousContext: {\n ...store.previousContext(),\n [k]: currentValue,\n }\n });\n patchState(store, {\n context: {\n ...store.context(),\n [k]: currentValue,\n }\n });\n }\n });\n });\n //\n merge(\n translationService.langChanges$,\n localeService.profileChanged$\n ).subscribe(async () => {\n await store.reload();\n });\n\n },\n onDestroy() { },\n }))\n\n)","import { AXPSessionService } from '@acorex/platform/auth';\nimport {\n AXPSearchProvider,\n AXPSearchResult,\n AXPSettingDefinition,\n AXPSettingDefinitionGroup,\n AXPSettingDefinitionProviderService,\n} from '@acorex/platform/common';\nimport { AXPPlatformScope } from '@acorex/platform/core';\nimport { inject } from '@angular/core';\nimport { sortBy } from 'lodash-es';\n\nexport interface AXPSettingDefinitionSearch extends AXPSettingDefinition {\n group: AXPSettingDefinitionGroup;\n}\n\nexport class AXPSettingSearchProvider implements AXPSearchProvider {\n private settingService = inject(AXPSettingDefinitionProviderService);\n private sessionService = inject(AXPSessionService);\n\n async search(text: string): Promise<AXPSearchResult[]> {\n const groupsSetting = this.settingService.getList(AXPPlatformScope.User);\n if (groupsSetting.length == 0) {\n groupsSetting.push(...(await this.settingService.getListAsync(AXPPlatformScope.User)));\n }\n\n // Step 2: Flatten settings from groups\n const allSettings: AXPSettingDefinitionSearch[] = [];\n const extractSettings = (group: AXPSettingDefinitionGroup) => {\n for (const section of group.sections) {\n allSettings.push(...section.settings.map((x) => ({ ...x, group } as AXPSettingDefinitionSearch)));\n }\n for (const subGroup of group.groups) {\n extractSettings(subGroup); // Recursive extraction\n }\n };\n\n for (const group of groupsSetting) {\n extractSettings(group);\n }\n\n // Step 3: Search settings by title\n const searchResults = allSettings.filter((setting) => setting.title.toLowerCase().includes(text.toLowerCase()));\n\n return sortBy(\n searchResults.map<AXPSearchResult>((setting) => ({\n title: setting.title,\n description: setting.description,\n group: 'setting',\n data: setting,\n command: {\n name: 'navigate',\n options: {\n type: 'router',\n options: {\n path: `/${this.sessionService.application?.name}/settings/user/${setting.group.name}#${setting.title}`,\n },\n }\n },\n parent: setting.group\n ? {\n title: setting.group.title,\n data: setting.group as AXPSettingDefinitionGroup,\n }\n : undefined,\n })),\n ['title']\n );\n }\n}\n","import { AXPSearchDefinitionProvider, AXPSearchDefinitionProviderContext } from '@acorex/platform/common';\n\nexport class AXPSettingSearchDefinitionProvider implements AXPSearchDefinitionProvider {\n async provide(context: AXPSearchDefinitionProviderContext): Promise<void> {\n context.addDefinition('setting', 'Setting', 'setting', 'fa-solid fa-gear', 3, {\n format: {\n id: '{{data.name}}',\n },\n actions: [\n {\n name: 'navigate',\n type: 'view',\n priority: 'primary',\n },\n ],\n });\n }\n}\n","import { AXP_SEARCH_DEFINITION_PROVIDER, AXP_SEARCH_PROVIDER } from '@acorex/platform/common';\nimport { inject, Injector, NgModule } from '@angular/core';\nimport { AXPAppStartUpService } from '@acorex/platform/core';\nimport { Routes, ROUTES } from '@angular/router';\nimport { AXPAuthGuard } from '@acorex/platform/auth';\nimport { AXPRootLayoutComponent } from '@acorex/platform/themes/default';\nimport { AXPSettingSearchProvider } from './features/settings/search.provider';\nimport { AXPSettingSearchDefinitionProvider } from './features/settings/search-definition.provider';\n\nfunction routesFacory() {\n let routes: Routes = [\n {\n path: ':app/settings/:scope',\n canActivate: [AXPAuthGuard],\n loadComponent: () => {\n return AXPRootLayoutComponent;\n },\n children: [\n {\n path: '',\n loadComponent: () =>\n import('./features/settings/setting-page/setting-page.component').then(\n (c) => c.AXPSettingPageComponent\n ),\n data: { reuse: true },\n children: [\n {\n path: ':group',\n loadComponent: () =>\n import('./features/settings/setting-view/setting-view.component').then(\n (c) => c.AXPSettingsViewComponent\n ),\n },\n ],\n },\n ],\n },\n ]\n return routes;\n}\n\n@NgModule({\n imports: [\n ],\n exports: [],\n declarations: [],\n providers: [\n {\n provide: AXP_SEARCH_PROVIDER,\n useClass: AXPSettingSearchProvider,\n multi: true,\n },\n {\n provide: AXP_SEARCH_DEFINITION_PROVIDER,\n useClass: AXPSettingSearchDefinitionProvider,\n multi: true,\n },\n {\n provide: ROUTES,\n multi: true,\n useFactory: routesFacory,\n },\n ]\n})\nexport class AXMSettingsManagementModule {\n constructor(\n appInitService: AXPAppStartUpService,\n injector: Injector\n ) {\n\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAGgB,SAAA,cAAc,CAAC,MAAmC,EAAE,MAAc,EAAA;IAChF,MAAM,kBAAkB,GAAgC,EAAE;IAC1D,MAAM,kBAAkB,GAAgC,EAAE;AAC1D,IAAA,MAAM,eAAe,GAAG,IAAI,GAAG,EAAU;AAEzC,IAAA,MAAM,qBAAqB,GAAG,CAAC,KAAgC,KAAa,CAAA,EAAG,KAAK,CAAC,IAAI,CAAI,CAAA,EAAA,KAAK,CAAC,KAAK,EAAE;IAE1G,MAAM,gBAAgB,G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,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,EACR;AACD,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,YAAY,EAAE,EAAE;AAChB,oBAAA,SAAS,EAAE;AACP,wBAAA;AACI,4BAAA,OAAO,EAAE,mBAAmB;AAC5B,4BAAA,QAAQ,EAAE,wBAAwB;AAClC,4BAAA,KAAK,EAAE,IAAI;AACd,yBAAA;AACD,wBAAA;AACI,4BAAA,OAAO,EAAE,8BAA8B;AACvC,4BAAA,QAAQ,EAAE,kCAAkC;AAC5C,4BAAA,KAAK,EAAE,IAAI;AACd,yBAAA;AACD,wBAAA;AACI,4BAAA,OAAO,EAAE,MAAM;AACf,4BAAA,KAAK,EAAE,IAAI;AACX,4BAAA,UAAU,EAAE,YAAY;AAC3B,yBAAA;AACJ;AACJ,iBAAA;;;AC/DD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-modules-settings-management.mjs","sources":["../../../../libs/modules/settings-management/src/lib/features/settings/convert-setting-data.ts","../../../../libs/modules/settings-management/src/lib/features/settings/settings.viewmodel.ts","../../../../libs/modules/settings-management/src/lib/features/settings/search-definition.provider.ts","../../../../libs/modules/settings-management/src/lib/features/settings/search.provider.ts","../../../../libs/modules/settings-management/src/lib/settings-management.module.ts","../../../../libs/modules/settings-management/src/acorex-modules-settings-management.ts"],"sourcesContent":["import { AXPSettingDefinitionGroup, AXPSettingDefinitionSection } from '@acorex/platform/common';\n\n\nexport function searchSettings(groups: AXPSettingDefinitionGroup[], search: string): AXPSettingDefinitionGroup[] {\n const sectionMatchResult: AXPSettingDefinitionGroup[] = [];\n const settingMatchResult: AXPSettingDefinitionGroup[] = [];\n const processedGroups = new Set<string>();\n\n const createGroupIdentifier = (group: AXPSettingDefinitionGroup): string => `${group.name}-${group.title}`;\n\n const addGroupToResult = (\n group: AXPSettingDefinitionGroup,\n sections: AXPSettingDefinitionSection[],\n resultArray: AXPSettingDefinitionGroup[]\n ) => {\n const groupId = createGroupIdentifier(group);\n if (!processedGroups.has(groupId)) {\n resultArray.push({\n ...group,\n sections,\n groups: [], // Exclude nested groups\n });\n processedGroups.add(groupId);\n }\n };\n\n const processSections = (\n group: AXPSettingDefinitionGroup,\n filterFn: (section: AXPSettingDefinitionSection) => boolean\n ) => {\n const matchedSections = group.sections.filter(filterFn);\n if (matchedSections.length > 0) {\n addGroupToResult(group, matchedSections, sectionMatchResult);\n }\n };\n\n const processSettings = (\n group: AXPSettingDefinitionGroup,\n filterFn: (section: AXPSettingDefinitionSection) => AXPSettingDefinitionSection | null\n ) => {\n const matchedSections = group.sections\n .map(filterFn)\n .filter((section): section is AXPSettingDefinitionSection => section !== null);\n if (matchedSections.length > 0) {\n addGroupToResult(group, matchedSections, settingMatchResult);\n }\n };\n\n const sectionMatches = (section: AXPSettingDefinitionSection): boolean =>\n section.name.toLowerCase().includes(search.toLowerCase()) ||\n section.title.toLowerCase().includes(search.toLowerCase());\n\n const filterSettings = (section: AXPSettingDefinitionSection): AXPSettingDefinitionSection | null => {\n const matchedSettings = section.settings.filter(\n (setting) =>\n setting.name.toLowerCase().includes(search.toLowerCase()) ||\n setting.title.toLowerCase().includes(search.toLowerCase())\n );\n return matchedSettings.length > 0 ? { ...section, settings: matchedSettings } : null;\n };\n\n const processGroupRecursively = (group: AXPSettingDefinitionGroup) => {\n processSections(group, sectionMatches); // Match sections with all settings\n processSettings(group, filterSettings); // Match settings within sections\n group.groups.forEach(processGroupRecursively); // Recurse into nested groups\n };\n\n groups.forEach(processGroupRecursively);\n\n return [...sectionMatchResult, ...settingMatchResult];\n}\n","import { AXPSettingDefinitionGroup, AXPSettingDefinitionProviderService, AXPSettingService } from \"@acorex/platform/common\";\nimport { AXPPageStatus } from \"@acorex/platform/layout/builder\";\nimport { computed, inject } from \"@angular/core\";\nimport { signalStore, withMethods, withComputed, withState, withHooks, patchState } from \"@ngrx/signals\";\nimport { get, isEmpty, isEqual, isNil } from \"lodash-es\";\nimport { filter, merge } from \"rxjs\";\nimport { searchSettings } from \"./convert-setting-data\";\nimport { AXFormComponent } from \"@acorex/components/form\";\nimport { AXToastService } from \"@acorex/components/toast\";\nimport { AXTranslationService } from \"@acorex/core/translation\";\nimport { AXPPlatformScopeKey, resolvePlatformScopeName, AXPPlatformScope } from \"@acorex/platform/core\";\nimport { AXLocaleService } from \"@acorex/core/locale\";\nimport { AXPLayoutThemeService } from \"@acorex/platform/themes/shared\";\n\n\n\nexport const AXPSettingsViewModel = signalStore(\n withState(() => ({\n groups: [] as AXPSettingDefinitionGroup[],\n activateGroup: undefined as AXPSettingDefinitionGroup | undefined,\n scope: 'U' as AXPPlatformScopeKey,\n //\n searchExpression: null as string | null,\n //\n previousContext: {} as Record<string, any>,\n context: {} as Record<string, any>,\n //\n status: AXPPageStatus.Processing,\n form: null as AXFormComponent | null,\n })),\n withComputed((store, layout = inject(AXPLayoutThemeService)) => ({\n searchResults: computed(() => searchSettings(store.groups(), store.searchExpression()!)),\n hasActivateGroup: computed(() => store.activateGroup() != null),\n showGroups: computed(() => store.activateGroup() != null && layout.isLarge()),\n scopeTitle: computed(() => {\n return `${resolvePlatformScopeName(store.scope())}.title`;\n }),\n scopeDescription: computed(() => {\n return `${resolvePlatformScopeName(store.scope())}.description`;\n }),\n isSearching: computed(() => store.searchExpression() != null),\n isBusy: computed(() => store.status() == AXPPageStatus.Processing),\n isSaving: computed(() => store.status() == AXPPageStatus.Submitting),\n isLoaded: computed(() => store.groups().length > 0),\n })),\n withMethods(\n (store,\n settingDefinitionService = inject(AXPSettingDefinitionProviderService),\n settingValueService = inject(AXPSettingService),\n toastService = inject(AXToastService),\n translateService = inject(AXTranslationService),\n ) => ({\n registerForm(form: AXFormComponent) {\n patchState(store, {\n form: form,\n })\n },\n async load(scope: AXPPlatformScopeKey) {\n patchState(store, {\n scope: scope,\n status: AXPPageStatus.Processing,\n })\n //\n const groups = await settingDefinitionService.getListAsync(scope);\n patchState(store, {\n groups: groups,\n })\n const currentContext = await settingValueService.scope(scope as AXPPlatformScope).all();\n const defaults = await settingValueService.scope(scope as AXPPlatformScope).defaultValues();\n patchState(store, {\n context: { ...defaults, ...currentContext },\n })\n patchState(store, {\n previousContext: store.context(),\n status: AXPPageStatus.Rendered,\n })\n },\n async reload() {\n await settingDefinitionService.reload();\n const groups = await settingDefinitionService.getListAsync(store.scope());\n const oldActivateGroupName = store.activateGroup()?.name;\n patchState(store, {\n groups: groups,\n activateGroup: undefined,\n })\n if (oldActivateGroupName) {\n this.setActivateGroupByName(oldActivateGroupName);\n }\n },\n updateContext(context: Record<string, any>) {\n patchState(store, {\n context: { ...store.context(), ...context },\n })\n },\n updatePreviousContext(context: Record<string, any>) {\n patchState(store, {\n previousContext: { ...store.previousContext(), ...context },\n })\n },\n setActivateGroup(group: AXPSettingDefinitionGroup) {\n patchState(store, {\n activateGroup: group,\n })\n },\n unloadActivateGroup() {\n patchState(store, {\n activateGroup: undefined,\n })\n },\n setActivateGroupByName(name: string) {\n const group = store.groups().find(g => g.name === name);\n if (group) {\n patchState(store, {\n activateGroup: group,\n })\n }\n },\n //\n async search(expression: string) {\n if (!isNil(expression) && !isEmpty(expression)) {\n patchState(store, {\n searchExpression: expression,\n })\n }\n else {\n patchState(store, {\n searchExpression: null,\n })\n }\n },\n clearSearch() {\n patchState(store, {\n searchExpression: null,\n })\n },\n isDirty() {\n return store.groups()?.some((group) =>\n group.sections.some((sec) =>\n sec.settings.some((setting) => {\n const currentValue = get(store.context(), setting.name);\n const previousValue = get(store.previousContext(), setting.name);\n return !isEqual(currentValue, previousValue);\n })\n )\n ) || false\n },\n async apply(): Promise<boolean> {\n const i18nScope = \"settings\";\n try {\n if (await store.form() && this.isDirty()) {\n const form = store.form()!;\n form.resetErrors();\n //\n patchState(store, {\n status: AXPPageStatus.Submitting,\n });\n const formResult = await form.validate();\n if (!formResult.result) {\n toastService.show({\n color: 'danger',\n title: await translateService.translateAsync('actions.apply.invalid.title', { scope: i18nScope }),\n content: await translateService.translateAsync('actions.apply.invalid.message', { scope: i18nScope }),\n location: 'bottom-center',\n closeButton: true,\n timeOut: 3000,\n timeOutProgress: true,\n });\n patchState(store, {\n status: AXPPageStatus.Error,\n });\n return false;\n }\n await settingValueService.scope(store.scope() as AXPPlatformScope).set(store.context());\n // Show success notification\n toastService.show({\n color: 'success',\n title: await translateService.translateAsync('actions.apply.success.title', { scope: i18nScope }),\n content: await translateService.translateAsync('actions.apply.success.message', { scope: i18nScope }),\n location: 'bottom-center',\n closeButton: true,\n timeOut: 3000,\n timeOutProgress: true,\n });\n patchState(store, {\n status: AXPPageStatus.Submitted,\n });\n return true;\n }\n return false;\n } catch (error) {\n toastService.show({\n color: 'danger',\n title: await translateService.translateAsync('actions.apply.error.title', { scope: i18nScope }),\n content: await translateService.translateAsync('actions.apply.error.message', { scope: i18nScope }),\n location: 'bottom-center',\n closeButton: true,\n timeOut: 3000,\n timeOutProgress: true,\n });\n patchState(store, {\n status: AXPPageStatus.Error,\n })\n return false;\n }\n },\n async discard() {\n const form = store.form()!;\n form.resetErrors();\n //\n patchState(store, {\n status: AXPPageStatus.Rendered,\n })\n patchState(store, {\n context: store.previousContext(),\n })\n },\n async resetToDefault() {\n // Update the context with the defaults\n const defaults = await settingValueService.scope(store.scope() as AXPPlatformScope).defaultValues();\n patchState(store, {\n context: defaults,\n })\n //\n const result = await this.apply();\n if (!result) {\n this.discard();\n }\n },\n })),\n withHooks((store,\n settingValueService = inject(AXPSettingService),\n translationService = inject(AXTranslationService),\n localeService = inject(AXLocaleService)\n ) => ({\n async onInit() {\n //\n settingValueService.onChanged.pipe(filter((c) => c.scope == store.scope())).subscribe((e) => {\n e.keys.forEach((k) => {\n const currentValue = e.values[k];\n const contextValue = get(store.context(), k);\n const previousValue = get(store.previousContext(), k);\n // Update only if there are actual changes\n if (!isEqual(previousValue, currentValue) || !isEqual(currentValue, contextValue)) {\n patchState(store, {\n previousContext: {\n ...store.previousContext(),\n [k]: currentValue,\n }\n });\n patchState(store, {\n context: {\n ...store.context(),\n [k]: currentValue,\n }\n });\n }\n });\n });\n //\n merge(\n translationService.langChanges$,\n localeService.profileChanged$\n ).subscribe(async () => {\n await store.reload();\n });\n\n },\n onDestroy() { },\n }))\n\n)","import { AXPSearchDefinitionProvider, AXPSearchDefinitionProviderContext } from '@acorex/platform/common';\n\nexport class AXPSettingSearchDefinitionProvider implements AXPSearchDefinitionProvider {\n async provide(context: AXPSearchDefinitionProviderContext): Promise<void> {\n context.addDefinition('setting', 'Setting', 'setting', 'fa-solid fa-gear', 3, {\n format: {\n id: '{{data.name}}',\n },\n actions: [\n {\n name: 'navigate',\n type: 'view',\n priority: 'primary',\n },\n ],\n });\n }\n}\n","import { AXPSessionService } from '@acorex/platform/auth';\nimport {\n AXPSearchProvider,\n AXPSearchResult,\n AXPSettingDefinition,\n AXPSettingDefinitionGroup,\n AXPSettingDefinitionProviderService,\n} from '@acorex/platform/common';\nimport { AXPPlatformScope } from '@acorex/platform/core';\nimport { inject } from '@angular/core';\nimport { sortBy } from 'lodash-es';\n\nexport interface AXPSettingDefinitionSearch extends AXPSettingDefinition {\n group: AXPSettingDefinitionGroup;\n}\n\nexport class AXPSettingSearchProvider implements AXPSearchProvider {\n private settingService = inject(AXPSettingDefinitionProviderService);\n private sessionService = inject(AXPSessionService);\n\n async search(text: string): Promise<AXPSearchResult[]> {\n const groupsSetting = this.settingService.getList(AXPPlatformScope.User);\n if (groupsSetting.length == 0) {\n groupsSetting.push(...(await this.settingService.getListAsync(AXPPlatformScope.User)));\n }\n\n // Step 2: Flatten settings from groups\n const allSettings: AXPSettingDefinitionSearch[] = [];\n const extractSettings = (group: AXPSettingDefinitionGroup) => {\n for (const section of group.sections) {\n allSettings.push(...section.settings.map((x) => ({ ...x, group } as AXPSettingDefinitionSearch)));\n }\n for (const subGroup of group.groups) {\n extractSettings(subGroup); // Recursive extraction\n }\n };\n\n for (const group of groupsSetting) {\n extractSettings(group);\n }\n\n // Step 3: Search settings by title\n const searchResults = allSettings.filter((setting) => setting.title.toLowerCase().includes(text.toLowerCase()));\n\n return sortBy(\n searchResults.map<AXPSearchResult>((setting) => ({\n title: setting.title,\n description: setting.description,\n group: 'setting',\n data: setting,\n command: {\n name: 'navigate',\n options: {\n type: 'router',\n options: {\n path: `/${this.sessionService.application?.name}/settings/user/${setting.group.name}#${setting.title}`,\n },\n }\n },\n parent: setting.group\n ? {\n title: setting.group.title,\n data: setting.group as AXPSettingDefinitionGroup,\n }\n : undefined,\n })),\n ['title']\n );\n }\n}\n","import { AXPAuthGuard } from '@acorex/platform/auth';\nimport { AXP_SEARCH_DEFINITION_PROVIDER, AXP_SEARCH_PROVIDER } from '@acorex/platform/common';\nimport { AXPAppStartUpService } from '@acorex/platform/core';\nimport { AXPRootLayoutComponent } from '@acorex/platform/themes/default';\nimport { Injector, NgModule } from '@angular/core';\nimport { Routes, ROUTES } from '@angular/router';\nimport { AXPSettingSearchDefinitionProvider } from './features/settings/search-definition.provider';\nimport { AXPSettingSearchProvider } from './features/settings/search.provider';\n\nfunction routesFacory() {\n let routes: Routes = [\n {\n path: ':app/settings/:scope',\n canActivate: [AXPAuthGuard],\n loadComponent: () => {\n return AXPRootLayoutComponent;\n },\n children: [\n {\n path: '',\n loadComponent: () =>\n import('./features/settings/setting-page/setting-page.component').then((c) => c.AXPSettingPageComponent),\n data: { reuse: true },\n children: [\n {\n path: ':group',\n loadComponent: () =>\n import('./features/settings/setting-view/setting-view.component').then(\n (c) => c.AXPSettingsViewComponent,\n ),\n },\n ],\n },\n ],\n },\n ];\n return routes;\n}\n\n@NgModule({\n imports: [],\n exports: [],\n declarations: [],\n providers: [\n {\n provide: AXP_SEARCH_PROVIDER,\n useClass: AXPSettingSearchProvider,\n multi: true,\n },\n {\n provide: AXP_SEARCH_DEFINITION_PROVIDER,\n useClass: AXPSettingSearchDefinitionProvider,\n multi: true,\n },\n {\n provide: ROUTES,\n multi: true,\n useFactory: routesFacory,\n },\n ],\n})\nexport class AXMSettingsManagementModule {\n constructor(appInitService: AXPAppStartUpService, injector: Injector) {}\n}\n","/**\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QAAQ,EAAE,wBAAwB;AAClC,gBAAA,KAAK,EAAE,IAAI;AACZ,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,8BAA8B;AACvC,gBAAA,QAAQ,EAAE,kCAAkC;AAC5C,gBAAA,KAAK,EAAE,IAAI;AACZ,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,MAAM;AACf,gBAAA,KAAK,EAAE,IAAI;AACX,gBAAA,UAAU,EAAE,YAAY;AACzB,aAAA;AACF,SAAA,EAAA,CAAA,CAAA;;4FAEU,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBAtBvC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,YAAY,EAAE,EAAE;AAChB,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,mBAAmB;AAC5B,4BAAA,QAAQ,EAAE,wBAAwB;AAClC,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACD,wBAAA;AACE,4BAAA,OAAO,EAAE,8BAA8B;AACvC,4BAAA,QAAQ,EAAE,kCAAkC;AAC5C,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACD,wBAAA;AACE,4BAAA,OAAO,EAAE,MAAM;AACf,4BAAA,KAAK,EAAE,IAAI;AACX,4BAAA,UAAU,EAAE,YAAY;AACzB,yBAAA;AACF,qBAAA;AACF,iBAAA;;;AC5DD;;AAEG;;;;"}
@@ -0,0 +1,305 @@
1
+ import { AXBadgeModule } from '@acorex/components/badge';
2
+ import { AXBreadcrumbsModule } from '@acorex/components/breadcrumbs';
3
+ import * as i4 from '@acorex/components/button';
4
+ import { AXButtonModule } from '@acorex/components/button';
5
+ import { AXCalendarComponent } from '@acorex/components/calendar';
6
+ import * as i6 from '@acorex/components/decorators';
7
+ import { AXDecoratorModule } from '@acorex/components/decorators';
8
+ import { AXDropdownPanelComponent } from '@acorex/components/dropdown';
9
+ import { AXDropdownButtonModule } from '@acorex/components/dropdown-button';
10
+ import { AXLoadingModule } from '@acorex/components/loading';
11
+ import * as i3 from '@acorex/components/menu';
12
+ import { AXMenuModule } from '@acorex/components/menu';
13
+ import * as i7 from '@acorex/components/popover';
14
+ import { AXPopoverModule } from '@acorex/components/popover';
15
+ import { AXLocaleService } from '@acorex/core/locale';
16
+ import * as i5 from '@acorex/core/translation';
17
+ import { AXTranslationModule } from '@acorex/core/translation';
18
+ import { AXPThemeLayoutBlockComponent } from '@acorex/platform/layout/components';
19
+ import { AXPPageLayoutBaseComponent, AXPPageLayoutComponent, AXPPageLayoutBase } from '@acorex/platform/layout/views';
20
+ import * as i2 from '@angular/common';
21
+ import { CommonModule } from '@angular/common';
22
+ import * as i0 from '@angular/core';
23
+ import { computed, inject, viewChild, input, model, output, ViewEncapsulation, ChangeDetectionStrategy, Component, signal } from '@angular/core';
24
+ import * as i1 from '@angular/forms';
25
+ import { FormsModule } from '@angular/forms';
26
+ import { RouterModule } from '@angular/router';
27
+ import { AXPTaskBoardService } from './acorex-modules-workflow-management.mjs';
28
+ import { AXPSettingService } from '@acorex/platform/common';
29
+ import { AXPPlatformScope } from '@acorex/platform/core';
30
+ import { signalStore, withState, withComputed, withMethods, patchState } from '@ngrx/signals';
31
+ import { AXSchedulerComponent } from '@acorex/components/scheduler';
32
+
33
+ const config = {
34
+ i18n: 'workflow-management',
35
+ };
36
+ const RootConfig = {
37
+ config,
38
+ module: {
39
+ module: 'WorkflowManagement',
40
+ name: 'WorkflowManagement',
41
+ title: `t('module-name', {scope:"${config.i18n}"})`,
42
+ icon: 'fa-light fa-clipboard-list-check',
43
+ },
44
+ };
45
+
46
+ var AXMTaskBoardSettings;
47
+ (function (AXMTaskBoardSettings) {
48
+ AXMTaskBoardSettings["CalendarViewMode"] = "taskboard.calendar.viewMode";
49
+ AXMTaskBoardSettings["CurrentDate"] = "taskboard.calendar.currentDate";
50
+ AXMTaskBoardSettings["SelectedTaskTypeFilter"] = "taskboard.filter.selectedTaskType";
51
+ })(AXMTaskBoardSettings || (AXMTaskBoardSettings = {}));
52
+
53
+ const AXMTaskBoardViewModel = signalStore({ providedIn: 'root' }, withState(() => ({
54
+ isLoading: true, // Start with loading true until initialized
55
+ calendarViewMode: 'month', // Default value
56
+ currentDate: new Date(), // Default to today
57
+ selectedTaskTypeName: null, // Store the name/ID of the task type for persistence
58
+ taskTypes: [],
59
+ })), withComputed((store) => ({
60
+ // Computed property to get the actual AXPWorkflowTaskProvider object
61
+ selectedTaskType: computed(() => {
62
+ const name = store.selectedTaskTypeName();
63
+ if (!name) {
64
+ return null;
65
+ }
66
+ return store.taskTypes().find((tt) => tt.name === name) || null;
67
+ }),
68
+ // Example computed (you can add more as needed):
69
+ // isMonthView: computed(() => store.calendarViewMode() === 'month'),
70
+ })), withMethods((store, settingService = inject(AXPSettingService), // Inject the main service
71
+ taskBoardService = inject(AXPTaskBoardService)) => ({
72
+ async initialize() {
73
+ patchState(store, { isLoading: true });
74
+ const userScopedSettings = settingService.scope(AXPPlatformScope.User); // Get user scope once
75
+ try {
76
+ // 1. Load Task Types first
77
+ const taskTypes = await taskBoardService.getTaskTypes();
78
+ patchState(store, { taskTypes });
79
+ // 2. Load Persisted Settings individually
80
+ const [savedViewMode, savedDateString, savedTaskTypeName] = await Promise.all([
81
+ userScopedSettings.get(AXMTaskBoardSettings.CalendarViewMode),
82
+ userScopedSettings.get(AXMTaskBoardSettings.CurrentDate),
83
+ userScopedSettings.get(AXMTaskBoardSettings.SelectedTaskTypeFilter),
84
+ ]);
85
+ patchState(store, {
86
+ calendarViewMode: savedViewMode || 'month', // Fallback to default
87
+ currentDate: savedDateString ? new Date(savedDateString) : new Date(), // Parse stored date string
88
+ selectedTaskTypeName: savedTaskTypeName || null, // Load persisted task type name
89
+ isLoading: false,
90
+ });
91
+ }
92
+ catch (error) {
93
+ console.error('Error initializing TaskBoard ViewModel:', error);
94
+ // Fallback to defaults on error to ensure the app is usable
95
+ patchState(store, {
96
+ calendarViewMode: 'month',
97
+ currentDate: new Date(),
98
+ selectedTaskTypeName: null,
99
+ taskTypes: store.taskTypes(), // Retain loaded task types if any, or empty if error was before taskTypes load
100
+ isLoading: false,
101
+ });
102
+ }
103
+ },
104
+ setCalendarViewMode(mode) {
105
+ patchState(store, { calendarViewMode: mode });
106
+ settingService
107
+ .scope(AXPPlatformScope.User)
108
+ .set(AXMTaskBoardSettings.CalendarViewMode, mode)
109
+ .catch((error) => console.error('Error saving calendar view mode:', error));
110
+ },
111
+ setCurrentDate(date) {
112
+ patchState(store, { currentDate: new Date(date) }); // Ensure it's a new Date object
113
+ settingService
114
+ .scope(AXPPlatformScope.User)
115
+ .set(AXMTaskBoardSettings.CurrentDate, date.toISOString()) // Store as ISO string
116
+ .catch((error) => console.error('Error saving current date:', error));
117
+ },
118
+ setSelectedTaskTypeProvider(taskType) {
119
+ const taskTypeName = taskType ? taskType.name : null;
120
+ patchState(store, { selectedTaskTypeName: taskTypeName });
121
+ settingService
122
+ .scope(AXPPlatformScope.User)
123
+ .set(AXMTaskBoardSettings.SelectedTaskTypeFilter, taskTypeName)
124
+ .catch((error) => console.error('Error saving selected task type filter:', error));
125
+ },
126
+ })));
127
+
128
+ /**
129
+ * Component for displaying and interacting with an organizational chart.
130
+ */
131
+ class AXMTaskBoardCalendarViewComponent {
132
+ constructor() {
133
+ this.taskBoardService = inject(AXPTaskBoardService);
134
+ this.schedulerComponent = viewChild(AXSchedulerComponent);
135
+ this.startingDate = input(new Date());
136
+ this.selectedView = model('day');
137
+ this.dataSource = input.required();
138
+ this.onTaskChanged = output();
139
+ this.onMonthSlotDblClicked = output();
140
+ this.component = output();
141
+ this.onTaskRightClick = output();
142
+ }
143
+ ngAfterViewInit() {
144
+ if (this.schedulerComponent()) {
145
+ this.component.emit(this.schedulerComponent());
146
+ }
147
+ }
148
+ onTaskDrop(event) {
149
+ this.taskBoardService
150
+ .updateTask(event.appointment, {
151
+ from: event.slot.startDate.date,
152
+ end: event.slot.endDate.date,
153
+ })
154
+ .then((task) => {
155
+ this.onTaskChanged.emit(task);
156
+ this.schedulerComponent()?.refresh([task]);
157
+ });
158
+ }
159
+ onTaskRightClickHandler(event) {
160
+ this.onTaskRightClick.emit(event);
161
+ }
162
+ onSlotDblClicked(event) {
163
+ if (event.sender.selectedView() === 'month') {
164
+ this.onMonthSlotDblClicked.emit(event.slot.startDate.date);
165
+ }
166
+ }
167
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXMTaskBoardCalendarViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
168
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.10", type: AXMTaskBoardCalendarViewComponent, isStandalone: true, selector: "axm-task-board-calendar-view", inputs: { startingDate: { classPropertyName: "startingDate", publicName: "startingDate", isSignal: true, isRequired: false, transformFunction: null }, selectedView: { classPropertyName: "selectedView", publicName: "selectedView", isSignal: true, isRequired: false, transformFunction: null }, dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { selectedView: "selectedViewChange", onTaskChanged: "onTaskChanged", onMonthSlotDblClicked: "onMonthSlotDblClicked", component: "component", onTaskRightClick: "onTaskRightClick" }, viewQueries: [{ propertyName: "schedulerComponent", first: true, predicate: AXSchedulerComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<ax-scheduler\n [hasHeader]=\"false\"\n [dataSource]=\"dataSource()\"\n [startingDate]=\"startingDate()\"\n [selectedView]=\"selectedView()\"\n (onAppointmentDrop)=\"onTaskDrop($event)\"\n (onSlotDblClicked)=\"onSlotDblClicked($event)\"\n (onAppointmentRightClick)=\"onTaskRightClickHandler($event)\"\n></ax-scheduler>\n", styles: ["ax-scheduler{line-height:1.5;background-color:rgba(var(--ax-sys-color-lightest-surface))!important}\n"], dependencies: [{ kind: "component", type: AXSchedulerComponent, selector: "ax-scheduler", inputs: ["calendar", "startingDate", "endDayHour", "startDayHour", "hasHeader", "readonly", "draggable", "allowFullScreen", "multiDayViewDaysCount", "dataSource", "firstDayOfWeek", "views", "selectedView"], outputs: ["selectedViewChange", "onDataLoaded", "onRangeChanged", "onSlotClicked", "onSlotDblClicked", "onSlotRightClick", "onAppointmentDrop", "onAppointmentClicked", "onAppointmentDblClicked", "onAppointmentRightClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
169
+ }
170
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXMTaskBoardCalendarViewComponent, decorators: [{
171
+ type: Component,
172
+ args: [{ selector: 'axm-task-board-calendar-view', imports: [AXSchedulerComponent], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ax-scheduler\n [hasHeader]=\"false\"\n [dataSource]=\"dataSource()\"\n [startingDate]=\"startingDate()\"\n [selectedView]=\"selectedView()\"\n (onAppointmentDrop)=\"onTaskDrop($event)\"\n (onSlotDblClicked)=\"onSlotDblClicked($event)\"\n (onAppointmentRightClick)=\"onTaskRightClickHandler($event)\"\n></ax-scheduler>\n", styles: ["ax-scheduler{line-height:1.5;background-color:rgba(var(--ax-sys-color-lightest-surface))!important}\n"] }]
173
+ }] });
174
+
175
+ /**
176
+ * Component for displaying and interacting with an organizational chart.
177
+ */
178
+ class AXMTaskBoardPage extends AXPPageLayoutBaseComponent {
179
+ constructor() {
180
+ super(...arguments);
181
+ this.rootConfig = RootConfig;
182
+ this.localeService = inject(AXLocaleService);
183
+ this.taskBoardService = inject(AXPTaskBoardService);
184
+ this.vm = inject(AXMTaskBoardViewModel);
185
+ this.currentTask = signal(null);
186
+ this.schedulerComponent = signal(null);
187
+ this.viewsItems = signal([
188
+ { key: 'day', text: 'daily', icon: 'fa-light fa-calendar-day' },
189
+ { key: 'week', text: 'weekly', icon: 'fa-light fa-calendar-week' },
190
+ { key: 'month', text: 'monthly', icon: 'fa-light fa-calendar-alt' },
191
+ { key: 'agenda', text: 'agenda', icon: 'fa-light fa-calendar-range' },
192
+ ]);
193
+ this.calendarType = computed(() => this.localeService.activeProfile().calendar.system);
194
+ this.contextMenu = viewChild('rootContextMenu');
195
+ this.selectedViewMode = computed(() => this.viewsItems().find((item) => item.key === this.vm.calendarViewMode()) || this.viewsItems()[0]);
196
+ this.dataSource = (filter) => {
197
+ const taskTypeProvider = this.vm.selectedTaskType();
198
+ const types = taskTypeProvider ? [taskTypeProvider.name] : undefined;
199
+ return this.taskBoardService.getTasks({ ...filter, types });
200
+ };
201
+ }
202
+ async ngOnInit() {
203
+ await super.ngOnInit();
204
+ await this.vm.initialize();
205
+ }
206
+ async getPageTitle() {
207
+ return await this.translateService.translateAsync('task-board.page-title', { scope: this.rootConfig.config.i18n });
208
+ }
209
+ async getPageBreadcrumbs() {
210
+ return [
211
+ {
212
+ title: await this.translateService.translateAsync('root-menu', { scope: this.rootConfig.config.i18n }),
213
+ },
214
+ ];
215
+ }
216
+ schedulerComponentChanged(component) {
217
+ this.schedulerComponent.set(component);
218
+ }
219
+ handleContextMenuOnOpening(event) {
220
+ for (const item of this.currentTask()?.data?.actions || []) {
221
+ event.items.push({
222
+ text: item.title,
223
+ icon: item.icon,
224
+ data: {
225
+ command: item.command,
226
+ },
227
+ });
228
+ }
229
+ }
230
+ handleTaskRightClick(event) {
231
+ this.currentTask.set(event.appointment);
232
+ const x = event.nativeEvent.clientX;
233
+ const y = event.nativeEvent.clientY;
234
+ const element = event.sender.nativeElement;
235
+ this.contextMenu()?.showAt({ x, y }, element);
236
+ }
237
+ handleMonthSlotDblClicked(date) {
238
+ this.vm.setCurrentDate(date);
239
+ this.vm.setCalendarViewMode('day');
240
+ }
241
+ handleCalendarViewChange(view) {
242
+ this.vm.setCalendarViewMode(view);
243
+ }
244
+ handleSelectedTaskTypeChange(taskType) {
245
+ this.vm.setSelectedTaskTypeProvider(taskType);
246
+ this.schedulerComponent()?.refresh();
247
+ }
248
+ handleSchedulerDateChanged(event) {
249
+ if (this.vm.isLoading()) {
250
+ return;
251
+ }
252
+ const newDate = event.value;
253
+ const currentDateInVm = this.vm.currentDate();
254
+ const dateToSet = newDate || new Date();
255
+ if (!currentDateInVm || currentDateInVm.getTime() !== dateToSet.getTime()) {
256
+ this.vm.setCurrentDate(dateToSet);
257
+ }
258
+ }
259
+ handleContextMenuItemClick(event) {
260
+ this.taskBoardService.executeCommand(event.item.data?.command, this.currentTask()?.data?.provider);
261
+ }
262
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXMTaskBoardPage, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
263
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: AXMTaskBoardPage, isStandalone: true, selector: "ng-component", providers: [
264
+ {
265
+ provide: AXPPageLayoutBase,
266
+ useExisting: AXMTaskBoardPage,
267
+ },
268
+ ], viewQueries: [{ propertyName: "contextMenu", first: true, predicate: ["rootContextMenu"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<axp-page-layout *translate=\"let t\">\n <axp-page-toolbar>\n <axp-layout-prefix>\n <ax-button\n [text]=\"t(vm.selectedTaskType()?.title || 'task-board.all', { scope: rootConfig.config.i18n }) | async\"\n >\n <ax-prefix><ax-icon icon=\"fa-light {{vm.selectedTaskType()?.icon || 'fa-tasks'}}\"></ax-icon></ax-prefix>\n <ax-dropdown-panel>\n <ax-button-item-list class=\"ax-p-2\">\n <ax-button-item\n (onClick)=\"handleSelectedTaskTypeChange(null)\"\n [text]=\"(t('task-board.all', { scope: rootConfig.config.i18n }) | async)!\"\n >\n <ax-prefix><ax-icon icon=\"fa-light fa-tasks\"></ax-icon></ax-prefix>\n </ax-button-item>\n @for(item of vm.taskTypes(); track item.name) {\n <ax-button-item\n (onClick)=\"handleSelectedTaskTypeChange(item)\"\n [text]=\"(t(item.title, { scope: rootConfig.config.i18n }) | async)!\"\n >\n <ax-prefix><ax-icon icon=\"fa-light {{ item.icon }}\"></ax-icon></ax-prefix>\n </ax-button-item>\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n\n <div class=\"ax-scheduler-header\">\n <ax-button look=\"blank\" (onClick)=\"schedulerComponent()?.prevClick()\">\n <ax-icon class=\"ax-icon ax-text-xl ax-icon-chevron-left arrow-icon\"></ax-icon>\n </ax-button>\n <ax-button look=\"blank\" [text]=\"schedulerComponent()?.currentDateText()\" #date></ax-button>\n <ax-button look=\"blank\" (onClick)=\"schedulerComponent()?.nextClick()\">\n <ax-icon class=\"ax-icon ax-text-xl ax-icon-chevron-right arrow-icon\"></ax-icon>\n </ax-button>\n <ax-popover [target]=\"date\" [placement]=\"'bottom'\">\n <div class=\"ax-overlay-pane\">\n <ax-calendar\n [type]=\"calendarType()\"\n [ngModel]=\"vm.currentDate()\"\n [depth]=\"schedulerComponent()?.calendarDepth()\"\n (onValueChanged)=\"handleSchedulerDateChanged($event)\"\n ></ax-calendar>\n </div>\n </ax-popover>\n </div>\n </axp-layout-prefix>\n <axp-layout-suffix>\n <ax-button>\n <ax-icon icon=\"fa-light {{ selectedViewMode().icon }}\"></ax-icon>\n <ax-dropdown-panel>\n <ax-button-item-list>\n @for(item of viewsItems(); track item.key) {\n <ax-button-item\n [text]=\"(t('dateTime.duration.' + item.text, { scope: 'common' }) | async)!\"\n [selected]=\"vm.calendarViewMode() === item.key\"\n (onClick)=\"handleCalendarViewChange(item.key)\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light {{ item.icon }}\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n @if(item.break) {\n <ax-divider></ax-divider>\n } }\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n </axp-layout-suffix>\n </axp-page-toolbar>\n <axp-page-content class=\"ax-overflow-hidden\">\n <axm-task-board-calendar-view\n class=\"axp-scheduler-container\"\n [dataSource]=\"dataSource\"\n [startingDate]=\"vm.currentDate()\"\n [selectedView]=\"vm.calendarViewMode()\"\n (component)=\"schedulerComponentChanged($event)\"\n (onTaskRightClick)=\"handleTaskRightClick($event)\"\n (onMonthSlotDblClicked)=\"handleMonthSlotDblClicked($event)\"\n ></axm-task-board-calendar-view>\n <ax-context-menu\n #rootContextMenu\n [closeOn]=\"'leave'\"\n [orientation]=\"'vertical'\"\n (onOpening)=\"handleContextMenuOnOpening($event)\"\n (onItemClick)=\"handleContextMenuItemClick($event)\"\n >\n </ax-context-menu>\n </axp-page-content>\n</axp-page-layout>\n", styles: ["axm-task-board-calendar-view{height:100%}html[dir=rtl] axp-page-layout axp-page-toolbar axp-layout-prefix .ax-scheduler-header .arrow-icon:before{-moz-transform:scale(-1,1);-webkit-transform:scale(-1,1);-o-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scaleX(-1)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: RouterModule }, { kind: "ngmodule", type:
269
+ //
270
+ AXMenuModule }, { kind: "component", type: i3.AXContextMenuComponent, selector: "ax-context-menu", inputs: ["orientation", "openOn", "closeOn", "items", "target"], outputs: ["onItemClick", "onOpening"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i4.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: i4.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i4.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDropdownButtonModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i5.AXTranslatorDirective, selector: "[translate]" }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i6.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { 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: AXLoadingModule }, { kind: "ngmodule", type: AXBreadcrumbsModule }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type:
271
+ //
272
+ 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, " }, { kind: "component", type: AXPPageLayoutComponent, selector: "axp-page-layout" }, { kind: "component", type: AXMTaskBoardCalendarViewComponent, selector: "axm-task-board-calendar-view", inputs: ["startingDate", "selectedView", "dataSource"], outputs: ["selectedViewChange", "onTaskChanged", "onMonthSlotDblClicked", "component", "onTaskRightClick"] }, { kind: "component", type: AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "placement", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "component", type: i7.AXPopoverComponent, selector: "ax-popover", inputs: ["offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "component", type: AXCalendarComponent, selector: "ax-calendar", inputs: ["rtl", "readonly", "value", "name", "disabled", "depth", "activeView", "minValue", "maxValue", "disabledDates", "holidayDates", "type", "cellTemplate", "cellClass", "showNavigation", "count", "id"], outputs: ["onOptionChanged", "valueChange", "onValueChanged", "minValueChange", "maxValueChange", "onBlur", "onFocus", "depthChange", "typeChange", "activeViewChange", "disabledDatesChange", "holidayDatesChange", "onNavigate", "onSlotClick", "countChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
273
+ }
274
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXMTaskBoardPage, decorators: [{
275
+ type: Component,
276
+ args: [{ imports: [
277
+ FormsModule,
278
+ CommonModule,
279
+ RouterModule,
280
+ //
281
+ AXMenuModule,
282
+ AXButtonModule,
283
+ AXDropdownButtonModule,
284
+ AXTranslationModule,
285
+ AXDecoratorModule,
286
+ AXLoadingModule,
287
+ AXBreadcrumbsModule,
288
+ AXBadgeModule,
289
+ //
290
+ AXPThemeLayoutBlockComponent,
291
+ AXPPageLayoutComponent,
292
+ AXMTaskBoardCalendarViewComponent,
293
+ AXDropdownPanelComponent,
294
+ AXPopoverModule,
295
+ AXCalendarComponent,
296
+ ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
297
+ {
298
+ provide: AXPPageLayoutBase,
299
+ useExisting: AXMTaskBoardPage,
300
+ },
301
+ ], template: "<axp-page-layout *translate=\"let t\">\n <axp-page-toolbar>\n <axp-layout-prefix>\n <ax-button\n [text]=\"t(vm.selectedTaskType()?.title || 'task-board.all', { scope: rootConfig.config.i18n }) | async\"\n >\n <ax-prefix><ax-icon icon=\"fa-light {{vm.selectedTaskType()?.icon || 'fa-tasks'}}\"></ax-icon></ax-prefix>\n <ax-dropdown-panel>\n <ax-button-item-list class=\"ax-p-2\">\n <ax-button-item\n (onClick)=\"handleSelectedTaskTypeChange(null)\"\n [text]=\"(t('task-board.all', { scope: rootConfig.config.i18n }) | async)!\"\n >\n <ax-prefix><ax-icon icon=\"fa-light fa-tasks\"></ax-icon></ax-prefix>\n </ax-button-item>\n @for(item of vm.taskTypes(); track item.name) {\n <ax-button-item\n (onClick)=\"handleSelectedTaskTypeChange(item)\"\n [text]=\"(t(item.title, { scope: rootConfig.config.i18n }) | async)!\"\n >\n <ax-prefix><ax-icon icon=\"fa-light {{ item.icon }}\"></ax-icon></ax-prefix>\n </ax-button-item>\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n\n <div class=\"ax-scheduler-header\">\n <ax-button look=\"blank\" (onClick)=\"schedulerComponent()?.prevClick()\">\n <ax-icon class=\"ax-icon ax-text-xl ax-icon-chevron-left arrow-icon\"></ax-icon>\n </ax-button>\n <ax-button look=\"blank\" [text]=\"schedulerComponent()?.currentDateText()\" #date></ax-button>\n <ax-button look=\"blank\" (onClick)=\"schedulerComponent()?.nextClick()\">\n <ax-icon class=\"ax-icon ax-text-xl ax-icon-chevron-right arrow-icon\"></ax-icon>\n </ax-button>\n <ax-popover [target]=\"date\" [placement]=\"'bottom'\">\n <div class=\"ax-overlay-pane\">\n <ax-calendar\n [type]=\"calendarType()\"\n [ngModel]=\"vm.currentDate()\"\n [depth]=\"schedulerComponent()?.calendarDepth()\"\n (onValueChanged)=\"handleSchedulerDateChanged($event)\"\n ></ax-calendar>\n </div>\n </ax-popover>\n </div>\n </axp-layout-prefix>\n <axp-layout-suffix>\n <ax-button>\n <ax-icon icon=\"fa-light {{ selectedViewMode().icon }}\"></ax-icon>\n <ax-dropdown-panel>\n <ax-button-item-list>\n @for(item of viewsItems(); track item.key) {\n <ax-button-item\n [text]=\"(t('dateTime.duration.' + item.text, { scope: 'common' }) | async)!\"\n [selected]=\"vm.calendarViewMode() === item.key\"\n (onClick)=\"handleCalendarViewChange(item.key)\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light {{ item.icon }}\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n @if(item.break) {\n <ax-divider></ax-divider>\n } }\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n </axp-layout-suffix>\n </axp-page-toolbar>\n <axp-page-content class=\"ax-overflow-hidden\">\n <axm-task-board-calendar-view\n class=\"axp-scheduler-container\"\n [dataSource]=\"dataSource\"\n [startingDate]=\"vm.currentDate()\"\n [selectedView]=\"vm.calendarViewMode()\"\n (component)=\"schedulerComponentChanged($event)\"\n (onTaskRightClick)=\"handleTaskRightClick($event)\"\n (onMonthSlotDblClicked)=\"handleMonthSlotDblClicked($event)\"\n ></axm-task-board-calendar-view>\n <ax-context-menu\n #rootContextMenu\n [closeOn]=\"'leave'\"\n [orientation]=\"'vertical'\"\n (onOpening)=\"handleContextMenuOnOpening($event)\"\n (onItemClick)=\"handleContextMenuItemClick($event)\"\n >\n </ax-context-menu>\n </axp-page-content>\n</axp-page-layout>\n", styles: ["axm-task-board-calendar-view{height:100%}html[dir=rtl] axp-page-layout axp-page-toolbar axp-layout-prefix .ax-scheduler-header .arrow-icon:before{-moz-transform:scale(-1,1);-webkit-transform:scale(-1,1);-o-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scaleX(-1)}\n"] }]
302
+ }] });
303
+
304
+ export { AXMTaskBoardPage };
305
+ //# sourceMappingURL=acorex-modules-workflow-management-task-board.page-3_Tn2GeA.mjs.map