@acorex/platform 19.3.2 → 19.3.3-next.0

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 (103) hide show
  1. package/common/lib/layout/menu/menu.types.d.ts +0 -1
  2. package/core/lib/expression-evaluator/expression-evaluator.service.d.ts +2 -0
  3. package/core/lib/types/interactive.types.d.ts +21 -0
  4. package/core/lib/types/layout.types.d.ts +4 -4
  5. package/core/lib/utils/object-util.d.ts +1 -0
  6. package/fesm2022/acorex-platform-common.mjs +2 -1
  7. package/fesm2022/acorex-platform-common.mjs.map +1 -1
  8. package/fesm2022/acorex-platform-core.mjs +64 -11
  9. package/fesm2022/acorex-platform-core.mjs.map +1 -1
  10. package/fesm2022/acorex-platform-layout-builder.mjs +2 -1
  11. package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
  12. package/fesm2022/acorex-platform-layout-components.mjs +0 -1
  13. package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
  14. package/fesm2022/acorex-platform-layout-designer.mjs +2 -2
  15. package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
  16. package/fesm2022/acorex-platform-layout-entity.mjs +0 -2
  17. package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
  18. package/fesm2022/acorex-platform-layout-views.mjs +287 -0
  19. package/fesm2022/acorex-platform-layout-views.mjs.map +1 -0
  20. package/fesm2022/acorex-platform-themes-default-details-view.component-CAa99Vts.mjs +107 -0
  21. package/fesm2022/acorex-platform-themes-default-details-view.component-CAa99Vts.mjs.map +1 -0
  22. package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-Ol8haGqF.mjs → acorex-platform-themes-default-entity-master-list-view.component-BgE6rxsd.mjs} +5 -6
  23. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-BgE6rxsd.mjs.map +1 -0
  24. package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-BBJ7Aapd.mjs → acorex-platform-themes-default-entity-master-single-view.component-CnrccLHY.mjs} +9 -9
  25. package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-BBJ7Aapd.mjs.map → acorex-platform-themes-default-entity-master-single-view.component-CnrccLHY.mjs.map} +1 -1
  26. package/fesm2022/acorex-platform-themes-default.mjs +45 -298
  27. package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
  28. package/fesm2022/acorex-platform-widgets.mjs +543 -63
  29. package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
  30. package/layout/builder/lib/builder/index.d.ts +0 -1
  31. package/layout/builder/lib/builder/widget-map.d.ts +1 -0
  32. package/layout/builder/lib/builder/widget.types.d.ts +1 -0
  33. package/layout/{setting → views}/README.md +1 -1
  34. package/layout/views/index.d.ts +2 -0
  35. package/layout/views/lib/details-view/details-view-route.resolver.d.ts +3 -0
  36. package/layout/views/lib/details-view/details-view.adapter.d.ts +13 -0
  37. package/layout/views/lib/details-view/details-view.viewmodel.d.ts +30 -0
  38. package/layout/views/lib/details-view/index.d.ts +3 -0
  39. package/layout/views/lib/details-view/sample.d.ts +2 -0
  40. package/layout/views/lib/shared/index.d.ts +1 -0
  41. package/layout/views/lib/shared/layout.types.d.ts +7 -0
  42. package/package.json +4 -8
  43. package/themes/default/index.d.ts +0 -1
  44. package/themes/default/lib/layouts/base/base-page.component.d.ts +1 -4
  45. package/themes/default/lib/layouts/base/index.d.ts +0 -1
  46. package/themes/default/lib/layouts/base/page-layout/page-layout.component.d.ts +1 -0
  47. package/themes/default/lib/layouts/details-view/details-view.component.d.ts +45 -0
  48. package/widgets/lib/properties/layout.props.d.ts +1 -0
  49. package/widgets/lib/widgets/advance/cron-job/cron-job-widget-designer.component.d.ts +1 -0
  50. package/widgets/lib/widgets/advance/cron-job/cron-job-widget-edit.component.d.ts +1 -0
  51. package/widgets/lib/widgets/editors/time-duration/index.d.ts +6 -0
  52. package/widgets/lib/widgets/editors/time-duration/time-duration-widget-column.component.d.ts +6 -0
  53. package/widgets/lib/widgets/editors/time-duration/time-duration-widget-edit.component.d.ts +12 -0
  54. package/widgets/lib/widgets/editors/time-duration/time-duration-widget-filter.component.d.ts +6 -0
  55. package/widgets/lib/widgets/editors/time-duration/time-duration-widget-print.component.d.ts +6 -0
  56. package/widgets/lib/widgets/editors/time-duration/time-duration-widget-view.component.d.ts +7 -0
  57. package/widgets/lib/widgets/editors/time-duration/time-duration-widget.config.d.ts +11 -0
  58. package/widgets/lib/widgets/filters/select-filter/select-filter-widget-edit.component.d.ts +4 -1
  59. package/widgets/lib/widgets/layout/form-field/form-field-widget-designer.component.d.ts +2 -2
  60. package/widgets/lib/widgets/layout/tabset/index.d.ts +3 -0
  61. package/widgets/lib/widgets/layout/tabset/tabset-widget-designer.component.d.ts +6 -0
  62. package/widgets/lib/widgets/layout/tabset/tabset-widget-view.component.d.ts +19 -0
  63. package/widgets/lib/widgets/layout/tabset/tabset-widget.config.d.ts +2 -0
  64. package/widgets/lib/widgets/layout/tabset/tabset-widget.types.d.ts +2 -0
  65. package/widgets/lib/widgets/layout/tabset-item/index.d.ts +3 -0
  66. package/widgets/lib/widgets/layout/tabset-item/tabset-item-widget-designer.component.d.ts +6 -0
  67. package/widgets/lib/widgets/layout/tabset-item/tabset-item-widget-view.component.d.ts +10 -0
  68. package/widgets/lib/widgets/layout/tabset-item/tabset-item-widget.config.d.ts +2 -0
  69. package/widgets/lib/widgets/property-editors/flex-options/flex-options-widget-editor.component.d.ts +3 -3
  70. package/widgets/lib/widgets/property-editors/flex-options/flex-options-widget.type.d.ts +2 -2
  71. package/fesm2022/acorex-platform-layout-search.mjs +0 -279
  72. package/fesm2022/acorex-platform-layout-search.mjs.map +0 -1
  73. package/fesm2022/acorex-platform-layout-setting.mjs +0 -406
  74. package/fesm2022/acorex-platform-layout-setting.mjs.map +0 -1
  75. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-Ol8haGqF.mjs.map +0 -1
  76. package/fesm2022/acorex-platform-themes-default-search-popup.component-ChJiJ12h.mjs +0 -128
  77. package/fesm2022/acorex-platform-themes-default-search-popup.component-ChJiJ12h.mjs.map +0 -1
  78. package/fesm2022/acorex-platform-themes-default-setting-page.component-BxGzaKws.mjs +0 -219
  79. package/fesm2022/acorex-platform-themes-default-setting-page.component-BxGzaKws.mjs.map +0 -1
  80. package/fesm2022/acorex-platform-themes-default-setting-view.component-CjmlI9Jb.mjs +0 -103
  81. package/fesm2022/acorex-platform-themes-default-setting-view.component-CjmlI9Jb.mjs.map +0 -1
  82. package/layout/builder/lib/builder/view.types.d.ts +0 -94
  83. package/layout/search/README.md +0 -3
  84. package/layout/search/index.d.ts +0 -1
  85. package/layout/search/lib/index.d.ts +0 -3
  86. package/layout/search/lib/search-slot.component.d.ts +0 -9
  87. package/layout/search/lib/search.config.d.ts +0 -5
  88. package/layout/search/lib/search.module.d.ts +0 -11
  89. package/layout/search/lib/search.viewmodel.d.ts +0 -34
  90. package/layout/search/lib/workflows/search.workflow.d.ts +0 -11
  91. package/layout/setting/index.d.ts +0 -2
  92. package/layout/setting/lib/convert-setting-data.d.ts +0 -2
  93. package/layout/setting/lib/search-definition.provider.d.ts +0 -4
  94. package/layout/setting/lib/search.provider.d.ts +0 -9
  95. package/layout/setting/lib/setting.viewmodel.d.ts +0 -46
  96. package/layout/setting/lib/settings.module.d.ts +0 -9
  97. package/themes/default/lib/layouts/base/simple-page/index.d.ts +0 -1
  98. package/themes/default/lib/layouts/base/simple-page/simple-page.layout.d.ts +0 -78
  99. package/themes/default/lib/layouts/search-layout/search-popup.component.d.ts +0 -22
  100. package/themes/default/lib/layouts/setting-layout/setting-page/setting-page.component.d.ts +0 -65
  101. package/themes/default/lib/layouts/setting-layout/setting-view/setting-view.component.d.ts +0 -135
  102. package/themes/default/lib/layouts/view-layouts/index.d.ts +0 -1
  103. package/themes/default/lib/layouts/view-layouts/layout-detail-view/layout-detail-view.component.d.ts +0 -19
