@acorex/modules 19.1.3 → 19.1.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.
- package/application-management/lib/layouts/module-entity-detail-view/module-entity-detail-view.component.d.ts +15 -5
- package/conversation/lib/entities/comments/comment.module.d.ts +4 -3
- package/fesm2022/acorex-modules-application-management.mjs +3 -3
- package/fesm2022/acorex-modules-application-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-auth-acorex-modules-auth-BF2gZWhA.mjs → acorex-modules-auth-acorex-modules-auth-BuSxsqTx.mjs} +11 -11
- package/fesm2022/acorex-modules-auth-acorex-modules-auth-BuSxsqTx.mjs.map +1 -0
- package/fesm2022/{acorex-modules-auth-app-chooser.component-BAGIEa63.mjs → acorex-modules-auth-app-chooser.component-B3yFTcfb.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-app-chooser.component-BAGIEa63.mjs.map → acorex-modules-auth-app-chooser.component-B3yFTcfb.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-login.module-Cn2-BTEJ.mjs → acorex-modules-auth-login.module-BwbsBdZm.mjs} +4 -4
- package/fesm2022/{acorex-modules-auth-login.module-Cn2-BTEJ.mjs.map → acorex-modules-auth-login.module-BwbsBdZm.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-master.layout-BeEYC1aO.mjs → acorex-modules-auth-master.layout-BIwGGzl9.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-master.layout-BeEYC1aO.mjs.map → acorex-modules-auth-master.layout-BIwGGzl9.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-password.component-dIFcmwBw.mjs → acorex-modules-auth-password.component-Ce57WfMX.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-password.component-dIFcmwBw.mjs.map → acorex-modules-auth-password.component-Ce57WfMX.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-password.component-07yk91SI.mjs → acorex-modules-auth-password.component-CquAxSV0.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-password.component-07yk91SI.mjs.map → acorex-modules-auth-password.component-CquAxSV0.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-routes-BqvlenNN.mjs → acorex-modules-auth-routes-CbA94Lwp.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-routes-BqvlenNN.mjs.map → acorex-modules-auth-routes-CbA94Lwp.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-two-factor.module-B4AMkhOD.mjs → acorex-modules-auth-two-factor.module-DiN9uKFz.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-two-factor.module-B4AMkhOD.mjs.map → acorex-modules-auth-two-factor.module-DiN9uKFz.mjs.map} +1 -1
- package/fesm2022/acorex-modules-auth.mjs +1 -1
- package/fesm2022/acorex-modules-conversation.mjs +20 -11
- package/fesm2022/acorex-modules-conversation.mjs.map +1 -1
- package/fesm2022/{acorex-modules-form-template-management-category.entity-xUkZHVgy.mjs → acorex-modules-form-template-management-category.entity-Cqu3urCo.mjs} +50 -2
- package/fesm2022/acorex-modules-form-template-management-category.entity-Cqu3urCo.mjs.map +1 -0
- package/fesm2022/acorex-modules-form-template-management-template-picker.component-CsGnikzF.mjs +126 -0
- package/fesm2022/acorex-modules-form-template-management-template-picker.component-CsGnikzF.mjs.map +1 -0
- package/fesm2022/{acorex-modules-form-template-management-template-widget-edit.component-DQw5qvib.mjs → acorex-modules-form-template-management-template-widget-edit.component-CVyFN7D9.mjs} +19 -7
- package/fesm2022/acorex-modules-form-template-management-template-widget-edit.component-CVyFN7D9.mjs.map +1 -0
- package/fesm2022/acorex-modules-form-template-management.mjs +14 -9
- package/fesm2022/acorex-modules-form-template-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-notification-management.mjs +630 -687
- package/fesm2022/acorex-modules-notification-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-platform-management-timezones-BoScbn0h.mjs +15 -0
- package/fesm2022/acorex-modules-platform-management-timezones-BoScbn0h.mjs.map +1 -0
- package/fesm2022/acorex-modules-platform-management.mjs +175 -164
- package/fesm2022/acorex-modules-platform-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-text-template-management.mjs +2 -2
- package/fesm2022/acorex-modules-text-template-management.mjs.map +1 -1
- package/form-template-management/lib/components/widgets/template/index.d.ts +1 -1
- package/form-template-management/lib/components/widgets/template/template-widget-edit.component.d.ts +2 -0
- package/form-template-management/lib/components/widgets/{template/template-picker → template-picker}/template-picker.component.d.ts +2 -2
- package/form-template-management/lib/entities/template/template.types.d.ts +1 -0
- package/notification-management/index.d.ts +2 -2
- package/notification-management/lib/const.d.ts +1 -0
- package/notification-management/lib/entities/channel/channel.service.d.ts +10 -0
- package/notification-management/lib/entities/channel/channel.types.d.ts +8 -0
- package/notification-management/lib/entities/template/template.service.d.ts +10 -0
- package/notification-management/lib/entities/template/template.types.d.ts +8 -0
- package/package.json +5 -5
- package/platform-management/lib/common/organizarion/setting.keys.d.ts +14 -14
- package/platform-management/lib/common/organizarion/settings.provider.d.ts +1 -0
- package/platform-management/lib/common/regional/language-slot/language-slot.component.d.ts +1 -6
- package/platform-management/lib/common/regional/regional-store.service.d.ts +0 -7
- package/platform-management/lib/common/regional/regional-util.service.d.ts +12 -0
- package/platform-management/lib/common/regional/setting.keys.d.ts +11 -11
- package/platform-management/lib/common/regional/setting.provider.d.ts +2 -13
- package/platform-management/lib/const.d.ts +0 -4
- package/fesm2022/acorex-modules-auth-acorex-modules-auth-BF2gZWhA.mjs.map +0 -1
- package/fesm2022/acorex-modules-form-template-management-category.entity-xUkZHVgy.mjs.map +0 -1
- package/fesm2022/acorex-modules-form-template-management-template-picker.component-BXOyKuAt.mjs +0 -123
- package/fesm2022/acorex-modules-form-template-management-template-picker.component-BXOyKuAt.mjs.map +0 -1
- package/fesm2022/acorex-modules-form-template-management-template-widget-edit.component-DQw5qvib.mjs.map +0 -1
- package/notification-management/lib/notification-management-mock-data.d.ts +0 -40
- package/notification-management/lib/notification-management.service.d.ts +0 -15
- /package/form-template-management/lib/components/widgets/{template → template-picker}/template.provider.d.ts +0 -0
- /package/notification-management/lib/entities/{notification-channel.entity.d.ts → channel/channel.entity.d.ts} +0 -0
- /package/notification-management/lib/entities/{notification-template.entity.d.ts → template/template.entity.d.ts} +0 -0
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as i1$1 from '@acorex/platform/common';
|
2
|
-
import { AXPSettingValueProviderService, AXP_SETTING_DEFINITION_PROVIDER, AXPComponentSlotModule, AXMEntityCrudServiceImpl, AXPEntityQueryType, AXPEntityCommandScope, AXP_MENU_PROVIDER } from '@acorex/platform/common';
|
2
|
+
import { AXPSettingScope, AXPSettingValueProviderService, AXP_SETTING_DEFINITION_PROVIDER, AXPComponentSlotModule, AXMEntityCrudServiceImpl, AXPEntityQueryType, AXPEntityCommandScope, AXP_MENU_PROVIDER } from '@acorex/platform/common';
|
3
3
|
import { AXP_ENTITY_DEFINITION_LOADER, AXPEntityService } from '@acorex/platform/layout/entity';
|
4
4
|
import * as i0 from '@angular/core';
|
5
5
|
import { inject, Injector, Injectable, signal, Component, NgModule } from '@angular/core';
|
@@ -35,120 +35,67 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
35
35
|
type: Injectable
|
36
36
|
}] });
|
37
37
|
|
38
|
-
const path$1 = '
|
38
|
+
const path$1 = 'regional:';
|
39
39
|
var AXPRegionalSetting;
|
40
40
|
(function (AXPRegionalSetting) {
|
41
|
-
AXPRegionalSetting["TimeZone"] = "
|
42
|
-
AXPRegionalSetting["Language"] = "
|
43
|
-
AXPRegionalSetting["Country"] = "
|
44
|
-
AXPRegionalSetting["Regional"] = "
|
45
|
-
AXPRegionalSetting["Calendar"] = "
|
46
|
-
AXPRegionalSetting["FirstDayOfWeek"] = "
|
47
|
-
AXPRegionalSetting["WorkDays"] = "
|
48
|
-
AXPRegionalSetting["ShortDate"] = "
|
49
|
-
AXPRegionalSetting["LongDate"] = "
|
50
|
-
AXPRegionalSetting["ShortTime"] = "
|
51
|
-
AXPRegionalSetting["LongTime"] = "
|
41
|
+
AXPRegionalSetting["TimeZone"] = "regional:timezone";
|
42
|
+
AXPRegionalSetting["Language"] = "regional:language";
|
43
|
+
AXPRegionalSetting["Country"] = "regional:country";
|
44
|
+
AXPRegionalSetting["Regional"] = "regional:regional";
|
45
|
+
AXPRegionalSetting["Calendar"] = "regional:calendar";
|
46
|
+
AXPRegionalSetting["FirstDayOfWeek"] = "regional:first-day-of-week";
|
47
|
+
AXPRegionalSetting["WorkDays"] = "regional:work-days";
|
48
|
+
AXPRegionalSetting["ShortDate"] = "regional:short-date";
|
49
|
+
AXPRegionalSetting["LongDate"] = "regional:long-date";
|
50
|
+
AXPRegionalSetting["ShortTime"] = "regional:short-time";
|
51
|
+
AXPRegionalSetting["LongTime"] = "regional:long-time";
|
52
52
|
})(AXPRegionalSetting || (AXPRegionalSetting = {}));
|
53
53
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
}
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
},
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
return timeZones;
|
90
|
-
},
|
91
|
-
async getCurrencies() {
|
92
|
-
const { currencies } = await import('./acorex-modules-platform-management-currencies-vgPg4Hj3.mjs');
|
93
|
-
return currencies;
|
94
|
-
},
|
95
|
-
async getRegionalFormats() {
|
96
|
-
const { regionalFormats } = await import('./acorex-modules-platform-management-regional-formats-BaHofjWg.mjs');
|
97
|
-
return regionalFormats;
|
98
|
-
},
|
99
|
-
async getLanguages() {
|
100
|
-
return (await this.getRegionalFormats())
|
101
|
-
.map(c => ({ code: c.locale, title: c.title }));
|
102
|
-
},
|
103
|
-
async getAvailableLanguages() {
|
104
|
-
return (await this.getLanguages()).filter(c => ['fa-IR', 'en-US'].some(e => e == c.code));
|
105
|
-
}
|
106
|
-
};
|
107
|
-
}), withHooks((store, settingService = inject(AXPSettingValueProviderService)) => ({
|
108
|
-
onInit() {
|
109
|
-
settingService.onChanged.subscribe(async (setting) => {
|
110
|
-
if (setting.keys.includes(AXPRegionalSetting.Language)) {
|
111
|
-
await store.loadSetting();
|
112
|
-
}
|
113
|
-
});
|
114
|
-
},
|
115
|
-
onDestroy() {
|
116
|
-
},
|
117
|
-
})));
|
118
|
-
|
119
|
-
const timeZones = [
|
120
|
-
{ code: 'UTC-5', title: 'UTC-5 (Eastern Time)', offset: '-05:00' },
|
121
|
-
{ code: 'UTC+0', title: 'UTC+0 (Greenwich Mean Time)', offset: '+00:00' },
|
122
|
-
{ code: 'UTC+1', title: 'UTC+1 (Central European Time)', offset: '+01:00' },
|
123
|
-
{ code: 'UTC+2', title: 'UTC+2 (Eastern European Time)', offset: '+02:00' },
|
124
|
-
{ code: 'UTC+3', title: 'UTC+3 (Arabian Time)', offset: '+03:00' },
|
125
|
-
{ code: 'UTC+3:30', title: 'UTC+3:30 (Iran Standard Time)', offset: '+03:30' },
|
126
|
-
{ code: 'UTC+4', title: 'UTC+4 (Gulf Standard Time)', offset: '+04:00' },
|
127
|
-
{ code: 'UTC+9', title: 'UTC+9 (Japan Standard Time)', offset: '+09:00' },
|
128
|
-
{ code: 'UTC+10', title: 'UTC+10 (Australian Eastern Time)', offset: '+10:00' },
|
129
|
-
{ code: 'UTC+12', title: 'UTC+12 (New Zealand Standard Time)', offset: '+12:00' }
|
130
|
-
];
|
131
|
-
|
132
|
-
var timezones = /*#__PURE__*/Object.freeze({
|
133
|
-
__proto__: null,
|
134
|
-
timeZones: timeZones
|
135
|
-
});
|
136
|
-
|
137
|
-
async function getBrowserTimeZoneCode() {
|
138
|
-
const now = new Date();
|
139
|
-
// Calculate offset in hours and minutes
|
140
|
-
const offsetMinutes = now.getTimezoneOffset();
|
141
|
-
const offsetHours = Math.floor(-offsetMinutes / 60);
|
142
|
-
const offsetRemainder = Math.abs(offsetMinutes % 60);
|
143
|
-
// Format the offset properly
|
144
|
-
const formattedOffset = `UTC${offsetHours >= 0 ? '+' : ''}${offsetHours}${offsetRemainder ? `:${offsetRemainder.toString().padStart(2, '0')}` : ''}`;
|
145
|
-
// Find matching time zone
|
146
|
-
const matchedZone = timeZones.find(zone => zone.code === formattedOffset);
|
147
|
-
return matchedZone ? matchedZone.code : 'UTC';
|
54
|
+
class AXPRegionalService {
|
55
|
+
async getCountries() {
|
56
|
+
const { countries } = await import('./acorex-modules-platform-management-countries-CuJVdPLt.mjs');
|
57
|
+
return countries;
|
58
|
+
}
|
59
|
+
async getCurrencies() {
|
60
|
+
const { currencies } = await import('./acorex-modules-platform-management-currencies-vgPg4Hj3.mjs');
|
61
|
+
return currencies;
|
62
|
+
}
|
63
|
+
async getRegionalFormats() {
|
64
|
+
const { regionalFormats } = await import('./acorex-modules-platform-management-regional-formats-BaHofjWg.mjs');
|
65
|
+
return regionalFormats;
|
66
|
+
}
|
67
|
+
async getLanguages() {
|
68
|
+
return (await this.getRegionalFormats())
|
69
|
+
.map(c => ({ code: c.locale, title: c.title }));
|
70
|
+
}
|
71
|
+
async getAvailableLanguages() {
|
72
|
+
return (await this.getLanguages()).filter(c => ['fa-IR', 'en-US'].some(e => e == c.code));
|
73
|
+
}
|
74
|
+
async getBrowserTimeZoneCode() {
|
75
|
+
const { timeZones } = await import('./acorex-modules-platform-management-timezones-BoScbn0h.mjs');
|
76
|
+
const now = new Date();
|
77
|
+
// Calculate offset in hours and minutes
|
78
|
+
const offsetMinutes = now.getTimezoneOffset();
|
79
|
+
const offsetHours = Math.floor(-offsetMinutes / 60);
|
80
|
+
const offsetRemainder = Math.abs(offsetMinutes % 60);
|
81
|
+
// Format the offset properly
|
82
|
+
const formattedOffset = `UTC${offsetHours >= 0 ? '+' : ''}${offsetHours}${offsetRemainder ? `:${offsetRemainder.toString().padStart(2, '0')}` : ''}`;
|
83
|
+
// Find matching time zone
|
84
|
+
const matchedZone = timeZones.find(zone => zone.code === formattedOffset);
|
85
|
+
return matchedZone ? matchedZone.code : 'UTC';
|
86
|
+
}
|
87
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPRegionalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
88
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPRegionalService, providedIn: 'root' }); }
|
148
89
|
}
|
90
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPRegionalService, decorators: [{
|
91
|
+
type: Injectable,
|
92
|
+
args: [{ providedIn: 'root' }]
|
93
|
+
}] });
|
94
|
+
|
149
95
|
class AXMRegionalSettingProvider {
|
150
96
|
constructor() {
|
151
|
-
this.
|
97
|
+
this.translationService = inject(AXTranslationService);
|
98
|
+
this.regionalService = inject(AXPRegionalService);
|
152
99
|
}
|
153
100
|
async provide(context) {
|
154
101
|
context
|
@@ -160,13 +107,13 @@ class AXMRegionalSettingProvider {
|
|
160
107
|
title: 'Time Zone',
|
161
108
|
scope: 'T',
|
162
109
|
isInherited: true,
|
163
|
-
defaultValue: await getBrowserTimeZoneCode(),
|
110
|
+
defaultValue: await this.regionalService.getBrowserTimeZoneCode(),
|
164
111
|
valueTransforms: objectKeyValueTransforms('code'),
|
165
112
|
widget: {
|
166
113
|
type: AXPWidgetsCatalog.select,
|
167
114
|
options: {
|
168
115
|
valueField: 'code',
|
169
|
-
dataSource: await
|
116
|
+
dataSource: await import('./acorex-modules-platform-management-timezones-BoScbn0h.mjs'),
|
170
117
|
},
|
171
118
|
},
|
172
119
|
description: 'Set the default time zone for the application.',
|
@@ -185,7 +132,7 @@ class AXMRegionalSettingProvider {
|
|
185
132
|
type: AXPWidgetsCatalog.select,
|
186
133
|
options: {
|
187
134
|
valueField: 'code',
|
188
|
-
dataSource: await this.
|
135
|
+
dataSource: await this.regionalService.getAvailableLanguages(),
|
189
136
|
},
|
190
137
|
},
|
191
138
|
description: 'Set the preferred display language for the user.',
|
@@ -195,13 +142,13 @@ class AXMRegionalSettingProvider {
|
|
195
142
|
title: 'Regional Format',
|
196
143
|
scope: 'U',
|
197
144
|
isInherited: true,
|
198
|
-
defaultValue: await this.
|
145
|
+
defaultValue: await this.translationService.getDefaultLang(),
|
199
146
|
valueTransforms: objectKeyValueTransforms('locale'),
|
200
147
|
widget: {
|
201
148
|
type: AXPWidgetsCatalog.select,
|
202
149
|
options: {
|
203
150
|
valueField: 'locale',
|
204
|
-
dataSource: await
|
151
|
+
dataSource: await import('./acorex-modules-platform-management-regional-formats-BaHofjWg.mjs'),
|
205
152
|
},
|
206
153
|
triggers: [
|
207
154
|
{
|
@@ -330,13 +277,56 @@ class AXMRegionalSettingProvider {
|
|
330
277
|
}
|
331
278
|
}
|
332
279
|
|
280
|
+
// ThemeStore - Manages theme settings and system changes
|
281
|
+
const AXPRegionalStoreService = signalStore({ providedIn: 'root' },
|
282
|
+
// Initial State
|
283
|
+
withState((translationService = inject(AXTranslationService)) => {
|
284
|
+
const state = {
|
285
|
+
language: translationService.getDefaultLang(),
|
286
|
+
};
|
287
|
+
return state;
|
288
|
+
}),
|
289
|
+
// Computed Signals
|
290
|
+
// withComputed(({ }) => ({
|
291
|
+
// })),
|
292
|
+
// Methods for State Management
|
293
|
+
withMethods((store, settingService = inject(AXPSettingValueProviderService), translationService = inject(AXTranslationService), regionalService = inject(AXPRegionalService)) => {
|
294
|
+
return {
|
295
|
+
async changeLanguage(lang) {
|
296
|
+
if (lang != store.language()) {
|
297
|
+
settingService.scope(AXPSettingScope.User).set(AXPRegionalSetting.Language, lang);
|
298
|
+
patchState(store, { language: lang });
|
299
|
+
}
|
300
|
+
translationService.setActiveLang(lang);
|
301
|
+
const reg = await (await regionalService.getRegionalFormats()).find(c => c.locale == lang);
|
302
|
+
const html = document.getElementsByTagName('html')[0];
|
303
|
+
reg?.layout == 'rtl' ? html.setAttribute('dir', 'rtl') : html.removeAttribute('dir');
|
304
|
+
},
|
305
|
+
async loadSetting() {
|
306
|
+
const lang = (await settingService.get(AXPRegionalSetting.Language)) ?? translationService.getDefaultLang();
|
307
|
+
await this.changeLanguage(lang);
|
308
|
+
},
|
309
|
+
};
|
310
|
+
}), withHooks((store, settingService = inject(AXPSettingValueProviderService)) => ({
|
311
|
+
onInit() {
|
312
|
+
settingService.onChanged.subscribe(async (setting) => {
|
313
|
+
if (setting.keys.includes(AXPRegionalSetting.Language)) {
|
314
|
+
await store.loadSetting();
|
315
|
+
}
|
316
|
+
});
|
317
|
+
},
|
318
|
+
onDestroy() {
|
319
|
+
},
|
320
|
+
})));
|
321
|
+
|
333
322
|
class AXMLanguageSlotComponent {
|
334
323
|
constructor() {
|
324
|
+
this.regionalService = inject(AXPRegionalService);
|
335
325
|
this.store = inject(AXPRegionalStoreService);
|
336
326
|
this.items = signal([]);
|
337
327
|
}
|
338
328
|
async ngOnInit() {
|
339
|
-
const items = await this.
|
329
|
+
const items = await this.regionalService.getAvailableLanguages();
|
340
330
|
this.items.set(items);
|
341
331
|
}
|
342
332
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMLanguageSlotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
@@ -347,26 +337,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
347
337
|
args: [{ imports: [AXDropdownModule, AXDecoratorModule, AXPopoverModule, AXButtonModule, CommonModule], template: "<ax-button look=\"blank\">\n <ax-icon class=\"fa-regular fa-globe\"> </ax-icon>\n <ax-dropdown-panel>\n <ax-button-item-list>\n @for(lang of items(); track lang){\n <ax-button-item [text]=\"lang.title\" [selected]=\"store.language()===lang.code\"\n (onClick)=\"store.changeLanguage(lang.code)\">\n <ax-prefix>\n <ax-icon icon=\"fa-solid fa-flag\"> </ax-icon>\n </ax-prefix>\n </ax-button-item>\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n</ax-button>" }]
|
348
338
|
}] });
|
349
339
|
|
350
|
-
const path = '
|
340
|
+
const path = 'organization:';
|
351
341
|
var AXPOrganizationSetting;
|
352
342
|
(function (AXPOrganizationSetting) {
|
353
|
-
AXPOrganizationSetting["OrganizationName"] = "
|
354
|
-
AXPOrganizationSetting["OrganizationID"] = "
|
355
|
-
AXPOrganizationSetting["ContactEmail"] = "
|
356
|
-
AXPOrganizationSetting["ContactPhone"] = "
|
357
|
-
AXPOrganizationSetting["OrganizationAddress"] = "
|
358
|
-
AXPOrganizationSetting["OrganizationCity"] = "
|
359
|
-
AXPOrganizationSetting["OrganizationCountry"] = "
|
360
|
-
AXPOrganizationSetting["BrandingColor"] = "
|
361
|
-
AXPOrganizationSetting["BrandingLogo"] = "
|
362
|
-
AXPOrganizationSetting["CopyrightText"] = "
|
363
|
-
AXPOrganizationSetting["ApplicationHeaderTitle"] = "
|
364
|
-
AXPOrganizationSetting["SupportEmail"] = "
|
365
|
-
AXPOrganizationSetting["InfoEmail"] = "
|
366
|
-
AXPOrganizationSetting["FaxNumber"] = "
|
343
|
+
AXPOrganizationSetting["OrganizationName"] = "organization:organization-name";
|
344
|
+
AXPOrganizationSetting["OrganizationID"] = "organization:organization-id";
|
345
|
+
AXPOrganizationSetting["ContactEmail"] = "organization:contact-email";
|
346
|
+
AXPOrganizationSetting["ContactPhone"] = "organization:contact-phone";
|
347
|
+
AXPOrganizationSetting["OrganizationAddress"] = "organization:organization-address";
|
348
|
+
AXPOrganizationSetting["OrganizationCity"] = "organization:organization-city";
|
349
|
+
AXPOrganizationSetting["OrganizationCountry"] = "organization:organization-country";
|
350
|
+
AXPOrganizationSetting["BrandingColor"] = "organization:branding-color";
|
351
|
+
AXPOrganizationSetting["BrandingLogo"] = "organization:branding-logo";
|
352
|
+
AXPOrganizationSetting["CopyrightText"] = "organization:copyright-text";
|
353
|
+
AXPOrganizationSetting["ApplicationHeaderTitle"] = "organization:application-header-title";
|
354
|
+
AXPOrganizationSetting["SupportEmail"] = "organization:support-email";
|
355
|
+
AXPOrganizationSetting["InfoEmail"] = "organization:info-email";
|
356
|
+
AXPOrganizationSetting["FaxNumber"] = "organization:fax-number";
|
367
357
|
})(AXPOrganizationSetting || (AXPOrganizationSetting = {}));
|
368
358
|
|
369
359
|
class AXMOrganizationSettingProvider {
|
360
|
+
constructor() {
|
361
|
+
this.sessionService = inject(AXPSessionService);
|
362
|
+
}
|
370
363
|
async provide(context) {
|
371
364
|
context
|
372
365
|
.addGroup('organization-settings', 'Organization Settings', 'Manage organizational preferences.', 'fa-solid fa-building')
|
@@ -375,30 +368,22 @@ class AXMOrganizationSettingProvider {
|
|
375
368
|
.addSetting({
|
376
369
|
key: AXPOrganizationSetting.OrganizationName,
|
377
370
|
title: 'Company Name',
|
378
|
-
scope: '
|
379
|
-
|
371
|
+
scope: 'T',
|
372
|
+
isInherited: false,
|
373
|
+
defaultValue: this.sessionService.tenant?.title,
|
380
374
|
widget: {
|
381
375
|
type: AXPWidgetsCatalog.text,
|
382
376
|
},
|
383
377
|
description: 'Specify the official name of the company.',
|
384
|
-
})
|
385
|
-
.addSetting({
|
386
|
-
key: 'branding-color',
|
387
|
-
title: 'Primary Color',
|
388
|
-
scope: 'G',
|
389
|
-
defaultValue: '#000000',
|
390
|
-
widget: {
|
391
|
-
type: AXPWidgetsCatalog.color,
|
392
|
-
},
|
393
|
-
description: 'Primary brand color used across the application.',
|
394
378
|
})
|
395
379
|
.addSetting({
|
396
380
|
key: 'branding-logo',
|
397
381
|
title: 'Company Logo',
|
398
|
-
scope: '
|
382
|
+
scope: 'T',
|
383
|
+
isInherited: false,
|
399
384
|
defaultValue: '',
|
400
385
|
widget: {
|
401
|
-
type: AXPWidgetsCatalog.
|
386
|
+
type: AXPWidgetsCatalog.avatar,
|
402
387
|
options: {
|
403
388
|
fileTypes: ['image/png', 'image/jpeg'],
|
404
389
|
},
|
@@ -408,7 +393,8 @@ class AXMOrganizationSettingProvider {
|
|
408
393
|
.addSetting({
|
409
394
|
key: 'copyright-text',
|
410
395
|
title: 'Copyright Text',
|
411
|
-
scope: '
|
396
|
+
scope: 'T',
|
397
|
+
isInherited: true,
|
412
398
|
defaultValue: '© 2024 Your Company',
|
413
399
|
widget: {
|
414
400
|
type: AXPWidgetsCatalog.text,
|
@@ -418,8 +404,9 @@ class AXMOrganizationSettingProvider {
|
|
418
404
|
.addSetting({
|
419
405
|
key: 'application-header-title',
|
420
406
|
title: 'Application Header Title',
|
421
|
-
scope: '
|
422
|
-
|
407
|
+
scope: 'T',
|
408
|
+
isInherited: true,
|
409
|
+
defaultValue: this.sessionService.application?.title,
|
423
410
|
widget: {
|
424
411
|
type: AXPWidgetsCatalog.text,
|
425
412
|
},
|
@@ -431,50 +418,75 @@ class AXMOrganizationSettingProvider {
|
|
431
418
|
.addSetting({
|
432
419
|
key: AXPOrganizationSetting.ContactEmail,
|
433
420
|
title: 'Company Email',
|
434
|
-
scope: '
|
421
|
+
scope: 'T',
|
422
|
+
isInherited: false,
|
435
423
|
defaultValue: '',
|
436
424
|
widget: {
|
437
|
-
type: AXPWidgetsCatalog.
|
425
|
+
type: AXPWidgetsCatalog.contact,
|
426
|
+
options: {
|
427
|
+
type: 'email',
|
428
|
+
hasLabel: false,
|
429
|
+
}
|
438
430
|
},
|
439
431
|
description: 'Primary email address for the company.',
|
440
432
|
})
|
441
433
|
.addSetting({
|
442
434
|
key: 'support-email',
|
443
435
|
title: 'Support Email',
|
444
|
-
scope: '
|
436
|
+
scope: 'T',
|
437
|
+
isInherited: false,
|
445
438
|
defaultValue: '',
|
446
439
|
widget: {
|
447
|
-
type: AXPWidgetsCatalog.
|
440
|
+
type: AXPWidgetsCatalog.contact,
|
441
|
+
options: {
|
442
|
+
type: 'email',
|
443
|
+
hasLabel: false,
|
444
|
+
}
|
448
445
|
},
|
449
446
|
description: 'Support email address for customer inquiries.',
|
450
447
|
})
|
451
448
|
.addSetting({
|
452
449
|
key: 'info-email',
|
453
450
|
title: 'Info Email',
|
454
|
-
scope: '
|
451
|
+
scope: 'T',
|
452
|
+
isInherited: false,
|
455
453
|
defaultValue: '',
|
456
454
|
widget: {
|
457
|
-
type: AXPWidgetsCatalog.
|
455
|
+
type: AXPWidgetsCatalog.contact,
|
456
|
+
options: {
|
457
|
+
type: 'email',
|
458
|
+
hasLabel: false,
|
459
|
+
}
|
458
460
|
},
|
459
461
|
description: 'General information email address.',
|
460
462
|
})
|
461
463
|
.addSetting({
|
462
464
|
key: AXPOrganizationSetting.ContactPhone,
|
463
465
|
title: 'Company Phone',
|
464
|
-
scope: '
|
466
|
+
scope: 'T',
|
467
|
+
isInherited: false,
|
465
468
|
defaultValue: '',
|
466
469
|
widget: {
|
467
|
-
type: AXPWidgetsCatalog.
|
470
|
+
type: AXPWidgetsCatalog.contact,
|
471
|
+
options: {
|
472
|
+
type: 'phone',
|
473
|
+
hasLabel: false,
|
474
|
+
}
|
468
475
|
},
|
469
476
|
description: 'Primary contact phone number.',
|
470
477
|
})
|
471
478
|
.addSetting({
|
472
479
|
key: 'fax-number',
|
473
480
|
title: 'Fax Number',
|
474
|
-
scope: '
|
481
|
+
scope: 'T',
|
482
|
+
isInherited: false,
|
475
483
|
defaultValue: '',
|
476
484
|
widget: {
|
477
|
-
type: AXPWidgetsCatalog.
|
485
|
+
type: AXPWidgetsCatalog.contact,
|
486
|
+
options: {
|
487
|
+
type: 'phone',
|
488
|
+
hasLabel: false,
|
489
|
+
}
|
478
490
|
},
|
479
491
|
description: 'Fax number for the company.',
|
480
492
|
})
|
@@ -484,7 +496,8 @@ class AXMOrganizationSettingProvider {
|
|
484
496
|
.addSetting({
|
485
497
|
key: AXPOrganizationSetting.OrganizationAddress,
|
486
498
|
title: 'Street Address',
|
487
|
-
scope: '
|
499
|
+
scope: 'T',
|
500
|
+
isInherited: false,
|
488
501
|
defaultValue: '',
|
489
502
|
widget: {
|
490
503
|
type: AXPWidgetsCatalog.text,
|
@@ -494,7 +507,8 @@ class AXMOrganizationSettingProvider {
|
|
494
507
|
.addSetting({
|
495
508
|
key: AXPOrganizationSetting.OrganizationCity,
|
496
509
|
title: 'City',
|
497
|
-
scope: '
|
510
|
+
scope: 'T',
|
511
|
+
isInherited: false,
|
498
512
|
defaultValue: '',
|
499
513
|
widget: {
|
500
514
|
type: AXPWidgetsCatalog.text,
|
@@ -504,7 +518,8 @@ class AXMOrganizationSettingProvider {
|
|
504
518
|
.addSetting({
|
505
519
|
key: AXPOrganizationSetting.OrganizationCountry,
|
506
520
|
title: 'Country',
|
507
|
-
scope: '
|
521
|
+
scope: 'T',
|
522
|
+
isInherited: false,
|
508
523
|
defaultValue: '',
|
509
524
|
widget: {
|
510
525
|
type: AXPWidgetsCatalog.select,
|
@@ -598,10 +613,6 @@ const AXMPlatformManagementModuleConst = {
|
|
598
613
|
i18n: 'platform-management',
|
599
614
|
localizationManagement: 'localization-management',
|
600
615
|
globalVariableEntity: 'variables',
|
601
|
-
currencyEntity: 'currencies',
|
602
|
-
countryEntity: 'countries',
|
603
|
-
provinceEntity: 'provinces',
|
604
|
-
cityEntity: 'cities',
|
605
616
|
};
|
606
617
|
|
607
618
|
class AXMGlobalVariablesService extends AXMEntityCrudServiceImpl {
|
@@ -1005,7 +1016,7 @@ class AXMPlatformManagmentModuleMenuProvider {
|
|
1005
1016
|
{
|
1006
1017
|
name: 'tenant-application-settings',
|
1007
1018
|
priority: 10000,
|
1008
|
-
text: `t('settings')`,
|
1019
|
+
text: `t('settings.tenant.title', {scope: "${scope}"})`,
|
1009
1020
|
type: 'menu',
|
1010
1021
|
icon: 'fa-solid fa-gear',
|
1011
1022
|
path: `/${appName}/settings/tenant`,
|