@acorex/modules 18.1.5 → 18.1.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 (170) hide show
  1. package/application-management/index.d.ts +2 -0
  2. package/application-management/lib/application-management.module.d.ts +0 -2
  3. package/application-management/lib/application-management.route.d.ts +2 -0
  4. package/application-management/lib/application-management.service.d.ts +18 -0
  5. package/application-management/lib/application-management.source.d.ts +7 -0
  6. package/application-management/lib/application-management.types.d.ts +50 -0
  7. package/application-management/lib/entity.loader.d.ts +9 -0
  8. package/application-management/lib/menu.provider.d.ts +4 -0
  9. package/auth/lib/auth.module.d.ts +4 -7
  10. package/auth/lib/menu.provider.d.ts +4 -0
  11. package/backend/lib/data/api/data-provider.d.ts +1 -0
  12. package/backend/lib/data/index.d.ts +0 -1
  13. package/backend/lib/data/local/local-data-provider.d.ts +1 -0
  14. package/esm2022/application-management/index.mjs +3 -1
  15. package/esm2022/application-management/lib/application-management.module.mjs +17 -47
  16. package/esm2022/application-management/lib/application-management.route.mjs +29 -0
  17. package/esm2022/application-management/lib/application-management.service.mjs +18 -2
  18. package/esm2022/application-management/lib/application-management.source.mjs +8 -0
  19. package/esm2022/application-management/lib/application-management.types.mjs +2 -0
  20. package/esm2022/application-management/lib/entities/property.entity.mjs +1 -2
  21. package/esm2022/application-management/lib/entity.loader.mjs +46 -0
  22. package/esm2022/application-management/lib/layouts/module-entity-detail-view/module-entity-detail-view.component.mjs +3 -3
  23. package/esm2022/application-management/lib/menu.provider.mjs +24 -0
  24. package/esm2022/auth/lib/account/app-chooser/app-chooser-slot.component.mjs +2 -2
  25. package/esm2022/auth/lib/account/profile/profile-slot.component.mjs +6 -3
  26. package/esm2022/auth/lib/auth.module.mjs +20 -14
  27. package/esm2022/auth/lib/login/password/password.component.mjs +2 -2
  28. package/esm2022/auth/lib/menu.provider.mjs +45 -0
  29. package/esm2022/backend/lib/backend.module.mjs +22 -26
  30. package/esm2022/backend/lib/data/api/data-provider.mjs +9 -1
  31. package/esm2022/backend/lib/data/index.mjs +1 -2
  32. package/esm2022/backend/lib/data/local/local-data-provider.mjs +11 -1
  33. package/esm2022/form-management/lib/form-management.module.mjs +32 -9
  34. package/esm2022/form-management/lib/menu.provider.mjs +29 -0
  35. package/esm2022/notification-management/index.mjs +3 -1
  36. package/esm2022/notification-management/lib/admin-notification-slot/admin-notification-item/admin-notification-item.component.mjs +8 -16
  37. package/esm2022/notification-management/lib/admin-notification-slot/admin-notification-panel/admin-notification-panel.component.mjs +31 -7
  38. package/esm2022/notification-management/lib/admin-notification-slot/admin-notification-slot/admin-notification-slot.component.mjs +3 -3
  39. package/esm2022/notification-management/lib/entities/my-notification.mjs +243 -0
  40. package/esm2022/notification-management/lib/entities/notification-channel.entity.mjs +2 -3
  41. package/esm2022/notification-management/lib/entities/notification-log.entity.mjs +180 -0
  42. package/esm2022/notification-management/lib/entity.loader.mjs +41 -0
  43. package/esm2022/notification-management/lib/menu.provider.mjs +51 -0
  44. package/esm2022/notification-management/lib/notification-management-mock-data.mjs +2 -2
  45. package/esm2022/notification-management/lib/notification-management.module.mjs +34 -39
  46. package/esm2022/notification-management/lib/notification-management.type.mjs +1 -1
  47. package/esm2022/notification-management/lib/notification.service.mjs +1 -1
  48. package/esm2022/{language-management/acorex-modules-language-management.mjs → platform-management/acorex-modules-platform-management.mjs} +1 -1
  49. package/esm2022/platform-management/index.mjs +5 -0
  50. package/esm2022/platform-management/lib/comments/comment-management.service.mjs +18 -0
  51. package/esm2022/platform-management/lib/global-variables/entities/global-variable.entity.mjs +295 -0
  52. package/esm2022/platform-management/lib/global-variables/entity.loader.mjs +26 -0
  53. package/esm2022/platform-management/lib/global-variables/global-variables.service.mjs +16 -0
  54. package/esm2022/platform-management/lib/global-variables/global-variables.types.mjs +2 -0
  55. package/esm2022/platform-management/lib/global-variables/index.mjs +5 -0
  56. package/esm2022/platform-management/lib/languages/entities/language.entity.mjs +234 -0
  57. package/esm2022/platform-management/lib/languages/entity.loader.mjs +26 -0
  58. package/esm2022/platform-management/lib/languages/index.mjs +5 -0
  59. package/esm2022/platform-management/lib/languages/language-management.service.mjs +16 -0
  60. package/esm2022/platform-management/lib/languages/language.types.mjs +2 -0
  61. package/esm2022/platform-management/lib/menu.provider.mjs +46 -0
  62. package/esm2022/platform-management/lib/platform-management.module.mjs +82 -0
  63. package/esm2022/template-management/index.mjs +7 -3
  64. package/esm2022/template-management/lib/entities/category.entity.mjs +233 -0
  65. package/esm2022/template-management/lib/entities/index.mjs +4 -0
  66. package/esm2022/template-management/lib/entities/template-variable.entity.mjs +113 -110
  67. package/esm2022/template-management/lib/entities/text-template.entity.mjs +385 -0
  68. package/esm2022/template-management/lib/entity.loader.mjs +36 -0
  69. package/esm2022/template-management/lib/menu.provider.mjs +37 -0
  70. package/esm2022/template-management/lib/template-management.module.mjs +53 -37
  71. package/esm2022/template-management/lib/template-management.types.mjs +2 -0
  72. package/esm2022/template-management/lib/template.service.mjs +17 -0
  73. package/esm2022/template-management/lib/text-management.source.mjs +3 -0
  74. package/esm2022/template-management/lib/text-template-category.service.mjs +17 -0
  75. package/fesm2022/{acorex-modules-application-management-module-designer.component-CFLXuP2G.mjs → acorex-modules-application-management-module-designer.component-BCaCCEXO.mjs} +2 -2
  76. package/fesm2022/{acorex-modules-application-management-module-designer.component-CFLXuP2G.mjs.map → acorex-modules-application-management-module-designer.component-BCaCCEXO.mjs.map} +1 -1
  77. package/fesm2022/acorex-modules-application-management.mjs +140 -50
  78. package/fesm2022/acorex-modules-application-management.mjs.map +1 -1
  79. package/fesm2022/{acorex-modules-auth-acorex-modules-auth-iGiPFEeb.mjs → acorex-modules-auth-acorex-modules-auth-B0aeYVeJ.mjs} +78 -24
  80. package/fesm2022/acorex-modules-auth-acorex-modules-auth-B0aeYVeJ.mjs.map +1 -0
  81. package/fesm2022/{acorex-modules-auth-app-chooser.component-BB3SIzCP.mjs → acorex-modules-auth-app-chooser.component-4b6b3ttW.mjs} +2 -2
  82. package/fesm2022/{acorex-modules-auth-app-chooser.component-BB3SIzCP.mjs.map → acorex-modules-auth-app-chooser.component-4b6b3ttW.mjs.map} +1 -1
  83. package/fesm2022/{acorex-modules-auth-login.module-ChEv9c5I.mjs → acorex-modules-auth-login.module-A7u1YYeo.mjs} +4 -4
  84. package/fesm2022/{acorex-modules-auth-login.module-ChEv9c5I.mjs.map → acorex-modules-auth-login.module-A7u1YYeo.mjs.map} +1 -1
  85. package/fesm2022/{acorex-modules-auth-master.layout-CZv3BD5c.mjs → acorex-modules-auth-master.layout--UllrmW0.mjs} +2 -2
  86. package/fesm2022/{acorex-modules-auth-master.layout-CZv3BD5c.mjs.map → acorex-modules-auth-master.layout--UllrmW0.mjs.map} +1 -1
  87. package/fesm2022/{acorex-modules-auth-password.component-CxZ1weks.mjs → acorex-modules-auth-password.component-BjqQ-qVo.mjs} +3 -3
  88. package/fesm2022/acorex-modules-auth-password.component-BjqQ-qVo.mjs.map +1 -0
  89. package/fesm2022/{acorex-modules-auth-password.component-CPWiBXdG.mjs → acorex-modules-auth-password.component-Dv0VXzh_.mjs} +2 -2
  90. package/fesm2022/{acorex-modules-auth-password.component-CPWiBXdG.mjs.map → acorex-modules-auth-password.component-Dv0VXzh_.mjs.map} +1 -1
  91. package/fesm2022/{acorex-modules-auth-routes-C7r2Jm6s.mjs → acorex-modules-auth-routes-C4eNPru3.mjs} +2 -2
  92. package/fesm2022/{acorex-modules-auth-routes-C7r2Jm6s.mjs.map → acorex-modules-auth-routes-C4eNPru3.mjs.map} +1 -1
  93. package/fesm2022/{acorex-modules-auth-two-factor.module-BgkJYe7T.mjs → acorex-modules-auth-two-factor.module-C6V_pb_Q.mjs} +2 -2
  94. package/fesm2022/{acorex-modules-auth-two-factor.module-BgkJYe7T.mjs.map → acorex-modules-auth-two-factor.module-C6V_pb_Q.mjs.map} +1 -1
  95. package/fesm2022/acorex-modules-auth.mjs +1 -1
  96. package/fesm2022/acorex-modules-backend.mjs +40 -232
  97. package/fesm2022/acorex-modules-backend.mjs.map +1 -1
  98. package/fesm2022/acorex-modules-form-management.mjs +57 -6
  99. package/fesm2022/acorex-modules-form-management.mjs.map +1 -1
  100. package/fesm2022/acorex-modules-notification-management.mjs +590 -64
  101. package/fesm2022/acorex-modules-notification-management.mjs.map +1 -1
  102. package/fesm2022/acorex-modules-platform-management.mjs +752 -0
  103. package/fesm2022/acorex-modules-platform-management.mjs.map +1 -0
  104. package/fesm2022/acorex-modules-template-management.mjs +600 -194
  105. package/fesm2022/acorex-modules-template-management.mjs.map +1 -1
  106. package/form-management/lib/form-management.module.d.ts +2 -2
  107. package/form-management/lib/menu.provider.d.ts +4 -0
  108. package/notification-management/index.d.ts +2 -0
  109. package/notification-management/lib/admin-notification-slot/admin-notification-item/admin-notification-item.component.d.ts +0 -4
  110. package/notification-management/lib/admin-notification-slot/admin-notification-panel/admin-notification-panel.component.d.ts +7 -2
  111. package/{template-management/lib/entities/global-template.entity.d.ts → notification-management/lib/entities/my-notification.d.ts} +1 -1
  112. package/notification-management/lib/entities/notification-log.entity.d.ts +3 -0
  113. package/notification-management/lib/entity.loader.d.ts +9 -0
  114. package/notification-management/lib/menu.provider.d.ts +4 -0
  115. package/notification-management/lib/notification-management-mock-data.d.ts +2 -3
  116. package/notification-management/lib/notification-management.module.d.ts +1 -7
  117. package/notification-management/lib/notification-management.service.d.ts +2 -2
  118. package/notification-management/lib/notification-management.type.d.ts +1 -1
  119. package/notification-management/lib/notification.service.d.ts +3 -4
  120. package/package.json +6 -6
  121. package/platform-management/README.md +4 -0
  122. package/platform-management/index.d.ts +4 -0
  123. package/platform-management/lib/comments/comment-management.service.d.ts +10 -0
  124. package/platform-management/lib/global-variables/entities/global-variable.entity.d.ts +3 -0
  125. package/platform-management/lib/global-variables/entity.loader.d.ts +9 -0
  126. package/platform-management/lib/global-variables/global-variables.service.d.ts +10 -0
  127. package/platform-management/lib/global-variables/global-variables.types.d.ts +7 -0
  128. package/platform-management/lib/global-variables/index.d.ts +4 -0
  129. package/platform-management/lib/languages/entity.loader.d.ts +9 -0
  130. package/platform-management/lib/languages/index.d.ts +4 -0
  131. package/platform-management/lib/languages/language-management.service.d.ts +10 -0
  132. package/platform-management/lib/languages/language.types.d.ts +5 -0
  133. package/platform-management/lib/menu.provider.d.ts +4 -0
  134. package/platform-management/lib/platform-management.module.d.ts +6 -0
  135. package/template-management/index.d.ts +6 -2
  136. package/template-management/lib/entities/category.entity.d.ts +3 -0
  137. package/template-management/lib/entities/index.d.ts +3 -0
  138. package/template-management/lib/entities/template-variable.entity.d.ts +1 -1
  139. package/template-management/lib/entities/text-template.entity.d.ts +3 -0
  140. package/template-management/lib/entity.loader.d.ts +9 -0
  141. package/template-management/lib/menu.provider.d.ts +4 -0
  142. package/template-management/lib/template-management.module.d.ts +4 -10
  143. package/template-management/lib/template-management.types.d.ts +19 -0
  144. package/template-management/lib/template.service.d.ts +10 -0
  145. package/template-management/lib/text-management.source.d.ts +2 -0
  146. package/template-management/lib/text-template-category.service.d.ts +10 -0
  147. package/backend/lib/data/api/comment.mock.service.d.ts +0 -62
  148. package/backend/lib/data/api/notification.mock.service.d.ts +0 -34
  149. package/esm2022/backend/lib/data/api/comment.mock.service.mjs +0 -142
  150. package/esm2022/backend/lib/data/api/notification.mock.service.mjs +0 -71
  151. package/esm2022/language-management/index.mjs +0 -2
  152. package/esm2022/language-management/lib/entities/language.entity.mjs +0 -242
  153. package/esm2022/language-management/lib/language-management.module.mjs +0 -39
  154. package/esm2022/language-management/lib/notification-management.service.mjs +0 -23
  155. package/esm2022/template-management/lib/entities/global-template.entity.mjs +0 -298
  156. package/esm2022/template-management/lib/template-management-mock-data.mjs +0 -11
  157. package/esm2022/template-management/lib/template-management.service.mjs +0 -24
  158. package/fesm2022/acorex-modules-auth-acorex-modules-auth-iGiPFEeb.mjs.map +0 -1
  159. package/fesm2022/acorex-modules-auth-password.component-CxZ1weks.mjs.map +0 -1
  160. package/fesm2022/acorex-modules-language-management-language.entity-CwD5FHGc.mjs +0 -266
  161. package/fesm2022/acorex-modules-language-management-language.entity-CwD5FHGc.mjs.map +0 -1
  162. package/fesm2022/acorex-modules-language-management.mjs +0 -46
  163. package/fesm2022/acorex-modules-language-management.mjs.map +0 -1
  164. package/language-management/README.md +0 -3
  165. package/language-management/index.d.ts +0 -1
  166. package/language-management/lib/language-management.module.d.ts +0 -12
  167. package/language-management/lib/notification-management.service.d.ts +0 -9
  168. package/template-management/lib/template-management-mock-data.d.ts +0 -7
  169. package/template-management/lib/template-management.service.d.ts +0 -9
  170. /package/{language-management/lib → platform-management/lib/languages}/entities/language.entity.d.ts +0 -0