@@ -1,406 +0,0 @@
1
- import { AXPSettingDefinitionProviderService, AXPSettingService, AXP_SEARCH_PROVIDER, AXP_SEARCH_DEFINITION_PROVIDER } from '@acorex/platform/common';
2
- import { AXPPageStatus } from '@acorex/platform/layout/builder';
3
- import { AXPLayoutThemeService } from '@acorex/platform/themes/shared';
4
- import * as i0 from '@angular/core';
5
- import { computed, inject, NgModule } from '@angular/core';
6
- import { signalStore, withState, withComputed, withMethods, patchState, withHooks } from '@ngrx/signals';
7
- import { get, isEqual, isNil, isEmpty, sortBy } from 'lodash-es';
8
- import { filter, merge } from 'rxjs';
9
- import { AXToastService } from '@acorex/components/toast';
10
- import { AXTranslationService } from '@acorex/core/translation';
11
- import * as i1 from '@acorex/platform/core';
12
- import { resolvePlatformScopeName, AXPPlatformScope } from '@acorex/platform/core';
13
- import { AXLocaleService } from '@acorex/core/locale';
14
- import { AXPSessionService } from '@acorex/platform/auth';
15
-
16
- function searchSettings(groups, search) {
17
- const sectionMatchResult = [];
18
- const settingMatchResult = [];
19
- const processedGroups = new Set();
20
- const createGroupIdentifier = (group) => `${group.name}-${group.title}`;
21
- const addGroupToResult = (group, sections, resultArray) => {
22
- const groupId = createGroupIdentifier(group);
23
- if (!processedGroups.has(groupId)) {
24
- resultArray.push({
25
- ...group,
26
- sections,
27
- groups: [], // Exclude nested groups
28
- });
29
- processedGroups.add(groupId);
30
- }
31
- };
32
- const processSections = (group, filterFn) => {
33
- const matchedSections = group.sections.filter(filterFn);
34
- if (matchedSections.length > 0) {
35
- addGroupToResult(group, matchedSections, sectionMatchResult);
36
- }
37
- };
38
- const processSettings = (group, filterFn) => {
39
- const matchedSections = group.sections
40
- .map(filterFn)
41
- .filter((section) => section !== null);
42
- if (matchedSections.length > 0) {
43
- addGroupToResult(group, matchedSections, settingMatchResult);
44
- }
45
- };
46
- const sectionMatches = (section) => section.name.toLowerCase().includes(search.toLowerCase()) ||
47
- section.title.toLowerCase().includes(search.toLowerCase());
48
- const filterSettings = (section) => {
49
- const matchedSettings = section.settings.filter((setting) => setting.name.toLowerCase().includes(search.toLowerCase()) ||
50
- setting.title.toLowerCase().includes(search.toLowerCase()));
51
- return matchedSettings.length > 0 ? { ...section, settings: matchedSettings } : null;
52
- };
53
- const processGroupRecursively = (group) => {
54
- processSections(group, sectionMatches); // Match sections with all settings
55
- processSettings(group, filterSettings); // Match settings within sections
56
- group.groups.forEach(processGroupRecursively); // Recurse into nested groups
57
- };
58
- groups.forEach(processGroupRecursively);
59
- return [...sectionMatchResult, ...settingMatchResult];
60
- }
61
-
62
- const AXPSettingsViewModel = signalStore(withState(() => ({
63
- groups: [],
64
- activateGroup: undefined,
65
- scope: 'U',
66
- //
67
- searchExpression: null,
68
- //
69
- previousContext: {},
70
- context: {},
71
- //
72
- status: AXPPageStatus.Processing,
73
- form: null,
74
- })), withComputed((store, layout = inject(AXPLayoutThemeService)) => ({
75
- searchResults: computed(() => searchSettings(store.groups(), store.searchExpression())),
76
- hasActivateGroup: computed(() => store.activateGroup() != null),
77
- showGroups: computed(() => store.activateGroup() != null && layout.isLarge()),
78
- scopeTitle: computed(() => {
79
- return `${resolvePlatformScopeName(store.scope())}.title`;
80
- }),
81
- scopeDescription: computed(() => {
82
- return `${resolvePlatformScopeName(store.scope())}.description`;
83
- }),
84
- isSearching: computed(() => store.searchExpression() != null),
85
- isBusy: computed(() => store.status() == AXPPageStatus.Processing),
86
- isSaving: computed(() => store.status() == AXPPageStatus.Submitting),
87
- isLoaded: computed(() => store.groups().length > 0),
88
- })), withMethods((store, settingDefinitionService = inject(AXPSettingDefinitionProviderService), settingValueService = inject(AXPSettingService), toastService = inject(AXToastService), translateService = inject(AXTranslationService)) => ({
89
- registerForm(form) {
90
- patchState(store, {
91
- form: form,
92
- });
93
- },
94
- async load(scope) {
95
- patchState(store, {
96
- scope: scope,
97
- status: AXPPageStatus.Processing,
98
- });
99
- //
100
- const groups = await settingDefinitionService.getListAsync(scope);
101
- patchState(store, {
102
- groups: groups,
103
- });
104
- const currentContext = await settingValueService.scope(scope).all();
105
- const defaults = await settingValueService.scope(scope).defaultValues();
106
- patchState(store, {
107
- context: { ...defaults, ...currentContext },
108
- });
109
- patchState(store, {
110
- previousContext: store.context(),
111
- status: AXPPageStatus.Rendered,
112
- });
113
- },
114
- async reload() {
115
- await settingDefinitionService.reload();
116
- const groups = await settingDefinitionService.getListAsync(store.scope());
117
- const oldActivateGroupName = store.activateGroup()?.name;
118
- patchState(store, {
119
- groups: groups,
120
- activateGroup: undefined,
121
- });
122
- if (oldActivateGroupName) {
123
- this.setActivateGroupByName(oldActivateGroupName);
124
- }
125
- },
126
- updateContext(context) {
127
- patchState(store, {
128
- context: { ...store.context(), ...context },
129
- });
130
- },
131
- updatePreviousContext(context) {
132
- patchState(store, {
133
- previousContext: { ...store.previousContext(), ...context },
134
- });
135
- },
136
- setActivateGroup(group) {
137
- patchState(store, {
138
- activateGroup: group,
139
- });
140
- },
141
- unloadActivateGroup() {
142
- patchState(store, {
143
- activateGroup: undefined,
144
- });
145
- },
146
- setActivateGroupByName(name) {
147
- const group = store.groups().find(g => g.name === name);
148
- if (group) {
149
- patchState(store, {
150
- activateGroup: group,
151
- });
152
- }
153
- },
154
- //
155
- async search(expression) {
156
- debugger;
157
- if (!isNil(expression) && !isEmpty(expression)) {
158
- patchState(store, {
159
- searchExpression: expression,
160
- });
161
- }
162
- else {
163
- patchState(store, {
164
- searchExpression: null,
165
- });
166
- }
167
- },
168
- clearSearch() {
169
- patchState(store, {
170
- searchExpression: null,
171
- });
172
- },
173
- isDirty() {
174
- return store.groups()?.some((group) => group.sections.some((sec) => sec.settings.some((setting) => {
175
- const currentValue = get(store.context(), setting.name);
176
- const previousValue = get(store.previousContext(), setting.name);
177
- return !isEqual(currentValue, previousValue);
178
- }))) || false;
179
- },
180
- async apply() {
181
- const i18nScope = "settings";
182
- try {
183
- if (await store.form() && this.isDirty()) {
184
- const form = store.form();
185
- form.resetErrors();
186
- //
187
- patchState(store, {
188
- status: AXPPageStatus.Submitting,
189
- });
190
- const formResult = await form.validate();
191
- if (!formResult.result) {
192
- toastService.show({
193
- color: 'danger',
194
- title: await translateService.translateAsync('actions.apply.invalid.title', { scope: i18nScope }),
195
- content: await translateService.translateAsync('actions.apply.invalid.message', { scope: i18nScope }),
196
- location: 'bottom-center',
197
- closeButton: true,
198
- timeOut: 3000,
199
- timeOutProgress: true,
200
- });
201
- patchState(store, {
202
- status: AXPPageStatus.Error,
203
- });
204
- return false;
205
- }
206
- await settingValueService.scope(store.scope()).set(store.context());
207
- // Show success notification
208
- toastService.show({
209
- color: 'success',
210
- title: await translateService.translateAsync('actions.apply.success.title', { scope: i18nScope }),
211
- content: await translateService.translateAsync('actions.apply.success.message', { scope: i18nScope }),
212
- location: 'bottom-center',
213
- closeButton: true,
214
- timeOut: 3000,
215
- timeOutProgress: true,
216
- });
217
- patchState(store, {
218
- status: AXPPageStatus.Submitted,
219
- });
220
- return true;
221
- }
222
- return false;
223
- }
224
- catch (error) {
225
- toastService.show({
226
- color: 'danger',
227
- title: await translateService.translateAsync('actions.apply.error.title', { scope: i18nScope }),
228
- content: await translateService.translateAsync('actions.apply.error.message', { scope: i18nScope }),
229
- location: 'bottom-center',
230
- closeButton: true,
231
- timeOut: 3000,
232
- timeOutProgress: true,
233
- });
234
- patchState(store, {
235
- status: AXPPageStatus.Error,
236
- });
237
- return false;
238
- }
239
- },
240
- async discard() {
241
- const form = store.form();
242
- form.resetErrors();
243
- //
244
- patchState(store, {
245
- status: AXPPageStatus.Rendered,
246
- });
247
- patchState(store, {
248
- context: store.previousContext(),
249
- });
250
- },
251
- async resetToDefault() {
252
- // Update the context with the defaults
253
- const defaults = await settingValueService.scope(store.scope()).defaultValues();
254
- patchState(store, {
255
- context: defaults,
256
- });
257
- //
258
- const result = await this.apply();
259
- if (!result) {
260
- this.discard();
261
- }
262
- },
263
- })), withHooks((store, settingValueService = inject(AXPSettingService), translationService = inject(AXTranslationService), localeService = inject(AXLocaleService)) => ({
264
- async onInit() {
265
- //
266
- settingValueService.onChanged.pipe(filter((c) => c.scope == store.scope())).subscribe((e) => {
267
- e.keys.forEach((k) => {
268
- const currentValue = e.values[k];
269
- const contextValue = get(store.context(), k);
270
- const previousValue = get(store.previousContext(), k);
271
- // Update only if there are actual changes
272
- if (!isEqual(previousValue, currentValue) || !isEqual(currentValue, contextValue)) {
273
- patchState(store, {
274
- previousContext: {
275
- ...store.previousContext(),
276
- [k]: currentValue,
277
- }
278
- });
279
- patchState(store, {
280
- context: {
281
- ...store.context(),
282
- [k]: currentValue,
283
- }
284
- });
285
- }
286
- });
287
- });
288
- //
289
- merge(translationService.langChanges$, localeService.profileChanged$).subscribe(async () => {
290
- await store.reload();
291
- });
292
- },
293
- onDestroy() { },
294
- })));
295
-
296
- class AXPSettingSearchProvider {
297
- constructor() {
298
- this.settingService = inject(AXPSettingDefinitionProviderService);
299
- this.sessionService = inject(AXPSessionService);
300
- }
301
- async search(text) {
302
- const groupsSetting = this.settingService.getList(AXPPlatformScope.User);
303
- if (groupsSetting.length == 0) {
304
- groupsSetting.push(...(await this.settingService.getListAsync(AXPPlatformScope.User)));
305
- }
306
- // Step 2: Flatten settings from groups
307
- const allSettings = [];
308
- const extractSettings = (group) => {
309
- for (const section of group.sections) {
310
- allSettings.push(...section.settings.map((x) => ({ ...x, group })));
311
- }
312
- for (const subGroup of group.groups) {
313
- extractSettings(subGroup); // Recursive extraction
314
- }
315
- };
316
- for (const group of groupsSetting) {
317
- extractSettings(group);
318
- }
319
- // Step 3: Search settings by title
320
- const searchResults = allSettings.filter((setting) => setting.title.toLowerCase().includes(text.toLowerCase()));
321
- return sortBy(searchResults.map((setting) => ({
322
- title: setting.title,
323
- description: setting.description,
324
- group: 'setting',
325
- data: setting,
326
- command: {
327
- name: 'navigate',
328
- options: {
329
- type: 'router',
330
- options: {
331
- path: `/${this.sessionService.application?.name}/settings/user/${setting.group.name}#${setting.title}`,
332
- },
333
- }
334
- },
335
- parent: setting.group
336
- ? {
337
- title: setting.group.title,
338
- data: setting.group,
339
- }
340
- : undefined,
341
- })), ['title']);
342
- }
343
- }
344
-
345
- class AXPSettingSearchDefinitionProvider {
346
- async provide(context) {
347
- context.addDefinition('setting', 'Setting', 'setting', 'fa-solid fa-gear', 3, {
348
- format: {
349
- id: '{{data.name}}',
350
- },
351
- actions: [
352
- {
353
- name: 'navigate',
354
- type: 'view',
355
- priority: 'primary',
356
- },
357
- ],
358
- });
359
- }
360
- }
361
-
362
- class AXPSettingsModule {
363
- constructor(appInitService, injector) {
364
- }
365
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingsModule, deps: [{ token: i1.AXPAppStartUpService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.NgModule }); }
366
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingsModule }); }
367
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingsModule, providers: [
368
- {
369
- provide: AXP_SEARCH_PROVIDER,
370
- useClass: AXPSettingSearchProvider,
371
- multi: true,
372
- },
373
- {
374
- provide: AXP_SEARCH_DEFINITION_PROVIDER,
375
- useClass: AXPSettingSearchDefinitionProvider,
376
- multi: true,
377
- },
378
- ] }); }
379
- }
380
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingsModule, decorators: [{
381
- type: NgModule,
382
- args: [{
383
- imports: [],
384
- exports: [],
385
- declarations: [],
386
- providers: [
387
- {
388
- provide: AXP_SEARCH_PROVIDER,
389
- useClass: AXPSettingSearchProvider,
390
- multi: true,
391
- },
392
- {
393
- provide: AXP_SEARCH_DEFINITION_PROVIDER,
394
- useClass: AXPSettingSearchDefinitionProvider,
395
- multi: true,
396
- },
397
- ]
398
- }]
399
- }], ctorParameters: () => [{ type: i1.AXPAppStartUpService }, { type: i0.Injector }] });
400
-
401
- /**
402
- * Generated bundle index. Do not edit.
403
- */
404
-
405
- export { AXPSettingsModule, AXPSettingsViewModel };
406
- //# sourceMappingURL=acorex-platform-layout-setting.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"acorex-platform-layout-setting.mjs","sources":["../../../../libs/platform/layout/setting/src/lib/convert-setting-data.ts","../../../../libs/platform/layout/setting/src/lib/setting.viewmodel.ts","../../../../libs/platform/layout/setting/src/lib/search.provider.ts","../../../../libs/platform/layout/setting/src/lib/search-definition.provider.ts","../../../../libs/platform/layout/setting/src/lib/settings.module.ts","../../../../libs/platform/layout/setting/src/acorex-platform-layout-setting.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 { AXPLayoutThemeService } from \"@acorex/platform/themes/shared\";\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\";\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 debugger\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 { Injector, NgModule } from '@angular/core';\nimport { AXPSettingSearchProvider } from './search.provider';\nimport { AXPSettingSearchDefinitionProvider } from './search-definition.provider';\nimport { AXPAppStartUpService } from '@acorex/platform/core';\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})\nexport class AXPSettingsModule {\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,GAAG,CACvB,KAAgC,EAChC,QAAuC,EACvC,WAAwC,KACtC;AACF,QAAA,MAAM,OAAO,GAAG,qBAAqB,CAAC,KAAK,CAAC;QAC5C,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE;YACjC,WAAW,CAAC,IAAI,CAAC;AACf,gBAAA,GAAG,KAAK;gBACR,QAAQ;gBACR,MAAM,EAAE,EAAE;AACX,aAAA,CAAC;AACF,YAAA,eAAe,CAAC,GAAG,CAAC,OAAO,CAAC;;AAEhC,KAAC;AAED,IAAA,MAAM,eAAe,GAAG,CACtB,KAAgC,EAChC,QAA2D,KACzD;QACF,MAAM,eAAe,GAAG,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC;AACvD,QAAA,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE;AAC9B,YAAA,gBAAgB,CAAC,KAAK,EAAE,eAAe,EAAE,kBAAkB,CAAC;;AAEhE,KAA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