@@ -0,0 +1,752 @@
1
+ import { AXMEntityCrudServiceImpl, AXPEntityDataProviderImpl, AXPDataGenerator, AXPEntityQueryType, AXPEntityCommandScope, AXP_MENU_PROVIDER } from '@acorex/platform/common';
2
+ import * as i0 from '@angular/core';
3
+ import { Injectable, inject, Injector, NgModule } from '@angular/core';
4
+ import { AXP_ENTITY_DEFINITION_LOADER } from '@acorex/platform/layout/entity';
5
+ import { AXPCommentService } from '@acorex/platform/themes/shared';
6
+ import { AXPWidgetsCatalog } from '@acorex/platform/layout/builder';
7
+
8
+ class AXPCommentServiceImpl extends AXMEntityCrudServiceImpl {
9
+ constructor() {
10
+ super('comments');
11
+ this.messageReactionDataProvider = new AXPEntityDataProviderImpl(super.storageService, 'messageReaction');
12
+ }
13
+ async like(payload) {
14
+ return this.messageReactionDataProvider.insertOne(payload);
15
+ }
16
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPCommentServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
17
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPCommentServiceImpl }); }
18
+ }
19
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPCommentServiceImpl, decorators: [{
20
+ type: Injectable
21
+ }], ctorParameters: () => [] });
22
+
23
+ class AXMGlobalVariableModuleEntityLoader {
24
+ constructor() {
25
+ this.injector = inject(Injector);
26
+ }
27
+ async get(moduleName, entityName) {
28
+ return new Promise(async (resolve) => {
29
+ switch (entityName) {
30
+ case 'globalVariable': {
31
+ const entity = (await Promise.resolve().then(function () { return globalVariable_entity; })).globalVariableEntityFactory;
32
+ resolve(entity(this.injector));
33
+ break;
34
+ }
35
+ default:
36
+ resolve(null);
37
+ }
38
+ });
39
+ }
40
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMGlobalVariableModuleEntityLoader, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
41
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMGlobalVariableModuleEntityLoader }); }
42
+ }
43
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMGlobalVariableModuleEntityLoader, decorators: [{
44
+ type: Injectable
45
+ }] });
46
+
47
+ class AXMGlobalVariablesService extends AXMEntityCrudServiceImpl {
48
+ }
49
+ class AXMGlobalVariablesServiceImpl extends AXMEntityCrudServiceImpl {
50
+ constructor() {
51
+ super('globalVariable');
52
+ }
53
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMGlobalVariablesServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
54
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMGlobalVariablesServiceImpl }); }
55
+ }
56
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMGlobalVariablesServiceImpl, decorators: [{
57
+ type: Injectable
58
+ }], ctorParameters: () => [] });
59
+
60
+ class AXMLanguageService extends AXMEntityCrudServiceImpl {
61
+ }
62
+ class AXMLanguageServiceImpl extends AXMEntityCrudServiceImpl {
63
+ constructor() {
64
+ super('language');
65
+ }
66
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMLanguageServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
67
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMLanguageServiceImpl }); }
68
+ }
69
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMLanguageServiceImpl, decorators: [{
70
+ type: Injectable
71
+ }], ctorParameters: () => [] });
72
+
73
+ async function languageEntityFactory(injector) {
74
+ const dataService = injector.get(AXMLanguageService);
75
+ const entityDef = {
76
+ module: 'common',
77
+ name: 'language',
78
+ source: 'common.language',
79
+ title: 'Language',
80
+ formats: {
81
+ individual: 'Language',
82
+ plural: 'Languages',
83
+ },
84
+ relatedEntities: [],
85
+ groups: [
86
+ {
87
+ id: 'language',
88
+ title: 'Language',
89
+ },
90
+ ],
91
+ properties: [
92
+ {
93
+ name: 'title',
94
+ title: 'Title',
95
+ groupId: 'language',
96
+ schema: {
97
+ dataType: 'string',
98
+ interface: {
99
+ type: AXPWidgetsCatalog.text,
100
+ },
101
+ },
102
+ validations: [
103
+ {
104
+ rule: 'required',
105
+ },
106
+ ],
107
+ },
108
+ {
109
+ name: 'code',
110
+ title: 'Code',
111
+ groupId: 'language',
112
+ schema: {
113
+ dataType: 'string',
114
+ interface: {
115
+ type: AXPWidgetsCatalog.text,
116
+ },
117
+ },
118
+ },
119
+ ],
120
+ columns: [{ name: 'title' }, { name: 'code' }],
121
+ commands: {
122
+ create: {
123
+ execute: async (data) => {
124
+ const entity = Object.assign(data, { id: AXPDataGenerator.uuid() });
125
+ dataService.insertOne(entity);
126
+ return Promise.resolve(entity);
127
+ },
128
+ },
129
+ delete: {
130
+ execute: async (id) => {
131
+ await await dataService.deleteOne(id);
132
+ return Promise.resolve();
133
+ },
134
+ },
135
+ update: {
136
+ execute: async (data) => {
137
+ return new Promise((resolve) => {
138
+ setTimeout(async () => {
139
+ await dataService.updateOne(data.id, data);
140
+ resolve(data);
141
+ }, 1000);
142
+ });
143
+ },
144
+ },
145
+ },
146
+ queries: {
147
+ byKey: {
148
+ execute: async (id) => {
149
+ return new Promise((resolve) => {
150
+ setTimeout(async () => {
151
+ const entity = await dataService.getOne(id);
152
+ resolve(entity);
153
+ }, 500);
154
+ });
155
+ },
156
+ type: AXPEntityQueryType.Single,
157
+ },
158
+ list: {
159
+ execute: async (e) => {
160
+ return dataService.query({ skip: e.skip, take: e.take, filter: e.filter });
161
+ },
162
+ type: AXPEntityQueryType.List,
163
+ },
164
+ },
165
+ interfaces: {
166
+ master: {
167
+ create: {
168
+ sections: [
169
+ {
170
+ id: 'language',
171
+ },
172
+ ],
173
+ properties: [
174
+ {
175
+ name: 'title',
176
+ layout: {
177
+ positions: {
178
+ lg: {
179
+ colSpan: 6,
180
+ },
181
+ },
182
+ },
183
+ },
184
+ {
185
+ name: 'code',
186
+ layout: {
187
+ positions: {
188
+ lg: {
189
+ colSpan: 6,
190
+ },
191
+ },
192
+ },
193
+ },
194
+ ],
195
+ },
196
+ update: {
197
+ sections: [
198
+ {
199
+ id: 'language',
200
+ },
201
+ ],
202
+ properties: [
203
+ {
204
+ name: 'title',
205
+ layout: {
206
+ positions: {
207
+ lg: {
208
+ colSpan: 6,
209
+ },
210
+ },
211
+ },
212
+ },
213
+ {
214
+ name: 'code',
215
+ layout: {
216
+ positions: {
217
+ lg: {
218
+ colSpan: 6,
219
+ },
220
+ },
221
+ },
222
+ },
223
+ ],
224
+ },
225
+ single: {
226
+ title: '{{title}}',
227
+ sections: [
228
+ {
229
+ id: 'language',
230
+ },
231
+ ],
232
+ properties: [
233
+ {
234
+ name: 'title',
235
+ layout: {
236
+ positions: {
237
+ lg: {
238
+ colSpan: 6,
239
+ },
240
+ },
241
+ },
242
+ },
243
+ {
244
+ name: 'code',
245
+ layout: {
246
+ positions: {
247
+ lg: {
248
+ colSpan: 6,
249
+ },
250
+ },
251
+ },
252
+ },
253
+ ],
254
+ actions: [],
255
+ },
256
+ list: {
257
+ actions: [
258
+ {
259
+ title: 'Create New',
260
+ command: 'create-entity',
261
+ priority: 'primary',
262
+ type: 'create',
263
+ scope: AXPEntityCommandScope.TypeLevel,
264
+ },
265
+ {
266
+ title: 'Delete Items',
267
+ command: 'delete-entity',
268
+ priority: 'primary',
269
+ type: 'delete',
270
+ scope: AXPEntityCommandScope.Selected,
271
+ },
272
+ {
273
+ title: 'Details',
274
+ command: 'open-entity',
275
+ priority: 'secondary',
276
+ type: 'view',
277
+ scope: AXPEntityCommandScope.Individual,
278
+ },
279
+ {
280
+ title: 'Delete',
281
+ command: 'delete-entity',
282
+ priority: 'secondary',
283
+ type: 'delete',
284
+ scope: AXPEntityCommandScope.Individual,
285
+ },
286
+ ],
287
+ views: [
288
+ {
289
+ name: 'all',
290
+ title: 'All Items',
291
+ fixed: true,
292
+ columns: [],
293
+ conditions: [],
294
+ sorts: [],
295
+ },
296
+ ],
297
+ },
298
+ },
299
+ },
300
+ };
301
+ return entityDef;
302
+ }
303
+
304
+ var language_entity = /*#__PURE__*/Object.freeze({
305
+ __proto__: null,
306
+ languageEntityFactory: languageEntityFactory
307
+ });
308
+
309
+ class AXMLanguageModuleEntityLoader {
310
+ constructor() {
311
+ this.injector = inject(Injector);
312
+ }
313
+ async get(moduleName, entityName) {
314
+ return new Promise(async (resolve) => {
315
+ switch (entityName) {
316
+ case 'language': {
317
+ const entity = (await Promise.resolve().then(function () { return language_entity; })).languageEntityFactory;
318
+ resolve(entity(this.injector));
319
+ break;
320
+ }
321
+ default:
322
+ resolve(null);
323
+ }
324
+ });
325
+ }
326
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMLanguageModuleEntityLoader, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
327
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMLanguageModuleEntityLoader }); }
328
+ }
329
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMLanguageModuleEntityLoader, decorators: [{
330
+ type: Injectable
331
+ }] });
332
+
333
+ class AXMPlatformManagmentModuleMenuProvider {
334
+ async items() {
335
+ return [
336
+ {
337
+ items: [
338
+ {
339
+ text: 'Platform Management',
340
+ icon: 'fa-solid fa-square-terminal',
341
+ type: 'menu',
342
+ priority: 9100,
343
+ data: {
344
+ // requiredPermission: 'demo.admin.settings',
345
+ },
346
+ children: [
347
+ {
348
+ priority: 9001,
349
+ text: 'Global Variables',
350
+ path: '/demo/m/common/e/globalVariable/list',
351
+ icon: 'fa-solid fa-object-exclude',
352
+ data: {
353
+ //requiredPermission: '',
354
+ },
355
+ },
356
+ {
357
+ priority: 9002,
358
+ text: 'Language Management',
359
+ icon: 'fa-solid fa-square-terminal',
360
+ children: [
361
+ {
362
+ text: 'Language Definition',
363
+ path: '/demo/m/common/e/language/list',
364
+ icon: 'fa-solid fa-globe',
365
+ data: {
366
+ //requiredPermission: '',
367
+ },
368
+ },
369
+ ],
370
+ },
371
+ ]
372
+ },
373
+ ]
374
+ }
375
+ ];
376
+ }
377
+ }
378
+
379
+ class AXMPlatformManagementModule {
380
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMPlatformManagementModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
381
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.0", ngImport: i0, type: AXMPlatformManagementModule }); }
382
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMPlatformManagementModule, providers: [
383
+ {
384
+ provide: AXMGlobalVariablesService,
385
+ useClass: AXMGlobalVariablesServiceImpl,
386
+ },
387
+ {
388
+ provide: AXMLanguageService,
389
+ useClass: AXMLanguageServiceImpl,
390
+ },
391
+ {
392
+ provide: AXPCommentService,
393
+ useClass: AXPCommentServiceImpl,
394
+ },
395
+ {
396
+ provide: AXP_ENTITY_DEFINITION_LOADER,
397
+ useClass: AXMLanguageModuleEntityLoader,
398
+ multi: true,
399
+ },
400
+ {
401
+ provide: AXP_ENTITY_DEFINITION_LOADER,
402
+ useClass: AXMGlobalVariableModuleEntityLoader,
403
+ multi: true,
404
+ },
405
+ {
406
+ provide: AXP_MENU_PROVIDER,
407
+ useClass: AXMPlatformManagmentModuleMenuProvider,
408
+ multi: true,
409
+ },
410
+ ] }); }
411
+ }
412
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMPlatformManagementModule, decorators: [{
413
+ type: NgModule,
414
+ args: [{
415
+ imports: [],
416
+ exports: [],
417
+ declarations: [],
418
+ providers: [
419
+ {
420
+ provide: AXMGlobalVariablesService,
421
+ useClass: AXMGlobalVariablesServiceImpl,
422
+ },
423
+ {
424
+ provide: AXMLanguageService,
425
+ useClass: AXMLanguageServiceImpl,
426
+ },
427
+ {
428
+ provide: AXPCommentService,
429
+ useClass: AXPCommentServiceImpl,
430
+ },
431
+ {
432
+ provide: AXP_ENTITY_DEFINITION_LOADER,
433
+ useClass: AXMLanguageModuleEntityLoader,
434
+ multi: true,
435
+ },
436
+ {
437
+ provide: AXP_ENTITY_DEFINITION_LOADER,
438
+ useClass: AXMGlobalVariableModuleEntityLoader,
439
+ multi: true,
440
+ },
441
+ {
442
+ provide: AXP_MENU_PROVIDER,
443
+ useClass: AXMPlatformManagmentModuleMenuProvider,
444
+ multi: true,
445
+ },
446
+ ],
447
+ }]
448
+ }] });
449
+
450
+ async function globalVariableEntityFactory(injector) {
451
+ const dataService = injector.get(AXMGlobalVariablesService);
452
+ const entityDef = {
453
+ module: 'common',
454
+ name: 'globalVariable',
455
+ source: 'common.globalVariable',
456
+ title: 'Global Variable',
457
+ formats: {
458
+ individual: 'Global Variable',
459
+ plural: 'Global Variables',
460
+ },
461
+ relatedEntities: [],
462
+ groups: [
463
+ {
464
+ id: 'section',
465
+ title: 'Section',
466
+ },
467
+ ],
468
+ properties: [
469
+ {
470
+ name: 'name',
471
+ title: 'Name',
472
+ groupId: 'section',
473
+ schema: {
474
+ dataType: 'string',
475
+ interface: {
476
+ type: AXPWidgetsCatalog.text,
477
+ },
478
+ },
479
+ validations: [
480
+ {
481
+ rule: 'required',
482
+ },
483
+ ],
484
+ },
485
+ {
486
+ name: 'title',
487
+ title: 'Title',
488
+ groupId: 'section',
489
+ schema: {
490
+ dataType: 'string',
491
+ interface: {
492
+ type: AXPWidgetsCatalog.text,
493
+ },
494
+ },
495
+ validations: [
496
+ {
497
+ rule: 'required',
498
+ },
499
+ ],
500
+ },
501
+ {
502
+ name: 'dataValue',
503
+ title: 'Data Value',
504
+ groupId: 'section',
505
+ schema: {
506
+ dataType: 'string',
507
+ interface: {
508
+ type: AXPWidgetsCatalog.text,
509
+ },
510
+ },
511
+ },
512
+ {
513
+ name: 'dataType',
514
+ title: 'Data Type',
515
+ groupId: 'section',
516
+ schema: {
517
+ dataType: 'string',
518
+ interface: {
519
+ type: AXPWidgetsCatalog.select,
520
+ options: {
521
+ valueField: 'name',
522
+ textField: 'title',
523
+ dataSource: [
524
+ { title: 'String', name: 'String' },
525
+ { title: 'Integer', name: 'integer' },
526
+ { title: 'Date Time', name: 'dateTime' },
527
+ { title: 'Boolean', name: 'boolean' },
528
+ { title: 'Function', name: 'function' },
529
+ { title: 'Custom', name: 'custom' },
530
+ ],
531
+ direction: 'horizontal',
532
+ multiple: false,
533
+ },
534
+ },
535
+ },
536
+ },
537
+ ],
538
+ columns: [{ name: 'title' }, { name: 'dataValue' }, { name: 'dataType' }],
539
+ commands: {
540
+ create: {
541
+ execute: async (data) => {
542
+ const entity = Object.assign(data, { id: AXPDataGenerator.uuid() });
543
+ dataService.insertOne(entity);
544
+ return Promise.resolve(entity);
545
+ },
546
+ },
547
+ delete: {
548
+ execute: async (id) => {
549
+ await await dataService.deleteOne(id);
550
+ return Promise.resolve();
551
+ },
552
+ },
553
+ update: {
554
+ execute: async (data) => {
555
+ return new Promise((resolve) => {
556
+ setTimeout(async () => {
557
+ await dataService.updateOne(data.id, data);
558
+ resolve(data);
559
+ }, 1000);
560
+ });
561
+ },
562
+ },
563
+ },
564
+ queries: {
565
+ byKey: {
566
+ execute: async (id) => {
567
+ return new Promise((resolve) => {
568
+ setTimeout(async () => {
569
+ const entity = await dataService.getOne(id);
570
+ resolve(entity);
571
+ }, 500);
572
+ });
573
+ },
574
+ type: AXPEntityQueryType.Single,
575
+ },
576
+ list: {
577
+ execute: async (e) => {
578
+ return dataService.query({ skip: e.skip, take: e.take, filter: e.filter });
579
+ },
580
+ type: AXPEntityQueryType.List,
581
+ },
582
+ },
583
+ interfaces: {
584
+ master: {
585
+ create: {
586
+ sections: [
587
+ {
588
+ id: 'section',
589
+ },
590
+ ],
591
+ properties: [
592
+ {
593
+ name: 'title',
594
+ layout: {
595
+ positions: {
596
+ lg: {
597
+ colSpan: 6,
598
+ },
599
+ },
600
+ },
601
+ },
602
+ {
603
+ name: 'name',
604
+ layout: {
605
+ positions: {
606
+ lg: {
607
+ colSpan: 6,
608
+ },
609
+ },
610
+ },
611
+ },
612
+ {
613
+ name: 'dataValue',
614
+ layout: {
615
+ positions: {
616
+ lg: {
617
+ colSpan: 6,
618
+ },
619
+ },
620
+ },
621
+ },
622
+ {
623
+ name: 'dataType',
624
+ layout: {
625
+ positions: {
626
+ lg: {
627
+ colSpan: 6,
628
+ },
629
+ },
630
+ },
631
+ },
632
+ ],
633
+ },
634
+ update: {
635
+ sections: [
636
+ {
637
+ id: 'section',
638
+ },
639
+ ],
640
+ properties: [
641
+ {
642
+ name: 'title',
643
+ layout: {
644
+ positions: {
645
+ lg: {
646
+ colSpan: 6,
647
+ },
648
+ },
649
+ },
650
+ },
651
+ {
652
+ name: 'code',
653
+ layout: {
654
+ positions: {
655
+ lg: {
656
+ colSpan: 6,
657
+ },
658
+ },
659
+ },
660
+ },
661
+ ],
662
+ },
663
+ single: {
664
+ title: '{{title}}',
665
+ sections: [
666
+ {
667
+ id: 'section',
668
+ },
669
+ ],
670
+ properties: [
671
+ {
672
+ name: 'title',
673
+ layout: {
674
+ positions: {
675
+ lg: {
676
+ colSpan: 6,
677
+ },
678
+ },
679
+ },
680
+ },
681
+ {
682
+ name: 'code',
683
+ layout: {
684
+ positions: {
685
+ lg: {
686
+ colSpan: 6,
687
+ },
688
+ },
689
+ },
690
+ },
691
+ ],
692
+ actions: [],
693
+ },
694
+ list: {
695
+ actions: [
696
+ {
697
+ title: 'Create New',
698
+ command: 'create-entity',
699
+ priority: 'primary',
700
+ type: 'create',
701
+ scope: AXPEntityCommandScope.TypeLevel,
702
+ },
703
+ {
704
+ title: 'Delete Items',
705
+ command: 'delete-entity',
706
+ priority: 'primary',
707
+ type: 'delete',
708
+ scope: AXPEntityCommandScope.Selected,
709
+ },
710
+ {
711
+ title: 'Details',
712
+ command: 'open-entity',
713
+ priority: 'secondary',
714
+ type: 'view',
715
+ scope: AXPEntityCommandScope.Individual,
716
+ },
717
+ {
718
+ title: 'Delete',
719
+ command: 'delete-entity',
720
+ priority: 'secondary',
721
+ type: 'delete',
722
+ scope: AXPEntityCommandScope.Individual,
723
+ },
724
+ ],
725
+ views: [
726
+ {
727
+ name: 'all',
728
+ title: 'All Items',
729
+ fixed: true,
730
+ columns: [],
731
+ conditions: [],
732
+ sorts: [],
733
+ },
734
+ ],
735
+ },
736
+ },
737
+ },
738
+ };
739
+ return entityDef;
740
+ }
741
+
742
+ var globalVariable_entity = /*#__PURE__*/Object.freeze({
743
+ __proto__: null,
744
+ globalVariableEntityFactory: globalVariableEntityFactory
745
+ });
746
+
747
+ /**
748
+ * Generated bundle index. Do not edit.
749
+ */
750
+
751
+ export { AXMGlobalVariableModuleEntityLoader, AXMGlobalVariablesService, AXMGlobalVariablesServiceImpl, AXMLanguageModuleEntityLoader, AXMLanguageService, AXMLanguageServiceImpl, AXMPlatformManagementModule, AXPCommentServiceImpl, globalVariableEntityFactory, languageEntityFactory };
752
+ //# sourceMappingURL=acorex-modules-platform-management.mjs.map